Skip to content

Commit

Permalink
games-strategy/freeciv: Switch from gnome2-utils to xdg, EAPI-7 bump
Browse files Browse the repository at this point in the history
Add missing desktop.eclass.

Package-Manager: Portage-2.3.60, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <[email protected]>
  • Loading branch information
a17r committed Feb 14, 2019
1 parent 2794d58 commit ac6606a
Showing 1 changed file with 28 additions and 35 deletions.
63 changes: 28 additions & 35 deletions games-strategy/freeciv/freeciv-2.6.0.ebuild
Original file line number Diff line number Diff line change
@@ -1,35 +1,43 @@
# Copyright 1999-2018 Gentoo Foundation
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6
inherit flag-o-matic gnome2-utils xdg-utils
EAPI=7

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

DESCRIPTION="multiplayer strategy game (Civilization Clone)"
HOMEPAGE="http://www.freeciv.org/"
SRC_URI="mirror://sourceforge/freeciv/${MY_P}.tar.bz2"

LICENSE="GPL-2+"
SLOT="0"
if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then
SRC_URI="mirror://sourceforge/freeciv/${MY_P}.tar.bz2"
KEYWORDS="~amd64 ~x86"
fi
IUSE="auth aimodules dedicated +gtk ipv6 mapimg modpack mysql nls qt5 readline sdl +server +sound sqlite system-lua"

LICENSE="GPL-2+"
SLOT="0"
IUSE="aimodules auth dedicated +gtk ipv6 mapimg modpack mysql nls qt5 readline sdl +server +sound sqlite system-lua"

# postgres isn't yet really supported by upstream
RDEPEND="app-arch/bzip2
BDEPEND="
virtual/pkgconfig
!dedicated? (
x11-base/xorg-proto
nls? ( sys-devel/gettext )
)
"
DEPEND="
app-arch/bzip2
app-arch/xz-utils
net-misc/curl
sys-libs/zlib
auth? (
!mysql? ( ( !sqlite? ( virtual/mysql ) ) )
mysql? ( virtual/mysql )
sqlite? ( dev-db/sqlite:3 )
!mysql? ( ( !sqlite? ( virtual/mysql ) ) )
)
readline? ( sys-libs/readline:0= )
dedicated? ( aimodules? ( dev-libs/libltdl:0 ) )
!dedicated? (
media-libs/libpng:0
Expand All @@ -42,6 +50,7 @@ RDEPEND="app-arch/bzip2
dev-qt/qtgui:5
dev-qt/qtwidgets:5
)
!sdl? ( !gtk? ( x11-libs/gtk+:2 ) )
sdl? (
media-libs/libsdl2[video]
media-libs/sdl2-gfx
Expand All @@ -53,15 +62,11 @@ RDEPEND="app-arch/bzip2
media-libs/libsdl2[sound]
media-libs/sdl2-mixer[vorbis]
)
!sdl? ( !gtk? ( x11-libs/gtk+:2 ) )
)
system-lua? ( >=dev-lang/lua-5.3 )"
DEPEND="${RDEPEND}
virtual/pkgconfig
!dedicated? (
x11-base/xorg-proto
nls? ( sys-devel/gettext )
)"
readline? ( sys-libs/readline:0= )
system-lua? ( >=dev-lang/lua-5.3:= )
"
RDEPEND="${DEPEND}"

S="${WORKDIR}/${MY_P}"

Expand Down Expand Up @@ -152,8 +157,8 @@ src_install() {
default

if use dedicated ; then
rm -rf "${ED%/}/usr/share/pixmaps"
rm -f "${ED%/}"/usr/share/man/man6/freeciv-{client,gtk2,gtk3,modpack,qt,sdl,xaw}*
rm -rf "${ED}"/usr/share/pixmaps
rm -f "${ED}"/usr/share/man/man6/freeciv-{client,gtk2,gtk3,modpack,qt,sdl,xaw}*
else
if use server ; then
# Create and install the html manual. It can't be done for dedicated
Expand All @@ -168,24 +173,12 @@ src_install() {
if use sdl ; then
make_desktop_entry freeciv-sdl "Freeciv (SDL)" freeciv-client
else
rm -f "${ED%/}"/usr/share/man/man6/freeciv-sdl*
rm -f "${ED}"/usr/share/man/man6/freeciv-sdl*
fi
rm -f "${ED%/}"/usr/share/man/man6/freeciv-xaw*
rm -f "${ED}"/usr/share/man/man6/freeciv-xaw*
fi
find "${ED}" -name "freeciv-manual*" -delete

rm -f "${ED%/}/usr/$(get_libdir)"/*.a
rm -f "${ED}/usr/$(get_libdir)"/*.a
find "${ED}" -name "*.la" -delete || die
}

pkg_preinst() {
gnome2_icon_savelist
}

pkg_postinst() {
gnome2_icon_cache_update
}

pkg_postrm() {
gnome2_icon_cache_update
}

0 comments on commit ac6606a

Please sign in to comment.