media-libs/giblib: Port to EAPI 7
authorDavid Seifert <soap@gentoo.org>
Thu, 12 Dec 2019 17:31:13 +0000 (18:31 +0100)
committerDavid Seifert <soap@gentoo.org>
Thu, 12 Dec 2019 17:31:13 +0000 (18:31 +0100)
Package-Manager: Portage-2.3.81, Repoman-2.3.20
Signed-off-by: David Seifert <soap@gentoo.org>
media-libs/giblib/files/giblib-1.2.4-fix-build-system.patch [new file with mode: 0644]
media-libs/giblib/giblib-1.2.4-r1.ebuild

diff --git a/media-libs/giblib/files/giblib-1.2.4-fix-build-system.patch b/media-libs/giblib/files/giblib-1.2.4-fix-build-system.patch
new file mode 100644 (file)
index 0000000..f1c37fb
--- /dev/null
@@ -0,0 +1,33 @@
+--- a/giblib-config.in
++++ b/giblib-config.in
+@@ -46,7 +46,7 @@
+       ;;
+     --libs)
+       libdirs=-L@libdir@
+-      echo $libdirs -lgiblib @LDFLAGS@ @IMLIB_LIBS@
++      echo $libdirs -lgiblib @IMLIB_LIBS@
+       ;;
+     *)
+       echo "${usage}" 1>&2
+--- a/giblib.pc.in
++++ b/giblib.pc.in
+@@ -6,6 +6,6 @@
+ Name: giblib
+ Description: wrapper library for imlib2, and other stuff
+ Version: @VERSION@
+-Libs: -L${libdir} -lgiblib @LDFLAGS@ @IMLIB_LIBS@
++Libs: -L${libdir} -lgiblib @IMLIB_LIBS@
+ Cflags: -I${includedir} -I${includedir}/giblib @IMLIB_CFLAGS@
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -2,8 +2,7 @@
+ SUBDIRS = giblib
+-docs_DATA = README AUTHORS ChangeLog TODO
+-docsdir = $(prefix)/doc/giblib
++doc_DATA = README AUTHORS ChangeLog TODO
+ EXTRA_DIST= $(docs_DATA) giblib.pc.in
index 8c542462cf4341292557d4ca6b5a58ff68344419..8eb73843f2bed9c10258990d5ab34c0f3bd88461 100644 (file)
@@ -1,8 +1,9 @@
 # Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="4"
-inherit epunt-cxx libtool
+EAPI=7
+
+inherit autotools
 
 DESCRIPTION="a graphics library built on top of imlib2"
 HOMEPAGE="http://freecode.com/projects/giblib http://www.linuxbrit.co.uk/giblib/"
@@ -11,21 +12,29 @@ SRC_URI="http://www.linuxbrit.co.uk/downloads/${P}.tar.gz"
 LICENSE="feh"
 SLOT="0"
 KEYWORDS="alpha amd64 arm ~arm64 ~hppa ~mips ppc ppc64 ~sh sparc x86"
-IUSE="static-libs"
 
-RDEPEND=">=media-libs/imlib2-1.0.3[X]
+RDEPEND="
+       media-libs/freetype
+       media-libs/imlib2:=[X]
        x11-libs/libX11
-       x11-libs/libXext
-       >=media-libs/freetype-2.0"
+       x11-libs/libXext"
 DEPEND="${RDEPEND}"
 
+PATCHES=( "${FILESDIR}"/${PN}-1.2.4-fix-build-system.patch )
+
 src_prepare() {
-       sed -i 's:@LDFLAGS@::' giblib-config.in giblib.pc.in || die #430724
-       sed -i "/^docsdir/s:=.*:= @datadir@/doc/${PF}:" Makefile.in || die
-       epunt_cxx
-       elibtoolize # otherwise it doesnt install the .so -> .so.x symlink on fbsd
+       default
+       mv configure.{in,ac} || die
+       eautoreconf
 }
 
 src_configure() {
-       econf $(use_enable static-libs static)
+       econf --disable-static
+}
+
+src_install() {
+       default
+
+       # no static archives
+       find "${D}" -name '*.la' -delete || die
 }