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

commit:     65393f623e12c9c9114567bde5de298d5c82eee9
Author:     Keri Harris <keri <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 19 15:42:41 2017 +0000
Commit:     Keri Harris <keri <AT> gentoo <DOT> org>
CommitDate: Wed Jul 19 15:42:41 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65393f62

dev-lang/gprolog: apply upstream patch for PIC-aware GPLC. Closes #403693

Package-Manager: Portage-2.3.0, Repoman-2.3.1

 dev-lang/gprolog/files/gprolog-pic-code.patch | 12 ++++++++++++
 dev-lang/gprolog/gprolog-1.4.4.ebuild         |  6 +-----
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/dev-lang/gprolog/files/gprolog-pic-code.patch b/dev-lang/gprolog/files/gprolog-pic-code.patch
new file mode 100644
index 00000000000..a85aea0746e
--- /dev/null
+++ b/dev-lang/gprolog/files/gprolog-pic-code.patch
@@ -0,0 +1,12 @@
+diff -ur gprolog-1.4.4.orig/src/Ma2Asm/x86_64_any.c gprolog-1.4.4/src/Ma2Asm/x86_64_any.c
+--- gprolog-1.4.4.orig/src/Ma2Asm/x86_64_any.c	2013-04-22 13:52:16.000000000 +0200
++++ gprolog-1.4.4/src/Ma2Asm/x86_64_any.c	2017-07-19 17:27:37.057124771 +0200
+@@ -204,7 +204,7 @@
+   strcpy(asm_reg_cp, Off_Reg_Bank(MAP_OFFSET_CP));
+ #endif
+ 
+-#ifdef M_x86_64_darwin
++#if defined(M_x86_64_darwin) || defined(M_x86_64_linux)
+   pic_code = 1;			/* NB: on darwin everything is PIC code */
+ #elif defined(_WIN32)
+   pic_code = 0;			/* NB: on MinGW nothing is needed for PIC code */

diff --git a/dev-lang/gprolog/gprolog-1.4.4.ebuild b/dev-lang/gprolog/gprolog-1.4.4.ebuild
index 7116f2c8c4d..4d915c78666 100644
--- a/dev-lang/gprolog/gprolog-1.4.4.ebuild
+++ b/dev-lang/gprolog/gprolog-1.4.4.ebuild
@@ -20,6 +20,7 @@ RDEPEND=""
 
 src_prepare() {
 	epatch "${FILESDIR}"/${P}-ldflags.patch
+	epatch "${FILESDIR}"/${P}-pic-code.patch
 	epatch "${FILESDIR}"/${P}-links.patch
 	epatch "${FILESDIR}"/${P}-nodocs.patch
 	epatch "${FILESDIR}"/${P}-txt-file.patch
@@ -31,11 +32,6 @@ src_configure() {
 	append-flags -fno-strict-aliasing
 	use debug && append-flags -DDEBUG
 
-	if gcc-specs-pie ; then
-		# gplc generates its own native ASM; disable PIE
-		append-ldflags -nopie
-	fi
-
 	cd "${S}"/src
 	econf \
 		CFLAGS_MACHINE="${CFLAGS_MACHINE}" \


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

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/gprolog/files/, dev-lang/gprolog/
@ 2021-06-27 10:32 Keri Harris
  0 siblings, 0 replies; 3+ messages in thread
From: Keri Harris @ 2021-06-27 10:32 UTC (permalink / raw
  To: gentoo-commits

commit:     918deb652c7cb034028f941af502ef6b8334b380
Author:     Keri Harris <keri <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 27 10:31:50 2021 +0000
Commit:     Keri Harris <keri <AT> gentoo <DOT> org>
CommitDate: Sun Jun 27 10:32:23 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=918deb65

dev-lang/gprolog: use clang as assembler for LLVM toolchains

Closes http://bugs.gentoo.org/737072

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

 dev-lang/gprolog/files/gprolog-1.4.5-llvm-as.patch | 38 ++++++++++++++++++++++
 dev-lang/gprolog/gprolog-1.4.5.ebuild              | 10 +++++-
 2 files changed, 47 insertions(+), 1 deletion(-)

diff --git a/dev-lang/gprolog/files/gprolog-1.4.5-llvm-as.patch b/dev-lang/gprolog/files/gprolog-1.4.5-llvm-as.patch
new file mode 100644
index 00000000000..6adc8feb272
--- /dev/null
+++ b/dev-lang/gprolog/files/gprolog-1.4.5-llvm-as.patch
@@ -0,0 +1,38 @@
+--- gprolog-1.4.5.orig/src/configure.in	2018-07-14 08:19:12.000000000 -0000
++++ gprolog-1.4.5/src/configure.in	2021-06-27 10:13:31.004977355 -0000
+@@ -334,15 +334,26 @@
+ dnl we use AS0 instead of AS else AC_CHECK_TOOL does not work 
+ dnl (instead of testing a prefix like x86_64-w64-mingw32- it will
+ dnl think the user wants to override the test)
+-    AS0=as
+-    case "$host" in
+-        sparc64*bsd*)    ASFLAGS='-Av9a -64 -K PIC';;
+-        i*86*darwin1*)   ASFLAGS='-arch i686';;
+-        i*86*linux*)     ASFLAGS='--32';;
+-        x86_64*solaris*) AS0=gas; ASFLAGS='--64';;
+-        x86_64*darwin*)  ASFLAGS='-arch x86_64';;
+-        x86_64*linux*)   ASFLAGS='--64';;
+-        *)               if test "$with_gas" = yes; then AS0=gas; fi;;
++    case "$CC" in
++        *cc)
++            AS0=as
++            case "$host" in
++                sparc64*bsd*)    ASFLAGS='-Av9a -64 -K PIC';;
++                i*86*darwin1*)   ASFLAGS='-arch i686';;
++                i*86*linux*)     ASFLAGS='--32';;
++                x86_64*solaris*) AS0=gas; ASFLAGS='--64';;
++                x86_64*darwin*)  ASFLAGS='-arch x86_64';;
++                x86_64*linux*)   ASFLAGS='--64';;
++                *)               if test "$with_gas" = yes; then AS0=gas; fi;;
++            esac
++            ;;
++        *clang)
++            AS0=$CC
++            ASFLAGS='-c'
++            ;;
++        *)
++            AC_MSG_ERROR([unsupported compiler $CC])
++            ;;
+     esac
+     AC_CHECK_TOOL([AS],[$AS0])
+     AC_PROG_RANLIB

diff --git a/dev-lang/gprolog/gprolog-1.4.5.ebuild b/dev-lang/gprolog/gprolog-1.4.5.ebuild
index 5892e1fbf17..46ecd24130e 100644
--- a/dev-lang/gprolog/gprolog-1.4.5.ebuild
+++ b/dev-lang/gprolog/gprolog-1.4.5.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=6
 
-inherit flag-o-matic toolchain-funcs
+inherit autotools flag-o-matic toolchain-funcs
 
 DESCRIPTION="A native Prolog compiler with constraint solving over finite domains (FD)"
 HOMEPAGE="http://www.gprolog.org/"
@@ -21,8 +21,16 @@ PATCHES=(
 	"${FILESDIR}"/${P}-nodocs.patch
 	"${FILESDIR}"/${P}-txt-file.patch
 	"${FILESDIR}"/${P}-check-boot.patch
+	"${FILESDIR}"/${P}-llvm-as.patch
 )
 
+src_prepare() {
+	default
+
+	cd "${S}"/src
+	eautoconf
+}
+
 src_configure() {
 	CFLAGS_MACHINE="`get-flag -march` `get-flag -mcpu` `get-flag -mtune`"
 


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

* [gentoo-commits] repo/gentoo:master commit in: dev-lang/gprolog/files/, dev-lang/gprolog/
@ 2021-07-10 17:17 Keri Harris
  0 siblings, 0 replies; 3+ messages in thread
From: Keri Harris @ 2021-07-10 17:17 UTC (permalink / raw
  To: gentoo-commits

commit:     6af94f32d366eabe5ebe486683fe710ab8f3235f
Author:     Keri Harris <keri <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 10 17:15:33 2021 +0000
Commit:     Keri Harris <keri <AT> gentoo <DOT> org>
CommitDate: Sat Jul 10 17:15:54 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6af94f32

dev-lang/gprolog: version bump

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

 dev-lang/gprolog/Manifest                          |   1 +
 dev-lang/gprolog/files/gprolog-1.5.0-destdir.patch |  61 ++++++++++++
 dev-lang/gprolog/files/gprolog-1.5.0-ldflags.patch | 104 +++++++++++++++++++++
 dev-lang/gprolog/files/gprolog-1.5.0-links.patch   |  15 +++
 dev-lang/gprolog/files/gprolog-1.5.0-llvm-as.patch |  38 ++++++++
 dev-lang/gprolog/gprolog-1.5.0.ebuild              |  86 +++++++++++++++++
 6 files changed, 305 insertions(+)

diff --git a/dev-lang/gprolog/Manifest b/dev-lang/gprolog/Manifest
index a0bddf84cdf..c39f0b3c5d4 100644
--- a/dev-lang/gprolog/Manifest
+++ b/dev-lang/gprolog/Manifest
@@ -1 +1,2 @@
 DIST gprolog-1.4.5.tar.gz 3587361 BLAKE2B c0c73ce249d7c26b914a3f831c6ac93aeb884bded6c5ebbe51223f0685de0be2e746533aade1633a953b93e88a30796fa52ecd5e609d05bc051363cbf34e0477 SHA512 425103bc9e5bdbdb4ae331f5be0cf49524fbdb4f5e2809fb973360de9e7ad9935c1b28f3603e0be696a647153d9f0d3dacdc87251098ac99faf7d0b3c652fc60
+DIST gprolog-1.5.0.tar.gz 3813899 BLAKE2B e1d82393f122f37b1e139732c1b954b8a407feac4973b56c2e39dcf907424acca67bd10ea0e833ebbd6764a47b075911a29e05b51c37d3751a5d5fc751a08789 SHA512 7ef1a3555ffa58d3fb0db2b55ffc1d00868021f0f9f3d63dd1f43b5b833e6e00ecc74abfc0573828a3d53f20c134dffaf7fe79ab21b3e16dccfca8c73b5dfb8d

diff --git a/dev-lang/gprolog/files/gprolog-1.5.0-destdir.patch b/dev-lang/gprolog/files/gprolog-1.5.0-destdir.patch
new file mode 100644
index 00000000000..86719e1bdcb
--- /dev/null
+++ b/dev-lang/gprolog/files/gprolog-1.5.0-destdir.patch
@@ -0,0 +1,61 @@
+--- gprolog-1.5.0.orig/src/Makefile.in	2021-07-07 16:06:16.000000000 -0000
++++ gprolog-1.5.0/src/Makefile.in	2021-07-10 12:49:40.967172260 -0000
+@@ -85,13 +85,13 @@
+ # --- Links --- #
+ 
+ install-links: install-system uninstall-links
+-	if test $(LINKS_DIR) != none; then \
++	if test @LINKS_DIR@ != none; then \
+ 	   ./mkinstalldirs $(LINKS_DIR); \
+ 	   (cd $(LINKS_DIR) ; $(LN_S) $(wildcard $(INSTALL_DIR)/bin/*) .); \
+ 	fi
+ 
+ uninstall-links:
+-	-if test $(LINKS_DIR) != none; then \
++	-if test @LINKS_DIR@ != none; then \
+ 	   (cd $(LINKS_DIR) 2>/dev/null && rm -f $(BIN_FILES)); \
+ 	   rmdir $(LINKS_DIR) 2>/dev/null; \
+ 	fi || exit 0;
+@@ -100,14 +100,14 @@
+ # --- Documentation --- #
+ 
+ install-doc:
+-	if test $(DOC_DIR) != none; then \
++	if test @DOC_DIR@ != none; then \
+ 	   ./mkinstalldirs $(DOC_DIR); \
+ 	   (F=`cd ../doc; echo $(DOC_FILES)`; \
+ 	   for i in $$F; do $(INSTALL_DATA) ../doc/$$i $(DOC_DIR); done); \
+ 	fi
+ 
+ uninstall-doc:
+-	-if test $(DOC_DIR) != none; then \
++	-if test @DOC_DIR@ != none; then \
+ 	   (cd $(DOC_DIR); rm -f $(DOC_FILES)); \
+ 	   rmdir $(DOC_DIR) 2>/dev/null; \
+ 	fi || exit 0;
+@@ -116,14 +116,14 @@
+ # --- HTML --- #
+ 
+ install-html:
+-	if test $(HTML_DIR) != none; then \
++	if test @HTML_DIR@ != none; then \
+ 	   ./mkinstalldirs $(HTML_DIR); \
+ 	   (F=`cd ../doc/html_node; echo $(HTML_FILES)`; \
+ 	   for i in $$F; do $(INSTALL_DATA) ../doc/html_node/$$i $(HTML_DIR); done); \
+ 	fi
+ 
+ uninstall-html:
+-	-if test $(HTML_DIR) != none; then \
++	-if test @HTML_DIR@ != none; then \
+ 	   (cd $(HTML_DIR); rm -f $(HTML_FILES)); \
+ 	   rmdir $(HTML_DIR) 2>/dev/null; \
+ 	fi || exit 0;
+@@ -132,7 +132,7 @@
+ # --- Examples --- #
+ 
+ install-examples:
+-	if test $(EXAMPLES_DIR) != none; then \
++	if test @EXAMPLES_DIR@ != none; then \
+ 	   ./mkinstalldirs $(EXAMPLES_DIR)/ExamplesPl; \
+ 	   (F=`cd ../examples/ExamplesPl; echo $(EXPL_FILES)`; \
+ 	   for i in $$F; do $(INSTALL_DATA) ../examples/ExamplesPl/$$i $(EXAMPLES_DIR)/ExamplesPl; done); \

diff --git a/dev-lang/gprolog/files/gprolog-1.5.0-ldflags.patch b/dev-lang/gprolog/files/gprolog-1.5.0-ldflags.patch
new file mode 100644
index 00000000000..5d53a69a657
--- /dev/null
+++ b/dev-lang/gprolog/files/gprolog-1.5.0-ldflags.patch
@@ -0,0 +1,104 @@
+diff -ur gprolog-1.5.0.orig/src/EnginePl/Makefile.in gprolog-1.5.0/src/EnginePl/Makefile.in
+--- gprolog-1.5.0.orig/src/EnginePl/Makefile.in	2021-07-10 10:13:23.046564472 -0000
++++ gprolog-1.5.0/src/EnginePl/Makefile.in	2021-07-10 10:41:59.585492681 -0000
+@@ -2,6 +2,7 @@
+ GPLC          = @GPLC@
+ CC            = @CC@ @CFLAGS_MACHINE@
+ CFLAGS        = @CFLAGS@
++LDFLAGS       = @LDFLAGS@
+ AR_RC         = @AR_RC@
+ RANLIB        = @RANLIB@
+ 
+@@ -35,7 +36,7 @@
+ config: pl_config@EXE_SUFFIX@ wam_regs.h
+ 
+ pl_config@EXE_SUFFIX@: pl_config.c gp_config.h machine.h stacks_sigsegv.h wam_archi.def
+-	$(CC) $(CFLAGS) $(LFLAGS) @CC_EXE_NAME_OPT@pl_config@EXE_SUFFIX@ pl_config.c
++	$(CC) $(CFLAGS) $(LDFLAGS) @CC_EXE_NAME_OPT@pl_config@EXE_SUFFIX@ pl_config.c
+ 
+ 
+ wam_regs.h: pl_config@EXE_SUFFIX@ machine.h stacks_sigsegv.h wam_archi.def
+@@ -49,10 +50,10 @@
+ 
+ 
+ cpp_headers@EXE_SUFFIX@: cpp_headers.c
+-	$(CC) $(CFLAGS) $(LFLAGS) @CC_EXE_NAME_OPT@cpp_headers@EXE_SUFFIX@ cpp_headers.c
++	$(CC) $(CFLAGS) $(LDFLAGS) @CC_EXE_NAME_OPT@cpp_headers@EXE_SUFFIX@ cpp_headers.c
+ 
+ try_sigaction@EXE_SUFFIX@: try_sigaction.c
+-	$(CC) $(CFLAGS) $(LFLAGS) @CC_EXE_NAME_OPT@try_sigaction@EXE_SUFFIX@ try_sigaction.c
++	$(CC) $(CFLAGS) $(LDFLAGS) @CC_EXE_NAME_OPT@try_sigaction@EXE_SUFFIX@ try_sigaction.c
+ 
+ 
+ 
+diff -ur gprolog-1.5.0.orig/src/Ma2Asm/Makefile.in gprolog-1.5.0/src/Ma2Asm/Makefile.in
+--- gprolog-1.5.0.orig/src/Ma2Asm/Makefile.in	2021-07-07 10:13:02.000000000 -0000
++++ gprolog-1.5.0/src/Ma2Asm/Makefile.in	2021-07-10 10:40:22.683496734 -0000
+@@ -1,7 +1,8 @@
+-GPLC   = @GPLC@
+-CC     = @CC@ @CFLAGS_MACHINE@
+-CFLAGS = @CFLAGS@
+-LDLIBS = @LDLIBS@
++GPLC    = @GPLC@
++CC      = @CC@ @CFLAGS_MACHINE@
++CFLAGS  = @CFLAGS@
++LDFLAGS = @LDFLAGS@
++LDLIBS  = @LDLIBS@
+ 
+ # set by mappers.sh
+ FORCE_MAP =
+@@ -25,7 +26,7 @@
+ 
+ ma2asm@EXE_SUFFIX@: ma2asm@OBJ_SUFFIX@ ma_parser@OBJ_SUFFIX@ \
+                     ma2asm_inst@OBJ_SUFFIX@ ma2asm_inst.c
+-	$(CC) $(CFLAGS) @CC_EXE_NAME_OPT@ma2asm@EXE_SUFFIX@ ma2asm@OBJ_SUFFIX@ ma2asm_inst@OBJ_SUFFIX@ ma_parser@OBJ_SUFFIX@
++	$(CC) $(LDFLAGS) @CC_EXE_NAME_OPT@ma2asm@EXE_SUFFIX@ ma2asm@OBJ_SUFFIX@ ma2asm_inst@OBJ_SUFFIX@ ma_parser@OBJ_SUFFIX@
+ 
+ 
+ clean:
+diff -ur gprolog-1.5.0.orig/src/TopComp/Makefile.in gprolog-1.5.0/src/TopComp/Makefile.in
+--- gprolog-1.5.0.orig/src/TopComp/Makefile.in	2021-07-07 10:13:02.000000000 -0000
++++ gprolog-1.5.0/src/TopComp/Makefile.in	2021-07-10 10:41:31.081493873 -0000
+@@ -4,7 +4,7 @@
+ CFLAGS          = @CFLAGS@
+ HEXGPLC         = @HEXGPLC@
+ CC              = @CC@ @CFLAGS_MACHINE@
+-CFLAGS          = @CFLAGS@
++LDFLAGS         = @LDFLAGS@
+ LDLIBS          = @LDLIBS@
+ TOP_LEVEL_LIBS  = @TOP_LEVEL_LIBS@
+ 
+@@ -24,10 +24,10 @@
+ 
+ $(GPLC)@EXE_SUFFIX@: top_comp.c copying.c ../EnginePl/wam_regs.h \
+          ../EnginePl/gp_config.h ../EnginePl/machine1.c decode_hexa.c copying.c prolog_path.c
+-	$(CC) $(CFLAGS) @CC_EXE_NAME_OPT@$(GPLC)@EXE_SUFFIX@ top_comp.c $(LDLIBS)
++	$(CC) $(CFLAGS) $(LDFLAGS) @CC_EXE_NAME_OPT@$(GPLC)@EXE_SUFFIX@ top_comp.c $(LDLIBS)
+ 
+ $(HEXGPLC)@EXE_SUFFIX@: hexfilter.c decode_hexa.c
+-	$(CC) $(CFLAGS) @CC_EXE_NAME_OPT@$(HEXGPLC)@EXE_SUFFIX@ hexfilter.c
++	$(CC) $(CFLAGS) $(LDFLAGS) @CC_EXE_NAME_OPT@$(HEXGPLC)@EXE_SUFFIX@ hexfilter.c
+ 
+ 
+ 
+diff -ur gprolog-1.5.0.orig/src/Wam2Ma/Makefile.in gprolog-1.5.0/src/Wam2Ma/Makefile.in
+--- gprolog-1.5.0.orig/src/Wam2Ma/Makefile.in	2021-05-03 13:55:34.000000000 -0000
++++ gprolog-1.5.0/src/Wam2Ma/Makefile.in	2021-07-10 10:40:30.134496422 -0000
+@@ -1,5 +1,6 @@
+-CC     = @CC@ @CFLAGS_MACHINE@
+-CFLAGS = @CFLAGS@
++CC      = @CC@ @CFLAGS_MACHINE@
++CFLAGS  = @CFLAGS@
++LDFLAGS = @LDFLAGS@
+ 
+ 
+ all: wam2ma@EXE_SUFFIX@
+@@ -12,7 +13,7 @@
+ 	$(CC) $(CFLAGS) -c wam2ma.c
+ 
+ wam2ma@EXE_SUFFIX@: wam2ma@OBJ_SUFFIX@ wam_parser@OBJ_SUFFIX@
+-	$(CC) $(CFLAGS) @CC_EXE_NAME_OPT@wam2ma@EXE_SUFFIX@ wam2ma@OBJ_SUFFIX@ wam_parser@OBJ_SUFFIX@
++	$(CC) $(LDFLAGS) @CC_EXE_NAME_OPT@wam2ma@EXE_SUFFIX@ wam2ma@OBJ_SUFFIX@ wam_parser@OBJ_SUFFIX@
+ 
+ 
+ clean:

diff --git a/dev-lang/gprolog/files/gprolog-1.5.0-links.patch b/dev-lang/gprolog/files/gprolog-1.5.0-links.patch
new file mode 100644
index 00000000000..e1f673156e4
--- /dev/null
+++ b/dev-lang/gprolog/files/gprolog-1.5.0-links.patch
@@ -0,0 +1,15 @@
+--- gprolog-1.5.0.orig/src/Makefile.in	2021-07-07 16:06:16.000000000 -0000
++++ gprolog-1.5.0/src/Makefile.in	2021-07-10 11:30:29.130370996 -0000
+@@ -84,10 +84,10 @@
+ 
+ # --- Links --- #
+ 
+-install-links: uninstall-links
++install-links: install-system uninstall-links
+ 	if test $(LINKS_DIR) != none; then \
+ 	   ./mkinstalldirs $(LINKS_DIR); \
+-	   (cd $(LINKS_DIR) ; $(LN_S) $(INSTALL_DIR)/bin/* .); \
++	   (cd $(LINKS_DIR) ; $(LN_S) $(wildcard $(INSTALL_DIR)/bin/*) .); \
+ 	fi
+ 
+ uninstall-links:

diff --git a/dev-lang/gprolog/files/gprolog-1.5.0-llvm-as.patch b/dev-lang/gprolog/files/gprolog-1.5.0-llvm-as.patch
new file mode 100644
index 00000000000..f3fa81ce13e
--- /dev/null
+++ b/dev-lang/gprolog/files/gprolog-1.5.0-llvm-as.patch
@@ -0,0 +1,38 @@
+--- gprolog-1.5.0.orig/src/configure.in	2021-07-08 09:34:44.000000000 -0000
++++ gprolog-1.5.0/src/configure.in	2021-07-10 16:25:44.397630093 -0000
+@@ -342,15 +342,26 @@
+ dnl we use AS0 instead of AS else AC_CHECK_TOOL does not work 
+ dnl (instead of testing a prefix like x86_64-w64-mingw32- it will
+ dnl think the user wants to override the test)
+-    AS0=as
+-    case "$host" in
+-        sparc64*bsd*)    ASFLAGS='-Av9a -64 -K PIC';;
+-        i*86*darwin1*)   ASFLAGS='-arch i686';;
+-        i*86*linux*)     ASFLAGS='--32';;
+-        x86_64*solaris*) AS0=gas; ASFLAGS='--64';;
+-        x86_64*darwin*)  ASFLAGS='-arch x86_64';;
+-        x86_64*linux*)   ASFLAGS='--64';;
+-        *)               if test "$with_gas" = yes; then AS0=gas; fi;;
++    case "$CC" in
++        *cc)
++            AS0=as
++            case "$host" in
++                sparc64*bsd*)    ASFLAGS='-Av9a -64 -K PIC';;
++                i*86*darwin1*)   ASFLAGS='-arch i686';;
++                i*86*linux*)     ASFLAGS='--32';;
++                x86_64*solaris*) AS0=gas; ASFLAGS='--64';;
++                x86_64*darwin*)  ASFLAGS='-arch x86_64';;
++                x86_64*linux*)   ASFLAGS='--64';;
++                *)               if test "$with_gas" = yes; then AS0=gas; fi;;
++            esac
++            ;;
++        *clang)
++            AS0=$CC
++            ASFLAGS='-c'
++            ;;
++        *)
++            AC_MSG_ERROR([unsupported compiler $CC])
++            ;;
+     esac
+     AC_CHECK_TOOL([AS],[$AS0])
+     AC_PROG_RANLIB

diff --git a/dev-lang/gprolog/gprolog-1.5.0.ebuild b/dev-lang/gprolog/gprolog-1.5.0.ebuild
new file mode 100644
index 00000000000..ea8d0194191
--- /dev/null
+++ b/dev-lang/gprolog/gprolog-1.5.0.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools flag-o-matic toolchain-funcs
+
+DESCRIPTION="A native Prolog compiler with constraint solving over finite domains (FD)"
+HOMEPAGE="http://www.gprolog.org/"
+SRC_URI="http://www.gprolog.org/${P}.tar.gz"
+S="${WORKDIR}"/${P}
+
+LICENSE="|| ( GPL-2+ LGPL-3+ )"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-solaris"
+IUSE="debug doc examples"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-ldflags.patch
+	"${FILESDIR}"/${P}-links.patch
+	"${FILESDIR}"/${P}-destdir.patch
+	"${FILESDIR}"/${P}-llvm-as.patch
+)
+
+src_prepare() {
+	default
+
+	cd "${S}"/src
+	eautoconf
+}
+
+src_configure() {
+	CFLAGS_MACHINE="`get-flag -march` `get-flag -mcpu` `get-flag -mtune`"
+
+	use debug && append-flags -DDEBUG
+
+	if tc-enables-pie; then
+		# gplc generates its own native ASM; disable PIE
+		append-ldflags -no-pie
+	fi
+
+	if tc-is-gcc && ! use x86; then
+		gprolog_use_regs=yes
+	else
+		gprolog_use_regs=no
+	fi
+
+	if tc-is-clang; then
+		AS=$(tc-getCC)
+	else
+		AS=$(tc-getAS)
+	fi
+
+	cd "${S}"/src || die
+	econf \
+		AS="${AS}" \
+		CFLAGS_MACHINE="${CFLAGS_MACHINE}" \
+		--with-c-flags="${CFLAGS}" \
+		--with-install-dir="${EPREFIX}"/usr/$(get_libdir)/${P} \
+		--with-links-dir="${EPREFIX}"/usr/bin \
+		--enable-regs=${gprolog_use_regs} \
+		$(use_with doc doc-dir "${EPREFIX}"/usr/share/doc/${PF}) \
+		$(use_with doc html-dir "${EPREFIX}"/usr/share/doc/${PF}/html) \
+		$(use_with examples examples-dir "${EPREFIX}"/usr/share/doc/${PF}/examples)
+}
+
+src_compile() {
+	cd "${S}"/src || die
+
+	# gprolog is compiled using gplc which cannot be run in parallel
+	emake -j1
+}
+
+src_test() {
+	cd "${S}"/src || die
+
+	emake -j1 check
+}
+
+src_install() {
+	cd "${S}"/src || die
+	emake DESTDIR="${D}" TXT_FILES= install
+
+	cd "${S}" || die
+	dodoc ChangeLog NEWS PROBLEMS README
+}


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

end of thread, other threads:[~2021-07-10 17:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-10 17:17 [gentoo-commits] repo/gentoo:master commit in: dev-lang/gprolog/files/, dev-lang/gprolog/ Keri Harris
  -- strict thread matches above, loose matches on Subject: below --
2021-06-27 10:32 Keri Harris
2017-07-19 15:43 Keri Harris

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