commit:     a880e5289842ee0e40b709b0f18a638cd8899beb
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  9 10:56:39 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Feb  9 10:56:39 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a880e528

media-libs/sg: Port to EAPI 7

Package-Manager: Portage-2.3.87, Repoman-2.3.20
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 media-libs/sg/files/1.4-AC_CONFIG_HEADERS.patch | 11 +++++
 media-libs/sg/sg-1.5.ebuild                     | 65 +++++++++++++------------
 2 files changed, 44 insertions(+), 32 deletions(-)

diff --git a/media-libs/sg/files/1.4-AC_CONFIG_HEADERS.patch 
b/media-libs/sg/files/1.4-AC_CONFIG_HEADERS.patch
new file mode 100644
index 00000000000..f57b6110593
--- /dev/null
+++ b/media-libs/sg/files/1.4-AC_CONFIG_HEADERS.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -30,7 +30,7 @@
+ dnl 0. autoconf initialization
+ AC_INIT(sg, 1.0, [email protected])
+ AC_CONFIG_SRCDIR(src/ogl/sg/ogl.h)
+-AM_CONFIG_HEADER(src/aaa_inc/sgcf.h)
++AC_CONFIG_HEADERS(src/aaa_inc/sgcf.h)
+ AC_CONFIG_AUX_DIR(config)
+ AC_PREFIX_DEFAULT(${HOME})
+ AC_CANONICAL_BUILD

diff --git a/media-libs/sg/sg-1.5.ebuild b/media-libs/sg/sg-1.5.ebuild
index ba5e44642aa..a172a6b00e6 100644
--- a/media-libs/sg/sg-1.5.ebuild
+++ b/media-libs/sg/sg-1.5.ebuild
@@ -1,57 +1,52 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=7
 
-AUTOTOOLS_AUTORECONF=true
-
-inherit autotools-utils multilib
+inherit autotools
 
 DESCRIPTION="Socket Graphics tool for displaying polygons"
 HOMEPAGE="http://fetk.org/codes/sg/index.html";
 SRC_URI="http://www.fetk.org/codes/download/${P}.tar.gz";
 
+LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
-LICENSE="GPL-2"
-IUSE="doc static-libs"
+IUSE="doc"
 
 RDEPEND="
        dev-libs/maloc
+       media-libs/mesa[X(+)]
        virtual/glu
+       x11-libs/libGLw
        x11-libs/libXaw
-       x11-libs/motif
-       || (
-               ( media-libs/mesa[X(+)] x11-libs/libGLw )
-               media-libs/opengl-apple
-               )"
-DEPEND="
-       ${RDEPEND}
+       x11-libs/motif"
+DEPEND="${RDEPEND}"
+BDEPEND="
        doc? (
-               media-gfx/graphviz
                app-doc/doxygen
-               )"
+               media-gfx/graphviz
+       )"
 
 S="${WORKDIR}"/${PN}
 
 PATCHES=(
        "${FILESDIR}"/1.4-opengl.patch
        "${FILESDIR}"/1.4-doc.patch
-       )
+       "${FILESDIR}"/1.4-AC_CONFIG_HEADERS.patch
+)
 
 src_prepare() {
-       rm src/{gl,glu,glw} -rf || die
-       sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac || die
-       autotools-utils_src_prepare
+       default
+       rm -r src/{gl,glu,glw} || die
+
+       eautoreconf
 }
 
 src_configure() {
-       local sg_include
-       local sg_lib
-       local myeconfargs
+       local sg_include="${EPREFIX}"/usr/include
+       local sg_lib="${EPREFIX}"/usr/$(get_libdir)
 
-       sg_include="${EPREFIX}"/usr/include
-       sg_lib="${EPREFIX}"/usr/$(get_libdir)
        export FETK_LIBRARY="${sg_lib}"
        export FETK_MOTIF_LIBRARY="${sg_lib}"
        export FETK_GL_LIBRARY="${sg_lib}"
@@ -63,13 +58,19 @@ src_configure() {
        export FETK_GL_INCLUDE="${sg_include}"/GL
        export FETK_MOTIF_INCLUDE="${sg_include}"
 
-       use doc || myeconfargs+=( --with-doxygen= --with-dot= )
+       econf \
+               --disable-static \
+               --disable-triplet \
+               --enable-glforce \
+               --enable-gluforce \
+               --enable-glwforce \
+               --with-doxygen=$(usex doc "${BROOT}"/usr/bin/doxygen "") \
+               --with-dot=$(usex doc "${BROOT}"/usr/bin/dot "")
+}
 
-       myeconfargs+=( --enable-glforce --enable-gluforce --enable-glwforce )
+src_install() {
+       default
 
-       myeconfargs+=(
-               --docdir="${EPREFIX}"/usr/share/doc/${PF}
-               --disable-triplet
-       )
-       autotools-utils_src_configure
+       # no static archives
+       find "${D}" -name '*.la' -delete || die
 }

Reply via email to