Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions srcpkgs/Cataclysm-DDA/patches/gcc-12.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Index: Cataclysm-DDA-0.E/src/sdltiles.cpp
===================================================================
--- Cataclysm-DDA-0.E.orig/src/sdltiles.cpp
+++ Cataclysm-DDA-0.E/src/sdltiles.cpp
@@ -3246,7 +3246,7 @@ static void font_folder_list( std::ostre
}

// Add font family
- char *fami = TTF_FontFaceFamilyName( fnt.get() );
+ const char *fami = TTF_FontFaceFamilyName( fnt.get() );
if( fami != nullptr ) {
fout << fami;
} else {
@@ -3254,7 +3254,7 @@ static void font_folder_list( std::ostre
}

// Add font style
- char *style = TTF_FontFaceStyleName( fnt.get() );
+ const char *style = TTF_FontFaceStyleName( fnt.get() );
bool isbitmap = ends_with( f, ".fon" );
if( style != nullptr && !isbitmap && strcasecmp( style, "Regular" ) != 0 ) {
fout << " " << style;
@@ -3365,12 +3365,12 @@ static int test_face_size( const std::st
{
const TTF_Font_Ptr fnt( TTF_OpenFontIndex( f.c_str(), size, faceIndex ) );
if( fnt ) {
- char *style = TTF_FontFaceStyleName( fnt.get() );
+ const char *style = TTF_FontFaceStyleName( fnt.get() );
if( style != nullptr ) {
int faces = TTF_FontFaces( fnt.get() );
for( int i = faces - 1; i >= 0; i-- ) {
const TTF_Font_Ptr tf( TTF_OpenFontIndex( f.c_str(), size, i ) );
- char *ts = nullptr;
+ const char *ts = nullptr;
if( tf ) {
if( nullptr != ( ts = TTF_FontFaceStyleName( tf.get() ) ) ) {
if( 0 == strcasecmp( ts, style ) && TTF_FontHeight( tf.get() ) <= size ) {
13 changes: 13 additions & 0 deletions srcpkgs/Cataclysm-DDA/patches/no-werror.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Index: Cataclysm-DDA-0.E/CMakeLists.txt
===================================================================
--- Cataclysm-DDA-0.E.orig/CMakeLists.txt
+++ Cataclysm-DDA-0.E/CMakeLists.txt
@@ -222,7 +222,7 @@ IF(MSVC)
endif()
ELSE()
SET(CATA_WARNINGS
- "-Werror -Wall -Wextra \
+ "-Wall -Wextra \
-Wformat-signedness \
-Wlogical-op \
-Wmissing-declarations \
41 changes: 28 additions & 13 deletions srcpkgs/Cataclysm-DDA/template
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ short_desc="Turn-based survival game set in a post-apocalyptic world"
maintainer="John <me@johnnynator.dev>"
license="CC-BY-SA-3.0, CC-BY-3.0"
homepage="https://cataclysmdda.org/"
distfiles="https://github.com/CleverRaven/Cataclysm-DDA/archive/${version}.tar.gz"
checksum=b0af9a9292929e17332edcea770bca9a91f1d08ea47726d78a47e09281a42fa3
distfiles="https://github.com/CleverRaven/Cataclysm-DDA/archive/${version}.tar.gz
https://github.com/catchorg/Catch2/releases/download/v2.13.10/catch.hpp"
checksum="b0af9a9292929e17332edcea770bca9a91f1d08ea47726d78a47e09281a42fa3
3725c0f0a75f376a5005dde31ead0feb8f7da7507644c201b814443de8355170"
skip_extraction="catch.hpp"
make_check=no # needs tap++.h

build_options="tiles backtrace"
build_options_default="tiles"
Expand All @@ -29,26 +33,37 @@ esac
subpackages=""
if [ "$build_option_tiles" ]; then
subpackages+=" Cataclysm-DDA-tiles"
post_configure() {
fi
subpackages+=" Cataclysm-DDA-data"

post_extract() {
_srcdir="${XBPS_SRCDISTDIR}/${pkgname}-${version}"
cp ${_srcdir}/catch.hpp tests/catch/catch.hpp
}

post_configure() {
if [ "$build_option_tiles" ]; then
local cmake_builddir=build-tiles
local fprefix=$wrksrc/build-tiles/build
CFLAGS="${CFLAGS} -ffile-prefix-map=$fprefix=."
CXXFLAGS="${CXXFLAGS} -ffile-prefix-map=$fprefix=."
configure_args+=" -DTILES=ON -DSOUND=ON"
do_configure
}
fi
}

post_build() {
post_build() {
if [ "$build_option_tiles" ]; then
local cmake_builddir=build-tiles
do_build
}
fi
}

post_install() {
post_install() {
if [ "$build_option_tiles" ]; then
local cmake_builddir=build-tiles
do_install
}
fi
subpackages+=" Cataclysm-DDA-data"

do_check() {
: #needs tap++.h
fi
}

Cataclysm-DDA-tiles_package() {
Expand Down