mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
Fix build with -fno-common
While here fix a few portlint and portclippy complaints
This commit is contained in:
parent
4e40b7fd56
commit
2ae264e63b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=550168
8 changed files with 106 additions and 5 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
PORTNAME= tuxmath
|
||||
PORTVERSION= 2.0.3
|
||||
PORTREVISION= 6
|
||||
PORTREVISION= 7
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= games
|
||||
MASTER_SITES= DEBIAN_POOL \
|
||||
|
@ -17,11 +17,11 @@ COMMENT= Educational arcade game starring Tux
|
|||
LICENSE= GPLv3+
|
||||
LICENSE_FILE= ${WRKSRC}/doc/COPYING_GPL3
|
||||
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}_w_fonts-${PORTVERSION}
|
||||
LIB_DEPENDS= libpng16.so:graphics/png
|
||||
|
||||
USES= gmake gnome iconv localbase perl5 pkgconfig sdl
|
||||
USE_GNOME= libxml2
|
||||
USE_SDL= image mixer net pango sdl
|
||||
USES= gmake gnome iconv localbase perl5 pkgconfig sdl
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ENV= T4K_COMMON_CFLAGS="-I${T4K_WRKSRC}/src" \
|
||||
T4K_COMMON_LIBS="${T4K_WRKSRC}/src/.libs/libt4k_common.a" \
|
||||
|
@ -31,6 +31,8 @@ CPPFLAGS+= $$(pkg-config --cflags SDL_Pango libpng) \
|
|||
-DHAVE_ALPHASORT -DHAVE_SCANDIR -DHAVE_FSYNC -DICONV_CONST=""
|
||||
LDFLAGS+= $$(pkg-config --libs SDL_Pango libpng) ${ICONV_LIB}
|
||||
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}_w_fonts-${PORTVERSION}
|
||||
|
||||
T4K_NAME= t4k_common
|
||||
T4K_VERSION= 0.1.1
|
||||
T4K_DISTFILE= ${T4K_NAME:S/_//}_${T4K_VERSION}.orig${EXTRACT_SUFX}
|
||||
|
@ -40,12 +42,12 @@ OPTIONS_DEFINE= NLS SVG DOCS
|
|||
OPTIONS_DEFAULT= SVG
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
NLS_CONFIGURE_ENABLE= nls
|
||||
NLS_USES= gettext
|
||||
NLS_CONFIGURE_ENABLE= nls
|
||||
NLS_LDFLAGS= -lintl
|
||||
|
||||
SVG_CONFIGURE_WITH= rsvg
|
||||
SVG_USE= GNOME=librsvg2
|
||||
SVG_CONFIGURE_WITH= rsvg
|
||||
|
||||
post-extract:
|
||||
@${LN} -sf ${T4K_WRKSRC} ${WRKDIR}/${T4K_NAME}
|
||||
|
|
11
games/tuxmath/files/patch-src_menu.c
Normal file
11
games/tuxmath/files/patch-src_menu.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- src/menu.c.orig 2011-05-04 00:15:06 UTC
|
||||
+++ src/menu.c
|
||||
@@ -79,7 +79,7 @@ static char* activities[] = { ACTIVITIES };
|
||||
//const int min_font_size = 8, default_font_size = 20, max_font_size = 33;
|
||||
|
||||
/* menu title rect */
|
||||
-SDL_Rect menu_title_rect;
|
||||
+extern SDL_Rect menu_title_rect;
|
||||
|
||||
/* buffer size used when reading attributes or names */
|
||||
const int buf_size = 128;
|
11
games/tuxmath/files/patch-src_menu__lan.c
Normal file
11
games/tuxmath/files/patch-src_menu__lan.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- src/menu_lan.c.orig 2011-05-04 00:15:10 UTC
|
||||
+++ src/menu_lan.c
|
||||
@@ -37,7 +37,7 @@ along with this program. If not, see <http://www.gnu.
|
||||
|
||||
|
||||
/* lan_player_type now defined in network.h */
|
||||
-lan_player_type lan_player_info[MAX_CLIENTS];
|
||||
+extern lan_player_type lan_player_info[MAX_CLIENTS];
|
||||
|
||||
/* Local function prototypes: ------------------- */
|
||||
void draw_player_table(void);
|
11
games/tuxmath/files/patch-src_network.c
Normal file
11
games/tuxmath/files/patch-src_network.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- src/network.c.orig 2011-05-04 00:15:17 UTC
|
||||
+++ src/network.c
|
||||
@@ -54,7 +54,7 @@ static int connected_server = -1;
|
||||
static int my_index = -1;
|
||||
|
||||
/* Keep track of other connected players: */
|
||||
-lan_player_type lan_player_info[MAX_CLIENTS];
|
||||
+lan_player_type lan_player_info[MAX_CLIENTS];
|
||||
|
||||
/* Local function prototypes: */
|
||||
int say_to_server(char *statement);
|
11
games/tuxmath/files/patch-src_setup.c
Normal file
11
games/tuxmath/files/patch-src_setup.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- src/setup.c.orig 2011-05-04 00:15:43 UTC
|
||||
+++ src/setup.c
|
||||
@@ -64,7 +64,7 @@ along with this program. If not, see <http://www.gnu.
|
||||
/* (These are now 'extern'd in "tuxmath.h") */
|
||||
|
||||
|
||||
-SDL_Surface* screen;
|
||||
+extern SDL_Surface* screen;
|
||||
SDL_Surface* images[NUM_IMAGES];
|
||||
sprite* sprites[NUM_SPRITES];
|
||||
/* Need special handling to generate flipped versions of images. This
|
27
games/tuxmath/files/patch-src_titlescreen.c
Normal file
27
games/tuxmath/files/patch-src_titlescreen.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
--- src/titlescreen.c.orig 2011-05-04 00:16:12 UTC
|
||||
+++ src/titlescreen.c
|
||||
@@ -41,16 +41,16 @@ SDL_Rect dstupdate[MAX_UPDATES];
|
||||
int numupdates = 0; // tracks how many blits to be done
|
||||
|
||||
// Colors we use:
|
||||
-SDL_Color black;
|
||||
-SDL_Color gray;
|
||||
-SDL_Color dark_blue;
|
||||
-SDL_Color red;
|
||||
-SDL_Color white;
|
||||
-SDL_Color yellow;
|
||||
-SDL_Color bright_green;
|
||||
+extern SDL_Color black;
|
||||
+extern SDL_Color gray;
|
||||
+extern SDL_Color dark_blue;
|
||||
+extern SDL_Color red;
|
||||
+extern SDL_Color white;
|
||||
+extern SDL_Color yellow;
|
||||
+extern SDL_Color bright_green;
|
||||
|
||||
// Type needed for trans_wipe():
|
||||
-struct blit {
|
||||
+extern struct blit {
|
||||
SDL_Surface *src;
|
||||
SDL_Rect *srcrect;
|
||||
SDL_Rect *dstrect;
|
11
games/tuxmath/files/patch-t4k_common.h
Normal file
11
games/tuxmath/files/patch-t4k_common.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- ../t4k_common-0.1.1/src/t4k_common.h.orig 2011-03-25 00:35:15.000000000 +0100
|
||||
+++ ../t4k_common-0.1.1/src/t4k_common.h 2020-09-26 12:24:04.794856000 +0200
|
||||
@@ -239,7 +239,7 @@
|
||||
#define MAX_LINES 128 //!< Maximum lines to wrap.
|
||||
#define MAX_LINEWIDTH 256 //!< Maximum characters of each line.
|
||||
|
||||
-char wrapped_lines[MAX_LINES][MAX_LINEWIDTH]; //!< Global buffer for wrapped lines.
|
||||
+extern char wrapped_lines[MAX_LINES][MAX_LINEWIDTH]; //!< Global buffer for wrapped lines.
|
||||
|
||||
//TODO separate headers for different areas a la SDL?
|
||||
|
17
games/tuxmath/files/patch-t4k_main.c
Normal file
17
games/tuxmath/files/patch-t4k_main.c
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- ../t4k_common/src/t4k_main.c.orig 2011-03-25 00:00:24.000000000 +0100
|
||||
+++ ../t4k_common/src/t4k_main.c 2020-09-26 13:17:06.379943000 +0200
|
||||
@@ -29,7 +29,13 @@
|
||||
int debug_status;
|
||||
|
||||
|
||||
-SDL_Color red, yellow, white, black;
|
||||
+SDL_Color black;
|
||||
+SDL_Color gray;
|
||||
+SDL_Color dark_blue;
|
||||
+SDL_Color red;
|
||||
+SDL_Color white;
|
||||
+SDL_Color yellow;
|
||||
+SDL_Color bright_green;
|
||||
|
||||
|
||||
/* set global variables */
|
Loading…
Add table
Reference in a new issue