commit:     5eafc18acbca8ecc75a5f483ca19f651684ab3f8
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 20 17:31:03 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 20 17:31:58 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5eafc18a

media-libs/sge: EAPI 6->8, refactor

Closes: https://bugs.gentoo.org/724426
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 .../{sge-030809.ebuild => sge-030809-r1.ebuild}    | 35 ++++++++++------------
 1 file changed, 16 insertions(+), 19 deletions(-)

diff --git a/media-libs/sge/sge-030809.ebuild 
b/media-libs/sge/sge-030809-r1.ebuild
similarity index 63%
rename from media-libs/sge/sge-030809.ebuild
rename to media-libs/sge/sge-030809-r1.ebuild
index 8847d3d6aa9d..69825f10f625 100644
--- a/media-libs/sge/sge-030809.ebuild
+++ b/media-libs/sge/sge-030809-r1.ebuild
@@ -1,28 +1,27 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=8
 
 inherit toolchain-funcs
 
-MY_P="sge${PV}"
 DESCRIPTION="Graphics extensions library for SDL"
 HOMEPAGE="http://www.etek.chalmers.se/~e8cal1/sge/";
-SRC_URI="http://www.etek.chalmers.se/~e8cal1/sge/files/${MY_P}.tar.gz";
+SRC_URI="http://www.etek.chalmers.se/~e8cal1/sge/files/sge${PV}.tar.gz";
+S=${WORKDIR}/sge${PV}
 
 LICENSE="LGPL-2.1"
 SLOT="0"
 KEYWORDS="amd64 ~ia64 ppc x86"
 IUSE="doc examples image truetype"
 
-RDEPEND="media-libs/libsdl
+DEPEND="
+       media-libs/libsdl
        image? ( media-libs/sdl-image )
-       truetype? ( >=media-libs/freetype-2 )"
-
-DEPEND="${RDEPEND}
-       virtual/pkgconfig"
-
-S="${WORKDIR}/${MY_P}"
+       truetype? ( >=media-libs/freetype-2 )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="virtual/pkgconfig"
 
 PATCHES=(
        "${FILESDIR}"/${P}-build.patch
@@ -33,18 +32,14 @@ PATCHES=(
 
 src_prepare() {
        default
-       sed -i "s:\$(PREFIX)/lib:\$(PREFIX)/$(get_libdir):" Makefile || die
-       sed -i \
-               -e '/^CC=/d' \
-               -e '/^CXX=/d' \
-               -e '/^AR=/d' \
-               Makefile.conf || die
-       tc-export CC CXX AR PKG_CONFIG
-       # make sure the header gets regenerated everytime
+       sed "s:\$(PREFIX)/lib:\$(PREFIX)/$(get_libdir):" -i Makefile || die
+       sed -e '/^CC=/d' -e '/^CXX=/d' -e '/^AR=/d' -i Makefile.conf || die
+       # make sure the header gets regenerated every time
        rm -f sge_config.h
 }
 
 src_compile() {
+       tc-export CC CXX AR PKG_CONFIG
        emake \
                USE_IMG=$(usex image y n) \
                USE_FT=$(usex truetype y n)
@@ -63,4 +58,6 @@ src_install() {
                dodoc -r examples
                docompress -x /usr/share/doc/${PF}/examples
        fi
+
+       find "${ED}" -type f -name '*.a' -delete || die
 }

Reply via email to