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

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

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

CVSweb <webmaster@jp.NetBSD.org>