summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Husmann2015-10-11 07:58:08 +0200
committerStefan Husmann2015-10-11 07:58:08 +0200
commite05fbf719ac21865a4f8f9210bf5fc0ae0053ce2 (patch)
treecc12c5e017b06bfb2bc092373310c613d5aadbca
parent90865477011e0a254bc72883f843cb4656809b9a (diff)
downloadaur-e05fbf719ac21865a4f8f9210bf5fc0ae0053ce2.tar.gz
add some patches, use make install
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD15
-rw-r--r--gif_main.patch44
3 files changed, 57 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f411fde400bf..2b7087dabb5e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = meh-git
pkgdesc = A minimal image viewer using raw XLib.
pkgver = 0.3.26.gce484db
- pkgrel = 1
+ pkgrel = 2
url = http://www.johnhawthorn.com/meh/
arch = i686
arch = x86_64
@@ -13,7 +13,9 @@ pkgbase = meh-git
optdepends = imagemagick
conflicts = meh
source = git+https://github.com/afarah1/meh.git
+ source = gif_main.patch
md5sums = SKIP
+ md5sums = 38367b30851491dc818a2da365f55adc
pkgname = meh-git
diff --git a/PKGBUILD b/PKGBUILD
index 07ea3d1a6361..d5c6d3257764 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=meh-git
pkgver=0.3.26.gce484db
-pkgrel=1
+pkgrel=2
pkgdesc="A minimal image viewer using raw XLib."
arch=('i686' 'x86_64')
url="http://www.johnhawthorn.com/meh/"
@@ -11,15 +11,20 @@ license=('custom:MIT')
depends=('libxext' 'libjpeg' 'giflib' 'libpng')
optdepends=('imagemagick')
conflicts=('meh')
-source=('git+https://github.com/afarah1/meh.git')
-md5sums=('SKIP')
+source=('git+https://github.com/afarah1/meh.git' gif_main.patch)
+md5sums=('SKIP' '38367b30851491dc818a2da365f55adc')
_gitname=meh
pkgver () {
- cd $srcdir/$_gitname
+ cd "$srcdir/$_gitname"
git describe --tags |sed s+-+.+g | cut -c2-
}
+prepare() {
+ cd "$srcdir/$_gitname"
+ patch -Np1 < "$srcdir"/gif_main.patch
+}
+
build() {
cd $srcdir/$_gitname
make PREFIX=/usr
@@ -27,7 +32,7 @@ build() {
package() {
cd $srcdir/$_gitname
- install -D -m 755 meh $pkgdir/usr/bin/meh
+ make PREFIX=/usr DESTDIR=$pkgdir install
install -D -m 644 COPYING $pkgdir/usr/share/licenses/$pkgname/LICENSE
}
diff --git a/gif_main.patch b/gif_main.patch
new file mode 100644
index 000000000000..63b27c4e54ff
--- /dev/null
+++ b/gif_main.patch
@@ -0,0 +1,44 @@
+diff -Naur meh/src/gif.c meh.new/src/gif.c
+--- meh/src/gif.c 2015-09-27 21:35:45.745053456 +0200
++++ meh.new/src/gif.c 2015-10-11 00:35:49.251559414 +0200
+@@ -1,4 +1,3 @@
+-
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -97,14 +96,14 @@
+ void gif_close(struct image *img){
+ struct gif_t *g = (struct gif_t *)img;
+ #if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1)
+- int ret;
++ int ret, ErrorCode;
+ #endif
+
+ #if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1)
+- DGifCloseFile(g->gif,&ret);
++ ret = DGifCloseFile(g->gif, &ErrorCode);
+ if(ret != GIF_OK) {
+ #if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5
+- fprintf(stderr, "GIFLIB: %s\n", GifErrorString(ret));
++ fprintf(stderr, "GIFLIB: %s\n", GifErrorString(ErrorCode));
+ #elif defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && ((GIFLIB_MAJOR == 4 && GIFLIB_MINOR >= 2) || GIFLIB_MAJOR > 4)
+ fprintf(stderr, "GIFLIB: %s\n", GifErrorString());
+ #else
+@@ -123,4 +122,3 @@
+ gif_read,
+ gif_close
+ };
+-
+diff -Naur meh/src/main.c meh.new/src/main.c
+--- meh/src/main.c 2015-09-27 21:35:45.745053456 +0200
++++ meh.new/src/main.c 2015-10-11 00:33:43.315710489 +0200
+@@ -1,4 +1,3 @@
+-
+ #define _GNU_SOURCE
+ #include <unistd.h>
+
+@@ -329,4 +328,3 @@
+ return 0;
+ }
+
+-