diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
commit | 3cf7c3ef441822c889356fd1812ebf2944a59851 (patch) | |
tree | c513fe68548b40365c1c2ebfe35c58ad431cdd77 /dev-lang/cxprolog/files | |
parent | 05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff) |
gentoo resync : 25.08.2020
Diffstat (limited to 'dev-lang/cxprolog/files')
-rw-r--r-- | dev-lang/cxprolog/files/build.xml | 49 | ||||
-rw-r--r-- | dev-lang/cxprolog/files/cx_dev_boot.pl | 9 | ||||
-rw-r--r-- | dev-lang/cxprolog/files/cxprolog-0.98.2-portage.patch | 109 | ||||
-rw-r--r-- | dev-lang/cxprolog/files/cxprolog-0.98.2-test-io.patch | 20 |
4 files changed, 187 insertions, 0 deletions
diff --git a/dev-lang/cxprolog/files/build.xml b/dev-lang/cxprolog/files/build.xml new file mode 100644 index 000000000000..3d4d4fba16e1 --- /dev/null +++ b/dev-lang/cxprolog/files/build.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" ?><project default="jar" name="cxprolog"> + + <!-- some properties --> + <property name="src.dir" value="lib/cxprolog/java/prolog"/> + <property name="build.dir" value="build"/> + <property name="dist.dir" value="dist"/> + <property file="build.properties"/> + + <path id="compile.classpath"> + <pathelement path="${gentoo.classpath}"/> + </path> + + <!-- init --> + <target name="init"> + <tstamp/> + <mkdir dir="${dist.dir}"/> + <mkdir dir="${build.dir}"/> + </target> + + <!-- compile everything --> + <target depends="init" name="compile"> + <javac deprecation="off" + destdir="${build.dir}" + encoding="ISO-8859-1" + srcdir="${src.dir}" + source="1.8" + target="1.8"> + <classpath> + <path refid="compile.classpath"/> + </classpath> + </javac> + <copy todir="${build.dir}"> + <fileset dir="${src.dir}"> + <exclude name="**/*.java"/> + </fileset> + </copy> + </target> + + <!-- build the jar file --> + <target depends="compile" name="jar"> + <jar basedir="${build.dir}" jarfile="${dist.dir}/prolog.jar"/> + </target> + + <!-- clean up --> + <target name="clean"> + <delete dir="${build.dir}"/> + <delete dir="${dist.dir}"/> + </target> +</project> diff --git a/dev-lang/cxprolog/files/cx_dev_boot.pl b/dev-lang/cxprolog/files/cx_dev_boot.pl new file mode 100644 index 000000000000..2794cabe34b0 --- /dev/null +++ b/dev-lang/cxprolog/files/cx_dev_boot.pl @@ -0,0 +1,9 @@ +'$cxprolog_initialise' :- + version, + fs_cwd(CWD), + fs_set_prefix_dir(CWD), + '$env_context' := [main]. + + +'$cxprolog_top_level_goal' :- + true. diff --git a/dev-lang/cxprolog/files/cxprolog-0.98.2-portage.patch b/dev-lang/cxprolog/files/cxprolog-0.98.2-portage.patch new file mode 100644 index 000000000000..32e22a0eb620 --- /dev/null +++ b/dev-lang/cxprolog/files/cxprolog-0.98.2-portage.patch @@ -0,0 +1,109 @@ +--- cxprolog-0.98.2.orig/Makefile 2016-09-17 20:33:35.000000000 +0200 ++++ cxprolog-0.98.2/Makefile 2020-07-22 09:01:24.785919309 +0200 +@@ -20,9 +20,9 @@ + ###################################################################### + + ############################################################################## +-# To disable READLINE SUPPORT, uncomment the following line: ++# For READLINE SUPPORT, uncomment the following line: + # +-# READLINE := n ++# READLINE := y + # + # Nothing more is required. + # This functionality is active by default. +@@ -83,6 +83,7 @@ + EXT_OBJ_DIR := src/ext + EXT_CFLAGS := + EXT_DEFINES := ++EXT_LDFLAGS := + EXT_LIBS := + EXT_NAMES := + +@@ -91,6 +92,7 @@ + # EXT_OBJ_DIR := src/obj/ext + # EXT_CFLAGS := -I/usr/include + # EXT_DEFINES := -DUSE_X=2 -DCOMPASS=1 ++# EXT_LDFLAGS := -Wl,--as-needed + # EXT_LIBS := -L/usr/lib -lcrypt + # EXT_NAMES := ext/file1 ext/file2 + ############################################################################## +@@ -121,6 +123,7 @@ + CFLAGS := -Wall -Wextra -O1 + ONLYCFLAGS := # -Wmissing-prototypes + DEFINES := ++LDFLAGS := + LIBS := -lm + OBJ_DIR := src/obj + TMP_DIR := /var/tmp/$(APP) +@@ -157,16 +160,16 @@ + + ifeq ($(VERBOSE),y) + CFLAGS := -v $(CFLAGS) +- LIBS := -v $(LIBS) ++ LDFLAGS := -v $(LDFLAGS) + endif + + ZFLAGS := $(DEBUG) $(EXT_CFLAGS) + ZDEFINES := $(EXTRA) $(ZPREFIX) -DOS=$(OS) $(DEFINES) $(EXT_DEFINES) ++ZLDFLAGS := $(DEBUG) $(LDFLAGS) $(EXT_LDFLAGS) + ZLIBS := $(EXTRA) $(LIBS) $(EXT_LIBS) + ZPRE := + +-ifeq ($(READLINE),n) +-else ++ifeq ($(READLINE),y) + ifneq ($(OS),MINGW32) + ifeq ($(shell if test -e "/usr/local/opt/readline"; then echo "y" ; fi),y) + ZDEFINES += -DUSE_READLINE=4 -I/usr/local/opt/readline/include +@@ -294,7 +297,7 @@ + ############################################################################## + + $(APP): $(OBJS) +- $(CPP) -o $(TMP_DIR)/$(APP) $(OBJS) $(ZLIBS) ++ $(CPP) $(ZLDFLAGS) -o $(TMP_DIR)/$(APP) $(OBJS) $(ZLIBS) + ln -sf $(TMP_DIR)/$(APP) $(APP) + @$(ZPOST) + +@@ -319,32 +322,32 @@ + + ifeq ($(OS),MINGW32) + libcxprolog.a cxprolog.dll: $(OBJ_DIR) $(OBJS) +- $(CPP) -shared -o cxprolog.dll $(OBJS) -Wl,--out-implib,libcxprolog.a $(ZLIBS) ++ $(CPP) $(ZLDFLAGS) -shared -o cxprolog.dll $(OBJS) -Wl,--out-implib,libcxprolog.a $(ZLIBS) + + cxprolog_shared.exe: libcxprolog.a cxprolog.dll + ifeq ($(WXWIDGETS),y) +- $(CPP) -o cxprolog_shared.exe -lmingw32 -L./ -lcxprolog ++ $(CPP) $(ZLDFLAGS) -o cxprolog_shared.exe -lmingw32 -L./ -lcxprolog + else +- $(CPP) -o cxprolog_shared.exe -L./ -lcxprolog ++ $(CPP) $(ZLDFLAGS) -o cxprolog_shared.exe -L./ -lcxprolog + endif + + cxprolog_testlib.exe: libcxprolog.a cxprolog.dll +- gcc -DTESTLIB=1 -o src/TestLib.o -c src/TestLib.c +- $(CPP) -enable-auto-import -o cxprolog_testlib src/TestLib.o -L./ -lcxprolog ++ $(CC) $(ZFLAGS) -DTESTLIB=1 -o src/TestLib.o -c src/TestLib.c ++ $(CPP) $(ZLDFLAGS) -enable-auto-import -o cxprolog_testlib src/TestLib.o -L./ -lcxprolog + rm src/TestLib.o + + lib: libcxprolog.a cxprolog_shared.exe cxprolog_testlib.exe + + else # Assume Unix + libcxprolog.so: $(OBJ_DIR) $(OBJS) +- $(CPP) -shared -o libcxprolog.so $(OBJS) -lc $(ZLIBS) ++ $(CPP) $(ZLDFLAGS) -shared -Wl,-soname,libcxprolog.so -o libcxprolog.so $(filter-out src/obj/CxProlog.o,$(OBJS)) -lc $(ZLIBS) + + cxprolog_shared: libcxprolog.so +- $(CPP) $(ZDEFINES) -o cxprolog_shared -L./ -lcxprolog ++ $(CPP) $(ZLDFLAGS) -o cxprolog_shared src/obj/CxProlog.o -L./ -lcxprolog $(ZLIBS) + + cxprolog_testlib: libcxprolog.so +- gcc $(ZDEFINES) -DTESTLIB=1 -o src/TestLib.o -c src/TestLib.c +- $(CPP) $(ZDEFINES) -o cxprolog_testlib src/TestLib.o -L./ -lcxprolog ++ $(CC) $(ZFLAGS) $(ZDEFINES) -DTESTLIB=1 -o src/TestLib.o -c src/TestLib.c ++ $(CPP) $(ZLDFLAGS) -o cxprolog_testlib src/TestLib.o -L./ -lcxprolog $(ZLIBS) + rm src/TestLib.o + + lib: libcxprolog.so cxprolog_shared cxprolog_testlib diff --git a/dev-lang/cxprolog/files/cxprolog-0.98.2-test-io.patch b/dev-lang/cxprolog/files/cxprolog-0.98.2-test-io.patch new file mode 100644 index 000000000000..d9f7be7b0cf5 --- /dev/null +++ b/dev-lang/cxprolog/files/cxprolog-0.98.2-test-io.patch @@ -0,0 +1,20 @@ +--- cxprolog-0.98.2.orig/pl/test_io.pl 2016-01-23 22:07:48.000000000 +0100 ++++ cxprolog-0.98.2/pl/test_io.pl 2020-07-18 21:26:20.911026745 +0200 +@@ -17,7 +17,7 @@ + concat([X,'.\n'],T). + + test_file_io(L,Encoding) :- +- FileName = 'test_file_io_1.txt', ++ FileName = '/tmp/test_file_io_1.txt', + open(FileName,write,S1,[encoding(Encoding),bom(true)]), + name(T,L), + write(S1,T), +@@ -25,7 +25,7 @@ + open(FileName,read,S2), % relies on bom + read(S2,X), + close(S2), +- %fs_delete(FileName), ++ fs_delete(FileName), + concat([X,'.\n'],T). + + :- current_prolog_flag(encoding,Curr), |