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

Annotation of pkgsrc/lang/python27/Makefile, Revision 1.61

1.61    ! adam        1: # $NetBSD: Makefile,v 1.60 2016/05/26 04:07:32 dholland Exp $
1.1       obache      2:
                      3: .include "dist.mk"
                      4:
                      5: PKGNAME=       python27-${PY_DISTVERSION}
                      6: CATEGORIES=    lang python
                      7:
                      8: MAINTAINER=    pkgsrc-users@NetBSD.org
                      9: HOMEPAGE=      http://www.python.org/
                     10: COMMENT=       Interpreted, interactive, object-oriented programming language
                     11: LICENSE=       python-software-foundation
                     12:
1.55      tron       13: DEPENDS=       mozilla-rootcerts>=1.0.20150804nb1:../../security/mozilla-rootcerts
                     14:
1.1       obache     15: CONFLICTS+=    python-[0-9]*
                     16:
                     17: GNU_CONFIGURE=         yes
                     18: CONFIGURE_ARGS+=       --with-threads
                     19: CONFIGURE_ARGS+=       --enable-shared
                     20: CONFIGURE_ARGS+=       OPT=${CFLAGS:Q}
                     21: CONFIGURE_ARGS+=       --with-system-ffi
                     22: CONFIGURE_ARGS+=       --with-dbmliborder=ndbm:bdb
1.25      sbd        23: CONFIGURE_ENV+=                MKDIR_P=${MKDIR:Q}
1.1       obache     24:
1.31      obache     25: PKGCONFIG_OVERRIDE+=   Misc/python.pc.in
                     26:
1.1       obache     27: LDFLAGS+=              -L${WRKSRC}
                     28:
                     29: # $RANDOM usage there is fine
                     30: CHECK_PORTABILITY_SKIP=        Tools/faqwiz/move-faqwiz.sh
                     31:
                     32: USE_LANGUAGES=         c c++
                     33:
1.45      ryoon      34: PTHREAD_OPTS+=         require
                     35: PTHREAD_AUTO_VARS=     yes
1.1       obache     36: .include "../../mk/pthread.buildlink3.mk"
                     37: .if ${PTHREAD_TYPE} == "pth"
                     38: CONFIGURE_ARGS+=       --with-pth
                     39: .endif
                     40:
1.6       adam       41: .include "../../mk/compiler.mk"
                     42:
                     43: # Clang needs -fwrapv
                     44: .if !empty(PKGSRC_COMPILER:Mclang)
                     45: CFLAGS+=       -fwrapv
                     46: .endif
                     47:
1.1       obache     48: .include "../../mk/bsd.prefs.mk"
                     49:
                     50: # fdatasync()
                     51: LIBS.SunOS+=           -lrt
                     52:
                     53: PY_VER_SUFFIX=         2.7
                     54:
                     55: PLIST_SRC=     ${.CURDIR}/../../lang/python27/PLIST.common
                     56: .if exists(${.CURDIR}/../../lang/python27/PLIST.${OPSYS})
                     57: PLIST_SRC+=    ${.CURDIR}/../../lang/python27/PLIST.${OPSYS}
                     58: .endif
1.9       obache     59: PLIST_SRC+=    ${.CURDIR}/../../lang/python27/PLIST.common_end
1.1       obache     60:
                     61: .if ${OPSYS} == "NetBSD"
                     62: # XXX work around a botched autoconf check which ignores libintl
                     63: CONFIGURE_ENV+=                ac_cv_func_bind_textdomain_codeset=yes
                     64: .endif
                     65:
1.24      obache     66: .if ${OPSYS} == "Cygwin" || ${OPSYS} == "Darwin" || ${OPSYS} == "Interix"
1.1       obache     67: PY_PLATNAME=   ${LOWER_OPSYS}
                     68: USE_TOOLS+=    gmake
                     69: .elif ${OPSYS} == "IRIX"
                     70: PY_PLATNAME=   ${LOWER_OPSYS:C/\..*//}
                     71: .elif ${OPSYS} == "SunOS"
                     72: PY_PLATNAME=   sunos${OS_VERSION:C/\..*//}
                     73: .elif ${OPSYS} == "HPUX"
                     74: PY_PLATNAME=   hp-ux11
1.16      sbd        75: .elif ${OPSYS} == "Linux"
                     76: PY_PLATNAME=   linux2
1.45      ryoon      77: .elif ${OS_VARIANT} == "SCOOSR5"
                     78: PY_PLATNAME=   sco_sv3
1.1       obache     79: .else
                     80: PY_PLATNAME=   ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
                     81: .endif
                     82: PLIST_SUBST+=  PY_PLATNAME=${PY_PLATNAME:Q}
                     83:
1.60      dholland   84: .if !empty(LP64PLATFORMS:@.PLAT.@${MACHINE_PLATFORM:M${.PLAT.}}@) || \
1.51      sevan      85:     (defined(ABI) && ${ABI} == "64")
1.1       obache     86: IS_64BIT_PLATFORM?=    yes
                     87: .else
                     88: IS_64BIT_PLATFORM?=    no
                     89: .endif
                     90:
                     91: # the dl module isn't built for 64 bit archs
                     92: PLIST_VARS+=   dl
                     93: .if empty(IS_64BIT_PLATFORM:M[yY][eE][sS])
                     94: PLIST.dl=      yes
                     95: .endif
                     96:
                     97: # setup.py causes some modules to be built if the platform is *not* 64bit.
                     98: PLIST_VARS+=   extra-so
                     99: .if !empty(IS_64BIT_PLATFORM:M[nN][oO])
                    100: PLIST.extra-so=        yes
                    101: .endif
                    102:
1.33      jperkin   103: # For Xcode 5 we need to search the SDK path for headers, otherwise certain
                    104: # modules will not be built.
                    105: .if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH}/usr/include)
                    106: CFLAGS+=               -I${OSX_SDK_PATH}/usr/include
                    107: .endif
                    108:
1.1       obache    109: PLIST_VARS+=   dll nis no-nis
                    110: .if ${OPSYS} == "IRIX"
                    111: .  if ${ABI} == "64"
                    112: PLIST.no-nis=  yes
                    113: .  else
                    114: PLIST.nis=     yes
                    115: .  endif
                    116: .else
                    117: PLIST.dll=     yes
1.7       bsiegert  118: .  if ${OPSYS} == "MirBSD"
                    119: # neither nis nor no-nis
                    120: .  elif ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
1.1       obache    121: PLIST.nis=     yes
                    122: .  else
                    123: PLIST.no-nis=  yes
                    124: .  endif
                    125: .endif
                    126:
                    127: .include "../../mk/bdb.buildlink3.mk"
                    128: MAKE_ENV+=     PY_BDB_TYPE=${BDB_TYPE}
                    129: .if empty(BDB_LIBS)
                    130: BUILDLINK_TRANSFORM+=  rm:-ldb
                    131: .endif
                    132: CFLAGS+=       -DHAVE_DB_185_H
                    133:
                    134: # configure complains about buggy getaddrinfo()
1.56      jperkin   135: CONFIGURE_ARGS.OSF1+=  --disable-ipv6
1.1       obache    136:
                    137: .if defined(BUILDLINK_TRANSFORM)
                    138: MAKE_ENV+=     PY_BDB_TRANSFORM=${BUILDLINK_TRANSFORM:Q}
                    139: .endif
                    140:
                    141: PLIST_SUBST+=  PY_VER_SUFFIX=${PY_VER_SUFFIX:Q}
                    142:
                    143: TEST_TARGET=   test
                    144: INSTALL_TARGET=        altinstall
                    145:
                    146: REPLACE_INTERPRETER+=  py27
                    147: REPLACE.py27.old=      .*python[^ ]*
                    148: REPLACE.py27.new=      ${PREFIX}/bin/python${PY_VER_SUFFIX}
1.4       tron      149: REPLACE_FILES.py27=    Lib/*.py Lib/*/*.py Lib/*/*/*.py
1.29      ryoon     150: REPLACE_FILES.py27+=   Lib/*/*/*/*.py
1.1       obache    151:
1.53      adam      152: SUBST_CLASSES+=                libffi
                    153: SUBST_MESSAGE.libffi=  Fixing libffi include path on Darwin.
                    154: SUBST_STAGE.libffi=    pre-configure
                    155: SUBST_FILES.libffi=    setup.py
                    156: SUBST_SED.libffi=      -e 's,/usr/include/ffi,${BUILDLINK_PREFIX.libffi}/include,'
                    157:
1.1       obache    158: SUBST_CLASSES+=                findlib
                    159: SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin.
                    160: SUBST_STAGE.findlib=   pre-configure
                    161: SUBST_FILES.findlib=   Lib/distutils/unixccompiler.py
                    162: SUBST_SED.findlib=     -e 's,/usr/local,${PREFIX},'
                    163:
1.40      bsiegert  164: SUBST_CLASSES+=                sslbase
                    165: SUBST_MESSAGE.sslbase= Fixing find-file for openssl with SSLBASE.
                    166: SUBST_STAGE.sslbase=   pre-configure
                    167: SUBST_FILES.sslbase=   setup.py
                    168: SUBST_VARS.sslbase=    SSLBASE
                    169:
1.55      tron      170: SUBST_CLASSES+=                cacert
                    171: SUBST_MESSAGE.cacert=  Configuring location of default CA certificate file.
                    172: SUBST_STAGE.cacert=    pre-configure
                    173: SUBST_FILES.cacert=    Modules/_ssl.c
                    174: SUBST_SED.cacert=      -e 's,@PREFIX@,${PREFIX},'
                    175:
1.1       obache    176: post-extract:
1.37      obache    177:        ${LN} -s ${WRKSRC}/Lib/smtpd.py ${WRKSRC}/Tools/scripts/smtpd${PY_VER_SUFFIX}.py
1.1       obache    178:        ${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc${PY_VER_SUFFIX}
                    179:        ${MV} ${WRKSRC}/Tools/scripts/2to3 ${WRKSRC}/Tools/scripts/2to3-${PY_VER_SUFFIX}
                    180:
                    181: .if ${OPSYS} == "HPUX"
                    182: post-install:
                    183:        ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.7.sl \
                    184:                ${DESTDIR}${PREFIX}/lib/libpython2.7.sl.1.0
                    185: .endif
                    186:
1.45      ryoon     187: .if ${OS_VARIANT} == "SCOOSR5"
                    188: # SCO OpenServer 5.0.7/3.2 has no socklen_t in system headers, but has in
                    189: # GNU pth's header. It should be used in this case.
                    190: CONFIGURE_ENV+=                ac_cv_type_socklen_t=yes
                    191: .endif
                    192:
1.1       obache    193: BUILDLINK_DEPMETHOD.readline=          build
                    194:
                    195: .include "../../archivers/bzip2/buildlink3.mk"
                    196: .include "../../devel/gettext-lib/buildlink3.mk"
                    197: .include "../../devel/libffi/buildlink3.mk"
                    198: .include "../../devel/readline/buildlink3.mk"
                    199: .include "../../devel/zlib/buildlink3.mk"
                    200: .include "../../security/openssl/buildlink3.mk"
                    201: .include "../../mk/dlopen.buildlink3.mk"
                    202: .include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>