Index: branches/2017Q4/games/openbor/Makefile =================================================================== --- branches/2017Q4/games/openbor/Makefile (revision 454949) +++ branches/2017Q4/games/openbor/Makefile (revision 454950) @@ -1,102 +1,101 @@ # $FreeBSD$ PORTNAME= openbor # Hint: svn revision is git rev-list --count ${GH_TAGNAME} -PORTVERSION?= 4515 +PORTVERSION?= 4539 .ifndef PKGNAMESUFFIX PORTREVISION= 0 .endif CATEGORIES= games MAINTAINER= jbeich@FreeBSD.org COMMENT= Moddable fighting game engine (aka Beats of Rage) 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 USE_GITHUB= yes GH_ACCOUNT= DCurrent -GH_TAGNAME?= 12fc70c USES+= gmake pkgconfig .if ${PORTVERSION} < 4433 USE_CSTD= gnu89 .endif .if ${PORTVERSION} < 4108 USE_SDL= gfx .else USE_SDL= gfx2 .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}" 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 v3.0 Build ${PORTVERSION}" \ "" \ "${PKGBASE}" \ "${PKGBASE}" \ "Game;ArcadeGame;" \ "" OPTIONS_DEFINE= 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/ -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 's/^get_revnum$$/VERSION_BUILD=${PORTVERSION}/' \ ${WRKSRC}/version.sh do-configure: (cd ${WRKSRC} && ${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 Index: branches/2017Q4/games/openbor/distinfo =================================================================== --- branches/2017Q4/games/openbor/distinfo (revision 454949) +++ branches/2017Q4/games/openbor/distinfo (revision 454950) @@ -1,3 +1,3 @@ -TIMESTAMP = 1496950714 -SHA256 (DCurrent-openbor-4515-12fc70c_GH0.tar.gz) = ee6d6604fe02b873b95339d7305ce874581c268e17ef5693c14801ded4f35f72 -SIZE (DCurrent-openbor-4515-12fc70c_GH0.tar.gz) = 66891846 +TIMESTAMP = 1507042233 +SHA256 (DCurrent-openbor-4539_GH0.tar.gz) = 5ea8329c83a2d0cce5ea577117d87bcd5a0176464870f2f18a6cf9e043150aa6 +SIZE (DCurrent-openbor-4539_GH0.tar.gz) = 66890659 Index: branches/2017Q4/games/openbor/files/patch-openbor.c =================================================================== --- branches/2017Q4/games/openbor/files/patch-openbor.c (revision 454949) +++ branches/2017Q4/games/openbor/files/patch-openbor.c (revision 454950) @@ -1,95 +1,86 @@ Fix potential crashes found by ASan/Clang/GCC Fix an infinite loop in lcmScriptDeleteMain() Avoid accidental rounding from abs() --- openbor.c.orig 2017-04-22 14:20:08 UTC +++ openbor.c @@ -5747,17 +5747,17 @@ s_collision_attack *collision_alloc_attack_instance(s_ // // Allocate an empty collision attack list. s_collision_attack **collision_alloc_attack_list() { s_collision_attack **result; size_t alloc_size; // Get amount of memory we'll need. - alloc_size = sizeof(*result); + alloc_size = max_collisons * sizeof(*result); // Allocate memory and get pointer. result = malloc(alloc_size); // Make sure the list is blank. memset(result, 0, alloc_size); // return result. @@ -5796,17 +5796,17 @@ s_collision_body *collision_alloc_body_instance(s_coll // // Allocate an empty collision attack list. s_collision_body **collision_alloc_body_list() { s_collision_body **result; size_t alloc_size; // Get amount of memory we'll need. - alloc_size = sizeof(*result); + alloc_size = max_collisons * sizeof(*result); // Allocate memory and get pointer. result = malloc(alloc_size); // Make sure the list is blank. memset(result, 0, alloc_size); // return result. @@ -8204,7 +8204,8 @@ size_t lcmScriptCopyBuffer(ArgList *argl size_t lcmScriptDeleteMain(char **buf) { - size_t len = 0, i = 0; + size_t len = 0; + long i = 0; ptrdiff_t pos = 0; char *newbuf = NULL; -@@ -13933,7 +13933,7 @@ void generate_basemap(int map_index, flo - - void load_level(char *filename) - { -- char *buf; -+ char *buf = NULL; - size_t size, len, sblen; - ptrdiff_t pos, oldpos; - char *command; @@ -15210,6 +15210,11 @@ void bar(int x, int y, int value, int ma return; } + if (value < 0) + { + value = 0; + } + if (value > maxvalue) { value = maxvalue; @@ -21710,8 +21716,8 @@ int reset_backpain(entity *ent) if (ent->normaldamageflipdir == DIRECTION_RIGHT) ent->direction = DIRECTION_RIGHT; else ent->direction = DIRECTION_LEFT; - if(ent->direction == DIRECTION_RIGHT) ent->velocity.x = -1*abs(ent->velocity.x); - else ent->velocity.x = abs(ent->velocity.x); + if(ent->direction == DIRECTION_RIGHT) ent->velocity.x = -1*ABS(ent->velocity.x); + else ent->velocity.x = ABS(ent->velocity.x); return 1; } @@ -25831,7 +25837,7 @@ int common_try_wander(entity *target, in mod = -mod; } //if ((self->sortid / 100) % 2) - if (abs(rand32()) % 2) + if (rand32() % 2) { mod = 3 - mod; } Index: branches/2017Q4 =================================================================== --- branches/2017Q4 (revision 454949) +++ branches/2017Q4 (revision 454950) Property changes on: branches/2017Q4 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r451467