diff options
Diffstat (limited to 'games-strategy/s25rttr')
-rw-r--r-- | games-strategy/s25rttr/ChangeLog | 11 | ||||
-rw-r--r-- | games-strategy/s25rttr/Manifest | 6 | ||||
-rw-r--r-- | games-strategy/s25rttr/files/s25rttr-0.8-cmake.patch | 160 | ||||
-rw-r--r-- | games-strategy/s25rttr/files/s25rttr-0.8-soundconverter.patch | 17 | ||||
-rw-r--r-- | games-strategy/s25rttr/metadata.xml | 17 | ||||
-rw-r--r-- | games-strategy/s25rttr/s25rttr-0.8.ebuild | 107 |
6 files changed, 318 insertions, 0 deletions
diff --git a/games-strategy/s25rttr/ChangeLog b/games-strategy/s25rttr/ChangeLog new file mode 100644 index 000000000000..878e0ef75696 --- /dev/null +++ b/games-strategy/s25rttr/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for games-strategy/s25rttr +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-strategy/s25rttr/ChangeLog,v 1.1 2012/11/12 23:07:17 hasufell Exp $ + +*s25rttr-0.8 (12 Nov 2012) + + 12 Nov 2012; Julian Ospald <hasufell@gentoo.org> +s25rttr-0.8.ebuild, + +files/s25rttr-0.8-cmake.patch, +files/s25rttr-0.8-soundconverter.patch, + +metadata.xml: + initial import wrt #363719 + diff --git a/games-strategy/s25rttr/Manifest b/games-strategy/s25rttr/Manifest new file mode 100644 index 000000000000..b317d1066bf3 --- /dev/null +++ b/games-strategy/s25rttr/Manifest @@ -0,0 +1,6 @@ +AUX s25rttr-0.8-cmake.patch 5733 SHA256 f9ed26bb6054f9696ab5cc7f56036e4774b18e948f6859709c9aafb550bfe4e4 SHA512 77de082a7d6f14930e929b97cd2760e4d3bae6635b89e330d81bc78bb40bd9475506cea33378b0f8dde0b563f59a6d613e119126e3089d403992d757f1a3363c WHIRLPOOL bc5b9c8bd9178190908fb6ba6382485761c0f03c8fb6ebdf9398e92ba044e38f56dd3221c06c86f6fdb882bc1097b9ddda0c1eb3dabb3e87c47b224c257c3076 +AUX s25rttr-0.8-soundconverter.patch 763 SHA256 a3a490b4efb2182400fc9b07a67f66c939a2fe8a58983e85f4cd5125bfc2de37 SHA512 0f16e86057cb1574b8dd2303c49547ce855897683de3af52a437da9304c7bc821bcd3278dae6652fb8a0a358e64c1fa4c0eaec88323ab2dc5a0c56da3ce61afe WHIRLPOOL 3d427181fa8354f5b01e4ebfe8a3d445099163bd705094ee43a7d1b6dcb0f2a873d8262e1a23816ba089b4efa0189c0a3c8c8ad5e5b89595337de9d2aad98163 +DIST s25rttr-0.8.tar.xz 39648588 SHA256 dc800097196ddf23ef974d51e394f596d915675614a51ada50fb412bd075805f SHA512 1d707fc2aa4aff4266c5e6667d5f94a7e4c5d571b6aadc156d68c11b15b0d8ade85d33723364589c90a60b0760e5e0794c25210f4a28005a64ff18d383d2ff52 WHIRLPOOL f54fccb8739203d6a65ed07dfefa150dd138b4bb73632b7a7646ae3b3e5ea96d1ca697d87b39d11f0bc9426cef953681692d5dbf223da4f9434fc1914b228ba1 +EBUILD s25rttr-0.8.ebuild 2517 SHA256 ef3233afb4b7d55152b3876339ba79bdf644c232478a8b7b9d4388330b198e34 SHA512 5298ebb265382477b62133742b086f3bac0f0475085e30b12c42f6a33920bb46604f804f0ff29c5d3e4f696043b5c3e5ad077c64180840c34c4b97302fcaf04a WHIRLPOOL 6e332f7d4b9d7831e05185036fa2e6f70b710fc9e0207ca70a9511ee370515878c6d9da78b2260a403ac9a49d6c0503c757d5f7fc67b3194aa54cfe79ae9bd0c +MISC ChangeLog 345 SHA256 340732f7dc083649e979db5c1510d82e5bad942e037bcf5e540f4fa32a0f8412 SHA512 34c2d664cc829f4da5f8dd6319e684fdf5fde9d35249300b3370ba1b22b3b2f9faeb129b3ee06e01a329f721a231ba4ee3c09dd870ee0659c8f216fd329892dd WHIRLPOOL 5689ae6e06360207ccc3bece5486bb92304960606f8e6f49982d551670821b380705bdd66603c77375756dba53648bbf66f17ecc73781d7da1fadeafd81f1967 +MISC metadata.xml 585 SHA256 1f556a546f9f2bd7fbb779cb0e887cc95a4c430e5c393d7facfff700280f4250 SHA512 c4ddee2c434f1b5c97c0e80b465e4a923844ed08f95019d15fefd27db532cd2132902d4dc77ca556ad95d22435e91d3c987577a27e33654c84578968aec5939d WHIRLPOOL 954ffb1e702b9fcd11d657302f5f605d1b0f88b7c3bf265738b47c234b6bc9effa1803922d9d686f26807c6f5d04bd8a6ac3a5103a9b52495de6b2336920d6b2 diff --git a/games-strategy/s25rttr/files/s25rttr-0.8-cmake.patch b/games-strategy/s25rttr/files/s25rttr-0.8-cmake.patch new file mode 100644 index 000000000000..38913c893e69 --- /dev/null +++ b/games-strategy/s25rttr/files/s25rttr-0.8-cmake.patch @@ -0,0 +1,160 @@ +From: Julian Ospald <hasufell@gentoo.org> +Date: Fri Oct 5 13:33:05 UTC 2012 + +make build system gentoo-compatible +provide options for SDL and GLFW video drivers + +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -19,12 +19,19 @@ + + ################################################################################ + +-INCLUDE(cmake/crosscompile.cmake) +- + PROJECT(s25client) + + ################################################################################ + ++# options ++OPTION(BUILD_GLFW_DRIVER "Build the GLFW video driver" 0) ++OPTION(BUILD_SDL_DRIVER "Build the sdl video driver" 1) ++IF (UNIX) ++ IF (NOT BUILD_SDL_DRIVER AND NOT BUILD_GLFW_DRIVER) ++ MESSAGE(FATAL_ERROR "No video driver selected! Either use SDL or GLFW.") ++ ENDIF (NOT BUILD_SDL_DRIVER AND NOT BUILD_GLFW_DRIVER) ++ENDIF (UNIX) ++ + SET(PREFIX ${PREFIX} CACHE STRING "Path prefix") + SET(BINDIR ${BINDIR} CACHE STRING "Directory for the binaries") + SET(DATADIR ${DATADIR} CACHE STRING "Data directory") +@@ -106,38 +113,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 +123,6 @@ + ADD_SUBDIRECTORY(libutil) + ADD_SUBDIRECTORY(liblobby) + ADD_SUBDIRECTORY(s-c) +-ADD_SUBDIRECTORY(s25update) + ADD_SUBDIRECTORY(src) + + ################################################################################ +@@ -157,7 +131,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/CMakeLists.txt ++++ driver/video/CMakeLists.txt +@@ -3,7 +3,11 @@ + ################################################################################# + + ADD_SUBDIRECTORY( WinAPI ) +-ADD_SUBDIRECTORY( GLFW ) +-ADD_SUBDIRECTORY( SDL ) ++IF(BUILD_GLFW_DRIVER) ++ ADD_SUBDIRECTORY( GLFW ) ++ENDIF(BUILD_GLFW_DRIVER) ++IF(BUILD_SDL_DRIVER) ++ ADD_SUBDIRECTORY( SDL ) ++ENDIF(BUILD_SDL_DRIVER) + + ################################################################################# +--- 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 +@@ -2,7 +2,7 @@ + ### $Id: s25rttr-0.8-cmake.patch,v 1.1 2012/11/12 23:07:17 hasufell Exp $ + ################################################################################# + +-IF ("${COMPILEFOR}/${COMPILEARCH}" STREQUAL "linux/i386" ) ++IF ("${COMPILEFOR}" STREQUAL "linux" ) + FIND_LIBRARY(GLFW_LIBRARY glfw) + + IF (GLFW_LIBRARY) +@@ -21,6 +21,6 @@ + ELSE (GLFW_LIBRARY) + MESSAGE(WARNING ": GLFW library not found: Not building GLFW videodriver") + ENDIF (GLFW_LIBRARY) +-ENDIF ("${COMPILEFOR}/${COMPILEARCH}" STREQUAL "linux/i386" ) ++ENDIF ("${COMPILEFOR}" STREQUAL "linux" ) + + ################################################################################# +--- 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" diff --git a/games-strategy/s25rttr/files/s25rttr-0.8-soundconverter.patch b/games-strategy/s25rttr/files/s25rttr-0.8-soundconverter.patch new file mode 100644 index 000000000000..493d7cb404be --- /dev/null +++ b/games-strategy/s25rttr/files/s25rttr-0.8-soundconverter.patch @@ -0,0 +1,17 @@ +From: hasufell <julian.ospald@googlemail.com> +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/metadata.xml b/games-strategy/s25rttr/metadata.xml new file mode 100644 index 000000000000..4a9d05192d9e --- /dev/null +++ b/games-strategy/s25rttr/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>games</herd> + <maintainer> + <email>hasufell@gentoo.org</email> + <name>Julian Ospald</name> + </maintainer> + <upstream> + <changelog>http://www.siedler25.org/index.php?com=dynamic&mod=9&PHPSESSID=e5fa4f90c4db5df0cb1e417e128300b5</changelog> + <bugs-to>https://bugs.launchpad.net/s25rttr</bugs-to> + </upstream> + <use> + <flag name='glfw'>Compile another video driver based on <pkg>media-libs/glfw</pkg>.</flag> + </use> +</pkgmetadata> + diff --git a/games-strategy/s25rttr/s25rttr-0.8.ebuild b/games-strategy/s25rttr/s25rttr-0.8.ebuild new file mode 100644 index 000000000000..c1037a0bf682 --- /dev/null +++ b/games-strategy/s25rttr/s25rttr-0.8.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-strategy/s25rttr/s25rttr-0.8.ebuild,v 1.1 2012/11/12 23:07:17 hasufell Exp $ + +EAPI=4 +inherit eutils cmake-utils gnome2-utils games + +DESCRIPTION="Open Source remake of The Settlers II game (needs original game files)" +HOMEPAGE="http://www.siedler25.org/" +# no upstream source tarball yet +# https://bugs.launchpad.net/s25rttr/+bug/1069546 +SRC_URI="http://dev.gentoo.org/~hasufell/distfiles/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86" +IUSE="debug glfw" + +RDEPEND="app-arch/bzip2 + media-libs/libsamplerate + media-libs/libsdl[X,audio,opengl,video] + media-libs/libsndfile + media-libs/sdl-mixer[vorbis] + net-libs/miniupnpc + virtual/libiconv + virtual/opengl + glfw? ( media-libs/glfw )" +DEPEND="${RDEPEND} + sys-devel/gettext" + +src_prepare() { + epatch "${FILESDIR}"/${P}-cmake.patch \ + "${FILESDIR}"/${P}-soundconverter.patch +} + +src_configure() { + local arch + case ${ARCH} in + amd64) + arch="x86_64" ;; + x86) + arch="i386" ;; + *) die "Architecture ${ARCH} not yet supported" ;; + esac + + local mycmakeargs=( + -DCOMPILEFOR="linux" + -DCOMPILEARCH="${arch}" + -DCMAKE_SKIP_RPATH=YES + -DPREFIX="${GAMES_PREFIX}" + -DBINDIR="${GAMES_BINDIR}" + -DDATADIR="${GAMES_DATADIR}" + -DLIBDIR="$(games_get_libdir)/${PN}" + -DDRIVERDIR="$(games_get_libdir)/${PN}" + -DGAMEDIR="~/.${PN}/S2" + $(cmake-utils_use_build glfw GLFW_DRIVER) + ) + + cmake-utils_src_configure +} + +src_compile() { + # work around some relative paths (CMAKE_IN_SOURCE_BUILD not supported) + ln -s "${CMAKE_USE_DIR}"/RTTR "${CMAKE_BUILD_DIR}"/RTTR || die + + cmake-utils_src_compile + + mv "${CMAKE_USE_DIR}"/RTTR/{sound-convert,s-c_resample} "${T}"/ || die +} + +src_install() { + cd "${CMAKE_BUILD_DIR}" || die + + exeinto "$(games_get_libdir)"/${PN} + doexe "${T}"/{sound-convert,s-c_resample} + exeinto "$(games_get_libdir)"/${PN}/video + doexe driver/video/SDL/src/libvideoSDL.so + use glfw && doexe driver/video/GLFW/src/libvideoGLFW.so + exeinto "$(games_get_libdir)"/${PN}/audio + doexe driver/audio/SDL/src/libaudioSDL.so + + insinto "${GAMES_DATADIR}" + doins -r "${CMAKE_USE_DIR}"/RTTR + + doicon -s 64 "${CMAKE_USE_DIR}"/debian/${PN}.png + dogamesbin src/s25client + make_desktop_entry "s25client" "Settlers RTTR" "${PN}" + dodoc RTTR/texte/{keyboardlayout.txt,readme.txt} + + prepgamesdirs +} + +pkg_preinst() { + games_pkg_preinst + gnome2_icon_savelist +} + +pkg_postinst() { + games_pkg_postinst + elog "Copy your Settlers2 game files into ~/.${PN}/S2" + + gnome2_icon_cache_update +} + +pkg_postrm() { + gnome2_icon_cache_update +} |