diff options
author | 2013-07-03 22:39:27 +0000 | |
---|---|---|
committer | 2013-07-03 22:39:27 +0000 | |
commit | 647cb8ad710332ad7a645f08da4ee68e4b946cf5 (patch) | |
tree | f1164b963d9139bf2426c6649d82416314e285e5 | |
parent | Build librt for multilib and the cross compiler too. Part of bug #475294. (diff) | |
download | gentoo-2-647cb8ad710332ad7a645f08da4ee68e4b946cf5.tar.gz gentoo-2-647cb8ad710332ad7a645f08da4ee68e4b946cf5.tar.bz2 gentoo-2-647cb8ad710332ad7a645f08da4ee68e4b946cf5.zip |
fix broken d2k mod caused by incomplete install rule
(Portage version: 2.2.0_alpha186/cvs/Linux x86_64, signed Manifest commit with key E73C35B3)
-rw-r--r-- | games-strategy/openra/ChangeLog | 8 | ||||
-rw-r--r-- | games-strategy/openra/files/openra-20130514-makefile.patch | 369 | ||||
-rw-r--r-- | games-strategy/openra/metadata.xml | 2 | ||||
-rw-r--r-- | games-strategy/openra/openra-20130514-r1.ebuild | 97 |
4 files changed, 475 insertions, 1 deletions
diff --git a/games-strategy/openra/ChangeLog b/games-strategy/openra/ChangeLog index 84b0cfc9f3ce..3135e0cdba17 100644 --- a/games-strategy/openra/ChangeLog +++ b/games-strategy/openra/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for games-strategy/openra # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-strategy/openra/ChangeLog,v 1.17 2013/06/29 18:41:44 hasufell Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-strategy/openra/ChangeLog,v 1.18 2013/07/03 22:39:27 hasufell Exp $ + +*openra-20130514-r1 (03 Jul 2013) + + 03 Jul 2013; Julian Ospald <hasufell@gentoo.org> +openra-20130514-r1.ebuild, + +files/openra-20130514-makefile.patch: + fix broken d2k mod caused by incomplete install rule 29 Jun 2013; Julian Ospald <hasufell@gentoo.org> openra-20130514.ebuild: don't build stuff in src_install diff --git a/games-strategy/openra/files/openra-20130514-makefile.patch b/games-strategy/openra/files/openra-20130514-makefile.patch new file mode 100644 index 000000000000..7bc9e5486684 --- /dev/null +++ b/games-strategy/openra/files/openra-20130514-makefile.patch @@ -0,0 +1,369 @@ +https://github.com/OpenRA/OpenRA/pull/3500 + +diff --git a/Makefile b/Makefile +index 343d413..291eb4d 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,34 +1,69 @@ ++############################# INSTRUCTIONS ############################# ++# ++# to compile, run: ++# make ++# ++# to compile with development tools, run: ++# make all ++# ++# to install, run: ++# make [prefix=/foo] [bindir=/bar/bin] install ++# ++# to install with development tools, run: ++# make [prefix=/foo] [bindir=/bar/bin] install-all ++# ++# to uninstall, run: ++# make uninstall ++# ++# for help, run: ++# make help ++# ++# to start the game, run: ++# openra ++ ++ ++ ++############################## TOOLCHAIN ############################### ++# + CSC = gmcs + CSFLAGS = -nologo -warn:4 -debug:full -optimize- -codepage:utf8 -unsafe -warnaserror + DEFINE = DEBUG;TRACE + COMMON_LIBS = System.dll System.Core.dll System.Drawing.dll System.Xml.dll thirdparty/ICSharpCode.SharpZipLib.dll thirdparty/FuzzyLogicLibrary.dll thirdparty/Mono.Nat.dll +-PHONY = core tools package all mods clean distclean dependencies version ++ ++ ++ ++######################### UTILITIES/SETTINGS ########################### ++# ++# install locations ++prefix ?= /usr/local ++datarootdir ?= $(prefix)/share ++datadir ?= $(datarootdir) ++bindir ?= $(prefix)/bin ++BIN_INSTALL_DIR = $(DESTDIR)$(bindir) ++DATA_INSTALL_DIR = $(DESTDIR)$(datadir)/openra ++ ++# install tools ++RM = rm ++RM_R = $(RM) -r ++RM_F = $(RM) -f ++CP = cp ++CP_R = $(CP) -r ++INSTALL = install ++INSTALL_DIR = $(INSTALL) -d ++INSTALL_PROGRAM = $(INSTALL) -m755 ++INSTALL_DATA = $(INSTALL) -m644 ++ ++# program targets ++CORE = fileformats rcg rgl rsdl rnull game utility ++TOOLS = editor tsbuild ralint ++ + VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`) + +-.SUFFIXES: +-core: game renderers mods utility tsbuild +-tools: editor ralint tsbuild +-package: dependencies core editor docs version +-mods: mod_ra mod_cnc mod_d2k +-all: dependencies core tools +-clean: +- @-rm -f *.exe *.dll *.mdb mods/**/*.dll mods/**/*.mdb *.resources +-distclean: clean +-dependencies: +- @ cp -r thirdparty/*.dl* . +- @ cp -r thirdparty/Tao/* . +-version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml +- @for i in $? ; do \ +- awk '{sub("Version:.*$$","Version: $(VERSION)"); print $0}' $${i} > $${i}.tmp && \ +- mv -f $${i}.tmp $${i} ; \ +- done +-default: dependencies core + +-.DEFAULT_GOAL := default + ++######################## PROGRAM TARGET RULES ########################## + # + # Core binaries +-# + fileformats_SRCS := $(shell find OpenRA.FileFormats/ -iname '*.cs') + fileformats_TARGET = OpenRA.FileFormats.dll + fileformats_KIND = library +@@ -39,16 +74,14 @@ fileformats: $(fileformats_TARGET) + game_SRCS := $(shell find OpenRA.Game/ -iname '*.cs') + game_TARGET = OpenRA.Game.exe + game_KIND = winexe +-game_DEPS = $(fileformats_TARGET) ++game_DEPS = $(fileformats_TARGET) + game_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll $(game_DEPS) \ + thirdparty/Tao/Tao.OpenAl.dll thirdparty/SharpFont.dll + game_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico + PROGRAMS += game + game: $(game_TARGET) + +-# + # Renderer dlls +-# + rsdl_SRCS := $(shell find OpenRA.Renderer.SdlCommon/ -iname '*.cs') + rsdl_TARGET = OpenRA.Renderer.SdlCommon.dll + rsdl_KIND = library +@@ -82,14 +115,13 @@ rnull_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll \ + PROGRAMS += rcg rgl rnull rsdl + renderers: $(rcg_TARGET) $(rgl_TARGET) $(rnull_TARGET) $(rsdl_TARGET) + +-# +-# Official Mods +-# +-# Red Alert ++ ++##### Official Mods ##### + + STD_MOD_LIBS = $(fileformats_TARGET) $(game_TARGET) + STD_MOD_DEPS = $(STD_MOD_LIBS) $(ralint_TARGET) + ++# Red Alert + mod_ra_SRCS := $(shell find OpenRA.Mods.RA/ -iname '*.cs') + mod_ra_TARGET = mods/ra/OpenRA.Mods.RA.dll + mod_ra_KIND = library +@@ -119,9 +151,9 @@ mod_d2k_EXTRA_CMDS = mono --debug RALint.exe d2k + PROGRAMS += mod_d2k + mod_d2k: $(mod_d2k_TARGET) + +-# +-# Tools +-# ++ ++##### Tools ##### ++ + # Map Editor + editor_SRCS := $(shell find OpenRA.Editor/ -iname '*.cs') + editor_TARGET = OpenRA.Editor.exe +@@ -163,13 +195,8 @@ OpenRA.TilesetBuilder.Surface.resources: + resgen2 OpenRA.TilesetBuilder/Surface.resx OpenRA.TilesetBuilder.Surface.resources 1> /dev/null + tsbuild: OpenRA.TilesetBuilder.frmBuilder.resources OpenRA.TilesetBuilder.frmNew.resources OpenRA.TilesetBuilder.Surface.resources $(tsbuild_TARGET) + +-# +-# Launchers / Utilities +-# +-# Patches binary headers to work around a mono bug +-fixheader.exe: packaging/fixheader.cs +- @echo CSC fixheader.exe +- @$(CSC) packaging/fixheader.cs $(CSFLAGS) -out:fixheader.exe -t:exe $(COMMON_LIBS:%=-r:%) ++ ++##### Launchers / Utilities ##### + + # Backend for the launcher apps - queries game/mod info and applies actions to an install + utility_SRCS := $(shell find OpenRA.Utility/ -iname '*.cs') +@@ -180,11 +207,13 @@ utility_LIBS = $(COMMON_LIBS) $(utility_DEPS) thirdparty/ICSharpCode.Shar + PROGRAMS += utility + utility: $(utility_TARGET) + +-.PHONY: $(PHONY) $(PROGRAMS) + +-# ++# Patches binary headers to work around a mono bug ++fixheader.exe: packaging/fixheader.cs ++ @echo CSC fixheader.exe ++ @$(CSC) packaging/fixheader.cs $(CSFLAGS) -out:fixheader.exe -t:exe $(COMMON_LIBS:%=-r:%) ++ + # Generate build rules for each target defined above in PROGRAMS +-# + define BUILD_ASSEMBLY + + $$($(1)_TARGET): $$($(1)_SRCS) Makefile $$($(1)_DEPS) fixheader.exe +@@ -203,68 +232,65 @@ endef + $(foreach prog,$(PROGRAMS),$(eval $(call BUILD_ASSEMBLY,$(prog)))) + + ++ ++########################## MAKE/INSTALL RULES ########################## + # +-# Install / Uninstall for *nix +-# +-prefix ?= /usr/local +-datarootdir ?= $(prefix)/share +-datadir ?= $(datarootdir) +-bindir ?= $(prefix)/bin +-BIN_INSTALL_DIR = $(DESTDIR)$(bindir) +-INSTALL_DIR = $(DESTDIR)$(datadir)/openra +-INSTALL = install +-INSTALL_PROGRAM = $(INSTALL) +-CORE = fileformats rcg rgl rsdl rnull game editor utility tsbuild ++default: dependencies core ++ ++core: game renderers mods utility tsbuild ++ ++tools: editor tsbuild ralint ++ ++package: dependencies core editor docs version ++ ++mods: mod_ra mod_cnc mod_d2k ++ ++all: dependencies core tools ++ ++clean: ++ @-$(RM_F) *.exe *.dll *.mdb mods/**/*.dll mods/**/*.mdb *.resources ++ ++distclean: clean ++ ++dependencies: ++ @ $(CP_R) thirdparty/*.dl* . ++ @ $(CP_R) thirdparty/Tao/* . ++ ++version: mods/ra/mod.yaml mods/cnc/mod.yaml mods/d2k/mod.yaml ++ @for i in $? ; do \ ++ awk '{sub("Version:.*$$","Version: $(VERSION)"); print $0}' $${i} > $${i}.tmp && \ ++ mv -f $${i}.tmp $${i} ; \ ++ done + + # Documentation (d2k depends on all mod libraries) +-docs: ++docs: utility + @mono --debug OpenRA.Utility.exe --docs d2k > DOCUMENTATION.md + +-install: all +- @-echo "Installing OpenRA to $(INSTALL_DIR)" +- @$(INSTALL_PROGRAM) -d $(INSTALL_DIR) +- @$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) $(INSTALL_DIR) +- @$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/cnc +- @$(INSTALL_PROGRAM) $(mod_cnc_TARGET) $(INSTALL_DIR)/mods/cnc +- @$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/ra +- @$(INSTALL_PROGRAM) $(mod_ra_TARGET) $(INSTALL_DIR)/mods/ra +- @$(INSTALL_PROGRAM) -d $(INSTALL_DIR)/mods/d2k +- @$(INSTALL_PROGRAM) $(mod_d2k_TARGET) $(INSTALL_DIR)/mods/d2k +- +- @-cp $(foreach f,$(shell ls mods/cnc --hide=*.dll),mods/cnc/$(f)) $(INSTALL_DIR)/mods/cnc +- @cp -r mods/cnc/maps $(INSTALL_DIR)/mods/cnc +- @cp -r mods/cnc/chrome $(INSTALL_DIR)/mods/cnc +- @cp -r mods/cnc/bits $(INSTALL_DIR)/mods/cnc +- @cp -r mods/cnc/rules $(INSTALL_DIR)/mods/cnc +- @cp -r mods/cnc/sequences $(INSTALL_DIR)/mods/cnc +- @cp -r mods/cnc/tilesets $(INSTALL_DIR)/mods/cnc +- @cp -r mods/cnc/uibits $(INSTALL_DIR)/mods/cnc +- +- @-cp $(foreach f,$(shell ls mods/ra --hide=*.dll),mods/ra/$(f)) $(INSTALL_DIR)/mods/ra +- @cp -r mods/ra/maps $(INSTALL_DIR)/mods/ra +- @cp -r mods/ra/bits $(INSTALL_DIR)/mods/ra +- @cp -r mods/ra/chrome $(INSTALL_DIR)/mods/ra +- @cp -r mods/ra/rules $(INSTALL_DIR)/mods/ra +- @cp -r mods/ra/tilesets $(INSTALL_DIR)/mods/ra +- @cp -r mods/ra/uibits $(INSTALL_DIR)/mods/ra +- +- @-cp $(foreach f,$(shell ls mods/d2k --hide=*.dll),mods/d2k/$(f)) $(INSTALL_DIR)/mods/d2k +- @cp -r mods/d2k/maps $(INSTALL_DIR)/mods/d2k +- @cp -r mods/d2k/bits $(INSTALL_DIR)/mods/d2k +- @cp -r mods/d2k/chrome $(INSTALL_DIR)/mods/d2k +- @cp -r mods/d2k/rules $(INSTALL_DIR)/mods/d2k +- @cp -r mods/d2k/tilesets $(INSTALL_DIR)/mods/d2k +- @cp -r mods/d2k/uibits $(INSTALL_DIR)/mods/d2k +- +- @cp -r glsl $(INSTALL_DIR) +- @cp -r cg $(INSTALL_DIR) +- @cp *.ttf $(INSTALL_DIR) +- @cp thirdparty/Tao/* $(INSTALL_DIR) +- @$(INSTALL_PROGRAM) thirdparty/ICSharpCode.SharpZipLib.dll $(INSTALL_DIR) +- @$(INSTALL_PROGRAM) thirdparty/FuzzyLogicLibrary.dll $(INSTALL_DIR) +- @$(INSTALL_PROGRAM) thirdparty/SharpFont.dll $(INSTALL_DIR) +- @cp thirdparty/SharpFont.dll.config $(INSTALL_DIR) +- @$(INSTALL_PROGRAM) thirdparty/Mono.Nat.dll $(INSTALL_DIR) ++install: install-core ++ ++install-all: install-core install-tools ++ ++install-core: default ++ @-echo "Installing OpenRA to $(DATA_INSTALL_DIR)" ++ @$(INSTALL_DIR) $(DATA_INSTALL_DIR) ++ @$(INSTALL_PROGRAM) $(foreach prog,$(CORE),$($(prog)_TARGET)) $(DATA_INSTALL_DIR) ++ @$(INSTALL_DIR) $(DATA_INSTALL_DIR)/mods ++ @$(CP_R) mods/cnc $(DATA_INSTALL_DIR)/mods/ ++ @$(INSTALL_PROGRAM) $(mod_cnc_TARGET) $(DATA_INSTALL_DIR)/mods/cnc ++ @$(CP_R) mods/ra $(DATA_INSTALL_DIR)/mods/ ++ @$(INSTALL_PROGRAM) $(mod_ra_TARGET) $(DATA_INSTALL_DIR)/mods/ra ++ @$(CP_R) mods/d2k $(DATA_INSTALL_DIR)/mods/ ++ @$(INSTALL_PROGRAM) $(mod_d2k_TARGET) $(DATA_INSTALL_DIR)/mods/d2k ++ ++ @$(CP_R) glsl $(DATA_INSTALL_DIR) ++ @$(CP_R) cg $(DATA_INSTALL_DIR) ++ @$(CP) *.ttf $(DATA_INSTALL_DIR) ++ @$(CP) thirdparty/Tao/* $(DATA_INSTALL_DIR) ++ @$(INSTALL_PROGRAM) thirdparty/ICSharpCode.SharpZipLib.dll $(DATA_INSTALL_DIR) ++ @$(INSTALL_PROGRAM) thirdparty/FuzzyLogicLibrary.dll $(DATA_INSTALL_DIR) ++ @$(INSTALL_PROGRAM) thirdparty/SharpFont.dll $(DATA_INSTALL_DIR) ++ @$(CP) thirdparty/SharpFont.dll.config $(DATA_INSTALL_DIR) ++ @$(INSTALL_PROGRAM) thirdparty/Mono.Nat.dll $(DATA_INSTALL_DIR) + + @echo "#!/bin/sh" > openra + @echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra +@@ -273,6 +299,16 @@ install: all + @echo 'cd "$${DATADIR}/openra"' >> openra + @echo 'exec mono OpenRA.Game.exe "$$@"' >> openra + ++ @$(INSTALL_DIR) $(BIN_INSTALL_DIR) ++ @$(INSTALL_PROGRAM) -m +rx openra $(BIN_INSTALL_DIR) ++ ++ @-$(RM) openra ++ ++install-tools: tools ++ @-echo "Installing OpenRA tools to $(DATA_INSTALL_DIR)" ++ @$(INSTALL_DIR) $(DATA_INSTALL_DIR) ++ @$(INSTALL_PROGRAM) $(foreach prog,$(TOOLS),$($(prog)_TARGET)) $(DATA_INSTALL_DIR) ++ + @echo "#!/bin/sh" > openra-editor + @echo 'BINDIR=$$(dirname $$(readlink -f $$0))' >> openra-editor + @echo 'ROOTDIR="$${BINDIR%'"$(bindir)"'}"' >> openra-editor +@@ -280,14 +316,42 @@ install: all + @echo 'cd "$${DATADIR}/openra"' >> openra-editor + @echo 'exec mono OpenRA.Editor.exe "$$@"' >> openra-editor + +- @$(INSTALL_PROGRAM) -d $(BIN_INSTALL_DIR) +- @$(INSTALL_PROGRAM) -m +rx openra $(BIN_INSTALL_DIR) ++ @$(INSTALL_DIR) $(BIN_INSTALL_DIR) + @$(INSTALL_PROGRAM) -m +rx openra-editor $(BIN_INSTALL_DIR) + +- @-rm openra +- @-rm openra-editor ++ @-$(RM) openra-editor + + uninstall: +- @-rm -r $(INSTALL_DIR) +- @-rm $(DESTDIR)$(bindir)/openra +- @-rm $(DESTDIR)$(bindir)/openra-editor ++ @-$(RM_R) $(DATA_INSTALL_DIR) ++ @-$(RM_F) $(BIN_INSTALL_DIR)/openra ++ @-$(RM_F) $(BIN_INSTALL_DIR)/openra-editor ++ ++help: ++ @echo to compile, run: ++ @echo \ \ make ++ @echo ++ @echo to compile with development tools, run: ++ @echo \ \ make all ++ @echo ++ @echo to install, run: ++ @echo \ \ make \[prefix=/foo\] \[bindir=/bar/bin\] install ++ @echo ++ @echo to install with development tools, run: ++ @echo \ \ make \[prefix=/foo\] \[bindir=/bar/bin\] install-all ++ @echo ++ @echo to uninstall, run: ++ @echo \ \ make uninstall ++ @echo ++ @echo to start the game, run: ++ @echo \ \ openra ++ ++ ++ ++ ++########################### MAKEFILE SETTINGS ########################## ++# ++.DEFAULT_GOAL := default ++ ++.SUFFIXES: ++ ++.PHONY: core tools package all mods clean distclean dependencies version $(PROGRAMS) diff --git a/games-strategy/openra/metadata.xml b/games-strategy/openra/metadata.xml index 3fa146948ba2..c49b86241916 100644 --- a/games-strategy/openra/metadata.xml +++ b/games-strategy/openra/metadata.xml @@ -19,5 +19,7 @@ </upstream> <use> <flag name="cg">NVIDIA toolkit plugin</flag> + <flag name="tools">Install some development tools + such as editor.</flag> </use> </pkgmetadata> diff --git a/games-strategy/openra/openra-20130514-r1.ebuild b/games-strategy/openra/openra-20130514-r1.ebuild new file mode 100644 index 000000000000..a5ed03b1fdcb --- /dev/null +++ b/games-strategy/openra/openra-20130514-r1.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-strategy/openra/openra-20130514-r1.ebuild,v 1.1 2013/07/03 22:39:27 hasufell Exp $ + +EAPI=5 + +inherit eutils mono-env gnome2-utils vcs-snapshot games + +DESCRIPTION="A free RTS engine supporting games like Command & Conquer and Red Alert" +HOMEPAGE="http://open-ra.org/" +SRC_URI="https://github.com/OpenRA/OpenRA/tarball/release-${PV} -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="cg tools" + +DEPEND="dev-dotnet/libgdiplus + dev-lang/mono + media-libs/freetype:2[X] + media-libs/libsdl[X,opengl,video] + media-libs/openal + virtual/jpeg + virtual/opengl + cg? ( >=media-gfx/nvidia-cg-toolkit-2.1.0017 )" +RDEPEND="${DEPEND}" + +pkg_setup() { + mono-env_pkg_setup + games_pkg_setup +} + +src_unpack() { + vcs-snapshot_src_unpack +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-makefile.patch + + # register game-version + sed \ + -e "/Version/s/{DEV_VERSION}/release-${PV}/" \ + -i mods/{ra,cnc,d2k}/mod.yaml || die +} + +src_compile() { + emake $(usex tools "all" "") +} + +src_install() { + emake \ + datadir="${GAMES_DATADIR}" \ + bindir="${GAMES_BINDIR}" \ + libdir="$(games_get_libdir)/${PN}" \ + DESTDIR="${D}" \ + $(usex tools "install-all" "install") + + # icons + insinto /usr/share/icons/ + doins -r packaging/linux/hicolor + + # desktop entries + local myrenderer=$(usex cg Cg Gl) + make_desktop_entry "${PN} Game.Mods=cnc Graphics.Renderer=${myrenderer}" \ + "OpenRA CNC" ${PN} + make_desktop_entry "${PN} Game.Mods=ra Graphics.Renderer=${myrenderer}" \ + "OpenRA RA" ${PN} + make_desktop_entry "${PN} Game.Mods=d2k Graphics.Renderer=${myrenderer}" \ + "OpenRA Dune2k" ${PN} + make_desktop_entry "${PN}-editor" "OpenRA Map Editor" ${PN} + + dodoc "${FILESDIR}"/README.gentoo README.md HACKING CHANGELOG + + # file permissions + prepgamesdirs +} + +pkg_preinst() { + games_pkg_preinst + gnome2_icon_savelist +} + +pkg_postinst() { + games_pkg_postinst + gnome2_icon_cache_update + + if ! use cg ; then + elog "If you have problems starting the game consider switching" + elog "to Graphics.Renderer=Cg in openra*.desktop or manually" + elog "run:" + elog "${PN} Game.Mods=\$mod Graphics.Renderer=Cg" + fi +} + +pkg_postrm() { + gnome2_icon_cache_update +} |