public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/cxprolog/, dev-lang/cxprolog/files/
@ 2020-07-19  9:47 Keri Harris
  0 siblings, 0 replies; 3+ messages in thread
From: Keri Harris @ 2020-07-19  9:47 UTC (permalink / raw
  To: gentoo-commits

commit:     bbe7289e65c8a40bbaf449083cf77087a3e72e63
Author:     Keri Harris <keri <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 19 09:45:59 2020 +0000
Commit:     Keri Harris <keri <AT> gentoo <DOT> org>
CommitDate: Sun Jul 19 09:46:27 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbe7289e

dev-lang/cxprolog: initial ebuild

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Keri Harris <keri <AT> gentoo.org>

 dev-lang/cxprolog/Manifest                         |   1 +
 dev-lang/cxprolog/cxprolog-0.98.2.ebuild           | 119 +++++++++++++++++++++
 dev-lang/cxprolog/files/build.xml                  |  49 +++++++++
 .../cxprolog/files/cxprolog-0.98.2-portage.patch   |  52 +++++++++
 .../cxprolog/files/cxprolog-0.98.2-test-io.patch   |  20 ++++
 dev-lang/cxprolog/metadata.xml                     |   8 ++
 6 files changed, 249 insertions(+)

diff --git a/dev-lang/cxprolog/Manifest b/dev-lang/cxprolog/Manifest
new file mode 100644
index 00000000000..22b1f5ee490
--- /dev/null
+++ b/dev-lang/cxprolog/Manifest
@@ -0,0 +1 @@
+DIST cxprolog-0.98.2.src.tgz 548222 BLAKE2B e1e834384ff161efde961e7a319d9987cb368ed561fa613a4dd2ede353a099de9146de68dedab3d5e74bb5421c880f743b669eb43eb0b265112dbf938820b0ad SHA512 7e16ce238201da2520da3575311a8c56c9fc3926b290ef505e74ca208af9e6a070d4137ae21e708e1d6c9b83e44566ecd818d51a90f033c983c589b65bcbf2b1

diff --git a/dev-lang/cxprolog/cxprolog-0.98.2.ebuild b/dev-lang/cxprolog/cxprolog-0.98.2.ebuild
new file mode 100644
index 00000000000..b4cf9c3904e
--- /dev/null
+++ b/dev-lang/cxprolog/cxprolog-0.98.2.ebuild
@@ -0,0 +1,119 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+WX_GTK_VER="3.0"
+VIRTUALX_REQUIRED="manual"
+
+inherit flag-o-matic java-pkg-opt-2 java-ant-2 toolchain-funcs virtualx wxwidgets
+
+DESCRIPTION="A WAM based Prolog system"
+HOMEPAGE="http://ctp.di.fct.unl.pt/~amd/cxprolog"
+SRC_URI="http://ctp.di.fct.unl.pt/~amd/cxprolog/cxunix/${P}.src.tgz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples java +readline test wxwidgets"
+RESTRICT="!test? ( test )"
+
+RDEPEND="readline? ( sys-libs/readline:= )
+	java? ( >=virtual/jdk-1.8:= )
+	wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X] )"
+
+DEPEND="${RDEPEND}
+	test? (
+		java? ( ${VIRTUALX_DEPEND} )
+		wxwidgets? ( ${VIRTUALX_DEPEND} )
+	)"
+
+S="${WORKDIR}"/${P}
+
+src_prepare() {
+	eapply "${FILESDIR}"/${P}-portage.patch
+	eapply "${FILESDIR}"/${P}-test-io.patch
+	eapply_user
+
+	sed -i -e "s|lib/cxprolog|$(get_libdir)/cxprolog|" "${S}"/src/FileSys.c || die
+	cp "${FILESDIR}"/build.xml "${S}"/build.xml || die
+	rm -f "${S}"/pl/test_file_io_1.txt
+
+	use wxwidgets && setup-wxwidgets
+}
+
+src_compile() {
+	local CXPROLOG_EXT_LIBS
+
+	if use readline; then
+		append-cflags "-DUSE_READLINE"
+		CXPROLOG_EXT_LIBS="$CXPROLOG_EXT_LIBS -lreadline"
+	fi
+
+	if use java; then
+		local java_arch
+		use x86 && java_arch=i386
+		use amd64 && java_arch=amd64
+		CXPROLOG_JVM="${JAVA_HOME}/jre/lib/${java_arch}/server"
+		append-cflags "-DUSE_JAVA $(java-pkg_get-jni-cflags) -Wl,-rpath,${CXPROLOG_JVM}"
+		CXPROLOG_EXT_LIBS="$CXPROLOG_EXT_LIBS -L${CXPROLOG_JVM} -ljvm -Wl,-rpath,${CXPROLOG_JVM}"
+	fi
+
+	if use wxwidgets; then
+		append-cflags "-DUSE_WXWIDGETS $(${WX_CONFIG} --cflags)"
+		CXPROLOG_EXT_LIBS="$CXPROLOG_EXT_LIBS $(${WX_CONFIG} --libs)"
+	fi
+
+	emake lib \
+		PREFIX=/usr \
+		TMP_DIR="${S}/tmp" \
+		CC=$(tc-getCC) \
+		CPP=$(tc-getCXX) \
+		LD=$(tc-getLD) \
+		CFLAGS="-g -Wall ${CFLAGS}" \
+		EXT_LIBS="${CXPROLOG_EXT_LIBS}"
+
+	if use java; then
+		JAVA_SRC_DIR="${S}/lib/cxprolog/java"
+		eant jar
+	fi
+}
+
+cxprolog_src_test() {
+	cd "${S}"/pl
+
+	LD_LIBRARY_PATH="${S}" \
+	PREFIX="${S}" \
+		"${S}"/cxprolog_shared \
+		--script "${S}"/pl/test_all.pl \
+		| tee "${S}"/cxprolog_test.log
+}
+
+src_test() {
+	virtx cxprolog_src_test
+
+	grep -q "ALL THE TESTS PASSED" "${S}"/cxprolog_test.log \
+		|| die "cxprolog unit tests failed"
+}
+
+src_install() {
+	newbin cxprolog_shared cxprolog
+	dolib.so libcxprolog.so
+
+	insinto /usr/$(get_libdir)/cxprolog
+	doins lib/cxprolog/lib.pl
+
+	insinto /usr/share/${PN}/pl
+	doins pl/*.{pl,txt}
+
+	if use java; then
+		insinto /usr/$(get_libdir)/cxprolog/java
+		doins dist/prolog.jar
+	fi
+
+	dodoc ChangeLog.txt MANUAL.txt README.txt
+
+	if use examples; then
+		dodoc -r examples
+	fi
+}

diff --git a/dev-lang/cxprolog/files/build.xml b/dev-lang/cxprolog/files/build.xml
new file mode 100644
index 00000000000..3d4d4fba16e
--- /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 00000000000..ed9fb3864c6
--- /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 00000000000..d9f7be7b0cf
--- /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),

diff --git a/dev-lang/cxprolog/metadata.xml b/dev-lang/cxprolog/metadata.xml
new file mode 100644
index 00000000000..96eff3ea40c
--- /dev/null
+++ b/dev-lang/cxprolog/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+	<email>prolog@gentoo.org</email>
+	<name>Prolog</name>
+</maintainer>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/cxprolog/, dev-lang/cxprolog/files/
@ 2020-07-22  7:13 Keri Harris
  0 siblings, 0 replies; 3+ messages in thread
From: Keri Harris @ 2020-07-22  7:13 UTC (permalink / raw
  To: gentoo-commits

commit:     785fbb939cba2dc8194e43b39c032949623a8d1f
Author:     Keri Harris <keri <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 22 07:07:44 2020 +0000
Commit:     Keri Harris <keri <AT> gentoo <DOT> org>
CommitDate: Wed Jul 22 07:12:55 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=785fbb93

dev-lang/cxprolog: respect LDFLAGS

Package-Manager: Portage-2.3.103, Repoman-2.3.22
Signed-off-by: Keri Harris <keri <AT> gentoo.org>

 dev-lang/cxprolog/cxprolog-0.98.2.ebuild           | 30 ++++++---
 .../cxprolog/files/cxprolog-0.98.2-portage.patch   | 77 +++++++++++++++++++---
 2 files changed, 87 insertions(+), 20 deletions(-)

diff --git a/dev-lang/cxprolog/cxprolog-0.98.2.ebuild b/dev-lang/cxprolog/cxprolog-0.98.2.ebuild
index ca85e4badad..d1b773c84e5 100644
--- a/dev-lang/cxprolog/cxprolog-0.98.2.ebuild
+++ b/dev-lang/cxprolog/cxprolog-0.98.2.ebuild
@@ -44,25 +44,31 @@ src_prepare() {
 }
 
 src_compile() {
-	local CXPROLOG_EXT_LIBS
+	local CX_EXT_DEFINES
+	local CX_EXT_CFLAGS
+	local CX_EXT_LDFLAGS
+	local CX_EXT_LIBS
 
 	if use readline; then
-		append-cflags "-DUSE_READLINE"
-		CXPROLOG_EXT_LIBS="$CXPROLOG_EXT_LIBS -lreadline"
+		CX_EXT_DEFINES="$CX_EXT_DEFINES -DUSE_READLINE"
+		CX_EXT_LIBS="$CX_EXT_LIBS -lreadline"
 	fi
 
 	if use java; then
 		local java_arch
 		use x86 && java_arch=i386
 		use amd64 && java_arch=amd64
-		CXPROLOG_JVM="${JAVA_HOME}/jre/lib/${java_arch}/server"
-		append-cflags "-DUSE_JAVA $(java-pkg_get-jni-cflags) -Wl,-rpath,${CXPROLOG_JVM}"
-		CXPROLOG_EXT_LIBS="$CXPROLOG_EXT_LIBS -L${CXPROLOG_JVM} -ljvm -Wl,-rpath,${CXPROLOG_JVM}"
+		CX_JVM="${JAVA_HOME}/jre/lib/${java_arch}/server"
+		CX_EXT_DEFINES="$CX_EXT_DEFINES -DUSE_JAVA"
+		CX_EXT_CFLAGS="$CX_EXT_CFLAGS $(java-pkg_get-jni-cflags)"
+		CX_EXT_LDFLAGS="$CX_EXT_LDFLAGS -Wl,-rpath,${CX_JVM}"
+		CX_EXT_LIBS="$CX_EXT_LIBS -L${CX_JVM} -ljvm"
 	fi
 
 	if use wxwidgets; then
-		append-cflags "-DUSE_WXWIDGETS $(${WX_CONFIG} --cflags)"
-		CXPROLOG_EXT_LIBS="$CXPROLOG_EXT_LIBS $(${WX_CONFIG} --libs)"
+		CX_EXT_DEFINES="$CX_EXT_DEFINES -DUSE_WXWIDGETS"
+		CX_EXT_CFLAGS="$CX_EXT_CFLAGS $(${WX_CONFIG} --cflags)"
+		CX_EXT_LIBS="$CX_EXT_LIBS $(${WX_CONFIG} --libs)"
 	fi
 
 	emake lib \
@@ -71,8 +77,12 @@ src_compile() {
 		CC=$(tc-getCC) \
 		CPP=$(tc-getCXX) \
 		LD=$(tc-getLD) \
-		CFLAGS="-g -Wall ${CFLAGS}" \
-		EXT_LIBS="${CXPROLOG_EXT_LIBS}"
+		CFLAGS="${CFLAGS}" \
+		LDFLAGS="${LDFLAGS}" \
+		EXT_DEFINES="${CX_EXT_DEFINES}" \
+		EXT_CFLAGS="-Wall ${CX_EXT_CFLAGS}" \
+		EXT_LDFLAGS="${CX_EXT_LDFLAGS}" \
+		EXT_LIBS="${CX_EXT_LIBS}"
 
 	if use java; then
 		JAVA_SRC_DIR="${S}/lib/cxprolog/java"

diff --git a/dev-lang/cxprolog/files/cxprolog-0.98.2-portage.patch b/dev-lang/cxprolog/files/cxprolog-0.98.2-portage.patch
index ed9fb3864c6..32e22a0eb62 100644
--- a/dev-lang/cxprolog/files/cxprolog-0.98.2-portage.patch
+++ b/dev-lang/cxprolog/files/cxprolog-0.98.2-portage.patch
@@ -1,5 +1,5 @@
 --- 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
++++ cxprolog-0.98.2/Makefile	2020-07-22 09:01:24.785919309 +0200
 @@ -20,9 +20,9 @@
      ######################################################################
  
@@ -12,7 +12,41 @@
  #
  # Nothing more is required.
  # This functionality is active by default.
-@@ -165,8 +165,7 @@
+@@ -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 :=
  
@@ -22,31 +56,54 @@
    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 @@
+@@ -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
-+	$(CC) -DTESTLIB=1 -o src/TestLib.o -c src/TestLib.c
- 	$(CPP) -enable-auto-import -o cxprolog_testlib src/TestLib.o -L./ -lcxprolog
+-	$(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
  	
-@@ -337,14 +336,14 @@
+ 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) -shared -Wl,-soname,libcxprolog.so -o libcxprolog.so $(filter-out src/obj/CxProlog.o,$(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) $(ZDEFINES) -o cxprolog_shared src/obj/CxProlog.o -L./ -lcxprolog $(ZLIBS)
++	$(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) $(ZDEFINES) -DTESTLIB=1 -o src/TestLib.o -c src/TestLib.c
-+	$(CPP) $(ZDEFINES) -o cxprolog_testlib src/TestLib.o -L./ -lcxprolog $(ZLIBS)
++	$(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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/cxprolog/, dev-lang/cxprolog/files/
@ 2022-05-21  8:12 Keri Harris
  0 siblings, 0 replies; 3+ messages in thread
From: Keri Harris @ 2022-05-21  8:12 UTC (permalink / raw
  To: gentoo-commits

commit:     c3698637e23ca9396bf1e924be07692701735411
Author:     Keri Harris <keri <AT> gentoo <DOT> org>
AuthorDate: Sat May 21 08:12:23 2022 +0000
Commit:     Keri Harris <keri <AT> gentoo <DOT> org>
CommitDate: Sat May 21 08:12:39 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3698637

dev-lang/cxprolog: printf fixes for MUSL

Closes: https://bugs.gentoo.org/834101
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Keri Harris <keri <AT> gentoo.org>

 dev-lang/cxprolog/cxprolog-0.98.2.ebuild                  |  1 +
 dev-lang/cxprolog/files/cxprolog-0.98.2-printf-musl.patch | 14 ++++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/dev-lang/cxprolog/cxprolog-0.98.2.ebuild b/dev-lang/cxprolog/cxprolog-0.98.2.ebuild
index 24deb0a98e0e..494d1b7aef2b 100644
--- a/dev-lang/cxprolog/cxprolog-0.98.2.ebuild
+++ b/dev-lang/cxprolog/cxprolog-0.98.2.ebuild
@@ -32,6 +32,7 @@ S="${WORKDIR}"/${P}
 
 src_prepare() {
 	eapply "${FILESDIR}"/${P}-portage.patch
+	eapply "${FILESDIR}"/${P}/printf-musl.patch
 	eapply "${FILESDIR}"/${P}-test-io.patch
 	eapply_user
 

diff --git a/dev-lang/cxprolog/files/cxprolog-0.98.2-printf-musl.patch b/dev-lang/cxprolog/files/cxprolog-0.98.2-printf-musl.patch
new file mode 100644
index 000000000000..f55595461a80
--- /dev/null
+++ b/dev-lang/cxprolog/files/cxprolog-0.98.2-printf-musl.patch
@@ -0,0 +1,14 @@
+--- cxprolog-0.98.2.orig/src/Number.c	2016-01-23 22:07:48.000000000 +0100
++++ cxprolog-0.98.2/src/Number.c	2022-05-21 10:03:54.275367970 +0200
+@@ -282,9 +282,9 @@
+ {
+ #if HAS_LONG_DOUBLE_OPS
+ 	if( precision > 0 )
+-		return GStrFormat("%%.%dllg", precision) ;
++		return GStrFormat("%%.%dLg", precision) ;
+ 	else
+-		return GStrFormat("%%.%dllf", -precision) ;
++		return GStrFormat("%%.%dLf", -precision) ;
+ #else
+ 	if( precision > 0 )
+ 		return GStrFormat("%%.%dlg", precision) ;


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-21  8:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-19  9:47 [gentoo-commits] repo/gentoo:master commit in: dev-lang/cxprolog/, dev-lang/cxprolog/files/ Keri Harris
  -- strict thread matches above, loose matches on Subject: below --
2020-07-22  7:13 Keri Harris
2022-05-21  8:12 Keri Harris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox