summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Zamarin2016-08-05 12:09:09 +0300
committerArthur Zamarin2016-08-05 12:09:09 +0300
commit5bb8c2d501233f354578ad390660cdac608d80f9 (patch)
treec804441350a56be25e39a74164c3447897ef459d
parentbb434ffa6c95496624d083fd32df87b03e78e8a4 (diff)
downloadaur-5bb8c2d501233f354578ad390660cdac608d80f9.tar.gz
fix compile
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD7
-rw-r--r--curl-ptr.patch35
3 files changed, 43 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0874b8841391..c2a0d5e22186 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Thu May 12 06:06:13 UTC 2016
+# Fri Aug 5 09:09:00 UTC 2016
pkgbase = warmux
pkgdesc = Clone of turn-based artillery games like Scorched Earth or Worms (formerly known as Wormux)
pkgver = 11.04.1
@@ -24,10 +24,12 @@ pkgbase = warmux
source = include-zlib.patch
source = gcc-fix.patch
source = return-null.patch
+ source = curl-ptr.patch
sha256sums = 789c4f353e4c5ce0a2aba2e82861d3fd0e5218bc76d8da1a332f2c7b1b27e4ee
sha256sums = 665c4a64e54478491284f6cb6251bd58f96ba81671a7c439cffe175b86462852
sha256sums = 3f271dc6249ababe919733268c34464fc3050fc7c2b0329e9017f1b32c7760f5
sha256sums = 0e0692fb2acc5697c3083deeff41dcdb055f3330cbac146ebab4aa0f021ad03c
+ sha256sums = de232b7f2264f9d576ba77f43f79dc698f6ba987d059468f5b2bb5f40cf644d3
pkgname = warmux
diff --git a/PKGBUILD b/PKGBUILD
index 51ec12acefce..8442b29c8d40 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,11 +19,13 @@ conflicts=('warmux-data')
source=("http://download.gna.org/$pkgname/$pkgname-$pkgver.tar.bz2"
'include-zlib.patch'
'gcc-fix.patch'
- 'return-null.patch')
+ 'return-null.patch'
+ 'curl-ptr.patch')
sha256sums=('789c4f353e4c5ce0a2aba2e82861d3fd0e5218bc76d8da1a332f2c7b1b27e4ee'
'665c4a64e54478491284f6cb6251bd58f96ba81671a7c439cffe175b86462852'
'3f271dc6249ababe919733268c34464fc3050fc7c2b0329e9017f1b32c7760f5'
- '0e0692fb2acc5697c3083deeff41dcdb055f3330cbac146ebab4aa0f021ad03c')
+ '0e0692fb2acc5697c3083deeff41dcdb055f3330cbac146ebab4aa0f021ad03c'
+ 'de232b7f2264f9d576ba77f43f79dc698f6ba987d059468f5b2bb5f40cf644d3')
prepare() {
cd "$pkgname-${pkgver/.1/}"
@@ -33,6 +35,7 @@ prepare() {
# compilation fixes
patch -Np1 < ../gcc-fix.patch
patch -Np0 < ../return-null.patch
+ patch -Np1 < ../curl-ptr.patch
}
build() {
diff --git a/curl-ptr.patch b/curl-ptr.patch
new file mode 100644
index 000000000000..26ccfad27a93
--- /dev/null
+++ b/curl-ptr.patch
@@ -0,0 +1,35 @@
+diff -ru a/lib/warmux/net/download.cpp b/lib/warmux/net/download.cpp
+--- a/lib/warmux/net/download.cpp 2016-08-05 11:57:19.524227773 +0300
++++ b/lib/warmux/net/download.cpp 2016-08-05 12:01:13.534472330 +0300
+@@ -47,24 +47,24 @@
+ #endif
+
+ curl = curl_easy_init();
+- curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, download_callback);
++ curl_easy_setopt((CURL*)curl, CURLOPT_WRITEFUNCTION, download_callback);
+ curl_error_buf = new char[CURL_ERROR_SIZE];
+- curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_error_buf);
+- curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
++ curl_easy_setopt((CURL*)curl, CURLOPT_ERRORBUFFER, curl_error_buf);
++ curl_easy_setopt((CURL*)curl, CURLOPT_FOLLOWLOCATION, 1);
+ }
+
+ Downloader::~Downloader()
+ {
+- curl_easy_cleanup(curl);
++ curl_easy_cleanup((CURL*)curl);
+ curl_global_cleanup();
+ delete[] curl_error_buf;
+ }
+
+ bool Downloader::Get(const char* url, FILE* file)
+ {
+- curl_easy_setopt(curl, CURLOPT_FILE, file);
+- curl_easy_setopt(curl, CURLOPT_URL, url);
+- CURLcode r = curl_easy_perform(curl);
++ curl_easy_setopt((CURL*)curl, CURLOPT_FILE, file);
++ curl_easy_setopt((CURL*)curl, CURLOPT_URL, url);
++ CURLcode r = curl_easy_perform((CURL*)curl);
+ fflush(file);
+
+ if (r == CURLE_OK)