pkgsrc-WIP-changes archive

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

xsb: initial commit till a successful build, packaging pending



Module Name:	pkgsrc-wip
Committed By:	mayuresh <mayuresh%acm.org@localhost>
Pushed By:	mayuresh
Date:		Fri Aug 12 17:43:35 2022 +0530
Changeset:	dec68dfdcf6183429f4d19bafc52f1d01c1307f1

Added Files:
	xsb/DESCR
	xsb/Makefile
	xsb/PLIST
	xsb/patches/patch-.._emu_system__xsb.c
	xsb/patches/patch-.._emu_thread__xsb.c
	xsb/patches/patch-configure
	xsb/patches/patch-version.sh

Log Message:
xsb: initial commit till a successful build, packaging pending

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

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

diffstat:
 xsb/DESCR                              |  4 +++
 xsb/Makefile                           | 36 +++++++++++++++++++
 xsb/PLIST                              |  4 +++
 xsb/patches/patch-.._emu_system__xsb.c | 15 ++++++++
 xsb/patches/patch-.._emu_thread__xsb.c | 17 +++++++++
 xsb/patches/patch-configure            | 65 ++++++++++++++++++++++++++++++++++
 xsb/patches/patch-version.sh           | 11 ++++++
 7 files changed, 152 insertions(+)

diffs:
diff --git a/xsb/DESCR b/xsb/DESCR
new file mode 100644
index 0000000000..a31ebc038e
--- /dev/null
+++ b/xsb/DESCR
@@ -0,0 +1,4 @@
+XSB is a Logic Programming and Deductive Database system for Unix and Windows.
+It is being developed at a number of institutions, including the Computer
+Science Department of Stony Brook University, Universidade Nova de Lisboa, XSB
+Inc., and Coherent Knowledge Systems, Inc.
diff --git a/xsb/Makefile b/xsb/Makefile
new file mode 100644
index 0000000000..68d2486f37
--- /dev/null
+++ b/xsb/Makefile
@@ -0,0 +1,36 @@
+# $NetBSD$
+
+DISTNAME=	XSB-5.0
+CATEGORIES=	lang
+MASTER_SITES=	https://sourceforge.net/projects/xsb/files/xsb/5.0%20%28Green%20Tea%29/
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	http://xsb.sourceforge.net/
+COMMENT=	Logic Programming and Deductive Database system
+LICENSE=	gnu-lgpl-v2
+
+WRKSRC=		${WRKDIR}/XSB/build
+
+# There is "hard link not found" error for MSVC.sh with stock tar
+EXTRACT_USING=	gtar
+
+GNU_CONFIGURE=		yes
+AUTOCONF_REQD=		2.7
+GNU_CONFIGURE_STRICT=	no
+USE_GNU_CONFIGURE_HOST=	no
+
+# The source uses P_tmpdir, u_long which are under _NETBSD_SOURCE flag in respective headers
+CONFIGURE_ARGS+=	--with-cflags=-D_NETBSD_SOURCE
+CONFIGURE_ARGS+=	--with-site-prefix=${PREFIX}/xsb-5.0.0
+CONFIGURE_ARGS+=	--exec-prefix=${PREFIX}/xsb-5.0.0
+
+
+do-build:
+	cd ${WRKSRC} && ./makexsb fast
+
+#do-install:
+#	cd ${WRKSRC} && ./makexsb install
+
+
+.include "../../devel/pcre/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/xsb/PLIST b/xsb/PLIST
new file mode 100644
index 0000000000..2af1f77192
--- /dev/null
+++ b/xsb/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD$
+@comment TODO: to fill this file with the file listing:
+@comment TODO: 1. run "/usr/pbulk/bin/bmake package"
+@comment TODO: 2. run "/usr/pbulk/bin/bmake print-PLIST"
diff --git a/xsb/patches/patch-.._emu_system__xsb.c b/xsb/patches/patch-.._emu_system__xsb.c
new file mode 100644
index 0000000000..566f025d67
--- /dev/null
+++ b/xsb/patches/patch-.._emu_system__xsb.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+S_IREAD, S_IWRITE handling on __NetBSD__ is same as that on DARWIN
+
+--- ../emu/system_xsb.c.orig	2022-05-12 20:54:07.000000000 +0000
++++ ../emu/system_xsb.c
+@@ -228,7 +228,7 @@ int sys_syscall(CTXTdeclc int callno)
+   }
+   case SYS_create: {
+     // TES: need to use different macro forms with clang when updating the POSIX vzaersion
+-#if defined(DARWIN)
++#if defined(DARWIN) || defined(__NetBSD__)
+     result = open(ptoc_longstring(CTXTc 3),O_CREAT|O_EXCL,S_IRUSR|S_IWUSR);
+ #else
+     result = open(ptoc_longstring(CTXTc 3),O_CREAT|O_EXCL,S_IREAD|S_IWRITE);
diff --git a/xsb/patches/patch-.._emu_thread__xsb.c b/xsb/patches/patch-.._emu_thread__xsb.c
new file mode 100644
index 0000000000..6ae05eb8bf
--- /dev/null
+++ b/xsb/patches/patch-.._emu_thread__xsb.c
@@ -0,0 +1,17 @@
+$NetBSD$
+
+PTHREAD_MUTEX_ERRORCHECK_NP is not available on NetBSD
+
+--- ../emu/thread_xsb.c.orig	2022-05-12 20:54:07.000000000 +0000
++++ ../emu/thread_xsb.c
+@@ -20,6 +20,10 @@
+ **
+ */
+ 
++#if defined(__NetBSD__)
++#    define PTHREAD_MUTEX_ERRORCHECK_NP PTHREAD_MUTEX_ERRORCHECK
++#endif
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <time.h>
diff --git a/xsb/patches/patch-configure b/xsb/patches/patch-configure
new file mode 100644
index 0000000000..3791fe9f35
--- /dev/null
+++ b/xsb/patches/patch-configure
@@ -0,0 +1,65 @@
+$NetBSD$
+
+1. Path to configvars.in should be from $topdir in development area, not from $prefix which is in install area
+
+2. LDFLAGS require -lpthread on NetBSD
+
+--- configure.orig	2022-05-12 20:54:07.000000000 +0000
++++ configure
+@@ -5204,7 +5204,7 @@ fi
+ 
+ # xsbpy package
+ if test -d "$topdir/packages/xsbpy"; then
+-    ac_config_files="$ac_config_files '"${prefix}/packages/xsbpy/configvars.sh"':'"${prefix}/packages/xsbpy/configvars.in"'"
++    ac_config_files="$ac_config_files '"${topdir}/packages/xsbpy/configvars.sh"':'"${topdir}/packages/xsbpy/configvars.in"'"
+ 
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+@@ -5912,7 +5914,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
+ for ac_config_target in $ac_config_targets
+ do
+   case $ac_config_target in
+-    "'"${prefix}/packages/xsbpy/configvars.sh"'") CONFIG_FILES="$CONFIG_FILES '"${prefix}/packages/xsbpy/configvars.sh"':'"${prefix}/packages/xsbpy/configvars.in"'" ;;
++    "'"${topdir}/packages/xsbpy/configvars.sh"'") CONFIG_FILES="$CONFIG_FILES '"${topdir}/packages/xsbpy/configvars.sh"':'"${topdir}/packages/xsbpy/configvars.in"'" ;;
+ 
+   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+   esac
+@@ -7457,6 +7459,11 @@ case "$canonical" in
+                 ;;
+                 esac
+         ;;
++    *netbsd* )
++                if test "${have_pthread}" != "no" ; then
++                    LDFLAGS="${LDFLAGS} -lpthread"
++                fi
++        ;;
+     *freebsd* ) $as_echo "#define FREEBSD 1" >>confdefs.h
+ 
+                 $as_echo "#define FOREIGN_ELF 1" >>confdefs.h
+@@ -8326,7 +8333,7 @@ ac_config_headers="$ac_config_headers '"
+ 
+ 
+ 
+-ac_config_files="$ac_config_files '"${arch_config_prefix}/topMakefile"':topMakefile.in '"${arch_config_prefix}/emuMakefile"':emuMakefile.in '"${arch_config_prefix}/modMakefile"':modMakefile.in '"${arch_config_prefix}/gppMakefile"':gppMakefile.in '"${arch_config_prefix}/smoMakefile"':smoMakefile.in '"${arch_config_prefix}/makedef.sh"':makedef.sh.in '"${arch_config_file}"':xsb_configuration.in windows/xsb_configuration.P:windows/xsb_configuration.in windows64/xsb_configuration.P:windows64/xsb_configuration.in makexsb:makexsb.in '"${scriptdir}/chr_pp${config_tag}"':chr_pp.in '"${scriptdir}/xsb${config_tag}"':xsb.in '"${arch_config_prefix}/banner.msg"':banner.in windows/banner.msg:windows/banner.in windows64/banner.msg:windows64/banner.in windows/MSVC_mkfile.mak:windows/MSVC_mkfile.in windows64/MSVC_mkfile.mak:windows64/MSVC_mkfile.in '"${prefix}/packages/xmc/xmc-gui"':xmc-gui.in"
++ac_config_files="$ac_config_files '"${arch_config_prefix}/topMakefile"':topMakefile.in '"${arch_config_prefix}/emuMakefile"':emuMakefile.in '"${arch_config_prefix}/modMakefile"':modMakefile.in '"${arch_config_prefix}/gppMakefile"':gppMakefile.in '"${arch_config_prefix}/smoMakefile"':smoMakefile.in '"${arch_config_prefix}/makedef.sh"':makedef.sh.in '"${arch_config_file}"':xsb_configuration.in windows/xsb_configuration.P:windows/xsb_configuration.in windows64/xsb_configuration.P:windows64/xsb_configuration.in makexsb:makexsb.in '"${scriptdir}/chr_pp${config_tag}"':chr_pp.in '"${scriptdir}/xsb${config_tag}"':xsb.in '"${arch_config_prefix}/banner.msg"':banner.in windows/banner.msg:windows/banner.in windows64/banner.msg:windows64/banner.in windows/MSVC_mkfile.mak:windows/MSVC_mkfile.in windows64/MSVC_mkfile.mak:windows64/MSVC_mkfile.in '"${topdir}/packages/xmc/xmc-gui"':xmc-gui.in"
+ 
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+@@ -9018,7 +9027,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
+ for ac_config_target in $ac_config_targets
+ do
+   case $ac_config_target in
+-    "'"${prefix}/packages/xsbpy/configvars.sh"'") CONFIG_FILES="$CONFIG_FILES '"${prefix}/packages/xsbpy/configvars.sh"':'"${prefix}/packages/xsbpy/configvars.in"'" ;;
++    "'"${topdir}/packages/xsbpy/configvars.sh"'") CONFIG_FILES="$CONFIG_FILES '"${topdir}/packages/xsbpy/configvars.sh"':'"${topdir}/packages/xsbpy/configvars.in"'" ;;
+     "'"${arch_config_prefix}/xsb_config.h"'") CONFIG_HEADERS="$CONFIG_HEADERS '"${arch_config_prefix}/xsb_config.h"':${config_dot_h_templ}" ;;
+     "windows/xsb_config.h") CONFIG_HEADERS="$CONFIG_HEADERS windows/xsb_config.h:windows/def_config.in" ;;
+     "windows/xsb_debug.h") CONFIG_HEADERS="$CONFIG_HEADERS windows/xsb_debug.h:def_debug.in" ;;
+@@ -9042,7 +9051,7 @@ do
+     "windows64/banner.msg") CONFIG_FILES="$CONFIG_FILES windows64/banner.msg:windows64/banner.in" ;;
+     "windows/MSVC_mkfile.mak") CONFIG_FILES="$CONFIG_FILES windows/MSVC_mkfile.mak:windows/MSVC_mkfile.in" ;;
+     "windows64/MSVC_mkfile.mak") CONFIG_FILES="$CONFIG_FILES windows64/MSVC_mkfile.mak:windows64/MSVC_mkfile.in" ;;
+-    "'"${prefix}/packages/xmc/xmc-gui"'") CONFIG_FILES="$CONFIG_FILES '"${prefix}/packages/xmc/xmc-gui"':xmc-gui.in" ;;
++    "'"${topdir}/packages/xmc/xmc-gui"'") CONFIG_FILES="$CONFIG_FILES '"${topdir}/packages/xmc/xmc-gui"':xmc-gui.in" ;;
+ 
+   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+   esac
diff --git a/xsb/patches/patch-version.sh b/xsb/patches/patch-version.sh
new file mode 100644
index 0000000000..96833e36f0
--- /dev/null
+++ b/xsb/patches/patch-version.sh
@@ -0,0 +1,11 @@
+$NetBSD$
+
+Seems a typo to prefix #! with s
+
+--- version.sh.orig	2022-05-12 21:57:20.000000000 +0000
++++ version.sh
+@@ -1,3 +1,3 @@
+-s#! /bin/sh
++#! /bin/sh
+ 
+ # Do not touch xsb_patch_date! It should be updated by SVN (does not currently)


Home | Main Index | Thread Index | Old Index