diff --git a/games/openbor/Makefile b/games/openbor/Makefile index c536eb113f65..1121f0c5f6e3 100644 --- a/games/openbor/Makefile +++ b/games/openbor/Makefile @@ -1,118 +1,118 @@ PORTNAME= openbor # Hint: svn revision is git rev-list --count ${GH_TAGNAME} -PORTVERSION?= 7586 +PORTVERSION?= 7610 PORTREVISION?= 0 CATEGORIES= games PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ .if ${PORTVERSION} < 3971 PATCHFILES+= 794ba23189a3.patch:-p2 .elif ${PORTVERSION} < 7084 PATCHFILES+= 731d96887795.patch:-p2 .endif MAINTAINER= jbeich@FreeBSD.org COMMENT= 2D side scrolling engine for beat 'em ups, shooters, and more #' WWW= https://www.chronocrash.com/ LICENSE= BSD3CLAUSE GPLv2+ .if ${PORTVERSION} >= 4134 LICENSE+= ISCL .endif LICENSE_COMB= multi LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/LICENSE LICENSE_FILE_GPLv2+ = ${_LICENSE_STORE}/GPLv2 # source/gfxlib/hq2x.c LICENSE_FILE_ISCL= ${WRKSRC}/source/webmlib/nestegg/LICENSE LIB_DEPENDS= libpng.so:graphics/png .if ${PORTVERSION} >= 4134 LIB_DEPENDS+= libvpx.so:multimedia/libvpx .endif .ifdef PKGNAMESUFFIX PORTSCOUT= ignore:1 .endif USE_GITHUB= yes GH_ACCOUNT= DCurrent -GH_TAGNAME?= 87ea891e +GH_TAGNAME?= f4510854 USES+= cpe gmake pkgconfig sdl .if ${PORTVERSION} < 4433 USE_CSTD= gnu89 .endif .if ${PORTVERSION} < 4108 USE_SDL= gfx .elif ${PORTVERSION} < 6639 || ${PORTVERSION} >= 7416 USE_SDL= gfx2 .else USE_SDL= sdl2 .endif WRKSRC_SUBDIR= engine MAKE_ENV= BUILD_LINUX=1 SDKPATH="${LOCALBASE}" \ GCC_TARGET="${CONFIGURE_TARGET:S/amd64/x86_64/}" MAKE_ARGS= CC="${CC}" LIBRARIES="${LOCALBASE}/lib" \ TARGET_ARCH=${ARCH:S/i386/x86/} ARCHFLAGS="" \ TARGET_FINAL='${TARGET}' BUILD_MMX="" ECHO="${ECHO}" .if ${PORTVERSION} < 7098 CFLAGS+= -fcommon # https://github.com/DCurrent/openbor/issues/206 .endif LDFLAGS+= -Wl,--as-needed # ogg, pthread, zlib SUB_FILES= pkg-message SUB_LIST= PKGBASE=${PKGBASE} PLIST_FILES= bin/${PKGBASE} \ share/pixmaps/${PKGBASE}.png DOCSDIR= ${PREFIX}/share/doc/${PKGBASE} PORTDOCS= README DESKTOP_ENTRIES="OpenBOR v${${PORTVERSION}<7533:?3:4}.0 Build ${PORTVERSION}" \ "" \ "${PKGBASE}" \ "${PKGBASE}" \ "Game;ArcadeGame;" \ "" OPTIONS_DEFINE= DOCS TREMOR OPTIONS_DEFAULT= ${MACHINE_CPU:Msoftfp:C/.+/TREMOR/} OPTIONS_DEFINE_i386= MMX OPTIONS_DEFAULT_i386= MMX # runtime detection MMX_BUILD_DEPENDS= yasm:devel/yasm MMX_MAKE_ARGS= BUILD_MMX=1 TREMOR_LIB_DEPENDS= libvorbisidec.so:audio/libtremor TREMOR_MAKE_ARGS= BUILD_TREMOR=1 BUILD_VORBIS="" TREMOR_LIB_DEPENDS_OFF= libvorbisfile.so:audio/libvorbis post-patch: @${REINPLACE_CMD} -e 's/ -O[0-9]//; s/ -g//; s/ -Werror//' \ -e 's/ -fomit-frame-pointer//' \ -e 's/ -freorder-blocks//' \ -e 's/ -Wno-unused-result//' \ -e 's/ -Wl,-rpath,$$(LIBRARIES)//' \ -e '/echo/!s/ @/ /' \ -e 's/@echo/@$$(ECHO)/' \ -e 's/$$(LIBS)/$$(LDFLAGS) &/' \ ${WRKSRC}/Makefile @${REINPLACE_CMD} -e 's/\.openbor/.${PKGBASE}/' \ ${WRKSRC}/sdl/sdlport.c @${GREP} -Flr 'malloc.h' ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} \ 's,malloc\.h,stdlib.h,' @${REINPLACE_CMD} -e 's/^function \(.*\) {/\1() {/' \ -e '/^[[:space:]]*VERSION_.*=0000/d' \ -e '/.*read -r VERSION_/d' \ ${WRKSRC}/version.sh do-configure: (cd ${WRKSRC} && VERSION_BUILD=${PORTVERSION} VERSION_COMMIT=${GH_TAGNAME} \ ${SH} ./version.sh) do-install: ${INSTALL_PROGRAM} ${WRKSRC}/OpenBOR.elf \ ${STAGEDIR}${PREFIX}/bin/${PKGBASE} ${INSTALL_DATA} ${WRKSRC}/resources/OpenBOR_Icon_128x128.png \ ${STAGEDIR}${PREFIX}/share/pixmaps/${PKGBASE}.png (cd ${WRKSRC} && ${COPYTREE_SHARE} \ "${PORTDOCS}" ${STAGEDIR}${DOCSDIR}) .include diff --git a/games/openbor/distinfo b/games/openbor/distinfo index 6accd1c6e8e5..a803a4d63f53 100644 --- a/games/openbor/distinfo +++ b/games/openbor/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1706209104 -SHA256 (DCurrent-openbor-7586-87ea891e_GH0.tar.gz) = 14693862178fd4eb1e36fb9f9ac3122b77740a0755942fcc5823fe3165a047bd -SIZE (DCurrent-openbor-7586-87ea891e_GH0.tar.gz) = 89138596 +TIMESTAMP = 1707519600 +SHA256 (DCurrent-openbor-7610-f4510854_GH0.tar.gz) = 0fe777b69a23e2913a37260dbf9c9c680a0376acfe0f2402a7b7fe6281bcfe0b +SIZE (DCurrent-openbor-7610-f4510854_GH0.tar.gz) = 212696672 diff --git a/games/openbor/files/patch-revert b/games/openbor/files/patch-revert new file mode 100644 index 000000000000..67ed7692f6cb --- /dev/null +++ b/games/openbor/files/patch-revert @@ -0,0 +1,32 @@ +Partially revert https://github.com/DCurrent/openbor/commit/16939d70c3af +due to breaking fonts with old games (e.g., Rocket Viper v2.41) + +--- openbor.c.orig 2024-02-09 23:00:00 UTC ++++ openbor.c +@@ -46507,10 +46507,6 @@ void startup() + // init. input recorder + init_input_recorder(); + +- printf("Loading fonts................\t"); +- load_all_fonts(); +- printf("Done!\n"); +- + printf("Loading sprites..............\t"); + load_special_sprites(); + printf("Done!\n"); +@@ -46545,9 +46541,13 @@ void startup() + load_menu_txt(); + printf("Done!\n"); + ++ printf("Loading fonts................\t"); ++ load_all_fonts(); ++ printf("Done!\n"); ++ + /* +- Kratus (01-2024) Moved the translation and menu functions to the end of the engine "startup" function, +- but before the "control init" function (reverted the font function to load before scripts) ++ Kratus (10-2021) Moved the translation, menu and font functions to the end of the engine "startup" function, ++ but before the "control init" function + */ + printf("Loading translation..........\t"); + ob_inittrans(); diff --git a/games/openbor/files/patch-source_utils.c b/games/openbor/files/patch-source_utils.c index 1693b73e8915..8558a0074446 100644 --- a/games/openbor/files/patch-source_utils.c +++ b/games/openbor/files/patch-source_utils.c @@ -1,21 +1,33 @@ +source/utils.c:18:10: fatal error: 'features.h' file not found + 18 | #include + | ^~~~~~~~~~~~ source/utils.c:303:54: error: implicit declaration of function 'mallinfo' is invalid in C99 [-Werror,-Wimplicit-function-declaration] writeToLogFile("Memory usage at exit: %u\n", mallinfo().arena); ^ source/utils.c:303:64: error: member reference base type 'int' is not a structure or union writeToLogFile("Memory usage at exit: %u\n", mallinfo().arena); ~~~~~~~~~~^~~~~~ ---- source/utils.c.orig 2024-01-02 00:04:19 UTC +--- source/utils.c.orig 2024-02-01 15:55:11 UTC +++ source/utils.c -@@ -303,9 +303,7 @@ void *checkAlloc(void *ptr, size_t size, const char *f +@@ -14,7 +14,7 @@ + #include + #include + +-#ifdef LINUX ++#if defined(__linux__) + #include + #endif + +@@ -307,9 +307,7 @@ void *checkAlloc(void *ptr, size_t size, const char *f "\n* Shutting Down *\n\n"); writeToLogFile("Out of memory!\n"); writeToLogFile("Allocation of size %i failed in function '%s' at %s:%i.\n", size, func, file, line); -#ifndef WIN - writeToLogFile("Memory usage at exit: %u\n", mallinfo().arena); -#elif LINUX +#if defined(__GLIBC__) || defined(ANDROID) || defined(VITA) writeToLogFile("Memory usage at exit: %u\n", mallinfo2().arena); #endif borExit(2);