diff --git a/games/opentyrian/Makefile b/games/opentyrian/Makefile index acb39e5268b9..2b9094d57f9b 100644 --- a/games/opentyrian/Makefile +++ b/games/opentyrian/Makefile @@ -1,55 +1,56 @@ # Created by: Dmitry Marakasov # $FreeBSD$ 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}/ DISTNAME= ${PORTVERSION} DIST_SUBDIR= opentyrian MAINTAINER= amdmi3@FreeBSD.org 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 OPTIONS_DEFINE= NETWORK DOCS NETWORK_DESC= Enable network support NETWORK_USE= SDL=net NETWORK_MAKE_ARGS= WITH_NETWORK=true NETWORK_MAKE_ARGS_OFF= WITH_NETWORK=false post-patch: @${REINPLACE_CMD} -e '/custom_data_dir/ s|"."|"${DATADIR}"|' ${WRKSRC}/src/file.c do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/ ${INSTALL_DATA} ${WRKSRC}/linux/${PORTNAME}.desktop ${STAGEDIR}${PREFIX}/share/applications/ ${INSTALL_DATA} ${WRKSRC}/linux/icons/tyrian-32.png ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png ${INSTALL_MAN} ${WRKSRC}/linux/man/${PORTNAME}.6 ${STAGEDIR}${MAN6PREFIX}/man/man6/ @${MKDIR} ${STAGEDIR}${DATADIR} ${TOUCH} ${STAGEDIR}${DATADIR}/.keepme do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} .for f in ${PORTDOCS} ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}/ .endfor .include 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 @@ -1,33 +1,31 @@ --- Makefile.orig 2013-09-07 23:56:16 UTC +++ Makefile @@ -8,8 +8,6 @@ endif TARGET := opentyrian -WITH_NETWORK := true - ############################################################ STRIP := strip -@@ -21,21 +19,11 @@ OBJS := $(SRCS:src/%.c=obj/%.o) +@@ -21,19 +19,9 @@ OBJS := $(SRCS:src/%.c=obj/%.o) # FLAGS #################################################### -ifneq ($(MAKECMDGOALS), release) - EXTRA_CFLAGS += -g3 -O0 -Werror -else - EXTRA_CFLAGS += -g0 -O2 -DNDEBUG -endif 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