Annotation of pkgsrc/lang/perl5/Makefile, Revision 1.202
1.202 ! jperkin 1: # $NetBSD: Makefile,v 1.201 2013/05/31 10:55:15 adam Exp $
1.153 sno 2:
3: .include "license.mk"
1.162 sno 4: .include "Makefile.common"
1.37 jlam 5:
1.93 jlam 6: COMMENT= Practical Extraction and Report Language
7:
1.97 jlam 8: CONFLICTS= perl-base-[0-9]* perl-thread-[0-9]* \
1.162 sno 9: p5-CGI-2.66{,nb*} p5-CGI-2.75{,nb*} p5-CGI-2.75.[0-2] \
10: p5-Tie-File-0.96{,nb*} \
1.164 sno 11: p5-Memoize-1.01{,nb*} \
1.168 wiz 12: p5-I18N-LangTags<0.35 \
1.164 sno 13: p5-Locale-Maketext-1.[0-9]*{,nb*} \
1.168 wiz 14: p5-Locale-Maketext-Simple<0.21 \
15: p5-Digest<=1.16 \
16: p5-Digest-MD5<=2.39 \
1.164 sno 17: p5-Digest-SHA<2.48
1.162 sno 18:
19: SUPERSEDES+= p5-Tie-File<0.97
20: SUPERSEDES+= p5-Memoize<1.02
1.168 wiz 21: SUPERSEDES+= p5-I18N-LangTags<=0.35
1.164 sno 22: SUPERSEDES+= p5-Locale-Maketext<=1.15
1.40 jlam 23:
1.97 jlam 24: .include "../../mk/bsd.prefs.mk"
25:
26: # Determine the Perl API version from the patchlevel.h file from the
27: # source distribution.
28: #
1.117 jlam 29: PERL5_API_VERS= ${PERL5_API_VERS_cmd:sh}
30: PERL5_API_VERS_cmd= \
1.115 jlam 31: if ${TEST} -f ${WRKSRC}/patchlevel.h; then \
32: ${AWK} '/\#define[ ]*PERL_API_REVISION/ { R = $$3 }\
33: /\#define[ ]*PERL_API_VERSION/ { r = "."$$3 } \
34: /\#define[ ]*PERL_API_SUBVERSION/ { s = "."$$3 } \
35: END { printf "%s%s%s\n", R, r, s }' \
36: ${WRKSRC}/patchlevel.h; \
37: else \
38: ${ECHO} "unknown"; \
39: fi
1.97 jlam 40:
1.162 sno 41: .include "dirs.mk"
1.74 jlam 42:
1.93 jlam 43: .include "../../mk/compiler.mk"
1.77 jlam 44:
45: HAS_CONFIGURE= yes
1.40 jlam 46: CONFIGURE_SCRIPT= ./Configure
47: CONFIGURE_ARGS+= -sde
1.93 jlam 48: MAKE_ENV+= LC_ALL="C"
49:
1.60 dillo 50: TEST_TARGET= test
1.40 jlam 51:
1.160 seb 52: # Policy.sh generation
53: # (see comments in files/Policy.sh)
54: SUBST_CLASSES+= policysh
55: SUBST_STAGE.policysh= pre-configure
56: SUBST_FILES.policysh= Policy.sh
57: SUBST_VARS.policysh+= MACHINE_ARCH
58: SUBST_VARS.policysh+= LOWER_OPSYS
1.190 sbd 59: SUBST_VARS.policysh+= OBJECT_FMT
1.160 seb 60: SUBST_VARS.policysh+= CC
61: SUBST_VARS.policysh+= CFLAGS
1.191 sbd 62: SUBST_VARS.policysh+= LDFLAGS
1.190 sbd 63: SUBST_VARS.policysh+= COMPILER_RPATH_FLAG
1.160 seb 64: SUBST_VARS.policysh+= PERL5_PREFIX
65: SUBST_VARS.policysh+= PERL5_SITEPREFIX
66: SUBST_VARS.policysh+= PERL5_VENDORPREFIX
67: SUBST_VARS.policysh+= PERL5_PERLBASE
68: SUBST_VARS.policysh+= PERL5_SITEBASE
1.172 abs 69: SUBST_VARS.policysh+= PERL5_SITEBIN
1.160 seb 70: SUBST_VARS.policysh+= PERL5_VENDORBASE
71: SUBST_VARS.policysh+= PERL5_PRIVLIB
72: SUBST_VARS.policysh+= PERL5_SITELIB
73: SUBST_VARS.policysh+= PERL5_VENDORLIB
74: SUBST_VARS.policysh+= PKGMANDIR
75: SUBST_VARS.policysh+= LOCALBASE
76: SUBST_VARS.policysh+= PTHREAD_LDFLAGS
1.40 jlam 77:
1.202 ! jperkin 78: # Avoid the ${TOOLS_BIN} path getting written to installed files.
! 79: SUBST_CLASSES+= toolsbin
! 80: SUBST_STAGE.toolsbin= pre-configure
! 81: SUBST_FILES.toolsbin= Configure
! 82: SUBST_VARS.toolsbin= TOOLS_RM
! 83:
1.196 obache 84: .if ${OPSYS} == "Darwin" || ${OPSYS} == "Cygwin"
1.93 jlam 85: #
1.97 jlam 86: # The Perl build attempts to work around case-insensitivity problems on
1.93 jlam 87: # HFS filesystems by using GNUmakefiles, so we need to use GNU make.
88: #
89: USE_TOOLS+= gmake
1.196 obache 90: MAKE_FILE= GNUmakefile
1.93 jlam 91: .endif
1.66 jschauma 92:
1.131 adrianp 93: #
94: # For the moment disable the building of a shared libperl.dylib on Darwin
95: # => 9.0 as it breaks the build. This should just be considered a temporary
96: # work around until the actual problem can be fixed as this worked for
97: # Darwin < 9.0.
98: #
99: .if empty(MACHINE_PLATFORM:MDarwin-9.*-*)
100: CONFIGURE_ARGS+= -Duseshrplib
101: .endif
102:
1.93 jlam 103: # Perl embeds the full paths to the following tools in several installed
104: # files, so make sure the paths to the ones in ${TOOLS_DIR} aren't used.
105: #
1.202 ! jperkin 106: USE_TOOLS+= hostname ln rm sed test
1.160 seb 107: SUBST_VARS.policysh+= TOOLS_HOSTNAME_CMD
108: SUBST_VARS.policysh+= TOOLS_LN
1.135 tnn 109: TOOLS_ALIASES.sed+= ${TOOLS_SED:T}
1.160 seb 110: SUBST_VARS.policysh+= TOOLS_SED
111: SUBST_VARS.policysh+= TOOLS_SH
112: SUBST_VARS.policysh+= TOOLS_TEST
113: SUBST_VARS.policysh+= FALSE
1.83 jschauma 114:
1.40 jlam 115: # Nail down the needed libraries for each platform here to avoid hidden
1.44 jlam 116: # dependencies. If this isn't defined, then use the perl defaults for the
117: # particular operating system.
1.40 jlam 118: #
1.197 obache 119: LIBSWANTED.Cygwin= m crypt dl
1.93 jlam 120: LIBSWANTED.Darwin= m c
1.102 reed 121: LIBSWANTED.DragonFly= m crypt
1.64 jlam 122: LIBSWANTED.FreeBSD= m crypt
1.160 seb 123: LIBSWANTED.HPUX= cl pthread $$libswanted # see Perl's README.hpux
1.71 jschauma 124: LIBSWANTED.IRIX= m crypt
1.93 jlam 125: LIBSWANTED.Interix= m dl
1.133 minskim 126: LIBSWANTED.Linux= m crypt dl nsl
1.169 agc 127: LIBSWANTED.MirBSD= m crypt
1.40 jlam 128: LIBSWANTED.NetBSD= m crypt
1.91 jlam 129: LIBSWANTED.OpenBSD= m crypt
1.49 veego 130: LIBSWANTED.SunOS= m crypt dl socket nsl
1.160 seb 131: LIBSWANTED.AIX= m crypt dl socket nsl bind c
1.93 jlam 132: LIBSWANTED= ${LIBSWANTED.${OPSYS}}
1.160 seb 133: SUBST_VARS.policysh+= LIBSWANTED
1.40 jlam 134:
1.42 jlam 135: # Nail down the directories in which the system libraries may be found.
136: # If this isn't defined, then use the perl defaults for the particular
137: # operating system.
1.40 jlam 138: #
1.197 obache 139: SYSLIBPATH.Cygwin= /usr/lib
1.93 jlam 140: SYSLIBPATH.Darwin= /usr/lib
1.102 reed 141: SYSLIBPATH.DragonFly= /usr/lib
1.93 jlam 142: SYSLIBPATH.FreeBSD= /usr/lib
1.200 obache 143: SYSLIBPATH.Haiku= /boot/common/lib
1.93 jlam 144: SYSLIBPATH.Interix= /usr/lib
1.169 agc 145: SYSLIBPATH.MirBSD= /usr/lib
1.40 jlam 146: SYSLIBPATH.NetBSD= /usr/lib
1.91 jlam 147: SYSLIBPATH.OpenBSD= /usr/lib
1.43 tron 148: SYSLIBPATH.SunOS= /usr/lib
1.145 joerg 149: SYSLIBPATH.AIX= /usr/lib
1.93 jlam 150: SYSLIBPATH= ${SYSLIBPATH.${OPSYS}}
1.160 seb 151: SUBST_VARS.policysh+= SYSLIBPATH
1.46 jlam 152:
1.93 jlam 153: .include "../../mk/dlopen.buildlink3.mk"
1.188 sbd 154: .include "options.mk"
1.93 jlam 155:
1.170 wiz 156: .if !empty(MACHINE_PLATFORM:MMirBSD*)
157: SUBST_CLASSES+= mirbsd-paths
158: SUBST_STAGE.mirbsd-paths= pre-configure
159: SUBST_FILES.mirbsd-paths= hints/mirbsd.sh
160: SUBST_SED.mirbsd-paths= -e 's,/usr/mpkg,${PREFIX},g'
161: SUBST_MESSAGE.mirbsd-paths= Do not use non-pkgsrc paths on MirBSD.
162: .endif
163:
1.138 he 164: # Replace our perl as the interpreter
1.201 adam 165: REPLACE_PERL+= cpan/Config-Perl-V/V.pm
166: REPLACE_PERL+= cpan/Getopt-Long/lib/Getopt/Long.pm
167: REPLACE_PERL+= dist/bignum/lib/Math/BigFloat/Trace.pm
168: REPLACE_PERL+= dist/bignum/lib/Math/BigInt/Trace.pm
169: REPLACE_PERL+= dist/ExtUtils-ParseXS/lib/ExtUtils/xsubpp
170: REPLACE_PERL+= ext/File-DosGlob/lib/File/DosGlob.pm
1.138 he 171: REPLACE_PERL+= lib/File/DosGlob.pm
1.177 joerg 172: REPLACE_PERL+= lib/unicore/mktables
1.138 he 173: REPLACE_PERL+= lib/version.pm
174:
175: # And replace a perl interpreter during the pre-install stage
176: # I think this may be a bootstrap script, so can't use REPLACE_PERL
177: # because that is acted upon already in the pre-configure stage
178: SUBST_CLASSES+= miniperl
179: SUBST_STAGE.miniperl= pre-install
180: SUBST_FILES.miniperl= lib/ExtUtils/xsubpp
181: SUBST_SED.miniperl= -e "1s:\#!./miniperl:\#!${PERL5}:"
182:
1.146 joerg 183: .if ${PKGSRC_COMPILER} == "xlc"
184: SUBST_CLASSES+= cpprun
185: SUBST_STAGE.cpprun= pre-install
186: SUBST_FILES.cpprun= lib/Config_heavy.pl
1.160 seb 187: . if !empty(PKG_OPTIONS:Mthreads)
1.147 joerg 188: SUBST_SED.cpprun= -e "s/cpprun=''/cpprun='cc_r -E'/"
1.160 seb 189: . else
1.147 joerg 190: SUBST_SED.cpprun= -e "s/cpprun=''/cpprun='cc -E'/"
1.160 seb 191: . endif
1.146 joerg 192: .endif
193:
1.97 jlam 194: # Some platforms may want the directory mode not to be 0755. This
195: # is, unfortunately, hardcoded in quite a few places in Perl, so
196: # let's substitute what pkgsrc says instead.
197: #
198: SUBST_CLASSES+= dirmode
199: SUBST_STAGE.dirmode= post-patch
1.160 seb 200: SUBST_FILES.dirmode= installhtml install_lib.pl \
201: dist/ExtUtils-Install/lib/ExtUtils/Install.pm
1.97 jlam 202: SUBST_SED.dirmode= -e "s/755/${PKGDIRMODE}/g;/umask(/d"
203:
1.160 seb 204: post-extract:
205: cp ${FILESDIR}/Policy.sh ${WRKSRC}/Policy.sh
1.174 brook 206: cp ${FILESDIR}/cpan-DB_File-hints-netbsd.pl \
207: ${WRKSRC}/cpan/DB_File/hints/netbsd.pl
1.40 jlam 208:
1.166 sno 209: pre-configure:
210: cd ${WRKSRC} && find `pwd` -name "*.orig" -type f -exec ${RM} -f {} \;
211:
1.117 jlam 212: post-build:
213: ${SED} -e "s,@PERL5@,"${PERL5:Q}",g" \
214: -e "s,@SH@,"${SH:Q}",g" \
1.182 adam 215: -e "s,@PKGMANDIR@,"${PKGMANDIR}",g" \
1.117 jlam 216: ${FILESDIR}/perllink.in > ${WRKDIR}/perllink.sh
217:
218: INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
1.123 joerg 219: PERL5_PACKLIST_DIR_cmd= . ${WRKSRC}/config.sh; echo $$installarchlib
1.105 jlam 220: PERL5_PACKLIST_DIR= ${PERL5_PACKLIST_DIR_cmd:sh}
221: PERL5_PACKLIST= .packlist
1.124 joerg 222: PERL5_PACKLIST_DESTDIR= no
1.105 jlam 223: FILES_SUBST+= PERL5_COMMENT=\#
224: FILES_SUBST+= PERL5_PACKLIST=
1.97 jlam 225:
1.105 jlam 226: post-install: perl5-post-install
227:
228: perl5-post-install:
1.160 seb 229: ${RUN}if ${TEST} -x ${DESTDIR}${PREFIX}/bin/a2p; then \
1.123 joerg 230: strip ${DESTDIR}${PREFIX}/bin/a2p; \
1.74 jlam 231: fi
1.186 sbd 232: ${INSTALL_SCRIPT} ${WRKDIR}/perllink.sh \
233: ${DESTDIR}${PERL5_PERLBASE}/bin/perllink
234: ${INSTALL_MAN} ${FILESDIR}/perllink.1 \
235: ${DESTDIR}${PERL5_PERLBASE}/${PKGMANDIR}/man1/perllink.1
236: ${RM} -f ${DESTDIR}${PREFIX}/bin/perllink \
237: ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/perllink.1
238: ${LN} -s ${PERL5_PERLBASE}/bin/perllink \
239: ${DESTDIR}${PREFIX}/bin/perllink
240: ${LN} -s ${PERL5_PERLBASE}/${PKGMANDIR}/man1/perllink.1 \
241: ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/perllink.1
1.161 obache 242: .if ${OPSYS} == "Haiku"
243: ${CHMOD} a+x ${DESTDIR}${PREFIX}/bin/perl
244: .endif
1.72 erh 245:
1.105 jlam 246: .include "packlist.mk"
1.14 tv 247: .include "../../mk/bsd.pkg.mk"
CVSweb <webmaster@jp.NetBSD.org>