Summary: | games-roguelike/dwarf-fortress-0.43.03 version bump | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | eroen <erikdenstore+gbugs> |
Component: | Current packages | Assignee: | Alex Xu (Hello71) <alex_y_xu> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | creffett, kelleymcchesney, proxy-maint |
Priority: | Normal | Keywords: | Inclusion, PATCH, REVIEWED |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://www.bay12games.com/dwarves | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=589026 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
0001-dwarf-fortress-43_03-bump.patch
0001-dwarf-fortress-43_03-bump.patch 0001-dwarf-fortress-43_03-bump.patch |
Description
eroen
2016-06-13 14:07:06 UTC
Created attachment 437374 [details, diff]
0001-dwarf-fortress-43_03-bump.patch
Bump to EAPI 6, drop deprecated games.eclass, make $PN usage for filenames
more consistent. Add missing source file to Makefile.
--- dwarf-fortress-0.42.06.ebuild 2016-06-13 14:20:55.882011595 +0200
+++ dwarf-fortress-0.43.03.ebuild 2016-06-13 15:44:49.724131231 +0200
@@ -2,9 +2,9 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=5
+EAPI=6
-inherit eutils games multilib versionator
+inherit multilib versionator
MY_PV=$(replace_all_version_separators _ "$(get_version_component_range 2-)")
MY_PN=df
@@ -38,20 +38,18 @@
S=${WORKDIR}/${MY_PN}_linux
-gamesdir="${GAMES_PREFIX_OPT}/${PN}"
+gamesdir="/opt/${PN}"
QA_PRESTRIPPED="${gamesdir}/libs/Dwarf_Fortress"
RESTRICT="strip"
pkg_setup() {
- games_pkg_setup
-
multilib_toolchain_setup x86
}
src_prepare() {
rm libs/*.so*
cp "${FILESDIR}"/{dwarf-fortress,Makefile} .
- epatch_user
+ default
}
src_configure() {
@@ -70,25 +68,21 @@
doins -r raw data libs
# install our wrapper
- dogamesbin ${PN}
+ dobin ${PN}
# install docs
dodoc README.linux *.txt
- prepgamesdirs
-
- fperms 750 "${gamesdir}"/libs/Dwarf_Fortress
+ fperms 755 "${gamesdir}"/libs/Dwarf_Fortress
}
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 ~/.dwarf-fortress when ${PN} is run."
+ elog "For more information on what exactly is replaced, see /usr/bin/${PN}."
+ elog "Note: This means that the primary entry point is /usr/bin/${PN}."
elog "Do not run ${gamesdir}/libs/Dwarf_Fortress."
elog
elog "Optional runtime dependencies: install sys-libs/ncurses[$(use amd64 && echo "abi_x86_32,")unicode]"
elog "for [PRINT_MODE:TEXT]. Install media-libs/openal$(use amd64 && echo "[abi_x86_32]") for audio output."
- elog
- games_pkg_postinst
}
--- a/games-roguelike/dwarf-fortress/files/Makefile
+++ b/games-roguelike/dwarf-fortress/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
as long as you're fixing things, could you figure out why the libsdl deps have specific USE flags on them? I can't remember why I put them in there (or if it was me who did it). Created attachment 437442 [details, diff] 0001-dwarf-fortress-43_03-bump.patch (In reply to Alex Xu (Hello71) from comment #2) > as long as you're fixing things, could you figure out why the libsdl deps > have specific USE flags on them? I can't remember why I put them in there > (or if it was me who did it). I have tested (build and run) various use flag combinations of the deps and updated the ebuild. For libsdl and openal some sort of output should be enabled for sanity, but from looking at the tree I'm given to understand this is not usually explicit. I only have a setup to test (respectively) X and alsa outputs, but presumably the others work too. I'm confused as to why the dependencies on kbproto and xproto were added, I don't see anything including the headers they install. I also made some more minor edits since the previous patch. --- dwarf-fortress-0.42.06.ebuild 2016-06-13 21:36:48.934633160 +0200 +++ dwarf-fortress-0.43.03.ebuild 2016-06-13 22:06:27.988675442 +0200 @@ -2,9 +2,9 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -EAPI=5 +EAPI=6 -inherit eutils games multilib versionator +inherit multilib versionator MY_PV=$(replace_all_version_separators _ "$(get_version_component_range 2-)") MY_PN=df @@ -20,38 +20,34 @@ IUSE="debug" RDEPEND="media-libs/glew[abi_x86_32(-)] - media-libs/libsdl[abi_x86_32(-),opengl,video,X] - media-libs/libsndfile[abi_x86_32(-),alsa] - media-libs/sdl-image[abi_x86_32(-),jpeg,png,tiff] + media-libs/libsdl[abi_x86_32(-),joystick,video] + media-libs/sdl-image[abi_x86_32(-),png] media-libs/sdl-ttf[abi_x86_32(-)] sys-libs/zlib[abi_x86_32(-)] virtual/glu[abi_x86_32(-)] x11-libs/gtk+:2[abi_x86_32(-)]" -# Yup, openal and ncurses are only needed at compile-time; the code dlopens it at runtime -# if requested. +# Yup, libsndfile, openal and ncurses are only needed at compile-time; the code +# dlopens them at runtime if requested. DEPEND="${RDEPEND} + media-libs/libsndfile[abi_x86_32(-)] media-libs/openal[abi_x86_32(-)] sys-libs/ncurses[abi_x86_32(-),unicode] - virtual/pkgconfig - x11-proto/kbproto[abi_x86_32(-)] - x11-proto/xproto[abi_x86_32(-)]" + virtual/pkgconfig" S=${WORKDIR}/${MY_PN}_linux -gamesdir="${GAMES_PREFIX_OPT}/${PN}" -QA_PRESTRIPPED="${gamesdir}/libs/Dwarf_Fortress" +gamesdir="/opt/${PN}" +QA_PREBUILT="${gamesdir#/}/libs/Dwarf_Fortress" RESTRICT="strip" pkg_setup() { - games_pkg_setup - multilib_toolchain_setup x86 } src_prepare() { - rm libs/*.so* - cp "${FILESDIR}"/{dwarf-fortress,Makefile} . - epatch_user + rm -f libs/*.so* || die + cp "${FILESDIR}"/{dwarf-fortress,Makefile} . || die + default } src_configure() { @@ -61,7 +57,7 @@ src_compile() { default - sed -i -e "s:^gamesdir=.*:gamesdir=${gamesdir}:" ${PN} || die + sed -i -e "s:^gamesdir=.*:gamesdir=${gamesdir}:" dwarf-fortress || die } src_install() { @@ -70,25 +66,21 @@ doins -r raw data libs # install our wrapper - dogamesbin ${PN} + dobin dwarf-fortress # install docs dodoc README.linux *.txt - - prepgamesdirs - - fperms 750 "${gamesdir}"/libs/Dwarf_Fortress } 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 "For more information on what exactly is replaced, see /usr/bin/dwarf-fortress." + elog "Note: This means that the primary entry point is /usr/bin/dwarf-fortress." elog "Do not run ${gamesdir}/libs/Dwarf_Fortress." elog - elog "Optional runtime dependencies: install sys-libs/ncurses[$(use amd64 && echo "abi_x86_32,")unicode]" - elog "for [PRINT_MODE:TEXT]. Install media-libs/openal$(use amd64 && echo "[abi_x86_32]") for audio output." - elog - games_pkg_postinst + elog "Optional runtime dependencies:" + elog "Install sys-libs/ncurses[$(use amd64 && echo "abi_x86_32,")unicode] for [PRINT_MODE:TEXT]" + elog "Install media-libs/openal$(use amd64 && echo "[abi_x86_32]") and media-libs/libsndfile$(use amd64 && echo "[abi_x86_32]") for audio output" + elog "Install media-libs/libsdl[$(use amd64 && echo "abi_x86_32,")opengl] for the OpenGL PRINT_MODE settings" } --- a/games-roguelike/dwarf-fortress/files/Makefile +++ b/games-roguelike/dwarf-fortress/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 --- a/games-roguelike/dwarf-fortress/files/dwarf-fortress +++ b/games-roguelike/dwarf-fortress/files/dwarf-fortress @@ -10,7 +10,7 @@ do_install() { cp -rsn "$gamesdir"/* "$install"/ } -if [[ -d "$install" ]]; then +if [ -d "$install" ]; then # delete dangling symlinks find -L "$install/" -type l -delete # ignore "are the same file" errors Created attachment 437444 [details, diff]
0001-dwarf-fortress-43_03-bump.patch
Whoops, the fperms call was supposed to stay :(
Haven't tested, but LGTM. I don't know why I omitted ViewBase.cpp, and I don't really feel like spending a few hours to track it down. If it works, then sure. please don't do that. could someone please apply this? I want to start working on the same-arch version, but I'd like this to be in first. see bug 589026. |