svn commit: r550169 - in head/games/opentyrian: . files
Stefan Eßer
se at FreeBSD.org
Sat Sep 26 11:38:16 UTC 2020
Author: se
Date: Sat Sep 26 11:38:14 2020
New Revision: 550169
URL: https://svnweb.freebsd.org/changeset/ports/550169
Log:
Fix build with -fno-common
While here address some complaints by portlint and portclippy
Added:
head/games/opentyrian/files/patch-src_opl.c (contents, props changed)
head/games/opentyrian/files/patch-src_opl.h (contents, props changed)
Modified:
head/games/opentyrian/Makefile
head/games/opentyrian/files/patch-Makefile
Modified: head/games/opentyrian/Makefile
==============================================================================
--- head/games/opentyrian/Makefile Sat Sep 26 11:29:06 2020 (r550168)
+++ head/games/opentyrian/Makefile Sat Sep 26 11:38:14 2020 (r550169)
@@ -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
Modified: head/games/opentyrian/files/patch-Makefile
==============================================================================
--- head/games/opentyrian/files/patch-Makefile Sat Sep 26 11:29:06 2020 (r550168)
+++ head/games/opentyrian/files/patch-Makefile Sat Sep 26 11:38:14 2020 (r550169)
@@ -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
Added: head/games/opentyrian/files/patch-src_opl.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/games/opentyrian/files/patch-src_opl.c Sat Sep 26 11:38:14 2020 (r550169)
@@ -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
Added: head/games/opentyrian/files/patch-src_opl.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/games/opentyrian/files/patch-src_opl.h Sat Sep 26 11:38:14 2020 (r550169)
@@ -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
More information about the svn-ports-all
mailing list