pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] fix python27 on aix for 2015Q4



I've attached an updated patch.  It uses a PLIST_VAR instead doing a
symlink.  I removed the HPUX hack, making it use PLIST_VAR as well,
but I don't have access to HPUX, so I can't test that it actually
works there.


On Tue, Feb 23, 2016 at 5:51 AM, Joerg Sonnenberger
<joerg%britannica.bec.de@localhost> wrote:
> On Tue, Feb 23, 2016 at 12:35:32AM -0600, J Raynor wrote:
>> 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.
>
> I'd really prefer the PLIST_VAR and removing the HPUX hack.
>
> Joerg
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	24 Feb 2016 06:31:34 -0000
@@ -108,6 +108,10 @@
 CFLAGS+=		-I${OSX_SDK_PATH}/usr/include
 .endif
 
+PLIST_VARS+=	sover
+.if ${OPSYS} != "AIX" && ${OPSYS} != "HPUX"
+PLIST.sover=	yes
+.endif
 PLIST_VARS+=	dll nis no-nis
 .if ${OPSYS} == "IRIX"
 .  if ${ABI} == "64"
@@ -176,10 +180,16 @@
 	${MV} ${WRKSRC}/Tools/scripts/pydoc ${WRKSRC}/Tools/scripts/pydoc${PY_VER_SUFFIX}
 	${MV} ${WRKSRC}/Tools/scripts/2to3 ${WRKSRC}/Tools/scripts/2to3-${PY_VER_SUFFIX}
 
-.if ${OPSYS} == "HPUX"
+.if ${OPSYS} == "AIX"
 post-install:
-	${LN} -fs ${DESTDIR}${PREFIX}/lib/libpython2.7.sl \
-		${DESTDIR}${PREFIX}/lib/libpython2.7.sl.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"
Index: PLIST.AIX
===================================================================
RCS file: PLIST.AIX
diff -N PLIST.AIX
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ PLIST.AIX	24 Feb 2016 06:31:34 -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
Index: PLIST.common
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python27/PLIST.common,v
retrieving revision 1.14
diff -u -r1.14 PLIST.common
--- PLIST.common	6 Dec 2015 18:22:35 -0000	1.14
+++ PLIST.common	24 Feb 2016 06:31:35 -0000
@@ -97,7 +97,7 @@
 include/python${PY_VER_SUFFIX}/warnings.h
 include/python${PY_VER_SUFFIX}/weakrefobject.h
 ${PLIST.dll}lib/libpython${PY_VER_SUFFIX}.so
-${PLIST.dll}lib/libpython${PY_VER_SUFFIX}.so.1.0
+${PLIST.dll}${PLIST.sover}lib/libpython${PY_VER_SUFFIX}.so.1.0
 lib/pkgconfig/python-${PY_VER_SUFFIX}.pc
 lib/python${PY_VER_SUFFIX}/BaseHTTPServer.py
 lib/python${PY_VER_SUFFIX}/BaseHTTPServer.pyc


Home | Main Index | Thread Index | Old Index