From f3eccf1c777b3997857d70f05015f9d01da2976a Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Sun, 26 Oct 2014 02:26:11 +0200 Subject: [PATCH] New package: sxiv-1.3 --- .../fix-makefile-depend-file-usage.patch | 35 +++++++++++++ srcpkgs/sxiv/patches/sxiv-1.3-makefile.patch | 50 +++++++++++++++++++ srcpkgs/sxiv/template | 13 +++++ 3 files changed, 98 insertions(+) create mode 100644 srcpkgs/sxiv/patches/fix-makefile-depend-file-usage.patch create mode 100644 srcpkgs/sxiv/patches/sxiv-1.3-makefile.patch create mode 100644 srcpkgs/sxiv/template diff --git a/srcpkgs/sxiv/patches/fix-makefile-depend-file-usage.patch b/srcpkgs/sxiv/patches/fix-makefile-depend-file-usage.patch new file mode 100644 index 00000000000..9b1f3e1cb06 --- /dev/null +++ b/srcpkgs/sxiv/patches/fix-makefile-depend-file-usage.patch @@ -0,0 +1,35 @@ +From 33b8148614c47a091da1a711fb53f94827a9cf51 Mon Sep 17 00:00:00 2001 +From: Tim Harder +Date: Sat, 25 Oct 2014 12:30:19 -0400 +Subject: [PATCH] Fix Makefile depend file usage + +Creating the .depend file requires the config.h file to exist and +suppress make's complaints if the .depend file doesn't exist when +initially parsing the makefile. +--- + Makefile | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git Makefile.orig Makefile +index 9282884..3926145 100644 +--- Makefile ++++ Makefile +@@ -14,7 +14,8 @@ OBJ = $(SRC:.c=.o) + + all: sxiv + +-$(OBJ): Makefile config.h ++$(OBJ): Makefile ++$(OBJ) .depend: config.h + + depend: .depend + +@@ -22,7 +23,7 @@ depend: .depend + rm -f ./.depend + $(CC) $(CFLAGS) -MM $^ >./.depend + +-include .depend ++-include .depend + + .c.o: + $(CC) $(CFLAGS) $(CPPFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $< diff --git a/srcpkgs/sxiv/patches/sxiv-1.3-makefile.patch b/srcpkgs/sxiv/patches/sxiv-1.3-makefile.patch new file mode 100644 index 00000000000..ea38711f05c --- /dev/null +++ b/srcpkgs/sxiv/patches/sxiv-1.3-makefile.patch @@ -0,0 +1,50 @@ +--- Makefile.orig 2014-10-24 12:25:18.000000000 +0200 ++++ Makefile 2014-10-26 01:19:33.040945097 +0200 +@@ -3,10 +3,10 @@ + PREFIX = /usr/local + MANPREFIX = $(PREFIX)/share/man + +-CC = gcc +-CFLAGS = -std=c99 -Wall -pedantic -O2 +-CPPFLAGS = -I$(PREFIX)/include -D_XOPEN_SOURCE=500 -DHAVE_LIBEXIF -DHAVE_GIFLIB +-LDFLAGS = -L$(PREFIX)/lib ++CC ?= gcc ++CFLAGS += -std=c99 -Wall -pedantic -O2 ++CPPFLAGS += -I$(PREFIX)/include -D_XOPEN_SOURCE=500 -DHAVE_LIBEXIF -DHAVE_GIFLIB ++LDFLAGS += -L$(PREFIX)/lib + LIBS = -lX11 -lImlib2 -lexif -lgif + + SRC = commands.c image.c main.c options.c thumbs.c util.c window.c +@@ -43,9 +43,9 @@ + mkdir -p $(DESTDIR)$(MANPREFIX)/man1 + sed "s!PREFIX!$(PREFIX)!g; s!VERSION!$(VERSION)!g" sxiv.1 > $(DESTDIR)$(MANPREFIX)/man1/sxiv.1 + chmod 644 $(DESTDIR)$(MANPREFIX)/man1/sxiv.1 +- mkdir -p $(DESTDIR)$(PREFIX)/share/sxiv/exec +- cp exec/* $(DESTDIR)$(PREFIX)/share/sxiv/exec/ +- chmod 755 $(DESTDIR)$(PREFIX)/share/sxiv/exec/* ++ mkdir -p $(DESTDIR)$(PREFIX)/share/examples/sxiv ++ cp exec/* $(DESTDIR)$(PREFIX)/share/examples/sxiv/ ++ chmod 755 $(DESTDIR)$(PREFIX)/share/examples/sxiv/* + + uninstall: + rm -f $(DESTDIR)$(PREFIX)/bin/sxiv +--- sxiv.1.orig 2014-10-24 12:25:18.000000000 +0200 ++++ sxiv.1 2014-10-26 01:18:00.053107605 +0200 +@@ -351,7 +351,7 @@ + and the first argument to this script is the path of the loaded image. + .P + There is also an example script installed together with sxiv as +-.IR PREFIX/share/sxiv/exec/image-info . ++.IR PREFIX/share/examples/sxiv/image-info . + .SH EXTERNAL KEY HANDLER + Additional external keyboard commands can be defined using a handler program + located in +@@ -368,7 +368,7 @@ + keysym as listed in /usr/include/X11/keysymdef.h without the "XK_" prefix. + + There is also an example script installed together with sxiv as +-.IR PREFIX/share/sxiv/exec/key-handler . ++.IR PREFIX/share/examples/sxiv/key-handler . + .SH THUMBNAIL CACHING + sxiv stores all thumbnails under + .IR $XDG_CACHE_HOME/sxiv/ . diff --git a/srcpkgs/sxiv/template b/srcpkgs/sxiv/template new file mode 100644 index 00000000000..b04dab110f3 --- /dev/null +++ b/srcpkgs/sxiv/template @@ -0,0 +1,13 @@ +# Template file for 'sxiv' +pkgname=sxiv +version=1.3 +revision=1 +build_style=gnu-makefile +makedepends="libX11-devel imlib2-devel giflib-devel libexif-devel" +depends="desktop-file-utils hicolor-icon-theme" +short_desc="Simple X Image Viewer" +maintainer="Alessio Sergi " +homepage="https://github.com/muennich/sxiv" +license="GPL-2" +distfiles="https://github.com/muennich/sxiv/archive/v${version}.tar.gz" +checksum=4c9d6dfa0c914ea20a80dff6cb376834ab1c765623496b8266f6a882a6b80708