Fixes for Python>=32 PEP 3147. Let to compile PYC files in post-install phase, instead of installing .pyc files generaed as a side effect.diff -r1.29 -r1.30 pkgsrc/x11/py-sip/Makefile
(obache)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.29 2012/02/17 18:36:45 drochner Exp $ | 1 | # $NetBSD: Makefile,v 1.30 2012/05/22 09:43:33 obache Exp $ | |
2 | 2 | |||
3 | DISTNAME= sip-4.13.2 | 3 | DISTNAME= sip-4.13.2 | |
4 | PKGNAME= ${PYPKGPREFIX}-${DISTNAME} | 4 | PKGNAME= ${PYPKGPREFIX}-${DISTNAME} | |
5 | CATEGORIES= x11 devel python | 5 | CATEGORIES= x11 devel python | |
6 | MASTER_SITES= http://www.riverbankcomputing.com/static/Downloads/sip4/ | 6 | MASTER_SITES= http://www.riverbankcomputing.com/static/Downloads/sip4/ | |
7 | 7 | |||
8 | MAINTAINER= pkgsrc-users@NetBSD.org | 8 | MAINTAINER= pkgsrc-users@NetBSD.org | |
9 | HOMEPAGE= http://www.riverbankcomputing.com/software/sip/intro | 9 | HOMEPAGE= http://www.riverbankcomputing.com/software/sip/intro | |
10 | COMMENT= Tool to create Python bindings for C++ libraries | 10 | COMMENT= Tool to create Python bindings for C++ libraries | |
11 | 11 | |||
12 | PKG_DESTDIR_SUPPORT= user-destdir | 12 | PKG_DESTDIR_SUPPORT= user-destdir | |
13 | 13 | |||
14 | PYTHON_VERSIONS_INCLUDE_3X= yes | 14 | PYTHON_VERSIONS_INCLUDE_3X= yes | |
@@ -50,16 +50,19 @@ CONFIGURE_ARGS+= LFLAGS_SHLIB="-shared - | @@ -50,16 +50,19 @@ CONFIGURE_ARGS+= LFLAGS_SHLIB="-shared - | |||
50 | CONFIGURE_ARGS+= LFLAGS_SHLIB="-shared" | 50 | CONFIGURE_ARGS+= LFLAGS_SHLIB="-shared" | |
51 | . endif | 51 | . endif | |
52 | .endif | 52 | .endif | |
53 | 53 | |||
54 | SUBST_CLASSES+= pyversfx | 54 | SUBST_CLASSES+= pyversfx | |
55 | SUBST_STAGE.pyversfx= pre-configure | 55 | SUBST_STAGE.pyversfx= pre-configure | |
56 | SUBST_FILES.pyversfx= sipgen/sipgen.sbf | 56 | SUBST_FILES.pyversfx= sipgen/sipgen.sbf | |
57 | SUBST_SED.pyversfx= -e "s|@PYVERSSUFFIX@|${PYVERSSUFFIX}|g" | 57 | SUBST_SED.pyversfx= -e "s|@PYVERSSUFFIX@|${PYVERSSUFFIX}|g" | |
58 | 58 | |||
59 | do-configure: | 59 | do-configure: | |
60 | (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ | 60 | (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ | |
61 | ${PYTHONBIN} configure.py ${CONFIGURE_ARGS}) | 61 | ${PYTHONBIN} configure.py ${CONFIGURE_ARGS}) | |
62 | 62 | |||
63 | post-install: | |||
64 | ${PY_COMPILE_ALL} ${DESTDIR}${PREFIX}/${PYSITELIB}/sipconfig.py | |||
65 | ||||
63 | .include "../../lang/python/application.mk" | 66 | .include "../../lang/python/application.mk" | |
64 | .include "../../lang/python/extension.mk" | 67 | .include "../../lang/python/extension.mk" | |
65 | .include "../../mk/bsd.pkg.mk" | 68 | .include "../../mk/bsd.pkg.mk" |
@@ -1,7 +1,7 @@ | @@ -1,7 +1,7 @@ | |||
1 | $NetBSD: distinfo,v 1.24 2012/02/17 18:36:45 drochner Exp $ | 1 | $NetBSD: distinfo,v 1.25 2012/05/22 09:43:33 obache Exp $ | |
2 | 2 | |||
3 | SHA1 (sip-4.13.2.tar.gz) = 1c5df9182e8046f1c0d01603a2474fa2418bcea0 | 3 | SHA1 (sip-4.13.2.tar.gz) = 1c5df9182e8046f1c0d01603a2474fa2418bcea0 | |
4 | RMD160 (sip-4.13.2.tar.gz) = 24a8e7c4bd36382594ea3f11317eb0f10e4e56ea | 4 | RMD160 (sip-4.13.2.tar.gz) = 24a8e7c4bd36382594ea3f11317eb0f10e4e56ea | |
5 | Size (sip-4.13.2.tar.gz) = 733120 bytes | 5 | Size (sip-4.13.2.tar.gz) = 733120 bytes | |
6 | SHA1 (patch-aa) = 83c90f534c46c5b5751d2ef23ba3cf23f803be65 | 6 | SHA1 (patch-aa) = 72742d6608d13c1999961a2d36913b5e9d11fa50 | |
7 | SHA1 (patch-ab) = 044f78528dc67f7585c15b0fb3ec116ff11e31a6 | 7 | SHA1 (patch-ab) = 044f78528dc67f7585c15b0fb3ec116ff11e31a6 |
@@ -1,31 +1,22 @@ | @@ -1,31 +1,22 @@ | |||
1 | $NetBSD: patch-aa,v 1.4 2011/01/11 15:14:20 drochner Exp $ | 1 | $NetBSD: patch-aa,v 1.5 2012/05/22 09:43:33 obache Exp $ | |
2 | 2 | |||
3 | --- configure.py.orig 2010-12-23 17:40:28.000000000 +0000 | 3 | --- configure.py.orig 2010-12-23 17:40:28.000000000 +0000 | |
4 | +++ configure.py | 4 | +++ configure.py | |
5 | @@ -208,7 +208,7 @@ def set_platform_directories(): | 5 | @@ -208,7 +208,7 @@ def set_platform_directories(): | |
6 | 6 | |||
7 | plat_py_lib_dir = lib_dir + "/config" | 7 | plat_py_lib_dir = lib_dir + "/config" | |
8 | plat_bin_dir = sys.exec_prefix + "/bin" | 8 | plat_bin_dir = sys.exec_prefix + "/bin" | |
9 | - plat_sip_dir = sys.prefix + "/share/sip" | 9 | - plat_sip_dir = sys.prefix + "/share/sip" | |
10 | + plat_sip_dir = sys.prefix + "/share/sip%s" % sys.version[0:3] | 10 | + plat_sip_dir = sys.prefix + "/share/sip%s" % sys.version[0:3] | |
11 | 11 | |||
12 | 12 | |||
13 | def patch_files(): | 13 | def patch_files(): | |
14 | @@ -254,7 +254,7 @@ def create_config(module, template, macr | 14 | @@ -254,7 +254,7 @@ def create_config(module, template, macr | |
15 | "sip_version": sip_version, | 15 | "sip_version": sip_version, | |
16 | "sip_version_str": sip_version_str, | 16 | "sip_version_str": sip_version_str, | |
17 | "platform": opts.platform, | 17 | "platform": opts.platform, | |
18 | - "sip_bin": os.path.join(opts.sipbindir, "sip"), | 18 | - "sip_bin": os.path.join(opts.sipbindir, "sip"), | |
19 | + "sip_bin": os.path.join(opts.sipbindir, "sip%s" % sys.version[0:3]), | 19 | + "sip_bin": os.path.join(opts.sipbindir, "sip%s" % sys.version[0:3]), | |
20 | "sip_inc_dir": opts.sipincdir, | 20 | "sip_inc_dir": opts.sipincdir, | |
21 | "sip_mod_dir": opts.sipmoddir, | 21 | "sip_mod_dir": opts.sipmoddir, | |
22 | "default_bin_dir": plat_bin_dir, | 22 | "default_bin_dir": plat_bin_dir, | |
23 | @@ -289,7 +289,7 @@ def create_makefiles(macros): | |||
24 | sipconfig.ParentMakefile( | |||
25 | configuration=cfg, | |||
26 | subdirs=["sipgen", "siplib"], | |||
27 | - installs=(["sipconfig.py", os.path.join(src_dir, "sipdistutils.py")], | |||
28 | + installs=(["sipconfig.py", "sipconfig.pyc", os.path.join(src_dir, "sipdistutils.py")], | |||
29 | cfg.sip_mod_dir) | |||
30 | ).generate() | |||
31 |