diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2012-07-13 08:12:08 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2012-07-13 08:12:08 +0300 |
commit | e543b01583b453ed3df227c351d88ad31db5d6b2 (patch) | |
tree | 76318e3b8e5046107cde7086f1c8647ee3308b48 /games-engines | |
parent | e108f0a8aea1a133df27c7703fb7d70fe33f3684 (diff) |
new file: games-engines/openmw/files/openmw-0.15.0-cfg.patch
new file: games-engines/openmw/files/openmw-0.15.0-cmake.patch
new file: games-engines/openmw/openmw-9999.ebuild
Diffstat (limited to 'games-engines')
-rw-r--r-- | games-engines/openmw/files/openmw-0.15.0-cfg.patch | 11 | ||||
-rw-r--r-- | games-engines/openmw/files/openmw-0.15.0-cmake.patch | 75 | ||||
-rw-r--r-- | games-engines/openmw/openmw-9999.ebuild | 100 |
3 files changed, 186 insertions, 0 deletions
diff --git a/games-engines/openmw/files/openmw-0.15.0-cfg.patch b/games-engines/openmw/files/openmw-0.15.0-cfg.patch new file mode 100644 index 0000000..18ca732 --- /dev/null +++ b/games-engines/openmw/files/openmw-0.15.0-cfg.patch @@ -0,0 +1,11 @@ +From: Julian Ospald <hasufell@gentoo.org> +Date: Sat Jun 16 00:27:52 UTC 2012 + +use cmake variable for data location + +--- files/openmw.cfg ++++ files/openmw.cfg +@@ -1,2 +1,2 @@ +-data="?mw?Data Files" ++data=${MORROWIND_DATA_FILES} + resources=${MORROWIND_RESOURCE_FILES} diff --git a/games-engines/openmw/files/openmw-0.15.0-cmake.patch b/games-engines/openmw/files/openmw-0.15.0-cmake.patch new file mode 100644 index 0000000..9811a85 --- /dev/null +++ b/games-engines/openmw/files/openmw-0.15.0-cmake.patch @@ -0,0 +1,75 @@ +From: Julian Ospald <hasufell@gentoo.org> +Date: Fri Jun 15 10:15:36 UTC 2012 +Subject: build system + +add install rules +remove random flags + +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -39,6 +39,15 @@ + + find_program(DPKG_PROGRAM dpkg DOC "dpkg program of Debian-based systems") + ++# paths ++set(BINDIR "bin" CACHE PATH "Where to install binaries") ++set(DATAROOTDIR "${CMAKE_INSTALL_PREFIX}/share" CACHE PATH "Sets the root of data directories to a non-default location") ++set(DATADIR "${CMAKE_INSTALL_PREFIX}/share/openmw" CACHE PATH "Sets the openmw data directories to a non-default location") ++set(DOCDIR "${DATAROOTDIR}/doc/openmw" CACHE PATH "Sets the doc directory to a non-default location.") ++set(MANDIR "${DATAROOTDIR}/man" CACHE PATH "Where to install manpages") ++set(SYSCONFDIR "" CACHE PATH "Set config dir") ++set(ICONDIR "share/pixmaps" CACHE PATH "Set icon dir") ++ + # Location of morrowind data files + if(DPKG_PROGRAM) + set(MORROWIND_DATA_FILES "/usr/share/games/openmw/data/" CACHE PATH "location of Morrowind data files") +@@ -293,21 +302,6 @@ + "${APP_BUNDLE_DIR}/Contents/Resources/OpenMW.icns" COPYONLY) + endif (APPLE) + +- +-# Compiler settings +-if (CMAKE_COMPILER_IS_GNUCC) +- add_definitions (-Wall -Wextra -Wno-unused-parameter -Wno-reorder) +- +- # Silence warnings in OGRE headers. Remove once OGRE got fixed! +- add_definitions (-Wno-ignored-qualifiers) +- +- execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion +- OUTPUT_VARIABLE GCC_VERSION) +- if ("${GCC_VERSION}" VERSION_GREATER 4.6 OR "${GCC_VERSION}" VERSION_EQUAL 4.6) +- add_definitions (-Wno-unused-but-set-parameter) +- endif("${GCC_VERSION}" VERSION_GREATER 4.6 OR "${GCC_VERSION}" VERSION_EQUAL 4.6) +-endif (CMAKE_COMPILER_IS_GNUCC) +- + if(DPKG_PROGRAM) + SET(CMAKE_INSTALL_PREFIX "/usr") + +@@ -610,3 +604,27 @@ + " COMPONENT Runtime) + include(CPack) + endif (APPLE) ++ ++## Linux building ++ ++# Install binaries ++INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/openmw" DESTINATION "${BINDIR}" ) ++INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/omwlauncher" DESTINATION "${BINDIR}" ) ++INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/esmtool" DESTINATION "${BINDIR}" ) ++INSTALL(PROGRAMS "${OpenMW_BINARY_DIR}/mwiniimport" DESTINATION "${BINDIR}" ) ++ ++# Install icon and .desktop ++INSTALL(FILES "${OpenMW_SOURCE_DIR}/apps/launcher/resources/images/openmw.png" DESTINATION "${ICONDIR}") ++INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.desktop" DESTINATION "share/applications") ++ ++# Install global configuration files ++INSTALL(FILES "${OpenMW_BINARY_DIR}/openmw.cfg.install" DESTINATION "${SYSCONFDIR}" RENAME "openmw.cfg" ) ++INSTALL(FILES "${OpenMW_BINARY_DIR}/plugins.cfg" DESTINATION "${SYSCONFDIR}" ) ++INSTALL(FILES "${OpenMW_BINARY_DIR}/settings-default.cfg" DESTINATION "${SYSCONFDIR}" ) ++INSTALL(FILES "${OpenMW_BINARY_DIR}/transparency-overrides.cfg" DESTINATION "${SYSCONFDIR}" ) ++INSTALL(FILES "${OpenMW_BINARY_DIR}/launcher.cfg" DESTINATION "${SYSCONFDIR}" ) ++ ++# Install resources ++INSTALL(DIRECTORY "${OpenMW_BINARY_DIR}/resources" DESTINATION "${DATADIR}" ) ++INSTALL(FILES "${OpenMW_BINARY_DIR}/launcher.qss" DESTINATION "${DATADIR}/resources" ) ++ diff --git a/games-engines/openmw/openmw-9999.ebuild b/games-engines/openmw/openmw-9999.ebuild new file mode 100644 index 0000000..bda8b00 --- /dev/null +++ b/games-engines/openmw/openmw-9999.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils flag-o-matic gnome2-utils cmake-utils games git + +DESCRIPTION="An open source reimplementation of TES III: Morrowind" +HOMEPAGE="http://openmw.org/" +SRC_URI="" + +EGIT_REPO_URI="git://github.com/zinnschlag/openmw.git" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="cdinstall ffmpeg +mpg123" + +RDEPEND=">=dev-games/mygui-3.2.0 + >=dev-games/ogre-1.8.0[cg,freeimage,ois,opengl,zip] + dev-games/ois + >=dev-libs/boost-1.46.0 + media-gfx/nvidia-cg-toolkit + media-libs/freetype:2 + media-libs/openal + >=sci-physics/bullet-2.80 + >=x11-libs/qt-core-4.7.0:4 + >=x11-libs/qt-gui-4.7.0:4 + ffmpeg? ( media-video/ffmpeg ) + mpg123? ( media-libs/libsndfile + media-sound/mpg123 )" +DEPEND="${RDEPEND} + virtual/pkgconfig" +PDEPEND="cdinstall? ( games-rpg/morrowind-data )" + +REQUIRED_USE="^^ ( mpg123 ffmpeg )" + +S=${WORKDIR}/${P}-source + +src_prepare() { + epatch "${FILESDIR}"/${PN}-0.15.0-cmake.patch + epatch "${FILESDIR}"/${PN}-0.15.0-cfg.patch + + sed \ + -e "s#globalPath(\"/etc/\")#globalPath(\"${GAMES_SYSCONFDIR}\")#" \ + -i components/files/linuxpath.cpp || die "fixing global confdir failed!" + + sed \ + -e '1i#include <stdexcept>' \ + -e '1i#include <memory>' \ + -i apps/${PN}/mwsound/ffmpeg_decoder.cpp || die "fixing includes failed!" + + sed \ + -e '/^Version/d' \ + -i files/${PN}.desktop || die "fixing desktop file failed!" +} + +src_configure() { + # QA + append-flags -fno-strict-aliasing + + local mycmakeargs=( + $(cmake-utils_use_use ffmpeg FFMPEG) + $(cmake-utils_use_use mpg123 MPG123) + -DBINDIR="${GAMES_BINDIR}" + -DDATADIR="${GAMES_DATADIR}"/${PN} + -DSYSCONFDIR="${GAMES_SYSCONFDIR}"/${PN} + -DICONDIR=/usr/share/icons/hicolor/256x256/apps + -DMORROWIND_DATA_FILES="${GAMES_DATADIR}"/morrowind-data + -DMORROWIND_RESOURCE_FILES="${GAMES_DATADIR}"/${PN}/resources + -DUSE_AUDIERE=OFF + ) + + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile +} + +src_install() { + cmake-utils_src_install + dodoc readme.txt + prepgamesdirs +} + +pkg_preinst() { + games_pkg_preinst + gnome2_icon_savelist +} + +pkg_postinst() { + games_pkg_postinst + gnome2_icon_cache_update +} + +pkg_postrm() { + gnome2_icon_cache_update +} |