summaryrefslogtreecommitdiff
path: root/games-strategy/lgeneral
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-02-23 19:24:10 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-02-23 19:24:10 +0000
commit575bcb9220287a6f0d2577db1fd9fe55d9d8b745 (patch)
tree52f12cfa140d4839d32305dd42eebe34e9686234 /games-strategy/lgeneral
parent4c5bd80830992553e02f099442277e10ee97372d (diff)
gentoo auto-resync : 23:02:2025 - 19:24:09
Diffstat (limited to 'games-strategy/lgeneral')
-rw-r--r--games-strategy/lgeneral/Manifest6
-rw-r--r--games-strategy/lgeneral/files/lgeneral-1.4.4-configure.patch24
-rw-r--r--games-strategy/lgeneral/files/lgeneral-1.4.4-remove-defs-from-header.patch29
-rw-r--r--games-strategy/lgeneral/files/lgeneral-1.4.4-uninline.patch471
-rw-r--r--games-strategy/lgeneral/files/update_autotools.patch278
-rw-r--r--games-strategy/lgeneral/lgeneral-1.4.4-r1.ebuild (renamed from games-strategy/lgeneral/lgeneral-1.4.4.ebuild)16
6 files changed, 820 insertions, 4 deletions
diff --git a/games-strategy/lgeneral/Manifest b/games-strategy/lgeneral/Manifest
index 1f9316340ece..b8e5da356d58 100644
--- a/games-strategy/lgeneral/Manifest
+++ b/games-strategy/lgeneral/Manifest
@@ -1,5 +1,9 @@
AUX lgeneral-1.4.3-fix-utf8.patch 466 BLAKE2B ccfdc447ddf0eaf24ac56989007277c4e94f48fe69dfb4dc1030a8c80c5764b8dbc84876f539c4fb99703f578c69ac8ba2b49ecf61e69f31d0621d06379feef0 SHA512 abccea722ea34de06832525b5c936c829119327b44421655884fe7f648bab0b9dcea104543dcf1d2a363ceda55bb74edf360b60a30608e50aca865b1c975a02a
+AUX lgeneral-1.4.4-configure.patch 905 BLAKE2B ebf603e4b8a3f7b97aca47fbc32ecb7ae078a54005b28f18e1f95f365e385c20d60fdbc39052e3ddfa85f4bc74cd57f3a022a339b2000eb925f895f2620fcd66 SHA512 45c5db5492ccc7d378623c9c70e6c3d3102015ca92f410c4af285ac9e6888d694efd634651c11e804b4a8027a57c61906696421af7b8655cd95c777b3fd0124c
+AUX lgeneral-1.4.4-remove-defs-from-header.patch 929 BLAKE2B d41d1d34c6d5d3ec10fdb08aca2f14dbcaa6c2d86d99827d84f398bd15ab89ef60776b162e46c438523f1081030193328ea7f6c492a34257f66827e4537705a4 SHA512 f453a1d7126c8e21bd05ff8222b26cc0dbc026af5f22a7c012f22a6782c4bd34e5335f625f83af922cedf3b2c1831e8ceb9b528b98e9a7a71056468be9db5d74
+AUX lgeneral-1.4.4-uninline.patch 13731 BLAKE2B 81b76c43a443112662e861bc685d6ad3b70cc5ab345cf67212dae888bc497d54eccf17d6474c4a50daf58c866f4d8123417dd7f04c512cd4aa2b086e8f09f0e7 SHA512 705b32dd73206237c506eafd512c10d87aea08588223a25997b3b179e29b8e54dce711440e26d8fcd39b0a374670c2d978625c873ff59be535a501c26f95cc87
+AUX update_autotools.patch 11749 BLAKE2B e61e3745003bb7f0f1550def29b24b08a8ebd8dd5dd93eddce9b21cffecde03ad00f77639e400e75b75351ed02e14942acf5f3cd566a717b2735bf2751d2bec8 SHA512 5fae1b45437adf8783287bfc9bb5982675a207230a88867678f8ec9b9ed30ece2f7c9af9fa33b6cf2ffa72eb8cea7d8bc5f6678b43b29df2f3d900429fa7a7e8
DIST kukgen-data-1.1.tar.gz 1883592 BLAKE2B 66e901696210173bccc4cd463aa30cf0bff1e1115597f1a266b1364df229f8749fb324fe12814efef01d73c8360ba6feb96c05b9b2f7ba59d3512445fd268944 SHA512 239c59924943627ab7ef3dac3283884cf34c8a299bc8974aae0ddcf180c95dcecd6e1b3eb1c69b5db39dbfa86e027649343df5fdfe655709a3b817f08575a546
DIST lgeneral-1.4.4.tar.gz 1891302 BLAKE2B 354ef85f1769881dbddd85dee0772c036c86308dd669c2e4d44d53d6acdafb77f5491e4f1298cd1af8a4eb82d4c87d1fa154c2c355e226ff82ed7248114c449f SHA512 d1028e999c5420477ed02521ea8bd32dd7481067f3b6f25545b367c082cd740e6c950f1383bc0aa33c345a380ed2abb9f2b5285b60d429bdb48972ce5fca34b2
-EBUILD lgeneral-1.4.4.ebuild 1590 BLAKE2B 65589aa93b3cc68436579a0b46fccd334e9411677dc13a8437910c382ab5898163ff9945e9cdad8f47981b275546bbb763d502d8987f32c11a672626e9dd9553 SHA512 cf3c6046c3e933f4944e88462890a4f9ce5751d2906169aa2aa66b74658a0901e95fde619bfc6ac5f1199ba77fa8c365d6191fafaecabc88d299147768dbfa2a
+EBUILD lgeneral-1.4.4-r1.ebuild 1822 BLAKE2B 4e5d97360d751035d06b306aaa211909aa10a6a0413cb14fa56592469cfc87c3e96fc2b19cc0410f8e9fb346e2e403bb2de5dcf585f1e87865c9f29befac0b4e SHA512 383e3a36dbe2fce7426a11fcf9580bdd8c608219980f7d114ea849df252e20e2073cf3e896d0f6aaebc7bc31be51df3fb1fb34621bdbf128a6b1f00fccdbcfa3
MISC metadata.xml 332 BLAKE2B 3a4cabe3dae85df267b8d67829993a894fb1d55f7b19b696370bd5095e4d73c1add5763a37c12e93769d2555644e515f4a82caa06bfdc136b930e98a1ff2dc75 SHA512 9637cc722ccd66881b3e67a053dd408dc9297ed8741ffd100e8bdfb8337e61fe2bb0d2921b1462a0407bab9c4400570dc6b1513eb92b0262bd85d8c77aca894d
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
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)"
}