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

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

1.5     ! obache      1: # $NetBSD: Makefile,v 1.4 2011/04/23 10:35:28 tron 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:
                     37: .include "../../mk/bsd.prefs.mk"
                     38:
                     39: # fdatasync()
                     40: LIBS.SunOS+=           -lrt
                     41:
                     42: PY_VER_SUFFIX=         2.7
                     43:
                     44: PLIST_SRC=     ${.CURDIR}/../../lang/python27/PLIST.common
                     45: .if exists(${.CURDIR}/../../lang/python27/PLIST.${OPSYS})
                     46: PLIST_SRC+=    ${.CURDIR}/../../lang/python27/PLIST.${OPSYS}
                     47: .endif
                     48: PLIST_SRC+=    ${.CURDIR}/../../lang/python27/PLIST.common_end
                     49:
                     50: .if ${OPSYS} == "NetBSD"
                     51: PRIVILEGED_STAGES+=    clean
                     52: # XXX work around a botched autoconf check which ignores libintl
                     53: CONFIGURE_ENV+=                ac_cv_func_bind_textdomain_codeset=yes
                     54: .endif
                     55:
                     56: .if ${OPSYS} == "Darwin" || ${OPSYS} == "Interix"
                     57: PY_PLATNAME=   ${LOWER_OPSYS}
                     58: USE_TOOLS+=    gmake
                     59: .elif ${OPSYS} == "IRIX"
                     60: PY_PLATNAME=   ${LOWER_OPSYS:C/\..*//}
                     61: .elif ${OPSYS} == "SunOS"
                     62: PY_PLATNAME=   sunos${OS_VERSION:C/\..*//}
                     63: .elif ${OPSYS} == "HPUX"
                     64: PY_PLATNAME=   hp-ux11
                     65: .else
                     66: PY_PLATNAME=   ${LOWER_OPSYS}${OS_VERSION:C/\..*//}
                     67: .endif
                     68: PLIST_SUBST+=  PY_PLATNAME=${PY_PLATNAME:Q}
                     69:
                     70: .if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "amd64") || \
                     71:     (${MACHINE_ARCH} == "sparc64") || (${MACHINE_ARCH} == "x86_64") || \
                     72:     (defined(ABI) && ${ABI} == "64")
                     73: IS_64BIT_PLATFORM?=    yes
                     74: .else
                     75: IS_64BIT_PLATFORM?=    no
                     76: .endif
                     77:
                     78: # the dl module isn't built for 64 bit archs
                     79: PLIST_VARS+=   dl
                     80: .if empty(IS_64BIT_PLATFORM:M[yY][eE][sS])
                     81: PLIST.dl=      yes
                     82: .endif
                     83:
                     84: # builds additional modules if OpenSSL < 0.9.8
                     85: PLIST_VARS+=           openssl097
                     86: CHECK_BUILTIN.openssl:=        no
                     87: .include "../../security/openssl/builtin.mk"
                     88: CHECK_BUILTIN.openssl:=        yes
                     89: .if !empty(USE_BUILTIN.openssl:M[yY][eE][sS]) && \
                     90:     !empty(BUILTIN_PKG.openssl:Mopenssl-0.9.[67]*)
                     91: PLIST.openssl097=      yes
                     92: .endif
                     93:
                     94: # setup.py causes some modules to be built if the platform is *not* 64bit.
                     95: PLIST_VARS+=   extra-so
                     96: .if !empty(IS_64BIT_PLATFORM:M[nN][oO])
                     97: PLIST.extra-so=        yes
                     98: .endif
                     99:
                    100: # Make sure python modules can link correctly
                    101: .if ${OPSYS} == "Darwin"
                    102: INSTALL_UNSTRIPPED=    yes
                    103: .endif
                    104:
                    105: PLIST_VARS+=   dll nis no-nis
                    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
                    114: .  if ${OPSYS} != "NetBSD" || exists(/usr/bin/ypcat)
                    115: PLIST.nis=     yes
                    116: .  else
                    117: PLIST.no-nis=  yes
                    118: .  endif
                    119: .endif
                    120:
                    121: .include "../../mk/bdb.buildlink3.mk"
                    122: MAKE_ENV+=     PY_BDB_TYPE=${BDB_TYPE}
                    123: .if empty(BDB_LIBS)
                    124: BUILDLINK_TRANSFORM+=  rm:-ldb
                    125: .endif
                    126: CFLAGS+=       -DHAVE_DB_185_H
                    127:
                    128: .if ${OPSYS} == "OSF1"
                    129: # configure complains about buggy getaddrinfo()
                    130: CONFIGURE_ARGS+=       --disable-ipv6
                    131: .endif
                    132:
                    133: .if defined(BUILDLINK_TRANSFORM)
                    134: MAKE_ENV+=     PY_BDB_TRANSFORM=${BUILDLINK_TRANSFORM:Q}
                    135: .endif
                    136:
                    137: PLIST_SUBST+=  PY_VER_SUFFIX=${PY_VER_SUFFIX:Q}
                    138:
                    139: TEST_TARGET=   test
                    140: INSTALL_TARGET=        altinstall
                    141:
                    142: REPLACE_INTERPRETER+=  py27
                    143: REPLACE.py27.old=      .*python[^ ]*
                    144: REPLACE.py27.new=      ${PREFIX}/bin/python${PY_VER_SUFFIX}
1.4       tron      145: REPLACE_FILES.py27=    Lib/*.py Lib/*/*.py Lib/*/*/*.py
1.1       obache    146:
                    147: SUBST_CLASSES+=                findlib
                    148: SUBST_MESSAGE.findlib= Fixing find_library_file on Darwin.
                    149: SUBST_STAGE.findlib=   pre-configure
                    150: SUBST_FILES.findlib=   Lib/distutils/unixccompiler.py
                    151: SUBST_SED.findlib=     -e 's,/usr/local,${PREFIX},'
                    152:
                    153: post-extract:
                    154:        ${MV} ${WRKSRC}/Lib/smtpd.py ${WRKSRC}/Lib/smtpd${PY_VER_SUFFIX}.py
                    155:        ${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc${PY_VER_SUFFIX}
                    156:        ${MV} ${WRKSRC}/Tools/scripts/2to3 ${WRKSRC}/Tools/scripts/2to3-${PY_VER_SUFFIX}
                    157:
                    158: .if ${OPSYS} == "HPUX"
                    159: post-install:
                    160:        ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.7.sl \
                    161:                ${DESTDIR}${PREFIX}/lib/libpython2.7.sl.1.0
                    162: .endif
                    163:
                    164: USE_GNU_READLINE=                      yes
                    165: BUILDLINK_DEPMETHOD.readline=          build
                    166:
                    167: .include "../../archivers/bzip2/buildlink3.mk"
                    168: .include "../../devel/gettext-lib/buildlink3.mk"
                    169: .include "../../devel/libffi/buildlink3.mk"
                    170: .include "../../devel/readline/buildlink3.mk"
                    171: .include "../../devel/zlib/buildlink3.mk"
                    172: .include "../../security/openssl/buildlink3.mk"
                    173: .include "../../mk/dlopen.buildlink3.mk"
                    174: .include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>