Use a bigger hammer to ensure SDL2 does not get picked up.

While here, explicitly remove the installation of the .mid and .ogg files,
since we are not using SDL2.

Reported independently by naddy@ and espie@.
This commit is contained in:
bcallah 2018-07-04 15:10:31 +00:00
parent 028bc424a0
commit 4a5f4f5ad3
5 changed files with 88 additions and 8 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.13 2018/06/27 21:03:47 espie Exp $
# $OpenBSD: Makefile,v 1.14 2018/07/04 15:10:31 bcallah Exp $
V = 4.10.0
COMMENT = politics and government game with liberal bias
DISTNAME = liberalcrimesquad-${V}{v${V}}
PKGNAME = liberalcrimesquad-${V}
CATEGORIES = games
REVISION = 0
REVISION = 1
HOMEPAGE = http://lcs.wikidot.com/
MAINTAINER = Brian Callahan <bcallah@openbsd.org>
@ -13,7 +13,7 @@ MAINTAINER = Brian Callahan <bcallah@openbsd.org>
# GPLv2+
PERMIT_PACKAGE_CDROM = Yes
WANTLIB += c iconv m ncurses ${COMPILER_LIBCXX}
WANTLIB += ${COMPILER_LIBCXX} c curses iconv m
MASTER_SITES = https://github.com/Kamal-Sadek/Liberal-Crime-Squad/archive/
@ -32,10 +32,6 @@ CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib" \
LIBS="-liconv"
# don't pick up SDL2
CONFIGURE_ENV += ac_cv_lib_SDL2_SDL_Init= \
ac_cv_path_SDL_CONFIG=
AUTOCONF_VERSION = 2.69
AUTOMAKE_VERSION = 1.15

View File

@ -0,0 +1,37 @@
$OpenBSD: patch-Makefile_am,v 1.1 2018/07/04 15:10:31 bcallah Exp $
Do not install .mid or .ogg files since we don't use SDL2 (aka sound) support.
Makes it look less like bad packaging on my end.
Index: Makefile.am
--- Makefile.am.orig
+++ Makefile.am
@@ -22,27 +22,7 @@ dist_art_DATA = art/abort.cmv art/anchor.cmv art/glams
art/mapCSV_NuclearPlant_Specials.csv art/mapCSV_NuclearPlant_Tiles.csv\
art/mapCSV_WhiteHouse_Specials.csv art/mapCSV_WhiteHouse_Tiles.csv\
art/mapCSV_WhiteHouse2_Specials.csv art/mapCSV_WhiteHouse2_Tiles.csv\
- art/mapCSV_WhiteHouse3_Specials.csv art/mapCSV_WhiteHouse3_Tiles.csv\
- \
- art/midi/abort.mid art/midi/activate.mid art/midi/alarmed.mid art/midi/anchor.mid\
- art/midi/basemode.mid art/midi/carchase.mid art/midi/cartheft.mid art/midi/dating.mid\
- art/midi/defeat.mid art/midi/disbanded.mid art/midi/elections.mid art/midi/finances.mid\
- art/midi/footchase.mid art/midi/glamshow.mid art/midi/heavycombat.mid art/midi/interrogation.mid\
- art/midi/lacops.mid art/midi/liberalagenda.mid art/midi/newgame.mid art/midi/newscast.mid\
- art/midi/newspaper.mid art/midi/reaganified.mid art/midi/recruiting.mid art/midi/reviewmode.mid\
- art/midi/shopping.mid art/midi/siege.mid art/midi/sitemode.mid art/midi/sleepers.mid\
- art/midi/stalinized.mid art/midi/stopevil.mid art/midi/suspicious.mid art/midi/titlemode.mid\
- art/midi/trial.mid art/midi/victory.mid\
- \
- art/ogg/abort.ogg art/ogg/activate.ogg art/ogg/alarmed.ogg art/ogg/anchor.ogg\
- art/ogg/basemode.ogg art/ogg/carchase.ogg art/ogg/cartheft.ogg art/ogg/dating.ogg\
- art/ogg/defeat.ogg art/ogg/disbanded.ogg art/ogg/elections.ogg art/ogg/finances.ogg\
- art/ogg/footchase.ogg art/ogg/glamshow.ogg art/ogg/heavycombat.ogg art/ogg/interrogation.ogg\
- art/ogg/lacops.ogg art/ogg/liberalagenda.ogg art/ogg/newgame.ogg art/ogg/newscast.ogg\
- art/ogg/newspaper.ogg art/ogg/reaganified.ogg art/ogg/recruiting.ogg art/ogg/reviewmode.ogg\
- art/ogg/shopping.ogg art/ogg/siege.ogg art/ogg/sitemode.ogg art/ogg/sleepers.ogg\
- art/ogg/stalinized.ogg art/ogg/stopevil.ogg art/ogg/suspicious.ogg art/ogg/titlemode.ogg\
- art/ogg/trial.ogg art/ogg/victory.ogg
+ art/mapCSV_WhiteHouse3_Specials.csv art/mapCSV_WhiteHouse3_Tiles.csv
dist_app_DATA = crimesquad.desktop

View File

@ -0,0 +1,28 @@
$OpenBSD: patch-configure_ac,v 1.1 2018/07/04 15:10:31 bcallah Exp $
Do not pick up or use SDL2.
Index: configure.ac
--- configure.ac.orig
+++ configure.ac
@@ -64,19 +64,7 @@ elif test "$ac_cv_search_initscr" = "-lncursesw"; then
fi
# Include SDL2 and SDL2_mixer, or define DONT_INCLUDE_SDL as a fallback if they aren't available, so it still compiles.
-AC_PATH_PROG(SDL_CONFIG, sdl2-config)
-if test -n "$SDL_CONFIG"; then
- LIBS="$LIBS `$SDL_CONFIG --libs`"
- CPPFLAGS="$CPPFLAGS `$SDL_CONFIG --cflags`"
-fi
-AC_CHECK_LIB([SDL2], [SDL_Init], ,
- AC_MSG_WARN([ *** Unable to find SDL2 library (http://www.libsdl.org/)]) ; LACK_SDL2=1)
-AC_CHECK_LIB([SDL2_mixer], [Mix_OpenAudio], ,
- AC_MSG_WARN([ *** Unable to find SDL2_mixer library (http://www.libsdl.org/projects/SDL_mixer/)]) ; LACK_SDL2=1)
-if test "$LACK_SDL2" = 1; then
- AC_DEFINE(DONT_INCLUDE_SDL, [], [Define to avoid including SDL2 and SDL2_mixer.])
- AC_MSG_WARN([ *** Compiling without SDL2 or SDL2_mixer, and with DONT_INCLUDE_SDL defined.])
-fi
+AC_DEFINE(DONT_INCLUDE_SDL, [], [Define to avoid including SDL2 and SDL2_mixer.])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-src_common_h,v 1.1 2018/07/04 15:10:31 bcallah Exp $
Don't use SDL2.
Index: src/common.h
--- src/common.h.orig
+++ src/common.h
@@ -20,7 +20,7 @@
#endif
// uncomment this next line if you want to disable SDL (which is for music/sound)
-//#define DONT_INCLUDE_SDL
+#define DONT_INCLUDE_SDL
/* some compilers sometimes define _WIN32 but not WIN32 on Windows, but LCS usually
just checks if WIN32's defined, so the next couple lines fix that so it works */

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.3 2018/06/27 21:03:47 espie Exp $
@comment $OpenBSD: PLIST,v 1.4 2018/07/04 15:10:31 bcallah Exp $
@bin bin/crimesquad
@man man/man6/crimesquad.6
share/applications/crimesquad.desktop
@ -8,11 +8,14 @@ share/lcs/art/abort.cmv
share/lcs/art/anchor.cmv
share/lcs/art/armors.xml
share/lcs/art/armsdealer.xml
share/lcs/art/augmentations.xml
share/lcs/art/clips.xml
share/lcs/art/creatures.xml
share/lcs/art/deptstore.xml
share/lcs/art/glamshow.cmv
share/lcs/art/lacops.cmv
share/lcs/art/largecap.cpc
share/lcs/art/licenses.txt
share/lcs/art/loot.xml
share/lcs/art/mapCSV_Bank_Specials.csv
share/lcs/art/mapCSV_Bank_Tiles.csv