pkgsrc-WIP-changes archive

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

XSB_CONFIG_NAME introduced to simplify the solution for dynamic part of the PLIST



Module Name:	pkgsrc-wip
Committed By:	Mayuresh <mayuresh%acm.org@localhost>
Pushed By:	mayuresh
Date:		Fri Sep 19 02:46:42 2025 +0530
Changeset:	12e17cfef02ebbe2e3f373b338da92dc54875aa8

Modified Files:
	xsb/Makefile
	xsb/PLIST

Log Message:
XSB_CONFIG_NAME introduced to simplify the solution for dynamic part of the PLIST

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=12e17cfef02ebbe2e3f373b338da92dc54875aa8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 xsb/Makefile | 14 ++++----------
 xsb/PLIST    | 24 ++++++++++++------------
 2 files changed, 16 insertions(+), 22 deletions(-)

diffs:
diff --git a/xsb/Makefile b/xsb/Makefile
index fbc52456cc..3692c37f3a 100644
--- a/xsb/Makefile
+++ b/xsb/Makefile
@@ -23,20 +23,15 @@ USE_GNU_CONFIGURE_HOST=	no
 XSB_VERSION_STR=	xsb-5.0.0
 # The source uses P_tmpdir, u_long which are under _NETBSD_SOURCE flag in respective headers
 CONFIGURE_ARGS.NetBSD+=	--with-cflags=-D_NETBSD_SOURCE
-CONFIGURE_ARGS+=	--with-site-prefix=${PREFIX}/${XSB_VERSION_STR}
-CONFIGURE_ARGS+=	--exec-prefix=${PREFIX}/${XSB_VERSION_STR}
-CONFIGURE_ARGS+=	--with-dynamic-libraries=${PREFIX}/lib/xsb
 
 REPLACE_BASH+=	${WRKDIR}/XSB/packages/xasp/makelinks.sh
 XSB_PREFIXDIR=	${DESTDIR}${PREFIX}/${XSB_VERSION_STR}
 XSB_PKGDIR=	${XSB_PREFIXDIR}/packages
 
 # XSB uses config.guess at runtime, making it harder to make predictable paths
-# We override the script to use MACHINE_GNU_PLATFORM
-pre-configure:
-	${ECHO} '#!/bin/sh' > ${WRKSRC}/config.guess
-	${ECHO} 'echo ${MACHINE_GNU_PLATFORM}' >> ${WRKSRC}/config.guess
-	${CHMOD} +x ${WRKSRC}/config.guess
+# Hence we derive XSB_CONFIG_NAME
+XSB_CONFIG_NAME_CMD=	${WRKSRC}/config.sub `${WRKSRC}/config.guess`
+XSB_CONFIG_NAME=	${:!${XSB_CONFIG_NAME_CMD}!}
 
 do-build:
 	cd ${WRKSRC} && ./makexsb fast packages
@@ -49,11 +44,10 @@ do-build:
 # again in the installation area. To avoid this we delete the .P files from the
 # package. They are not needed as their compiled counterparts .xwam files are
 # already packaged.
-
-XSB_CONFIG_NAME=	`${WRKSRC}/config.guess`
 REMOVE_P+=		${XSB_PREFIXDIR}/config/${XSB_CONFIG_NAME}/lib/xsb_configuration.P
 REMOVE_P+=		${XSB_PREFIXDIR}/lib/prolog_db_doc/prolog_db_format.P
 REMOVE_P+=		${XSB_PREFIXDIR}/syslib/debugger_data.P
+PLIST_SUBST+=	XSB_CONFIG_NAME=${XSB_CONFIG_NAME}
 
 do-install:
 	cd ${WRKSRC} && DESTDIR=${DESTDIR} ./makexsb install && \
diff --git a/xsb/PLIST b/xsb/PLIST
index f4c18193ad..f81083e0bc 100644
--- a/xsb/PLIST
+++ b/xsb/PLIST
@@ -43,17 +43,17 @@ ${PKGNAME}.0/cmplib/tprog.xwam
 ${PKGNAME}.0/cmplib/useinfer.xwam
 ${PKGNAME}.0/cmplib/varproc.xwam
 ${PKGNAME}.0/cmplib/writeasm.xwam
-${PKGNAME}.0/config/${MACHINE_GNU_PLATFORM}/banner.msg
-${PKGNAME}.0/config/${MACHINE_GNU_PLATFORM}/bin/gpp
-${PKGNAME}.0/config/${MACHINE_GNU_PLATFORM}/bin/libxsb.so
-${PKGNAME}.0/config/${MACHINE_GNU_PLATFORM}/bin/xsb
-${PKGNAME}.0/config/${MACHINE_GNU_PLATFORM}/lib/xsb_configuration.xwam
-${PKGNAME}.0/config/${MACHINE_GNU_PLATFORM}/lib/xsb_re_match.so
-${PKGNAME}.0/config/${MACHINE_GNU_PLATFORM}/lib/xsb_re_match.xwam
-${PKGNAME}.0/config/${MACHINE_GNU_PLATFORM}/lib/xsb_wildmatch.so
-${PKGNAME}.0/config/${MACHINE_GNU_PLATFORM}/lib/xsb_wildmatch.xwam
-${PKGNAME}.0/config/${MACHINE_GNU_PLATFORM}/xsb_config.h
-${PKGNAME}.0/config/${MACHINE_GNU_PLATFORM}/xsb_debug.h
+${PKGNAME}.0/config/${XSB_CONFIG_NAME}/banner.msg
+${PKGNAME}.0/config/${XSB_CONFIG_NAME}/bin/gpp
+${PKGNAME}.0/config/${XSB_CONFIG_NAME}/bin/libxsb.so
+${PKGNAME}.0/config/${XSB_CONFIG_NAME}/bin/xsb
+${PKGNAME}.0/config/${XSB_CONFIG_NAME}/lib/xsb_configuration.xwam
+${PKGNAME}.0/config/${XSB_CONFIG_NAME}/lib/xsb_re_match.so
+${PKGNAME}.0/config/${XSB_CONFIG_NAME}/lib/xsb_re_match.xwam
+${PKGNAME}.0/config/${XSB_CONFIG_NAME}/lib/xsb_wildmatch.so
+${PKGNAME}.0/config/${XSB_CONFIG_NAME}/lib/xsb_wildmatch.xwam
+${PKGNAME}.0/config/${XSB_CONFIG_NAME}/xsb_config.h
+${PKGNAME}.0/config/${XSB_CONFIG_NAME}/xsb_debug.h
 ${PKGNAME}.0/emu/auxlry.h
 ${PKGNAME}.0/emu/basicdefs.h
 ${PKGNAME}.0/emu/basictypes.h
@@ -667,4 +667,4 @@ ${PKGNAME}.0/syslib/xsb_hook.xwam
 ${PKGNAME}.0/syslib/xsb_read.xwam
 ${PKGNAME}.0/syslib/xsb_writ.xwam
 ${PKGNAME}.0/syslib/xsbbrat.xwam
-@pkgdir ${PKGNAME}.0/config/${MACHINE_GNU_PLATFORM}/saved.o
+@pkgdir ${PKGNAME}.0/config/${XSB_CONFIG_NAME}/saved.o


Home | Main Index | Thread Index | Old Index