emulators/qmc2: Fix build on systems <13.x: SDL.h not found

* Update ${RUN_DEPENDS} to reflect current mame/mess versions
* Add two more files to ${SHEBANG_FILES}
* Add ${EXTRA_PATCHES} conditional to compensate for missing \S Special
  Expression support in GNU grep on system <13.x (if that is even the problem)
* Add files/extra-scripts-sdl-includepaths to patch
  ${WRKSRC}/scripts/sdl-includepath.sh

PR:		267980
This commit is contained in:
Alastair Hogge 2022-12-05 09:34:49 +00:00 committed by Nuno Teixeira
parent 217c33c02f
commit 8674ebc2a7
2 changed files with 18 additions and 2 deletions

View file

@ -1,6 +1,7 @@
PORTNAME= qmc2
PORTVERSION= 0.243
DISTVERSIONPREFIX= v
PORTREVISION= 1
CATEGORIES= emulators games
MAINTAINER= agh@riseup.net
@ -12,8 +13,8 @@ LICENSE= GPLv2+
BUILD_DEPENDS= bash>0:shells/bash \
gawk>0:lang/gawk
RUN_DEPENDS= libglvnd>0:graphics/libglvnd \
mame>=0.249:emulators/mame \
mess>=0.249:emulators/mess
mame>=0.250:emulators/mame \
mess>=0.250:emulators/mess
USES= compiler:c++11-lang desktop-file-utils gmake gl qt:5 sdl \
shebangfix tar:bzip2 xorg
@ -28,8 +29,10 @@ USE_SDL= sdl2
USE_XORG= x11 xmu
SHEBANG_FILES= scripts/cleanup-category-ini.sh \
scripts/generate-option-lists.sh \
scripts/make-man-pages.sh \
scripts/plugin_helper.sh \
scripts/romalyzer.pl \
scripts/sdl-defines.sh \
scripts/sdl-includepath.sh \
scripts/sdl-libs.sh \
@ -59,6 +62,10 @@ DOCS_PORTDOCS= html
.include <bsd.port.options.mk>
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1300000
EXTRA_PATCHES= ${PATCHDIR}/extra-scripts-sdl-includepaths
.endif
post-patch:
@${REINPLACE_CMD} -e 's|DATADIR/qmc2|${DATADIR}|g' \
${WRKSRC}/inst/*.template

View file

@ -0,0 +1,9 @@
--- scripts/sdl-includepath.sh.orig 2022-12-03 08:13:04 UTC
+++ scripts/sdl-includepath.sh
@@ -26,5 +26,5 @@ fi
fi
fi
fi
-echo $SDL_CFLAGS | egrep -o -e "\\-I\\S+" | sed -e 's/^-I//'
+echo $SDL_CFLAGS | egrep -o -e "-I[^[:space:]]+" | sed -e 's/^-I//'
exit 0