public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-text/opensp/files/, app-text/opensp/
@ 2022-11-06 10:40 Michał Górny
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2022-11-06 10:40 UTC (permalink / raw
  To: gentoo-commits

commit:     1bce1ecabecaba1b97ba4beabd9d0b568a2374fa
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Nov  6 10:37:53 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Nov  6 10:40:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bce1eca

app-text/opensp: Revert broken autoreconfing

Remove the unnecessary autoreconf, as well as "configure" patch that
modifies a macro that is never used.  This is necessary as this
package's build system is broken beyond repair, and autoreconf triggers
the breakage.

Closes: https://bugs.gentoo.org/880001
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 app-text/opensp/files/opensp-1.5.2-configure-clang16.patch  | 13 -------------
 .../{opensp-1.5.2-r8.ebuild => opensp-1.5.2-r9.ebuild}      |  5 +----
 2 files changed, 1 insertion(+), 17 deletions(-)

diff --git a/app-text/opensp/files/opensp-1.5.2-configure-clang16.patch b/app-text/opensp/files/opensp-1.5.2-configure-clang16.patch
deleted file mode 100644
index 468d0f1d306d..000000000000
--- a/app-text/opensp/files/opensp-1.5.2-configure-clang16.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -9,8 +9,9 @@ changequote([, ])dnl
- AC_MSG_CHECKING(size of $1)
- AC_CACHE_VAL(AC_CV_NAME,
- [AC_TRY_RUN([#include <stdio.h>
-+#include <stdlib.h>
- #include <$2>
--main()
-+int main(void)
- {
-   FILE *f=fopen("conftestval", "w");
-   if (!f) exit(1);

diff --git a/app-text/opensp/opensp-1.5.2-r8.ebuild b/app-text/opensp/opensp-1.5.2-r9.ebuild
similarity index 96%
rename from app-text/opensp/opensp-1.5.2-r8.ebuild
rename to app-text/opensp/opensp-1.5.2-r9.ebuild
index 743116acc69e..eab00d21392b 100644
--- a/app-text/opensp/opensp-1.5.2-r8.ebuild
+++ b/app-text/opensp/opensp-1.5.2-r9.ebuild
@@ -34,14 +34,11 @@ BDEPEND="nls? ( sys-devel/gettext )
 PATCHES=(
 	"${FILESDIR}"/${P}-fix-segfault.patch
 	"${FILESDIR}"/${P}-c11-using.patch
-	"${FILESDIR}"/${P}-configure-clang16.patch
 )
 
 src_prepare() {
 	default
-
-	# Needed for Clang 16
-	eautoreconf
+	use prefix && eautoreconf
 }
 
 src_configure() {


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

* [gentoo-commits] repo/gentoo:master commit in: app-text/opensp/files/, app-text/opensp/
@ 2023-01-03 23:44 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2023-01-03 23:44 UTC (permalink / raw
  To: gentoo-commits

commit:     fc52cb4bd9b7ff759f73cd62b0f681885bd90c59
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  3 23:44:01 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jan  3 23:44:01 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc52cb4b

app-text/opensp: fix build w/ clang 16

Closes: https://bugs.gentoo.org/889600
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/opensp-1.5.2-configure-clang16.patch     | 198 +++++++++++++++++++++
 app-text/opensp/opensp-1.5.2-r10.ebuild            |  85 +++++++++
 2 files changed, 283 insertions(+)

diff --git a/app-text/opensp/files/opensp-1.5.2-configure-clang16.patch b/app-text/opensp/files/opensp-1.5.2-configure-clang16.patch
new file mode 100644
index 000000000000..6e6832957679
--- /dev/null
+++ b/app-text/opensp/files/opensp-1.5.2-configure-clang16.patch
@@ -0,0 +1,198 @@
+https://bugs.gentoo.org/889600
+https://src.fedoraproject.org/rpms/opensp/blob/ad3afd1f07f600aa21cd6a3f1960db5570682e47/f/opensp-configure-c99.patch
+
+Avoid implicit function declarations because they have been removed
+from C in 1999.  Future compilers are likely to reject them by
+default.
+
+No need to upstream this because the aclocal.m4 file is not checked
+into the repository since:
+
+------------------------------------------------------------------------
+r412 | clasen | 1999-11-06 14:10:34 +0100 (Sat, 06 Nov 1999) | 3 lines
+Changed paths:
+   M /trunk/sp/Makefile.in
+   D /trunk/sp/config/aclocal.m4
+   D /trunk/sp/config/configure.in
+   M /trunk/sp/configure
+   A /trunk/sp/configure.in
+
+Install headers in $(includedir)/OpenSP, move configure.in to toplevel,
+remove generated file aclocal.m4.
+
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -833,10 +833,6 @@ else
+ #  endif
+ #endif
+ 
+-#ifdef __cplusplus
+-extern "C" void exit (int);
+-#endif
+-
+ void fnord() { int i=42;}
+ int main ()
+ {
+@@ -850,7 +846,7 @@ int main ()
+       /* dlclose (self); */
+     }
+ 
+-    exit (status);
++    return status;
+ }]
+ EOF
+   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+--- a/configure
++++ b/configure
+@@ -2917,7 +2917,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   for ac_declaration in \
+-   '' \
++   '#include <stdlib.h>' \
+    'extern "C" void std::exit (int) throw (); using std::exit;' \
+    'extern "C" void std::exit (int); using std::exit;' \
+    'extern "C" void exit (int) throw ();' \
+@@ -5186,8 +5186,8 @@ main ()
+   for (i = 0; i < 256; i++)
+     if (XOR (islower (i), ISLOWER (i))
+ 	|| toupper (i) != TOUPPER (i))
+-      exit(2);
+-  exit (0);
++      return 2;
++  return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+@@ -9508,10 +9508,6 @@ else
+ #  endif
+ #endif
+ 
+-#ifdef __cplusplus
+-extern "C" void exit (int);
+-#endif
+-
+ void fnord() { int i=42;}
+ int main ()
+ {
+@@ -9525,7 +9521,7 @@ int main ()
+       /* dlclose (self); */
+     }
+ 
+-    exit (status);
++    return status;
+ }
+ EOF
+   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+@@ -9606,10 +9602,6 @@ else
+ #  endif
+ #endif
+ 
+-#ifdef __cplusplus
+-extern "C" void exit (int);
+-#endif
+-
+ void fnord() { int i=42;}
+ int main ()
+ {
+@@ -9623,7 +9615,7 @@ int main ()
+       /* dlclose (self); */
+     }
+ 
+-    exit (status);
++    return status;
+ }
+ EOF
+   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+@@ -13321,10 +13313,6 @@ else
+ #  endif
+ #endif
+ 
+-#ifdef __cplusplus
+-extern "C" void exit (int);
+-#endif
+-
+ void fnord() { int i=42;}
+ int main ()
+ {
+@@ -13338,7 +13326,7 @@ int main ()
+       /* dlclose (self); */
+     }
+ 
+-    exit (status);
++    return status;
+ }
+ EOF
+   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+@@ -13419,10 +13407,6 @@ else
+ #  endif
+ #endif
+ 
+-#ifdef __cplusplus
+-extern "C" void exit (int);
+-#endif
+-
+ void fnord() { int i=42;}
+ int main ()
+ {
+@@ -13436,7 +13420,7 @@ int main ()
+       /* dlclose (self); */
+     }
+ 
+-    exit (status);
++    return status;
+ }
+ EOF
+   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+@@ -19110,10 +19094,6 @@ else
+ #  endif
+ #endif
+ 
+-#ifdef __cplusplus
+-extern "C" void exit (int);
+-#endif
+-
+ void fnord() { int i=42;}
+ int main ()
+ {
+@@ -19127,7 +19107,7 @@ int main ()
+       /* dlclose (self); */
+     }
+ 
+-    exit (status);
++    return status;
+ }
+ EOF
+   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+@@ -19208,10 +19188,6 @@ else
+ #  endif
+ #endif
+ 
+-#ifdef __cplusplus
+-extern "C" void exit (int);
+-#endif
+-
+ void fnord() { int i=42;}
+ int main ()
+ {
+@@ -19225,7 +19201,7 @@ int main ()
+       /* dlclose (self); */
+     }
+ 
+-    exit (status);
++    return status;
+ }
+ EOF
+   if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+@@ -27450,8 +27426,8 @@ main ()
+   for (i = 0; i < 256; i++)
+     if (XOR (islower (i), ISLOWER (i))
+ 	|| toupper (i) != TOUPPER (i))
+-      exit(2);
+-  exit (0);
++      return 2;
++  return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+

diff --git a/app-text/opensp/opensp-1.5.2-r10.ebuild b/app-text/opensp/opensp-1.5.2-r10.ebuild
new file mode 100644
index 000000000000..de279d310010
--- /dev/null
+++ b/app-text/opensp/opensp-1.5.2-r10.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic
+
+MY_P=${P/opensp/OpenSP}
+DESCRIPTION="A free, object-oriented toolkit for SGML parsing and entity management"
+HOMEPAGE="https://openjade.sourceforge.net/"
+SRC_URI="https://downloads.sourceforge.net/project/openjade/opensp/${PV}/${MY_P}.tar.gz"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc nls static-libs test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="elibc_glibc? ( net-libs/libnsl:0= )"
+DEPEND="${RDEPEND}"
+BDEPEND="nls? ( sys-devel/gettext )
+	doc? (
+		app-text/xmlto
+		app-text/docbook-xml-dtd:4.1.2
+	)
+	test? (
+		app-text/docbook-xml-dtd:4.5
+		app-text/openjade
+		app-text/sgml-common
+	)"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-fix-segfault.patch
+	"${FILESDIR}"/${P}-c11-using.patch
+	"${FILESDIR}"/${P}-configure-clang16.patch
+)
+
+src_prepare() {
+	default
+	use prefix && eautoreconf
+}
+
+src_configure() {
+	export CONFIG_SHELL=${BASH}  # configure needs bash
+
+	# The following filters are taken from openjade's ebuild. See bug #100828.
+	# Please note!  Opts are disabled.  If you know what you're doing
+	# feel free to remove this line.  It may cause problems with
+	# docbook-sgml-utils among other things.
+	#ALLOWED_FLAGS="-O -O1 -O2 -pipe -g -march"
+	strip-flags
+
+	append-cxxflags -std=gnu++11
+
+	econf \
+		--enable-http \
+		--enable-default-catalog="${EPREFIX}"/etc/sgml/catalog \
+		--enable-default-search-path="${EPREFIX}"/usr/share/sgml \
+		--datadir="${EPREFIX}"/usr/share/sgml/${P} \
+		$(use_enable nls) \
+		$(use_enable doc doc-build) \
+		$(use_enable static-libs static)
+}
+
+src_compile() {
+	emake pkgdocdir="${EPREFIX}"/usr/share/doc/${PF}
+}
+
+src_test() {
+	# Skipping tests known not to work
+	emake SHOWSTOPPERS= check
+	SANDBOX_PREDICT="${SANDBOX_PREDICT%:/}"
+}
+
+src_install() {
+	emake \
+		DESTDIR="${D}" \
+		pkgdocdir="${EPREFIX}"/usr/share/doc/${PF} \
+		install
+
+	find "${ED}" -name '*.la' -delete || die
+
+	dodoc AUTHORS BUGS ChangeLog NEWS README
+}


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

end of thread, other threads:[~2023-01-03 23:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-03 23:44 [gentoo-commits] repo/gentoo:master commit in: app-text/opensp/files/, app-text/opensp/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2022-11-06 10:40 Michał Górny

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