summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2019-06-09 02:28:53 +0000
committerDaniel Bermond2019-06-09 02:50:55 +0000
commite6ca6b2219e170e66e4e717bca43a700f2e48d85 (patch)
tree3f95387a501960f7c2e4e6fe1e19013165fda4ed
parenta849737315e41fdf0816efad70fbe3ad54d16454 (diff)
downloadaur-e6ca6b2219e170e66e4e717bca43a700f2e48d85.tar.gz
Remove support for i686 arch. Use patches in prepare(). Add tests.
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD36
-rw-r--r--flif-remove-apt-get-references-from-tools.patch22
3 files changed, 54 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5df1ef49473..c601a7c8ebe 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,12 +1,11 @@
pkgbase = flif
pkgdesc = Free Lossless Image Format
pkgver = 0.3
- pkgrel = 4
+ pkgrel = 5
url = https://github.com/FLIF-hub/FLIF/
- arch = i686
arch = x86_64
license = LGPL3
- license = APACHE
+ license = Apache
depends = gcc-libs
depends = libpng
depends = sdl2
@@ -14,8 +13,10 @@ pkgbase = flif
optdepends = apng-utils: for apng2flif tool
source = flif-0.3.tar.gz::https://github.com/FLIF-hub/FLIF/archive/v0.3.tar.gz
source = flif-use-build-flags.patch
+ source = flif-remove-apt-get-references-from-tools.patch
sha256sums = aa02a62974d78f8109cff21ecb6d805f1d23b05b2db7189cfdf1f0d97ff89498
sha256sums = d8cdb93f4f1e63487d65d23c1c96bf79acff1277532cbcfd88ca05932655d871
+ sha256sums = c516d92d4724e319af79bb1ac5d3dde81dac359fd4a02af1ee71239a49d58710
pkgname = flif
diff --git a/PKGBUILD b/PKGBUILD
index b13cd37b71e..ab03be7d553 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,11 +4,11 @@
pkgname=flif
_srcname=FLIF
pkgver=0.3
-pkgrel=4
+pkgrel=5
pkgdesc='Free Lossless Image Format'
-arch=('i686' 'x86_64')
+arch=('x86_64')
url='https://github.com/FLIF-hub/FLIF/'
-license=('LGPL3' 'APACHE')
+license=('LGPL3' 'Apache')
depends=('gcc-libs' 'libpng' 'sdl2')
optdepends=(
# official repositories:
@@ -17,9 +17,11 @@ optdepends=(
'apng-utils: for apng2flif tool'
)
source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/FLIF-hub/FLIF/archive/v${pkgver}.tar.gz"
- 'flif-use-build-flags.patch')
+ 'flif-use-build-flags.patch'
+ 'flif-remove-apt-get-references-from-tools.patch')
sha256sums=('aa02a62974d78f8109cff21ecb6d805f1d23b05b2db7189cfdf1f0d97ff89498'
- 'd8cdb93f4f1e63487d65d23c1c96bf79acff1277532cbcfd88ca05932655d871')
+ 'd8cdb93f4f1e63487d65d23c1c96bf79acff1277532cbcfd88ca05932655d871'
+ 'c516d92d4724e319af79bb1ac5d3dde81dac359fd4a02af1ee71239a49d58710')
prepare() {
cd "${_srcname}-${pkgver}"
@@ -28,17 +30,35 @@ prepare() {
patch -Np1 -i "${srcdir}/flif-use-build-flags.patch"
# remove apt-get references from installed tools
- cd tools
- sed -i '/apt-get/d' gif2flif apng2flif
+ patch -Np1 -i "${srcdir}/flif-remove-apt-get-references-from-tools.patch"
}
build() {
cd "${_srcname}-${pkgver}/src"
- make all decoder viewflif
+ make all decoder viewflif test-interface
}
+check() {
+ cd "${_srcname}-${pkgver}/testFiles"
+
+ local _image
+ local _images
+ _images=($(find -type f -name '*'))
+
+ cd "${srcdir}/${_srcname}-${pkgver}/src"
+
+ export LD_LIBRARY_PATH="${srcdir}/${_srcname}-${pkgver}/src"
+
+ for _image in "${_images[@]}"
+ do
+ _image="${_image#./}"
+ printf '%s\n' " -> Testing with image '${_image}'..."
+ ./test-interface "../${_image}"
+ done
+}
+
package() {
cd "${_srcname}-${pkgver}/src"
diff --git a/flif-remove-apt-get-references-from-tools.patch b/flif-remove-apt-get-references-from-tools.patch
new file mode 100644
index 00000000000..50430beabf1
--- /dev/null
+++ b/flif-remove-apt-get-references-from-tools.patch
@@ -0,0 +1,22 @@
+diff -Naurp a/tools/apng2flif b/tools/apng2flif
+--- a/tools/apng2flif 2017-04-28 15:46:54.000000000 +0000
++++ b/tools/apng2flif 2019-03-05 15:42:29.000000000 +0000
+@@ -13,7 +13,6 @@ fi
+ if ! $APNGDIS 2>/dev/null |grep -q APNG
+ then
+ echo "APNG Disassembler not found, please install it first!"
+- echo "sudo apt-get install apngdis"
+ exit 1
+ fi
+
+diff -Naurp a/tools/gif2flif b/tools/gif2flif
+--- a/tools/gif2flif 2017-04-28 15:46:54.000000000 +0000
++++ b/tools/gif2flif 2019-03-05 15:42:29.000000000 +0000
+@@ -13,7 +13,6 @@ fi
+ if ! $CONVERT -version 2>/dev/null >/dev/null
+ then
+ echo "ImageMagick not found, please install it first!"
+- echo "sudo apt-get install imagemagick"
+ exit 1
+ fi
+