summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Jonglez2017-08-13 17:33:12 +0200
committerBaptiste Jonglez2017-08-13 17:33:12 +0200
commitd4ea71e6497280c741105b92df968893db2f8f39 (patch)
treec55bc292df7c362de60f9eb540328e82c3825c2b
parent65ce91afa3736298a3ca0cc516580807f34eb9f5 (diff)
downloadaur-d4ea71e6497280c741105b92df968893db2f8f39.tar.gz
opendune: use a custom CFLAGS instead of patching to set proper data dir
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD16
-rw-r--r--dune-data-dir.patch13
3 files changed, 8 insertions, 26 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4cc6193b7cb..bd9ee20a52e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Sun Aug 13 15:20:50 UTC 2017
+# Sun Aug 13 15:33:12 UTC 2017
pkgbase = opendune
pkgdesc = Open source re-creation of the popular game Dune II
pkgver = 0.8
@@ -12,11 +12,8 @@ pkgbase = opendune
depends = sdl_image
depends = alsa-lib
depends = hicolor-icon-theme
- depends = dune2-data
source = opendune-0.8.tar.gz::https://github.com/OpenDUNE/OpenDUNE/archive/0.8.tar.gz
- source = dune-data-dir.patch
sha256sums = fada4127715e4913553f4dbe8b5ac284ee6080377da62e65ae03f1e1d551dfbd
- sha256sums = 2f56ac5554790c12e152dca4ba8ad475c143b2deb1f54c47aaa1cce0360188ae
pkgname = opendune
diff --git a/PKGBUILD b/PKGBUILD
index 9e39185e027..a2549466e54 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,27 +7,25 @@ arch=('i686' 'x86_64')
url="http://opendune.org"
license=('GPL2')
depends=('sdl' 'sdl_image' 'alsa-lib' 'hicolor-icon-theme' 'dune2-data')
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/OpenDUNE/OpenDUNE/archive/$pkgver.tar.gz"
- "dune-data-dir.patch")
-sha256sums=('fada4127715e4913553f4dbe8b5ac284ee6080377da62e65ae03f1e1d551dfbd'
- '2f56ac5554790c12e152dca4ba8ad475c143b2deb1f54c47aaa1cce0360188ae')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/OpenDUNE/OpenDUNE/archive/$pkgver.tar.gz")
+sha256sums=('fada4127715e4913553f4dbe8b5ac284ee6080377da62e65ae03f1e1d551dfbd')
+
+_dune2_data_dir=share/games/dune2
prepare() {
cd "$srcdir/$_pkgname-$pkgver"
# Version information
echo "${pkgver} 0 ${pkgver}" > .ottdrev
- # Tell opendune where to find data files
- patch -p1 < "$srcdir/dune-data-dir.patch"
}
build() {
cd "$srcdir/$_pkgname-$pkgver"
sed -i "s/flags\=\"\$flags\ \-ansi\ \-pedantic\"/:/" config.lib
- ./configure \
+ CFLAGS="-DDUNE_DATA_DIR='\\\"/usr/${_dune2_data_dir}\\\"' $CFLAGS" ./configure \
--disable-assert \
--prefix-dir=/usr \
--binary-dir=bin \
- --data-dir="share/games/dune2" \
+ --data-dir="${_dune2_data_dir}" \
--install-dir="$pkgdir/"
make
}
@@ -35,7 +33,7 @@ build() {
package() {
cd "$srcdir/$_pkgname-$pkgver"
make install
- rmdir "${pkgdir}/usr/share/games/dune2"
+ rmdir "${pkgdir}/usr/${_dune2_data_dir}"
rmdir "${pkgdir}/usr/share/games"
}
diff --git a/dune-data-dir.patch b/dune-data-dir.patch
deleted file mode 100644
index 44929f023e3..00000000000
--- a/dune-data-dir.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/file.c b/src/file.c
-index fbc882ca..ce6b49a6 100644
---- a/src/file.c
-+++ b/src/file.c
-@@ -24,6 +24,8 @@
- /* Set DUNE_DATA_DIR at compile time. e.g. */
- /* #define DUNE_DATA_DIR "/usr/local/share/opendune" */
-
-+#define DUNE_DATA_DIR "/usr/share/games/dune2"
-+
- #ifndef DUNE_DATA_DIR
- #ifdef TOS
- #define DUNE_DATA_DIR "DATA"