summaryrefslogtreecommitdiff
path: root/media-video/qgifer
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-video/qgifer
reinit the tree, so we can have metadata
Diffstat (limited to 'media-video/qgifer')
-rw-r--r--media-video/qgifer/Manifest9
-rw-r--r--media-video/qgifer/files/qgifer-0.2.1-desktop.patch13
-rw-r--r--media-video/qgifer/files/qgifer-0.2.1-giflib5.patch157
-rw-r--r--media-video/qgifer/files/qgifer-0.2.1-opencv3.patch44
-rw-r--r--media-video/qgifer/metadata.xml22
-rw-r--r--media-video/qgifer/qgifer-0.2.1-r4.ebuild47
-rw-r--r--media-video/qgifer/qgifer-0.2.1-r5.ebuild49
7 files changed, 341 insertions, 0 deletions
diff --git a/media-video/qgifer/Manifest b/media-video/qgifer/Manifest
new file mode 100644
index 000000000000..152dd5415bf7
--- /dev/null
+++ b/media-video/qgifer/Manifest
@@ -0,0 +1,9 @@
+AUX qgifer-0.2.1-desktop.patch 526 SHA256 dd0a723dd7fb4479f1a5dfc927d41681aa43d6ef20ed180a938cfddb1e5ef57a SHA512 a5b58befb04339fc871e5cb33503996f536275da749ca6211d88ad519900a949c19883b646954c378d6bacaad0a43befbdeedf5b0504af9f82ea9483975fa69a WHIRLPOOL a6d28f537506136fc9f3432c345da19a2edba909980f126c32c2211f0c3610b433b73180f8cdc6956a6cb7ada03cfd70a04841cc45329f45339749073052cd13
+AUX qgifer-0.2.1-giflib5.patch 4549 SHA256 2cacf218767ef7a568177120363398429c259afa1fb6c317619f59b3e43fd5cf SHA512 2c82545722353f5db74ad7c2e96c6a7529701cd5728d331c3c5cb83181ce482e8abdf1b552dd42b32b9cde624d370dd2b9df81c31160b62d29a6aa75baec1814 WHIRLPOOL 48b72a211ff553fd194a0ee9fdf24ae58f6164c2781f56bbb9ff07cb60ee563b81cc91bebaa6ee076d45ad377d37425f3d2ea927a6d50caaa725a4526b6393e6
+AUX qgifer-0.2.1-opencv3.patch 2516 SHA256 3c558c5a612454a8ace78580713cd2697f22886221c850f236588b3aca5623a1 SHA512 95fc605f034a1bd9177dadc0a53505073b253e8b3265b7f07552212b0920225604946f5b711260a9e463e6926795f0867dbb8bfa41bdfd7ce3c247166e5c905a WHIRLPOOL cd1499d9a4d8db5c066fda72890cbb34b064efed87dfce27297bdd087aa0343fac0ed5a0a69f78e26dd072629c449aff9f9fbd7e2e27646bed75402810c53bcb
+DIST qgifer-0.2.1-source.tar.gz 373441 SHA256 b05f2b44faad2a94a746eb7de411875f133e6038ec81a5f3247c86a25a41e9f0 SHA512 ce48e5756cbab283d5894ddb369114e52c9cedc2fe15aed5d22aeeacc822058123d3a2f3c9a6eddf94a1eef992c3ddcad77d6941c76ba0c795c8b44209fac7df WHIRLPOOL 4095c8a6a373b234007b3015cef9ce9d4a023cf80e2701cec7ad5b2df1ab51e28cf63becb412d25e7305571e284b332542b8e15a7d49bd2d40ffe239753be5e4
+EBUILD qgifer-0.2.1-r4.ebuild 1022 SHA256 7214f9550597c46f543148550457a863c058ecba8291600dcbd427a93789ae69 SHA512 1d29a943158e3fffbf184b694b0a6b932c781ad6daf62c0bbb8765b7bda3078aaf5230dd9a5f42e421973bba432c7cc4c8ff97311aad389b4a16c5b1819d4bc5 WHIRLPOOL 15decdbe6da7b7c751f5a9f5a8c1ad599a96798648a3440d51f51cbf13704dfac4fce75154d2deef39b2ec922bb4ed7b55bcc08b5c22bc1909eac289a56f8189
+EBUILD qgifer-0.2.1-r5.ebuild 1075 SHA256 2e837609f86da13ade195ad1094197a436a83d4fe6dc98b8772b815d977a1363 SHA512 d25e9c0bf7587b2cc13662dddbf8c424e9e7a9a18a12d271611c140b62fd32d56b3a325508b2fecd0d3f38dfeafffa48acb1b0db4de5cfddbc3003be00f8d9d1 WHIRLPOOL 4d56e10227bbc056694f3a327ae50cc04497c1abee3830028eb8c47aa5f567dde1f97d98ab247c93d910237541a826677364972b02b34006181b44161f1078cc
+MISC ChangeLog 4688 SHA256 519f38389621f396e73ce5bc3e66ce8819426c6f0154c945a1ea12324cec9059 SHA512 eef3b41af2c53a4c0482c52e413cb00cb6d7cf205c94b300262d43b32ea1bac47a921924129b3da4e4c127494a4b7e2efd67e91f48e634d44d79a78c227076b5 WHIRLPOOL fbb39f71ee305cd03700184d4fa1ad0624662abd94001be32cf1bb3ccbd07f2c6123e1bd7e55f939d30de58393408536a99eb26884f88e7f73e83f3b4c1a8184
+MISC ChangeLog-2015 1012 SHA256 70e9dde07460f1a533d342c6e5e34e6c3220ecf108a0ae8c0e93312c3a818952 SHA512 88ec870d8936b6f236cdc01d655603335a7583fbf58570db125565cbfffd2541d96291778da963f675908c3f6539938d9b0913bcf2c57816c13da3cb4efcb641 WHIRLPOOL 3f15b53f7fd470827761be6a8e9fec200d8ff5b1c7b54d9da414c401fedacc72e53c50bc76a81d7cfc3915cf23926f5434ef98489877293dd60a2f777d461631
+MISC metadata.xml 766 SHA256 632085b989ce7f3546928021f2bd0ff0db67681a23328eaab3acf5873cee7653 SHA512 25d3caf9f629f38e78519e224871b7319141097fc38337419ea743b548e4ce750579c550dfd2aef9f7811f416e2ce02a8e7772c3fb31505205b3eb8eb6162146 WHIRLPOOL 81dbe30a5a722c8dbe481bd404db60176d3aab288edf1c18badcbefd5aa2c55ddc23a11a5f62b6679797760bd22ca63033ac24bfb147274bce43fe2440d781fc
diff --git a/media-video/qgifer/files/qgifer-0.2.1-desktop.patch b/media-video/qgifer/files/qgifer-0.2.1-desktop.patch
new file mode 100644
index 000000000000..8e021630f13a
--- /dev/null
+++ b/media-video/qgifer/files/qgifer-0.2.1-desktop.patch
@@ -0,0 +1,13 @@
+Index: doc/qgifer.desktop
+===================================================================
+--- a/doc/qgifer.desktop (revision 91)
++++ b/doc/qgifer.desktop (working copy)
+@@ -3,7 +3,7 @@
+ Name=QGifer
+ Icon=/usr/share/icons/qgifer.xpm
+ Type=Application
+-Categories=Graphics;2DGraphics;RasterGraphics;Video;
++Categories=Graphics;2DGraphics;RasterGraphics;Video;AudioVideo;
+ Comment=A video-based animated GIF creator
+ GenericName=A video-based animated GIF creator
+ Comment[pl]=Narzędzie do tworzenia animowanych plików GIF
diff --git a/media-video/qgifer/files/qgifer-0.2.1-giflib5.patch b/media-video/qgifer/files/qgifer-0.2.1-giflib5.patch
new file mode 100644
index 000000000000..9ddfdac80641
--- /dev/null
+++ b/media-video/qgifer/files/qgifer-0.2.1-giflib5.patch
@@ -0,0 +1,157 @@
+Port qgifer to giflib 5 API.
+See also: https://bugs.gentoo.org/show_bug.cgi?id=536634
+
+--- a/src/gifcreator.cpp
++++ b/src/gifcreator.cpp
+@@ -38,7 +38,7 @@
+ j--;
+ }
+ for(int i=0;i<cmaps.size();i++)
+- FreeMapObject(cmaps[i]);
++ GifFreeMapObject(cmaps[i]);
+ }
+
+
+@@ -52,7 +52,7 @@
+ }
+
+
+- GifFileType *GifFile = EGifOpenFileName(filename, FALSE);
++ GifFileType *GifFile = EGifOpenFileName(filename, 0, NULL);
+
+ if (!GifFile){
+ PrintGifError();
+@@ -74,7 +74,7 @@
+ {
+ char nsle[12] = "NETSCAPE2.0";
+ char subblock[3];
+- if (EGifPutExtensionFirst(GifFile, APPLICATION_EXT_FUNC_CODE, 11, nsle) == GIF_ERROR) {
++ if (EGifPutExtension(GifFile, APPLICATION_EXT_FUNC_CODE, 11, nsle) == GIF_ERROR) {
+ PrintGifError();
+ return false;
+ }
+@@ -82,7 +82,7 @@
+ subblock[2] = loop_count % 256;
+ subblock[1] = loop_count / 256;
+
+- if (EGifPutExtensionLast(GifFile, APPLICATION_EXT_FUNC_CODE, 3, subblock) == GIF_ERROR) {
++ if (EGifPutExtension(GifFile, APPLICATION_EXT_FUNC_CODE, 3, subblock) == GIF_ERROR) {
+ PrintGifError();
+ return false;
+ }
+@@ -111,7 +111,7 @@
+
+ if (EGifPutImageDesc(
+ GifFile,
+- 0, 0, w, h, FALSE, cmaps.size() > ni ? cmaps.at(ni) : cmaps.at(cmaps.size()-1)
++ 0, 0, w, h, 0, cmaps.size() > ni ? cmaps.at(ni) : cmaps.at(cmaps.size()-1)
+ ) == GIF_ERROR) {
+ PrintGifError();
+ endProgress();
+@@ -135,7 +135,7 @@
+ return false;
+ }
+
+- if (EGifCloseFile(GifFile) == GIF_ERROR) {
++ if (EGifCloseFile(GifFile, NULL) == GIF_ERROR) {
+ PrintGifError();
+ endProgress();
+ return false;
+--- a/src/gifcreator.h
++++ b/src/gifcreator.h
+@@ -31,6 +31,12 @@
+ typedef vector<GifByteType> Frame;
+ typedef unsigned char Byte;
+
++static inline void
++PrintGifError()
++{
++ fprintf(stderr, "\nGIF-LIB error: %s.\n", GifErrorString(GIF_ERROR));
++}
++
+ class GifCreator
+ {
+
+--- a/src/palettewidget.cpp
++++ b/src/palettewidget.cpp
+@@ -34,7 +34,7 @@
+
+ PaletteWidget::~PaletteWidget()
+ {
+- FreeMapObject(palette);
++ GifFreeMapObject(palette);
+ }
+
+ void PaletteWidget::paintEvent(QPaintEvent*)
+@@ -117,7 +117,7 @@
+ if(palette && mindiff > 1)
+ {
+ qDebug() << "deleting old palette, size: " << size << ", colors: " << palette->ColorCount;
+- FreeMapObject(palette);
++ GifFreeMapObject(palette);
+ qDebug() << "done";
+ palette = NULL;
+ }
+@@ -157,7 +157,7 @@
+ }
+
+ ColorMapObject* previous = palette;
+- palette = MakeMapObject(size, NULL);
++ palette = GifMakeMapObject(size, NULL);
+ if (!palette)
+ {
+ qDebug() << "NULL palette!";
+@@ -165,7 +165,7 @@
+ }
+
+
+- if (QuantizeBuffer(fimg.width(), fimg.height(), &size,
++ if (GifQuantizeBuffer(fimg.width(), fimg.height(), &size,
+ &(r[0]),&(g[0]),&(b[0]), &(output[0]),
+ palette->Colors) == GIF_ERROR)
+ {
+@@ -178,11 +178,11 @@
+ //qDebug() << "difference: " << df;
+ if(previous && df < mindiff)
+ {
+- FreeMapObject(palette);
++ GifFreeMapObject(palette);
+ palette = previous;
+ }
+ else if(df >= mindiff)
+- FreeMapObject(previous);
++ GifFreeMapObject(previous);
+
+ // qDebug() << "palette (" << palette->ColorCount << ") :";
+ // for(int i=0;i<size;i++)
+@@ -230,8 +230,8 @@
+ {
+ QStringList rgb = QString(str).split(";", QString::SkipEmptyParts);
+ if(palette)
+- FreeMapObject(palette);
+- palette = MakeMapObject(rgb.size(), NULL);
++ GifFreeMapObject(palette);
++ palette = GifMakeMapObject(rgb.size(), NULL);
+ if(!palette)
+ return false;
+ size = rgb.size();
+--- a/src/palettewidget.h
++++ b/src/palettewidget.h
+@@ -30,7 +30,7 @@
+ PaletteWidget(QWidget* parent=0, Qt::WindowFlags f=0);
+ virtual ~PaletteWidget();
+ ColorMapObject* map() {return palette;}
+- ColorMapObject* mapCopy() {return MakeMapObject(palette->ColorCount, palette->Colors);}
++ ColorMapObject* mapCopy() {return GifMakeMapObject(palette->ColorCount, palette->Colors);}
+ bool fromImage(const QImage& img, int palette_size, float mindiff = 2);
+ void setColumnCount(int cc){cols = cc;}
+ bool toFile(const QString& path);
+@@ -38,7 +38,7 @@
+ QString toString();
+ bool fromString(const QString& str);
+ int getSize() const {return size;}
+- void clear() {if(palette) FreeMapObject(palette); palette = NULL; update();}
++ void clear() {if(palette) GifFreeMapObject(palette); palette = NULL; update();}
+ private:
+ int size;
+ int cols;
diff --git a/media-video/qgifer/files/qgifer-0.2.1-opencv3.patch b/media-video/qgifer/files/qgifer-0.2.1-opencv3.patch
new file mode 100644
index 000000000000..89c79ff17943
--- /dev/null
+++ b/media-video/qgifer/files/qgifer-0.2.1-opencv3.patch
@@ -0,0 +1,44 @@
+diff -Naur qgifer-0.2.1-source/CMakeLists.txt qgifer-0.2.1-modified/CMakeLists.txt
+--- qgifer-0.2.1-source/CMakeLists.txt 2013-06-04 18:33:16.000000000 +0200
++++ qgifer-0.2.1-modified/CMakeLists.txt 2015-12-19 20:58:13.772808845 +0100
+@@ -35,7 +35,7 @@
+ SET(GIF_INCLUDE_DIR "C:\\Program Files\\GnuWin32\\include")
+ ENDIF(WIN32)
+
+-FIND_PACKAGE( OpenCV REQUIRED core highgui imgproc )
++FIND_PACKAGE( OpenCV REQUIRED core highgui imgproc videoio)
+ FIND_PACKAGE(Qt4 REQUIRED)
+ FIND_PACKAGE(GIF REQUIRED)
+
+@@ -148,9 +148,9 @@
+ QT4_ADD_RESOURCES(RESOURCES_RCC ${RESOURCES})
+
+ IF(WIN32)
+- SET( OPENCV_LIBS "-lopencv_core244 -lopencv_highgui244 -lopencv_imgproc244" )
++ SET( OPENCV_LIBS "-lopencv_core244 -lopencv_highgui244 -lopencv_imgproc244 -lopencv_videoio244" )
+ ELSE(WIN32)
+- SET( OPENCV_LIBS "-lopencv_core -lopencv_highgui -lopencv_imgproc" )
++ SET( OPENCV_LIBS "-lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_videoio" )
+ ENDIF(WIN32)
+
+ SET( GIF_LIBS "-lgif" )
+@@ -207,7 +207,7 @@
+ #SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${PACKAGE_NAME}_${QGIFER_VERSION_MAJOR}.${QGIFER_VERSION_MINOR}.${QGIFER_VERSION_PATCH}")
+
+ #set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) #za pierwszym razem, pozniej dodano | dla nowszych opencv
+-SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.1.3), libc6 (>= 2.3.6-6~), libgcc1 (>= 1:4.1.1), libgif4 (>= 4.1.4), libopencv-core2.3 | libopencv-core2.4, libopencv-highgui2.3 | libopencv-highgui2.4, libopencv-imgproc2.3 | libopencv-imgproc2.4, libqtcore4 (>= 4:4.7.0~beta1), libqtgui4 (>= 4:4.6.1), libstdc++6 (>= 4.1.1)")
++SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.1.3), libc6 (>= 2.3.6-6~), libgcc1 (>= 1:4.1.1), libgif4 (>= 4.1.4), libopencv-core2.3 | libopencv-core2.4 | libopencv-core3.0, libopencv-highgui2.3 | libopencv-highgui2.4 | libopencv-highgui3.0, libopencv-imgproc2.3 | libopencv-imgproc2.4 | libopencv-imgproc3.0, libqtcore4 (>= 4:4.7.0~beta1), libqtgui4 (>= 4:4.6.1), libstdc++6 (>= 4.1.1)")
+
+ SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
+ SET(CPACK_DEBIAN_PACKAGE_SECTION "video")
+diff -Naur qgifer-0.2.1-source/src/frameplayer.h qgifer-0.2.1-modified/src/frameplayer.h
+--- qgifer-0.2.1-source/src/frameplayer.h 2013-06-04 18:14:55.000000000 +0200
++++ qgifer-0.2.1-modified/src/frameplayer.h 2015-12-19 21:01:44.419870869 +0100
+@@ -23,6 +23,7 @@
+ #include <opencv2/core/core.hpp>
+ #include <opencv2/highgui/highgui.hpp>
+ #include <opencv2/imgproc/imgproc.hpp>
++#include <opencv2/videoio/videoio.hpp>
+ #include <QWidget>
+ #include <QImage>
+ #include <QStatusBar>
diff --git a/media-video/qgifer/metadata.xml b/media-video/qgifer/metadata.xml
new file mode 100644
index 000000000000..ec2e60d4c66c
--- /dev/null
+++ b/media-video/qgifer/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>andrzej.pauli@gmail.com</email>
+ <name>Andrzej Pauli</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ QGifer is a tool for extracting part of a video to an animated GIF file.
+ </longdescription>
+ <use>
+ <flag name="imagemagick">Use imagemagick for image operations</flag>
+ <flag name="opencv3">Use media-libs/opencv:0/3.0 for video operations instead media-libs/opencv:0/2.4</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">qgifer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/qgifer/qgifer-0.2.1-r4.ebuild b/media-video/qgifer/qgifer-0.2.1-r4.ebuild
new file mode 100644
index 000000000000..02e746bc7713
--- /dev/null
+++ b/media-video/qgifer/qgifer-0.2.1-r4.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit cmake-utils
+
+DESCRIPTION="A video-based animated GIF creator"
+HOMEPAGE="https://sourceforge.net/projects/qgifer/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-source.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="debug imagemagick opencv3"
+
+RDEPEND="<media-libs/giflib-4.2.3:0
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ imagemagick? ( media-gfx/imagemagick:0 )
+ !opencv3? ( <media-libs/opencv-3.0.0:0[ffmpeg] )
+ opencv3? ( >=media-libs/opencv-3.0.0:0[ffmpeg] )
+ virtual/ffmpeg:0"
+
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${P}-source"
+
+PATCHES=( "${FILESDIR}/${P}-desktop.patch" )
+
+src_prepare(){
+ use opencv3 && PATCHES+=( "${FILESDIR}/${P}-opencv3.patch" )
+
+ cmake-utils_src_prepare
+
+ # Fix the doc path
+ sed -i -e "s|share/doc/qgifer|share/doc/${PF}|" CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs
+
+ use debug && mycmakeargs=( -DRELEASE_MODE=OFF )
+
+ cmake-utils_src_configure
+}
diff --git a/media-video/qgifer/qgifer-0.2.1-r5.ebuild b/media-video/qgifer/qgifer-0.2.1-r5.ebuild
new file mode 100644
index 000000000000..a027d20e16d8
--- /dev/null
+++ b/media-video/qgifer/qgifer-0.2.1-r5.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="A video-based animated GIF creator"
+HOMEPAGE="https://sourceforge.net/projects/qgifer/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-source.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="debug imagemagick opencv3"
+
+RDEPEND="
+ >=media-libs/giflib-5.1:=
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ virtual/ffmpeg:0
+ imagemagick? ( media-gfx/imagemagick:0 )
+ !opencv3? ( <media-libs/opencv-3.0.0:0=[ffmpeg] )
+ opencv3? ( >=media-libs/opencv-3.0.0:0=[ffmpeg] )"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${P}-source"
+
+PATCHES=(
+ "${FILESDIR}/${P}-desktop.patch"
+ # Port to giflib 5 API
+ "${FILESDIR}/${P}-giflib5.patch"
+)
+
+src_prepare(){
+ use opencv3 && PATCHES+=( "${FILESDIR}/${P}-opencv3.patch" )
+ cmake-utils_src_prepare
+
+ # Fix the doc path
+ sed -i -e "s|share/doc/qgifer|share/doc/${PF}|" CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(usex debug '-DRELEASE_MODE=OFF' '')
+ )
+ cmake-utils_src_configure
+}