summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorZiusudra2022-07-29 23:11:29 -0600
committerZiusudra2022-07-29 23:11:29 -0600
commit58aa9772144731523678bf204cf8cab2bc6b266b (patch)
tree853dcb5094f6692e75550e5f51ede11f4309c494
parentfef6cb0a7758be38961bb3dfa3848c6b1694a282 (diff)
downloadaur-58aa9772144731523678bf204cf8cab2bc6b266b.tar.gz
dfhack-0.47.05-r6 +patches
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD19
-rw-r--r--Wno-restrict.patch12
-rw-r--r--order-plugin.patch29
4 files changed, 62 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a5dee84055cc..b022aebaf764 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = dfhack
pkgdesc = memory hacking library for Dwarf Fortress and a set of tools that use it
pkgver = 0.47.05
- pkgrel = 7
+ pkgrel = 8
url = https://dfhack.readthedocs.io/en/stable/
arch = x86_64
arch = i686
@@ -24,11 +24,15 @@ pkgbase = dfhack
depends = libxcrypt-compat
conflicts = dfhack-bin
conflicts = dfhack-git
- source = dfhack::git+https://github.com/DFHack/dfhack#tag=0.47.05-r5
+ source = dfhack::git+https://github.com/DFHack/dfhack#tag=0.47.05-r6
source = dfhack.sh
source = dfhack-run.sh
+ source = Wno-restrict.patch
+ source = order-plugin.patch
md5sums = SKIP
md5sums = 81f5909c1a32391679f968e40f24d5ca
md5sums = 3853c6f890d3541f710f2c4833a9e696
+ md5sums = 086fc32900f4c6589a06ac1c7acc6e98
+ md5sums = 312e8125e2eff898e5f626c505b863bc
pkgname = dfhack
diff --git a/PKGBUILD b/PKGBUILD
index 76435125daf7..3e2a6f1d6c6b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,23 +5,28 @@
pkgname=dfhack
pkgver=0.47.05
-_pkgver=$pkgver-r5
-pkgrel=7
+_pkgver=$pkgver-r6
+pkgrel=8
pkgdesc="memory hacking library for Dwarf Fortress and a set of tools that use it"
arch=('x86_64' 'i686')
url="https://dfhack.readthedocs.io/en/stable/"
license=('custom')
+# ruby will be removed upstream so libxcrypt-compat dependency may soon go too
depends=("dwarffortress=$pkgver" lua protobuf libpng12 libxrandr libjpeg6 freetype2 libglvnd libxcursor libxinerama libxcrypt-compat)
makedepends=('cmake' 'git' 'python-sphinx' 'perl-xml-libxml' 'perl-xml-libxslt')
conflicts=('dfhack-bin' 'dfhack-git')
source=("$pkgname::git+https://github.com/DFHack/dfhack#tag=$_pkgver"
dfhack.sh
- dfhack-run.sh)
+ dfhack-run.sh
+ Wno-restrict.patch
+ order-plugin.patch)
md5sums=('SKIP'
'81f5909c1a32391679f968e40f24d5ca'
- '3853c6f890d3541f710f2c4833a9e696')
+ '3853c6f890d3541f710f2c4833a9e696'
+ '086fc32900f4c6589a06ac1c7acc6e98'
+ '312e8125e2eff898e5f626c505b863bc')
prepare() {
# shellcheck disable=2154
@@ -30,6 +35,12 @@ prepare() {
git remote set-url origin https://github.com/DFHack/dfhack
git submodule sync
git submodule update --init
+
+ cd "$srcdir/$pkgname"
+ # gcc issue - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329
+ patch --strip=1 --input="${srcdir}/Wno-restrict.patch"
+ # this issue fixed upstream, remove this patch next release
+ patch --strip=1 --input="${srcdir}/order-plugin.patch"
}
build() {
diff --git a/Wno-restrict.patch b/Wno-restrict.patch
new file mode 100644
index 000000000000..8b43305f7d3e
--- /dev/null
+++ b/Wno-restrict.patch
@@ -0,0 +1,12 @@
+diff --unified --recursive --text dfhack/CMakeLists.txt dfhack.new/CMakeLists.txt
+--- dfhack/CMakeLists.txt 2022-07-29 03:02:00.924080839 -0600
++++ dfhack.new/CMakeLists.txt 2022-07-29 03:43:33.584455373 -0600
+@@ -244,7 +244,7 @@
+ # enable C++11 features
+ add_definitions(-DLINUX_BUILD)
+ add_definitions(-D_GLIBCXX_USE_C99)
+- set(GCC_COMMON_FLAGS "-fvisibility=hidden -mtune=generic -Wall -Werror")
++ set(GCC_COMMON_FLAGS "-fvisibility=hidden -mtune=generic -Wall -Werror -Wno-restrict")
+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COMMON_FLAGS}")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GCC_COMMON_FLAGS}")
diff --git a/order-plugin.patch b/order-plugin.patch
new file mode 100644
index 000000000000..7902c0f42f9c
--- /dev/null
+++ b/order-plugin.patch
@@ -0,0 +1,29 @@
+diff --unified --recursive --text dfhack/plugins/orders.cpp dfhack.new/plugins/orders.cpp
+--- dfhack/plugins/orders.cpp 2022-07-29 03:02:00.947413585 -0600
++++ dfhack.new/plugins/orders.cpp 2022-07-29 20:20:27.962705687 -0600
+@@ -540,10 +540,10 @@
+ }
+ else
+ {
+- delete order;
+-
+ out << COLOR_LIGHTRED << "Invalid item subtype for imported manager order: " << enum_item_key(order->item_type) << ":" << it["item_subtype"].asString() << std::endl;
+
++ delete order;
++
+ return CR_FAILURE;
+ }
+ }
+@@ -716,10 +716,10 @@
+ }
+ else
+ {
+- delete condition;
+-
+ out << COLOR_YELLOW << "Invalid item condition item subtype for imported manager order: " << enum_item_key(condition->item_type) << ":" << it2["item_subtype"].asString() << std::endl;
+
++ delete condition;
++
+ continue;
+ }
+ }