diff options
author | Laël Guillemenot | 2018-01-31 22:17:49 +0100 |
---|---|---|
committer | Laël Guillemenot | 2018-01-31 22:17:49 +0100 |
commit | e0e8e0cadf682d5ded3e3e512f89498f3d70d481 (patch) | |
tree | 268862ce15c4960de9dc478e761f4e37b8ea529a | |
download | aur-e0e8e0cadf682d5ded3e3e512f89498f3d70d481.tar.gz |
Initialisation du projet
-rw-r--r-- | .SRCINFO | 33 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 63 | ||||
-rw-r--r-- | curl-ptr.patch | 35 | ||||
-rw-r--r-- | gcc-fix.patch | 36 | ||||
-rw-r--r-- | include-zlib.patch | 11 | ||||
-rw-r--r-- | return-null.patch | 11 |
7 files changed, 193 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e8d01d0d5e80 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,33 @@ +pkgbase = warmux-git + pkgdesc = Clone of turn-based artillery games like Scorched Earth or Worms (formerly known as Wormux) + pkgver = e0dc503 + pkgrel = 1 + url = http://gna.org/projects/warmux/ + arch = i686 + arch = x86_64 + license = GPL + depends = libxml++ + depends = sdl_image + depends = sdl_gfx + depends = sdl_ttf + depends = sdl_mixer + depends = sdl_net + depends = curl + depends = gcc-libs + depends = libxml2 + conflicts = warmux-data + replaces = wormux + replaces = warmux-data + source = warmux-git::git://github.com/a-team/wormux.git + source = include-zlib.patch + source = gcc-fix.patch + source = return-null.patch + source = curl-ptr.patch + sha256sums = SKIP + sha256sums = 665c4a64e54478491284f6cb6251bd58f96ba81671a7c439cffe175b86462852 + sha256sums = 3f271dc6249ababe919733268c34464fc3050fc7c2b0329e9017f1b32c7760f5 + sha256sums = 0e0692fb2acc5697c3083deeff41dcdb055f3330cbac146ebab4aa0f021ad03c + sha256sums = de232b7f2264f9d576ba77f43f79dc698f6ba987d059468f5b2bb5f40cf644d3 + +pkgname = warmux-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..05c6d4d4c97b --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +* +!.gitignore +!.SRCINFO +!PKGBUILD diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..2b675e27403a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: Laël Guillemenot <zeppelinlg@gmail.com> +# Contributor: Michael DeGuzis <mdeguzis@gmail.com> +# Contributor: carstene1ns <url/mail: arch carsten-teibes de> +# Contributor: Eric Belanger <eric@archlinux.org> +# Contributor: pukyxd +# Contributor: Daenyth <Daenyth+Arch AT gmail DOT com> +# Contributor: Laurent Carlier <lordheavym@gmail.com> +# Contributor: Martchus <martchus@gmx.net> + +pkgname=warmux-git +pkgver=e0dc503 +pkgrel=1 +pkgdesc="Clone of turn-based artillery games like Scorched Earth or Worms (formerly known as Wormux)" +arch=('i686' 'x86_64') +url="http://gna.org/projects/warmux/" +license=('GPL') +depends=('libxml++' 'sdl_image' 'sdl_gfx' 'sdl_ttf' 'sdl_mixer' 'sdl_net' 'curl' 'gcc-libs' 'libxml2') +replaces=('wormux' 'warmux-data') +conflicts=('warmux-data') +source=("$pkgname::git://github.com/a-team/wormux.git" + 'include-zlib.patch' + 'gcc-fix.patch' + 'return-null.patch' + 'curl-ptr.patch') +sha256sums=('SKIP' + '665c4a64e54478491284f6cb6251bd58f96ba81671a7c439cffe175b86462852' + '3f271dc6249ababe919733268c34464fc3050fc7c2b0329e9017f1b32c7760f5' + '0e0692fb2acc5697c3083deeff41dcdb055f3330cbac146ebab4aa0f021ad03c' + 'de232b7f2264f9d576ba77f43f79dc698f6ba987d059468f5b2bb5f40cf644d3') + +pkgver() { + cd "${srcdir}/${pkgname}" + git describe --always | sed 's|-|.|g' +} + +prepare() { + + cd "$pkgname" + + # libpng fix + patch -Np1 < ../include-zlib.patch + + # compilation fixes + #patch -Np1 < ../gcc-fix.patch + patch -Np0 < ../return-null.patch + patch -Np1 < ../curl-ptr.patch + +} + +build() { + + cd "$pkgname" + ./configure --prefix=/usr + make + +} + +package() { + + cd "$pkgname" + make DESTDIR="$pkgdir" install + +} 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) diff --git a/gcc-fix.patch b/gcc-fix.patch new file mode 100644 index 000000000000..1ac476b92a32 --- /dev/null +++ b/gcc-fix.patch @@ -0,0 +1,36 @@ +## i-love-you-lordheavy.patch [diff] +diff -ru warmux-11.04/lib/warmux/action/action.cpp warmux-11.04-new/lib/warmux/action/action.cpp +--- warmux-11.04/lib/warmux/action/action.cpp 2011-04-28 21:03:14.000000000 +0200 ++++ warmux-11.04-new/lib/warmux/action/action.cpp 2012-01-29 09:51:16.680251815 +0100 +@@ -81,7 +81,7 @@ + } + + // Build an action from a network packet +-Action::Action(const char *buffer, DistantComputer* _creator) ++Action::Action(char *buffer, DistantComputer* _creator) + { + m_creator = _creator; + +diff -ru warmux-11.04/lib/warmux/include/WARMUX_action.h warmux-11.04-new/lib/warmux/include/WARMUX_action.h +--- warmux-11.04/lib/warmux/include/WARMUX_action.h 2011-04-28 21:03:13.000000000 +0200 ++++ warmux-11.04-new/lib/warmux/include/WARMUX_action.h 2012-01-29 09:52:14.246921833 +0100 +@@ -168,7 +168,7 @@ + Action(Action_t type, Double value1, Double value2); + + // Build an action from a network packet +- Action(const char* buffer, DistantComputer* _creator); ++ Action(char* buffer, DistantComputer* _creator); + + ~Action(); + +Description: Fix FTBFS with gcc 4.7. +Author: Felix Geyer <debfx-pkg@fobos.de> + +--- warmux-11.04.1+repack.orig/tools/list_games/main.cpp ++++ warmux-11.04.1+repack/tools/list_games/main.cpp +@@ -1,4 +1,5 @@ + #include <stdio.h> ++#include <unistd.h> + #include <WARMUX_types.h> + #include <WARMUX_network.h> + #include <WARMUX_index_server.h> diff --git a/include-zlib.patch b/include-zlib.patch new file mode 100644 index 000000000000..c7e77aba11c8 --- /dev/null +++ b/include-zlib.patch @@ -0,0 +1,11 @@ +diff -uNr warmux-11.04.orig/src/graphic/surface.cpp warmux-11.04/src/graphic/surface.cpp +--- warmux-11.04.orig/src/graphic/surface.cpp 2011-09-19 09:26:52.392650465 +0200 ++++ warmux-11.04/src/graphic/surface.cpp 2011-09-19 09:26:19.417648189 +0200 +@@ -25,6 +25,7 @@ + #include <SDL_image.h> + #include <SDL_rotozoom.h> + #include <png.h> ++#include <zlib.h> + + #include "graphic/surface.h" + #include "tool/math_tools.h" diff --git a/return-null.patch b/return-null.patch new file mode 100644 index 000000000000..851dfcbd1685 --- /dev/null +++ b/return-null.patch @@ -0,0 +1,11 @@ +--- src/interface/weapon_menu.cpp.orig 2016-05-09 15:22:36.895266463 +0200 ++++ src/interface/weapon_menu.cpp 2016-05-09 15:21:38.518476191 +0200 +@@ -391,7 +391,7 @@ + Weapon * WeaponsMenu::UpdateCurrentOverflyItem(const Polygon * poly) + { + if (!show) +- return false; ++ return NULL; + const std::vector<PolygonItem *>& items = poly->GetItem(); + WeaponMenuItem * tmp; + Interface::GetInstance()->SetCurrentOverflyWeapon(NULL); |