aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptrcnull <git@ptrcnull.me>2021-10-25 19:01:03 +0200
committerLeo <thinkabit.ukim@gmail.com>2021-10-26 09:00:43 +0000
commit3e746c1bf3458abf2434046b69eca873e2cf2239 (patch)
tree71f88d5c8eb3e4b516a09e7efb04551e2e5ff57f
parent9de74a8e981ed821b31bf53b093b08a899597048 (diff)
testing/xsane: new aport
-rw-r--r--testing/xsane/0001-libpng15.patch30
-rw-r--r--testing/xsane/APKBUILD36
2 files changed, 66 insertions, 0 deletions
diff --git a/testing/xsane/0001-libpng15.patch b/testing/xsane/0001-libpng15.patch
new file mode 100644
index 00000000000..e9f3535d29b
--- /dev/null
+++ b/testing/xsane/0001-libpng15.patch
@@ -0,0 +1,30 @@
+Author: Nobuhiro Iwamatsu <iwamatsu@debian.org>
+
+ Build with libpng15.
+
+--- a/src/xsane-save.c
++++ b/src/xsane-save.c
+@@ -4910,7 +4910,11 @@ int xsane_save_png(FILE *outfile, int compression, FILE *imagefile, Image_info *
+ return -1; /* error */
+ }
+
++#if PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 4
++ if ( setjmp( png_jmpbuf ( png_ptr ) ) )
++#else
+ if (setjmp(png_ptr->jmpbuf))
++#endif
+ {
+ snprintf(buf, sizeof(buf), "%s %s", ERR_DURING_SAVE, ERR_LIBPNG);
+ xsane_back_gtk_error(buf, TRUE);
+@@ -5100,7 +5104,11 @@ int xsane_save_png_16(FILE *outfile, int compression, FILE *imagefile, Image_inf
+ return -1; /* error */
+ }
+
++#if PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 4
++ if ( setjmp( png_jmpbuf ( png_ptr ) ) )
++#else
+ if (setjmp(png_ptr->jmpbuf))
++#endif
+ {
+ snprintf(buf, sizeof(buf), "%s %s", ERR_DURING_SAVE, ERR_LIBPNG);
+ xsane_back_gtk_error(buf, TRUE);
diff --git a/testing/xsane/APKBUILD b/testing/xsane/APKBUILD
new file mode 100644
index 00000000000..b93929b4988
--- /dev/null
+++ b/testing/xsane/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
+# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
+pkgname=xsane
+pkgver=0.999
+pkgrel=0
+pkgdesc="Graphical SANE frontend"
+url="http://www.xsane.org/"
+arch="all"
+license="GPL-2.0-or-later"
+makedepends="sane-dev libpng-dev gtk+2.0-dev"
+subpackages="$pkgname-doc $pkgname-lang"
+source="
+ https://gitlab.com/sane-project/frontend/xsane/-/archive/$pkgver/xsane-$pkgver.tar.gz
+ 0001-libpng15.patch
+"
+options="!check" # no test suite provided
+
+build() {
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var
+ make
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="
+7f993dc941ea5347e94ed84021de5fce32af924a10e749f517aae45b5e9623127967ad4b8bbd12d064601b9d6ea4142c5e3fe2410405b785bfb8508badeee6fe xsane-0.999.tar.gz
+e1a92665fddd744b18841b510155cd3369976f8738d2e644ce91b202b5e51d4d62e5d06fabebbad01d61b3e725f339885678d5126b3af01a834d50ecd8303e98 0001-libpng15.patch
+"