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

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

1.74    ! adam        1: # $NetBSD: Makefile,v 1.73 2017/11/22 19:16:20 bsiegert Exp $
1.1       obache      2:
                      3: .include "dist.mk"
                      4:
                      5: PKGNAME=       python27-${PY_DISTVERSION}
1.74    ! adam        6: PKGREVISION=   1
1.1       obache      7: CATEGORIES=    lang python
                      8:
                      9: MAINTAINER=    pkgsrc-users@NetBSD.org
1.71      wiz        10: HOMEPAGE=      https://www.python.org/
1.1       obache     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:
1.74    ! adam       18: USE_LANGUAGES=         c c++
1.1       obache     19: GNU_CONFIGURE=         yes
                     20: CONFIGURE_ARGS+=       --enable-shared
1.74    ! adam       21: CONFIGURE_ARGS+=       --with-dbmliborder=ndbm:bdb
1.1       obache     22: CONFIGURE_ARGS+=       --with-system-ffi
1.74    ! adam       23: CONFIGURE_ARGS+=       --with-threads
1.25      sbd        24: CONFIGURE_ENV+=                MKDIR_P=${MKDIR:Q}
1.74    ! adam       25: CONFIGURE_ENV+=                OPT=${CFLAGS:Q}
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:
1.45      ryoon      33: PTHREAD_OPTS+=         require
                     34: PTHREAD_AUTO_VARS=     yes
1.1       obache     35: .include "../../mk/pthread.buildlink3.mk"
                     36: .if ${PTHREAD_TYPE} == "pth"
                     37: CONFIGURE_ARGS+=       --with-pth
                     38: .endif
                     39:
1.6       adam       40: .include "../../mk/compiler.mk"
                     41:
                     42: # Clang needs -fwrapv
                     43: .if !empty(PKGSRC_COMPILER:Mclang)
                     44: CFLAGS+=       -fwrapv
                     45: .endif
                     46:
1.1       obache     47: .include "../../mk/bsd.prefs.mk"
                     48:
                     49: # fdatasync()
                     50: LIBS.SunOS+=           -lrt
                     51:
                     52: PY_VER_SUFFIX=         2.7
                     53:
                     54: .if ${OPSYS} == "NetBSD"
                     55: # XXX work around a botched autoconf check which ignores libintl
                     56: CONFIGURE_ENV+=                ac_cv_func_bind_textdomain_codeset=yes
                     57: .endif
                     58:
1.24      obache     59: .if ${OPSYS} == "Cygwin" || ${OPSYS} == "Darwin" || ${OPSYS} == "Interix"
1.1       obache     60: PY_PLATNAME=   ${LOWER_OPSYS}
                     61: USE_TOOLS+=    gmake
                     62: .elif ${OPSYS} == "IRIX"
                     63: PY_PLATNAME=   ${LOWER_OPSYS:C/\..*//}
                     64: .elif ${OPSYS} == "SunOS"
                     65: PY_PLATNAME=   sunos${OS_VERSION:C/\..*//}
                     66: .elif ${OPSYS} == "HPUX"
                     67: PY_PLATNAME=   hp-ux11
1.16      sbd        68: .elif ${OPSYS} == "Linux"
                     69: PY_PLATNAME=   linux2
1.45      ryoon      70: .elif ${OS_VARIANT} == "SCOOSR5"
                     71: PY_PLATNAME=   sco_sv3
1.1       obache     72: .else
                     73: PY_PLATNAME=   ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
                     74: .endif
                     75: PLIST_SUBST+=  PY_PLATNAME=${PY_PLATNAME:Q}
                     76:
1.60      dholland   77: .if !empty(LP64PLATFORMS:@.PLAT.@${MACHINE_PLATFORM:M${.PLAT.}}@) || \
1.51      sevan      78:     (defined(ABI) && ${ABI} == "64")
1.1       obache     79: IS_64BIT_PLATFORM?=    yes
                     80: .else
                     81: IS_64BIT_PLATFORM?=    no
                     82: .endif
                     83:
                     84: # the dl module isn't built for 64 bit archs
                     85: PLIST_VARS+=   dl
                     86: .if empty(IS_64BIT_PLATFORM:M[yY][eE][sS])
                     87: PLIST.dl=      yes
                     88: .endif
                     89:
                     90: # setup.py causes some modules to be built if the platform is *not* 64bit.
                     91: PLIST_VARS+=   extra-so
                     92: .if !empty(IS_64BIT_PLATFORM:M[nN][oO])
                     93: PLIST.extra-so=        yes
                     94: .endif
                     95:
1.33      jperkin    96: # For Xcode 5 we need to search the SDK path for headers, otherwise certain
                     97: # modules will not be built.
                     98: .if ${OPSYS} == "Darwin" && exists(${OSX_SDK_PATH}/usr/include)
1.74    ! adam       99: CFLAGS+=               -I${OSX_SDK_PATH:Q}/usr/include
1.33      jperkin   100: .endif
                    101:
1.1       obache    102: PLIST_VARS+=   dll nis no-nis
                    103: .if ${OPSYS} == "IRIX"
                    104: .  if ${ABI} == "64"
                    105: PLIST.no-nis=  yes
                    106: .  else
                    107: PLIST.nis=     yes
                    108: .  endif
                    109: .else
                    110: PLIST.dll=     yes
1.73      bsiegert  111: .  if ${OPSYS} == "MirBSD" || "${OS_VARIANT}" == "chromeos"
1.7       bsiegert  112: # neither nis nor no-nis
                    113: .  elif ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
1.1       obache    114: PLIST.nis=     yes
                    115: .  else
                    116: PLIST.no-nis=  yes
                    117: .  endif
                    118: .endif
                    119:
                    120: # configure complains about buggy getaddrinfo()
1.56      jperkin   121: CONFIGURE_ARGS.OSF1+=  --disable-ipv6
1.1       obache    122:
                    123: PLIST_SUBST+=  PY_VER_SUFFIX=${PY_VER_SUFFIX:Q}
                    124:
                    125: TEST_TARGET=   test
                    126: INSTALL_TARGET=        altinstall
                    127:
                    128: REPLACE_INTERPRETER+=  py27
                    129: REPLACE.py27.old=      .*python[^ ]*
                    130: REPLACE.py27.new=      ${PREFIX}/bin/python${PY_VER_SUFFIX}
1.74    ! adam      131: REPLACE_FILES.py27=    Lib/UserString.py
        !           132: REPLACE_FILES.py27+=   Lib/base64.py
        !           133: REPLACE_FILES.py27+=   Lib/cProfile.py
        !           134: REPLACE_FILES.py27+=   Lib/cgi.py
        !           135: REPLACE_FILES.py27+=   Lib/encodings/rot_13.py
        !           136: REPLACE_FILES.py27+=   Lib/idlelib/PyShell.py
        !           137: REPLACE_FILES.py27+=   Lib/keyword.py
        !           138: REPLACE_FILES.py27+=   Lib/lib2to3/pgen2/token.py
        !           139: REPLACE_FILES.py27+=   Lib/lib2to3/tests/data/different_encoding.py
        !           140: REPLACE_FILES.py27+=   Lib/lib2to3/tests/data/false_encoding.py
        !           141: REPLACE_FILES.py27+=   Lib/lib2to3/tests/pytree_idempotency.py
        !           142: REPLACE_FILES.py27+=   Lib/mimify.py
        !           143: REPLACE_FILES.py27+=   Lib/pdb.py
        !           144: REPLACE_FILES.py27+=   Lib/plat-mac/appletrunner.py
        !           145: REPLACE_FILES.py27+=   Lib/plat-mac/bundlebuilder.py
        !           146: REPLACE_FILES.py27+=   Lib/platform.py
        !           147: REPLACE_FILES.py27+=   Lib/profile.py
        !           148: REPLACE_FILES.py27+=   Lib/pydoc.py
        !           149: REPLACE_FILES.py27+=   Lib/quopri.py
        !           150: REPLACE_FILES.py27+=   Lib/smtpd.py
        !           151: REPLACE_FILES.py27+=   Lib/smtplib.py
        !           152: REPLACE_FILES.py27+=   Lib/symbol.py
        !           153: REPLACE_FILES.py27+=   Lib/tabnanny.py
        !           154: REPLACE_FILES.py27+=   Lib/test/bisect.py
        !           155: REPLACE_FILES.py27+=   Lib/test/curses_tests.py
        !           156: REPLACE_FILES.py27+=   Lib/test/re_tests.py
        !           157: REPLACE_FILES.py27+=   Lib/test/pystone.py
        !           158: REPLACE_FILES.py27+=   Lib/test/regrtest.py
        !           159: REPLACE_FILES.py27+=   Lib/timeit.py
        !           160: REPLACE_FILES.py27+=   Lib/trace.py
        !           161: REPLACE_FILES.py27+=   Lib/uu.py
        !           162: REPLACE_FILES.py27+=   Lib/webbrowser.py
1.1       obache    163:
1.53      adam      164: SUBST_CLASSES+=                libffi
                    165: SUBST_MESSAGE.libffi=  Fixing libffi include path on Darwin.
                    166: SUBST_STAGE.libffi=    pre-configure
                    167: SUBST_FILES.libffi=    setup.py
                    168: SUBST_SED.libffi=      -e 's,/usr/include/ffi,${BUILDLINK_PREFIX.libffi}/include,'
                    169:
1.1       obache    170: SUBST_CLASSES+=                findlib
                    171: SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin.
                    172: SUBST_STAGE.findlib=   pre-configure
                    173: SUBST_FILES.findlib=   Lib/distutils/unixccompiler.py
                    174: SUBST_SED.findlib=     -e 's,/usr/local,${PREFIX},'
                    175:
1.63      kamil     176: # XXX: It might be needed to add manually more paths like ${PREFIX}/qt5/lib
                    177: # Testing:
                    178: # >>> from ctypes.util import find_library
                    179: # >>> find_library("m")
                    180: # 'libm.so.0'
                    181:
                    182: SUBST_CLASSES+=                pfindlib
                    183: SUBST_MESSAGE.pfindlib=        Fixing find_library() on POSIX-like (excluding Darwin) systems.
                    184: SUBST_STAGE.pfindlib=  pre-configure
                    185: SUBST_FILES.pfindlib=  Lib/ctypes/util.py
1.66      kamil     186: SUBST_SED.pfindlib=    -e 's!\(-Wl,-t -o\)!${COMPILER_RPATH_FLAG}${PREFIX}/lib -L${PREFIX}/lib \1!'
1.63      kamil     187:
1.66      kamil     188: .include "options.mk"
1.65      kamil     189:
1.40      bsiegert  190: SUBST_CLASSES+=                sslbase
                    191: SUBST_MESSAGE.sslbase= Fixing find-file for openssl with SSLBASE.
                    192: SUBST_STAGE.sslbase=   pre-configure
                    193: SUBST_FILES.sslbase=   setup.py
                    194: SUBST_VARS.sslbase=    SSLBASE
                    195:
1.55      tron      196: SUBST_CLASSES+=                cacert
                    197: SUBST_MESSAGE.cacert=  Configuring location of default CA certificate file.
                    198: SUBST_STAGE.cacert=    pre-configure
                    199: SUBST_FILES.cacert=    Modules/_ssl.c
                    200: SUBST_SED.cacert=      -e 's,@PREFIX@,${PREFIX},'
                    201:
1.1       obache    202: post-extract:
1.37      obache    203:        ${LN} -s ${WRKSRC}/Lib/smtpd.py ${WRKSRC}/Tools/scripts/smtpd${PY_VER_SUFFIX}.py
1.1       obache    204:        ${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc${PY_VER_SUFFIX}
                    205:        ${MV} ${WRKSRC}/Tools/scripts/2to3 ${WRKSRC}/Tools/scripts/2to3-${PY_VER_SUFFIX}
                    206:
                    207: .if ${OPSYS} == "HPUX"
                    208: post-install:
                    209:        ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.7.sl \
                    210:                ${DESTDIR}${PREFIX}/lib/libpython2.7.sl.1.0
                    211: .endif
                    212:
1.45      ryoon     213: .if ${OS_VARIANT} == "SCOOSR5"
                    214: # SCO OpenServer 5.0.7/3.2 has no socklen_t in system headers, but has in
                    215: # GNU pth's header. It should be used in this case.
                    216: CONFIGURE_ENV+=                ac_cv_type_socklen_t=yes
                    217: .endif
                    218:
1.1       obache    219: BUILDLINK_DEPMETHOD.readline=          build
                    220:
                    221: .include "../../archivers/bzip2/buildlink3.mk"
                    222: .include "../../devel/gettext-lib/buildlink3.mk"
                    223: .include "../../devel/libffi/buildlink3.mk"
                    224: .include "../../devel/readline/buildlink3.mk"
                    225: .include "../../devel/zlib/buildlink3.mk"
                    226: .include "../../security/openssl/buildlink3.mk"
1.70      jperkin   227: .include "../../mk/bdb.buildlink3.mk"
1.1       obache    228: .include "../../mk/dlopen.buildlink3.mk"
                    229: .include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>