summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Reffett <creffett@gentoo.org>2016-07-30 16:29:37 -0400
committerChris Reffett <creffett@gentoo.org>2016-07-30 16:29:37 -0400
commitf22fcde397eaf46ea7d5f14b087c839766f64d1a (patch)
tree655842898b78e878ad34280151a4e52d70c365dc /games-roguelike
parentxfce-extra/xfce4-wavelan-plugin: Bump to 0.5.99, the GTK+3 pre-release (diff)
downloadgentoo-f22fcde397eaf46ea7d5f14b087c839766f64d1a.tar.gz
gentoo-f22fcde397eaf46ea7d5f14b087c839766f64d1a.tar.bz2
gentoo-f22fcde397eaf46ea7d5f14b087c839766f64d1a.zip
games-roguelike/dwarf-fortress: Version bump.
Gentoo-Bug: 589026 Package-Manager: portage-2.3.0_rc1 RepoMan-Options: --force
Diffstat (limited to 'games-roguelike')
-rw-r--r--games-roguelike/dwarf-fortress/Manifest2
-rw-r--r--games-roguelike/dwarf-fortress/dwarf-fortress-0.43.05.ebuild85
-rw-r--r--games-roguelike/dwarf-fortress/files/Makefile4
-rw-r--r--games-roguelike/dwarf-fortress/files/Makefile.native28
-rw-r--r--games-roguelike/dwarf-fortress/files/dwarf-fortress2
5 files changed, 118 insertions, 3 deletions
diff --git a/games-roguelike/dwarf-fortress/Manifest b/games-roguelike/dwarf-fortress/Manifest
index e842aaca7f2..eda79ad45cb 100644
--- a/games-roguelike/dwarf-fortress/Manifest
+++ b/games-roguelike/dwarf-fortress/Manifest
@@ -1,2 +1,4 @@
DIST df_40_24_linux.tar.bz2 12921246 SHA256 da37c6263a679123e6ac57fe0dd6def11f1d61efee3c5913de09495c88ce9234 SHA512 2242e471b7dbc996e819e2f74b2bbfda30a9a301755bc025ddcccdffdd3afe2e48bbedca31a332283ef829d023069398e57d6a87e26c582ddbce4a67ff7fd755 WHIRLPOOL 03cb652a2564d2b0c809be8252f7754d893f69ac1b95124ea108ed0fde9ac742c498d9e369339775695861e430a2ded0741b018f85551d48731730f98303dc69
DIST df_42_06_linux.tar.bz2 13857747 SHA256 03df8e73bf81e4f7bec9e789a83f8bd20b0b968d73131e4051e005db13fec99f SHA512 dfeb1406dcbd74091170eee4392c8eb876516d723b17e8aa291cab5b670be9fca4e22122788656e37afc03cd0e827e42b8cd27bc148d32639ebb7b8b7fa2bbf4 WHIRLPOOL d8fd93e9d90b4bee942c9a3751d1d03180157e4ecf406cf1cf31441946588990b2385a0b8d376f2a5386d7514d28b7ba5a6fbd2879e3a1e87124d902759909c3
+DIST df_43_05_linux.tar.bz2 11580594 SHA256 856c13170e8beefb5419ae71ee26c85db9716b3ebd4c7348aa44b896bd490be4 SHA512 502e6bac0bdd5586fb6b4e1117caf144a0336a7eed3ed9350ec316e4a286e309a15e0738517c0dd7d32f182984c501c7a8756e942d3dde9fb87f72b153f38e7a WHIRLPOOL 2ba6091c575eb7e2ca282e2192c0ca30ee48bfea473a0537acabfe33b2b7e848d1057f65409f9cc4aa2ec42f3c2dc7fef22139d3b2a788a84e71338a2c767ba1
+DIST df_43_05_linux32.tar.bz2 12158550 SHA256 0334e6b35ecc36949f5c60ffc1eb46fade3365b55a44f2e11fd4ae799ba7819a SHA512 d0446ddb5c37ee45ade36b18b815595e8d7bfd9749af4ecd2f25b45859d797a9da70f2344e2c58544feafc7df06882ade8a10534c37754359747c0d37f084b7c WHIRLPOOL 899d8739847cb37cb636453e7a728a0ae9765958fd77828e7f099b1f4b7a4bdaae0fee93121ddc81a0f2bf5ab4292380c9edb405dc5ed64d3d3cecf26f5f23c7
diff --git a/games-roguelike/dwarf-fortress/dwarf-fortress-0.43.05.ebuild b/games-roguelike/dwarf-fortress/dwarf-fortress-0.43.05.ebuild
new file mode 100644
index 00000000000..e22ed5253af
--- /dev/null
+++ b/games-roguelike/dwarf-fortress/dwarf-fortress-0.43.05.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit versionator
+
+MY_PV=$(replace_all_version_separators _ "$(get_version_component_range 2-)")
+MY_PN=df
+MY_P=${MY_PN}_${MY_PV}
+
+DESCRIPTION="A single-player fantasy game"
+HOMEPAGE="http://www.bay12games.com/dwarves"
+SRC_URI="amd64? ( http://www.bay12games.com/dwarves/${MY_P}_linux.tar.bz2 )
+ x86? ( http://www.bay12games.com/dwarves/${MY_P}_linux32.tar.bz2 )"
+
+LICENSE="free-noncomm BSD BitstreamVera"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 -*"
+IUSE="debug"
+
+RDEPEND="media-libs/glew:0
+ media-libs/libsdl[joystick,video]
+ media-libs/sdl-image[png]
+ media-libs/sdl-ttf
+ sys-libs/zlib
+ virtual/glu
+ x11-libs/gtk+:2"
+# Yup, libsndfile, openal and ncurses are only needed at compile-time; the code
+# dlopens them at runtime if requested.
+DEPEND="${RDEPEND}
+ media-libs/libsndfile
+ media-libs/openal
+ sys-libs/ncurses[unicode]
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_PN}_linux
+
+gamesdir="/opt/${PN}"
+QA_PREBUILT="${gamesdir#/}/libs/Dwarf_Fortress"
+RESTRICT="strip"
+
+src_prepare() {
+ rm -f libs/*.so* || die
+ sed -i -e '1i#include <cmath>' g_src/ttf_manager.cpp || die
+ default
+}
+
+src_configure() {
+ tc-export CXX PKG_CONFIG
+ CXXFLAGS+=" -D$(use debug || echo N)DEBUG"
+}
+
+src_compile() {
+ emake -f "${FILESDIR}/Makefile.native"
+ sed -e "s:^gamesdir=.*:gamesdir=${gamesdir}:" "${FILESDIR}/dwarf-fortress" > dwarf-fortress || die
+}
+
+src_install() {
+ # install data-files and libs
+ insinto "${gamesdir}"
+ doins -r raw data libs
+
+ # install our wrapper
+ dobin dwarf-fortress
+
+ # install docs
+ dodoc README.linux *.txt
+
+ 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 /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:"
+ elog "Install sys-libs/ncurses[unicode] for [PRINT_MODE:TEXT]"
+ elog "Install media-libs/openal and media-libs/libsndfile for audio output"
+ elog "Install media-libs/libsdl[opengl] for the OpenGL PRINT_MODE settings"
+}
diff --git a/games-roguelike/dwarf-fortress/files/Makefile b/games-roguelike/dwarf-fortress/files/Makefile
index 66e6401df5b..856670b6a67 100644
--- a/games-roguelike/dwarf-fortress/files/Makefile
+++ b/games-roguelike/dwarf-fortress/files/Makefile
@@ -1,4 +1,4 @@
-# Copyright 2014-2015 Alex Xu (Hello71)
+# Copyright 2014-2016 Alex Xu (Hello71)
# Distributed under the terms of the GNU General Public License v2
PKG_CONFIG ?= pkg-config
@@ -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-roguelike/dwarf-fortress/files/Makefile.native b/games-roguelike/dwarf-fortress/files/Makefile.native
new file mode 100644
index 00000000000..85383e5e2f1
--- /dev/null
+++ b/games-roguelike/dwarf-fortress/files/Makefile.native
@@ -0,0 +1,28 @@
+# Copyright 2014-2016 Alex Xu (Hello71)
+# Distributed under the terms of the GNU General Public License v2
+
+SRCS := g_src/basics.cpp g_src/command_line.cpp g_src/enabler.cpp \
+ g_src/files.cpp g_src/find_files_posix.cpp g_src/graphics.cpp \
+ g_src/init.cpp g_src/interface.cpp g_src/keybindings.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/ViewBase.cpp
+OBJS := $(SRCS:.cpp=.o)
+
+BLIBS := ncursesw openal sndfile
+LIBS := glew glu gtk+-2.0 sdl SDL_image SDL_ttf zlib
+CXXFLAGS ?= -O2 -pipe -Wall -Wextra
+CXXFLAGS += $(shell $(PKG_CONFIG) --cflags $(BLIBS) $(LIBS)) -Dunix -Dlinux -fPIC -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0
+LDLIBS := $(shell $(PKG_CONFIG) --libs $(LIBS))
+
+LG := libs/libgraphics.so
+
+all: $(LG)
+$(LG): $(OBJS)
+ $(LINK.cpp) -shared $^ $(LDLIBS) -o $@
+
+clean:
+ $(RM) $(LG) $(OBJS)
+
+.PHONY: clean
diff --git a/games-roguelike/dwarf-fortress/files/dwarf-fortress b/games-roguelike/dwarf-fortress/files/dwarf-fortress
index 8594e0bcefa..23b9c348754 100644
--- 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