From owner-svn-ports-head@FreeBSD.ORG Tue Dec 17 20:52:00 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7FE6DE; Tue, 17 Dec 2013 20:52:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A90F31AB0; Tue, 17 Dec 2013 20:52:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBHKq0xb041581; Tue, 17 Dec 2013 20:52:00 GMT (envelope-from dbn@svn.freebsd.org) Received: (from dbn@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBHKpxe5041566; Tue, 17 Dec 2013 20:51:59 GMT (envelope-from dbn@svn.freebsd.org) Message-Id: <201312172051.rBHKpxe5041566@svn.freebsd.org> From: David Naylor Date: Tue, 17 Dec 2013 20:51:59 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r336767 - in head/lang/pypy-devel: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Dec 2013 20:52:00 -0000 Author: dbn Date: Tue Dec 17 20:51:59 2013 New Revision: 336767 URL: http://svnweb.freebsd.org/changeset/ports/336767 Log: Update lang/pypy-devel to development snapshot at 16-Dec-'13. Changes: 1) Fix installation with LOCALBASE!=/usr/local 2) Properly detect the number of CPUs for concurrent builds Notes: 1) The cffi based module _sqlite3.py needs to know where to find sqlite3.h, which is hard-coded into the file, however the '.so' created is based on the checksum of _sqlite3.py that changes when changing the hard-coded path. Change this by properly using the LOCALBASE environment variable. 2) This change does not modify the behaviour of the port as this port runs the compilation stage directly, and correctly, however this change will be upstreamed. Added: head/lang/pypy-devel/files/patch-rpython__config__support.py (contents, props changed) Modified: head/lang/pypy-devel/Makefile head/lang/pypy-devel/distinfo head/lang/pypy-devel/files/Makefile head/lang/pypy-devel/files/patch-lib_pypy___sqlite3.py head/lang/pypy-devel/pkg-plist Modified: head/lang/pypy-devel/Makefile ============================================================================== --- head/lang/pypy-devel/Makefile Tue Dec 17 20:49:16 2013 (r336766) +++ head/lang/pypy-devel/Makefile Tue Dec 17 20:51:59 2013 (r336767) @@ -2,11 +2,12 @@ # $FreeBSD$ PORTNAME= pypy -DISTVERSION= 2.2.1 +DISTVERSION= 2.3-alpha${DATE} CATEGORIES= lang python -MASTER_SITES= http://cdn.bitbucket.org/pypy/pypy/downloads/ https://bitbucket.org/pypy/pypy/downloads/ +MASTER_SITES= https://bitbucket.org/pypy/pypy/get/ LOCAL/dbn/${PORTNAME} PKGNAMESUFFIX= -devel -DISTNAME= ${PORTNAME}-${DISTVERSION}-src +DISTNAME= ${COMMIT} +DIST_SUBDIR= ${PORTNAME} MAINTAINER= dbn@FreeBSD.org COMMENT= Fast, compliant implementation of the Python language @@ -39,12 +40,14 @@ CONFLICTS_INSTALL= pypy-[0-9]* ALL_TARGET= ${PYPY_NAMES} BUILD_WRKSRC= ${WRKDIR} -DATE= 20130810 +COMMIT= 92ff43b19372 +DATE= 20131216 USE_BZIP2= yes USES= compiler:c11 gettext iconv MAKEFILE= ${FILESDIR}/Makefile PKGINSTALL= ${WRKDIR}/pkg-install PKGDEINSTALL= ${WRKDIR}/pkg-deinstall +WRKSRC= ${WRKDIR}/pypy-pypy-${COMMIT} PYPY_VER= ${DISTVERSION:C|([0-9])\.([0-9]).*|\1.\2|} PYTHON_IMPL_VER= 2.7 @@ -60,9 +63,6 @@ PLIST_SUB+= PYPY_LIBDIR=${PYPY_LIBDIR} \ MAKE_ENV+= DISTVERSION=${DISTVERSION} PYTHON_CMD=${PYTHON_CMD} \ WRKSRC=${WRKSRC} PYPY_LOCALBASE=${LOCALBASE} -LOCALBASE_REFIX= \ - lib_pypy/_sqlite3.py - .include .include "${MASTERDIR}/files/bsd.pypy.inst.mk" @@ -229,11 +229,6 @@ post-extract: .endfor ${LN} -s ${WRKDIR}/lib ${WRKSRC}/lib -post-patch: -.for file in ${LOCALBASE_REFIX} - ${REINPLACE_CMD} 's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/${file} -.endfor - do-configure: ${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \ -e 's|%%PYPY_NAMES%%|${PYPY_NAMES}|g' \ @@ -245,7 +240,7 @@ do-configure: post-build: # UPDATING: check pypy/tool/release/package.py for list of cffi modules .for mod in _sqlite3 _curses syslog - ${WRKDIR}/${PYPY_PRIMARY} -c 'import ${mod}' + ${SETENV} ${MAKE_ENV} ${WRKDIR}/${PYPY_PRIMARY} -c 'import ${mod}' .endfor ${STRIP_CMD} ${WRKDIR}/${PYPY_LIBDIR}/lib_pypy/__pycache__/_cffi__*.pypy-${PYPY_VER:C/\.//}.so .for _path in ${PYPYDIRS} Modified: head/lang/pypy-devel/distinfo ============================================================================== --- head/lang/pypy-devel/distinfo Tue Dec 17 20:49:16 2013 (r336766) +++ head/lang/pypy-devel/distinfo Tue Dec 17 20:51:59 2013 (r336767) @@ -1,2 +1,2 @@ -SHA256 (pypy-2.2.1-src.tar.bz2) = 252045187e443656a2beb412dadac9296e8fe8db0f75a66ed5265db58c35035f -SIZE (pypy-2.2.1-src.tar.bz2) = 14439822 +SHA256 (pypy/92ff43b19372.tar.bz2) = 64f4c31f9f609535fcf33fdf33c71524ef9bd0c0e1abff181cc06c0c25985563 +SIZE (pypy/92ff43b19372.tar.bz2) = 14291630 Modified: head/lang/pypy-devel/files/Makefile ============================================================================== --- head/lang/pypy-devel/files/Makefile Tue Dec 17 20:49:16 2013 (r336766) +++ head/lang/pypy-devel/files/Makefile Tue Dec 17 20:51:59 2013 (r336767) @@ -21,7 +21,7 @@ TOUCH?= touch REINPLACE_CMD?= ${SED} -i~ -BUILDDIR= usession-release-${DISTVERSION:C/.[0-9]*$//}.x-0 +BUILDDIR= usession-default-0 .for inst in ${PYPY_INST} Modified: head/lang/pypy-devel/files/patch-lib_pypy___sqlite3.py ============================================================================== --- head/lang/pypy-devel/files/patch-lib_pypy___sqlite3.py Tue Dec 17 20:49:16 2013 (r336766) +++ head/lang/pypy-devel/files/patch-lib_pypy___sqlite3.py Tue Dec 17 20:51:59 2013 (r336767) @@ -1,11 +1,19 @@ ---- lib_pypy/_sqlite3.py.orig 2013-05-18 16:20:00.000000000 +0200 -+++ lib_pypy/_sqlite3.py 2013-05-18 16:21:06.000000000 +0200 -@@ -270,7 +270,7 @@ +--- lib_pypy/_sqlite3.py.bak 2013-12-15 23:45:52.000000000 +0200 ++++ lib_pypy/_sqlite3.py 2013-12-16 12:07:57.000000000 +0200 +@@ -269,11 +269,14 @@ + _ffi.cdef("int sqlite3_enable_load_extension(sqlite3 *db, int onoff);") - _lib = _ffi.verify(""" - #include --""", libraries=['sqlite3'] -+""", libraries=['sqlite3'], include_dirs=['/usr/local/include'], library_dirs=['/usr/local/lib'] - ) - - exported_sqlite_symbols = [ + if sys.platform.startswith('freebsd'): ++ import os ++ import os.path ++ _localbase = os.environ.get('LOCALBASE', '/usr/local') + _lib = _ffi.verify(""" + #include + """, libraries=['sqlite3'], +- include_dirs=['/usr/local/include'], +- library_dirs=['/usr/local/lib'] ++ include_dirs=[os.path.join(_localbase, 'include')], ++ library_dirs=[os.path.join(_localbase, 'lib')] + ) + else: + _lib = _ffi.verify(""" Added: head/lang/pypy-devel/files/patch-rpython__config__support.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/pypy-devel/files/patch-rpython__config__support.py Tue Dec 17 20:51:59 2013 (r336767) @@ -0,0 +1,28 @@ +--- ./rpython/config/support.py~ 2013-12-16 12:34:17.000000000 +0200 ++++ ./rpython/config/support.py 2013-12-16 12:33:52.000000000 +0200 +@@ -8,7 +8,9 @@ + if os.environ.get('MAKEFLAGS'): + return 1 # don't override MAKEFLAGS. This will call 'make' without any '-j' option + if sys.platform == 'darwin': +- return darwin_get_cpu_count() ++ return sysctl_get_cpu_count('/usr/sbin/sysctl') ++ elif sys.platform.startswith('freebsd'): ++ return sysctl_get_cpu_count('/sbin/sysctl') + elif not sys.platform.startswith('linux'): + return 1 # implement me + try: +@@ -26,11 +28,10 @@ + except: + return 1 # we really don't want to explode here, at worst we have 1 + +-def darwin_get_cpu_count(cmd = "/usr/sbin/sysctl hw.ncpu"): ++def sysctl_get_cpu_count(cmd, name='hw.ncpu'): + try: +- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True) +- # 'hw.ncpu: 20' +- count = proc.communicate()[0].rstrip()[8:] ++ proc = subprocess.Popen([cmd, '-n', name], stdout=subprocess.PIPE) ++ count = proc.communicate()[0] + return int(count) + except (OSError, ValueError): + return 1 Modified: head/lang/pypy-devel/pkg-plist ============================================================================== --- head/lang/pypy-devel/pkg-plist Tue Dec 17 20:49:16 2013 (r336766) +++ head/lang/pypy-devel/pkg-plist Tue Dec 17 20:51:59 2013 (r336767) @@ -1454,9 +1454,9 @@ %%PYPY_LIBDIR%%/lib2to3/tests/test_util.pyc %%PYPY_LIBDIR%%/lib_pypy/__init__.py %%PYPY_LIBDIR%%/lib_pypy/__init__.pyc -%%PYPY_LIBDIR%%/lib_pypy/__pycache__/_cffi__g3e8f69b6x1fd01a91.pypy-%%PYPY_VER%%.so -%%PYPY_LIBDIR%%/lib_pypy/__pycache__/_cffi__g45f34413x310af836.pypy-%%PYPY_VER%%.so -%%PYPY_LIBDIR%%/lib_pypy/__pycache__/_cffi__ga01735dbxad93c709.pypy-%%PYPY_VER%%.so +%%PYPY_LIBDIR%%/lib_pypy/__pycache__/_cffi__g16926e9ax39a3fadd.pypy-%%PYPY_VER%%.so +%%PYPY_LIBDIR%%/lib_pypy/__pycache__/_cffi__g3ed5c373x359e5476.pypy-%%PYPY_VER%%.so +%%PYPY_LIBDIR%%/lib_pypy/__pycache__/_cffi__g8b5895b6x576c1bb2.pypy-%%PYPY_VER%%.so %%PYPY_LIBDIR%%/lib_pypy/_codecs_cn.py %%PYPY_LIBDIR%%/lib_pypy/_codecs_cn.pyc %%PYPY_LIBDIR%%/lib_pypy/_codecs_hk.py