summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhasufell <julian.ospald@googlemail.com>2012-04-08 11:50:09 +0200
committerhasufell <julian.ospald@googlemail.com>2012-04-08 11:50:09 +0200
commit0c10cc4822b0654db9569e4aaec582ec453db181 (patch)
treef1309e28b86a88f641beedf1e430aed9a2129c2d /games-strategy
parentAutomatic update to use.local.desc (diff)
downloadsunrise-0c10cc4822b0654db9569e4aaec582ec453db181.tar.gz
sunrise-0c10cc4822b0654db9569e4aaec582ec453db181.tar.bz2
sunrise-0c10cc4822b0654db9569e4aaec582ec453db181.zip
games-strategy/s25rttr: New Ebuild for bug 411247 thanks to mgorny
Diffstat (limited to 'games-strategy')
-rw-r--r--games-strategy/s25rttr/ChangeLog10
-rw-r--r--games-strategy/s25rttr/Manifest4
-rw-r--r--games-strategy/s25rttr/files/cmake.patch134
-rw-r--r--games-strategy/s25rttr/metadata.xml7
-rw-r--r--games-strategy/s25rttr/s25rttr-9999.ebuild84
5 files changed, 239 insertions, 0 deletions
diff --git a/games-strategy/s25rttr/ChangeLog b/games-strategy/s25rttr/ChangeLog
new file mode 100644
index 000000000..47206c127
--- /dev/null
+++ b/games-strategy/s25rttr/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for games-strategy/s25rttr
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*s25rttr-9999 (08 Apr 2012)
+
+ 08 Apr 2012; hasufell <julian.ospald@googlemail.com> +s25rttr-9999.ebuild,
+ +files/cmake.patch, +metadata.xml:
+ New Ebuild for bug 411247 thanks to mgorny
+
diff --git a/games-strategy/s25rttr/Manifest b/games-strategy/s25rttr/Manifest
new file mode 100644
index 000000000..97d81a503
--- /dev/null
+++ b/games-strategy/s25rttr/Manifest
@@ -0,0 +1,4 @@
+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
+MISC metadata.xml 214 RMD160 efd8175069efb91061298ff4584218b633e44678 SHA1 d372fdbfcb7fd07a4082961d3f3527be4fca1d60 SHA256 c1f09dc7d5313cd2da7b82259c7846ed23144d62b15e59680ada90e2b6b4d154
diff --git a/games-strategy/s25rttr/files/cmake.patch b/games-strategy/s25rttr/files/cmake.patch
new file mode 100644
index 000000000..ea7ae7674
--- /dev/null
+++ b/games-strategy/s25rttr/files/cmake.patch
@@ -0,0 +1,134 @@
+From: hasufell <julian.ospald@googlemail.com>
+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/metadata.xml b/games-strategy/s25rttr/metadata.xml
new file mode 100644
index 000000000..cc3fe2494
--- /dev/null
+++ b/games-strategy/s25rttr/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-wanted@gentoo.org</email>
+ </maintainer>
+</pkgmetadata>
diff --git a/games-strategy/s25rttr/s25rttr-9999.ebuild b/games-strategy/s25rttr/s25rttr-9999.ebuild
new file mode 100644
index 000000000..42e670f5e
--- /dev/null
+++ b/games-strategy/s25rttr/s25rttr-9999.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+
+EBZR_REPO_URI="lp:s25rttr"
+
+inherit eutils cmake-utils bzr games
+
+DESCRIPTION="Open Source remake of The Settlers II game"
+HOMEPAGE="http://www.siedler25.org/"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+RDEPEND="app-arch/bzip2
+ media-libs/libsamplerate
+ media-libs/libsdl[X,audio,video]
+ media-libs/libsndfile
+ media-libs/sdl-mixer
+ net-libs/miniupnpc
+ virtual/opengl"
+DEPEND="${RDEPEND}
+ sys-devel/gettext"
+
+src_prepare() {
+ # date Sat Apr 7 2012
+ epatch "${FILESDIR}"/cmake.patch
+}
+
+src_configure() {
+ local mydate
+ mydate=$(bzr version-info "${EBZR_STORE_DIR}/${EBZR_PROJECT}" 2> /dev/null \
+ | awk '{if ($1 == "date:") {gsub("-", "",$2); print $2}}')
+
+ local mycmakeargs=(
+ -DPREFIX="${GAMES_PREFIX}"
+ -DBINDIR="${GAMES_BINDIR}"
+ -DDATADIR="${GAMES_DATADIR}"
+ -DLIBDIR="$(games_get_libdir)/${PN}"
+ -DDRIVERDIR="$(games_get_libdir)/${PN}"
+ -DGAMEDIR="~/.${PN}/S2"
+ -DWINDOW_VERSION="${mydate}"
+ -DWINDOW_REVISION="${EBZR_REVNO}"
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ # build system uses some relative paths
+ ln -s "${S}"/RTTR "${WORKDIR}"/${P}_build/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}"
+
+ # libs
+ 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
+
+ dodoc RTTR/texte/{keyboardlayout.txt,readme.txt} || die
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ elog "Copy your Settlers2 cdrom content into ~/.${PN}/S2"
+}