diff options
author | Stefan Eßer <se@FreeBSD.org> | 2020-09-26 11:38:14 +0000 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2020-09-26 11:38:14 +0000 |
commit | bdfbdafad2c53677f8b654d1573051241f67ee32 (patch) | |
tree | 85a9dd0b4fa55057b41020d0e45bae9cdc8ec9ef /games/opentyrian | |
parent | 2ae264e63b92e1726b7c1c8f9e79463361a01111 (diff) | |
download | ports-bdfbdafad2c53677f8b654d1573051241f67ee32.tar.gz ports-bdfbdafad2c53677f8b654d1573051241f67ee32.zip |
Fix build with -fno-common
While here address some complaints by portlint and portclippy
Notes
Notes:
svn path=/head/; revision=550169
Diffstat (limited to 'games/opentyrian')
-rw-r--r-- | games/opentyrian/Makefile | 13 | ||||
-rw-r--r-- | games/opentyrian/files/patch-Makefile | 12 | ||||
-rw-r--r-- | games/opentyrian/files/patch-src_opl.c | 32 | ||||
-rw-r--r-- | games/opentyrian/files/patch-src_opl.h | 43 |
4 files changed, 87 insertions, 13 deletions
diff --git a/games/opentyrian/Makefile b/games/opentyrian/Makefile index acb39e5268b9..2b9094d57f9b 100644 --- a/games/opentyrian/Makefile +++ b/games/opentyrian/Makefile @@ -3,7 +3,7 @@ PORTNAME= opentyrian PORTVERSION= 2.1.20130907 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= games MASTER_SITES= https://bitbucket.org/opentyrian/opentyrian/get/ \ http://mirror.amdmi3.ru/distfiles/${DIST_SUBDIR}/ @@ -16,15 +16,16 @@ COMMENT= Arcade-style vertical scrolling shooter LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTNAME}-77a8715634e3 - USES= gmake sdl tar:bzip2 -MAKE_ENV= ALL_CFLAGS="${CFLAGS}" USE_SDL= sdl -SUB_FILES= pkg-message -DATADIR= ${PREFIX}/share/tyrian +MAKE_ENV= ALL_CFLAGS="${CFLAGS}" + +DATADIR= ${PREFIX}/share/tyrian PORTSCOUT= skipv:11402-phase-0.8 +SUB_FILES= pkg-message + +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTNAME}-77a8715634e3 PORTDOCS= CREDITS NEWS README diff --git a/games/opentyrian/files/patch-Makefile b/games/opentyrian/files/patch-Makefile index 0e02d0dbedf2..48b7adbbc238 100644 --- a/games/opentyrian/files/patch-Makefile +++ b/games/opentyrian/files/patch-Makefile @@ -9,7 +9,7 @@ ############################################################ STRIP := strip -@@ -21,21 +19,11 @@ OBJS := $(SRCS:src/%.c=obj/%.o) +@@ -21,19 +19,9 @@ OBJS := $(SRCS:src/%.c=obj/%.o) # FLAGS #################################################### @@ -21,13 +21,11 @@ EXTRA_CFLAGS += -MMD -pedantic -Wall -Wextra -Wno-missing-field-initializers ifeq ($(WITH_NETWORK), true) EXTRA_CFLAGS += -DWITH_NETWORK - endif - +-endif +- -HG_REV := $(shell hg id -ib && touch src/hg_revision.h) -ifneq ($(HG_REV), ) - EXTRA_CFLAGS += '-DHG_REV="$(HG_REV)"' --endif -- - EXTRA_LDLIBS += -lm + endif - SDL_CFLAGS := $(shell $(SDL_CONFIG) --cflags) + EXTRA_LDLIBS += -lm diff --git a/games/opentyrian/files/patch-src_opl.c b/games/opentyrian/files/patch-src_opl.c new file mode 100644 index 000000000000..0201a19e7234 --- /dev/null +++ b/games/opentyrian/files/patch-src_opl.c @@ -0,0 +1,32 @@ +--- src/opl.c.orig 2013-09-07 23:56:16 UTC ++++ src/opl.c +@@ -145,6 +145,29 @@ static fltype decrelconst[4] = { + (fltype)(1/22.44608) + }; + ++// per-chip variables ++Bitu chip_num; ++op_type op[MAXOPERATORS]; ++ ++Bits int_samplerate; ++ ++Bit8u status; ++Bit32u opl_index; ++#if defined(OPLTYPE_IS_OPL3) ++Bit8u adlibreg[512]; // adlib register set (including second set) ++Bit8u wave_sel[44]; // waveform selection ++#else ++Bit8u adlibreg[256]; // adlib register set ++Bit8u wave_sel[22]; // waveform selection ++#endif ++ ++ ++// vibrato/tremolo increment/counter ++Bit32u vibtab_pos; ++Bit32u vibtab_add; ++Bit32u tremtab_pos; ++Bit32u tremtab_add; ++ + + void operator_advance(op_type* op_pt, Bit32s vib) { + op_pt->wfpos = op_pt->tcount; // waveform position diff --git a/games/opentyrian/files/patch-src_opl.h b/games/opentyrian/files/patch-src_opl.h new file mode 100644 index 000000000000..966c6075a2af --- /dev/null +++ b/games/opentyrian/files/patch-src_opl.h @@ -0,0 +1,43 @@ +--- src/opl.h.orig 2013-09-07 23:56:16 UTC ++++ src/opl.h +@@ -149,27 +149,27 @@ typedef struct operator_struct { + } op_type; + + // per-chip variables +-Bitu chip_num; +-op_type op[MAXOPERATORS]; ++extern Bitu chip_num; ++extern op_type op[MAXOPERATORS]; + +-Bits int_samplerate; ++extern Bits int_samplerate; + +-Bit8u status; +-Bit32u opl_index; ++extern Bit8u status; ++extern Bit32u opl_index; + #if defined(OPLTYPE_IS_OPL3) +-Bit8u adlibreg[512]; // adlib register set (including second set) +-Bit8u wave_sel[44]; // waveform selection ++extern Bit8u adlibreg[512]; // adlib register set (including second set) ++extern Bit8u wave_sel[44]; // waveform selection + #else +-Bit8u adlibreg[256]; // adlib register set +-Bit8u wave_sel[22]; // waveform selection ++extern Bit8u adlibreg[256]; // adlib register set ++extern Bit8u wave_sel[22]; // waveform selection + #endif + + + // vibrato/tremolo increment/counter +-Bit32u vibtab_pos; +-Bit32u vibtab_add; +-Bit32u tremtab_pos; +-Bit32u tremtab_add; ++extern Bit32u vibtab_pos; ++extern Bit32u vibtab_add; ++extern Bit32u tremtab_pos; ++extern Bit32u tremtab_add; + + + // enable an operator |