diff options
author | Philipp Rösner <rndxelement@protonmail.com> | 2023-03-20 10:07:07 +0100 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2023-04-10 10:37:20 +0300 |
commit | d8351df9051c2173bb6177b900225203a604633a (patch) | |
tree | f8a1c81044261550af95ee6fc0796f722f89ada1 /media-gfx | |
parent | sys-fs/e2fsprogs: disable metadata_csum_seed and orphan_file features for new... (diff) | |
download | gentoo-d8351df9051c2173bb6177b900225203a604633a.tar.gz gentoo-d8351df9051c2173bb6177b900225203a604633a.tar.bz2 gentoo-d8351df9051c2173bb6177b900225203a604633a.zip |
media-gfx/converseen: add 0.9.11.1
Add ebuild for converseen-0.9.11.1 with support for
media-gfx/graphicsmagick through the patch
converseen-0.9.11.1-graphicsmagick-support.patch.
Closes: https://bugs.gentoo.org/628688
Signed-off-by: Philipp Rösner <rndxelement@protonmail.com>
Closes: https://github.com/gentoo/gentoo/pull/30308
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/converseen/Manifest | 1 | ||||
-rw-r--r-- | media-gfx/converseen/converseen-0.9.11.1.ebuild | 68 | ||||
-rw-r--r-- | media-gfx/converseen/files/converseen-0.9.11.1-graphicsmagick-support.patch | 53 |
3 files changed, 122 insertions, 0 deletions
diff --git a/media-gfx/converseen/Manifest b/media-gfx/converseen/Manifest index 725f9fcb6224..29df21a853c6 100644 --- a/media-gfx/converseen/Manifest +++ b/media-gfx/converseen/Manifest @@ -1,2 +1,3 @@ DIST converseen-0.9.10.0.tar.gz 769693 BLAKE2B 651edf41b6cdf010fdae47d457f2459c4e99a1657302bc4facfbd70bd7d7b7b85842290b74ea76a396fa75ca5f5398234d309aae179704ce40f1dbb61195835c SHA512 c2ee7c59685879dffcb6f3f4ef9267cb611d358bec21ecd57b90bbc7fa86a07b4aa8dd855956970b35ec671c57b8bbc4d0620c2cb5629a36ca4305e47f4d3b59 +DIST converseen-0.9.11.1.tar.gz 770024 BLAKE2B 671599099abf5b143bde7c57efc547626c14e15bebbd3a70ce4ec43d4febbaf69eebedebaaac935572b785afaa086c383b68bae0f02bc16ca68625dfb55b8c85 SHA512 1d61fa88d9e3d6ed23fb98d0495b00315adca880fd1d0d95e8322c48d9fdcd161ee00b5e2f5f52212c4db66d97e26ac0da561926e55de4bc047d3ad98b6f69dd DIST converseen-0.9.9.8.tar.gz 769184 BLAKE2B 136d4454825fd64bd8129544df25213346550d4a1bf550fd8c32eef7c2c02cda5965aa235ec8f637de53462968a08c1e1b7c5db454c68ed1cac64d08c322fd54 SHA512 64ef5c5614c6536d84c6fc5ad6f9180c45a4c9d1294e492f0b09a596203d91871191f62ef80c6f888f010377c834ae76d825a29b137885756cc33a7d38d70208 diff --git a/media-gfx/converseen/converseen-0.9.11.1.ebuild b/media-gfx/converseen/converseen-0.9.11.1.ebuild new file mode 100644 index 000000000000..85321a19d51d --- /dev/null +++ b/media-gfx/converseen/converseen-0.9.11.1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake xdg-utils + +DESCRIPTION="Batch image converter and resizer based on ImageMagick" +HOMEPAGE="https://converseen.fasterland.net/ + https://github.com/Faster3ck/Converseen/" +SRC_URI="https://github.com/Faster3ck/Converseen/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="graphicsmagick debug" + +RDEPEND=" + dev-qt/qtcore:5 + dev-qt/qtgui:5 + dev-qt/qtnetwork:5 + dev-qt/qtwidgets:5 + graphicsmagick? ( media-gfx/graphicsmagick[cxx,imagemagick] ) + !graphicsmagick? ( media-gfx/imagemagick[cxx] ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + dev-qt/linguist-tools:5 +" + +S="${WORKDIR}/${P^}" + +PATCHES=( + "${FILESDIR}/${PN}-0.9.9.0-appdata-path.patch" + "${FILESDIR}/${PN}-0.9.9.0-no-update.patch" + "${FILESDIR}/${PN}-0.9.11.1-graphicsmagick-support.patch" +) + +src_prepare() { + cmake_src_prepare + + if use graphicsmagick; then + # Replace variables in CMakeLists.txt + sed -i -e "s/GENTOO_LIB/\/usr\/$(get_libdir)/g" \ + -e "s/GENTOO_INCLUDE/\/usr\/include/g" \ + "${S}/CMakeLists.txt" || + die "Failed to sed graphicsmagick patch" + + # Replace MagickCore in globals.cpp + sed -i -e "s/MagickCore/MagickLib/" "${S}/src/globals.cpp" || + die "Failed to sed globals.cpp" + fi +} + +pkg_postinst() { + elog "Please note that due to security policy restrictions" + elog "on media-gfx/imagemagick the support for PS, PDF and" + elog "XPS files must be explicitly enabled by commenting out" + elog "the respective policies in /etc/ImageMagick-7/policy.xml." + elog "See https://wiki.gentoo.org/wiki/ImageMagick#Troubleshooting" + elog "for more information." + + xdg_icon_cache_update +} + +pkg_postrm() { + xdg_icon_cache_update +} diff --git a/media-gfx/converseen/files/converseen-0.9.11.1-graphicsmagick-support.patch b/media-gfx/converseen/files/converseen-0.9.11.1-graphicsmagick-support.patch new file mode 100644 index 000000000000..a76f108e335c --- /dev/null +++ b/media-gfx/converseen/files/converseen-0.9.11.1-graphicsmagick-support.patch @@ -0,0 +1,53 @@ +# See https://bugs.gentoo.org/628688 for further info and +# development discussion about this patch. +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -100,6 +100,14 @@ FIND_PACKAGE(ImageMagick REQUIRED) + FIND_PACKAGE(ImageMagick COMPONENTS Magick++)
+ FIND_PACKAGE(ImageMagick COMPONENTS MagickWand)
+ FIND_PACKAGE(ImageMagick COMPONENTS MagickCore)
++if (NOT ImageMagick_MagickCore_FOUND)
++ set(ImageMagick_INCLUDE_DIRS "GENTOO_INCLUDE/GraphicsMagick")
++ set(ImageMagick_Magick++_INCLUDE_DIRS "GENTOO_INCLUDE/GraphicsMagick/Magick++")
++ set(ImageMagick_MagickCore_INCLUDE_DIRS "")
++ set(ImageMagick_LIBRARY "GENTOO_LIB/libGraphicsMagick.so")
++ set(ImageMagick_Magick++_LIBRARY "GENTOO_LIB/libGraphicsMagick++.so")
++ set(ImageMagick_MagickCore_LIBRARY "")
++endif ()
+
+ INCLUDE_DIRECTORIES(${Qt5Core_INCLUDE_DIRS})
+ INCLUDE_DIRECTORIES(${Qt5Gui_INCLUDE_DIRS})
+--- a/src/converter.cpp ++++ b/src/converter.cpp +@@ -254,8 +254,14 @@ bool Converter::writeImage(Image &my_image, const QString &format, const int &qu + + error_status = ""; + ++/* Workaround to compile with GraphicsMagick: ++ GraphicsMagick "MagickLibVersion" is greater that 0x100000 ++ e.g. GraphicsMagick-1.3.25 has "MagickLibVersion=0x181501" ++ or GraphicsMagick-1.3.26 has "MagickLibVersion=0x191600" */ + #if MagickLibVersion < 0x700 + hasTransparency = my_image.matte(); ++#elif MagickLibVersion > 0x100000 ++ hasTransparency = my_image.matte(); + #else + hasTransparency = my_image.alpha(); + #endif +--- a/src/globals.h ++++ b/src/globals.h +@@ -32,8 +32,14 @@ + using namespace Magick; + using namespace std; + ++/* Workaround to compile with GraphicsMagick: ++ GraphicsMagick "MagickLibVersion" is greater that 0x100000 ++ e.g. GraphicsMagick-1.3.25 has "MagickLibVersion=0x181501" ++ or GraphicsMagick-1.3.26 has "MagickLibVersion=0x191600" */ + #if MagickLibVersion < 0x700 + typedef FilterTypes IMFilterType; ++#elif MagickLibVersion > 0x100000 ++ typedef FilterTypes IMFilterType; + #else + typedef FilterType IMFilterType; + #endif |