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

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

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

CVSweb <webmaster@jp.NetBSD.org>