diff options
| -rw-r--r-- | games-simulation/dwarffortress/dwarffortress-0.42.04.ebuild | 24 | ||||
| -rw-r--r-- | games-simulation/dwarffortress/files/Makefile | 2 | ||||
| -rw-r--r-- | games-simulation/dwarffortress/files/dwarffortress2.sh | 4 |
3 files changed, 14 insertions, 16 deletions
diff --git a/games-simulation/dwarffortress/dwarffortress-0.42.04.ebuild b/games-simulation/dwarffortress/dwarffortress-0.42.04.ebuild index b0b9b37e..78aaad9e 100644 --- a/games-simulation/dwarffortress/dwarffortress-0.42.04.ebuild +++ b/games-simulation/dwarffortress/dwarffortress-0.42.04.ebuild @@ -15,7 +15,7 @@ HOMEPAGE="http://www.bay12games.com/dwarves" SRC_URI="http://www.bay12games.com/dwarves/${MY_P}_linux.tar.bz2" LICENSE="free-noncomm BSD BitstreamVera" -SLOT="0" +SLOT="$PV" KEYWORDS="~amd64 ~x86 -*" IUSE="debug" @@ -38,7 +38,7 @@ DEPEND="${RDEPEND} S=${WORKDIR}/${MY_PN}_linux -gamesdir="${GAMES_PREFIX_OPT}/${PN}" +gamesdir="${GAMES_PREFIX_OPT}/${PN}-${SLOT}" QA_PRESTRIPPED="${gamesdir}/libs/Dwarf_Fortress" RESTRICT="strip" @@ -49,28 +49,26 @@ pkg_setup() { } src_prepare() { - rm libs/*.so* - cp "${FILESDIR}"/{dwarf-fortress,Makefile} . + rm -f libs/*.so* || die + cp "${FILESDIR}"/Makefile . || die + cp "${FILESDIR}"/dwarffortress2.sh ./dwarffortress || die epatch_user } src_configure() { + sed -i -e "s/@@SLOT@@/${SLOT}/g" ./dwarffortress || die + tc-export CXX PKG_CONFIG CXXFLAGS+=" -D$(use debug || echo N)DEBUG" } -src_compile() { - default - sed -i -e "s:^gamesdir=.*:gamesdir=${gamesdir}:" ${PN} || die -} - src_install() { # install data-files and libs insinto "${gamesdir}" doins -r raw data libs # install our wrapper - dogamesbin ${PN} + newgamesbin ./dwarffortress dwarffortress-${SLOT} # install docs dodoc README.linux *.txt @@ -82,9 +80,9 @@ src_install() { pkg_postinst() { elog "System-wide Dwarf Fortress has been installed to ${gamesdir}. This is" - elog "symlinked to ~/.dwarf-fortress when dwarf-fortress is run." - elog "For more information on what exactly is replaced, see ${GAMES_BINDIR}/${PN}." - elog "Note: This means that the primary entry point is ${GAMES_BINDIR}/${PN}." + elog "symlinked to ~/.dwarffortress-${SLOT} when dwarffortress-${SLOT} is run." + elog "For more information on what exactly is replaced, see ${GAMES_BINDIR}/dwarffortress-${SLOT}." + elog "Note: This means that the primary entry point is ${GAMES_BINDIR}/dwarffortress-${SLOT}." elog "Do not run ${gamesdir}/libs/Dwarf_Fortress." elog elog "Optional runtime dependencies: install sys-libs/ncurses[$(use amd64 && echo "abi_x86_32,")unicode]" diff --git a/games-simulation/dwarffortress/files/Makefile b/games-simulation/dwarffortress/files/Makefile index 66e6401d..548027bf 100644 --- a/games-simulation/dwarffortress/files/Makefile +++ b/games-simulation/dwarffortress/files/Makefile @@ -11,7 +11,7 @@ SRCS := g_src/basics.cpp g_src/command_line.cpp g_src/enabler.cpp \ g_src/music_and_sound_openal.cpp g_src/random.cpp g_src/textlines.cpp \ g_src/enabler_input.cpp g_src/KeybindingScreen.cpp \ g_src/win32_compat.cpp g_src/textures.cpp g_src/resize++.cpp \ - g_src/renderer_offscreen.cpp g_src/ttf_manager.cpp + g_src/renderer_offscreen.cpp g_src/ttf_manager.cpp g_src/ViewBase.cpp OBJS := $(SRCS:.cpp=.o) BLIBS := ncursesw openal sndfile diff --git a/games-simulation/dwarffortress/files/dwarffortress2.sh b/games-simulation/dwarffortress/files/dwarffortress2.sh index 8594e0bc..24281414 100644 --- a/games-simulation/dwarffortress/files/dwarffortress2.sh +++ b/games-simulation/dwarffortress/files/dwarffortress2.sh @@ -1,7 +1,7 @@ #!/bin/sh -gamesdir=/opt/dwarf-fortress -install="$HOME/.dwarf-fortress" +gamesdir=/opt/dwarffortress-@@SLOT@@ +install="$HOME/.dwarffortress-@@SLOT@@" do_install() { cp -rn "$gamesdir"/data "$install"/ |
