tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: using pkg-config modules from host (Re: wip/py-numpy + blas)
Am Thu, 07 Dec 2023 18:12:05 +0100
schrieb Jörg Sonnenberger <joerg%bec.de@localhost>:
> 2a) Split the nis module off into its own package and let it fail on systems
> that don't provide the necessary libs.
What about my current working hack of 3a?
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python311/Makefile,v
retrieving revision 1.21
diff -u -r1.21 Makefile
--- Makefile 23 Nov 2023 12:43:35 -0000 1.21
+++ Makefile 7 Dec 2023 17:23:30 -0000
@@ -111,6 +111,17 @@
.if ${OPSYS} != "Linux"
PLIST.dbm= yes
.endif
+
+# On glibc systems, those two libs must be locatable via pkg-config for
+# the python configure to utilize them to build the NIS module.
+BUILTIN_FIND_PKGCONFIG_FILES_VAR:= TIRPC_PC NSL_PC
+BUILTIN_FIND_PKGCONFIG_FILES.TIRPC_PC:= libtirpc.pc
+BUILTIN_FIND_PKGCONFIG_FILES.NSL_PC:= libnsl.pc
+.include "../../mk/buildlink3/find-pkgconfig-files.mk"
+.if ${NSL_PC} != __nonexistent__ && ${TIRPC_PC} != __nonexistent__
+PLIST.nis= yes
+.endif
+
.for incdir in ${_OPSYS_INCLUDE_DIRS}
. if (exists(${incdir}/rpc/rpc.h) || exists(${incdir}/tirpc/rpc/rpc.h))
HAVE_RPC_H= yes
@@ -206,6 +217,11 @@
CHECK_WRKREF_SKIP+= lib/python${PY_VER_SUFFIX}/__pycache__/_sysconfigdata*
CHECK_WRKREF_SKIP+= lib/python${PY_VER_SUFFIX}/config-${PY_VER_SUFFIX}/Makefile
+pre-configure:
+.if ${PLIST.nis:Uno} == yes
+ ${LN} -sf ${TIRPC_PC:Q} ${NSL_PC:Q} ${BUILDLINK_DIR}/lib/pkgconfig
+.endif
+
# Avoid error: Cannot generate ./Include/opcode.h, python not found !
post-configure:
touch ${WRKSRC}/Include/opcode.h
Maybe if the whole pkg-config part is wrapped in ${OPSYS} = "Linux".
The header search still seems to work for some BSD systems, so the
configure logic seems different there.
So,
if ${OPSYS} == Linux
# look for pkgconfig files
else
# look for headers
endif
?
Would that be OK? It means no further work on this with added packages
and builtin magic. It would build NIS on modern Linux systems where the
pkg-config files are there. It should avoid the PLIST issue for the
majority.
I think this would be a good-enough solution, given that nobody really
intends to sink time into this.
Alrighty then,
Thomas
--
Dr. Thomas Orgis
HPC @ Universität Hamburg
Home |
Main Index |
Thread Index |
Old Index