Skip to content

Commit

Permalink
games-sports/bygfoot: Port to EAPI 7
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/707646
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: David Seifert <[email protected]>
  • Loading branch information
SoapGentoo committed Nov 22, 2020
1 parent 1073cfb commit 1ca14cc
Show file tree
Hide file tree
Showing 3 changed files with 565 additions and 15 deletions.
27 changes: 12 additions & 15 deletions games-sports/bygfoot/bygfoot-2.3.2-r1.ebuild
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6
EAPI=7

inherit eutils vcs-clean
inherit desktop vcs-clean

DESCRIPTION="GTK+2 Soccer Management Game"
HOMEPAGE="http://bygfoot.sourceforge.net/"
Expand All @@ -12,35 +12,32 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

RDEPEND="
app-arch/zip
media-libs/freetype:2
x11-libs/gtk+:2
virtual/libintl"
DEPEND="${RDEPEND}
DEPEND="${RDEPEND}"
BDEPEND="
sys-devel/gettext
virtual/pkgconfig"

src_prepare() {
default

sed -i \
-e 's:$(gnulocaledir):/usr/share/locale:' \
-e '/PACKAGE_LOCALE_DIR/s:\$(prefix)/\$(DATADIRNAME):/usr/share:' \
-e '/bygfoot_LDADD/s/$/ -lm/' \
po/Makefile.in.in src/Makefile.in || die
}
PATCHES=(
"${FILESDIR}"/${P}-Makefile.patch
"${FILESDIR}"/${P}-fno-common.patch
)

src_configure() {
econf --disable-gstreamer
}

src_install() {
emake DESTDIR="${D}" install
default
dodoc UPDATE

esvn_clean "${D}"
dodoc AUTHORS ChangeLog README TODO UPDATE

newicon support_files/pixmaps/bygfoot_icon.png ${PN}.png
make_desktop_entry ${PN} Bygfoot
}
57 changes: 57 additions & 0 deletions games-sports/bygfoot/files/bygfoot-2.3.2-Makefile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -28,7 +28,7 @@
datarootdir = @datarootdir@
datadir = @datadir@
libdir = @libdir@
-localedir = $(libdir)/locale
+localedir = @localedir@
gnulocaledir = $(datadir)/locale
gettextsrcdir = $(datadir)/glib-2.0/gettext/po
subdir = po
@@ -129,7 +129,6 @@
for cat in $$catalogs; do \
cat=`basename $$cat`; \
case "$$cat" in \
- *.gmo) destdir=$(gnulocaledir);; \
*) destdir=$(localedir);; \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
@@ -183,8 +182,6 @@
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
- rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
- rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
done
if test "$(PACKAGE)" = "glib"; then \
rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -206,7 +206,7 @@
AM_CFLAGS = -Wall #-fprofile-arcs -ftest-coverage -pg
INCLUDES = \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
- -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+ -DPACKAGE_LOCALE_DIR=\""$(localedir)"\" \
@PACKAGE_CFLAGS@ @GST_CFLAGS@

bygfoot_SOURCES = \
@@ -289,7 +289,7 @@
xml_team.c file.h free.h main.h misc.h option.h player.h team.h variables.h xml_team.h \
youth_academy.c free.h maths.h name.h option.h player.h team.h user.h youth_academy.h

-bygfoot_LDADD = @PACKAGE_LIBS@ @GST_LIBS@ $(INTLLIBS)
+bygfoot_LDADD = @PACKAGE_LIBS@ @GST_LIBS@ $(INTLLIBS) -lm
all: all-am

.SUFFIXES:
@@ -348,7 +348,7 @@
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
bygfoot$(EXEEXT): $(bygfoot_OBJECTS) $(bygfoot_DEPENDENCIES)
@rm -f bygfoot$(EXEEXT)
- $(LINK) $(bygfoot_OBJECTS) $(bygfoot_LDADD) $(LIBS)
+ $(LINK) $(bygfoot_OBJECTS) $(bygfoot_LDADD) $(LIBS) -lm

mostlyclean-compile:
-rm -f *.$(OBJEXT)
Loading

0 comments on commit 1ca14cc

Please sign in to comment.