From 0a4b30392dcc1ea397f9283ceea367934751e4cd Mon Sep 17 00:00:00 2001 From: Fincer Date: Tue, 11 Apr 2017 02:22:47 +0300 Subject: [PATCH] Add FLIF packages --- Readme.md | 20 +++++++++ kde-servicemenus-flifconversion/PKGBUILD | 25 +++++++++++ .../flif-conversion.desktop | 14 +++++++ .../flif-conversion.sh | 8 ++++ qt-flif-plugin/PKGBUILD | 41 +++++++++++++++++++ .../disable-callback-temporarily.patch | 16 ++++++++ 6 files changed, 124 insertions(+) create mode 100644 kde-servicemenus-flifconversion/PKGBUILD create mode 100644 kde-servicemenus-flifconversion/flif-conversion.desktop create mode 100644 kde-servicemenus-flifconversion/flif-conversion.sh create mode 100644 qt-flif-plugin/PKGBUILD create mode 100644 qt-flif-plugin/disable-callback-temporarily.patch diff --git a/Readme.md b/Readme.md index 2e75d9e..4b10552 100644 --- a/Readme.md +++ b/Readme.md @@ -75,6 +75,19 @@ Plasma 5 Dolphin service menu script for cr2hdr package. FORMAT: Arch Linux PKGBUILD script. +**kde-servicemenus-flifconversion** +-------------- + +Plasma 5 Dolphin service menu script for converting images to FLIF format. + +Requirements: FLIF libraries ([GitHub source](https://github.com/FLIF-hub/FLIF) or [AUR Package](https://aur.archlinux.org/packages/flif-git/)) + +It is recommended that you add FLIF mimetype (as image/flif) in system-wide. + +You may consider building imagemagick with FLIF support, too (use configure flag --with-flif) and installing qt-flif-plugin package (see it below). + +FORMAT: Arch Linux PKGBUILD script + source files. + **kde-servicemenus-hexstrings** -------------- @@ -323,6 +336,13 @@ Homepage: FORMAT: Arch Linux PKGBUILD script + patch files. +**qt-flif-plugin** +-------------- + +Add FLIF image format support for KDE environment. + +FORMAT: Arch Linux PKGBUILD script. + **u3d** -------------- diff --git a/kde-servicemenus-flifconversion/PKGBUILD b/kde-servicemenus-flifconversion/PKGBUILD new file mode 100644 index 0000000..0fc46d6 --- /dev/null +++ b/kde-servicemenus-flifconversion/PKGBUILD @@ -0,0 +1,25 @@ +# Maintainer: Sabart Otto - Seberm + +pkgname=qt-flif-plugin-git +_pkgname=qt-flif-plugin +pkgver=r14.c1fff14 +pkgrel=1 +pkgdesc="Free Lossless Image Format" +arch=("i686" "x86_64") +url="https://github.com/FLIF-hub/FLIF" +license=('GPL3') +conflicts=('qt-flif-plugin') +provides=('qt-flif-plugin') +depends=('flif' 'qt5-base') +makedepends=('make') +source=('git+https://github.com/spillerrec/qt-flif-plugin.git' +disable-callback-temporarily.patch) +sha256sums=('SKIP' + 'd383d802b04a5f286e11ad53bdaaf0bc20b5392c5c73b29ba7cea1f78a9e2be0') + +prepare() { + cd "$srcdir/${_pkgname}" + patch -Np1 -i $srcdir/disable-callback-temporarily.patch +} + + +pkgver() { + cd "$srcdir/${_pkgname}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "$srcdir/${_pkgname}" + qmake + make +} + +package() { + cd "$srcdir/${_pkgname}" + mkdir -p "${pkgdir}/usr/lib/qt/plugins/imageformats/" + install -m755 "$srcdir/${_pkgname}/libflif.so" "${pkgdir}/usr/lib/qt/plugins/imageformats/" +} diff --git a/qt-flif-plugin/disable-callback-temporarily.patch b/qt-flif-plugin/disable-callback-temporarily.patch new file mode 100644 index 0000000..337a5a2 --- /dev/null +++ b/qt-flif-plugin/disable-callback-temporarily.patch @@ -0,0 +1,16 @@ +See the following issue: https://github.com/spillerrec/qt-flif-plugin/issues/5 +This patch is not a real fix. + +--- a/src/Flif++.hpp ++++ b/src/Flif++.hpp +@@ -78,8 +78,8 @@ + void setResize( uint32_t width, uint32_t height ) + { flif_decoder_set_resize( d, width, height ); } + +- void setCallback( uint32_t (*callback)(int32_t,int64_t) ) +- { flif_decoder_set_callback( d, callback ); } ++// void setCallback( uint32_t (*callback)(int32_t,int64_t) ) ++// { flif_decoder_set_callback( d, callback ); } + + void setFirstCallbackQuality( int32_t quality ) + { flif_decoder_set_first_callback_quality( d, quality ); }