Skip to content

Commit

Permalink
games-strategy/freeciv: migrate to lua-single.eclass
Browse files Browse the repository at this point in the history
Builds and installs fine against lua5-3. Against lua5-4, src_configure
dies with
"configure: error: Use of included lua disabled, and no lua found from system"

Note: USE=system-lua is still masked for this package, leaving it up to
its maintainers to unmask it.

Closes: https://bugs.gentoo.org/752711
Signed-off-by: Marek Szuba <[email protected]>
  • Loading branch information
Marek Szuba committed Jun 5, 2021
1 parent 7df33b4 commit 520793f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions games-strategy/freeciv/freeciv-2.6.4.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@

EAPI=7

LUA_COMPAT=( lua5-3 )

MY_PV="${PV/_beta/-beta}"
MY_PV="${MY_PV/_rc/-RC}"
MY_P="${PN}-${MY_PV}"
inherit desktop flag-o-matic qmake-utils xdg
inherit desktop flag-o-matic lua-single qmake-utils xdg

DESCRIPTION="Multiplayer strategy game (Civilization Clone)"
HOMEPAGE="http://www.freeciv.org/"
Expand All @@ -20,6 +22,8 @@ LICENSE="GPL-2+"
SLOT="0"
IUSE="aimodules auth dedicated +gtk ipv6 mapimg modpack mysql nls qt5 readline sdl +server +sound sqlite system-lua"

REQUIRED_USE="system-lua? ( ${LUA_REQUIRED_USE} )"

RDEPEND="
app-arch/bzip2
app-arch/xz-utils
Expand Down Expand Up @@ -56,7 +60,7 @@ RDEPEND="
)
)
readline? ( sys-libs/readline:0= )
system-lua? ( >=dev-lang/lua-5.3:= )
system-lua? ( ${LUA_DEPS} )
"
DEPEND="${RDEPEND}
!dedicated? ( x11-base/xorg-proto )
Expand All @@ -74,6 +78,8 @@ pkg_setup() {
ewarn "Disabling server USE flag will make it impossible to start local"
ewarn "games, but you will still be able to join multiplayer games."
fi

use system-lua && lua-single_pkg_setup
}

src_prepare() {
Expand Down

0 comments on commit 520793f

Please sign in to comment.