From ce0053fae21b879b6d82cc55a463e970a36e31c1 Mon Sep 17 00:00:00 2001 From: hasufell Date: Wed, 2 May 2012 15:09:52 +0200 Subject: games-strategy/s25rttr: relocate soundconverter exe, clean up - thanks to mgorny --- games-strategy/s25rttr/ChangeLog | 4 + games-strategy/s25rttr/Manifest | 7 +- games-strategy/s25rttr/files/9999-cmake.patch | 134 +++++++++++++++++++++ .../s25rttr/files/9999-soundconverter.patch | 17 +++ games-strategy/s25rttr/files/cmake.patch | 134 --------------------- games-strategy/s25rttr/s25rttr-9999.ebuild | 34 ++++-- 6 files changed, 181 insertions(+), 149 deletions(-) create mode 100644 games-strategy/s25rttr/files/9999-cmake.patch create mode 100644 games-strategy/s25rttr/files/9999-soundconverter.patch delete mode 100644 games-strategy/s25rttr/files/cmake.patch (limited to 'games-strategy') diff --git a/games-strategy/s25rttr/ChangeLog b/games-strategy/s25rttr/ChangeLog index 47206c127..9e80b1f76 100644 --- a/games-strategy/s25rttr/ChangeLog +++ b/games-strategy/s25rttr/ChangeLog @@ -2,6 +2,10 @@ # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 02 May 2012; Julian Ospald +files/9999-cmake.patch, + +files/9999-soundconverter.patch, s25rttr-9999.ebuild, -files/cmake.patch: + relocate soundconverter exe, clean up - thanks to mgorny + *s25rttr-9999 (08 Apr 2012) 08 Apr 2012; hasufell +s25rttr-9999.ebuild, diff --git a/games-strategy/s25rttr/Manifest b/games-strategy/s25rttr/Manifest index 97d81a503..95b7a5935 100644 --- a/games-strategy/s25rttr/Manifest +++ b/games-strategy/s25rttr/Manifest @@ -1,4 +1,5 @@ -AUX cmake.patch 4793 RMD160 4f671cae94d6e84936632d28dbd1d4f469c6332b SHA1 64de1bb8ad8753502b2d7d3b0d1802d9fa158ffa SHA256 a5c6923a6bbe68677f583346a23f1593a3e8353b68f4ae3eece1de3bf3d87421 -EBUILD s25rttr-9999.ebuild 1885 RMD160 3609f307a07143328eba58f69b67219f0ef349cc SHA1 1eba762fac21c9d07728230c4eb8a948f0a9c29b SHA256 58ad14b58f36e829eb1718d24358a0bb2c81a096bfddcb26e4d5c7fe6c903a6f -MISC ChangeLog 312 RMD160 1ab3ecaa0694877e0eb8fc362f2a08f3af75c105 SHA1 4335356c924de56d9da6a85d1ccd15eeda3d6e2c SHA256 d3e501468261a4e8c19b5df8f1177b1df39ff4804197e8666028392c0bf2b678 +AUX 9999-cmake.patch 4793 RMD160 4f671cae94d6e84936632d28dbd1d4f469c6332b SHA1 64de1bb8ad8753502b2d7d3b0d1802d9fa158ffa SHA256 a5c6923a6bbe68677f583346a23f1593a3e8353b68f4ae3eece1de3bf3d87421 +AUX 9999-soundconverter.patch 766 RMD160 0207fea6e05deed4f66c35e1953a2e8a27e5028c SHA1 2c3a1af71f2e6779d6b859754ccd76482124c72b SHA256 d01682c34533128a254d8372b96af0855e6c4215ee59f30595c57b2af690590a +EBUILD s25rttr-9999.ebuild 2281 RMD160 2b3c9ce3464744227d0be054b69784efc297b02c SHA1 ed249c96eb83a21815b0c726ab314316c78b854d SHA256 df5198d2bff97e1836fc2a9a608bf01e7a65b271b16e912dd1d0bacdfd67a837 +MISC ChangeLog 525 RMD160 eab4d127d95106b1e855ef6b11c0ddb737bf9c90 SHA1 9f633f89cc6a1ccb3ed84acbb46d0ecea3d5796b SHA256 9791e3f5ea119252400c0b36f1b68608dd0964d66665b9f361c1e2ed74a81a97 MISC metadata.xml 214 RMD160 efd8175069efb91061298ff4584218b633e44678 SHA1 d372fdbfcb7fd07a4082961d3f3527be4fca1d60 SHA256 c1f09dc7d5313cd2da7b82259c7846ed23144d62b15e59680ada90e2b6b4d154 diff --git a/games-strategy/s25rttr/files/9999-cmake.patch b/games-strategy/s25rttr/files/9999-cmake.patch new file mode 100644 index 000000000..ea7ae7674 --- /dev/null +++ b/games-strategy/s25rttr/files/9999-cmake.patch @@ -0,0 +1,134 @@ +From: hasufell +Date: Sat Apr 7 13:44:53 UTC 2012 + +make build system gentoo-compatible + +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -18,8 +18,6 @@ + INCLUDE(CMakeMacroEnsureOutOfSourceBuild) + + ################################################################################ +- +-INCLUDE(cmake/crosscompile.cmake) + + PROJECT(s25client) + +@@ -106,38 +104,6 @@ + build_paths.h) + CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/build_version.h.cmake" + build_version.h) +-CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/build/preinstall.sh.cmake" +- preinstall.sh @ONLY) +-CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/build/postinstall.sh.cmake" +- postinstall.sh @ONLY) +- +-################################################################################ +- +-ADD_SUBDIRECTORY(version) +- +-ADD_CUSTOM_TARGET(updateversion ALL +- COMMAND "${CMAKE_BINARY_DIR}/version/src/version" "${CMAKE_SOURCE_DIR}" +- DEPENDS version +- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" +-) +- +-ADD_CUSTOM_TARGET(mrproper +- COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/build/cleanup.sh" +- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" +-) +- +-ADD_CUSTOM_TARGET(create_nightly +- COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/release/create_release.sh" "nightly" "${CMAKE_SOURCE_DIR}" +- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" +-) +- +-#ADD_CUSTOM_TARGET(create_stable +-# COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/release/create_release.sh" "stable" "${CMAKE_SOURCE_DIR}" +-# WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" +-#) +- +-# preinstall script +-INSTALL(SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/cmake/preinstall.cmake") + + ################################################################################ + +@@ -148,7 +114,6 @@ + ADD_SUBDIRECTORY(libutil) + ADD_SUBDIRECTORY(liblobby) + ADD_SUBDIRECTORY(s-c) +-ADD_SUBDIRECTORY(s25update) + ADD_SUBDIRECTORY(src) + + ################################################################################ +@@ -157,7 +122,6 @@ + INSTALL(CODE "INCLUDE(driver/cmake_install.cmake)") + INSTALL(CODE "INCLUDE(libsiedler2/cmake_install.cmake)") + INSTALL(CODE "INCLUDE(s-c/cmake_install.cmake)") +-INSTALL(CODE "INCLUDE(s25update/cmake_install.cmake)") + INSTALL(CODE "INCLUDE(src/cmake_install.cmake)") + + # and then dont let him install anything +--- driver/video/SDL/src/CMakeLists.txt ++++ driver/video/SDL/src/CMakeLists.txt +@@ -30,9 +30,9 @@ + ADD_CUSTOM_COMMAND(TARGET videoSDL POST_BUILD COMMAND ln -fvs SDL/src/${SL_PREFIX}videoSDL${CMAKE_SHARED_LIBRARY_SUFFIX} ../../videoSDL${CMAKE_SHARED_LIBRARY_SUFFIX}) + + INSTALL(TARGETS videoSDL +- RUNTIME DESTINATION ${LIBDIR}/driver/video +- LIBRARY DESTINATION ${LIBDIR}/driver/video +- ARCHIVE DESTINATION ${LIBDIR}/driver/video ++ RUNTIME DESTINATION ${LIBDIR} ++ LIBRARY DESTINATION ${LIBDIR} ++ ARCHIVE DESTINATION ${LIBDIR} + ) + ELSE (SDL_FOUND) + MESSAGE(WARNING ": SDL library not found: Not building SDL videodriver") +--- driver/video/GLFW/src/CMakeLists.txt ++++ driver/video/GLFW/src/CMakeLists.txt +@@ -17,7 +17,7 @@ + + ADD_CUSTOM_COMMAND(TARGET videoGLFW POST_BUILD COMMAND ln -fvs GLFW/src/${CMAKE_SHARED_LIBRARY_PREFIX}videoGLFW${CMAKE_SHARED_LIBRARY_SUFFIX} ../../videoGLFW${CMAKE_SHARED_LIBRARY_SUFFIX}) + +- INSTALL(TARGETS videoGLFW DESTINATION ${LIBDIR}/driver/video) ++ INSTALL(TARGETS videoGLFW DESTINATION ${LIBDIR}) + ELSE (GLFW_LIBRARY) + MESSAGE(WARNING ": GLFW library not found: Not building GLFW videodriver") + ENDIF (GLFW_LIBRARY) +--- driver/audio/SDL/src/CMakeLists.txt ++++ driver/audio/SDL/src/CMakeLists.txt +@@ -34,9 +34,9 @@ + ADD_CUSTOM_COMMAND(TARGET audioSDL POST_BUILD COMMAND ln -fvs SDL/src/${SL_PREFIX}audioSDL${CMAKE_SHARED_LIBRARY_SUFFIX} ../../audioSDL${CMAKE_SHARED_LIBRARY_SUFFIX}) + + INSTALL(TARGETS audioSDL +- RUNTIME DESTINATION ${LIBDIR}/driver/audio +- LIBRARY DESTINATION ${LIBDIR}/driver/audio +- ARCHIVE DESTINATION ${LIBDIR}/driver/audio ++ RUNTIME DESTINATION ${LIBDIR} ++ LIBRARY DESTINATION ${LIBDIR} ++ ARCHIVE DESTINATION ${LIBDIR} + ) + ELSE (SDLMIXER_FOUND) + MESSAGE(WARNING ": SDL_mixer library not found: Not building SDL audiodriver") +--- build_paths.h.cmake ++++ build_paths.h.cmake +@@ -41,6 +41,7 @@ + + // set game directory (normal $(datadir)/s25rttr/S2) + //#define GAMEDIR DATADIR"/S2" ++#cmakedefine GAMEDIR "${GAMEDIR}" + + // set driver directory (normal $(libdir)/driver) + //#define DRIVERDIR LIBDIR"/driver" +--- build_version.h.cmake ++++ build_version.h.cmake +@@ -2,7 +2,7 @@ + #define VERSION_H_INCLUDED + + #define WINDOW_TITLE "Return To The Roots" +-#define WINDOW_VERSION "20000211" +-#define WINDOW_REVISION "0" ++#define WINDOW_VERSION "${WINDOW_VERSION}" ++#define WINDOW_REVISION "${WINDOW_REVISION}" + + #endif // VERSION_H_INCLUDED diff --git a/games-strategy/s25rttr/files/9999-soundconverter.patch b/games-strategy/s25rttr/files/9999-soundconverter.patch new file mode 100644 index 000000000..c415a550b --- /dev/null +++ b/games-strategy/s25rttr/files/9999-soundconverter.patch @@ -0,0 +1,17 @@ +From: hasufell +Date: Mon Apr 30 20:42:28 UTC 2012 + +relocate executables sound-convert and s-c_resample which get installed +into datadir by default + +--- libutil/src/files.h ++++ libutil/src/files.h +@@ -140,7 +140,7 @@ + /* 54 */RTTRDIR "", // unbenutzt + /* 55 */SETTINGSDIR "/LSTS/SOUND.LST", // Die konvertierte sound.lst + /* 56 */RTTRDIR "/sound.scs", // Das konvertier-script +- /* 57 */RTTRDIR "", // Basispfad fürn Soundconverter ++ /* 57 */DRIVERDIR "", // Basispfad fürn Soundconverter + /* 58 */GAMEDIR "/DATA/MIS0BOBS.LST", + /* 59 */GAMEDIR "/DATA/MIS1BOBS.LST", + /* 60 */GAMEDIR "/DATA/MIS2BOBS.LST", diff --git a/games-strategy/s25rttr/files/cmake.patch b/games-strategy/s25rttr/files/cmake.patch deleted file mode 100644 index ea7ae7674..000000000 --- a/games-strategy/s25rttr/files/cmake.patch +++ /dev/null @@ -1,134 +0,0 @@ -From: hasufell -Date: Sat Apr 7 13:44:53 UTC 2012 - -make build system gentoo-compatible - ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -18,8 +18,6 @@ - INCLUDE(CMakeMacroEnsureOutOfSourceBuild) - - ################################################################################ -- --INCLUDE(cmake/crosscompile.cmake) - - PROJECT(s25client) - -@@ -106,38 +104,6 @@ - build_paths.h) - CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/build_version.h.cmake" - build_version.h) --CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/build/preinstall.sh.cmake" -- preinstall.sh @ONLY) --CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/build/postinstall.sh.cmake" -- postinstall.sh @ONLY) -- --################################################################################ -- --ADD_SUBDIRECTORY(version) -- --ADD_CUSTOM_TARGET(updateversion ALL -- COMMAND "${CMAKE_BINARY_DIR}/version/src/version" "${CMAKE_SOURCE_DIR}" -- DEPENDS version -- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" --) -- --ADD_CUSTOM_TARGET(mrproper -- COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/build/cleanup.sh" -- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" --) -- --ADD_CUSTOM_TARGET(create_nightly -- COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/release/create_release.sh" "nightly" "${CMAKE_SOURCE_DIR}" -- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" --) -- --#ADD_CUSTOM_TARGET(create_stable --# COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/release/create_release.sh" "stable" "${CMAKE_SOURCE_DIR}" --# WORKING_DIRECTORY "${CMAKE_BINARY_DIR}" --#) -- --# preinstall script --INSTALL(SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/cmake/preinstall.cmake") - - ################################################################################ - -@@ -148,7 +114,6 @@ - ADD_SUBDIRECTORY(libutil) - ADD_SUBDIRECTORY(liblobby) - ADD_SUBDIRECTORY(s-c) --ADD_SUBDIRECTORY(s25update) - ADD_SUBDIRECTORY(src) - - ################################################################################ -@@ -157,7 +122,6 @@ - INSTALL(CODE "INCLUDE(driver/cmake_install.cmake)") - INSTALL(CODE "INCLUDE(libsiedler2/cmake_install.cmake)") - INSTALL(CODE "INCLUDE(s-c/cmake_install.cmake)") --INSTALL(CODE "INCLUDE(s25update/cmake_install.cmake)") - INSTALL(CODE "INCLUDE(src/cmake_install.cmake)") - - # and then dont let him install anything ---- driver/video/SDL/src/CMakeLists.txt -+++ driver/video/SDL/src/CMakeLists.txt -@@ -30,9 +30,9 @@ - ADD_CUSTOM_COMMAND(TARGET videoSDL POST_BUILD COMMAND ln -fvs SDL/src/${SL_PREFIX}videoSDL${CMAKE_SHARED_LIBRARY_SUFFIX} ../../videoSDL${CMAKE_SHARED_LIBRARY_SUFFIX}) - - INSTALL(TARGETS videoSDL -- RUNTIME DESTINATION ${LIBDIR}/driver/video -- LIBRARY DESTINATION ${LIBDIR}/driver/video -- ARCHIVE DESTINATION ${LIBDIR}/driver/video -+ RUNTIME DESTINATION ${LIBDIR} -+ LIBRARY DESTINATION ${LIBDIR} -+ ARCHIVE DESTINATION ${LIBDIR} - ) - ELSE (SDL_FOUND) - MESSAGE(WARNING ": SDL library not found: Not building SDL videodriver") ---- driver/video/GLFW/src/CMakeLists.txt -+++ driver/video/GLFW/src/CMakeLists.txt -@@ -17,7 +17,7 @@ - - ADD_CUSTOM_COMMAND(TARGET videoGLFW POST_BUILD COMMAND ln -fvs GLFW/src/${CMAKE_SHARED_LIBRARY_PREFIX}videoGLFW${CMAKE_SHARED_LIBRARY_SUFFIX} ../../videoGLFW${CMAKE_SHARED_LIBRARY_SUFFIX}) - -- INSTALL(TARGETS videoGLFW DESTINATION ${LIBDIR}/driver/video) -+ INSTALL(TARGETS videoGLFW DESTINATION ${LIBDIR}) - ELSE (GLFW_LIBRARY) - MESSAGE(WARNING ": GLFW library not found: Not building GLFW videodriver") - ENDIF (GLFW_LIBRARY) ---- driver/audio/SDL/src/CMakeLists.txt -+++ driver/audio/SDL/src/CMakeLists.txt -@@ -34,9 +34,9 @@ - ADD_CUSTOM_COMMAND(TARGET audioSDL POST_BUILD COMMAND ln -fvs SDL/src/${SL_PREFIX}audioSDL${CMAKE_SHARED_LIBRARY_SUFFIX} ../../audioSDL${CMAKE_SHARED_LIBRARY_SUFFIX}) - - INSTALL(TARGETS audioSDL -- RUNTIME DESTINATION ${LIBDIR}/driver/audio -- LIBRARY DESTINATION ${LIBDIR}/driver/audio -- ARCHIVE DESTINATION ${LIBDIR}/driver/audio -+ RUNTIME DESTINATION ${LIBDIR} -+ LIBRARY DESTINATION ${LIBDIR} -+ ARCHIVE DESTINATION ${LIBDIR} - ) - ELSE (SDLMIXER_FOUND) - MESSAGE(WARNING ": SDL_mixer library not found: Not building SDL audiodriver") ---- build_paths.h.cmake -+++ build_paths.h.cmake -@@ -41,6 +41,7 @@ - - // set game directory (normal $(datadir)/s25rttr/S2) - //#define GAMEDIR DATADIR"/S2" -+#cmakedefine GAMEDIR "${GAMEDIR}" - - // set driver directory (normal $(libdir)/driver) - //#define DRIVERDIR LIBDIR"/driver" ---- build_version.h.cmake -+++ build_version.h.cmake -@@ -2,7 +2,7 @@ - #define VERSION_H_INCLUDED - - #define WINDOW_TITLE "Return To The Roots" --#define WINDOW_VERSION "20000211" --#define WINDOW_REVISION "0" -+#define WINDOW_VERSION "${WINDOW_VERSION}" -+#define WINDOW_REVISION "${WINDOW_REVISION}" - - #endif // VERSION_H_INCLUDED diff --git a/games-strategy/s25rttr/s25rttr-9999.ebuild b/games-strategy/s25rttr/s25rttr-9999.ebuild index 42e670f5e..882e83fc6 100644 --- a/games-strategy/s25rttr/s25rttr-9999.ebuild +++ b/games-strategy/s25rttr/s25rttr-9999.ebuild @@ -28,10 +28,14 @@ DEPEND="${RDEPEND} src_prepare() { # date Sat Apr 7 2012 - epatch "${FILESDIR}"/cmake.patch + epatch "${FILESDIR}"/${PV}-cmake.patch + # date Mon Apr 30 2012 + epatch "${FILESDIR}"/${PV}-soundconverter.patch } src_configure() { + # build system does not set the version for us + # will prevent us from connecting to other players local mydate mydate=$(bzr version-info "${EBZR_STORE_DIR}/${EBZR_PROJECT}" 2> /dev/null \ | awk '{if ($1 == "date:") {gsub("-", "",$2); print $2}}') @@ -52,29 +56,35 @@ src_configure() { src_compile() { # build system uses some relative paths - ln -s "${S}"/RTTR "${WORKDIR}"/${P}_build/RTTR || die + # CMAKE_IN_SOURCE_BUILD fails/unsupported + ln -s "${CMAKE_USE_DIR}"/RTTR "${CMAKE_BUILD_DIR}"/RTTR || die cmake-utils_src_compile } src_install() { - # work around dirty install-script - cd "${WORKDIR}"/${P}_build || die - insinto "${GAMES_DATADIR}" - doins -r RTTR || die - - doicon "${S}"/debian/${PN}.png || die - - dogamesbin src/s25client || die - make_desktop_entry "s25client" "Settlers RTTR" "${PN}" + cd "${CMAKE_BUILD_DIR}" || die - # libs + # libs, converter + exeinto "$(games_get_libdir)"/${PN} + doexe RTTR/{sound-convert,s-c_resample} || die exeinto "$(games_get_libdir)"/${PN}/video doexe driver/video/SDL/src/libvideoSDL.so || die exeinto "$(games_get_libdir)"/${PN}/audio doexe driver/audio/SDL/src/libaudioSDL.so || die + # data + insinto "${GAMES_DATADIR}" + rm RTTR/{sound-convert,s-c_resample} || die + doins -r RTTR || die + + # icon, bin, wrapper, docs + doicon "${CMAKE_USE_DIR}"/debian/${PN}.png || die + dogamesbin src/s25client || die + make_desktop_entry "s25client" "Settlers RTTR" "${PN}" dodoc RTTR/texte/{keyboardlayout.txt,readme.txt} || die + + # permissions prepgamesdirs } -- cgit v1.2.3-65-gdbad