From 8a353314189b571a1a8fc9a9dcf11002571c5427 Mon Sep 17 00:00:00 2001 From: Ionen Wolkens Date: Sat, 13 Mar 2021 19:21:09 +0100 Subject: sci-libs/gts: port to EAPI 7, fix docs * Updated autotools patch: - p0 -> p1 and metadata removal - removed bits that were meant to support out-of-source (unused) * Removed USE=examples (small files, now installed by default) Closes: https://github.com/gentoo/gentoo/pull/19693 Closes: https://bugs.gentoo.org/727536 Package-Manager: Portage-3.0.15, Repoman-3.0.2 Signed-off-by: Ionen Wolkens Signed-off-by: David Seifert --- sci-libs/gts/files/gts-20111025-autotools.patch | 56 ----------------------- sci-libs/gts/files/gts-20121130-autotools.patch | 32 +++++++++++++ sci-libs/gts/gts-20121130.ebuild | 61 +++++++++++++++---------- 3 files changed, 69 insertions(+), 80 deletions(-) delete mode 100644 sci-libs/gts/files/gts-20111025-autotools.patch create mode 100644 sci-libs/gts/files/gts-20121130-autotools.patch (limited to 'sci-libs/gts') diff --git a/sci-libs/gts/files/gts-20111025-autotools.patch b/sci-libs/gts/files/gts-20111025-autotools.patch deleted file mode 100644 index 7ab3805e2477..000000000000 --- a/sci-libs/gts/files/gts-20111025-autotools.patch +++ /dev/null @@ -1,56 +0,0 @@ ---- doc/Makefile.am.orig -+++ doc/Makefile.am -@@ -9,7 +9,7 @@ DOC_MODULE=gts - DOC_MAIN_SGML_FILE=gts-docs.sgml - - # The directory containing the source code (if it contains documentation). --DOC_SOURCE_DIR=../src -+DOC_SOURCE_DIR=$(top_srcdir)/src - - TARGET_DIR=html/$(DOC_MODULE) - -@@ -21,10 +21,10 @@ scan: - templates: scan - gtkdoc-mktmpl --module=$(DOC_MODULE) - --sgml: -+sgml: scan - gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) - --html: -+html: sgml - if ! test -d html ; then mkdir html ; fi - -cd html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) - ---- src/Makefile.am.orig -+++ src/Makefile.am -@@ -66,10 +66,10 @@ predicates.o: predicates.c predicates_init.h predicates.h - $(COMPILE) -c $(srcdir)/predicates.c - - predicates_init: predicates_init.c rounding.h -- $(COMPILE) $(srcdir)/predicates_init.c -o $(srcdir)/predicates_init -+ $(COMPILE) $(srcdir)/predicates_init.c -o $(top_builddir)/src/predicates_init - - predicates_init.h: predicates_init -- ./predicates_init > $(srcdir)/predicates_init.h -+ $(top_builddir)/src/predicates_init > $(srcdir)/predicates_init.h - - CLEANFILES = $(BUILT_SOURCES) - ---- examples/Makefile.am.orig 2012-01-20 19:44:46.000000000 +0000 -+++ examples/Makefile.am 2012-01-20 19:45:04.000000000 +0000 -@@ -13,12 +13,10 @@ - NETPBM_EXTRA = happrox - endif - --bin_PROGRAMS = \ -+check_PROGRAMS = \ - transform \ - delaunay \ -- $(NETPBM_EXTRA) -- --noinst_PROGRAMS = \ -+ $(NETPBM_EXTRA) \ - set \ - volume \ - cleanup \ diff --git a/sci-libs/gts/files/gts-20121130-autotools.patch b/sci-libs/gts/files/gts-20121130-autotools.patch new file mode 100644 index 000000000000..2c651e9ba959 --- /dev/null +++ b/sci-libs/gts/files/gts-20121130-autotools.patch @@ -0,0 +1,32 @@ +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -21,10 +21,10 @@ scan: + templates: scan + gtkdoc-mktmpl --module=$(DOC_MODULE) + +-sgml: ++sgml: scan + gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) + +-html: ++html: sgml + if ! test -d html ; then mkdir html ; fi + -cd html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) + +--- a/examples/Makefile.am ++++ b/examples/Makefile.am +@@ -13,12 +13,10 @@ + NETPBM_EXTRA = happrox + endif + +-bin_PROGRAMS = \ ++check_PROGRAMS = \ + transform \ + delaunay \ +- $(NETPBM_EXTRA) +- +-noinst_PROGRAMS = \ ++ $(NETPBM_EXTRA) \ + set \ + volume \ + cleanup \ diff --git a/sci-libs/gts/gts-20121130.ebuild b/sci-libs/gts/gts-20121130.ebuild index 2a29d95b7edf..2ce0a8b48a5e 100644 --- a/sci-libs/gts/gts-20121130.ebuild +++ b/sci-libs/gts/gts-20121130.ebuild @@ -1,49 +1,62 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 -AUTOTOOLS_AUTORECONF=1 +inherit autotools -inherit autotools-utils - -MYP=${P/-20/-snapshot-} +MY_P=${P/-20/-snapshot-} DESCRIPTION="GNU Triangulated Surface Library" HOMEPAGE="http://gts.sourceforge.net/" -SRC_URI="http://gts.sourceforge.net/tarballs/${MYP}.tar.gz" +SRC_URI="http://gts.sourceforge.net/tarballs/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" -SLOT="0" LICENSE="LGPL-2" +SLOT="0" KEYWORDS="amd64 ~arm64 hppa ~mips ppc ppc64 ~riscv x86 ~amd64-linux ~x86-linux" -IUSE="doc examples static-libs test" +IUSE="doc test" +RESTRICT="test" # bug #277165 RDEPEND="dev-libs/glib:2" -DEPEND="${RDEPEND} +DEPEND="${RDEPEND}" +BDEPEND=" virtual/pkgconfig doc? ( dev-util/gtk-doc ) test? ( media-libs/netpbm )" -# buggy -RESTRICT=test +PATCHES=( "${FILESDIR}"/${PN}-20121130-autotools.patch ) + +src_prepare() { + default -S="${WORKDIR}/${MYP}" + # fix doc generation (bug #727536) + sed -i 's/\xe9/\xc3\xa9/;s/\xf6/\xc3\xb6/' src/*.{c,h} || die -AUTOTOOLS_IN_SOURCE_BUILD=1 + # allow to run tests (bug #277165) + chmod +x test/*/*.sh || die + + eautoreconf +} -PATCHES=( "${FILESDIR}"/${PN}-20111025-autotools.patch ) +src_configure() { + econf --disable-static +} src_compile() { - autotools-utils_src_compile - use doc && autotools-utils_src_compile -C doc html - chmod +x test/*/*.sh || die + default + + if use doc; then + emake DOC_MAIN_SGML_FILE=gts-docs.xml -C doc html + HTML_DOCS=( doc/html/. ) + fi } src_install() { - use doc && HTML_DOCS=("${AUTOTOOLS_BUILD_DIR}"/doc/html/) - autotools-utils_src_install - if use examples; then - insinto /usr/share/doc/${PF}/examples - doins examples/*.c - fi + default + + docinto examples + dodoc examples/*.c + + find "${ED}" -name '*.la' -delete || die } -- cgit v1.2.3-65-gdbad