summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeri Harris <keri@gentoo.org>2020-07-19 11:45:59 +0200
committerKeri Harris <keri@gentoo.org>2020-07-19 11:46:27 +0200
commitbbe7289e65c8a40bbaf449083cf77087a3e72e63 (patch)
tree6003111de4503c2bb489d5a12955455388239264 /dev-lang/cxprolog/files
parentwww-servers/puma: backport CVE-2020-11077 fixes (diff)
downloadgentoo-bbe7289e65c8a40bbaf449083cf77087a3e72e63.tar.gz
gentoo-bbe7289e65c8a40bbaf449083cf77087a3e72e63.tar.bz2
gentoo-bbe7289e65c8a40bbaf449083cf77087a3e72e63.zip
dev-lang/cxprolog: initial ebuild
Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Keri Harris <keri@gentoo.org>
Diffstat (limited to 'dev-lang/cxprolog/files')
-rw-r--r--dev-lang/cxprolog/files/build.xml49
-rw-r--r--dev-lang/cxprolog/files/cxprolog-0.98.2-portage.patch52
-rw-r--r--dev-lang/cxprolog/files/cxprolog-0.98.2-test-io.patch20
3 files changed, 121 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/cxprolog-0.98.2-portage.patch b/dev-lang/cxprolog/files/cxprolog-0.98.2-portage.patch
new file mode 100644
index 000000000000..ed9fb3864c69
--- /dev/null
+++ b/dev-lang/cxprolog/files/cxprolog-0.98.2-portage.patch
@@ -0,0 +1,52 @@
+--- cxprolog-0.98.2.orig/Makefile 2016-09-17 20:33:35.000000000 +0200
++++ cxprolog-0.98.2/Makefile 2020-07-18 18:18:02.605499273 +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.
+@@ -165,8 +165,7 @@
+ 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
+@@ -329,7 +328,7 @@
+ endif
+
+ cxprolog_testlib.exe: libcxprolog.a cxprolog.dll
+- gcc -DTESTLIB=1 -o src/TestLib.o -c src/TestLib.c
++ $(CC) -DTESTLIB=1 -o src/TestLib.o -c src/TestLib.c
+ $(CPP) -enable-auto-import -o cxprolog_testlib src/TestLib.o -L./ -lcxprolog
+ rm src/TestLib.o
+
+@@ -337,14 +336,14 @@
+
+ else # Assume Unix
+ libcxprolog.so: $(OBJ_DIR) $(OBJS)
+- $(CPP) -shared -o libcxprolog.so $(OBJS) -lc $(ZLIBS)
++ $(CPP) -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) $(ZDEFINES) -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) $(ZDEFINES) -DTESTLIB=1 -o src/TestLib.o -c src/TestLib.c
++ $(CPP) $(ZDEFINES) -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),