#?patch
#
# These patches, derived from the OpenBSD 6.6 ports tree (encumbered by
# their copyright!), enable installation of feh(1) 3.2.1 outside the
# ports tree, and without gtk.
#
# Me tried to make this a patch to ports, but some "clever" perl code in
# there decided that, since the feh tree contains an icon file, it must
# be dependent on gtk. grr.
#
# Built this way, feh(1) still requires the following prerequisites to
# run:
#
# graphics/imlib2
# graphics/libexif
# graphics/png
# net/curl
#
# To build: it also needs, at least:
#
# devel/gmake
#
# And finally, to test:
#
# devel/p5-Test-Command
#
# Take care,
#
# --zeurkous, Sat Oct 24 14:18:57 UTC 2020.
#
--- ..v/3.2.1/config.mk Mon Jul 22 18:26:34 2019
+++ config.mk Sat Oct 24 14:01:45 2020
@@ -4,9 +4,9 @@
app ?= 0
curl ?= 1
debug ?= 0
-exif ?= 0
+exif ?= 1
help ?= 0
-verscmp ?= 1
+verscmp ?= 0
xinerama ?= 1
# Prefix for all installed files
@@ -35,11 +35,7 @@
# default CFLAGS
CFLAGS ?= -g -O2
-CFLAGS += -Wall -Wextra -pedantic
-# Settings for glibc >= 2.19 - may need to be adjusted for other systems
-CFLAGS += -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700
-
ifeq (${curl},1)
CFLAGS += -DHAVE_LIBCURL
LDLIBS += -lcurl
@@ -102,3 +98,5 @@
-DPACKAGE=\"${PACKAGE}\" -DVERSION=\"${VERSION}\"
LDLIBS += -lm -lpng -lX11 -lImlib2
+
+LDFLAGS +=-L/usr/X11R6/lib/ -L/usr/local/lib/
--- src/..v/3.2.1/deps.mk Mon Jul 22 18:26:34 2019
+++ src/deps.mk Sat Oct 24 14:02:00 2020
@@ -6,7 +6,7 @@
filelist.o: filelist.c feh.h gib_hash.h gib_list.h gib_imlib.h \
gib_style.h structs.h menu.h utils.h getopt.h debug.h filelist.h \
signals.h options.h
-getopt.o: getopt.c
+getopt.o: getopt.c getopt.h
getopt1.o: getopt1.c getopt.h
gib_hash.o: gib_hash.c gib_hash.h gib_list.h utils.h debug.h
gib_imlib.o: gib_imlib.c gib_imlib.h gib_style.h gib_list.h utils.h \
--- src/..v/3.2.1/getopt.c Mon Jul 22 18:26:34 2019
+++ src/getopt.c Sat Oct 24 13:57:06 2020
@@ -36,6 +36,7 @@
#endif
#include <stdio.h>
+#include <string.h>
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C