diff options
Diffstat (limited to 'games-roguelike/dwarf-fortress')
-rw-r--r-- | games-roguelike/dwarf-fortress/Manifest | 10 | ||||
-rw-r--r-- | games-roguelike/dwarf-fortress/dwarf-fortress-0.43.05.ebuild | 84 | ||||
-rw-r--r-- | games-roguelike/dwarf-fortress/dwarf-fortress-0.44.12.ebuild | 84 | ||||
-rw-r--r-- | games-roguelike/dwarf-fortress/files/Makefile | 32 | ||||
-rw-r--r-- | games-roguelike/dwarf-fortress/files/Makefile.native | 28 | ||||
-rw-r--r-- | games-roguelike/dwarf-fortress/files/dwarf-fortress | 24 | ||||
-rw-r--r-- | games-roguelike/dwarf-fortress/metadata.xml | 16 |
7 files changed, 278 insertions, 0 deletions
diff --git a/games-roguelike/dwarf-fortress/Manifest b/games-roguelike/dwarf-fortress/Manifest new file mode 100644 index 000000000000..dff2a0695a7b --- /dev/null +++ b/games-roguelike/dwarf-fortress/Manifest @@ -0,0 +1,10 @@ +AUX Makefile 1169 BLAKE2B 79ffa48adf56ae2233d9e10e6bb20acb55984cf969d50d2d2a73a31783b6692517062a1960eb01f1c9dd56c0d8ed38dd1612745e26101349f54e878941e2c605 SHA512 94baa1189e6a01415d46c475a0d1e40c785ded0473fd7dd89f136df36c07d58f718fee23b7d885e5ee8774a62063c9d92a1d26b02643f36ad5562e3e168e86bf +AUX Makefile.native 1016 BLAKE2B ea40a1f90bf52e52c7cf88e99c73c981c00506eddb4ad9c57200bd272ae37d5871793d5a0308cde8b4c3be9824b5549a23429d465f874e0ca018862f3072dc3b SHA512 d390c65f406cf8b43f3d493cd6513167c122a5811e3bc8614a66dc080eac21df9fc1d5f110503c8f6815f683eaeb5ddcdd833d310400ccc2426ae81c2b8159f8 +AUX dwarf-fortress 516 BLAKE2B 9d2faffac265e99698fa1c481eec8598fbe66b4ab205b18c76d285cd16fe1b32d3bfa9bc415bceae6e1e350e955ac3b3cebd7d46943a06ff71715fd1cb5402df SHA512 1f1fada35e33cb99c28835d600f6567ecaaf7b2c6111a2e96b1a88c54e5d727f94ae1c0213327bc70a623dbdf19a8433e3c59edcab5a40e898b0124eb2eb9006 +DIST df_43_05_linux.tar.bz2 11580594 BLAKE2B 7157f8ed5f8798a533d992811c804515acc8abb3bb84b25af6905fd6b2338e95879e318bec0dade18f1eba1421d17a781d1da8b49c719988d2cb6d7046b0c3be SHA512 502e6bac0bdd5586fb6b4e1117caf144a0336a7eed3ed9350ec316e4a286e309a15e0738517c0dd7d32f182984c501c7a8756e942d3dde9fb87f72b153f38e7a +DIST df_43_05_linux32.tar.bz2 12158550 BLAKE2B 4c1f5ad834aa0a2b6438b8aaf0b0ad6cfc60656f58845a274ac3d8ad7e09182d7263e3a495d1bff0b1fb5499097569216fac0bc87cff95fc6a85e3211acc297d SHA512 d0446ddb5c37ee45ade36b18b815595e8d7bfd9749af4ecd2f25b45859d797a9da70f2344e2c58544feafc7df06882ade8a10534c37754359747c0d37f084b7c +DIST df_44_12_linux.tar.bz2 12081683 BLAKE2B 2410e8da6af6a8ced45d3e95dc06e2d0f4e31dbdcd6b8d9945a761d2278532bb24c1095418aa22639eedded256b3d485fa128984e6282a491d4dc7bd9af8671b SHA512 03cd7f6800d44873b573cc5bffb12c7a246c3aba0ee8535001372df689a5179dc02592670fd87f2fd5de82421605f34152f6241307c8f7b9fb4d7b8704aed70c +DIST df_44_12_linux32.tar.bz2 12686340 BLAKE2B bf1e1370930d91d2c9e72d3366bc79706092d1505853eb63c6160fea39822551d3276958ac6d2916b8f7825be0c054a037219210f0c2c18a731065a2dd1bb842 SHA512 5cd352acf310592c7e30442205b7fe590f421c5e3562959dcfd32a17d3d562347c2b32e3bc5835637c5550ce2c696c17b6dc910ee4cf766be07af306e83537db +EBUILD dwarf-fortress-0.43.05.ebuild 2336 BLAKE2B 97411ad8ae7ffb1841a58be8cdb503e827bc570cf795e9b48c3236f59c4d81e9ea6825329775d7c1421aa112d3d8238446fe946d58808987649b4f9ef4a8cb96 SHA512 9fb15d69e8df35916919d4cd74ea05cfa0e721cda80260fde0d19c2bff32caa81fd449216d584e3059987ca7892f3553da8c9646f214e9ad2e2dab41bfe351f4 +EBUILD dwarf-fortress-0.44.12.ebuild 2336 BLAKE2B 97411ad8ae7ffb1841a58be8cdb503e827bc570cf795e9b48c3236f59c4d81e9ea6825329775d7c1421aa112d3d8238446fe946d58808987649b4f9ef4a8cb96 SHA512 9fb15d69e8df35916919d4cd74ea05cfa0e721cda80260fde0d19c2bff32caa81fd449216d584e3059987ca7892f3553da8c9646f214e9ad2e2dab41bfe351f4 +MISC metadata.xml 455 BLAKE2B cad71196c8cb8c8246703bf00d8470faacd39b564ba7ce8a4819c19d1ef28561ad893000e991ba8eefaff8697497fe96fb19e3c07f18a073d2b9fd406c11346e SHA512 913a17c9b0f3d8909e1d01d1924d3efecb47dce07fe3f10cb7fda44150f816b690bd8698cef3b81a706f043db39b6e33a791fe704892010a47c522b1add8561e 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 000000000000..a8f36028ee27 --- /dev/null +++ b/games-roguelike/dwarf-fortress/dwarf-fortress-0.43.05.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit versionator toolchain-funcs + +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:5[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/dwarf-fortress-0.44.12.ebuild b/games-roguelike/dwarf-fortress/dwarf-fortress-0.44.12.ebuild new file mode 100644 index 000000000000..a8f36028ee27 --- /dev/null +++ b/games-roguelike/dwarf-fortress/dwarf-fortress-0.44.12.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit versionator toolchain-funcs + +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:5[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 new file mode 100644 index 000000000000..856670b6a67e --- /dev/null +++ b/games-roguelike/dwarf-fortress/files/Makefile @@ -0,0 +1,32 @@ +# Copyright 2014-2016 Alex Xu (Hello71) +# Distributed under the terms of the GNU General Public License v2 + +PKG_CONFIG ?= pkg-config +PKG_CONFIG_PATH ?= /usr/lib32/pkgconfig:/usr/lib/pkgconfig +PKG_CONFIG := PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) + +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 += -m32 $(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/Makefile.native b/games-roguelike/dwarf-fortress/files/Makefile.native new file mode 100644 index 000000000000..85383e5e2f1d --- /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 new file mode 100644 index 000000000000..23b9c348754c --- /dev/null +++ b/games-roguelike/dwarf-fortress/files/dwarf-fortress @@ -0,0 +1,24 @@ +#!/bin/sh + +gamesdir=/opt/dwarf-fortress +install="$HOME/.dwarf-fortress" + +do_install() { + cp -rn "$gamesdir"/data "$install"/ + # DF gets unhappy when this is out of sync + cp -f "$gamesdir"/data/index "$install"/data/ + cp -rsn "$gamesdir"/* "$install"/ +} + +if [ -d "$install" ]; then + # delete dangling symlinks + find -L "$install/" -type l -delete + # ignore "are the same file" errors + do_install 2>/dev/null +else + mkdir "$install" || exit + do_install || exit +fi + +cd "$install" || exit +exec ./libs/Dwarf_Fortress "$@" diff --git a/games-roguelike/dwarf-fortress/metadata.xml b/games-roguelike/dwarf-fortress/metadata.xml new file mode 100644 index 000000000000..32ecf7b18035 --- /dev/null +++ b/games-roguelike/dwarf-fortress/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>alex_y_xu@yahoo.ca</email> + <name>Alex Xu</name> +</maintainer> +<maintainer type="person"> + <email>creffett@gentoo.org</email> + <name>Chris Reffett</name> +</maintainer> +<maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> +</maintainer> +</pkgmetadata> |