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

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

1.77    ! adam        1: # $NetBSD: Makefile,v 1.76 2019/03/03 10:44:41 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"
                    107: .  if ${ABI} == "64"
                    108: PLIST.no-nis=  yes
                    109: .  else
                    110: PLIST.nis=     yes
                    111: .  endif
                    112: .else
                    113: PLIST.dll=     yes
1.73      bsiegert  114: .  if ${OPSYS} == "MirBSD" || "${OS_VARIANT}" == "chromeos"
1.7       bsiegert  115: # neither nis nor no-nis
                    116: .  elif ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
1.1       obache    117: PLIST.nis=     yes
                    118: .  else
                    119: PLIST.no-nis=  yes
                    120: .  endif
                    121: .endif
                    122:
                    123: # configure complains about buggy getaddrinfo()
1.56      jperkin   124: CONFIGURE_ARGS.OSF1+=  --disable-ipv6
1.1       obache    125:
                    126: PLIST_SUBST+=  PY_VER_SUFFIX=${PY_VER_SUFFIX:Q}
                    127:
                    128: TEST_TARGET=   test
                    129: INSTALL_TARGET=        altinstall
                    130:
                    131: REPLACE_INTERPRETER+=  py27
                    132: REPLACE.py27.old=      .*python[^ ]*
                    133: REPLACE.py27.new=      ${PREFIX}/bin/python${PY_VER_SUFFIX}
1.74      adam      134: REPLACE_FILES.py27=    Lib/UserString.py
                    135: REPLACE_FILES.py27+=   Lib/base64.py
                    136: REPLACE_FILES.py27+=   Lib/cProfile.py
                    137: REPLACE_FILES.py27+=   Lib/cgi.py
                    138: REPLACE_FILES.py27+=   Lib/encodings/rot_13.py
                    139: REPLACE_FILES.py27+=   Lib/idlelib/PyShell.py
                    140: REPLACE_FILES.py27+=   Lib/keyword.py
                    141: REPLACE_FILES.py27+=   Lib/lib2to3/pgen2/token.py
                    142: REPLACE_FILES.py27+=   Lib/lib2to3/tests/data/different_encoding.py
                    143: REPLACE_FILES.py27+=   Lib/lib2to3/tests/data/false_encoding.py
                    144: REPLACE_FILES.py27+=   Lib/lib2to3/tests/pytree_idempotency.py
                    145: REPLACE_FILES.py27+=   Lib/mimify.py
                    146: REPLACE_FILES.py27+=   Lib/pdb.py
                    147: REPLACE_FILES.py27+=   Lib/plat-mac/appletrunner.py
                    148: REPLACE_FILES.py27+=   Lib/plat-mac/bundlebuilder.py
                    149: REPLACE_FILES.py27+=   Lib/platform.py
                    150: REPLACE_FILES.py27+=   Lib/profile.py
                    151: REPLACE_FILES.py27+=   Lib/pydoc.py
                    152: REPLACE_FILES.py27+=   Lib/quopri.py
                    153: REPLACE_FILES.py27+=   Lib/smtpd.py
                    154: REPLACE_FILES.py27+=   Lib/smtplib.py
                    155: REPLACE_FILES.py27+=   Lib/symbol.py
                    156: REPLACE_FILES.py27+=   Lib/tabnanny.py
1.77    ! adam      157: REPLACE_FILES.py27+=   Lib/test/bisect_cmd.py
1.74      adam      158: REPLACE_FILES.py27+=   Lib/test/curses_tests.py
                    159: REPLACE_FILES.py27+=   Lib/test/re_tests.py
                    160: REPLACE_FILES.py27+=   Lib/test/pystone.py
                    161: REPLACE_FILES.py27+=   Lib/test/regrtest.py
                    162: REPLACE_FILES.py27+=   Lib/timeit.py
                    163: REPLACE_FILES.py27+=   Lib/trace.py
                    164: REPLACE_FILES.py27+=   Lib/uu.py
                    165: REPLACE_FILES.py27+=   Lib/webbrowser.py
1.1       obache    166:
1.53      adam      167: SUBST_CLASSES+=                libffi
                    168: SUBST_MESSAGE.libffi=  Fixing libffi include path on Darwin.
                    169: SUBST_STAGE.libffi=    pre-configure
                    170: SUBST_FILES.libffi=    setup.py
                    171: SUBST_SED.libffi=      -e 's,/usr/include/ffi,${BUILDLINK_PREFIX.libffi}/include,'
                    172:
1.76      adam      173: # XXX: It might be needed to add manually more paths like ${PREFIX}/qt5/lib
                    174: # Test: python -c 'from ctypes.util import find_library; print(find_library("ffi"));'
1.1       obache    175: SUBST_CLASSES+=                findlib
1.76      adam      176: SUBST_MESSAGE.findlib= Fixing find_library().
1.1       obache    177: SUBST_STAGE.findlib=   pre-configure
1.76      adam      178: SUBST_FILES.findlib=   Lib/ctypes/macholib/dyld.py
                    179: SUBST_FILES.findlib+=  Lib/ctypes/util.py
                    180: SUBST_FILES.findlib+=  Lib/distutils/unixccompiler.py
1.1       obache    181: SUBST_SED.findlib=     -e 's,/usr/local,${PREFIX},'
1.76      adam      182: SUBST_SED.findlib+=    -e 's!\(-Wl,-t -o\)!${COMPILER_RPATH_FLAG}${PREFIX}/lib -L${PREFIX}/lib \1!'
1.63      kamil     183:
1.66      kamil     184: .include "options.mk"
1.65      kamil     185:
1.40      bsiegert  186: SUBST_CLASSES+=                sslbase
                    187: SUBST_MESSAGE.sslbase= Fixing find-file for openssl with SSLBASE.
                    188: SUBST_STAGE.sslbase=   pre-configure
                    189: SUBST_FILES.sslbase=   setup.py
                    190: SUBST_VARS.sslbase=    SSLBASE
                    191:
1.55      tron      192: SUBST_CLASSES+=                cacert
                    193: SUBST_MESSAGE.cacert=  Configuring location of default CA certificate file.
                    194: SUBST_STAGE.cacert=    pre-configure
                    195: SUBST_FILES.cacert=    Modules/_ssl.c
1.77    ! adam      196: SUBST_VARS.cacert=     PREFIX
1.55      tron      197:
1.1       obache    198: post-extract:
1.37      obache    199:        ${LN} -s ${WRKSRC}/Lib/smtpd.py ${WRKSRC}/Tools/scripts/smtpd${PY_VER_SUFFIX}.py
1.1       obache    200:        ${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc${PY_VER_SUFFIX}
                    201:        ${MV} ${WRKSRC}/Tools/scripts/2to3 ${WRKSRC}/Tools/scripts/2to3-${PY_VER_SUFFIX}
                    202:
                    203: .if ${OPSYS} == "HPUX"
                    204: post-install:
                    205:        ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.7.sl \
                    206:                ${DESTDIR}${PREFIX}/lib/libpython2.7.sl.1.0
                    207: .endif
                    208:
1.45      ryoon     209: .if ${OS_VARIANT} == "SCOOSR5"
                    210: # SCO OpenServer 5.0.7/3.2 has no socklen_t in system headers, but has in
                    211: # GNU pth's header. It should be used in this case.
                    212: CONFIGURE_ENV+=                ac_cv_type_socklen_t=yes
                    213: .endif
                    214:
1.1       obache    215: BUILDLINK_DEPMETHOD.readline=          build
                    216:
                    217: .include "../../archivers/bzip2/buildlink3.mk"
                    218: .include "../../devel/gettext-lib/buildlink3.mk"
                    219: .include "../../devel/libffi/buildlink3.mk"
                    220: .include "../../devel/readline/buildlink3.mk"
                    221: .include "../../devel/zlib/buildlink3.mk"
                    222: .include "../../security/openssl/buildlink3.mk"
1.70      jperkin   223: .include "../../mk/bdb.buildlink3.mk"
1.1       obache    224: .include "../../mk/dlopen.buildlink3.mk"
                    225: .include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>