diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-roguelike/dwarf-fortress/files | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'games-roguelike/dwarf-fortress/files')
-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 |
3 files changed, 84 insertions, 0 deletions
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 "$@" |