commit:     e98ac25f1e02a223b80897ac29f818ef5cab1d71
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Sat Feb 22 11:46:13 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 22 23:47:21 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e98ac25f

games-strategy/lgeneral: update EAPI 7 -> 8, fix build

Remove hardcoded CFLAGS, fix broken test, copy Debian patch for makefile,
remove pathologically many inlined functions that broke the linking.

Closes: https://bugs.gentoo.org/876337
Closes: https://bugs.gentoo.org/898992
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/40700
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../lgeneral/files/lgeneral-1.4.4-configure.patch  |  24 ++
 .../lgeneral-1.4.4-remove-defs-from-header.patch   |  29 ++
 .../lgeneral/files/lgeneral-1.4.4-uninline.patch   | 471 +++++++++++++++++++++
 .../lgeneral/files/update_autotools.patch          | 278 ++++++++++++
 ...neral-1.4.4.ebuild => lgeneral-1.4.4-r1.ebuild} |  16 +-
 5 files changed, 815 insertions(+), 3 deletions(-)

diff --git a/games-strategy/lgeneral/files/lgeneral-1.4.4-configure.patch 
b/games-strategy/lgeneral/files/lgeneral-1.4.4-configure.patch
new file mode 100644
index 000000000000..2e5d329b6124
--- /dev/null
+++ b/games-strategy/lgeneral/files/lgeneral-1.4.4-configure.patch
@@ -0,0 +1,24 @@
+Fix for hardcoding CFLAGS and broken test for mkdir
+https://bugs.gentoo.org/898992
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,10 +20,6 @@
+ AC_PROG_RANLIB
+ AM_PROG_CC_C_O
+ 
+-dnl various CFLAGS
+-CFLAGS="$CFLAGS -Wall -std=gnu89"
+-CFLAGS="$CFLAGS -O0 -g"
+-
+ dnl Checks for libraries.
+ AC_CHECK_LIB(m, main,, AC_MSG_ERROR(maths library is needed))
+ dnl AC_CHECK_LIB(dl, main,, AC_CHECK_LIB(c, dlopen,, AC_MSG_ERROR(dl library 
is needed)))
+@@ -35,7 +31,7 @@
+ dnl check for mkdir accepting permissions
+ AC_MSG_CHECKING(if mkdir rejects permissions)
+ ac_mkdir_perm_broken=yes
+-AC_TRY_COMPILE([#include <unistd.h>], [mkdir("test", 0777)], 
[ac_mkdir_perm_broken=no])
++AC_TRY_COMPILE([#include <sys/stat.h>], [mkdir("test", 0777)], 
[ac_mkdir_perm_broken=no])
+ if test x$ac_mkdir_perm_broken = xyes ; then
+   AC_DEFINE_UNQUOTED(HAVE_BROKEN_MKDIR, 1, [Defined if mkdir rejects a second 
permissions parameter.])
+ fi

diff --git 
a/games-strategy/lgeneral/files/lgeneral-1.4.4-remove-defs-from-header.patch 
b/games-strategy/lgeneral/files/lgeneral-1.4.4-remove-defs-from-header.patch
new file mode 100644
index 000000000000..ebd32a480c83
--- /dev/null
+++ b/games-strategy/lgeneral/files/lgeneral-1.4.4-remove-defs-from-header.patch
@@ -0,0 +1,29 @@
+Those functions are defined in hashtable_itr.c
+I think this was made for "speed", but it break compilation with GCC-15
+and is plainly unnecessary
+--- a/util/hashtable_itr.h
++++ b/util/hashtable_itr.h
+@@ -29,19 +29,13 @@
+  * - return the value of the (key,value) pair at the current position */
+ 
+-extern inline void *
+-hashtable_iterator_key(struct hashtable_itr *i)
+-{
+-    return i->e->k;
+-}
++extern void *
++hashtable_iterator_key(struct hashtable_itr *i);
+ 
+ 
/*****************************************************************************/
+ /* value - return the value of the (key,value) pair at the current position */
+ 
+-extern inline void *
++extern void *
+-hashtable_iterator_value(struct hashtable_itr *i)
+-{
+-    return i->e->v;
+-}
++hashtable_iterator_value(struct hashtable_itr *i);
+ 
+ 
/*****************************************************************************/
+ /* advance - advance the iterator to the next element

diff --git a/games-strategy/lgeneral/files/lgeneral-1.4.4-uninline.patch 
b/games-strategy/lgeneral/files/lgeneral-1.4.4-uninline.patch
new file mode 100644
index 000000000000..e81e52185708
--- /dev/null
+++ b/games-strategy/lgeneral/files/lgeneral-1.4.4-uninline.patch
@@ -0,0 +1,471 @@
+There was pathological amount of inlines, some of them caused warnings
+and linking failures. All of them are now removed. Modern compilers are
+smarter than that.
+https://bugs.gentoo.org/876337
+--- a/intl/gettextP.h
++++ b/intl/gettextP.h
+@@ -46,7 +46,7 @@
+ #else
+ static nls_uint32 SWAP PARAMS ((nls_uint32 i));
+ 
+-static inline nls_uint32
++static nls_uint32
+ SWAP (i)
+      nls_uint32 i;
+ {
+--- a/intl/hash-string.h
++++ b/intl/hash-string.h
+@@ -35,7 +35,7 @@
+    1986, 1987 Bell Telephone Laboratories, Inc.]  */
+ static unsigned long hash_string PARAMS ((const char *__str_param));
+ 
+-static inline unsigned long
++static unsigned long
+ hash_string (str_param)
+      const char *str_param;
+ {
+--- a/intl/l10nflist.c
++++ b/intl/l10nflist.c
+@@ -154,7 +154,7 @@
+ /* Return number of bits set in X.  */
+ static int pop PARAMS ((int x));
+ 
+-static inline int
++static int
+ pop (x)
+      int x;
+ {
+--- a/lgc-pg/misc.c
++++ b/lgc-pg/misc.c
+@@ -27,27 +27,27 @@
+ extern char *dest_path;
+ 
+ /* compares to strings and returns true if their first strlen(str1) chars are 
equal */
+-inline int equal_str( char *str1, char *str2 )
++int equal_str( char *str1, char *str2 )
+ {
+     if ( strlen( str1 ) != strlen( str2 ) ) return 0;
+     return ( !strncmp( str1, str2, strlen( str1 ) ) );
+ }
+ 
+ /* set delay to ms milliseconds */
+-inline void set_delay( Delay *delay, int ms )
++void set_delay( Delay *delay, int ms )
+ {
+     delay->limit = ms;
+     delay->cur = 0;
+ }
+ 
+ /* reset delay ( cur = 0 )*/
+-inline void reset_delay( Delay *delay )
++void reset_delay( Delay *delay )
+ {
+     delay->cur = 0;
+ }
+ 
+ /* check if times out and reset */
+-inline int timed_out( Delay *delay, int ms )
++int timed_out( Delay *delay, int ms )
+ {
+     delay->cur += ms;
+     if ( delay->cur >= delay->limit ) {
+@@ -60,7 +60,7 @@
+ }
+ 
+ 
+-inline void goto_tile( int *x, int *y, int d )
++void goto_tile( int *x, int *y, int d )
+ {
+     /*  0 -up, clockwise, 5 - left up */
+     switch ( d ) {
+--- a/lgc-pg/misc.h
++++ b/lgc-pg/misc.h
+@@ -52,13 +52,13 @@
+ } Delay;
+ 
+ /* set delay to ms milliseconds */
+-inline void set_delay( Delay *delay, int ms );
++void set_delay( Delay *delay, int ms );
+ 
+ /* reset delay ( cur = 0 )*/
+-inline void reset_delay( Delay *delay );
++void reset_delay( Delay *delay );
+ 
+ /* check if time's out ( add ms milliseconds )and reset */
+-inline int timed_out( Delay *delay, int ms );
++int timed_out( Delay *delay, int ms );
+ 
+ /* return distance betwteen to map positions */
+ int get_dist( int x1, int y1, int x2, int y2 );
+--- a/lged/lged.c
++++ b/lged/lged.c
+@@ -356,7 +356,7 @@
+     free((void *)path);
+     
+     if (within_source_tree)
+-      verbosef(2, "Source tree detected. Using inline paths.\n");
++      verbosef(2, "Source tree detected. Using paths.\n");
+   }
+   
+   /* get path for unitdb */
+@@ -387,7 +387,7 @@
+ }
+ 
+ /** returns 1 if criterion is to be omitted */
+-inline static int is_omitted(const char *criterion) {
++static int is_omitted(const char *criterion) {
+   return !criterion || strcmp(criterion, "-") == 0 || strcmp(criterion, "*") 
== 0;
+ }
+ 
+@@ -407,7 +407,7 @@
+  * of ary. If found, the index of the first element is returned,
+  * -1 otherwise. 'i' is the starting index, 'sz' the size of the array.
+  */
+-inline static int find_in_array(const char *needle, int i, const char **ary, 
int sz) {
++static int find_in_array(const char *needle, int i, const char **ary, int sz) 
{
+   for (; i < sz; i++)
+     if (strcasestr(ary[i], needle)) return i;
+   return -1;
+@@ -430,7 +430,7 @@
+  * returns 1 if 'bitmap' is true at position 'idx'. 'sz' is the size of
+  * the bitmap.
+  */
+-inline static int in_bitmap(int idx, const char *bitmap, int sz) {
++static int in_bitmap(int idx, const char *bitmap, int sz) {
+   return idx >= 0 && idx < sz && bitmap[idx];
+ }
+ 
+--- a/src/campaign.c
++++ b/src/campaign.c
+@@ -135,7 +135,7 @@
+ }
+ 
+ /** resolve key within entries and translate the result wrt domain */
+-inline static char *camp_resolve_ref_localized(PData *entries, const char 
*key, const char *scen_stat, const char *domain)
++static char *camp_resolve_ref_localized(PData *entries, const char *key, 
const char *scen_stat, const char *domain)
+ {
+     const char *res = camp_resolve_ref(entries, key, scen_stat);
+     return res ? strdup(trd(domain, res)) : 0;
+--- a/src/engine.c
++++ b/src/engine.c
+@@ -375,7 +375,7 @@
+ Returns true when the status screen dismission events took place.
+ ====================================================================
+ */
+-inline static int engine_status_screen_dismissed()
++static int engine_status_screen_dismissed()
+ {
+     int dummy;
+     return event_get_buttonup( &dummy, &dummy, &dummy )
+--- a/src/gui.c
++++ b/src/gui.c
+@@ -1691,7 +1691,7 @@
+ }
+ 
+ /** unite with existing repaint rectangle */
+-inline static void message_pane_unite_repaint_rect(MessagePane *pane, int x1, 
int y1, int x2, int y2)
++static void message_pane_unite_repaint_rect(MessagePane *pane, int x1, int 
y1, int x2, int y2)
+ {
+     if ((pane->refresh_x2 - pane->refresh_x1) <= 0
+         || (pane->refresh_y2 - pane->refresh_y1) <= 0) {
+--- a/src/lg-sdl.c
++++ b/src/lg-sdl.c
+@@ -35,7 +35,7 @@
+ /* sdl surface */
+ 
+ /* return full path of bitmap */
+-inline void get_full_bmp_path( char *full_path, const char *file_name )
++void get_full_bmp_path( char *full_path, const char *file_name )
+ {
+     sprintf(full_path,  "%s/gfx/%s", get_gamedir(), file_name );
+ }
+@@ -119,7 +119,7 @@
+ /*
+     lock surface
+ */
+-inline void lock_surf(SDL_Surface *sur)
++void lock_surf(SDL_Surface *sur)
+ {
+     if (SDL_MUSTLOCK(sur))
+         SDL_LockSurface(sur);
+@@ -128,7 +128,7 @@
+ /*
+     unlock surface
+ */
+-inline void unlock_surf(SDL_Surface *sur)
++void unlock_surf(SDL_Surface *sur)
+ {
+     if (SDL_MUSTLOCK(sur))
+         SDL_UnlockSurface(sur);
+@@ -477,7 +477,7 @@
+ /*
+     lock font surface
+ */
+-inline void lock_font(Font *fnt)
++void lock_font(Font *fnt)
+ {
+     if (SDL_MUSTLOCK(fnt->pic))
+         SDL_LockSurface(fnt->pic);
+@@ -486,7 +486,7 @@
+ /*
+     unlock font surface
+ */
+-inline void unlock_font(Font *fnt)
++void unlock_font(Font *fnt)
+ {
+     if (SDL_MUSTLOCK(fnt->pic))
+         SDL_UnlockSurface(fnt->pic);
+@@ -501,7 +501,7 @@
+     return rect;
+ }
+ 
+-inline int  char_width(Font *fnt, char c)
++int  char_width(Font *fnt, char c)
+ {
+     unsigned i = (unsigned char)c;
+     return fnt->char_offset[i + 1] - fnt->char_offset[i];
+@@ -844,7 +844,7 @@
+ /*
+     lock surface
+ */
+-inline void lock_screen()
++void lock_screen()
+ {
+     if (SDL_MUSTLOCK(sdl.screen))
+         SDL_LockSurface(sdl.screen);
+@@ -853,7 +853,7 @@
+ /*
+     unlock surface
+ */
+-inline void unlock_screen()
++void unlock_screen()
+ {
+     if (SDL_MUSTLOCK(sdl.screen))
+         SDL_UnlockSurface(sdl.screen);
+@@ -862,7 +862,7 @@
+ /*
+     flip hardware screens (double buffer)
+ */
+-inline void flip_screen()
++void flip_screen()
+ {
+     SDL_Flip(sdl.screen);
+ }
+--- a/src/lg-sdl.h
++++ b/src/lg-sdl.h
+@@ -43,8 +43,8 @@
+ SDL_Surface* create_surf(int w, int h, int f);
+ void free_surf( SDL_Surface **surf );
+ int  disp_format(SDL_Surface *sur);
+-inline void lock_surf(SDL_Surface *sur);
+-inline void unlock_surf(SDL_Surface *sur);
++void lock_surf(SDL_Surface *sur);
++void unlock_surf(SDL_Surface *sur);
+ void blit_surf(void);
+ void alpha_blit_surf(int alpha);
+ void fill_surf(int c);
+@@ -93,8 +93,8 @@
+ void free_font(Font **sfnt);
+ int  write_text(Font *sfnt, SDL_Surface *dest, int x, int y, const char *str, 
int alpha);
+ void write_line( SDL_Surface *surf, Font *font, const char *str, int x, int 
*y );
+-inline void lock_font(Font *sfnt);
+-inline void unlock_font(Font *sfnt);
++void lock_font(Font *sfnt);
++void unlock_font(Font *sfnt);
+ SDL_Rect last_write_rect(Font *fnt);
+ int  text_width(Font *fnt, const char *str);
+ int  char_width(Font *fnt, char c);
+@@ -132,9 +132,9 @@
+ void undim_screen(int steps, int delay, int trp);
+ int  wait_for_key();
+ void wait_for_click();
+-inline void lock_screen();
+-inline void unlock_screen();
+-inline void flip_screen();
++void lock_screen();
++void unlock_screen();
++void flip_screen();
+ 
+ /* cursor */
+ /* creates cursor */
+--- a/src/misc.c
++++ b/src/misc.c
+@@ -29,27 +29,27 @@
+ extern int map_w, map_h; /* FIX ME! */
+ 
+ /* compares to strings and returns true if their first strlen(str1) chars are 
equal */
+-inline int equal_str( const char *str1, const char *str2 )
++int equal_str( const char *str1, const char *str2 )
+ {
+     if ( strlen( str1 ) != strlen( str2 ) ) return 0;
+     return ( !strncmp( str1, str2, strlen( str1 ) ) );
+ }
+ 
+ /* set delay to ms milliseconds */
+-inline void set_delay( Delay *delay, int ms )
++void set_delay( Delay *delay, int ms )
+ {
+     delay->limit = ms;
+     delay->cur = 0;
+ }
+ 
+ /* reset delay ( cur = 0 )*/
+-inline void reset_delay( Delay *delay )
++void reset_delay( Delay *delay )
+ {
+     delay->cur = 0;
+ }
+ 
+ /* check if times out and reset */
+-inline int timed_out( Delay *delay, int ms )
++int timed_out( Delay *delay, int ms )
+ {
+     delay->cur += ms;
+     if ( delay->cur >= delay->limit ) {
+@@ -62,7 +62,7 @@
+ }
+ 
+ /* Convert grid coordinates into isometric (diagonal) coordinates. */
+-inline static void convert_coords_to_diag( int *x, int *y )
++static void convert_coords_to_diag( int *x, int *y )
+ {
+   *y += (*x + 1) / 2;
+ }
+@@ -126,13 +126,13 @@
+ }
+ 
+ /** return 1 if ch is a line breaking character */
+-inline static int text_is_linebreak(char ch)
++static int text_is_linebreak(char ch)
+ {
+     return ch == '#';
+ }
+ 
+ /** return 1 if text is breakable just before end */
+-inline static int text_is_breakable(const char *begin, const char *end)
++static int text_is_breakable(const char *begin, const char *end)
+ {
+     return begin != end
+             && (end[-1] == '\t' || end[-1] == '\n' || end[-1] == ' '
+--- a/src/misc.h
++++ b/src/misc.h
+@@ -101,13 +101,13 @@
+ } Delay;
+ 
+ /* set delay to ms milliseconds */
+-inline void set_delay( Delay *delay, int ms );
++void set_delay( Delay *delay, int ms );
+ 
+ /* reset delay ( cur = 0 )*/
+-inline void reset_delay( Delay *delay );
++void reset_delay( Delay *delay );
+ 
+ /* check if time's out ( add ms milliseconds )and reset */
+-inline int timed_out( Delay *delay, int ms );
++int timed_out( Delay *delay, int ms );
+ 
+ /* return distance betwteen to map positions */
+ int get_dist( int x1, int y1, int x2, int y2 );
+--- a/src/parser.c
++++ b/src/parser.c
+@@ -51,11 +51,11 @@
+     free(ctd->filename);
+ }
+ 
+-static inline void common_tree_data_ref(struct CommonTreeData *ctd) {
++static void common_tree_data_ref(struct CommonTreeData *ctd) {
+     ctd->ref++;
+ }
+ 
+-static inline int common_tree_data_deref(struct CommonTreeData *ctd) {
++static int common_tree_data_deref(struct CommonTreeData *ctd) {
+     int del = --ctd->ref == 0;
+     if (del) common_tree_data_delete(ctd);
+     return del;
+@@ -115,7 +115,7 @@
+ Returns whether this is a valid character for a string.
+ ====================================================================
+ */
+-inline static int parser_is_valid_string_char(char ch)
++static int parser_is_valid_string_char(char ch)
+ {
+     switch (ch) {
+     case '$': case '/': case '@': case '_': case '.': case ':': case '~':
+@@ -272,7 +272,7 @@
+ and return the new position.
+ ====================================================================
+ */
+-static inline const char* string_ignore_whitespace( const char *string )
++static const char* string_ignore_whitespace( const char *string )
+ {
+     while ( *string != 0 && (unsigned char)*string <= 32 ) string++;
+     return string;
+@@ -286,7 +286,7 @@
+ hours of precious sleep.
+ ====================================================================
+ */
+-static inline PData *parser_create_pdata( char *name, List *values, int 
lineno, struct CommonTreeData *ctd )
++static PData *parser_create_pdata( char *name, List *values, int lineno, 
struct CommonTreeData *ctd )
+ {
+     PData *pd = calloc(1, sizeof(PData));
+     pd->name = name;
+--- a/src/slot.c
++++ b/src/slot.c
+@@ -157,7 +157,7 @@
+     /* we always write the platform-specific endianness */
+     fwrite( &i, sizeof( int ), 1, file );
+ }
+-static inline int load_int( FILE *file )
++static int load_int( FILE *file )
+ {
+     return try_load_int( file, 0 );
+ }
+@@ -186,7 +186,7 @@
+ {
+     fwrite( &p, sizeof( void * ), 1, file );
+ }
+-static inline void *load_pointer( FILE *file )
++static void *load_pointer( FILE *file )
+ {
+     return try_load_pointer( file, 0 );
+ }
+--- a/util/hashtable_private.h
++++ b/util/hashtable_private.h
+@@ -30,13 +30,13 @@
+ 
+ 
/*****************************************************************************/
+ /* indexFor */
+-static inline unsigned int
++static unsigned int
+ indexFor(unsigned int tablelength, unsigned int hashvalue) {
+     return (hashvalue % tablelength);
+ };
+ 
+ /* Only works if tablelength == 2^N */
+-/*static inline unsigned int
++/*static unsigned int
+ indexFor(unsigned int tablelength, unsigned int hashvalue)
+ {
+     return (hashvalue & (tablelength - 1u));
+--- a/util/localize.c
++++ b/util/localize.c
+@@ -71,7 +71,7 @@
+ }
+ 
+ /** returns the domain-map */
+-static inline struct hashtable *domain_map_instance() {
++static struct hashtable *domain_map_instance() {
+   if (!domain_map) {
+     domain_map = create_hashtable(10, (unsigned int (*) (void*))hash_string,
+                               (int (*)(void *, void *))strcmp,
+--- a/util/localize.h
++++ b/util/localize.h
+@@ -37,7 +37,7 @@
+ /** shorthand for fetching translation of default domain */
+ #  define tr(s) gettext (s)
+ /** shorthand for fetching translation of specified domain */
+-inline static const char *trd(const char *dom, const char *s) { return *(s) ? 
dgettext ((dom), (s)) : ""; }
++static const char *trd(const char *dom, const char *s) { return *(s) ? 
dgettext ((dom), (s)) : ""; }
+ /** shorthand for marking for translation of default domain */
+ #  define TR_NOOP(s) (s)
+ 

diff --git a/games-strategy/lgeneral/files/update_autotools.patch 
b/games-strategy/lgeneral/files/update_autotools.patch
new file mode 100644
index 000000000000..10db89905c46
--- /dev/null
+++ b/games-strategy/lgeneral/files/update_autotools.patch
@@ -0,0 +1,278 @@
+Debian patch, from
+https://sources.debian.org/patches/lgeneral/1.4.4-4/update_autotools.patch/
+Index: lgeneral/configure.ac
+===================================================================
+--- lgeneral.orig/configure.ac
++++ lgeneral/configure.ac
+@@ -30,7 +30,7 @@ dnl AC_CHECK_LIB(dl, main,, AC_CHECK_LIB
+ dnl AC_CHECK_LIB(dl, main,, AC_MSG_ERROR(dl library is needed))
+ 
+ dnl Checks for functions.
+-AC_CHECK_FUNCS(strcasestr)
++AC_CHECK_FUNCS(setenv strcasestr)
+ 
+ dnl check for mkdir accepting permissions
+ AC_MSG_CHECKING(if mkdir rejects permissions)
+@@ -44,8 +44,8 @@ AC_MSG_RESULT($ac_mkdir_perm_broken)
+ dnl L10n support
+ ALL_LINGUAS="en de"
+ 
+-AC_GNU_SOURCE
+-AM_GNU_GETTEXT
++AM_GNU_GETTEXT([external])
++AM_GNU_GETTEXT_REQUIRE_VERSION([0.21])
+ 
+ dnl win32 stuff
+ dnl USE_NLS=no
+@@ -90,16 +90,6 @@ if test x$USE_INCLUDED_LIBINTL = xyes ;
+   INTLINCLUDES="-I\$(top_srcdir)/intl -I\$(top_builddir)/intl"
+ fi
+ 
+-dnl newer versions of gettext don't support CATALOGS -> create it here
+-if test "x$CATALOGS" = x ; then
+-  AC_MSG_CHECKING(for catalogs to be installed);
+-  for l in $ALL_LINGUAS ; do
+-    CATALOGS="$CATALOGS$l$CATOBJEXT "
+-  done
+-  AC_MSG_RESULT($ALL_LINGUAS)
+-  AC_SUBST(CATALOGS)
+-fi
+-
+ dnl newer versions of gettext don't export POFILES and GMOFILES
+ dnl export them here to stay compatible with older versions
+ if test "x$POFILES" = x ; then
+@@ -176,18 +166,5 @@ inst_flag=)
+ AC_SUBST(inst_dir)
+ AC_SUBST(inst_flag)
+ 
+-# create Makefiles for Makefile.ins in po-subdirectories.
+-# FIXME! autoconf is simply too stupid to grok that for-loop
+-#for ac_domain in lgeneral ; do
+-  AC_CONFIG_COMMANDS([po-lgeneral],
+-     [case "$CONFIG_FILES" in *po/lgeneral/Makefile.in*)
+-        sed -e "/POTFILES =/r po/lgeneral/POTFILES" po/lgeneral/Makefile.in > 
po/lgeneral/Makefile
+-      esac])
+-  AC_CONFIG_COMMANDS([po-pg],
+-     [case "$CONFIG_FILES" in *po/pg/Makefile.in*)
+-        cat po/pg/Makefile.in > po/pg/Makefile
+-      esac])
+-#done
+-
+-AC_OUTPUT(Makefile lged/Makefile lgc-pg/Makefile lgc-pg/convdata/Makefile 
src/Makefile src/nations/Makefile src/scenarios/Makefile src/units/Makefile 
src/sounds/Makefile src/music/Makefile src/terrain/Makefile src/maps/Makefile 
src/gfx/Makefile  src/gfx/flags/Makefile src/gfx/terrain/Makefile 
src/gfx/units/Makefile src/ai_modules/Makefile src/campaigns/Makefile 
src/themes/Makefile src/themes/default/Makefile util/Makefile intl/Makefile 
po/Makefile po/lgeneral/Makefile.in po/pg/Makefile.in tools/Makefile 
tools/ltrextract/Makefile)
++AC_OUTPUT(Makefile lged/Makefile lgc-pg/Makefile lgc-pg/convdata/Makefile 
src/Makefile src/nations/Makefile src/scenarios/Makefile src/units/Makefile 
src/sounds/Makefile src/music/Makefile src/terrain/Makefile src/maps/Makefile 
src/gfx/Makefile  src/gfx/flags/Makefile src/gfx/terrain/Makefile 
src/gfx/units/Makefile src/ai_modules/Makefile src/campaigns/Makefile 
src/themes/Makefile src/themes/default/Makefile util/Makefile po/Makefile 
po/lgeneral/Makefile.in po/pg/Makefile.in tools/Makefile 
tools/ltrextract/Makefile)
+ 
+Index: lgeneral/Makefile.am
+===================================================================
+--- lgeneral.orig/Makefile.am
++++ lgeneral/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = intl util lged lgc-pg src tools po
++SUBDIRS = util lged lgc-pg src tools po
+ 
+ EXTRA_DIST = AUTHORS COPYING ChangeLog README.lgeneral \
+ README.lgc-pg README.redit TODO \
+Index: lgeneral/acconfig.h
+===================================================================
+--- lgeneral.orig/acconfig.h
++++ /dev/null
+@@ -1,20 +0,0 @@
+-#undef ENABLE_NLS
+-#undef HAVE_CATGETS
+-#undef HAVE_GETTEXT
+-#undef HAVE_LC_MESSAGES
+-#undef HAVE_STPCPY
+-#undef HAVE_LIBSM
+-#undef PACKAGE_LOCALE_DIR
+-#undef PACKAGE_DOC_DIR
+-#undef PACKAGE_DATA_DIR
+-#undef PACKAGE_PIXMAPS_DIR
+-#undef PACKAGE_HELP_DIR
+-#undef PACKAGE_MENU_DIR
+-#undef PACKAGE_SOURCE_DIR
+-
+-@BOTTOM@
+-
+-#ifdef HAVE_BROKEN_MKDIR
+-#  include <direct.h>
+-#  define mkdir(s,p) _mkdir(s)
+-#endif
+Index: lgeneral/po/lgeneral/Makevars
+===================================================================
+--- /dev/null
++++ lgeneral/po/lgeneral/Makevars
+@@ -0,0 +1,82 @@
++# Makefile variables for PO directory in any package using GNU gettext.
++#
++# Copyright (C) 2003-2019 Free Software Foundation, Inc.
++# This file is free software; the Free Software Foundation gives
++# unlimited permission to use, copy, distribute, and modify it.
++
++# Usually the message domain is the same as the package name.
++DOMAIN = lgeneral
++
++# These two variables depend on the location of this directory.
++subdir = $(DOMAIN)
++top_builddir = ../..
++
++# These options get passed to xgettext.
++XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
++
++# This is the copyright holder that gets inserted into the header of the
++# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
++# package.  (Note that the msgstr strings, extracted from the package's
++# sources, belong to the copyright holder of the package.)  Translators are
++# expected to transfer the copyright for their translations to this person
++# or entity, or to disclaim their copyright.  The empty string stands for
++# the public domain; in this case the translators are expected to disclaim
++# their copyright.
++COPYRIGHT_HOLDER = Free Software Foundation, Inc.
++
++# This tells whether or not to prepend "GNU " prefix to the package
++# name that gets inserted into the header of the $(DOMAIN).pot file.
++# Possible values are "yes", "no", or empty.  If it is empty, try to
++# detect it automatically by scanning the files in $(top_srcdir) for
++# "GNU packagename" string.
++PACKAGE_GNU =
++
++# This is the email address or URL to which the translators shall report
++# bugs in the untranslated strings:
++# - Strings which are not entire sentences, see the maintainer guidelines
++#   in the GNU gettext documentation, section 'Preparing Strings'.
++# - Strings which use unclear terms or require additional context to be
++#   understood.
++# - Strings which make invalid assumptions about notation of date, time or
++#   money.
++# - Pluralisation problems.
++# - Incorrect English spelling.
++# - Incorrect formatting.
++# It can be your email address, or a mailing list address where translators
++# can write to without being subscribed, or the URL of a web page through
++# which the translators can contact you.
++MSGID_BUGS_ADDRESS =
++
++# This is the list of locale categories, beyond LC_MESSAGES, for which the
++# message catalogs shall be used.  It is usually empty.
++EXTRA_LOCALE_CATEGORIES =
++
++# This tells whether the $(DOMAIN).pot file contains messages with an 
'msgctxt'
++# context.  Possible values are "yes" and "no".  Set this to yes if the
++# package uses functions taking also a message context, like pgettext(), or
++# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
++USE_MSGCTXT = no
++
++# These options get passed to msgmerge.
++# Useful options are in particular:
++#   --previous            to keep previous msgids of translated messages,
++#   --quiet               to reduce the verbosity.
++MSGMERGE_OPTIONS =
++
++# These options get passed to msginit.
++# If you want to disable line wrapping when writing PO files, add
++# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
++# MSGINIT_OPTIONS.
++MSGINIT_OPTIONS =
++
++# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
++# has changed.  Possible values are "yes" and "no".  Set this to no if
++# the POT file is checked in the repository and the version control
++# program ignores timestamps.
++PO_DEPENDS_ON_POT = yes
++
++# This tells whether or not to forcibly update $(DOMAIN).pot and
++# regenerate PO files on "make dist".  Possible values are "yes" and
++# "no".  Set this to no if the POT file and PO files are maintained
++# externally.
++DIST_DEPENDS_ON_UPDATE_PO = yes
+Index: lgeneral/po/pg/Makevars
+===================================================================
+--- /dev/null
++++ lgeneral/po/pg/Makevars
+@@ -0,0 +1,82 @@
++# Makefile variables for PO directory in any package using GNU gettext.
++#
++# Copyright (C) 2003-2019 Free Software Foundation, Inc.
++# This file is free software; the Free Software Foundation gives
++# unlimited permission to use, copy, distribute, and modify it.
++
++# Usually the message domain is the same as the package name.
++DOMAIN = pg
++
++# These two variables depend on the location of this directory.
++subdir = $(DOMAIN)
++top_builddir = ../..
++
++# These options get passed to xgettext.
++XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
++
++# This is the copyright holder that gets inserted into the header of the
++# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
++# package.  (Note that the msgstr strings, extracted from the package's
++# sources, belong to the copyright holder of the package.)  Translators are
++# expected to transfer the copyright for their translations to this person
++# or entity, or to disclaim their copyright.  The empty string stands for
++# the public domain; in this case the translators are expected to disclaim
++# their copyright.
++COPYRIGHT_HOLDER = Free Software Foundation, Inc.
++
++# This tells whether or not to prepend "GNU " prefix to the package
++# name that gets inserted into the header of the $(DOMAIN).pot file.
++# Possible values are "yes", "no", or empty.  If it is empty, try to
++# detect it automatically by scanning the files in $(top_srcdir) for
++# "GNU packagename" string.
++PACKAGE_GNU =
++
++# This is the email address or URL to which the translators shall report
++# bugs in the untranslated strings:
++# - Strings which are not entire sentences, see the maintainer guidelines
++#   in the GNU gettext documentation, section 'Preparing Strings'.
++# - Strings which use unclear terms or require additional context to be
++#   understood.
++# - Strings which make invalid assumptions about notation of date, time or
++#   money.
++# - Pluralisation problems.
++# - Incorrect English spelling.
++# - Incorrect formatting.
++# It can be your email address, or a mailing list address where translators
++# can write to without being subscribed, or the URL of a web page through
++# which the translators can contact you.
++MSGID_BUGS_ADDRESS =
++
++# This is the list of locale categories, beyond LC_MESSAGES, for which the
++# message catalogs shall be used.  It is usually empty.
++EXTRA_LOCALE_CATEGORIES =
++
++# This tells whether the $(DOMAIN).pot file contains messages with an 
'msgctxt'
++# context.  Possible values are "yes" and "no".  Set this to yes if the
++# package uses functions taking also a message context, like pgettext(), or
++# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
++USE_MSGCTXT = no
++
++# These options get passed to msgmerge.
++# Useful options are in particular:
++#   --previous            to keep previous msgids of translated messages,
++#   --quiet               to reduce the verbosity.
++MSGMERGE_OPTIONS =
++
++# These options get passed to msginit.
++# If you want to disable line wrapping when writing PO files, add
++# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
++# MSGINIT_OPTIONS.
++MSGINIT_OPTIONS =
++
++# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
++# has changed.  Possible values are "yes" and "no".  Set this to no if
++# the POT file is checked in the repository and the version control
++# program ignores timestamps.
++PO_DEPENDS_ON_POT = yes
++
++# This tells whether or not to forcibly update $(DOMAIN).pot and
++# regenerate PO files on "make dist".  Possible values are "yes" and
++# "no".  Set this to no if the POT file and PO files are maintained
++# externally.
++DIST_DEPENDS_ON_UPDATE_PO = yes
+Index: lgeneral/po/pg/POTFILES.in
+===================================================================
+--- /dev/null
++++ lgeneral/po/pg/POTFILES.in
+@@ -0,0 +1 @@
++po/pg/pg-translations.c

diff --git a/games-strategy/lgeneral/lgeneral-1.4.4.ebuild 
b/games-strategy/lgeneral/lgeneral-1.4.4-r1.ebuild
similarity index 82%
rename from games-strategy/lgeneral/lgeneral-1.4.4.ebuild
rename to games-strategy/lgeneral/lgeneral-1.4.4-r1.ebuild
index f35921ed74bd..2b06651fa939 100644
--- a/games-strategy/lgeneral/lgeneral-1.4.4.ebuild
+++ b/games-strategy/lgeneral/lgeneral-1.4.4-r1.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
-inherit readme.gentoo-r1 toolchain-funcs xdg
+inherit readme.gentoo-r1 toolchain-funcs xdg autotools
 
 DESCRIPTION="Turn-based strategy game heavily inspired by the classic Panzer 
General"
 HOMEPAGE="https://lgames.sourceforge.io/LGeneral/";
@@ -24,8 +24,18 @@ BDEPEND="sys-devel/gettext"
 
 PATCHES=(
        "${FILESDIR}"/${PN}-1.4.3-fix-utf8.patch
+       "${FILESDIR}"/update_autotools.patch
+       "${FILESDIR}"/${PN}-1.4.4-configure.patch
+       "${FILESDIR}"/${PN}-1.4.4-remove-defs-from-header.patch
+       "${FILESDIR}"/${PN}-1.4.4-uninline.patch
 )
 
+src_prepare() {
+       default
+
+       eautoreconf
+}
+
 src_compile() {
        emake AR="$(tc-getAR)"
 }

Reply via email to