summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2020-11-22 17:43:56 +0100
committerDavid Seifert <soap@gentoo.org>2020-11-22 17:43:56 +0100
commit1ca14cc34b96ee959fd35bf5732c351d6dad0acf (patch)
tree6f4ee480b3e21db7621f6f2c8db556a1839736d3 /games-sports
parentgames-arcade/xrick: Port to EAPI 7 (diff)
downloadgentoo-1ca14cc34b96ee959fd35bf5732c351d6dad0acf.tar.gz
gentoo-1ca14cc34b96ee959fd35bf5732c351d6dad0acf.tar.bz2
gentoo-1ca14cc34b96ee959fd35bf5732c351d6dad0acf.zip
games-sports/bygfoot: Port to EAPI 7
Closes: https://bugs.gentoo.org/707646 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'games-sports')
-rw-r--r--games-sports/bygfoot/bygfoot-2.3.2-r1.ebuild27
-rw-r--r--games-sports/bygfoot/files/bygfoot-2.3.2-Makefile.patch57
-rw-r--r--games-sports/bygfoot/files/bygfoot-2.3.2-fno-common.patch496
3 files changed, 565 insertions, 15 deletions
diff --git a/games-sports/bygfoot/bygfoot-2.3.2-r1.ebuild b/games-sports/bygfoot/bygfoot-2.3.2-r1.ebuild
index 9ed990aea67c..6a48c7824293 100644
--- a/games-sports/bygfoot/bygfoot-2.3.2-r1.ebuild
+++ b/games-sports/bygfoot/bygfoot-2.3.2-r1.ebuild
@@ -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/"
@@ -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
}
diff --git a/games-sports/bygfoot/files/bygfoot-2.3.2-Makefile.patch b/games-sports/bygfoot/files/bygfoot-2.3.2-Makefile.patch
new file mode 100644
index 000000000000..306428a50055
--- /dev/null
+++ b/games-sports/bygfoot/files/bygfoot-2.3.2-Makefile.patch
@@ -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)
diff --git a/games-sports/bygfoot/files/bygfoot-2.3.2-fno-common.patch b/games-sports/bygfoot/files/bygfoot-2.3.2-fno-common.patch
new file mode 100644
index 000000000000..931b7a01f7f9
--- /dev/null
+++ b/games-sports/bygfoot/files/bygfoot-2.3.2-fno-common.patch
@@ -0,0 +1,496 @@
+--- a/src/main.c
++++ b/src/main.c
+@@ -61,6 +61,42 @@
+ #include "window.h"
+ #include "xml_strategy.h"
+
++// Global vars (-fno-common)
++Country country;
++GArray *users;
++gint season, week, week_round;
++OptionList options;
++OptionList constants;
++OptionList constants_app;
++OptionList settings;
++OptionList tokens;
++GArray *lg_commentary[LIVE_GAME_EVENT_END];
++GArray *news[NEWS_ARTICLE_TYPE_END];
++NewsPaper newspaper;
++GArray *transfer_list;
++GArray *season_stats;
++GArray *strategies;
++GArray *bets[2];
++gfloat current_interest;
++GArray *jobs, *job_teams;
++gint counters[COUNT_END];
++gint status[6];
++gpointer statp;
++gint selected_row;
++GArray *name_lists;
++Windows window;
++GArray *live_games;
++gint cur_user;
++gint timeout_id;
++GRand *rand_generator;
++gint debug_level, debug_output;
++GList *support_directories;
++GList *root_definitions_directories;
++GList *definitions_directories;
++gchar *save_file;
++gboolean os_is_unix;
++OptionList hints;
++
+ #define DEBUG_LEVEL_DEFAULT 0
+
+ #if defined(MAC_BUILD) || defined(G_OS_WIN32)
+--- a/src/variables.h
++++ b/src/variables.h
+@@ -33,89 +33,89 @@
+ * The main variable of the game.
+ * @see Country
+ */
+-Country country;
++extern Country country;
+
+ /** The array of human players. @see #User */
+-GArray *users;
++extern GArray *users;
+
+ /** The season, week and week round numbers.
+ We keep track of the time in the game with these variables. */
+-gint season, week, week_round;
++extern gint season, week, week_round;
+
+ /** Array of options that get read from
+ bygfoot.conf. */
+-OptionList options;
++extern OptionList options;
+ /** Array of constants that get read from the constants
+ file specified in bygfoot.conf. */
+-OptionList constants;
++extern OptionList constants;
+ /** Array of constants affecting game appearance rather than
+ behaviour. */
+-OptionList constants_app;
++extern OptionList constants_app;
+ /** Array with internal settings. */
+-OptionList settings;
++extern OptionList settings;
+ /* Array holding string replacement tokens. */
+-OptionList tokens;
++extern OptionList tokens;
+
+ /** The array containing the live game commentary strings. */
+-GArray *lg_commentary[LIVE_GAME_EVENT_END];
++extern GArray *lg_commentary[LIVE_GAME_EVENT_END];
+
+ /** The array containing the news article strings. */
+-GArray *news[NEWS_ARTICLE_TYPE_END];
++extern GArray *news[NEWS_ARTICLE_TYPE_END];
+
+ /** Newspaper containing the news articles. */
+-NewsPaper newspaper;
++extern NewsPaper newspaper;
+
+ /** The array containing players to be transfered.
+ @see TransferPlayer */
+-GArray *transfer_list;
++extern GArray *transfer_list;
+
+ /** Array with season statistics (updated at the
+ end of each season. */
+-GArray *season_stats;
++extern GArray *season_stats;
+
+ /** Array of available CPU strategies. */
+-GArray *strategies;
++extern GArray *strategies;
+
+ /** Array of current and recent bets. */
+-GArray *bets[2];
++extern GArray *bets[2];
+
+ /** Loan interest for the current week. */
+-gfloat current_interest;
++extern gfloat current_interest;
+
+ /** Array of jobs in the job exchange and
+ teams going with the international jobs. */
+-GArray *jobs, *job_teams;
++extern GArray *jobs, *job_teams;
+
+ /** Some counters we use. */
+-gint counters[COUNT_END];
++extern gint counters[COUNT_END];
+
+ /** These help us keep track of what's happening. */
+-gint status[6];
++extern gint status[6];
+
+ /** A pointer we store temporary stuff in. */
+-gpointer statp;
++extern gpointer statp;
+
+ /** The currently selected row in the treeview. */
+-gint selected_row;
++extern gint selected_row;
+
+ /** An array of name lists. */
+-GArray *name_lists;
++extern GArray *name_lists;
+
+ /** The struct containing the window pointers. */
+-Windows window;
++extern Windows window;
+
+ /** The variables for non-user live games (which aren't shown). */
+-GArray *live_games;
++extern GArray *live_games;
+
+ /** The index of the current user in the #users array. */
+-gint cur_user;
++extern gint cur_user;
+
+-gint timeout_id;
++extern gint timeout_id;
+
+-GRand *rand_generator;
++extern GRand *rand_generator;
+
+ /** Debug information. */
+-gint debug_level, debug_output;
++extern gint debug_level, debug_output;
+
+ /**
+ The list of directories the file_find_support_file() function
+@@ -123,24 +123,24 @@
+ @see file_find_support_file()
+ @see file_add_support_directory_recursive()
+ */
+-GList *support_directories;
++extern GList *support_directories;
+
+ /**
+ * The list of root defintions directories found (ending in definitions)
+ */
+-GList *root_definitions_directories;
++extern GList *root_definitions_directories;
+
+ /**
+ * The list of defintions directories found
+ */
+-GList *definitions_directories;
++extern GList *definitions_directories;
+
+ /** The name of the current save file (gets updated when a game is
+ saved or loaded). */
+-gchar *save_file;
++extern gchar *save_file;
+
+ /** Whether we are using a Unix system or Windows. */
+-gboolean os_is_unix;
++extern gboolean os_is_unix;
+
+ /** The hints displayed in the splash screen. */
+-OptionList hints;
++extern OptionList hints;
+--- a/src/xml_country.c
++++ b/src/xml_country.c
+@@ -65,7 +65,7 @@
+ /**
+ * The state variable used in the XML parsing functions.
+ */
+-gint state;
++extern gint state;
+ Country *cntry;
+
+ /**
+--- a/src/xml_cup.c
++++ b/src/xml_cup.c
+@@ -129,7 +129,7 @@
+ /**
+ * The state variable used in the XML parsing functions.
+ */
+-gint state;
++extern gint state;
+
+ /** The variable we will fill and append to an array. */
+ Cup new_cup;
+--- a/src/xml_league.c
++++ b/src/xml_league.c
+@@ -123,7 +123,7 @@
+ /**
+ * The state variable used in the XML parsing functions.
+ */
+-gint state;
++extern gint state;
+
+ /** The new league we create and append to an array. */
+ League new_league;
+--- a/src/xml_lg_commentary.c
++++ b/src/xml_lg_commentary.c
+@@ -80,7 +80,8 @@
+ STATE_END
+ };
+
+-gint state, commentary_idx, priority;
++extern gint state;
++gint commentary_idx, priority;
+ gchar *condition;
+
+ /** Return the appropriate enum integer going with the event string. */
+--- a/src/xml_loadsave_cup.c
++++ b/src/xml_loadsave_cup.c
+@@ -80,13 +80,13 @@
+ TAG_END
+ };
+
+-gint state;
+-Cup *new_cup;
+-CupChooseTeam new_choose_team;
+-CupRound new_round;
+-gchar *dirname;
+-WeekBreak new_week_break;
+-CupRoundWait new_wait;
++extern gint state;
++extern Cup *new_cup;
++extern CupChooseTeam new_choose_team;
++extern CupRound new_round;
++extern gchar *dirname;
++extern WeekBreak new_week_break;
++extern CupRoundWait new_wait;
+
+ void
+ xml_loadsave_cup_start_element (GMarkupParseContext *context,
+--- a/src/xml_loadsave_fixtures.c
++++ b/src/xml_loadsave_fixtures.c
+@@ -47,7 +47,8 @@
+ TAG_END
+ };
+
+-gint state, residx1, residx2, teamidx, nameidx;
++extern gint state;
++gint residx1, residx2, teamidx, nameidx;
+ Fixture new_fixture;
+ GArray *fixtures_array;
+
+--- a/src/xml_loadsave_jobs.c
++++ b/src/xml_loadsave_jobs.c
+@@ -48,7 +48,7 @@
+ TAG_END
+ };
+
+-gint state;
++extern gint state;
+ Job new_job;
+
+ void
+--- a/src/xml_loadsave_league.c
++++ b/src/xml_loadsave_league.c
+@@ -67,12 +67,13 @@
+ TAG_END
+ };
+
+-gint promrankidx, state;
++gint promrankidx;
++extern gint state;
+ PromRelElement new_element;
+ PromGames new_prom_games;
+-WeekBreak new_week_break;
+-League *new_league;
+-gchar *dirname;
++extern WeekBreak new_week_break;
++extern League *new_league;
++extern gchar *dirname;
+
+ void
+ xml_loadsave_league_start_element (GMarkupParseContext *context,
+--- a/src/xml_loadsave_leagues_cups.c
++++ b/src/xml_loadsave_leagues_cups.c
+@@ -44,7 +44,7 @@
+ TAG_END
+ };
+
+-gint state;
++extern gint state;
+ const gchar *dir;
+
+ void
+--- a/src/xml_loadsave_league_stat.c
++++ b/src/xml_loadsave_league_stat.c
+@@ -46,7 +46,8 @@
+ TAG_END
+ };
+
+-gint state, in_state, valueidx;
++extern gint state;
++gint in_state, valueidx;
+ Stat new_stat;
+ LeagueStat *lig_stat;
+
+--- a/src/xml_loadsave_live_game.c
++++ b/src/xml_loadsave_live_game.c
+@@ -63,7 +63,8 @@
+ TAG_END
+ };
+
+-gint state, unitidx,
++extern gint state;
++gint unitidx,
+ statvalidx, statvalidx2, statplidx, statplidx2,
+ team_name_idx;
+ LiveGameUnit new_unit;
+--- a/src/xml_loadsave_misc.c
++++ b/src/xml_loadsave_misc.c
+@@ -53,8 +53,9 @@
+ TAG_END
+ };
+
+-gint state, countidx, oddidx, betidx;
+-BetMatch new_bet;
++extern gint state;
++gint countidx, oddidx, betidx;
++extern BetMatch new_bet;
+
+ void
+ xml_loadsave_misc_start_element (GMarkupParseContext *context,
+--- a/src/xml_loadsave_newspaper.c
++++ b/src/xml_loadsave_newspaper.c
+@@ -49,8 +49,8 @@
+ TAG_END
+ };
+
+-gint state;
+-NewsPaperArticle new_article;
++extern gint state;
++extern NewsPaperArticle new_article;
+
+ void
+ xml_loadsave_newspaper_start_element (GMarkupParseContext *context,
+--- a/src/xml_loadsave_players.c
++++ b/src/xml_loadsave_players.c
+@@ -69,8 +69,9 @@
+ TAG_END
+ };
+
+-gint state, etalidx, careeridx;
+-Player new_player;
++extern gint state;
++gint etalidx, careeridx;
++extern Player new_player;
+ PlayerGamesGoals new_games_goals;
+ PlayerCard new_card;
+
+--- a/src/xml_loadsave_season_stats.c
++++ b/src/xml_loadsave_season_stats.c
+@@ -46,7 +46,7 @@
+ TAG_END
+ };
+
+-gint state, in_state;
++extern gint state, in_state;
+ ChampStat new_champ_stat;
+ SeasonStat new_season_stat;
+ const gchar *dirname2;
+--- a/src/xml_loadsave_table.c
++++ b/src/xml_loadsave_table.c
+@@ -38,8 +38,8 @@
+ TAG_END
+ };
+
+-gint state, valueidx;
+-TableElement new_element;
++extern gint state, valueidx;
++extern TableElement new_element;
+ Table *new_table;
+
+ void
+--- a/src/xml_loadsave_teams.c
++++ b/src/xml_loadsave_teams.c
+@@ -53,12 +53,9 @@
+ TAG_END
+ };
+
+-gint state, etalidx, careeridx;
++extern gint state;
+ GArray *teams_array;
+ Team new_team;
+-Player new_player;
+-PlayerGamesGoals new_games_goals;
+-PlayerCard new_card;
+
+ void
+ xml_loadsave_teams_start_element (GMarkupParseContext *context,
+--- a/src/xml_loadsave_transfers.c
++++ b/src/xml_loadsave_transfers.c
+@@ -46,7 +46,8 @@
+ TAG_END
+ };
+
+-gint state, feeidx, wageidx;
++extern gint state;
++gint feeidx, wageidx;
+ Transfer new_transfer;
+ TransferOffer new_offer;
+
+--- a/src/xml_loadsave_users.c
++++ b/src/xml_loadsave_users.c
+@@ -79,7 +79,8 @@
+ TAG_END
+ };
+
+-gint state, idx_mon_in, idx_mon_out, idx,
++extern gint state;
++gint idx_mon_in, idx_mon_out, idx,
+ idx_bet, idx_cnt;
+ User new_user;
+ UserHistory new_history;
+--- a/src/xml_mmatches.c
++++ b/src/xml_mmatches.c
+@@ -47,7 +47,7 @@
+ /**
+ * The state variable used in the XML parsing functions.
+ */
+-gint state;
++extern gint state;
+ MemMatch new_match;
+ gchar *dirname;
+ GArray *mm_array;
+--- a/src/xml_news.c
++++ b/src/xml_news.c
+@@ -59,8 +59,9 @@
+ STATE_END
+ };
+
+-gint state, article_idx, priority;
+-gchar *condition;
++extern gint state, priority;
++gint article_idx;
++extern gchar *condition;
+ NewsArticle new_article;
+ NewsText new_title, new_subtitle;
+
+--- a/src/xml_strategy.c
++++ b/src/xml_strategy.c
+@@ -91,7 +91,8 @@
+ STATE_STRATEGY_MATCH_ACTION_SUB_OUT_POS,
+ };
+
+-gint state, action_id;
++extern gint state;
++gint action_id;
+
+ #define curstrat g_array_index(strategies, Strategy, strategies->len - 1)
+ #define curprematch g_array_index(curstrat.prematch, StrategyPrematch, curstrat.prematch->len - 1)
+--- a/src/xml_team.c
++++ b/src/xml_team.c
+@@ -70,7 +70,8 @@
+ STATE_END
+ };
+
+-gint state, birth_year;
++extern gint state;
++gint birth_year;
+ Player new_player;
+ Team *team;
+ const gchar *d_file;