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

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

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

CVSweb <webmaster@jp.NetBSD.org>