summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/feh/APKBUILD40
-rw-r--r--user/feh/stdout-buff.patch113
2 files changed, 153 insertions, 0 deletions
diff --git a/user/feh/APKBUILD b/user/feh/APKBUILD
new file mode 100644
index 000000000..492cc2275
--- /dev/null
+++ b/user/feh/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: Max Rees <maxcrees@me.com>
+# Maintainer: Max Rees <maxcrees@me.com>
+pkgname=feh
+pkgver=2.22
+pkgrel=0
+pkgdesc="feh is a fast, lightweight image viewer which uses imlib2"
+url="http://feh.finalrewind.org/"
+arch="all"
+license="MIT-feh"
+subpackages="$pkgname-doc"
+depends=
+makedepends="libxt-dev libpng-dev giblib-dev imlib2-dev libjpeg-turbo-dev
+ libxinerama-dev curl-dev libexif-dev"
+checkdepends="perl-utils perl-test-command"
+source="https://feh.finalrewind.org/$pkgname-$pkgver.tar.bz2
+ stdout-buff.patch"
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ make PREFIX=/usr curl=1 exif=1 xinerama=1
+}
+
+check() {
+ cd "$builddir"
+ make PREFIX=/usr test
+}
+
+package() {
+ cd "$builddir"
+ make PREFIX=/usr DESTDIR="$pkgdir" \
+ bin_dir="$pkgdir"/usr/bin \
+ man_dir="$pkgdir"/usr/share/man \
+ doc_dir="$pkgdir"/usr/share/doc/$pkgname \
+ example_dir="$pkgdir"/usr/share/doc/$pkgname/examples \
+ install
+}
+
+sha512sums="403b1e760e2b3e177768b47de5bb7bd45c11152f04a21f6788afcaec12357a085f7c9944000f78a8df41a3d60a67985622d36effd543216153ab04e539b5b85f feh-2.22.tar.bz2
+38ead15a58c402181da3e39c09002d9f951b03cfdf5edde19072da313638025dca5fa7dbe466b8f05094d49d44750c467d7fa3832fbaa11ac135c5839e0ecdc1 stdout-buff.patch"
diff --git a/user/feh/stdout-buff.patch b/user/feh/stdout-buff.patch
new file mode 100644
index 000000000..eaa251a3a
--- /dev/null
+++ b/user/feh/stdout-buff.patch
@@ -0,0 +1,113 @@
+On glibc, if output is redirected to a file, output will look like this:
+
+touch test/ok/gif
+touch test/ok/jpg
+touch test/ok/png
+touch test/ok/pnm
+test/ok/gif
+test/ok/jpg
+test/ok/png
+test/ok/pnm
+
+On musl, if stdout is redirected to a file, output looks like this:
+
+test/ok/gif
+touch test/ok/gif
+touch test/ok/jpg
+touch test/ok/png
+touch test/ok/pnm
+test/ok/jpg
+test/ok/png
+test/ok/pnm
+
+On glibc and musl, if stdout is interactive, it looks like this:
+
+test/ok/gif
+touch test/ok/gif
+test/ok/jpg
+touch test/ok/jpg
+test/ok/png
+touch test/ok/png
+test/ok/pnm
+touch test/ok/pnm
+
+Adding two fflush calls makes all behavior look like the last example.
+
+--- feh-2.22/src/list.c 2017-11-04 14:03:43.000000000 +0000
++++ feh-2.22/src/list.c 2018-01-03 02:59:08.840000000 +0000
+@@ -92,6 +92,7 @@
+ if (opt.verbose)
+ feh_display_status('.');
+ puts(file->filename);
++ fflush(stdout);
+ feh_action_run(file, opt.actions[0], NULL);
+ }
+ else {
+@@ -106,6 +107,7 @@
+ if (opt.verbose)
+ feh_display_status('.');
+ puts(file->filename);
++ fflush(stdout);
+ feh_action_run(file, opt.actions[0], NULL);
+ }
+ else {
+--- feh-2.22/test/nx_action/loadable_action 2017-11-04 14:03:43.000000000 +0000
++++ feh-2.22/test/nx_action/loadable_action 2018-01-03 02:46:48.030000000 +0000
+@@ -1,8 +1,8 @@
+-touch test/ok/gif
+-touch test/ok/jpg
+-touch test/ok/png
+-touch test/ok/pnm
+ test/ok/gif
++touch test/ok/gif
+ test/ok/jpg
++touch test/ok/jpg
+ test/ok/png
++touch test/ok/png
+ test/ok/pnm
++touch test/ok/pnm
+--- feh-2.22/test/nx_action/loadable_naction 2017-11-04 14:03:43.000000000 +0000
++++ feh-2.22/test/nx_action/loadable_naction 2018-01-03 02:51:05.340000000 +0000
+@@ -1,8 +1,8 @@
+-touch test/ok/gif
+-touch test/ok/jpg
+-touch test/ok/png
+-touch test/ok/pnm
+ test/ok/gif
++touch test/ok/gif
+ test/ok/jpg
++touch test/ok/jpg
+ test/ok/png
++touch test/ok/png
+ test/ok/pnm
++touch test/ok/pnm
+--- feh-2.22/test/nx_action/unloadable_action 2017-11-04 14:03:43.000000000 +0000
++++ feh-2.22/test/nx_action/unloadable_action 2018-01-03 02:51:36.480000000 +0000
+@@ -1,8 +1,8 @@
+-rm test/fail/gif
+-rm test/fail/jpg
+-rm test/fail/png
+-rm test/fail/pnm
+ test/fail/gif
++rm test/fail/gif
+ test/fail/jpg
++rm test/fail/jpg
+ test/fail/png
++rm test/fail/png
+ test/fail/pnm
++rm test/fail/pnm
+--- feh-2.22/test/nx_action/unloadable_naction 2017-11-04 14:03:43.000000000 +0000
++++ feh-2.22/test/nx_action/unloadable_naction 2018-01-03 02:51:51.850000000 +0000
+@@ -1,8 +1,8 @@
+-rm test/fail/gif
+-rm test/fail/jpg
+-rm test/fail/png
+-rm test/fail/pnm
+ test/fail/gif
++rm test/fail/gif
+ test/fail/jpg
++rm test/fail/jpg
+ test/fail/png
++rm test/fail/png
+ test/fail/pnm
++rm test/fail/pnm