diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-03-20 00:40:44 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-03-20 00:40:44 +0000 |
commit | 4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch) | |
tree | 356496503d52354aa6d9f2d36126302fed5f3a73 /media-libs/freeimage | |
parent | fcc5224904648a8e6eb528d7603154160a20022f (diff) |
gentoo resync : 20.03.2022
Diffstat (limited to 'media-libs/freeimage')
-rw-r--r-- | media-libs/freeimage/Manifest | 2 | ||||
-rw-r--r-- | media-libs/freeimage/files/freeimage-3.18.0-openexr-3-imath.patch | 144 | ||||
-rw-r--r-- | media-libs/freeimage/freeimage-3.18.0-r6.ebuild | 124 |
3 files changed, 270 insertions, 0 deletions
diff --git a/media-libs/freeimage/Manifest b/media-libs/freeimage/Manifest index 7465d5fdc0b7..1262ae333363 100644 --- a/media-libs/freeimage/Manifest +++ b/media-libs/freeimage/Manifest @@ -2,6 +2,7 @@ AUX freeimage-3.18.0-CVE-2019-12211-CVE-2019-12213.patch 6242 BLAKE2B 3deb724b2c AUX freeimage-3.18.0-disable-plugin-G3.patch 1553 BLAKE2B d122df83a8889cd599d12c65cee5678b3654266c2e128d1d8d963eed7743b62ba6da7c582acc389f874fd218e2f7857d718a562bd81c52cf23f31284fdc00dc4 SHA512 9a0adeaaa3bf839387dbbccc54e0e32e0af87af4c398edd4cc44f1c6d380228dc7c174a7715ac397c15d48b7b5337543aac05020e25b6680187e179e8738dccd AUX freeimage-3.18.0-libjpeg9.patch 520 BLAKE2B 4788a3c4c209568df7176ed7b2699f9c33efb8c2ff2dc51d1e6bc76329ade073bdd296d7e9aa2441a655e46407df31cc5dd84c0d1805ca75418bae9d4ca4ecfa SHA512 75fc7c4d257d4bd67202c5c91af23f3e990342490c4661ab2219b89c40626703d9ceb5f05dc8d2a912153fbe5b9e07f24566570597f84cec15fbe03cb7d4b69e AUX freeimage-3.18.0-libraw-0.20.0.patch 1912 BLAKE2B 56892466e8c8c4a1178c66ba24fa0da0b4218ac883a21eee47ac87044a5cb300182d33c04e91e9ed30a0e3b03c34cd447c0400bb2b6045f96866bb583aeaee06 SHA512 6fde3ee5e0219bdb6cf897e1898dfd0e06dbfceb67f06a935776b96c4688b27e11075958c339c417c3d3490d5778e802b1eafb4c92360c342acf0a2b7ff6345e +AUX freeimage-3.18.0-openexr-3-imath.patch 5333 BLAKE2B 9465fb9c9f50f5bfe08d1d337acff27441d2054dbcada9df173f5bbaae5b25dd2d155de141c464e3188cc871a2dc2e25fb8b992151ae1cd9e6134a889e3ab705 SHA512 88ebb72e6b531e4444904789025962d1e4b2b7947c1b353b46db138c55c5f486ed7ee81ee455f084ed4780b6aef0a0afe2f0a8518b5b723c51bfc6dad4ca9fe1 AUX freeimage-3.18.0-raw.patch 432 BLAKE2B 96c89d051a849f5909bdb9b3f720d4146651504f972a1661b55caa6344eeac3dc64dda1beb027e43e9b2eb7ce5ac8193db424422e74ce957744d9e6d14086a7a SHA512 01e150205a62ee9eb240890a5c9b92160a74073a1fe43811ed8941aeda824ba3c87bf4a2e631cbe367a7391374e93d309d95a6b5ec31009e4e8f1c2fc6b10da1 AUX freeimage-3.18.0-remove-jpeg-transform.patch 3392 BLAKE2B d82f5723aaff66a995ec4d748a8bc988a18ef149e525d108b458971dc3ae7278e9f0d65527576b6ebcd54b403d296810e19cc2d808397a8aa3558a13bd296331 SHA512 071b5dc814020db19d41527f2f6fe89f2a3a1340d5825c204ea3fa496d4d1c3075bdd006fa041b0a819892d5b01f1b9b32ed8827e9a180ef9bbe92bf2554a67e AUX freeimage-3.18.0-rename-jpeg_read_icc_profile.patch 1278 BLAKE2B b387457b89614c4fe3e7e37891c8ce0cc296b8e05300cd88b789e1a6551cb78761a58446f1a16d0d59af6ea05fcf73defd898fe99e6b12e6cde9de6bd7606edc SHA512 4c18f02f750c47796a718f579ae3bfda91354eba4ba991f4df9d71a09ead04e13087bcd1423374c359a39b98c729a38466e464b46d7cd1af15e9e4aadd72a3b4 @@ -9,4 +10,5 @@ DIST FreeImage3180.pdf 1665541 BLAKE2B 5d40ee6fa0a1e73df0cc961edbd70a2835ef88fb5 DIST FreeImage3180.zip 7415716 BLAKE2B b695271f4e80eb304eccde66e38b5095eceae51fbe0dd97df69c55f364f8440d8c97139b8edc2f01c400f5c53a7336fdfab1e28aa3ea04f485901d5def443d25 SHA512 9d9cc7e2d57552c3115e277aeb036e0455204d389026b17a3f513da5be1fd595421655488bb1ec2f76faebed66049119ca55e26e2a6d37024b3fb7ef36ad4818 DIST freeimage-3.18.0-unbundling.patch 20960 BLAKE2B 61ee63e7be0d5db7bf4a3bc053bb67f5a6ce6949ed252b1729e7542addd432d1105b7e70d834f05210be3c5c81a5378a2cb00d5b9d8e21590672a1ac6e1135fa SHA512 c56062099e17e8a16447fccc4bdf3089e7992273f1a09a2ff7f591b3bd68a8d1e80842400aaffdc8394ed64273e26a4f01e12fc8c55bb40d346db96eb5dcbe30 EBUILD freeimage-3.18.0-r3.ebuild 3182 BLAKE2B e4279ecd9c3e8e00a998da85402efb3edd6845a20e1a2b25a61480d666d65a8702df19762615290e74fbdb8960d0d95f83e31a12865bb14c335fc7377139c7e4 SHA512 2113ca778f0116fc5ac12b74e9264e2fb04169af05d0b84e09ba3c3b42c9f51b30fab059fbc432d4c151a2761652cc0fd3296f661b9727f6a78d7a68b03923da +EBUILD freeimage-3.18.0-r6.ebuild 3272 BLAKE2B e838e809310f2485f47524126769c3225ba34ab4a65d287cc03a2fa8e75789771715f5536a9db2436d94f00ae41821d8fbed3cc3d6fafbfbe3a3228fa7d484d5 SHA512 f50a10ac25c41c43bfb61e1a1f09279d8e57439c028aff83a0446101acb520fa7efef4657b4c39361ef752cd619909f114490fbf0895fca3aa994fd8172c2197 MISC metadata.xml 404 BLAKE2B 09c1635a36f53e8e3a48bd43d03d6cafaf9d511caf5bc3174fea2434970e1372eb1dbb979eb093e88078960c968cd578fcc4b74b67a34f55bf078f074ee97ab3 SHA512 d271f95c2295b4370c5434a172e838467daeab733399c26a1a730771ffae5a46bef879fd7e424b182177a2dd14f9abcc903cfa1c35052f84a2517f8803856836 diff --git a/media-libs/freeimage/files/freeimage-3.18.0-openexr-3-imath.patch b/media-libs/freeimage/files/freeimage-3.18.0-openexr-3-imath.patch new file mode 100644 index 000000000000..693c71fef321 --- /dev/null +++ b/media-libs/freeimage/files/freeimage-3.18.0-openexr-3-imath.patch @@ -0,0 +1,144 @@ +diff --git a/Source/FreeImage/PluginEXR.cpp b/Source/FreeImage/PluginEXR.cpp +index faa8037..e88bd2d 100644 +--- a/Source/FreeImage/PluginEXR.cpp ++++ b/Source/FreeImage/PluginEXR.cpp +@@ -28,16 +28,32 @@ + #pragma warning (disable : 4800) // ImfVersion.h - 'const int' : forcing value to bool 'true' or 'false' (performance warning) + #endif + +-#include <ImfIO.h> +-#include <Iex.h> +-#include <ImfOutputFile.h> +-#include <ImfInputFile.h> +-#include <ImfRgbaFile.h> +-#include <ImfChannelList.h> +-#include <ImfRgba.h> +-#include <ImfArray.h> +-#include <ImfPreviewImage.h> +-#include <half.h> ++#include <OpenEXR/ImfIO.h> ++#include <OpenEXR/Iex.h> ++#include <OpenEXR/ImfOutputFile.h> ++#include <OpenEXR/ImfInputFile.h> ++#include <OpenEXR/ImfRgbaFile.h> ++#include <OpenEXR/ImfChannelList.h> ++#include <OpenEXR/ImfRgba.h> ++#include <OpenEXR/ImfArray.h> ++#include <OpenEXR/ImfPreviewImage.h> ++ ++// The version can reliably be found in this header file from OpenEXR, ++// for both 2.x and 3.x: ++#include <OpenEXR/OpenEXRConfig.h> ++#define COMBINED_OPENEXR_VERSION ((10000*OPENEXR_VERSION_MAJOR) + \ ++ (100*OPENEXR_VERSION_MINOR) + \ ++ OPENEXR_VERSION_PATCH) ++ ++// There's just no easy way to have an `#include` that works in both ++// cases, so we use the version to switch which set of include files we ++// use. ++#if COMBINED_OPENEXR_VERSION >= 20599 /* 2.5.99: pre-3.0 */ ++# include <Imath/half.h> ++#else ++ // OpenEXR 2.x, use the old locations ++# include <OpenEXR/half.h> ++#endif + + + // ========================================================== +@@ -66,11 +82,11 @@ public: + return ((unsigned)n != _io->read_proc(c, 1, n, _handle)); + } + +- virtual Imath::Int64 tellg() { ++ virtual uint64_t tellg() { + return _io->tell_proc(_handle); + } + +- virtual void seekg(Imath::Int64 pos) { ++ virtual void seekg(uint64_t pos) { + _io->seek_proc(_handle, (unsigned)pos, SEEK_SET); + } + +@@ -100,11 +116,11 @@ public: + } + } + +- virtual Imath::Int64 tellp() { ++ virtual uint64_t tellp() { + return _io->tell_proc(_handle); + } + +- virtual void seekp(Imath::Int64 pos) { ++ virtual void seekp(uint64_t pos) { + _io->seek_proc(_handle, (unsigned)pos, SEEK_SET); + } + }; +diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp +index b9da767..96da4d7 100644 +--- a/Source/FreeImage/PluginTIFF.cpp ++++ b/Source/FreeImage/PluginTIFF.cpp +@@ -39,7 +39,24 @@ + #include "Utilities.h" + #include "tiffiop.h" + #include "../Metadata/FreeImageTag.h" +-#include <half.h> ++// The version can reliably be found in this header file from OpenEXR, ++// for both 2.x and 3.x: ++#include <OpenEXR/OpenEXRConfig.h> ++#define COMBINED_OPENEXR_VERSION ((10000*OPENEXR_VERSION_MAJOR) + \ ++ (100*OPENEXR_VERSION_MINOR) + \ ++ OPENEXR_VERSION_PATCH) ++ ++// There's just no easy way to have an `#include` that works in both ++// cases, so we use the version to switch which set of include files we ++// use. ++#if COMBINED_OPENEXR_VERSION >= 20599 /* 2.5.99: pre-3.0 */ ++# include <Imath/ImathVec.h> ++# include <Imath/half.h> ++#else ++ // OpenEXR 2.x, use the old locations ++# include <OpenEXR/ImathVec.h> ++# include <OpenEXR/half.h> ++#endif + + #include "FreeImageIO.h" + #include "PSDParser.h" +diff --git a/Makefile.fip b/Makefile.fip +index 60bedbc..193126d 100644 +--- a/Makefile.fip ++++ b/Makefile.fip +@@ -28,7 +28,7 @@ LIBRARIES-$(USE_JPEG) += -ljpeg + LIBRARIES-$(USE_JPEG2K) += $(shell $(PKG_CONFIG) --libs libopenjp2) + LIBRARIES-$(USE_MNG) += -lmng + LIBRARIES-$(USE_PNG) += $(shell $(PKG_CONFIG) --libs libpng) +-LIBRARIES-$(USE_TIFF) += $(shell $(PKG_CONFIG) --libs libtiff-4 IlmBase) ++LIBRARIES-$(USE_TIFF) += $(shell $(PKG_CONFIG) --libs libtiff-4 Imath) + LIBRARIES-$(USE_RAW) += $(shell $(PKG_CONFIG) --libs libraw) + LIBRARIES-$(USE_WEBP) += $(shell $(PKG_CONFIG) --libs libwebp libwebpmux) + +diff --git a/Makefile.gnu b/Makefile.gnu +index b11c554..3de5a1b 100644 +--- a/Makefile.gnu ++++ b/Makefile.gnu +@@ -28,7 +28,7 @@ LIBRARIES-$(USE_JPEG) += -ljpeg + LIBRARIES-$(USE_JPEG2K) += $(shell $(PKG_CONFIG) --libs libopenjp2) + LIBRARIES-$(USE_MNG) += -lmng + LIBRARIES-$(USE_PNG) += $(shell $(PKG_CONFIG) --libs libpng) +-LIBRARIES-$(USE_TIFF) += $(shell $(PKG_CONFIG) --libs libtiff-4 IlmBase) ++LIBRARIES-$(USE_TIFF) += $(shell $(PKG_CONFIG) --libs libtiff-4 Imath) + LIBRARIES-$(USE_RAW) += $(shell $(PKG_CONFIG) --libs libraw) + LIBRARIES-$(USE_WEBP) += $(shell $(PKG_CONFIG) --libs libwebp libwebpmux) + +diff --git a/Makefile.srcs b/Makefile.srcs +index 26e1a6d..d97eacf 100644 +--- a/Makefile.srcs ++++ b/Makefile.srcs +@@ -180,7 +180,7 @@ INCLUDE-$(USE_JPEG) += -DUSE_JPEG + INCLUDE-$(USE_JPEG2K) += -DUSE_JPEG2K $(shell $(PKG_CONFIG) --cflags-only-I libopenjp2) + INCLUDE-$(USE_MNG) += -DUSE_MNG + INCLUDE-$(USE_PNG) += -DUSE_PNG $(shell $(PKG_CONFIG) --cflags-only-I libpng) +-INCLUDE-$(USE_TIFF) += -DUSE_TIFF $(shell $(PKG_CONFIG) --cflags-only-I libtiff-4 IlmBase) ++INCLUDE-$(USE_TIFF) += -DUSE_TIFF $(shell $(PKG_CONFIG) --cflags-only-I libtiff-4 Imath) + INCLUDE-$(USE_RAW) += -DUSE_RAW $(shell $(PKG_CONFIG) --cflags-only-I libraw) + INCLUDE-$(USE_WEBP) += -DUSE_WEBP $(shell $(PKG_CONFIG) --cflags-only-I libwebp libwebpmux) + INCLUDE = $(INCLUDE-yes) diff --git a/media-libs/freeimage/freeimage-3.18.0-r6.ebuild b/media-libs/freeimage/freeimage-3.18.0-r6.ebuild new file mode 100644 index 000000000000..fc7744569906 --- /dev/null +++ b/media-libs/freeimage/freeimage-3.18.0-r6.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit edos2unix toolchain-funcs + +MY_PN=FreeImage +MY_PV=${PV//.} +MY_P=${MY_PN}${MY_PV} + +DESCRIPTION="Image library supporting many formats" +HOMEPAGE="https://freeimage.sourceforge.io/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip + mirror://sourceforge/${PN}/${MY_P}.pdf + https://dev.gentoo.org/~juippis/distfiles/tmp/freeimage-3.18.0-unbundling.patch" + +LICENSE="|| ( GPL-2 FIPL-1.0 )" +SLOT="0" +KEYWORDS="amd64 ~arm ~arm64 ~riscv x86 ~amd64-linux ~x86-linux" +IUSE="jpeg jpeg2k mng openexr png raw static-libs tiff webp" + +# The tiff/imath+openexr isn't a typo. The TIFF plugin cheats and +# uses code from it to handle 16bit<->float conversions. +RDEPEND=" + sys-libs/zlib + jpeg? ( virtual/jpeg:0 ) + jpeg2k? ( media-libs/openjpeg:2= ) + mng? ( media-libs/libmng:= ) + openexr? ( media-libs/openexr:= ) + png? ( media-libs/libpng:0= ) + raw? ( media-libs/libraw:= ) + tiff? ( + >=dev-libs/imath-3.1.4-r2:= + >=media-libs/openexr-3:0= + media-libs/tiff:0 + ) + webp? ( media-libs/libwebp:= )" +DEPEND="${RDEPEND}" +BDEPEND=" + app-arch/unzip + virtual/pkgconfig" + +S=${WORKDIR}/${MY_PN} + +DOCS=( "${DISTDIR}"/${MY_P}.pdf README.linux Whatsnew.txt ) + +PATCHES=( + "${DISTDIR}"/${PN}-3.18.0-unbundling.patch + "${FILESDIR}"/${PN}-3.18.0-remove-jpeg-transform.patch + "${FILESDIR}"/${PN}-3.18.0-rename-jpeg_read_icc_profile.patch + "${FILESDIR}"/${PN}-3.18.0-disable-plugin-G3.patch + "${FILESDIR}"/${PN}-3.18.0-raw.patch + "${FILESDIR}"/${PN}-3.18.0-libjpeg9.patch + "${FILESDIR}"/${PN}-3.18.0-CVE-2019-12211-CVE-2019-12213.patch + "${FILESDIR}"/${PN}-3.18.0-openexr-3-imath.patch + "${FILESDIR}"/${PN}-3.18.0-libraw-0.20.0.patch +) + +src_prepare() { + pushd Source >/dev/null || die + cp LibJPEG/{transupp.c,transupp.h,jinclude.h} . || die + cp LibTIFF4/{tiffiop,tif_dir}.h . || die + rm -rf LibPNG LibMNG LibOpenJPEG ZLib OpenEXR LibRawLite LibTIFF4 LibJPEG LibWebP LibJXR || die + popd >/dev/null || die + + edos2unix Makefile.{gnu,fip,srcs} fipMakefile.srcs */*.h */*/*.cpp + sed -i \ + -e "s:/./:/:g" \ + -e "s: ./: :g" \ + -e 's: Source: \\\n\tSource:g' \ + -e 's: Wrapper: \\\n\tWrapper:g' \ + -e 's: Examples: \\\n\tExamples:g' \ + -e 's: TestAPI: \\\n\tTestAPI:g' \ + -e 's: -ISource: \\\n\t-ISource:g' \ + -e 's: -IWrapper: \\\n\t-IWrapper:g' \ + -e 's:INCLS:\nINCLS:g' \ + Makefile.srcs fipMakefile.srcs || die + sed -i \ + -e "/LibJPEG/d" \ + -e "/LibJXR/d" \ + -e "/LibPNG/d" \ + -e "/LibTIFF/d" \ + -e "/Source\/ZLib/d" \ + -e "/LibOpenJPEG/d" \ + -e "/OpenEXR/d" \ + -e "/LibRawLite/d" \ + -e "/LibMNG/d" \ + -e "/LibWebP/d" \ + -e "/LibJXR/d" \ + Makefile.srcs fipMakefile.srcs || die + + default +} + +foreach_make() { + local m + for m in Makefile.{gnu,fip} ; do + emake -f ${m} \ + USE_EXR=$(usex openexr) \ + USE_JPEG=$(usex jpeg) \ + USE_JPEG2K=$(usex jpeg2k) \ + USE_MNG=$(usex mng) \ + USE_PNG=$(usex png) \ + USE_TIFF=$(usex tiff) \ + USE_RAW=$(usex raw) \ + USE_WEBP=$(usex webp) \ + $(usex static-libs '' STATICLIB=) \ + "$@" + done +} + +src_compile() { + tc-export AR PKG_CONFIG + foreach_make \ + CXX="$(tc-getCXX) -fPIC" \ + CC="$(tc-getCC) -fPIC" \ + ${MY_PN} +} + +src_install() { + foreach_make install DESTDIR="${ED}" INSTALLDIR="${ED}"/usr/$(get_libdir) + einstalldocs +} |