pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[PATCH] fix python27 on aix for 2015Q4
I've attached a patch that fixes some problems with python27 on aix.
First, python27 will build but not install because PLIST.common
expects there to be a libpython2.7.so.1.0, and that doesn't get built
on aix. I had submitted a patch earlier that added a PLIST_VAR and
modified PLIST.common, but I see that HPUX has a similar problem and
just creates a symlink in post-install, so my patch does the same
thing for aix.
AIX also needs 3 additional files to be installed. These are used to
create python extension modules. My patch adds PLIST.AIX, and that
lists those 3 files.
Finally, the paths to these 3 files are listed in _sysconfigdata.py,
and the paths are appropriate for when python is being built and
installed. However, they are incorrect once python is installed and
you're trying to build extension modules. This problem has been known
for years, and I don't know why there hasn't been a fix. At any rate,
my patch corrects these paths in post-install.
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python27/Makefile,v
retrieving revision 1.54
diff -u -r1.54 Makefile
--- Makefile 6 Dec 2015 18:22:35 -0000 1.54
+++ Makefile 23 Feb 2016 06:09:23 -0000
@@ -182,6 +182,24 @@
${DESTDIR}${PREFIX}/lib/libpython2.7.sl.1.0
.endif
+.if ${OPSYS} == "AIX"
+post-install:
+ ${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.7.so \
+ ${DESTDIR}${PREFIX}/lib/libpython2.7.so.1.0
+
+ ${SED} -e '/LDSHARED.:/s|\./Modules/|${PREFIX}/lib/python${PY_VER_SUFFIX}/config/|g' \
+ -e '/LINKCC.:/s|\./Modules/|${PREFIX}/lib/python${PY_VER_SUFFIX}/config/|' \
+ -e '/LINKCC.:/s| Modules/| ${PREFIX}/lib/python${PY_VER_SUFFIX}/config/|' \
+ < ${DESTDIR}${PREFIX}/lib/python${PY_VER_SUFFIX}/_sysconfigdata.py > ${WRKSRC}/aix.tmp
+
+ mv ${WRKSRC}/aix.tmp ${DESTDIR}${PREFIX}/lib/python${PY_VER_SUFFIX}/_sysconfigdata.py
+ LIBPATH=${WRKSRC} ${WRKSRC}/python -Wi -tt -m compileall ${DESTDIR}${PREFIX}/lib/python${PY_VER_SUFFIX}/_sysconfigdata.py
+ LIBPATH=${WRKSRC} ${WRKSRC}/python -Wi -tt -O -m compileall ${DESTDIR}${PREFIX}/lib/python${PY_VER_SUFFIX}/_sysconfigdata.py
+.endif
+
+
+
+
.if ${OS_VARIANT} == "SCOOSR5"
# SCO OpenServer 5.0.7/3.2 has no socklen_t in system headers, but has in
# GNU pth's header. It should be used in this case.
Index: PLIST.AIX
===================================================================
RCS file: PLIST.AIX
diff -N PLIST.AIX
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ PLIST.AIX 23 Feb 2016 06:09:23 -0000
@@ -0,0 +1,3 @@
+lib/python${PY_VER_SUFFIX}/config/ld_so_aix
+lib/python${PY_VER_SUFFIX}/config/makexp_aix
+lib/python${PY_VER_SUFFIX}/config/python.exp
Home |
Main Index |
Thread Index |
Old Index