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

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

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

CVSweb <webmaster@jp.NetBSD.org>