From 67f76a858f1ac826bd8a550d756d9ec6e340ed4f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 27 Jan 2018 18:07:28 +0000 Subject: gentoo resync : 27.01.2018 --- media-libs/Manifest.gz | Bin 66836 -> 66829 bytes media-libs/glm/Manifest | 3 +- media-libs/glm/files/glm-gcc73.patch | 35 +++++ media-libs/glm/glm-0.9.8.5.ebuild | 6 +- media-libs/gst-plugins-base/Manifest | 2 + .../gst-plugins-base-1.12.4.ebuild | 91 ++++++++++++ media-libs/gstreamer/Manifest | 2 + media-libs/gstreamer/gstreamer-1.12.4.ebuild | 108 +++++++++++++++ media-libs/libmatroska/Manifest | 2 +- media-libs/libmatroska/libmatroska-1.4.8.ebuild | 4 +- media-libs/tiff/Manifest | 2 + .../tiff/files/tiff-4.0.9-CVE-2017-9935.patch | 153 +++++++++++++++++++++ media-libs/tiff/tiff-4.0.9-r1.ebuild | 79 +++++++++++ 13 files changed, 482 insertions(+), 5 deletions(-) create mode 100644 media-libs/glm/files/glm-gcc73.patch create mode 100644 media-libs/gst-plugins-base/gst-plugins-base-1.12.4.ebuild create mode 100644 media-libs/gstreamer/gstreamer-1.12.4.ebuild create mode 100644 media-libs/tiff/files/tiff-4.0.9-CVE-2017-9935.patch create mode 100644 media-libs/tiff/tiff-4.0.9-r1.ebuild (limited to 'media-libs') diff --git a/media-libs/Manifest.gz b/media-libs/Manifest.gz index 7e5f40db7d04..30676785de18 100644 Binary files a/media-libs/Manifest.gz and b/media-libs/Manifest.gz differ diff --git a/media-libs/glm/Manifest b/media-libs/glm/Manifest index 9e99ae86dade..f6c147fa5ac4 100644 --- a/media-libs/glm/Manifest +++ b/media-libs/glm/Manifest @@ -1,3 +1,4 @@ +AUX glm-gcc73.patch 1378 BLAKE2B 98be49157daff3250931510e26f7b21cdee74ab2931f5df50153d31a66d4b85e6b7eeeed2316154a2a4c70ed63c53f530a486672fc6b5255a1de9521cac512ef SHA512 c816b9ab071f5d6ef2435c10699c562807d1e8dac08c896d0a6a76f0bcd6c21f82e831349f544e171897e826c26d23a3bf958f808abc8a3d6b8f1c8b534ccda5 DIST glm-0.9.6.1.zip 4232099 BLAKE2B ba8e9fc4a4401f9a78c46f6eebe5fdd6bd9af14f8c65bfcac7b61988b551ba27bf8d28f3a50f3f619dad5a10e11adb6988f9408227d10d738ea6d809d81db0bf SHA512 7f1468c5e60e65181f4685a2429fa8d70350a3576175a55b7c9e8597a03837cb84aeaeb88d311e1e1948c5bd90ad9cee9286433cb78fdee54b0fbe5313ce2f84 DIST glm-0.9.7.6.tar.gz 3457100 BLAKE2B f9c0e481dbac76fa8922d4f58f2d4d60f0735a44a249b1136aa519f7638c21fa193e8c618c784b8b3adbbcf3838e9dbd6ff6a22a2708483bfc39bbea5a24494a SHA512 d4e1e173405c11b5744df8dc12f0848cd84ab27b868434c0f8fc74f15110b78606564991f3063ccc97e68a0aa1c1cb4a1b40ba6ce7feffb0d1a23c3e5cff315a DIST glm-0.9.8.4.tar.gz 3769208 BLAKE2B f675d110d1ceb16ed8afe171fd537254bef68790eca010677a15db501f964e0f7ed7a2cacc93e17c71140e7e3cd9a36a12222f0a40c908d01c405ae335be3016 SHA512 ff0e0651a695caebe9235882d14e09546d52b3cdf66cca8e2078f15b02a3fca4e47bd97d2807aa329f76aa633af3b4999501bd4d0b22ad44b00558d4917f39ed @@ -5,5 +6,5 @@ DIST glm-0.9.8.5.tar.gz 3756809 BLAKE2B 41abc10e1c41c40ad68b7148a8ccbe9d2f4fc8a8 EBUILD glm-0.9.6.1.ebuild 524 BLAKE2B 470804896aa3430cb812a7db1adc89c461ed7c2ef1428f63b92c88e6587c0e73f8730d32a454bbc6b63454506a18eabdaacb3a0ccf63dedca833efd3f2b40efe SHA512 c5c46d8dcad501804adbd4b75d852e3df36e93df2f453c862c0b344df5be9a9993dd9c938badb26cad1787ac70a70d33fb1f006d44d6b777f216dc10b4030a4c EBUILD glm-0.9.7.6.ebuild 884 BLAKE2B e916a774258380213b4beafd015105cc76592c512d373519d4a67c57d1ac8ceaf199189164270ab78a7d103d59b7c6ac7d60f9d416433cd3d08abf34cd98d660 SHA512 88038c4a32d943061db4879ea6d173b4a8ee8fc9a1574c18f7359ccf106704b70a5f532afc6f68e780ae3f94eebce08e802861b7d240a6ee87d5ba61a1d02ec5 EBUILD glm-0.9.8.4.ebuild 884 BLAKE2B dff985eff3489d2436afb02b3d3e65f06814e0b78c7690aeac19ec6028b60be37aa3209c8bf8bee0227bd46b9a9928ec959625bbf79e38cbe85ee1b6876c958a SHA512 4404107395ac1389e2c85757eb1c7aa60f75f7c4a4b57fcb9b0de816891d6675df9aa8269dac68008645e535814dda51401e68264741d159ba0602361f177541 -EBUILD glm-0.9.8.5.ebuild 858 BLAKE2B 92e8f6a3e4b9060ee9c0f96fcf13a4c9020071e16e3abba73c3543345e748df9fc8c0dc8757c1e4e87902378e94e03f399a9966080ccbd993063eb66072064cc SHA512 9e470e69ba2c380d4d88f7fa209579f5a465d8f47a3cdfbbcaee505779db3db8376e3c3eeef04abc9ea59e5ab1de822bff19338af01352449d85b6d92573b263 +EBUILD glm-0.9.8.5.ebuild 902 BLAKE2B 2330311f439fb6d7f6d24a279926ed79f7332720018ac2995fb13d6008ed3a417cc141925ea3e5e222bba60c68f37c1d9ef507d69ed5a5fcc8972a41355637df SHA512 c685f2175a2543675d5f074d189319a01ad473593cd3ed7ae123aea295471bbd7518a0880c5bb47069d7708767a35dff6b70ee5f07a97efe72091b9b7d49c521 MISC metadata.xml 545 BLAKE2B 842701f1a6d1483b75f14aa99f546975b4c7de1a84d36b1e15a882d17662d98d37b491e236da73d9457706b667f0499405b5717af3ccfed73ad0518f34167c72 SHA512 637114ed9721e6d1c8f1d1ce56e9b9c208ca4dfe5f3a0c2b844d90bcdbab8344c00682c9647f7323eec7c485abcd841ef37300a8fe0bc8a5f5c12cfbb1da4971 diff --git a/media-libs/glm/files/glm-gcc73.patch b/media-libs/glm/files/glm-gcc73.patch new file mode 100644 index 000000000000..68033b5b6f63 --- /dev/null +++ b/media-libs/glm/files/glm-gcc73.patch @@ -0,0 +1,35 @@ +diff -ur glm-0.9.8.5.orig/glm/simd/platform.h glm-0.9.8.5/glm/simd/platform.h +--- glm-0.9.8.5.orig/glm/simd/platform.h 2017-08-16 05:15:24.000000000 -0700 ++++ glm-0.9.8.5/glm/simd/platform.h 2018-01-26 15:38:57.584130263 -0800 +@@ -111,7 +111,8 @@ + #define GLM_COMPILER_GCC70 0x02000A00 + #define GLM_COMPILER_GCC71 0x02000B00 + #define GLM_COMPILER_GCC72 0x02000C00 +-#define GLM_COMPILER_GCC80 0x02000D00 ++#define GLM_COMPILER_GCC73 0x02000D00 ++#define GLM_COMPILER_GCC80 0x02000E00 + + // CUDA + #define GLM_COMPILER_CUDA 0x10000000 +@@ -283,6 +284,8 @@ + # define GLM_COMPILER (GLM_COMPILER_GCC71) + # elif (__GNUC__ == 7) && (__GNUC_MINOR__ == 2) + # define GLM_COMPILER (GLM_COMPILER_GCC72) ++# elif (__GNUC__ == 7) && (__GNUC_MINOR__ == 3) ++# define GLM_COMPILER (GLM_COMPILER_GCC73) + # elif (__GNUC__ >= 8) + # define GLM_COMPILER (GLM_COMPILER_GCC80) + # else +diff -ur glm-0.9.8.5.orig/test/core/core_setup_message.cpp glm-0.9.8.5/test/core/core_setup_message.cpp +--- glm-0.9.8.5.orig/test/core/core_setup_message.cpp 2017-08-16 05:15:24.000000000 -0700 ++++ glm-0.9.8.5/test/core/core_setup_message.cpp 2018-01-26 15:37:56.953298475 -0800 +@@ -86,6 +86,9 @@ + case GLM_COMPILER_GCC72: + std::printf("GCC 7.2\n"); + break; ++ case GLM_COMPILER_GCC73: ++ std::printf("GCC 7.3\n"); ++ break; + case GLM_COMPILER_GCC80: + std::printf("GCC 8.0\n"); + break; diff --git a/media-libs/glm/glm-0.9.8.5.ebuild b/media-libs/glm/glm-0.9.8.5.ebuild index 548d897c6840..073f3bee1e27 100644 --- a/media-libs/glm/glm-0.9.8.5.ebuild +++ b/media-libs/glm/glm-0.9.8.5.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -16,6 +16,10 @@ IUSE="test cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_avx cpu_flags_x86 RDEPEND="virtual/opengl" +PATCHES=( + "${FILESDIR}/glm-gcc73.patch" +) + src_configure() { if use test; then local mycmakeargs=( diff --git a/media-libs/gst-plugins-base/Manifest b/media-libs/gst-plugins-base/Manifest index b41208dd918b..091344bb5652 100644 --- a/media-libs/gst-plugins-base/Manifest +++ b/media-libs/gst-plugins-base/Manifest @@ -2,6 +2,8 @@ AUX gst-plugins-base-0.10.36-gcc-4.9.patch 387 BLAKE2B 5ff5d2b0ae4a97240f86ef857 AUX gst-plugins-base-0.10.36-resync-ringbuffer.patch 530 BLAKE2B cbf4d51313e94df62ff3c3e4df859c04a91e22e994587e4ca6baba59294dff572a7ed80cceb3944d4070717fd6f9ce680e42e71a95032d54c8ca6693df29e21f SHA512 fbc252f10f4539f0448eb6f652a945ecf522f6100cb63fb362617a8990818efb1ba4bd5f866b25d439f39e32a41fcab7ef9b176d4be0e6e5bbb6c1853aa2a688 DIST gst-plugins-base-0.10.36.tar.xz 2364108 BLAKE2B a71ef5d5c7462d60937602681c060e85ed086a753b7ef354dad48354d6c3741d809f2c0c6a321ef9ac60fb12d24ec65e1baa63e51211134d2a5e03aae16f73d2 SHA512 ea77778e073515df58229a641b4363df31f0b80204a5a43a8feb31f0b03a5a4b9b79d6e07e1615c773a59927a9b649f1b1d782def1120d581d09a090be8363b8 DIST gst-plugins-base-1.12.3.tar.xz 3117364 BLAKE2B c5c16f1b46b10cfc5b9731ea990638238b82eb7f312345fece3826deed20992aff1c5a48e031060dc175b5ab5ad8ee21bb3e1e950fc0681ee4b596e65f5f92fe SHA512 d32f71836e25081b00040709a2184da85489e5af90902a0b27b820a478f5805bde93a04cefaeabf36dde53c16ad12f2816777cc195f1e027f19d1883e088e2b2 +DIST gst-plugins-base-1.12.4.tar.xz 3119468 BLAKE2B d5ac157618a25c8f0323d1922d5b26b0b5c49f56cb75df3ceeadd0566f873be1a06c863a1da6afff40901fbbbeb1ec6cd6ef4614309ca7f7ff988c0fa9040a10 SHA512 89a6e92cd294612cf1406eb156416ab4606643f6b43637e64a18f6f28ab789ca8d4cf1308434ed85e5fc679c79cc3ca115db48f37e0065a6ab3cdfdbaaad9f53 EBUILD gst-plugins-base-0.10.36-r2.ebuild 2274 BLAKE2B 58f8930c8694880b5ca270637cf0f46be89e19e30c670fee61e3a04680008e2e80536676ebc91f7fc9250fe14f13a093d6e4156b0af57f4e0eff613c030828d7 SHA512 2455419d70993b01fd436a2954df6c811384338a0d4a2ca3a2c04e83a2602c0d6aefd2bef29d64d7535ee2a767390d5910300f0d2a8351435c360f32c83869f2 EBUILD gst-plugins-base-1.12.3.ebuild 2719 BLAKE2B a94595ce1544795bbf62c3c489255e30d53d404220f0d132ebdfcb19547eb35e6f217c7363a88e875022f3df4ace7f0270f2ad99543ebb962134eed07a1708c7 SHA512 9aef3d6262351f76b623ac6df278980ae8962ff7f35cdd3e6e59f3ec83d3dfdcc4899f38841cf02710fe8e6cf0e8db0aec1d0e77fbe908992dbbc89e057195ae +EBUILD gst-plugins-base-1.12.4.ebuild 2802 BLAKE2B b0aad6e8737c1e52ba40df66f10900cd186bf58fc285c1a24f09c77914cad835c1bf0645cb0b451c6e433ea4d898007ae27c7730e1c9c0ed5af3b52f23e01b77 SHA512 8fa4d6243f650b30b91299c75d34226b58f01609d19462407d8e46d82470879d3a1352a2983dc5fca821aa17d8717927fce367bcf18d8a1c878e305d6484cfb0 MISC metadata.xml 397 BLAKE2B 4bb000c5586a8912669b1584356b30d8483b6f15180e7acfdb03d0c4e169c3cc703487a9f1f96867c23ba6b5114903b92bb2b2fda4deb9b979ccf610f8151b8e SHA512 89c4bdb8f7a5da325255b43be4017510c4a5b4a3f8f650dc625b513d0cd2260267f840fc52926fe9ca262d9f3f2c16bcf0aff9c22dd0c8b577e632155910b568 diff --git a/media-libs/gst-plugins-base/gst-plugins-base-1.12.4.ebuild b/media-libs/gst-plugins-base/gst-plugins-base-1.12.4.ebuild new file mode 100644 index 000000000000..15e6288957d1 --- /dev/null +++ b/media-libs/gst-plugins-base/gst-plugins-base-1.12.4.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +GST_ORG_MODULE="gst-plugins-base" + +inherit flag-o-matic ltprune gstreamer + +DESCRIPTION="Basepack of plugins for gstreamer" +HOMEPAGE="https://gstreamer.freedesktop.org/" + +LICENSE="GPL-2+ LGPL-2+" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" + +IUSE="alsa +introspection ivorbis +ogg +orc +pango theora +vorbis X" +REQUIRED_USE=" + ivorbis? ( ogg ) + theora? ( ogg ) + vorbis? ( ogg ) +" + +RDEPEND=" + app-text/iso-codes + >=dev-libs/glib-2.40.0:2[${MULTILIB_USEDEP}] + >=media-libs/gstreamer-${PV}:1.0[introspection?,${MULTILIB_USEDEP}] + >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] + alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] ) + introspection? ( >=dev-libs/gobject-introspection-1.31.1:= ) + ivorbis? ( >=media-libs/tremor-0_pre20130223[${MULTILIB_USEDEP}] ) + ogg? ( >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] ) + orc? ( >=dev-lang/orc-0.4.24[${MULTILIB_USEDEP}] ) + pango? ( >=x11-libs/pango-1.36.3[${MULTILIB_USEDEP}] ) + theora? ( >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}] ) + vorbis? ( >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] ) + X? ( + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] + >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] + >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND} + >=dev-util/gtk-doc-am-1.12 + X? ( + >=x11-proto/videoproto-2.3.1-r1[${MULTILIB_USEDEP}] + >=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}] + >=x11-proto/xproto-7.0.24[${MULTILIB_USEDEP}] ) +" +RDEPEND+="! +Date: Thu, 7 Dec 2017 07:46:47 +1100 +Subject: [PATCH] tiff2pdf: Fix CVE-2017-9935 + +Fix for http://bugzilla.maptools.org/show_bug.cgi?id=2704 + +This vulnerability - at least for the supplied test case - is because we +assume that a tiff will only have one transfer function that is the same +for all pages. This is not required by the TIFF standards. + +We than read the transfer function for every page. Depending on the +transfer function, we allocate either 2 or 4 bytes to the XREF buffer. +We allocate this memory after we read in the transfer function for the +page. + +For the first exploit - POC1, this file has 3 pages. For the first page +we allocate 2 extra extra XREF entries. Then for the next page 2 more +entries. Then for the last page the transfer function changes and we +allocate 4 more entries. + +When we read the file into memory, we assume we have 4 bytes extra for +each and every page (as per the last transfer function we read). Which +is not correct, we only have 2 bytes extra for the first 2 pages. As a +result, we end up writing past the end of the buffer. + +There are also some related issues that this also fixes. For example, +TIFFGetField can return uninitalized pointer values, and the logic to +detect a N=3 vs N=1 transfer function seemed rather strange. + +It is also strange that we declare the transfer functions to be of type +float, when the standard says they are unsigned 16 bit values. This is +fixed in another patch. + +This patch will check to ensure that the N value for every transfer +function is the same for every page. If this changes, we abort with an +error. In theory, we should perhaps check that the transfer function +itself is identical for every page, however we don't do that due to the +confusion of the type of the data in the transfer function. +--- + libtiff/tif_dir.c | 3 +++ + tools/tiff2pdf.c | 65 +++++++++++++++++++++++++++++++++++++------------------ + 2 files changed, 47 insertions(+), 21 deletions(-) + +diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c +index 2ccaf448fc40..cbf2b6933a40 100644 +--- a/libtiff/tif_dir.c ++++ b/libtiff/tif_dir.c +@@ -1065,6 +1065,9 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) + if (td->td_samplesperpixel - td->td_extrasamples > 1) { + *va_arg(ap, uint16**) = td->td_transferfunction[1]; + *va_arg(ap, uint16**) = td->td_transferfunction[2]; ++ } else { ++ *va_arg(ap, uint16**) = NULL; ++ *va_arg(ap, uint16**) = NULL; + } + break; + case TIFFTAG_REFERENCEBLACKWHITE: +diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c +index d1a9b0959f84..c3ec07465e5a 100644 +--- a/tools/tiff2pdf.c ++++ b/tools/tiff2pdf.c +@@ -1047,6 +1047,8 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){ + uint16 pagen=0; + uint16 paged=0; + uint16 xuint16=0; ++ uint16 tiff_transferfunctioncount=0; ++ float* tiff_transferfunction[3]; + + directorycount=TIFFNumberOfDirectories(input); + t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,directorycount,sizeof(T2P_PAGE))); +@@ -1147,26 +1149,48 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){ + } + #endif + if (TIFFGetField(input, TIFFTAG_TRANSFERFUNCTION, +- &(t2p->tiff_transferfunction[0]), +- &(t2p->tiff_transferfunction[1]), +- &(t2p->tiff_transferfunction[2]))) { +- if((t2p->tiff_transferfunction[1] != (float*) NULL) && +- (t2p->tiff_transferfunction[2] != (float*) NULL) && +- (t2p->tiff_transferfunction[1] != +- t2p->tiff_transferfunction[0])) { +- t2p->tiff_transferfunctioncount = 3; +- t2p->tiff_pages[i].page_extra += 4; +- t2p->pdf_xrefcount += 4; +- } else { +- t2p->tiff_transferfunctioncount = 1; +- t2p->tiff_pages[i].page_extra += 2; +- t2p->pdf_xrefcount += 2; +- } +- if(t2p->pdf_minorversion < 2) +- t2p->pdf_minorversion = 2; ++ &(tiff_transferfunction[0]), ++ &(tiff_transferfunction[1]), ++ &(tiff_transferfunction[2]))) { ++ ++ if((tiff_transferfunction[1] != (float*) NULL) && ++ (tiff_transferfunction[2] != (float*) NULL) ++ ) { ++ tiff_transferfunctioncount=3; ++ } else { ++ tiff_transferfunctioncount=1; ++ } + } else { +- t2p->tiff_transferfunctioncount=0; ++ tiff_transferfunctioncount=0; + } ++ ++ if (i > 0){ ++ if (tiff_transferfunctioncount != t2p->tiff_transferfunctioncount){ ++ TIFFError( ++ TIFF2PDF_MODULE, ++ "Different transfer function on page %d", ++ i); ++ t2p->t2p_error = T2P_ERR_ERROR; ++ return; ++ } ++ } ++ ++ t2p->tiff_transferfunctioncount = tiff_transferfunctioncount; ++ t2p->tiff_transferfunction[0] = tiff_transferfunction[0]; ++ t2p->tiff_transferfunction[1] = tiff_transferfunction[1]; ++ t2p->tiff_transferfunction[2] = tiff_transferfunction[2]; ++ if(tiff_transferfunctioncount == 3){ ++ t2p->tiff_pages[i].page_extra += 4; ++ t2p->pdf_xrefcount += 4; ++ if(t2p->pdf_minorversion < 2) ++ t2p->pdf_minorversion = 2; ++ } else if (tiff_transferfunctioncount == 1){ ++ t2p->tiff_pages[i].page_extra += 2; ++ t2p->pdf_xrefcount += 2; ++ if(t2p->pdf_minorversion < 2) ++ t2p->pdf_minorversion = 2; ++ } ++ + if( TIFFGetField( + input, + TIFFTAG_ICCPROFILE, +@@ -1828,9 +1852,8 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){ + &(t2p->tiff_transferfunction[1]), + &(t2p->tiff_transferfunction[2]))) { + if((t2p->tiff_transferfunction[1] != (float*) NULL) && +- (t2p->tiff_transferfunction[2] != (float*) NULL) && +- (t2p->tiff_transferfunction[1] != +- t2p->tiff_transferfunction[0])) { ++ (t2p->tiff_transferfunction[2] != (float*) NULL) ++ ) { + t2p->tiff_transferfunctioncount=3; + } else { + t2p->tiff_transferfunctioncount=1; +-- +2.15.1 + diff --git a/media-libs/tiff/tiff-4.0.9-r1.ebuild b/media-libs/tiff/tiff-4.0.9-r1.ebuild new file mode 100644 index 000000000000..fbb216176cdd --- /dev/null +++ b/media-libs/tiff/tiff-4.0.9-r1.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +inherit autotools eutils libtool multilib-minimal + +DESCRIPTION="Tag Image File Format (TIFF) library" +HOMEPAGE="http://libtiff.maptools.org" +SRC_URI="http://download.osgeo.org/libtiff/${P}.tar.gz + ftp://ftp.remotesensing.org/pub/libtiff/${P}.tar.gz" + +LICENSE="libtiff" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="+cxx jbig jpeg lzma static-libs test zlib" + +RDEPEND="jpeg? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] ) + jbig? ( >=media-libs/jbigkit-2.1:=[${MULTILIB_USEDEP}] ) + lzma? ( >=app-arch/xz-utils-5.0.5-r1:=[${MULTILIB_USEDEP}] ) + zlib? ( >=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] ) + abi_x86_32? ( + !<=app-emulation/emul-linux-x86-baselibs-20130224-r9 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] + )" +DEPEND="${RDEPEND}" + +REQUIRED_USE="test? ( jpeg )" #483132 + +PATCHES=( + "${FILESDIR}"/${PN}-4.0.7-pdfium-0006-HeapBufferOverflow-ChopUpSingleUncompressedStrip.patch + "${FILESDIR}"/${PN}-4.0.7-pdfium-0008-HeapBufferOverflow-ChopUpSingleUncompressedStrip.patch + "${FILESDIR}"/${P}-CVE-2017-9935.patch #624696 +) + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/tiffconf.h +) + +src_prepare() { + default + + # tiffcp-thumbnail.sh fails as thumbnail binary doesn't get built anymore since tiff-4.0.7 + sed '/tiffcp-thumbnail\.sh/d' -i test/Makefile.am || die + + eautoreconf +} + +multilib_src_configure() { + ECONF_SOURCE="${S}" econf \ + $(use_enable static-libs static) \ + $(use_enable zlib) \ + $(use_enable jpeg) \ + $(use_enable jbig) \ + $(use_enable lzma) \ + $(use_enable cxx) \ + --without-x + + # remove useless subdirs + if ! multilib_is_native_abi ; then + sed -i \ + -e 's/ tools//' \ + -e 's/ contrib//' \ + -e 's/ man//' \ + -e 's/ html//' \ + Makefile || die + fi +} + +multilib_src_test() { + if ! multilib_is_native_abi ; then + emake -C tools + fi + emake check +} + +multilib_src_install_all() { + prune_libtool_files --all + rm -f "${ED}"/usr/share/doc/${PF}/{COPYRIGHT,README*,RELEASE-DATE,TODO,VERSION} +} -- cgit v1.2.3