summaryrefslogtreecommitdiff
path: root/media-libs/freeimage
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /media-libs/freeimage
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'media-libs/freeimage')
-rw-r--r--media-libs/freeimage/Manifest5
-rw-r--r--media-libs/freeimage/files/freeimage-3.18.0-null-to-false.patch22
-rw-r--r--media-libs/freeimage/files/freeimage-3.18.0-tiff-4.4.0.patch12
-rw-r--r--media-libs/freeimage/freeimage-3.18.0-r7.ebuild (renamed from media-libs/freeimage/freeimage-3.18.0-r6.ebuild)4
-rw-r--r--media-libs/freeimage/freeimage-3.18.0-r8.ebuild126
5 files changed, 166 insertions, 3 deletions
diff --git a/media-libs/freeimage/Manifest b/media-libs/freeimage/Manifest
index 1262ae333363..c173a74f9fe6 100644
--- a/media-libs/freeimage/Manifest
+++ b/media-libs/freeimage/Manifest
@@ -2,13 +2,16 @@ 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-null-to-false.patch 679 BLAKE2B e2f23dc328b6fdc9e5f11e0cf097627b9a7c524cb96b58731f38f69921b5f34f7a414b93ab75e0e7fc7620f21688bbc5b6a2ee303c1b05cb02e4cb550f534409 SHA512 0c7ba4969dd718678b87d4a6ad3358b797d2a793831a7e1a29d006e81ea5f7cb4316f456eba05edced65fcb846509a36d5f2e8c487528e1303be346e0564157b
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
+AUX freeimage-3.18.0-tiff-4.4.0.patch 492 BLAKE2B 284ed6a083b982fbc758237ba96812872c6b16937c7530c8fde2ce793ffcaa1c48864be61b92f61e346d2587720e406f0a2daad1d9cd82fcd86fdaa2f99df45a SHA512 78e691747ceaa369c976e11cc44dcd0baa9c82cf3e064f17703711062fdb443c82db5b14ba79fabb432c63d70115455c83c16d03ee370569a71e8f33baa97366
DIST FreeImage3180.pdf 1665541 BLAKE2B 5d40ee6fa0a1e73df0cc961edbd70a2835ef88fb540f123fd81f2bb826d4c949d2a60dfe3fc02406ce632a389935abac0d471c963c9803b8c2aece2b48afb003 SHA512 632f68b14f7a5916a1b95bbf86c268d0afe786a2537472301bb002254aa3195f046efb41f073133633211e985e90edbb99285ab6f42bc55501c756292a3c4c03
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
+EBUILD freeimage-3.18.0-r7.ebuild 3289 BLAKE2B 5c91326a25624833c7435c4ddbe31765316334603aa1d4877cd259bb3bd3d2a15d9df755c14eca3ceff2f128ea9779bab1f8842bfe39ca09bbf5bca8c7d9b53f SHA512 1511ca9d8ee82a882ccbad93e1d390873381b092874d2e44063caa0e5f46630b94d69c8ec3da4569a383060b83bb889ef75a41ac412ed3b06ef6f8f391ddc389
+EBUILD freeimage-3.18.0-r8.ebuild 3384 BLAKE2B aebf2eec88d7b6200068ed035dea874aa767dabaf2deb793deef622ef4a9c3f5fc269e6f6e7017b28eb23331d80c949c912d9723223c083bf8a9a88ced1fe204 SHA512 190a1527e85112048bea692ccc3b0fb647fabf78b64c5ba56735b6dd647afaba01b942bc63898f03096014ae788e777bb0a0860f6e25953b64607ccd50f7a1ef
MISC metadata.xml 404 BLAKE2B 09c1635a36f53e8e3a48bd43d03d6cafaf9d511caf5bc3174fea2434970e1372eb1dbb979eb093e88078960c968cd578fcc4b74b67a34f55bf078f074ee97ab3 SHA512 d271f95c2295b4370c5434a172e838467daeab733399c26a1a730771ffae5a46bef879fd7e424b182177a2dd14f9abcc903cfa1c35052f84a2517f8803856836
diff --git a/media-libs/freeimage/files/freeimage-3.18.0-null-to-false.patch b/media-libs/freeimage/files/freeimage-3.18.0-null-to-false.patch
new file mode 100644
index 000000000000..3e8e13a40b3c
--- /dev/null
+++ b/media-libs/freeimage/files/freeimage-3.18.0-null-to-false.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/841973
+
+See also:
+https://sourceforge.net/p/freeimage/mailman/message/37668470/
+https://git.alpinelinux.org/aports/commit/?id=9b938a7b38ea4b8d9a73f1bf0d90ee45bbfa9139
+
+diff --git a/Source/FreeImage/PluginPSD.cpp b/Source/FreeImage/PluginPSD.cpp
+index e5b5ffa..d9de81f 100644
+--- a/Source/FreeImage/PluginPSD.cpp
++++ b/Source/FreeImage/PluginPSD.cpp
+@@ -127,7 +127,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) {
+ static BOOL DLL_CALLCONV
+ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) {
+ if(!handle) {
+- return NULL;
++ return FALSE;
+ }
+ try {
+ psdParser parser;
+--
+2.35.1
+
diff --git a/media-libs/freeimage/files/freeimage-3.18.0-tiff-4.4.0.patch b/media-libs/freeimage/files/freeimage-3.18.0-tiff-4.4.0.patch
new file mode 100644
index 000000000000..a0c39064aa34
--- /dev/null
+++ b/media-libs/freeimage/files/freeimage-3.18.0-tiff-4.4.0.patch
@@ -0,0 +1,12 @@
+https://bugs.gentoo.org/848531
+https://bugs.gentoo.org/848534
+https://www.asmail.be/msg0055228425.html
+--- a/Source/Metadata/XTIFF.cpp
++++ b/Source/Metadata/XTIFF.cpp
+@@ -750,5 +750,5 @@
+ }
+ // type of storage may differ (e.g. rationnal array vs float array type)
+- if((unsigned)_TIFFDataSize(tif_tag_type) != FreeImage_TagDataWidth(tag_type)) {
++ if((unsigned)TIFFFieldSetGetSize(fld) != FreeImage_TagDataWidth(tag_type)) {
+ // skip tag or _TIFFmemcpy will fail
+ continue;
diff --git a/media-libs/freeimage/freeimage-3.18.0-r6.ebuild b/media-libs/freeimage/freeimage-3.18.0-r7.ebuild
index fc7744569906..7f916489e378 100644
--- a/media-libs/freeimage/freeimage-3.18.0-r6.ebuild
+++ b/media-libs/freeimage/freeimage-3.18.0-r7.ebuild
@@ -24,7 +24,7 @@ IUSE="jpeg jpeg2k mng openexr png raw static-libs tiff webp"
# uses code from it to handle 16bit<->float conversions.
RDEPEND="
sys-libs/zlib
- jpeg? ( virtual/jpeg:0 )
+ jpeg? ( media-libs/libjpeg-turbo:= )
jpeg2k? ( media-libs/openjpeg:2= )
mng? ( media-libs/libmng:= )
openexr? ( media-libs/openexr:= )
@@ -33,7 +33,7 @@ RDEPEND="
tiff? (
>=dev-libs/imath-3.1.4-r2:=
>=media-libs/openexr-3:0=
- media-libs/tiff:0
+ <media-libs/tiff-4.4.0
)
webp? ( media-libs/libwebp:= )"
DEPEND="${RDEPEND}"
diff --git a/media-libs/freeimage/freeimage-3.18.0-r8.ebuild b/media-libs/freeimage/freeimage-3.18.0-r8.ebuild
new file mode 100644
index 000000000000..a262dc8058d9
--- /dev/null
+++ b/media-libs/freeimage/freeimage-3.18.0-r8.ebuild
@@ -0,0 +1,126 @@
+# 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? ( media-libs/libjpeg-turbo:= )
+ 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-4.4.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
+ "${FILESDIR}"/${PN}-3.18.0-tiff-4.4.0.patch
+ "${FILESDIR}"/${PN}-3.18.0-null-to-false.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
+}