blob: 277005d1f032413542879a019587c84fa4bba105 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
# $NetBSD: Makefile,v 1.145 2022/11/23 17:31:43 adam Exp $
DISTNAME= icu4c-72_1-src
PKGNAME= ${DISTNAME:S/4c//:S/-src//:S/_/./g}
CATEGORIES= textproc
MASTER_SITES= ${MASTER_SITE_GITHUB:=unicode-org/}
EXTRACT_SUFX= .tgz
GITHUB_PROJECT= icu
GITHUB_RELEASE= release-72-1
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://icu.unicode.org/
COMMENT= Robust and full-featured Unicode services
LICENSE= mit
WRKSRC= ${WRKDIR}/icu/source
USE_LANGUAGES= c99 c++
USE_TOOLS+= gmake pkg-config
TEST_TARGET= check
UNLIMIT_RESOURCES+= datasize
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --enable-static
CONFIGURE_ENV+= U_MAKE=${TOOLS_GMAKE}
# error: 'max_align_t' in namespace 'std' does not name a type
GCC_REQD+= 4.9
CHECK_SSP_SKIP= lib/libicudata.so*
PYTHON_FOR_BUILD_ONLY= tool
.include "../../mk/pthread.buildlink3.mk"
.if defined(PTHREAD_TYPE) && ${PTHREAD_TYPE} != "native"
CONFIGURE_ARGS+= --disable-threads
.endif
.include "../../mk/compiler.mk"
# from ICU_CHECK_MH_FRAG in source/acinclude.m4
.if ${OPSYS} == "SunOS"
. if ${PKGSRC_COMPILER:Mclang} || ${PKGSRC_COMPILER:Mgcc}
PLIST_SUBST+= MH_NAME=mh-solaris-gcc
. else
PLIST_SUBST+= MH_NAME=mh-solaris
. endif
. if !empty(CC_VERSION:Mgcc-4.[6-9].*)
BUILDLINK_TRANSFORM+= rm:-D__STDC__=0
. endif
BUILDLINK_TRANSFORM+= rm:-ansi
.elif !empty(MACHINE_PLATFORM:MLinux-*-alpha)
. if ${CC_VERSION:Mgcc*}
PLIST_SUBST+= MH_NAME=mh-alpha-linux-gcc
. else
PLIST_SUBST+= MH_NAME=mh-alpha-linux-cc
. endif
.elif !empty(MACHINE_PLATFORM:MLinux-*-powerpc*)
. if ${CC_VERSION:Mgcc*}
PLIST_SUBST+= MH_NAME=mh-linux
. else
PLIST_SUBST+= MH_NAME=mh-linux-va
. endif
.elif ${OPSYS} == "Linux" || ${OPSYS} == "GNUkFreeBSD"
PLIST_SUBST+= MH_NAME=mh-linux
.elif ${OPSYS} == "Cygwin"
PLIST_SUBST+= MH_NAME=mh-cygwin
.elif ${OPSYS:M*BSD*} || ${OPSYS} == "DragonFly"
PLIST_SUBST+= MH_NAME=mh-bsd-gcc
.elif ${OPSYS} == "AIX"
. if ${CC_VERSION:Mgcc*}
PLIST_SUBST+= MH_NAME=mh-aix-gcc
. else
PLIST_SUBST+= MH_NAME=mh-aix-va
. endif
.elif ${OPSYS} == "HPUX"
. if ${CC_VERSION:Mgcc*}
PLIST_SUBST+= MH_NAME=mh-hpux-gcc
. else
PLIST_SUBST+= MH_NAME=mh-hpux-acc
. endif
.elif ${OPSYS} == "Darwin"
PLIST_SUBST+= MH_NAME=mh-darwin
.elif ${OPSYS} == "Haiku"
PLIST_SUBST+= MH_NAME=mh-haiku
.elif ${OPSYS} == "IRIX"
PLIST_SUBST+= MH_NAME=mh-irix
.elif ${OPSYS} == "Cygwin"
PLIST_SUBST+= MH_NAME=mh-cygwin
.elif ${OS_VARIANT} == "SCOOSR5"
PLIST_SUBST+= MH_NAME=mh-scoosr5
.elif ${OPSYS} == "OSF1"
PLIST_SUBST+= MH_NAME=mh-alpha-osf
.elif ${OPSYS} == "QNX"
PLIST_SUBST+= MH_NAME=mh-qnx
.else
# For unknown systems, set the filename to mh-unknown so that the user
# gets a warning about missing files.
PLIST_SUBST+= MH_NAME=mh-unknown
.endif
PKGCONFIG_OVERRIDE+= config/icu*.pc
PKGCONFIG_OVERRIDE_STAGE= post-build
# work around ICU-20533 (build failure on big endian machines)
post-configure:
${MKDIR} ${WRKSRC}/data/out
# expect builtin gcc atomic functions for gcc>=4.1
# (source/common/putilimp.h)
.if !empty(CC_VERSION:Mgcc-*) && \
(empty(CC_VERSION:Mgcc-4.0*) && empty(CC_VERSION:Mgcc-[0-3].*))
. if ${MACHINE_ARCH} == "i386"
CFLAGS+= -march=i486
. endif
.endif
.if ${OPSYS} == "Cygwin"
INSTALL_UNSTRIPPED= yes
SO_MAJOR= ${PKGVERSION_NOREV:R}
. for l in data i18n io le lx test tu uc
GENERATE_PLIST+= ${ECHO} bin/cygicu${l}${SO_MAJOR}.dll;
GENERATE_PLIST+= ${ECHO} lib/libicu${l}${SO_MAJOR}.dll.a;
. endfor
post-install:
mv ${DESTDIR}${PREFIX}/lib/cygicu*.dll ${DESTDIR}${PREFIX}/bin/
. for l in data i18n io le lx test tu uc
${LN} -s libicu${l}${SO_MAJOR}.dll.a ${DESTDIR}${PREFIX}/lib/libicu${l}.dll.a
. endfor
SUBST_CLASSES+= icu-config
SUBST_STAGE.icu-config= post-install
SUBST_FILES.icu-config= ${DESTDIR}${PREFIX}/bin/icu-config
SUBST_SED.icu-config+= -e '/^ICUUC_FILE=/ s/libdir/bindir/'
SUBST_SED.icu-config+= -e 's/l$${LIBICU}/l$${ICUPREFIX}/g'
SUBST_SED.icu-config+= -e '/l$${ICUPREFIX}/ s/$${ICULIBSUFFIX_VERSION}//g'
.endif
.include "../../lang/python/tool.mk"
.include "../../mk/bsd.pkg.mk"
|