| @@ -1,357 +1,357 @@ | | | @@ -1,357 +1,357 @@ |
1 | # $NetBSD: Makefile,v 1.170 2011/01/30 21:31:42 wiz Exp $ | | 1 | # $NetBSD: Makefile,v 1.171 2011/04/07 04:03:57 taca Exp $ |
2 | | | 2 | |
3 | .include "license.mk" | | 3 | .include "license.mk" |
4 | .include "Makefile.common" | | 4 | .include "Makefile.common" |
5 | | | 5 | |
6 | PKGREVISION= 1 | | 6 | PKGREVISION= 2 |
7 | COMMENT= Practical Extraction and Report Language | | 7 | COMMENT= Practical Extraction and Report Language |
8 | | | 8 | |
9 | PKG_DESTDIR_SUPPORT= user-destdir | | 9 | PKG_DESTDIR_SUPPORT= user-destdir |
10 | | | 10 | |
11 | CONFLICTS= perl-base-[0-9]* perl-thread-[0-9]* \ | | 11 | CONFLICTS= perl-base-[0-9]* perl-thread-[0-9]* \ |
12 | p5-CGI-2.66{,nb*} p5-CGI-2.75{,nb*} p5-CGI-2.75.[0-2] \ | | 12 | p5-CGI-2.66{,nb*} p5-CGI-2.75{,nb*} p5-CGI-2.75.[0-2] \ |
13 | p5-Tie-File-0.96{,nb*} \ | | 13 | p5-Tie-File-0.96{,nb*} \ |
14 | p5-Memoize-1.01{,nb*} \ | | 14 | p5-Memoize-1.01{,nb*} \ |
15 | p5-I18N-LangTags<0.35 \ | | 15 | p5-I18N-LangTags<0.35 \ |
16 | p5-Locale-Maketext-1.[0-9]*{,nb*} \ | | 16 | p5-Locale-Maketext-1.[0-9]*{,nb*} \ |
17 | p5-Locale-Maketext-Simple<0.21 \ | | 17 | p5-Locale-Maketext-Simple<0.21 \ |
18 | p5-Digest<=1.16 \ | | 18 | p5-Digest<=1.16 \ |
19 | p5-Digest-MD5<=2.39 \ | | 19 | p5-Digest-MD5<=2.39 \ |
20 | p5-Digest-SHA<2.48 | | 20 | p5-Digest-SHA<2.48 |
21 | | | 21 | |
22 | SUPERSEDES+= p5-Tie-File<0.97 | | 22 | SUPERSEDES+= p5-Tie-File<0.97 |
23 | SUPERSEDES+= p5-Memoize<1.02 | | 23 | SUPERSEDES+= p5-Memoize<1.02 |
24 | SUPERSEDES+= p5-I18N-LangTags<=0.35 | | 24 | SUPERSEDES+= p5-I18N-LangTags<=0.35 |
25 | SUPERSEDES+= p5-Locale-Maketext<=1.15 | | 25 | SUPERSEDES+= p5-Locale-Maketext<=1.15 |
26 | | | 26 | |
27 | .include "../../mk/bsd.prefs.mk" | | 27 | .include "../../mk/bsd.prefs.mk" |
28 | | | 28 | |
29 | # Determine the Perl API version from the patchlevel.h file from the | | 29 | # Determine the Perl API version from the patchlevel.h file from the |
30 | # source distribution. | | 30 | # source distribution. |
31 | # | | 31 | # |
32 | PERL5_API_VERS= ${PERL5_API_VERS_cmd:sh} | | 32 | PERL5_API_VERS= ${PERL5_API_VERS_cmd:sh} |
33 | PERL5_API_VERS_cmd= \ | | 33 | PERL5_API_VERS_cmd= \ |
34 | if ${TEST} -f ${WRKSRC}/patchlevel.h; then \ | | 34 | if ${TEST} -f ${WRKSRC}/patchlevel.h; then \ |
35 | ${AWK} '/\#define[ ]*PERL_API_REVISION/ { R = $$3 }\ | | 35 | ${AWK} '/\#define[ ]*PERL_API_REVISION/ { R = $$3 }\ |
36 | /\#define[ ]*PERL_API_VERSION/ { r = "."$$3 } \ | | 36 | /\#define[ ]*PERL_API_VERSION/ { r = "."$$3 } \ |
37 | /\#define[ ]*PERL_API_SUBVERSION/ { s = "."$$3 } \ | | 37 | /\#define[ ]*PERL_API_SUBVERSION/ { s = "."$$3 } \ |
38 | END { printf "%s%s%s\n", R, r, s }' \ | | 38 | END { printf "%s%s%s\n", R, r, s }' \ |
39 | ${WRKSRC}/patchlevel.h; \ | | 39 | ${WRKSRC}/patchlevel.h; \ |
40 | else \ | | 40 | else \ |
41 | ${ECHO} "unknown"; \ | | 41 | ${ECHO} "unknown"; \ |
42 | fi | | 42 | fi |
43 | | | 43 | |
44 | .include "dirs.mk" | | 44 | .include "dirs.mk" |
45 | | | 45 | |
46 | .include "../../mk/compiler.mk" | | 46 | .include "../../mk/compiler.mk" |
47 | | | 47 | |
48 | HAS_CONFIGURE= yes | | 48 | HAS_CONFIGURE= yes |
49 | CONFIGURE_SCRIPT= ./Configure | | 49 | CONFIGURE_SCRIPT= ./Configure |
50 | CONFIGURE_ARGS+= -sde | | 50 | CONFIGURE_ARGS+= -sde |
51 | CONFIGURE_ARGS+= -D ccflags=${CFLAGS:Q} | | 51 | CONFIGURE_ARGS+= -D ccflags=${CFLAGS:Q} |
52 | CONFIGURE_ARGS+= -D ldflags=${LDFLAGS:Q} | | 52 | CONFIGURE_ARGS+= -D ldflags=${LDFLAGS:Q} |
53 | MAKE_ENV+= LC_ALL="C" | | 53 | MAKE_ENV+= LC_ALL="C" |
54 | | | 54 | |
55 | TEST_TARGET= test | | 55 | TEST_TARGET= test |
56 | | | 56 | |
57 | # Policy.sh generation | | 57 | # Policy.sh generation |
58 | # (see comments in files/Policy.sh) | | 58 | # (see comments in files/Policy.sh) |
59 | SUBST_CLASSES+= policysh | | 59 | SUBST_CLASSES+= policysh |
60 | SUBST_STAGE.policysh= pre-configure | | 60 | SUBST_STAGE.policysh= pre-configure |
61 | SUBST_FILES.policysh= Policy.sh | | 61 | SUBST_FILES.policysh= Policy.sh |
62 | SUBST_VARS.policysh+= MACHINE_ARCH | | 62 | SUBST_VARS.policysh+= MACHINE_ARCH |
63 | SUBST_VARS.policysh+= LOWER_OPSYS | | 63 | SUBST_VARS.policysh+= LOWER_OPSYS |
64 | SUBST_VARS.policysh+= CC | | 64 | SUBST_VARS.policysh+= CC |
65 | SUBST_VARS.policysh+= CFLAGS | | 65 | SUBST_VARS.policysh+= CFLAGS |
66 | SUBST_VARS.policysh+= PERL5_PREFIX | | 66 | SUBST_VARS.policysh+= PERL5_PREFIX |
67 | SUBST_VARS.policysh+= PERL5_SITEPREFIX | | 67 | SUBST_VARS.policysh+= PERL5_SITEPREFIX |
68 | SUBST_VARS.policysh+= PERL5_VENDORPREFIX | | 68 | SUBST_VARS.policysh+= PERL5_VENDORPREFIX |
69 | PERL5_SCRIPTDIR= ${PERL5_PERLBASE}/bin | | 69 | PERL5_SCRIPTDIR= ${PERL5_PERLBASE}/bin |
70 | SUBST_VARS.policysh+= PERL5_SCRIPTDIR | | 70 | SUBST_VARS.policysh+= PERL5_SCRIPTDIR |
71 | SUBST_VARS.policysh+= PERL5_PERLBASE | | 71 | SUBST_VARS.policysh+= PERL5_PERLBASE |
72 | SUBST_VARS.policysh+= PERL5_SITEBASE | | 72 | SUBST_VARS.policysh+= PERL5_SITEBASE |
73 | SUBST_VARS.policysh+= PERL5_VENDORBASE | | 73 | SUBST_VARS.policysh+= PERL5_VENDORBASE |
74 | SUBST_VARS.policysh+= PERL5_PRIVLIB | | 74 | SUBST_VARS.policysh+= PERL5_PRIVLIB |
75 | SUBST_VARS.policysh+= PERL5_SITELIB | | 75 | SUBST_VARS.policysh+= PERL5_SITELIB |
76 | SUBST_VARS.policysh+= PERL5_VENDORLIB | | 76 | SUBST_VARS.policysh+= PERL5_VENDORLIB |
77 | PERL5_MAN1DIR= ${PERL5_PERLBASE}/${PKGMANDIR}/man1 | | 77 | PERL5_MAN1DIR= ${PERL5_PERLBASE}/${PKGMANDIR}/man1 |
78 | SUBST_VARS.policysh+= PERL5_MAN1DIR | | 78 | SUBST_VARS.policysh+= PERL5_MAN1DIR |
79 | SUBST_VARS.policysh+= PKGMANDIR | | 79 | SUBST_VARS.policysh+= PKGMANDIR |
80 | SUBST_VARS.policysh+= LOCALBASE | | 80 | SUBST_VARS.policysh+= LOCALBASE |
81 | SUBST_VARS.policysh+= PTHREAD_LDFLAGS | | 81 | SUBST_VARS.policysh+= PTHREAD_LDFLAGS |
82 | | | 82 | |
83 | .if ${OPSYS} == "Darwin" | | 83 | .if ${OPSYS} == "Darwin" |
84 | # | | 84 | # |
85 | # The Perl build attempts to work around case-insensitivity problems on | | 85 | # The Perl build attempts to work around case-insensitivity problems on |
86 | # HFS filesystems by using GNUmakefiles, so we need to use GNU make. | | 86 | # HFS filesystems by using GNUmakefiles, so we need to use GNU make. |
87 | # | | 87 | # |
88 | USE_TOOLS+= gmake | | 88 | USE_TOOLS+= gmake |
89 | .endif | | 89 | .endif |
90 | | | 90 | |
91 | # | | 91 | # |
92 | # For the moment disable the building of a shared libperl.dylib on Darwin | | 92 | # For the moment disable the building of a shared libperl.dylib on Darwin |
93 | # => 9.0 as it breaks the build. This should just be considered a temporary | | 93 | # => 9.0 as it breaks the build. This should just be considered a temporary |
94 | # work around until the actual problem can be fixed as this worked for | | 94 | # work around until the actual problem can be fixed as this worked for |
95 | # Darwin < 9.0. | | 95 | # Darwin < 9.0. |
96 | # | | 96 | # |
97 | .if empty(MACHINE_PLATFORM:MDarwin-9.*-*) | | 97 | .if empty(MACHINE_PLATFORM:MDarwin-9.*-*) |
98 | CONFIGURE_ARGS+= -Duseshrplib | | 98 | CONFIGURE_ARGS+= -Duseshrplib |
99 | .endif | | 99 | .endif |
100 | | | 100 | |
101 | # Perl embeds the full paths to the following tools in several installed | | 101 | # Perl embeds the full paths to the following tools in several installed |
102 | # files, so make sure the paths to the ones in ${TOOLS_DIR} aren't used. | | 102 | # files, so make sure the paths to the ones in ${TOOLS_DIR} aren't used. |
103 | # | | 103 | # |
104 | USE_TOOLS+= hostname ln sed test | | 104 | USE_TOOLS+= hostname ln sed test |
105 | SUBST_VARS.policysh+= TOOLS_HOSTNAME_CMD | | 105 | SUBST_VARS.policysh+= TOOLS_HOSTNAME_CMD |
106 | SUBST_VARS.policysh+= TOOLS_LN | | 106 | SUBST_VARS.policysh+= TOOLS_LN |
107 | TOOLS_ALIASES.sed+= ${TOOLS_SED:T} | | 107 | TOOLS_ALIASES.sed+= ${TOOLS_SED:T} |
108 | SUBST_VARS.policysh+= TOOLS_SED | | 108 | SUBST_VARS.policysh+= TOOLS_SED |
109 | SUBST_VARS.policysh+= TOOLS_SH | | 109 | SUBST_VARS.policysh+= TOOLS_SH |
110 | SUBST_VARS.policysh+= TOOLS_TEST | | 110 | SUBST_VARS.policysh+= TOOLS_TEST |
111 | SUBST_VARS.policysh+= FALSE | | 111 | SUBST_VARS.policysh+= FALSE |
112 | | | 112 | |
113 | # Nail down the needed libraries for each platform here to avoid hidden | | 113 | # Nail down the needed libraries for each platform here to avoid hidden |
114 | # dependencies. If this isn't defined, then use the perl defaults for the | | 114 | # dependencies. If this isn't defined, then use the perl defaults for the |
115 | # particular operating system. | | 115 | # particular operating system. |
116 | # | | 116 | # |
117 | LIBSWANTED.Darwin= m c | | 117 | LIBSWANTED.Darwin= m c |
118 | LIBSWANTED.DragonFly= m crypt | | 118 | LIBSWANTED.DragonFly= m crypt |
119 | LIBSWANTED.FreeBSD= m crypt | | 119 | LIBSWANTED.FreeBSD= m crypt |
120 | LIBSWANTED.HPUX= cl pthread $$libswanted # see Perl's README.hpux | | 120 | LIBSWANTED.HPUX= cl pthread $$libswanted # see Perl's README.hpux |
121 | LIBSWANTED.IRIX= m crypt | | 121 | LIBSWANTED.IRIX= m crypt |
122 | LIBSWANTED.Interix= m dl | | 122 | LIBSWANTED.Interix= m dl |
123 | LIBSWANTED.Linux= m crypt dl nsl | | 123 | LIBSWANTED.Linux= m crypt dl nsl |
124 | LIBSWANTED.MirBSD= m crypt | | 124 | LIBSWANTED.MirBSD= m crypt |
125 | LIBSWANTED.NetBSD= m crypt | | 125 | LIBSWANTED.NetBSD= m crypt |
126 | LIBSWANTED.OpenBSD= m crypt | | 126 | LIBSWANTED.OpenBSD= m crypt |
127 | LIBSWANTED.SunOS= m crypt dl socket nsl | | 127 | LIBSWANTED.SunOS= m crypt dl socket nsl |
128 | LIBSWANTED.AIX= m crypt dl socket nsl bind c | | 128 | LIBSWANTED.AIX= m crypt dl socket nsl bind c |
129 | LIBSWANTED= ${LIBSWANTED.${OPSYS}} | | 129 | LIBSWANTED= ${LIBSWANTED.${OPSYS}} |
130 | SUBST_VARS.policysh+= LIBSWANTED | | 130 | SUBST_VARS.policysh+= LIBSWANTED |
131 | | | 131 | |
132 | # Nail down the directories in which the system libraries may be found. | | 132 | # Nail down the directories in which the system libraries may be found. |
133 | # If this isn't defined, then use the perl defaults for the particular | | 133 | # If this isn't defined, then use the perl defaults for the particular |
134 | # operating system. | | 134 | # operating system. |
135 | # | | 135 | # |
136 | SYSLIBPATH.Darwin= /usr/lib | | 136 | SYSLIBPATH.Darwin= /usr/lib |
137 | SYSLIBPATH.DragonFly= /usr/lib | | 137 | SYSLIBPATH.DragonFly= /usr/lib |
138 | SYSLIBPATH.FreeBSD= /usr/lib | | 138 | SYSLIBPATH.FreeBSD= /usr/lib |
139 | SYSLIBPATH.Interix= /usr/lib | | 139 | SYSLIBPATH.Interix= /usr/lib |
140 | SYSLIBPATH.MirBSD= /usr/lib | | 140 | SYSLIBPATH.MirBSD= /usr/lib |
141 | SYSLIBPATH.NetBSD= /usr/lib | | 141 | SYSLIBPATH.NetBSD= /usr/lib |
142 | SYSLIBPATH.OpenBSD= /usr/lib | | 142 | SYSLIBPATH.OpenBSD= /usr/lib |
143 | SYSLIBPATH.SunOS= /usr/lib | | 143 | SYSLIBPATH.SunOS= /usr/lib |
144 | SYSLIBPATH.AIX= /usr/lib | | 144 | SYSLIBPATH.AIX= /usr/lib |
145 | SYSLIBPATH= ${SYSLIBPATH.${OPSYS}} | | 145 | SYSLIBPATH= ${SYSLIBPATH.${OPSYS}} |
146 | SUBST_VARS.policysh+= SYSLIBPATH | | 146 | SUBST_VARS.policysh+= SYSLIBPATH |
147 | | | 147 | |
148 | # On a.out platforms, we link with "ld" and on ELF platforms, we link with | | 148 | # On a.out platforms, we link with "ld" and on ELF platforms, we link with |
149 | # "cc", so we need to use different options to pass the run-time search path | | 149 | # "cc", so we need to use different options to pass the run-time search path |
150 | # flags to the link command in the right way. | | 150 | # flags to the link command in the right way. |
151 | # | | 151 | # |
152 | .if ${OBJECT_FMT} == "a.out" | | 152 | .if ${OBJECT_FMT} == "a.out" |
153 | LOCLIBRPATHFLAGS= ${LINKER_RPATH_FLAG} ${LOCALBASE}/lib | | 153 | LOCLIBRPATHFLAGS= ${LINKER_RPATH_FLAG} ${LOCALBASE}/lib |
154 | .elif ${OBJECT_FMT} == "ELF" || ${OBJECT_FMT} == "XCOFF" | | 154 | .elif ${OBJECT_FMT} == "ELF" || ${OBJECT_FMT} == "XCOFF" |
155 | LOCLIBRPATHFLAGS= ${COMPILER_RPATH_FLAG}${LOCALBASE}/lib | | 155 | LOCLIBRPATHFLAGS= ${COMPILER_RPATH_FLAG}${LOCALBASE}/lib |
156 | .else | | 156 | .else |
157 | LOCLIBRPATHFLAGS= # empty | | 157 | LOCLIBRPATHFLAGS= # empty |
158 | .endif | | 158 | .endif |
159 | | | 159 | |
160 | .include "../../mk/dlopen.buildlink3.mk" | | 160 | .include "../../mk/dlopen.buildlink3.mk" |
161 | | | 161 | |
162 | CHECK_BUILTIN.pthread:= yes | | 162 | CHECK_BUILTIN.pthread:= yes |
163 | .include "../../mk/pthread.builtin.mk" | | 163 | .include "../../mk/pthread.builtin.mk" |
164 | CHECK_BUILTIN.pthread:= no | | 164 | CHECK_BUILTIN.pthread:= no |
165 | | | 165 | |
166 | # By default, build with threads only if the threads are native. | | 166 | # By default, build with threads only if the threads are native. |
167 | .if !empty(USE_BUILTIN.pthread:M[yY][eE][sS]) | | 167 | .if !empty(USE_BUILTIN.pthread:M[yY][eE][sS]) |
168 | PERL5_BUILD_THREADS_SUPPORT= yes | | 168 | PERL5_BUILD_THREADS_SUPPORT= yes |
169 | .else | | 169 | .else |
170 | PERL5_BUILD_THREADS_SUPPORT= ${DLOPEN_REQUIRE_PTHREADS} | | 170 | PERL5_BUILD_THREADS_SUPPORT= ${DLOPEN_REQUIRE_PTHREADS} |
171 | .endif | | 171 | .endif |
172 | | | 172 | |
173 | ### [Sat Dec 18 17:29:44 EST 2004 : jlam] | | 173 | ### [Sat Dec 18 17:29:44 EST 2004 : jlam] |
174 | ### Native threading on VAX isn't ready for primetime in NetBSD>=2.0. | | 174 | ### Native threading on VAX isn't ready for primetime in NetBSD>=2.0. |
175 | ### Build Perl without threads-support until VAX native threads are | | 175 | ### Build Perl without threads-support until VAX native threads are |
176 | ### known to work. | | 176 | ### known to work. |
177 | ### | | 177 | ### |
178 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-vax) && \ | | 178 | .if !empty(MACHINE_PLATFORM:MNetBSD-*-vax) && \ |
179 | !empty(USE_BUILTIN.pthread:M[yY][eE][sS]) | | 179 | !empty(USE_BUILTIN.pthread:M[yY][eE][sS]) |
180 | PKG_HACKS+= broken-vax-pthreads | | 180 | PKG_HACKS+= broken-vax-pthreads |
181 | PERL5_BUILD_THREADS_SUPPORT= no | | 181 | PERL5_BUILD_THREADS_SUPPORT= no |
182 | .endif | | 182 | .endif |
183 | | | 183 | |
184 | .if !empty(MACHINE_PLATFORM:MMirBSD*) | | 184 | .if !empty(MACHINE_PLATFORM:MMirBSD*) |
185 | SUBST_CLASSES+= mirbsd-paths | | 185 | SUBST_CLASSES+= mirbsd-paths |
186 | SUBST_STAGE.mirbsd-paths= pre-configure | | 186 | SUBST_STAGE.mirbsd-paths= pre-configure |
187 | SUBST_FILES.mirbsd-paths= hints/mirbsd.sh | | 187 | SUBST_FILES.mirbsd-paths= hints/mirbsd.sh |
188 | SUBST_SED.mirbsd-paths= -e 's,/usr/mpkg,${PREFIX},g' | | 188 | SUBST_SED.mirbsd-paths= -e 's,/usr/mpkg,${PREFIX},g' |
189 | SUBST_MESSAGE.mirbsd-paths= Do not use non-pkgsrc paths on MirBSD. | | 189 | SUBST_MESSAGE.mirbsd-paths= Do not use non-pkgsrc paths on MirBSD. |
190 | .endif | | 190 | .endif |
191 | | | 191 | |
192 | .include "../../mk/compiler.mk" | | 192 | .include "../../mk/compiler.mk" |
193 | | | 193 | |
194 | PKG_OPTIONS_VAR= PKG_OPTIONS.perl | | 194 | PKG_OPTIONS_VAR= PKG_OPTIONS.perl |
195 | PKG_OPTIONS_REQUIRED_GROUPS= perlbits | | 195 | PKG_OPTIONS_REQUIRED_GROUPS= perlbits |
196 | PKG_OPTIONS_GROUP.perlbits= 64bitauto 64bitint 64bitmore 64bitall 64bitnone | | 196 | PKG_OPTIONS_GROUP.perlbits= 64bitauto 64bitint 64bitmore 64bitall 64bitnone |
197 | PKG_SUPPORTED_OPTIONS= debug threads mstats | | 197 | PKG_SUPPORTED_OPTIONS= debug threads mstats |
198 | .if !empty(PERL5_BUILD_THREADS_SUPPORT:M[yY][eE][sS]) | | 198 | .if !empty(PERL5_BUILD_THREADS_SUPPORT:M[yY][eE][sS]) |
199 | PKG_SUGGESTED_OPTIONS= threads | | 199 | PKG_SUGGESTED_OPTIONS= threads |
200 | .endif | | 200 | .endif |
201 | | | 201 | |
202 | .if ${OPSYS} == "IRIX" | | 202 | .if ${OPSYS} == "IRIX" |
203 | . if defined(ABI) && ${ABI} == "64" | | 203 | . if defined(ABI) && ${ABI} == "64" |
204 | PKG_SUGGESTED_OPTIONS+= 64bitint | | 204 | PKG_SUGGESTED_OPTIONS+= 64bitint |
205 | . endif | | 205 | . endif |
206 | .elif ${OPSYS} == "AIX" | | 206 | .elif ${OPSYS} == "AIX" |
207 | . if defined(ABI) && ${ABI} == "64" | | 207 | . if defined(ABI) && ${ABI} == "64" |
208 | PKG_SUGGESTED_OPTIONS+= 64bitall | | 208 | PKG_SUGGESTED_OPTIONS+= 64bitall |
209 | . else | | 209 | . else |
210 | PKG_SUGGESTED_OPTIONS+= 64bitnone | | 210 | PKG_SUGGESTED_OPTIONS+= 64bitnone |
211 | . endif | | 211 | . endif |
212 | .else | | 212 | .else |
213 | PKG_SUGGESTED_OPTIONS+= 64bitauto | | 213 | PKG_SUGGESTED_OPTIONS+= 64bitauto |
214 | .endif | | 214 | .endif |
215 | | | 215 | |
216 | .include "../../mk/bsd.options.mk" | | 216 | .include "../../mk/bsd.options.mk" |
217 | | | 217 | |
218 | .if !empty(PKG_OPTIONS:Mthreads) | | 218 | .if !empty(PKG_OPTIONS:Mthreads) |
219 | . include "../../mk/pthread.buildlink3.mk" | | 219 | . include "../../mk/pthread.buildlink3.mk" |
220 | CONFIGURE_ARGS+= -Duseithreads | | 220 | CONFIGURE_ARGS+= -Duseithreads |
221 | CFLAGS+= ${PTHREAD_CFLAGS} | | 221 | CFLAGS+= ${PTHREAD_CFLAGS} |
222 | LIBSWANTED+= ${PTHREAD_LIBS:M-l*:S/^-l//} | | 222 | LIBSWANTED+= ${PTHREAD_LIBS:M-l*:S/^-l//} |
223 | . if ${OBJECT_FMT} == "XCOFF" | | 223 | . if ${OBJECT_FMT} == "XCOFF" |
224 | PERL5_RPATH_THREAD=-thread | | 224 | PERL5_RPATH_THREAD=-thread |
225 | . endif | | 225 | . endif |
226 | .else | | 226 | .else |
227 | CONFIGURE_ARGS+= -Uuseithreads | | 227 | CONFIGURE_ARGS+= -Uuseithreads |
228 | . if ${OBJECT_FMT} == "XCOFF" | | 228 | . if ${OBJECT_FMT} == "XCOFF" |
229 | PERL5_RPATH_THREAD= | | 229 | PERL5_RPATH_THREAD= |
230 | . endif | | 230 | . endif |
231 | .endif | | 231 | .endif |
232 | | | 232 | |
233 | .if !empty(PKG_OPTIONS:Mdebug) | | 233 | .if !empty(PKG_OPTIONS:Mdebug) |
234 | CFLAGS+= -DDEBUGGING | | 234 | CFLAGS+= -DDEBUGGING |
235 | .endif | | 235 | .endif |
236 | | | 236 | |
237 | .if !empty(PKG_OPTIONS:Mmstats) | | 237 | .if !empty(PKG_OPTIONS:Mmstats) |
238 | CFLAGS+= -DPERL_DEBUGGING_MSTATS | | 238 | CFLAGS+= -DPERL_DEBUGGING_MSTATS |
239 | CONFIGURE_ARGS+= -Dusemymalloc | | 239 | CONFIGURE_ARGS+= -Dusemymalloc |
240 | .else | | 240 | .else |
241 | CONFIGURE_ARGS+= -Uusemymalloc | | 241 | CONFIGURE_ARGS+= -Uusemymalloc |
242 | .endif | | 242 | .endif |
243 | | | 243 | |
244 | .if !empty(PKG_OPTIONS:M64bitint) | | 244 | .if !empty(PKG_OPTIONS:M64bitint) |
245 | CONFIGURE_ARGS+= -Duse64bitint | | 245 | CONFIGURE_ARGS+= -Duse64bitint |
246 | . if ${OBJECT_FMT} == "XCOFF" | | 246 | . if ${OBJECT_FMT} == "XCOFF" |
247 | LOCLIBRPATHFLAGS+= ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}${PERL5_RPATH_THREAD}-multi-64int/CORE | | 247 | LOCLIBRPATHFLAGS+= ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}${PERL5_RPATH_THREAD}-multi-64int/CORE |
248 | . endif | | 248 | . endif |
249 | .elif !empty(PKG_OPTIONS:M64bitmore) | | 249 | .elif !empty(PKG_OPTIONS:M64bitmore) |
250 | CONFIGURE_ARGS+= -Dusemorebits | | 250 | CONFIGURE_ARGS+= -Dusemorebits |
251 | . if ${OBJECT_FMT} == "XCOFF" | | 251 | . if ${OBJECT_FMT} == "XCOFF" |
252 | LOCLIBRPATHFLAGS+= ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}${PERL5_RPATH_THREAD}-multi-64int-ld/CORE | | 252 | LOCLIBRPATHFLAGS+= ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}${PERL5_RPATH_THREAD}-multi-64int-ld/CORE |
253 | . endif | | 253 | . endif |
254 | .elif !empty(PKG_OPTIONS:M64bitall) | | 254 | .elif !empty(PKG_OPTIONS:M64bitall) |
255 | CONFIGURE_ARGS+= -Duse64bitall | | 255 | CONFIGURE_ARGS+= -Duse64bitall |
256 | . if ${OBJECT_FMT} == "XCOFF" | | 256 | . if ${OBJECT_FMT} == "XCOFF" |
257 | LOCLIBRPATHFLAGS+= ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}${PERL5_RPATH_THREAD}-multi-64all/CORE | | 257 | LOCLIBRPATHFLAGS+= ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}${PERL5_RPATH_THREAD}-multi-64all/CORE |
258 | . endif | | 258 | . endif |
259 | .elif !empty(PKG_OPTIONS:M64bitnone) | | 259 | .elif !empty(PKG_OPTIONS:M64bitnone) |
260 | CONFIGURE_ARGS+= -Uuse64bitall -Uusemorebits -Uuse64bitint | | 260 | CONFIGURE_ARGS+= -Uuse64bitall -Uusemorebits -Uuse64bitint |
261 | . if ${OBJECT_FMT} == "XCOFF" | | 261 | . if ${OBJECT_FMT} == "XCOFF" |
262 | LOCLIBRPATHFLAGS+= ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}${PERL5_RPATH_THREAD}-multi/CORE | | 262 | LOCLIBRPATHFLAGS+= ${COMPILER_RPATH_FLAG}${PERL5_PRIVLIB}/${MACHINE_ARCH}-${LOWER_OPSYS}${PERL5_RPATH_THREAD}-multi/CORE |
263 | . endif | | 263 | . endif |
264 | .else | | 264 | .else |
265 | . if ${OBJECT_FMT} == "XCOFF" | | 265 | . if ${OBJECT_FMT} == "XCOFF" |
266 | BROKEN= XCOFF targets need the path specified where libperl.a resides.\ | | 266 | BROKEN= XCOFF targets need the path specified where libperl.a resides.\ |
267 | Please choose on of 64bitint 64bitmore 64bitall or 64bitnone to allow this. | | 267 | Please choose on of 64bitint 64bitmore 64bitall or 64bitnone to allow this. |
268 | . endif | | 268 | . endif |
269 | .endif | | 269 | .endif |
270 | SUBST_VARS.policysh+= LOCLIBRPATHFLAGS | | 270 | SUBST_VARS.policysh+= LOCLIBRPATHFLAGS |
271 | | | 271 | |
272 | # Remove a spurious workdir reference | | 272 | # Remove a spurious workdir reference |
273 | SUBST_CLASSES+= rm | | 273 | SUBST_CLASSES+= rm |
274 | SUBST_STAGE.rm= pre-install | | 274 | SUBST_STAGE.rm= pre-install |
275 | SUBST_FILES.rm= lib/Config_heavy.pl | | 275 | SUBST_FILES.rm= lib/Config_heavy.pl |
276 | SUBST_SED.rm= -e "s!^rm_try='/.*/\\.tools/bin/rm -f!rm_try='/bin/rm -f!" | | 276 | SUBST_SED.rm= -e "s!^rm_try='/.*/\\.tools/bin/rm -f!rm_try='/bin/rm -f!" |
277 | | | 277 | |
278 | # Replace our perl as the interpreter | | 278 | # Replace our perl as the interpreter |
279 | REPLACE_PERL+= lib/File/DosGlob.pm | | 279 | REPLACE_PERL+= lib/File/DosGlob.pm |
280 | REPLACE_PERL+= lib/version.pm | | 280 | REPLACE_PERL+= lib/version.pm |
281 | REPLACE_PERL+= cpan/bignum/lib/Math/BigFloat/Trace.pm | | 281 | REPLACE_PERL+= cpan/bignum/lib/Math/BigFloat/Trace.pm |
282 | REPLACE_PERL+= cpan/bignum/lib/Math/BigInt/Trace.pm | | 282 | REPLACE_PERL+= cpan/bignum/lib/Math/BigInt/Trace.pm |
283 | REPLACE_PERL+= lib/unicore/mktables | | 283 | REPLACE_PERL+= lib/unicore/mktables |
284 | | | 284 | |
285 | # And replace a perl interpreter during the pre-install stage | | 285 | # And replace a perl interpreter during the pre-install stage |
286 | # I think this may be a bootstrap script, so can't use REPLACE_PERL | | 286 | # I think this may be a bootstrap script, so can't use REPLACE_PERL |
287 | # because that is acted upon already in the pre-configure stage | | 287 | # because that is acted upon already in the pre-configure stage |
288 | SUBST_CLASSES+= miniperl | | 288 | SUBST_CLASSES+= miniperl |
289 | SUBST_STAGE.miniperl= pre-install | | 289 | SUBST_STAGE.miniperl= pre-install |
290 | SUBST_FILES.miniperl= lib/ExtUtils/xsubpp | | 290 | SUBST_FILES.miniperl= lib/ExtUtils/xsubpp |
291 | SUBST_SED.miniperl= -e "1s:\#!./miniperl:\#!${PERL5}:" | | 291 | SUBST_SED.miniperl= -e "1s:\#!./miniperl:\#!${PERL5}:" |
292 | | | 292 | |
293 | .if ${PKGSRC_COMPILER} == "xlc" | | 293 | .if ${PKGSRC_COMPILER} == "xlc" |
294 | SUBST_CLASSES+= cpprun | | 294 | SUBST_CLASSES+= cpprun |
295 | SUBST_STAGE.cpprun= pre-install | | 295 | SUBST_STAGE.cpprun= pre-install |
296 | SUBST_FILES.cpprun= lib/Config_heavy.pl | | 296 | SUBST_FILES.cpprun= lib/Config_heavy.pl |
297 | . if !empty(PKG_OPTIONS:Mthreads) | | 297 | . if !empty(PKG_OPTIONS:Mthreads) |
298 | SUBST_SED.cpprun= -e "s/cpprun=''/cpprun='cc_r -E'/" | | 298 | SUBST_SED.cpprun= -e "s/cpprun=''/cpprun='cc_r -E'/" |
299 | . else | | 299 | . else |
300 | SUBST_SED.cpprun= -e "s/cpprun=''/cpprun='cc -E'/" | | 300 | SUBST_SED.cpprun= -e "s/cpprun=''/cpprun='cc -E'/" |
301 | . endif | | 301 | . endif |
302 | .endif | | 302 | .endif |
303 | | | 303 | |
304 | # Some platforms may want the directory mode not to be 0755. This | | 304 | # Some platforms may want the directory mode not to be 0755. This |
305 | # is, unfortunately, hardcoded in quite a few places in Perl, so | | 305 | # is, unfortunately, hardcoded in quite a few places in Perl, so |
306 | # let's substitute what pkgsrc says instead. | | 306 | # let's substitute what pkgsrc says instead. |
307 | # | | 307 | # |
308 | SUBST_CLASSES+= dirmode | | 308 | SUBST_CLASSES+= dirmode |
309 | SUBST_STAGE.dirmode= post-patch | | 309 | SUBST_STAGE.dirmode= post-patch |
310 | SUBST_FILES.dirmode= installhtml install_lib.pl \ | | 310 | SUBST_FILES.dirmode= installhtml install_lib.pl \ |
311 | dist/ExtUtils-Install/lib/ExtUtils/Install.pm | | 311 | dist/ExtUtils-Install/lib/ExtUtils/Install.pm |
312 | SUBST_SED.dirmode= -e "s/755/${PKGDIRMODE}/g;/umask(/d" | | 312 | SUBST_SED.dirmode= -e "s/755/${PKGDIRMODE}/g;/umask(/d" |
313 | | | 313 | |
314 | post-extract: | | 314 | post-extract: |
315 | cp ${FILESDIR}/Policy.sh ${WRKSRC}/Policy.sh | | 315 | cp ${FILESDIR}/Policy.sh ${WRKSRC}/Policy.sh |
316 | | | 316 | |
317 | pre-configure: | | 317 | pre-configure: |
318 | cd ${WRKSRC} && find `pwd` -name "*.orig" -type f -exec ${RM} -f {} \; | | 318 | cd ${WRKSRC} && find `pwd` -name "*.orig" -type f -exec ${RM} -f {} \; |
319 | | | 319 | |
320 | post-build: | | 320 | post-build: |
321 | ${SED} -e "s,@PERL5@,"${PERL5:Q}",g" \ | | 321 | ${SED} -e "s,@PERL5@,"${PERL5:Q}",g" \ |
322 | -e "s,@SH@,"${SH:Q}",g" \ | | 322 | -e "s,@SH@,"${SH:Q}",g" \ |
323 | -e "s,@PKGMANDIR@,"${PKGMANDIR:Q}",g" \ | | 323 | -e "s,@PKGMANDIR@,"${PKGMANDIR:Q}",g" \ |
324 | ${FILESDIR}/perllink.in > ${WRKDIR}/perllink.sh | | 324 | ${FILESDIR}/perllink.in > ${WRKDIR}/perllink.sh |
325 | | | 325 | |
326 | INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 | | 326 | INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 |
327 | PERL5_PACKLIST_DIR_cmd= . ${WRKSRC}/config.sh; echo $$installarchlib | | 327 | PERL5_PACKLIST_DIR_cmd= . ${WRKSRC}/config.sh; echo $$installarchlib |
328 | PERL5_PACKLIST_DIR= ${PERL5_PACKLIST_DIR_cmd:sh} | | 328 | PERL5_PACKLIST_DIR= ${PERL5_PACKLIST_DIR_cmd:sh} |
329 | PERL5_PACKLIST= .packlist | | 329 | PERL5_PACKLIST= .packlist |
330 | PERL5_PACKLIST_DESTDIR= no | | 330 | PERL5_PACKLIST_DESTDIR= no |
331 | FILES_SUBST+= PERL5_COMMENT=\# | | 331 | FILES_SUBST+= PERL5_COMMENT=\# |
332 | FILES_SUBST+= PERL5_PACKLIST= | | 332 | FILES_SUBST+= PERL5_PACKLIST= |
333 | PLIST_SRC= ${WRKDIR}/.PLIST_SRC | | 333 | PLIST_SRC= ${WRKDIR}/.PLIST_SRC |
334 | | | 334 | |
335 | post-install: perl5-post-install | | 335 | post-install: perl5-post-install |
336 | | | 336 | |
337 | perl5-post-install: | | 337 | perl5-post-install: |
338 | ${RUN}if ${TEST} -x ${DESTDIR}${PREFIX}/bin/a2p; then \ | | 338 | ${RUN}if ${TEST} -x ${DESTDIR}${PREFIX}/bin/a2p; then \ |
339 | strip ${DESTDIR}${PREFIX}/bin/a2p; \ | | 339 | strip ${DESTDIR}${PREFIX}/bin/a2p; \ |
340 | fi | | 340 | fi |
341 | ${RUN}${INSTALL_SCRIPT} ${WRKDIR}/perllink.sh ${DESTDIR}${PERL5_SCRIPTDIR}/perllink; \ | | 341 | ${RUN}${INSTALL_SCRIPT} ${WRKDIR}/perllink.sh ${DESTDIR}${PERL5_SCRIPTDIR}/perllink; \ |
342 | ${INSTALL_MAN} ${FILESDIR}/perllink.1 ${DESTDIR}${PERL5_MAN1DIR}/perllink.1; \ | | 342 | ${INSTALL_MAN} ${FILESDIR}/perllink.1 ${DESTDIR}${PERL5_MAN1DIR}/perllink.1; \ |
343 | ${RM} -f ${DESTDIR}${PREFIX}/bin/perllink \ | | 343 | ${RM} -f ${DESTDIR}${PREFIX}/bin/perllink \ |
344 | ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/perllink.1; \ | | 344 | ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/perllink.1; \ |
345 | ${LN} -s ${PERL5_SCRIPTDIR}/perllink ${DESTDIR}${PREFIX}/bin/perllink; \ | | 345 | ${LN} -s ${PERL5_SCRIPTDIR}/perllink ${DESTDIR}${PREFIX}/bin/perllink; \ |
346 | ${LN} -s ${PERL5_MAN1DIR}/perllink.1 \ | | 346 | ${LN} -s ${PERL5_MAN1DIR}/perllink.1 \ |
347 | ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/perllink.1; \ | | 347 | ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/perllink.1; \ |
348 | { ${CAT} ${PKGDIR}/PLIST; \ | | 348 | { ${CAT} ${PKGDIR}/PLIST; \ |
349 | ${ECHO} "${PERL5_SCRIPTDIR}/perllink"; \ | | 349 | ${ECHO} "${PERL5_SCRIPTDIR}/perllink"; \ |
350 | ${ECHO} "${PERL5_MAN1DIR}/perllink.1"; \ | | 350 | ${ECHO} "${PERL5_MAN1DIR}/perllink.1"; \ |
351 | } | ${SED} -e "s,^"${PREFIX:Q}"/,," > ${PLIST_SRC} | | 351 | } | ${SED} -e "s,^"${PREFIX:Q}"/,," > ${PLIST_SRC} |
352 | .if ${OPSYS} == "Haiku" | | 352 | .if ${OPSYS} == "Haiku" |
353 | ${CHMOD} a+x ${DESTDIR}${PREFIX}/bin/perl | | 353 | ${CHMOD} a+x ${DESTDIR}${PREFIX}/bin/perl |
354 | .endif | | 354 | .endif |
355 | | | 355 | |
356 | .include "packlist.mk" | | 356 | .include "packlist.mk" |
357 | .include "../../mk/bsd.pkg.mk" | | 357 | .include "../../mk/bsd.pkg.mk" |