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

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

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

CVSweb <webmaster@jp.NetBSD.org>