commit:     7ccf326f3ecdad47e8d3f5ac73e555a8fe5e97a6
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  3 22:14:37 2021 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Aug  4 02:11:13 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ccf326f

games-simulation/lincity-ng: EAPI 7->8, various fixes

* Migrate to eautoreconf, autogen.sh jam stuff can be reduced only
  to a autoconf --trace call allowing eautoreconf to do its thing
* Remove autotools_run_tool for InternalEclassUsage
* Generate the previously skipped CREDITS file
* Simplify install, PACKAGE_VERSION handles docdir (fine on prefix)
* Add libxslt/gettext bdeps
* Strip -O3
* tc-export CC, some calls disregard configure's carried value
* export AR rather than use -sAR to handle bug #739376

Closes: https://bugs.gentoo.org/739376
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../files/lincity-ng-2.9_beta-flags.patch          | 10 ++++
 .../lincity-ng/lincity-ng-2.9_beta.ebuild          | 54 ++++++++++++----------
 2 files changed, 39 insertions(+), 25 deletions(-)

diff --git a/games-simulation/lincity-ng/files/lincity-ng-2.9_beta-flags.patch 
b/games-simulation/lincity-ng/files/lincity-ng-2.9_beta-flags.patch
new file mode 100644
index 00000000000..1c960123c21
--- /dev/null
+++ b/games-simulation/lincity-ng/files/lincity-ng-2.9_beta-flags.patch
@@ -0,0 +1,10 @@
+--- a/Jamrules
++++ b/Jamrules
+@@ -23,5 +23,4 @@
+     case optimize :
+-        CFLAGS += -O3 -g -Wall ;
+-        CXXFLAGS += -O3 -g -Wall ;
+-        LIBS += -g ;
++        CFLAGS += -Wall ;
++        CXXFLAGS += -Wall ;
+     case debug :

diff --git a/games-simulation/lincity-ng/lincity-ng-2.9_beta.ebuild 
b/games-simulation/lincity-ng/lincity-ng-2.9_beta.ebuild
index c49cae5849f..793d68044ea 100644
--- a/games-simulation/lincity-ng/lincity-ng-2.9_beta.ebuild
+++ b/games-simulation/lincity-ng/lincity-ng-2.9_beta.ebuild
@@ -1,22 +1,23 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
-inherit autotools libtool multiprocessing toolchain-funcs
+inherit autotools multiprocessing toolchain-funcs
 
 DESCRIPTION="City simulation game"
 HOMEPAGE="https://github.com/lincity-ng/lincity-ng";
 
SRC_URI="https://github.com/lincity-ng/lincity-ng/archive/lincity-ng-${PV/_/-}.tar.gz
 -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${P/_/-}"
 
-LICENSE="GPL-2 BitstreamVera CC-BY-SA-2.0"
+LICENSE="GPL-2+ BitstreamVera CC-BY-SA-2.0"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE=""
 
-RDEPEND="dev-games/physfs
+RDEPEND="
+       dev-games/physfs
        dev-libs/libxml2:2
-       media-libs/libsdl[sound,joystick,opengl,video]
+       media-libs/libsdl[joystick,opengl,sound,video]
        media-libs/sdl-gfx
        media-libs/sdl-image[png]
        media-libs/sdl-mixer[vorbis]
@@ -24,35 +25,38 @@ RDEPEND="dev-games/physfs
        sys-libs/zlib
        virtual/opengl"
 DEPEND="${RDEPEND}"
-BDEPEND="dev-util/ftjam
+BDEPEND="
+       dev-libs/libxslt
+       dev-util/ftjam
+       sys-devel/gettext
        virtual/pkgconfig"
 
-S="${WORKDIR}/${PN}-${P/_/-}"
+PATCHES=(
+       "${FILESDIR}"/${P}-flags.patch
+)
 
 src_prepare() {
        default
 
-       # Missing CREDITS files actually breaks the install.
-       sed -i -r "s/\b(COPYING[^ ]*|CREDITS)\b//g" Jamfile || die
+       AT_M4DIR=mk/autoconf eautoreconf
+
+       # strip down autogen.sh / makerelease.sh for needed additional actions
+       sed -i -e '1a\set -e' -e '1n;/# generate Jam/,$!d;/^$/,$d' autogen.sh 
|| die
+       sed -i -e '1a\set -e' -e '/^$/,$d' makerelease.sh || die
 
-       # Can't use eautoreconf as it does weird jam stuff.
-       autotools_run_tool ./autogen.sh
-       elibtoolize
+       ./autogen.sh || die "Failed to generate Jamconfig.in"
+       ./makerelease.sh || die "Failed to generate CREDITS"
 }
 
 src_compile() {
-       jam -q -dx \
-               -j$(makeopts_jobs) \
-               -sAR="$(tc-getAR) ru" \
-               -sRANLIB="$(tc-getRANLIB)" \
-               || die "jam failed"
+       tc-export CC RANLIB
+       export AR="$(tc-getAR) cru" #739376
+
+       jam -q -dx -j$(makeopts_jobs) || die
 }
 
 src_install() {
-       jam -sDESTDIR="${D}" \
-               -sappdocdir="${EPREFIX}/usr/share/doc/${PF}" \
-               -sapplicationsdir="${EPREFIX}/usr/share/applications" \
-               -spixmapsdir="${EPREFIX}/usr/share/pixmaps" \
-               install \
-               || die "jam install failed"
+       jam -q -dx -sDESTDIR="${D}" -sPACKAGE_VERSION=${PVR} install || die
+
+       rm "${ED}"/usr/share/doc/${PF}/COPYING* || die
 }

Reply via email to