summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2018-09-13 18:55:34 +0000
committerDaniel Bermond2018-09-13 18:58:58 +0000
commit1cb7286c3419d0b5f7726963b2576a853b20782c (patch)
treec71f044300f64e7db7080a7e623c137c64d18b37
parent03a45ac191f7238f24004c058c499273fa5ce653 (diff)
downloadaur-1cb7286c3419d0b5f7726963b2576a853b20782c.tar.gz
Various changes
- fix license - update depends - add optdepends for gif2flif and apng2flif tools - remove apt-get references from gif2flif and apng2flif tools - add patch for using build flags - package(): use make install targets - cosmetic changes
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD79
-rw-r--r--flif-use-build-flags.patch48
3 files changed, 108 insertions, 38 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d0a16ec61da..5e616ae7a35 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,22 @@
-# Generated by mksrcinfo v8
-# Fri Apr 28 16:32:24 UTC 2017
pkgbase = flif
pkgdesc = Free Lossless Image Format
pkgver = 0.3
- pkgrel = 1
- url = https://github.com/FLIF-hub/FLIF
+ pkgrel = 2
+ url = https://github.com/FLIF-hub/FLIF/
arch = i686
arch = x86_64
- license = GPL3
- depends = zlib
+ license = LGPL3
+ license = APACHE
+ depends = gcc-libs
depends = libpng
depends = sdl2
+ optdepends = imagemagick: for gif2flif tool
+ optdepends = apng-utils: for apng2flif tool
conflicts = flif-git
- source = https://github.com/FLIF-hub/FLIF/archive/v0.3.tar.gz
- md5sums = 0bc4d0a71d67b2c6e040e2d5a93dcd2d
+ source = flif-0.3.tar.gz::https://github.com/FLIF-hub/FLIF/archive/v0.3.tar.gz
+ source = flif-use-build-flags.patch
+ sha256sums = aa02a62974d78f8109cff21ecb6d805f1d23b05b2db7189cfdf1f0d97ff89498
+ sha256sums = d8cdb93f4f1e63487d65d23c1c96bf79acff1277532cbcfd88ca05932655d871
pkgname = flif
diff --git a/PKGBUILD b/PKGBUILD
index 614a314a1c0..efde8d0a1e8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,40 +1,59 @@
-# Maintainer: John Jenkins <twodopeshaggy@gmail.com>
+# Maintainer : Daniel Bermond < yahoo-com: danielbermond >
+# Contributor: John Jenkins <twodopeshaggy@gmail.com>
pkgname=flif
-_pkgname=FLIF
+_srcname=FLIF
pkgver=0.3
-pkgrel=1
-pkgdesc="Free Lossless Image Format"
-arch=("i686" "x86_64")
-url="https://github.com/FLIF-hub/FLIF"
-license=('GPL3')
+pkgrel=2
+pkgdesc='Free Lossless Image Format'
+arch=('i686' 'x86_64')
+url='https://github.com/FLIF-hub/FLIF/'
+license=('LGPL3' 'APACHE')
+depends=('gcc-libs' 'libpng' 'sdl2')
+optdepends=(
+ # official repositories:
+ 'imagemagick: for gif2flif tool'
+ # AUR:
+ 'apng-utils: for apng2flif tool'
+)
conflicts=('flif-git')
-depends=('zlib' 'libpng' 'sdl2')
-source=("https://github.com/FLIF-hub/FLIF/archive/v${pkgver//_/-}.tar.gz")
-md5sums=('0bc4d0a71d67b2c6e040e2d5a93dcd2d')
+source=("${pkgname}-${pkgver}.tar.gz"::"https://github.com/FLIF-hub/FLIF/archive/v${pkgver}.tar.gz"
+ 'flif-use-build-flags.patch')
+sha256sums=('aa02a62974d78f8109cff21ecb6d805f1d23b05b2db7189cfdf1f0d97ff89498'
+ 'd8cdb93f4f1e63487d65d23c1c96bf79acff1277532cbcfd88ca05932655d871')
+
+prepare() {
+ cd "${_srcname}-${pkgver}"
+
+ # use build flags
+ 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
+}
build() {
- cd "$srcdir/${_pkgname}-${pkgver//_/-}/src"
- make all
- make decoder
- make viewflif
+ cd "${_srcname}-${pkgver}/src"
+
+ local _target
+
+ for _target in all decoder viewflif
+ do
+ msg2 "Building target '${_target}'..."
+ make "$_target"
+ done
+
}
package() {
- cd "$srcdir/${_pkgname}-${pkgver//_/-}/src"
- install -dm755 "${pkgdir}/usr/bin"
- install -dm755 "${pkgdir}/usr/lib/"
- install -dm755 "${pkgdir}/usr/share/man/man1/"
- install -dm755 "${pkgdir}/usr/include/${_pkgname}"
- install -m755 flif viewflif dflif "${pkgdir}/usr/bin"
- install -m755 libflif_dec.so "${pkgdir}/usr/lib/"
- install -m755 libflif_dec.so.0 "${pkgdir}/usr/lib/"
- install -m755 libflif.so "${pkgdir}/usr/lib/"
- install -m755 libflif.so.0 "${pkgdir}/usr/lib/"
- install -m 644 library/*.h "${pkgdir}/usr/include/${_pkgname}"
- install -m 644 ../doc/flif.1 "${pkgdir}/usr/share/man/man1"
- install -m 755 ../tools/gif2flif "${pkgdir}/usr/bin"
- install -m 755 ../tools/apng2flif "${pkgdir}/usr/bin"
- cd "$srcdir/${_pkgname}-${pkgver//_/-}"
- install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
+ cd "${_srcname}-${pkgver}/src"
+
+ local _target
+
+ for _target in install{,-dev,-decoder,-viewflif}
+ do
+ msg2 "Installing target '${_target}'..."
+ make PREFIX="${pkgdir}/usr" "$_target"
+ done
}
diff --git a/flif-use-build-flags.patch b/flif-use-build-flags.patch
new file mode 100644
index 00000000000..f4dc1331d35
--- /dev/null
+++ b/flif-use-build-flags.patch
@@ -0,0 +1,48 @@
+diff -Naurp a/src/Makefile b/src/Makefile
+--- a/src/Makefile 2017-04-28 15:46:54.000000000 +0000
++++ b/src/Makefile 2018-09-13 18:37:05.277277156 +0000
+@@ -1,6 +1,6 @@
+ PREFIX := $(DESTDIR)/usr/local
+-CXXFLAGS := $(shell pkg-config --cflags zlib libpng) -DLODEPNG_NO_COMPILE_PNG -DLODEPNG_NO_COMPILE_DISK
+-LDFLAGS := $(shell pkg-config --libs libpng)
++CXXFLAGS := $(CXXFLAGS) $(shell pkg-config --cflags zlib libpng) -DLODEPNG_NO_COMPILE_PNG -DLODEPNG_NO_COMPILE_DISK
++LDFLAGS := $(LDFLAGS) $(shell pkg-config --libs libpng)
+
+ OSNAME := $(shell uname -s)
+ SONAME = -soname
+@@ -14,7 +14,7 @@ ifeq ($(OSNAME),Darwin)
+ endif
+
+ # for running interface-test
+-export LD_LIBRARY_PATH=$(shell pwd):/usr/local/lib:$LD_LIBRARY_PATH
++export LD_LIBRARY_PATH := $(shell pwd):/usr/local/lib:$(LD_LIBRARY_PATH)
+
+ FILES_H := maniac/*.hpp maniac/*.cpp image/*.hpp transform/*.hpp flif-enc.hpp flif-dec.hpp common.hpp flif_config.h fileio.hpp io.hpp io.cpp config.h compiler-specific.hpp ../extern/lodepng.h
+ FILES_CPP := maniac/chance.cpp maniac/symbol.cpp image/crc32k.cpp image/image.cpp image/image-png.cpp image/image-pnm.cpp image/image-pam.cpp image/image-rggb.cpp image/image-metadata.cpp image/color_range.cpp transform/factory.cpp common.cpp flif-enc.cpp flif-dec.cpp io.cpp ../extern/lodepng.cpp
+@@ -36,7 +36,7 @@ endif
+
+ # Command-line FLIF encoding/decoding tool - LGPLv3
+ flif: $(FILES_H) $(FILES_CPP) flif.cpp
+- $(CXX) -std=gnu++11 $(CXXFLAGS) $(OPTIMIZATIONS) -g0 -Wall $(FILES_CPP) flif.cpp $(LDFLAGS) -o flif
++ $(CXX) -std=gnu++11 $(CXXFLAGS) $(CPPFLAGS) $(OPTIMIZATIONS) -g0 -Wall $(FILES_CPP) flif.cpp $(LDFLAGS) -o flif
+
+ # Command-line FLIF decoding tool - Apache2 (not built by default)
+ dflif: $(FILES_H) $(FILES_CPP) flif.cpp
+@@ -50,7 +50,7 @@ libflif_dec$(LIBEXT): $(FILES_H) $(FILES
+
+ # Decoder + encoder library - LGPL
+ libflif$(LIBEXT): $(FILES_H) $(FILES_CPP) library/*.h library/*.hpp library/*.cpp
+- $(CXX) -std=gnu++11 $(CXXFLAGS) $(LIB_OPTIMIZATIONS) -g0 -Wall -shared -fPIC $(FILES_CPP) library/flif-interface.cpp $(LDFLAGS) -Wl,$(SONAME),libflif$(LIBEXTV) -o libflif$(LIBEXTV)
++ $(CXX) -std=gnu++11 $(CPPFLAGS) $(CXXFLAGS) $(LIB_OPTIMIZATIONS) -g0 -Wall -shared -fPIC $(FILES_CPP) library/flif-interface.cpp $(LDFLAGS) -Wl,$(SONAME),libflif$(LIBEXTV) -o libflif$(LIBEXTV)
+ ln -sf libflif$(LIBEXTV) libflif$(LIBEXT)
+
+ libflif.dbg$(LIBEXT): $(FILES_H) $(FILES_CPP) library/*.h library/*.hpp library/*.cpp
+@@ -59,7 +59,7 @@ libflif.dbg$(LIBEXT): $(FILES_H) $(FILES
+
+ # Example application: simple FLIF viewer - public domain
+ viewflif: libflif$(LIBEXT) viewflif.c
+- $(CC) -std=gnu11 -O3 -ggdb3 $(shell sdl2-config --cflags) -Wall -Ilibrary/ viewflif.c -L. -lflif $(shell sdl2-config --libs) -o viewflif
++ $(CC) -std=gnu11 $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -O3 -ggdb3 $(shell sdl2-config --cflags) -Wall -Ilibrary/ viewflif.c -L. -lflif $(shell sdl2-config --libs) -o viewflif
+
+
+ install: flif libflif$(LIBEXT)