[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / lang / perl5

Annotation of pkgsrc/lang/perl5/Makefile, Revision 1.272

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

CVSweb <webmaster@jp.NetBSD.org>