widelands: allow CMAKE_BUILD_TYPE=None
This commit is contained in:
parent
4afa93fcaa
commit
b033ca5e8f
|
@ -1 +0,0 @@
|
|||
widelands
|
|
@ -0,0 +1,63 @@
|
|||
Index: CMakeLists.txt
|
||||
===================================================================
|
||||
--- CMakeLists.txt.orig
|
||||
+++ CMakeLists.txt
|
||||
@@ -202,7 +202,7 @@ elseif(CMAKE_BUILD_TYPE STREQUAL "RelWit
|
||||
set(WL_DEBUG_FLAGS "-DNDEBUG -DNOPARACHUTE")
|
||||
option(OPTION_ASAN "Build with AddressSanitizer" ON)
|
||||
else()
|
||||
- message(FATAL_ERROR "Unknown CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
|
||||
+ set(WL_DEBUG_FLAGS "-DNDEBUG -DNOPARACHUTE")
|
||||
endif()
|
||||
|
||||
wl_add_flag(WL_GENERIC_CXX_FLAGS "-std=c++11")
|
||||
@@ -353,7 +353,7 @@ endif (OPTION_BUILD_TESTS)
|
||||
install (
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION
|
||||
DESTINATION ${WL_INSTALL_BASEDIR}
|
||||
- CONFIGURATIONS Debug;Release
|
||||
+ CONFIGURATIONS Debug
|
||||
COMPONENT CoreVersionFile
|
||||
)
|
||||
|
||||
@@ -378,7 +378,6 @@ install(
|
||||
data/txts
|
||||
data/world
|
||||
DESTINATION ${WL_INSTALL_DATADIR}
|
||||
- CONFIGURATIONS Debug;Release
|
||||
COMPONENT CoreDataFiles
|
||||
)
|
||||
|
||||
@@ -386,7 +385,6 @@ install(
|
||||
DIRECTORY
|
||||
data/maps
|
||||
DESTINATION ${WL_INSTALL_DATADIR}
|
||||
- CONFIGURATIONS Debug;Release
|
||||
COMPONENT MapFiles
|
||||
)
|
||||
|
||||
@@ -395,7 +393,6 @@ install(
|
||||
data/music
|
||||
data/sound
|
||||
DESTINATION ${WL_INSTALL_DATADIR}
|
||||
- CONFIGURATIONS Debug;Release
|
||||
COMPONENT MusicFiles
|
||||
)
|
||||
|
||||
@@ -405,7 +402,7 @@ install(
|
||||
CREDITS
|
||||
ChangeLog
|
||||
DESTINATION ${WL_INSTALL_BASEDIR}
|
||||
- CONFIGURATIONS Debug;Release
|
||||
+ CONFIGURATIONS Debug
|
||||
COMPONENT CoreLicenseFiles
|
||||
)
|
||||
|
||||
@@ -424,7 +421,6 @@ install(
|
||||
DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR}/locale/
|
||||
DESTINATION ${WL_INSTALL_DATADIR}/locale
|
||||
- CONFIGURATIONS Debug;Release
|
||||
COMPONENT CoreLanguageFiles
|
||||
)
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
Index: cmake/WlFunctions.cmake
|
||||
===================================================================
|
||||
--- cmake/WlFunctions.cmake.orig
|
||||
+++ cmake/WlFunctions.cmake
|
||||
@@ -289,5 +289,5 @@ function(wl_binary NAME)
|
||||
|
||||
#Quoting the CMake documentation on DESTINATION:
|
||||
#"If a relative path is given it is interpreted relative to the value of CMAKE_INSTALL_PREFIX"
|
||||
- install(TARGETS ${NAME} DESTINATION "." COMPONENT ExecutableFiles)
|
||||
+ install(TARGETS ${NAME} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ExecutableFiles)
|
||||
endfunction()
|
||||
Index: xdg/CMakeLists.txt
|
||||
===================================================================
|
||||
--- xdg/CMakeLists.txt.orig
|
||||
+++ xdg/CMakeLists.txt
|
||||
@@ -6,19 +6,19 @@ set(XDG_APPLICATION_ID "org.widelands.Wi
|
||||
list(APPEND icon_sizes "16" "32" "48" "64" "128")
|
||||
foreach (icon_size ${icon_sizes})
|
||||
#install(FILES ${CMAKE_SOURCE_DIR}/data/images/logos/wl-ico-${icon_size}.png DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${icon_size}x${icon_size}/apps RENAME ${XDG_APPLICATION_ID}.png)
|
||||
- install(FILES ${CMAKE_SOURCE_DIR}/data/images/logos/wl-ico-${icon_size}.png DESTINATION ../share/icons/hicolor/${icon_size}x${icon_size}/apps RENAME ${XDG_APPLICATION_ID}.png)
|
||||
+ install(FILES ${CMAKE_SOURCE_DIR}/data/images/logos/wl-ico-${icon_size}.png DESTINATION share/icons/hicolor/${icon_size}x${icon_size}/apps RENAME ${XDG_APPLICATION_ID}.png)
|
||||
endforeach (icon_size ${icon_sizes})
|
||||
#install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.6 DESTINATION ${CMAKE_INSTALL_MANDIR}/man6)
|
||||
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.6 DESTINATION ../share/man/man6)
|
||||
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.6 DESTINATION share/man/man6)
|
||||
#install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
|
||||
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.desktop DESTINATION ../share/applications)
|
||||
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.desktop DESTINATION share/applications)
|
||||
#install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.appdata.xml DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo)
|
||||
-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.appdata.xml DESTINATION ../share/metainfo)
|
||||
+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${XDG_APPLICATION_ID}.appdata.xml DESTINATION share/metainfo)
|
||||
|
||||
find_program(GTK_UPDATE_ICON_CACHE NAMES gtk-update-icon-cache)
|
||||
if (GTK_UPDATE_ICON_CACHE)
|
||||
#install(CODE "execute_process (COMMAND ${GTK_UPDATE_ICON_CACHE} -t -f ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor ||: )")
|
||||
- install(CODE "execute_process (COMMAND ${GTK_UPDATE_ICON_CACHE} -t -f ${CMAKE_INSTALL_PREFIX}/../share/icons/hicolor ||: )")
|
||||
+ install(CODE "execute_process (COMMAND ${GTK_UPDATE_ICON_CACHE} -t -f ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor ||: )")
|
||||
else (GTK_UPDATE_ICON_CACHE)
|
||||
message(WARNING "gtk-update-icon-cache not found!")
|
||||
endif (GTK_UPDATE_ICON_CACHE)
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'widelands'
|
||||
pkgname=widelands
|
||||
version=21
|
||||
revision=3
|
||||
revision=4
|
||||
wrksrc="${pkgname}-build${version}"
|
||||
build_style=cmake
|
||||
configure_args="-DOPENGL_INCLUDE_DIR=${XBPS_CROSS_BASE}/usr/include
|
||||
|
@ -10,13 +10,13 @@ hostmakedepends="python3 pkg-config gettext"
|
|||
makedepends="boost-devel icu-devel minizip-devel gettext-devel
|
||||
glu-devel glew-devel SDL2-devel SDL2_gfx-devel SDL2_image-devel
|
||||
SDL2_net-devel SDL2_mixer-devel SDL2_ttf-devel"
|
||||
depends="${pkgname}-data-${version}_${revision}"
|
||||
short_desc="Real-time strategy game"
|
||||
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
|
||||
license="GPL-2.0-or-later"
|
||||
homepage="http://www.widelands.org/"
|
||||
distfiles="https://github.com/widelands/widelands/archive/build${version}.tar.gz>${pkgname}-${version}.tar.gz"
|
||||
checksum=601e0e4c6f91b3fb0ece2cd1b83ecfb02344a1b9194fbb70ef3f70e06994e357
|
||||
replaces="widelands-data>=0"
|
||||
|
||||
CXXFLAGS="-DU_USING_ICU_NAMESPACE=1"
|
||||
|
||||
|
@ -29,22 +29,5 @@ if [ "$CROSS_BUILD" ]; then
|
|||
fi
|
||||
|
||||
post_install() {
|
||||
# For some reason the binary is installed as /usr/widelands - move it
|
||||
vmkdir usr/bin
|
||||
mv ${DESTDIR}/usr/${pkgname} ${DESTDIR}/usr/bin
|
||||
vmkdir usr/share
|
||||
mv ${DESTDIR}/share/* ${DESTDIR}/usr/share/
|
||||
rmdir ${DESTDIR}/share
|
||||
|
||||
# Remove files not needed in the package
|
||||
rm -f ${DESTDIR}/usr/COPYING ${DESTDIR}/usr/CREDITS ${DESTDIR}/usr/ChangeLog ${DESTDIR}/usr/VERSION
|
||||
|
||||
vinstall ${FILESDIR}/${pkgname}.desktop 644 usr/share/applications
|
||||
}
|
||||
|
||||
widelands-data_package() {
|
||||
short_desc+=" - data files"
|
||||
pkg_install() {
|
||||
vmove usr/share/widelands
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue