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

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

1.7     ! bsiegert    1: # $NetBSD: Makefile,v 1.6 2011/09/16 08:50:44 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: PKG_DESTDIR_SUPPORT=   user-destdir
                     14:
                     15: CONFLICTS+=    python-[0-9]*
                     16:
                     17: GNU_CONFIGURE=         yes
                     18: CONFIGURE_ARGS+=       --with-threads
                     19: CONFIGURE_ARGS+=       --enable-shared
                     20: CONFIGURE_ARGS+=       OPT=${CFLAGS:Q}
                     21: CONFIGURE_ARGS+=       --with-system-ffi
                     22: CONFIGURE_ARGS+=       --with-dbmliborder=ndbm:bdb
                     23:
                     24: LDFLAGS+=              -L${WRKSRC}
                     25:
                     26: # $RANDOM usage there is fine
                     27: CHECK_PORTABILITY_SKIP=        Tools/faqwiz/move-faqwiz.sh
                     28:
                     29: USE_LANGUAGES=         c c++
                     30:
                     31: PTHREAD_OPTS+= require
                     32: .include "../../mk/pthread.buildlink3.mk"
                     33: .if ${PTHREAD_TYPE} == "pth"
                     34: CONFIGURE_ARGS+=       --with-pth
                     35: .endif
                     36:
1.6       adam       37: .include "../../mk/compiler.mk"
                     38:
                     39: # Clang needs -fwrapv
                     40: .if !empty(PKGSRC_COMPILER:Mclang)
                     41: CFLAGS+=       -fwrapv
                     42: .endif
                     43:
1.1       obache     44: .include "../../mk/bsd.prefs.mk"
                     45:
                     46: # fdatasync()
                     47: LIBS.SunOS+=           -lrt
                     48:
                     49: PY_VER_SUFFIX=         2.7
                     50:
                     51: PLIST_SRC=     ${.CURDIR}/../../lang/python27/PLIST.common
                     52: .if exists(${.CURDIR}/../../lang/python27/PLIST.${OPSYS})
                     53: PLIST_SRC+=    ${.CURDIR}/../../lang/python27/PLIST.${OPSYS}
                     54: .endif
                     55: PLIST_SRC+=    ${.CURDIR}/../../lang/python27/PLIST.common_end
                     56:
                     57: .if ${OPSYS} == "NetBSD"
                     58: PRIVILEGED_STAGES+=    clean
                     59: # XXX work around a botched autoconf check which ignores libintl
                     60: CONFIGURE_ENV+=                ac_cv_func_bind_textdomain_codeset=yes
                     61: .endif
                     62:
                     63: .if ${OPSYS} == "Darwin" || ${OPSYS} == "Interix"
                     64: PY_PLATNAME=   ${LOWER_OPSYS}
                     65: USE_TOOLS+=    gmake
                     66: .elif ${OPSYS} == "IRIX"
                     67: PY_PLATNAME=   ${LOWER_OPSYS:C/\..*//}
                     68: .elif ${OPSYS} == "SunOS"
                     69: PY_PLATNAME=   sunos${OS_VERSION:C/\..*//}
                     70: .elif ${OPSYS} == "HPUX"
                     71: PY_PLATNAME=   hp-ux11
                     72: .else
                     73: PY_PLATNAME=   ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
                     74: .endif
                     75: PLIST_SUBST+=  PY_PLATNAME=${PY_PLATNAME:Q}
                     76:
                     77: .if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "amd64") || \
                     78:     (${MACHINE_ARCH} == "sparc64") || (${MACHINE_ARCH} == "x86_64") || \
                     79:     (defined(ABI) && ${ABI} == "64")
                     80: IS_64BIT_PLATFORM?=    yes
                     81: .else
                     82: IS_64BIT_PLATFORM?=    no
                     83: .endif
                     84:
                     85: # the dl module isn't built for 64 bit archs
                     86: PLIST_VARS+=   dl
                     87: .if empty(IS_64BIT_PLATFORM:M[yY][eE][sS])
                     88: PLIST.dl=      yes
                     89: .endif
                     90:
                     91: # builds additional modules if OpenSSL < 0.9.8
                     92: PLIST_VARS+=           openssl097
                     93: CHECK_BUILTIN.openssl:=        no
                     94: .include "../../security/openssl/builtin.mk"
                     95: CHECK_BUILTIN.openssl:=        yes
                     96: .if !empty(USE_BUILTIN.openssl:M[yY][eE][sS]) && \
                     97:     !empty(BUILTIN_PKG.openssl:Mopenssl-0.9.[67]*)
                     98: PLIST.openssl097=      yes
                     99: .endif
                    100:
                    101: # setup.py causes some modules to be built if the platform is *not* 64bit.
                    102: PLIST_VARS+=   extra-so
                    103: .if !empty(IS_64BIT_PLATFORM:M[nN][oO])
                    104: PLIST.extra-so=        yes
                    105: .endif
                    106:
                    107: # Make sure python modules can link correctly
                    108: .if ${OPSYS} == "Darwin"
                    109: INSTALL_UNSTRIPPED=    yes
                    110: .endif
                    111:
                    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.1       obache    155:
                    156: SUBST_CLASSES+=                findlib
                    157: SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin.
                    158: SUBST_STAGE.findlib=   pre-configure
                    159: SUBST_FILES.findlib=   Lib/distutils/unixccompiler.py
                    160: SUBST_SED.findlib=     -e 's,/usr/local,${PREFIX},'
                    161:
                    162: post-extract:
                    163:        ${MV} ${WRKSRC}/Lib/smtpd.py ${WRKSRC}/Lib/smtpd${PY_VER_SUFFIX}.py
                    164:        ${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc${PY_VER_SUFFIX}
                    165:        ${MV} ${WRKSRC}/Tools/scripts/2to3 ${WRKSRC}/Tools/scripts/2to3-${PY_VER_SUFFIX}
                    166:
                    167: .if ${OPSYS} == "HPUX"
                    168: post-install:
                    169:        ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.7.sl \
                    170:                ${DESTDIR}${PREFIX}/lib/libpython2.7.sl.1.0
                    171: .endif
                    172:
                    173: USE_GNU_READLINE=                      yes
                    174: BUILDLINK_DEPMETHOD.readline=          build
                    175:
                    176: .include "../../archivers/bzip2/buildlink3.mk"
                    177: .include "../../devel/gettext-lib/buildlink3.mk"
                    178: .include "../../devel/libffi/buildlink3.mk"
                    179: .include "../../devel/readline/buildlink3.mk"
                    180: .include "../../devel/zlib/buildlink3.mk"
                    181: .include "../../security/openssl/buildlink3.mk"
                    182: .include "../../mk/dlopen.buildlink3.mk"
                    183: .include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>