Last active
August 15, 2021 07:57
-
-
Save Faalagorn/e6d6440cd768d32c8a571023fa08769a to your computer and use it in GitHub Desktop.
cataclysm-dda-git PKGBUILD for Arch Linux with wayland.patch needed from https://github.com/CleverRaven/Cataclysm-DDA/issues/49886#issuecomment-898884078
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Kyle Keen <keenerd@gmail.com> | |
# Contributor: Frederic Bezies <fredbezies at gmail dot com> | |
# Contributor: Fernando Carmona Varo <ferkiwi @t gmail dot com> | |
# Contributor: Klemen Košir <klemen913@gmail.com> | |
pkgname=cataclysm-dda-git | |
pkgver=cdda.experimental.2021.08.15.0641.r0.g7835cc2566 | |
_pkgver=0.E | |
pkgrel=1 | |
pkgdesc="A post-apocalyptic roguelike." | |
#url="http://cataclysmrl.blogspot.com/" | |
#url="http://www.cataclysm.glyphgryph.com/" | |
#url="http://en.cataclysmdda.com/" | |
url="https://cataclysmdda.org/" | |
arch=('i686' 'x86_64') | |
license=("CCPL:by-sa") | |
conflicts=('cataclysm-dda' 'cataclysm-dda-ncurses' 'cataclysm-dda-tiles') | |
depends=('ncurses') | |
makedepends=('sdl2_image' 'sdl2_ttf' 'sdl2_mixer' 'freetype2' 'git') | |
optdepends=('sdl2_image: for tiles' | |
'sdl2_ttf: for tiles' | |
'freetype2: for tiles' | |
'sdl2_mixer: for tiles') | |
source=("$pkgname"::'git://github.com/CleverRaven/Cataclysm-DDA.git#branch=master' | |
'wayland.patch') | |
# The git repo is more than a GB | |
# so download a snapshot while waiting for shallow clone support in makepkg | |
# (you may uncomment the alternate source/pkgver() if you would prefer to use that) | |
#source=('https://github.com/CleverRaven/Cataclysm-DDA/archive/master.zip') | |
md5sums=('SKIP' | |
'e7798ad2b34c195375bf299aa61a19c6') | |
pkgver() { | |
cd "$pkgname" | |
git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | |
# cd "Cataclysm-DDA-master" | |
# git describe --tags --long | sed 's/-/.r/; s/-/./' | |
# # no git metadata in the snapshot, so fake it | |
# echo "${_pkgver}.$(date +%Y.%m.%d)" | |
} | |
prepare() { | |
patch --directory="$pkgname" --forward --strip=1 --input=${srcdir}/wayland.patch | |
cd "$pkgname" | |
# cd "Cataclysm-DDA-master" | |
sed -i 's/ncursesw5-config/ncursesw6-config/' Makefile | |
} | |
build() { | |
cd "$pkgname" | |
# cd "Cataclysm-DDA-master" | |
# make PREFIX=/usr RELEASE=1 USE_XDG_DIR=1 LANGUAGE="all" RUNTESTS=0 LINTJSON=0 ASTYLE=0 PCH=0 | |
make PREFIX=/usr RELEASE=1 USE_XDG_DIR=1 LOCALIZE=1 LANGUAGE="all" RUNTESTS=0 LINTJSON=0 ASTYLE=0 PCH=0 TILES=1 SOUND=1 CCACHE=1 | |
# make PREFIX=/usr RELEASE=1 USE_XDG_DIR=1 BACKTRACE=0 ZLEVELS=1 LUA=1 | |
# make PREFIX=/usr RELEASE=1 USE_XDG_DIR=1 BACKTRACE=0 ZLEVELS=1 LUA=1 TILES=1 SOUND=1 LOCALIZE=1 LANGUAGES="pl" CCACHE=1 | |
# LOCALIZE = 0 to save 30MB | |
# DYNAMIC_LINKING = 1 ? | |
# 'make install' needs this | |
touch README.txt | |
} | |
package() { | |
cd "$pkgname" | |
# cd "Cataclysm-DDA-master" | |
# no DESTDIR | |
make PREFIX="$pkgdir/usr" \ | |
RELEASE=1 ZLEVELS=1 USE_XDG_DIR=1 PCH=0 \ | |
install | |
make PREFIX="$pkgdir/usr" \ | |
RELEASE=1 ZLEVELS=1 USE_XDG_DIR=1 PCH=0 TILES=1 SOUND=1 \ | |
install | |
# Icon | |
install -D 'build-data/osx/AppIcon.iconset/icon_128x128.png' "$pkgdir/usr/share/icons/hicolor/128x128/apps/cataclysm-dda.png" | |
# Docs | |
install -d "$pkgdir/usr/share/doc/cataclysm-dda" | |
cp -r doc/* "$pkgdir/usr/share/doc/cataclysm-dda" | |
rm "$pkgdir/usr/share/doc/cataclysm-dda/"*.6 | |
install -Dm644 doc/cataclysm.6 "$pkgdir/usr/share/man/man6/cataclysm.6" | |
install -Dm644 doc/cataclysm-tiles.6 "$pkgdir/usr/share/man/man6/cataclysm-tiles.6" | |
# undo symlink | |
rm "$pkgdir/usr/share/doc/cataclysm-dda/JSON_LOADING_ORDER.md" | |
cp 'data/json/LOADING_ORDER.md' "$pkgdir/usr/share/doc/cataclysm-dda/JSON_LOADING_ORDER.md" | |
# License | |
install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/sdltiles.cpp b/src/sdltiles.cpp | |
index d7a68d65d0..eef7bef83e 100644 | |
--- a/src/sdltiles.cpp | |
+++ b/src/sdltiles.cpp | |
@@ -545,11 +545,11 @@ void refresh_display() | |
// Select default target (the window), copy rendered buffer | |
// there, present it, select the buffer as target again. | |
SetRenderTarget( renderer, nullptr ); | |
+ RenderClear( renderer ); | |
#if defined(__ANDROID__) | |
SDL_Rect dstrect = get_android_render_rect( TERMINAL_WIDTH * fontwidth, | |
TERMINAL_HEIGHT * fontheight ); | |
SetRenderDrawColor( renderer, 0, 0, 0, 255 ); | |
- RenderClear( renderer ); | |
RenderCopy( renderer, display_buffer, NULL, &dstrect ); | |
#else | |
RenderCopy( renderer, display_buffer, nullptr, nullptr ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment