2010-02-25 06:02:39 -05:00
|
|
|
# $OpenBSD: Makefile.inc,v 1.64 2010/02/25 11:02:39 phessler Exp $
|
2002-05-11 17:35:13 -04:00
|
|
|
|
|
|
|
# IMPORTANT! If you make any changes to the Python ports, be sure
|
|
|
|
# to also update files/CHANGES.OpenBSD for your change. This is a
|
|
|
|
# requirement of the PSF license, if it constitutes a change to
|
|
|
|
# Python itself.
|
2002-02-15 14:42:18 -05:00
|
|
|
|
2006-10-10 15:08:06 -04:00
|
|
|
SHARED_ONLY= Yes
|
|
|
|
|
2007-09-15 20:27:05 -04:00
|
|
|
COMMENT-main= interpreted object-oriented programming language
|
|
|
|
COMMENT-bsddb= Berkeley db module for Python
|
|
|
|
COMMENT-gdbm= GNU dbm module for Python
|
|
|
|
COMMENT-idle= IDE for Python
|
|
|
|
COMMENT-tests= Python test suite
|
|
|
|
COMMENT-tkinter=tk GUI module for Python
|
|
|
|
COMMENT-tools= extra tools for Python
|
2002-02-15 14:42:18 -05:00
|
|
|
|
2006-11-24 15:48:23 -05:00
|
|
|
PKGNAME-main= python-${VERSION}${PATCHLEVEL}${PKG_PATCHLEVEL}
|
2002-02-15 14:42:18 -05:00
|
|
|
DISTNAME= Python-${VERSION}${PATCHLEVEL}
|
|
|
|
CATEGORIES= lang
|
2005-11-11 04:45:29 -05:00
|
|
|
MASTER_SITES= http://www.python.org/ftp/${PSUBDIR}/ \
|
|
|
|
http://python.mirrors.pair.com/pub/${PSUBDIR}/
|
2008-02-26 19:30:47 -05:00
|
|
|
PSUBDIR?= python/${VERSION}${PATCHLEVEL}
|
2002-02-15 14:42:18 -05:00
|
|
|
EXTRACT_SUFX= .tgz
|
|
|
|
|
|
|
|
HOMEPAGE= http://www.python.org/
|
|
|
|
|
2008-10-18 07:55:57 -04:00
|
|
|
MAINTAINER= Damien Miller <djm@openbsd.org>
|
2003-12-13 10:03:07 -05:00
|
|
|
|
2002-05-11 17:35:13 -04:00
|
|
|
# PSF license <http://www.python.org/${VERSION}/license.html>
|
|
|
|
# A summary of changes to Python is required to be distributed
|
2002-02-15 14:42:18 -05:00
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
|
|
PERMIT_DISTFILES_FTP= Yes
|
|
|
|
|
2009-01-01 16:03:27 -05:00
|
|
|
MULTI_PACKAGES= -main -tests -tools -gdbm -idle -tkinter
|
2008-10-18 07:55:57 -04:00
|
|
|
|
2009-01-01 16:03:27 -05:00
|
|
|
# Python 2.6 lists BSD db 4.6.x as unstable on most architectures (see
|
|
|
|
# setup.py:allow_db_version). XXX revisit if databases/db/v4 is updated to 4.7
|
|
|
|
.if ${VERSION} != "2.6" || \
|
|
|
|
${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
|
|
|
|
MULTI_PACKAGES+=-bsddb
|
|
|
|
.endif
|
2002-02-15 14:42:18 -05:00
|
|
|
|
2002-03-22 23:34:22 -05:00
|
|
|
# All subpackages depend on the main python package.
|
|
|
|
|
2009-01-01 16:03:27 -05:00
|
|
|
RUN_DEPENDS= :python-${VERSION}${PATCHLEVEL}${PKG_PATCHLEVEL}:lang/python/${VERSION},-main
|
2005-03-03 18:20:47 -05:00
|
|
|
LIB_DEPENDS=
|
2006-11-24 15:48:23 -05:00
|
|
|
|
2009-01-01 16:03:27 -05:00
|
|
|
LIB_DEPENDS-main= bz2::archivers/bzip2
|
2006-11-24 15:48:23 -05:00
|
|
|
RUN_DEPENDS-main=
|
2009-01-01 16:03:27 -05:00
|
|
|
WANTLIB-main= ssl panel m crypto c util z readline pthread \
|
|
|
|
ncurses stdc++ expat ossaudio
|
|
|
|
.if ${VERSION} == "2.5" || ${VERSION} == "2.6"
|
|
|
|
LIB_DEPENDS-main+= sqlite3::databases/sqlite3
|
2008-10-18 07:55:57 -04:00
|
|
|
.endif
|
2006-11-24 15:48:23 -05:00
|
|
|
|
2009-03-09 19:09:19 -04:00
|
|
|
LIB_DEPENDS-bsddb= lib/db4/db.>=4:db->=4,<5:databases/db/v4
|
2006-11-24 15:48:23 -05:00
|
|
|
LIB_DEPENDS-gdbm= gdbm.>=3::databases/gdbm
|
|
|
|
RUN_DEPENDS-idle= ${RUN_DEPENDS} \
|
|
|
|
::lang/python/${VERSION},-tkinter
|
2009-03-09 19:09:19 -04:00
|
|
|
LIB_DEPENDS-tkinter= tcl84:tcl->=8.4,<8.5:lang/tcl/8.4 \
|
|
|
|
tk84:tk->=8.4,<8.5:x11/tk/8.4
|
2009-08-10 13:31:07 -04:00
|
|
|
WANTLIB-tkinter= X11 pthread-stubs xcb
|
2002-02-15 14:42:18 -05:00
|
|
|
|
2005-05-23 16:39:36 -04:00
|
|
|
FULLPKGNAME-bsddb= python-bsddb-${VERSION}${PATCHLEVEL}${PKG_PATCHLEVEL}
|
2003-12-13 10:03:07 -05:00
|
|
|
FULLPKGNAME-gdbm= python-gdbm-${VERSION}${PATCHLEVEL}${PKG_PATCHLEVEL}
|
|
|
|
FULLPKGNAME-idle= python-idle-${VERSION}${PATCHLEVEL}${PKG_PATCHLEVEL}
|
|
|
|
FULLPKGNAME-tests= python-tests-${VERSION}${PATCHLEVEL}${PKG_PATCHLEVEL}
|
2002-10-07 22:52:25 -04:00
|
|
|
FULLPKGNAME-tkinter= python-tkinter-${VERSION}${PATCHLEVEL}${PKG_PATCHLEVEL}
|
2003-12-13 10:03:07 -05:00
|
|
|
FULLPKGNAME-tools= python-tools-${VERSION}${PATCHLEVEL}${PKG_PATCHLEVEL}
|
2002-02-15 14:42:18 -05:00
|
|
|
|
2010-02-25 06:02:39 -05:00
|
|
|
.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH:Mmips64*}
|
2006-10-02 16:29:40 -04:00
|
|
|
PKG_ARGS+= -Dmm=0
|
2002-02-15 14:42:18 -05:00
|
|
|
.else
|
2006-10-02 16:29:40 -04:00
|
|
|
PKG_ARGS+= -Dmm=1
|
2002-02-15 14:42:18 -05:00
|
|
|
.endif
|
|
|
|
|
2009-09-22 17:31:00 -04:00
|
|
|
# XXX fix ctypes on powerpc for python2.6
|
2006-11-08 14:00:19 -05:00
|
|
|
# The ctypes module is not supported on all platforms (in particular, ARM)
|
2008-10-18 07:55:57 -04:00
|
|
|
.if ${VERSION} == "2.5" || ${VERSION} == "2.6"
|
2006-11-08 14:00:19 -05:00
|
|
|
. if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" || \
|
|
|
|
${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64" || \
|
|
|
|
${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "m68k" || \
|
2010-02-09 07:23:59 -05:00
|
|
|
${MACHINE_ARCH:Mmips64*} || \
|
2009-09-22 17:31:00 -04:00
|
|
|
( ${MACHINE_ARCH} == "powerpc" && ${VERSION} != "2.6" )
|
2006-11-08 14:00:19 -05:00
|
|
|
PKG_ARGS+= -Dctypes=1
|
|
|
|
. else
|
|
|
|
PKG_ARGS+= -Dctypes=0
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2009-01-01 16:03:27 -05:00
|
|
|
USE_X11= Yes
|
|
|
|
|
|
|
|
AUTOCONF_VERSION?= 2.59
|
|
|
|
CONFIGURE_STYLE= autoconf
|
|
|
|
CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
|
|
|
|
# --srcdir is needed for systrace to work correctly
|
|
|
|
CONFIGURE_ARGS+= --with-fpectl --with-threads --srcdir=${WRKSRC}
|
|
|
|
CONFIGURE_ARGS+= --enable-ipv6
|
|
|
|
|
|
|
|
# THREAD_STACK_SIZE value might be changed by particular python release
|
|
|
|
THREAD_STACK_SIZE?=0x20000
|
|
|
|
|
2004-08-08 11:38:00 -04:00
|
|
|
CONFIGURE_ENV+= OPT='${CFLAGS} -DTHREAD_STACK_SIZE=${THREAD_STACK_SIZE} -fPIC' \
|
2009-01-01 16:03:27 -05:00
|
|
|
LDFLAGS='-L${WRKSRC}' SVNVERSION=no \
|
|
|
|
LOCALBASE=${LOCALBASE} X11BASE=${X11BASE}
|
|
|
|
MAKE_ENV+= LOCALBASE=${LOCALBASE} X11BASE=${X11BASE}
|
|
|
|
MAKE_FLAGS+= LDLIBRARY=libpython${VERSION}.so.${LIBpython${VERSION}_VERSION}
|
|
|
|
MAKE_FLAGS+= LD_LIBRARY_PATH=${WRKSRC} PATH="${WRKDIST}:${PORTPATH}"
|
2008-01-04 12:48:33 -05:00
|
|
|
FAKE_FLAGS+= RANLIB=:
|
2002-02-15 14:42:18 -05:00
|
|
|
|
2008-10-18 07:55:57 -04:00
|
|
|
ALL_TARGET?= everything ./Lib/plat-openbsd4
|
2002-02-15 14:42:18 -05:00
|
|
|
|
|
|
|
post-configure:
|
|
|
|
@cd ${WRKSRC} && ${MAKE_PROGRAM} Makefile
|
|
|
|
|
|
|
|
post-install:
|
2003-12-30 12:05:30 -05:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/Tools/scripts/pydoc \
|
|
|
|
${PREFIX}/bin/pydoc${VERSION}
|
2003-12-13 10:03:07 -05:00
|
|
|
@sed -e "s,@VERSION@,${VERSION},g" -e "s,@LOCALBASE@,${LOCALBASE},g" \
|
|
|
|
${FILESDIR}/idle > ${WRKSRC}/idle
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/idle ${PREFIX}/bin/idle${VERSION}
|
2002-02-15 14:42:18 -05:00
|
|
|
@cd ${WRKSRC}; tar -cf - Tools | (cd ${PREFIX}/lib/python${VERSION}; \
|
|
|
|
tar -xf -)
|
2002-05-11 17:35:13 -04:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/python${VERSION}
|
|
|
|
${INSTALL_DATA} ${FILESDIR}/CHANGES.OpenBSD \
|
|
|
|
${PREFIX}/share/doc/python${VERSION}/CHANGES.OpenBSD
|
2008-10-18 07:55:57 -04:00
|
|
|
.if ${VERSION} == "2.5" || ${VERSION} == "2.6"
|
2008-05-10 13:10:24 -04:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/emacs/site-lisp
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/Misc/python-mode.el \
|
2009-06-24 21:49:54 -04:00
|
|
|
${PREFIX}/share/emacs/site-lisp/python-mode-${VERSION}.el
|
2008-05-10 13:10:24 -04:00
|
|
|
.endif
|
|
|
|
|
2009-01-01 16:03:27 -05:00
|
|
|
REGRESS_TARGET= test
|
|
|
|
REGRESS_FLAGS= "EXTRATESTOPTS=-w"
|
|
|
|
# Some regress tests write to $HOME
|
|
|
|
PORTHOME= ${WRKDIR}
|
|
|
|
|