Bug#1000301: warzone2100: Should run flex/bison as part of the build process

Russell Coker russell at coker.com.au
Sun Nov 21 05:21:08 GMT 2021


Package: warzone2100
Version: 4.2.1-1
Severity: minor
Tags: upstream

https://github.com/Warzone2100/warzone2100/issues/2425

Above is the upstream bug report requesting CMake support for running flex
and bison.  But without that we could do it ourselves.

Below is an example of CMake configuration to build with flex and bison.  It
probably isn't the best way to do it but it's an example.  It's probably ideal
to have some macros or something in the cmake/ directory of the source tree.

Another possibility that would be easier to write but uglier would be to have
a script run before cmake to run flex and bison.

I don't have any immediate plans to fix this but I welcome patches, either
Debian specific or patches that are suitable for sending upstream.

--- warzone2100-3.4.0.orig/lib/gamelib/CMakeLists.txt
+++ warzone2100-3.4.0/lib/gamelib/CMakeLists.txt
@@ -5,10 +5,15 @@ if(ENABLE_NLS)
        find_package (Intl REQUIRED)
 endif()
 
+find_package(FLEX)
+FLEX_TARGET(AUDP audp_lexer.lpp ${CMAKE_BINARY_DIR}/audp_lexer.cpp)
+find_package(BISON)
+BISON_TARGET(AUDP audp_parser.ypp ${CMAKE_BINARY_DIR}/audp_parser.cpp)
+
 file(GLOB HEADERS "*.h")
 file(GLOB SRC "*.cpp")
 
-add_library(gamelib STATIC ${HEADERS} ${SRC})
+add_library(gamelib STATIC ${HEADERS} ${BISON_AUDP_OUTPUT_HEADER} ${SRC} ${BISON_AUDP_OUTPUT_SOURCE} ${FLEX_STRRES_OUTPUTS})
 set_property(TARGET gamelib PROPERTY FOLDER "lib")
 if(WZ_TARGET_ADDITIONAL_PROPERTIES)
        SET_TARGET_PROPERTIES(gamelib PROPERTIES ${WZ_TARGET_ADDITIONAL_PROPERTIES})

-- System Information:
Debian Release: 11.1
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-8-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: SELinux: enabled - Mode: Enforcing - Policy name: default

Versions of packages warzone2100 depends on:
ii  libc6             2.32-4
ii  libcurl3-gnutls   7.74.0-1.3+b1
ii  libfreetype6      2.10.4+dfsg-1
ii  libgcc-s1         10.2.1-6
ii  libharfbuzz0b     2.7.4-1
ii  libminiupnpc17    2.2.1-1
ii  libogg0           1.3.4-0.1
ii  libopenal1        1:1.19.1-2
ii  libphysfs1        3.0.2-5
ii  libpng16-16       1.6.37-3
ii  libsdl2-2.0-0     2.0.14+dfsg2-3
ii  libsodium23       1.0.18-1
ii  libsqlite3-0      3.34.1-3
ii  libstdc++6        11.2.0-10
ii  libtheora0        1.1.1+dfsg.1-15
ii  libvorbis0a       1.3.7-1
ii  libvorbisfile3    1.3.7-1
ii  warzone2100-data  4.2.1-1
ii  zlib1g            1:1.2.11.dfsg-2

Versions of packages warzone2100 recommends:
pn  warzone2100-music  <none>

warzone2100 suggests no packages.

-- no debconf information



More information about the Pkg-games-devel mailing list