diff options
Diffstat (limited to 'media-libs/openexr')
16 files changed, 1337 insertions, 0 deletions
diff --git a/media-libs/openexr/Manifest b/media-libs/openexr/Manifest new file mode 100644 index 000000000000..de04e241b919 --- /dev/null +++ b/media-libs/openexr/Manifest @@ -0,0 +1,21 @@ +AUX openexr-1.7.0-gcc43.patch 235 SHA256 0a6399c2a78396847eefc718a08cc6cc34f3b0db1531b1e424b5f6627562de07 SHA512 a19adcf1a8dec253f8577f5905775ea56dc5d2de4edc454a71ec86fda8cadd10a31e473db2341a203ee49b22c5bb06d75b010077ad44766cdbaa9f56b5f6859c WHIRLPOOL e883cde38249a4662aa2e2cbbfd7ce86afe9b9950535c79319dc5a12652199cd269ac72c9f4788c6f755bc0f1806fab774d96f12a253b5e30ba41aa2febab177 +AUX openexr-2.2.0-CVE-2017-9110-to-9116-security-fixes.patch 2871 SHA256 a98a7bf2a849a9ccfb860fea9c7ea3ac48dfa03cc25c6b6873248349f14c9795 SHA512 c24365be8c645586efacbd8983a7ccaebb1452afd0fbb45b0e12e77e1442b2d27e19bf155745eeb05b214831f7c081c1f5967d7502bc13c4b53e01ea0e0b9e65 WHIRLPOOL f7d93a8c62df4a611f5409827b192a5921c84be8c54a8e3e30ebf04218dc9fd0b50cf224bf0d1f12d1fbef422e8690d2efd725a7c26f9250814abe8987734186 +AUX openexr-2.2.0-Fix-typo-in-C-bindings.patch 649 SHA256 8aedc01b273f0eae0bf45f7f6d0f399e4268f1c3b66ae782b21af910c0abeb6f SHA512 17ce63c9ad2c39606af83886db34fec3baafe2f9816dd2f6f0189e3caab0015910f89f8eb261a49d8ccb495d36b268b148ce09e2172a7b516b4832fdc8e84fea WHIRLPOOL df83e09fccddf952253bb94b362ded5296dc05320448e7f4e0679afdf4296f2403583218522935616d0025785c6e9cf0d14710428d34e56bbdc1f6bd8feaa80a +AUX openexr-2.2.0-Install-missing-header-files.patch 1929 SHA256 97289acfb28536daaf040b027a16f1ff05a42c7e4ad1b9d0839a762930500cb7 SHA512 b6d1bb5a37bdf2283da8f45b71f3a8830a96437f2459746c5d354cecaaceee5e35ba3e3cf247e3c5c6f7930490233672542d8f7aaa59b79593d209e66eac8421 WHIRLPOOL 21da4b4d9137c0bf8639c10f349b16edc8fa8d5c30077dd6f834dec0d163952c2951b682ff3ab8c757ebd34e4a818ab6dbb0d036084c72b5d207da2533332ef6 +AUX openexr-2.2.0-fix-build-system.patch 17897 SHA256 9c91340fa151e2cd2925704fe1cc77daf3d71bab939c0cddcb8f4fdd9e20900f SHA512 a8864b4c51e8664c06c7c1a1b2900626fb8dbccdb70ec144b895b373e8ea836dc7f5048a72a2cb0c6ae04e040796e49f977e25f7f2a52d6a3469166433bc2bb4 WHIRLPOOL b4b02e127cf3bc492ccec44da63cbbacbfaab3abceff7d29381eb1f95f4801a140b862573e40ff1647d054a69f5a79b46897c631d4bf54618a8b8b8e02235bb6 +AUX openexr-2.2.0-fix-config.h-collision.patch 1556 SHA256 0c229cbd326f5ea9ce51e7612c0e0958d66856ab578e2e05f868c78704138e44 SHA512 15d654f9e1546ea32a6175b1cce24ed9d979afe7dd763ca53a17c1020ca8851c31cc3b8fc0e4ef31722ead91557e24a67958ca9ee5fd0fa4e574304c3153be33 WHIRLPOOL 8a162c976feb0b69c813190f75002b0cd2b48d1fc6efbb53c68337ffa30d260a88d8b8d15e0a5d54f8d5bf223e15305f1574545e45e842cdf1ad7adebc39512d +AUX openexr-2.2.0-fix-cpuid-on-abi_x86_32.patch 2536 SHA256 670b182a22070fb010027e4246320545d03ad61973d7c3f3f3426166bd6a98ea SHA512 530088a51d97039e951055361526b8afa2c322351971d26302d21ddd6fdf2d21682df0577872be608b8cd0c3d3fc05792d871e7c724546be42bfa439e74bb726 WHIRLPOOL 6f25d821474b59100fbb0b800e040a3d3858ee46f6cf2a434fdb3a8249f966f27eada58c97e7af4a03d6605727979e4633f71f7e25f98971f4bbcfce13ffef30 +AUX openexr-2.2.0-use-ull-for-64-bit-literals.patch 1934 SHA256 e227ea85ba5aacdb0a08b434ba6e9549a46a1066e9abc1f57f2b4c1301a37bcb SHA512 b799c5924bf8dba468236f4d43feab8ca7d8a88444595f2355671337f38d2868957d1372385000c36ed7ae74499925060d402ef9a82a352ea85dc7378cde21e2 WHIRLPOOL 30ebc08c6e011d67b1a9bbffc3f2d114e72688990a654d8f68fd41ebfce93d3dca33cc1b66f9bb2cf8b006b7bc11cd73a7a05a1787aebd78e3af89618ca670b9 +DIST openexr-1.7.0.tar.gz 13542910 SHA256 b68a2164d01bd028d15bd96af2704634a344e291dc7cc2019a662045d8c52ca4 SHA512 1fb033f909961a9778b762241e09946d19c7e75bbade7b5a942bb159eec3af9200afd722c3170165ad4b1fa602d9dbe6938112aad1716e7c7e6b8c37ee3980e0 WHIRLPOOL 2519ab03da10034f185494fe0a9f0a3cbcc6bbac44b51491448d6e389740bbde8148103183317a48735e1d04f51981ba796505be1f50f5aad10fb651f7c724d8 +DIST openexr-2.0.1.tar.gz 12609335 SHA256 b9924d2f9d57376ff99234209231ad97a47f5cfebd18a5d0570db6d1a220685a SHA512 b35e3e795496f9d4a56352c907bcffef14ae062b189c4e1df35f3ab08c5e9abf829fa9149db3198d60088fa9633816650011e5f7871e07324801b95549d6695b WHIRLPOOL 6e07792d197c8b116653bb47b0514ae23e3e33d81b76b78932b224c5422c3821d8edb72d09567cd18e5e8b0204d3f15a2574daf03836839ed7dddea23cfb79cb +DIST openexr-2.1.0.tar.gz 13680816 SHA256 54486b454073c1dcb5ae9892cf0f730ffefe62f38176325281505093fd218a14 SHA512 d69924331c3392b8063229391414bb90f16ce317c76cfffe5fe0fcbb25e576f6ace8320b51c2a9987fee912cedd8e69116d4b49ba716b4a5f011131a81815403 WHIRLPOOL 45d73a57dc933a4398f52b4b04a417aca5fba482c04ecd312a6cedd5af6d5991b3d68b90e0f86bb7053ed021ffa09146bb2e33258b991e039f17ecef07ad1a32 +DIST openexr-2.2.0.tar.gz 14489661 SHA256 36a012f6c43213f840ce29a8b182700f6cf6b214bea0d5735594136b44914231 SHA512 017abbeeb6b814508180721bc8e8940094965c4c55b135a198c6bcb109a04bf7f72e4aee81ee72cb2185fe818a41d892b383e8d2d59f40c673198948cb79279a WHIRLPOOL 42828db61abb629d64e765e0ae9a049ad601737e932334974ae1ddc6e7325d35a817eaa1e590a9179c71d092542570be60d26ab750c9ac9078b02e85697f5b29 +EBUILD openexr-1.7.0.ebuild 1181 SHA256 12563e89ca1cd695cf56e4f6079e8cd650ba42838b1237f6089939cf4ca0ceee SHA512 69d3ec9b799f7b5c09d5d9df76a234929334a2ca9ea95dc2903b62475b53e5ebe8ed06615c59f0a79885eb18311c4b042d3ff8c384a618a9fae3029e6e91ca34 WHIRLPOOL 509d2bca77f6854ffbfcafd0aa294d56d1b5bd45010fb2194bb5d5e3a8fed5de3481276a9f2033d7ce33b0a795d2b1d7b49219fd8c498ba68a429c987fed2b05 +EBUILD openexr-2.0.1-r1.ebuild 1255 SHA256 1c032cfbc6e1470dd760db141409b5e09de867b9d71b8d721c18dadf624e7dc6 SHA512 e46119eb545d174f1565746600df038e0028340f59f7670e1c0975a9b7a4c4a266a80970dccba054041b0bad31a98763b8aa5d4b9db32f83e65679e3fb0bab83 WHIRLPOOL 5e82ad58b1b8dc97fe980cdee232817f8065795720aba71c4c4da057c9c5471c81fd6d8d9886576fb15dae0744e918e71ce1a47e6359b47e5e53c9020bcc5cb8 +EBUILD openexr-2.1.0.ebuild 1256 SHA256 a10eb772ff7b21a0021743a0e6776f8eef5ba016b2652c3b8b7ac01eab45fb84 SHA512 c5a8158b4ebb432479f7edfb39b41d3742d0bcd3cca4782dac1bfa1b4aaa6191355dc0a4b2a5c643874c19829c2118052ef1841975b6f7c97ee23542dd3063fd WHIRLPOOL 35073e76d2c713e82fc646f0e3984dda276a1beb6e49fb1f12e11bd4555915318bd144cebb208cbbc1e598c3c3182a5f51ba4dc013e12f8c98c36950b68dca1f +EBUILD openexr-2.2.0-r1.ebuild 1578 SHA256 ffb8d64e28e71c2ae3d1b9b11cec5feb01e6a41d6609967fefc17aa7769a05f0 SHA512 830f0c476b53b59bec9e65e0859c1623425a0b3a5bdd5081c1cf62be9f274b452c373e8ed2e7b4d6b92d8a20c9f477bdac9a80f604d3d8866ccdfac3a924849c WHIRLPOOL 10f90df616f29b3983b9c7d05b813adcc5a1b0779212e7669c295b17bd013956723b8fbb91d320d5e1227315c254643a3cd3336ca26d1315a7dc7b94145c7b3c +EBUILD openexr-2.2.0-r2.ebuild 1770 SHA256 f75e80b5aa51607e96393e1cf1f2550004d9d017cf3550bf88b700c6ebf89af2 SHA512 a74a69aa8f1042c9020b43f9614e9a8621889cca28e5c4caf2f83d4ce9974342381df00f7fd669155aaeceb02462b8a1ce5f518ad01cdbf2da451aa0c7b83a65 WHIRLPOOL 90ff91c93e7bfca4c687c928ccdbc82268fd0f7ff2dd3b44736525170c76a04ecc65063042927a9820388aefaf3c377ef575f5e1b710f77523d1153acdcb1e20 +EBUILD openexr-2.2.0.ebuild 1248 SHA256 7d7de47eead41961eaa975d9ed31112b1decb1f2fcdb5e44b7ddee2575dedcc5 SHA512 1af7a2a6c95ddd32b1688495b65954982974fa5cb3c0374ee16d6f89f049191a14a7e79fd6fdbefc8cf25ba67e0450e684015798325f2258982528909ee2ed9d WHIRLPOOL 54b9b32253b43a9ba4fa3c3fe579798159c7dfc4bd5ff5d4ffc3e1e01c1d923b8187aadd3452952937964b3a554e5af5458cf328bd3f13337a8117d4b20e3470 +MISC ChangeLog 3486 SHA256 f1d464533a1276eb95e5cae9ba0d8be615e1472cea9b486c37e89b4df90e5fe2 SHA512 313951c7e5cd5699f17f2120323ca462b67225464099aa288e2a0af247fe6cb0c9a46678c814d472b6d088a14a0915acc8315fb4f86017b4cd4849ebd3edad54 WHIRLPOOL c5383b525758f7c3d8200a6385e0bfa5280b64f6d931c486b8512ea1b40dd3998cd3d45dc125d7445ff54176a2edde214aeef24e2d46eba5349fc94e2231ec44 +MISC ChangeLog-2015 13323 SHA256 713c208c19a5a8c26b1b2b9f0a8d7544ab8cafbc5a95f8487fe53cdc83a33228 SHA512 c1c0c2afdde4a2b17c57030e2d9b642c388075e1a7bddb1f9ff1933f814d7255fddba5bac52fcbc4b2d3c8f35e81cedd2e0dbe5bf45ff99b75ed9aeb94d4a502 WHIRLPOOL 70353ff12a26f2cd285e07848c3ac0155ea78085cf12afcdefe0204dbfde3b9c45298041a7e08496f7e592ac808fe6063d9bf4f067fed2a5af58b76fb954d8be +MISC metadata.xml 303 SHA256 42984153ef0dfe81bbaef220c049f37b76c90405fa9e0ca61975b602e15ba815 SHA512 0ab8d735dd7a8e0dc96b14cfde1ae06969d15cfbad956f4fda60b093660aee38fe98709376eedc9362a26858678d2f28eec795c1accb2560858fd804a11bb7ca WHIRLPOOL 9860638948335d44056f90be083f584a0e6f58b261cdbcbb791f049acfbb2c905ff3a313bdc30e26c79d3080b76dababa327470e20f572e21b31d7ea3464e885 diff --git a/media-libs/openexr/files/openexr-1.7.0-gcc43.patch b/media-libs/openexr/files/openexr-1.7.0-gcc43.patch new file mode 100644 index 000000000000..ab99eb9a19fb --- /dev/null +++ b/media-libs/openexr/files/openexr-1.7.0-gcc43.patch @@ -0,0 +1,11 @@ +--- exrenvmap/blurImage.cpp ++++ exrenvmap/blurImage.cpp +@@ -39,6 +39,8 @@ + // + //----------------------------------------------------------------------------- + ++#include <cstring> ++ + #include <blurImage.h> + + #include <resizeImage.h> diff --git a/media-libs/openexr/files/openexr-2.2.0-CVE-2017-9110-to-9116-security-fixes.patch b/media-libs/openexr/files/openexr-2.2.0-CVE-2017-9110-to-9116-security-fixes.patch new file mode 100644 index 000000000000..0a37ee9c2d99 --- /dev/null +++ b/media-libs/openexr/files/openexr-2.2.0-CVE-2017-9110-to-9116-security-fixes.patch @@ -0,0 +1,98 @@ +From c2b32f21cbe2db7c7ef485d62ffe9bec8eaa5165 Mon Sep 17 00:00:00 2001 +From: Shawn Walker-Salas <shawn.walker@oracle.com> +Date: Tue, 30 May 2017 19:07:52 -0700 +Subject: [PATCH] CVE-2017-{9110,9111,9112,9113,9114,9115,9116} fixes + +--- + OpenEXR/IlmImf/ImfDwaCompressor.cpp | 7 ++++++- + OpenEXR/IlmImf/ImfHuf.cpp | 10 ++++++---- + OpenEXR/IlmImf/ImfPizCompressor.cpp | 6 ++++++ + 3 files changed, 18 insertions(+), 5 deletions(-) + +diff --git a/IlmImf/ImfDwaCompressor.cpp b/IlmImf/ImfDwaCompressor.cpp +index 1c1bd45..2ef8878 100644 +--- a/IlmImf/ImfDwaCompressor.cpp ++++ b/IlmImf/ImfDwaCompressor.cpp +@@ -2377,7 +2377,12 @@ DwaCompressor::uncompress + + const char *dataPtr = inPtr + NUM_SIZES_SINGLE * sizeof(Int64); + +- if (inSize < headerSize + compressedSize) ++ /* Both the sum and individual sizes are checked in case of overflow. */ ++ if (inSize < (headerSize + compressedSize) || ++ inSize < unknownCompressedSize || ++ inSize < acCompressedSize || ++ inSize < dcCompressedSize || ++ inSize < rleCompressedSize) + { + throw Iex::InputExc("Error uncompressing DWA data" + "(truncated file)."); +diff --git a/IlmImf/ImfHuf.cpp b/IlmImf/ImfHuf.cpp +index a375d05..97909a5 100644 +--- a/IlmImf/ImfHuf.cpp ++++ b/IlmImf/ImfHuf.cpp +@@ -822,7 +822,7 @@ hufEncode // return: output size (in bits) + } + + +-#define getCode(po, rlc, c, lc, in, out, oe) \ ++#define getCode(po, rlc, c, lc, in, out, ob, oe)\ + { \ + if (po == rlc) \ + { \ +@@ -835,6 +835,8 @@ hufEncode // return: output size (in bits) + \ + if (out + cs > oe) \ + tooMuchData(); \ ++ else if (out - 1 < ob) \ ++ notEnoughData(); \ + \ + unsigned short s = out[-1]; \ + \ +@@ -895,7 +897,7 @@ hufDecode + // + + lc -= pl.len; +- getCode (pl.lit, rlc, c, lc, in, out, oe); ++ getCode (pl.lit, rlc, c, lc, in, out, outb, oe); + } + else + { +@@ -925,7 +927,7 @@ hufDecode + // + + lc -= l; +- getCode (pl.p[j], rlc, c, lc, in, out, oe); ++ getCode (pl.p[j], rlc, c, lc, in, out, outb, oe); + break; + } + } +@@ -952,7 +954,7 @@ hufDecode + if (pl.len) + { + lc -= pl.len; +- getCode (pl.lit, rlc, c, lc, in, out, oe); ++ getCode (pl.lit, rlc, c, lc, in, out, outb, oe); + } + else + { +diff --git a/IlmImf/ImfPizCompressor.cpp b/IlmImf/ImfPizCompressor.cpp +index 46c6fba..8b3ee38 100644 +--- a/IlmImf/ImfPizCompressor.cpp ++++ b/IlmImf/ImfPizCompressor.cpp +@@ -573,6 +573,12 @@ PizCompressor::uncompress (const char *inPtr, + int length; + Xdr::read <CharPtrIO> (inPtr, length); + ++ if (length > inSize) ++ { ++ throw InputExc ("Error in header for PIZ-compressed data " ++ "(invalid array length)."); ++ } ++ + hufUncompress (inPtr, length, _tmpBuffer, tmpBufferEnd - _tmpBuffer); + + // +-- +2.14.1 + diff --git a/media-libs/openexr/files/openexr-2.2.0-Fix-typo-in-C-bindings.patch b/media-libs/openexr/files/openexr-2.2.0-Fix-typo-in-C-bindings.patch new file mode 100644 index 000000000000..966e95e72c3c --- /dev/null +++ b/media-libs/openexr/files/openexr-2.2.0-Fix-typo-in-C-bindings.patch @@ -0,0 +1,26 @@ +From c229dfe63380f41dfae1e977b10dfc7c49c7efc7 Mon Sep 17 00:00:00 2001 +From: Edward Kmett <ekmett@gmail.com> +Date: Wed, 9 Dec 2015 12:15:48 -0500 +Subject: [PATCH] Fix typo in C bindings (Close #140) + +IMF_RAMDOM_Y should be IMF_RANDOM_Y +--- + OpenEXR/IlmImf/ImfCRgbaFile.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/IlmImf/ImfCRgbaFile.h b/IlmImf/ImfCRgbaFile.h +index 5ac2bf8..db58247 100644 +--- a/IlmImf/ImfCRgbaFile.h ++++ b/IlmImf/ImfCRgbaFile.h +@@ -98,7 +98,7 @@ typedef struct ImfRgba ImfRgba; + + #define IMF_INCREASING_Y 0 + #define IMF_DECREASING_Y 1 +-#define IMF_RAMDOM_Y 2 ++#define IMF_RANDOM_Y 2 + + + /* +-- +2.14.1 + diff --git a/media-libs/openexr/files/openexr-2.2.0-Install-missing-header-files.patch b/media-libs/openexr/files/openexr-2.2.0-Install-missing-header-files.patch new file mode 100644 index 000000000000..1075cd9a30fa --- /dev/null +++ b/media-libs/openexr/files/openexr-2.2.0-Install-missing-header-files.patch @@ -0,0 +1,60 @@ +From a018f82655402421a995565dd4a5192259cbc207 Mon Sep 17 00:00:00 2001 +From: Jonathan Scruggs <j.scruggs@gmail.com> +Date: Sat, 23 Sep 2017 10:36:40 +0100 +Subject: [PATCH] OpenEXR: Install missing header files + +Some header files are not installed via Autotools, but are with +CMake which breaks compatibility with certain programs. This patch +enables Autotools to install these header files. + +Signed-off by: Jonathan Scruggs <j.scruggs@gmail.com> +--- + OpenEXR/IlmImf/Makefile.am | 3 ++- + OpenEXR/IlmImfUtil/Makefile.am | 17 +++++++++++++++++ + 2 files changed, 19 insertions(+), 1 deletion(-) + +diff --git a/IlmImf/Makefile.am b/IlmImf/Makefile.am +index a7c219c..b7b96ac 100644 +--- a/IlmImf/Makefile.am ++++ b/IlmImf/Makefile.am +@@ -162,7 +162,8 @@ libIlmImfinclude_HEADERS = ImfForward.h ImfAttribute.h ImfBoxAttribute.h \ + ImfMisc.h \ + ImfPartHelper.h \ + ImfDeepImageState.h \ +- ImfDeepImageStateAttribute.h ++ ImfDeepImageStateAttribute.h \ ++ ImfFloatVectorAttribute.h + + noinst_HEADERS = ImfCompressor.h \ + ImfRleCompressor.h \ +diff --git a/IlmImfUtil/Makefile.am b/IlmImfUtil/Makefile.am +index 8005ee1..e1d3674 100644 +--- a/IlmImfUtil/Makefile.am ++++ b/IlmImfUtil/Makefile.am +@@ -33,6 +33,23 @@ libIlmImfUtil_la_LIBADD = -L$(top_builddir)/IlmImf $(ILMBASE_LIBS) -lIlmImf + + libIlmImfUtilincludedir = $(includedir)/OpenEXR + ++libIlmImfUtilinclude_HEADERS = ImfFlatImage.h \ ++ ImfDeepImage.h \ ++ ImfDeepImageChannel.h \ ++ ImfImageLevel.h \ ++ ImfDeepImageLevel.h \ ++ ImfDeepImageIO.h \ ++ ImfImageChannelRenaming.h \ ++ ImfImageIO.h \ ++ ImfFlatImageChannel.h \ ++ ImfImage.h \ ++ ImfFlatImageLevel.h \ ++ ImfImageDataWindow.h \ ++ ImfSampleCountChannel.h \ ++ ImfFlatImageIO.h \ ++ ImfImageChannel.h ++ ++ + EXTRA_DIST = CMakeLists.txt + + INCLUDES = \ +-- +2.14.1 + diff --git a/media-libs/openexr/files/openexr-2.2.0-fix-build-system.patch b/media-libs/openexr/files/openexr-2.2.0-fix-build-system.patch new file mode 100644 index 000000000000..3ccfb1da7ac5 --- /dev/null +++ b/media-libs/openexr/files/openexr-2.2.0-fix-build-system.patch @@ -0,0 +1,620 @@ +* Fix completely broken build system +* Change pdf+examples installation directory + +--- a/configure.ac ++++ b/configure.ac +@@ -1,6 +1,7 @@ + dnl Process this file with autoconf to produce a configure script. + + AC_INIT(OpenEXR, 2.2.0) ++AC_CONFIG_MACRO_DIR([m4]) + + AC_SUBST(OPENEXR_VERSION_MAJOR, 2) + AC_SUBST(OPENEXR_VERSION_MINOR, 2) +@@ -11,9 +12,8 @@ + + AC_CANONICAL_HOST + AC_CONFIG_SRCDIR(IlmImfTest/main.cpp) +-AC_CONFIG_HEADER(config/OpenEXRConfig.h) +-AM_INIT_AUTOMAKE(1.6.3) dnl Require automake 1.6.3 or better +-AM_MAINTAINER_MODE ++AC_CONFIG_HEADERS([config/OpenEXRConfig.h]) ++AM_INIT_AUTOMAKE + + + LIBTOOL_CURRENT=22 +@@ -27,46 +27,21 @@ + AC_PROG_INSTALL + AC_PROG_CC + AC_PROG_LN_S +-AC_PROG_LIBTOOL ++LT_INIT + AC_PROG_MAKE_SET + + dnl + dnl PKGCONFIG preparations + dnl +- +-if test -z "${PKG_CONFIG_PATH}"; then +- PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig +-fi +- +-LIB64_IF_EXISTS="" +-if [[ -e /usr/lib64 ]]; then +- LIB64_IF_EXISTS="-L/usr/lib64" +-fi +- +- +- +-export PKG_CONFIG_PATH +- +-dnl +-dnl get ccflags and libs from openexr packages, then check +-dnl whether test programs compile +-AM_PATH_PKGCONFIG( +- [ILMBASE_CXXFLAGS], +- [ILMBASE_LDFLAGS], +- [ILMBASE_LIBS], +- [IlmBase], +- [OpenEXR], +- [$LIB64_IF_EXISTS -L/usr/local/lib], +- [-lImath -lHalf -lIex -lIlmThread -lpthread], +- [ilmbase-prefix]) ++PKG_CHECK_MODULES([ILMBASE], [IlmBase]) + + + dnl Define the version string +-AC_DEFINE_UNQUOTED(OPENEXR_VERSION_STRING, "${VERSION}") +-AC_DEFINE_UNQUOTED(OPENEXR_PACKAGE_STRING, "${PACKAGE_STRING}") +-AC_DEFINE_UNQUOTED(OPENEXR_VERSION_MAJOR, ${OPENEXR_VERSION_MAJOR}) +-AC_DEFINE_UNQUOTED(OPENEXR_VERSION_MINOR, ${OPENEXR_VERSION_MINOR}) +-AC_DEFINE_UNQUOTED(OPENEXR_VERSION_PATCH, ${OPENEXR_VERSION_PATCH}) ++AC_DEFINE_UNQUOTED([OPENEXR_VERSION_STRING], ["${VERSION}"], [OpenEXR version string]) ++AC_DEFINE_UNQUOTED([OPENEXR_PACKAGE_STRING], ["${PACKAGE_STRING}"], [OpenEXR version string]) ++AC_DEFINE_UNQUOTED([OPENEXR_VERSION_MAJOR], [${OPENEXR_VERSION_MAJOR}], [OpenEXR version string]) ++AC_DEFINE_UNQUOTED([OPENEXR_VERSION_MINOR], [${OPENEXR_VERSION_MINOR}], [OpenEXR version string]) ++AC_DEFINE_UNQUOTED([OPENEXR_VERSION_PATCH], [${OPENEXR_VERSION_PATCH}], [OpenEXR version string]) + + + dnl --enable-threading +@@ -75,19 +50,16 @@ + [enable multi-threading [[default=yes]]]), + [multithread="${enableval}"], [multithread=yes]) + +-if test x$PKG_CONFIG == xno && test "x${multithread}" != xno ; then +- ACX_PTHREAD( +- [ +- AC_DEFINE(OPENEXR_IMF_HAVE_PTHREAD) +- ILMBASE_LIBS="$PTHREAD_LIBS $ILMBASE_LIBS" +- ILMBASE_CXXFLAGS="$ILMBASE_CXXFLAGS $PTHREAD_CFLAGS" +- CC="$PTHREAD_CC" +- +- AM_POSIX_SEM() +- ], +- [AC_MSG_ERROR([POSIX thread support required])]) +- AC_MSG_NOTICE([multithread true, LIBS = $LIBS, CC = $CC, CXXFLAGS = $CXXFLAGS]) +-fi ++AS_IF([test "x${multithread}" != xno], [ ++ AX_PTHREAD ++ ++ AC_DEFINE([OPENEXR_IMF_HAVE_PTHREAD], [1], [Define if pthreads are available]) ++ ++ CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" ++ CXXFLAGS="${CXXFLAGS} ${PTHREAD_CFLAGS}" ++ LIBS="${LIBS} ${PTHREAD_CFLAGS}" ++]) ++ + + dnl --enable-large-stack + case "$host" in +@@ -110,21 +82,25 @@ + esac + + if test "x${large_stack}" != xno ; then +- AC_DEFINE(OPENEXR_IMF_HAVE_LARGE_STACK) ++ AC_DEFINE([OPENEXR_IMF_HAVE_LARGE_STACK], [1], [Define if large stack sizes are supported]) + fi + +-AM_COMPILELINKRUN( +- [IlmBase], +- [ilmbasetest], +- [$ILMBASE_CXXFLAGS], +- [$ILMBASE_LDFLAGS], +- [$ILMBASE_LIBS],[[ +-#include <stdlib.h> +-#include <ImathFun.h> +-]], +- [[double d = IMATH_NAMESPACE::succd(.23); d+= .2;]], +- AC_MSG_RESULT([Compiled and ran IlmBase test program.]), +- AC_MSG_ERROR([Could not compile IlmBase test program.])) ++ ++ ++save_CXXFLAGS="${CXXFLAGS}" ++save_LIBS="${LIBS}" ++CXXFLAGS="${save_CXXFLAGS} ${ILMBASE_CFLAGS}" ++LIBS="${save_LIBS} ${ILMBASE_LIBS}" ++AC_LINK_IFELSE([ ++ AC_LANG_PROGRAM([[ ++ #include <stdlib.h> ++ #include <ImathFun.h> ++ ]], [[ ++ double d = IMATH_NAMESPACE::succd(.23); d+= .2; ++ ]]) ++]) ++CXXFLAGS="${save_CXXFLAGS}" ++LIBS="${save_LIBS}" + + + dnl Checks for header files. +@@ -137,74 +113,27 @@ + AC_TYPE_SIZE_T + + dnl Checks for zlib +-AC_CHECK_LIB(z, compress, +- [:], +- [AC_MSG_ERROR([ +-*** OpenEXR requires a recent version of zlib, which you don't appear to +-*** have. +-*** +-*** This could be because the run-time linker is not finding zlib, or it +-*** is finding the wrong version. In this case, you'll need to set your +-*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point +-*** to the proper version. Also, make sure you have run ldconfig if +-*** that is required on your system. +- ])] +-) ++PKG_CHECK_MODULES([ZLIB], [zlib]) ++ ++ ++dnl We use a modern toolchain, don't care ++dnl about ancient broken stuff ++AC_DEFINE([OPENEXR_IMF_HAVE_COMPLETE_IOMANIP], [1], [Define when std::right is available]) + +-dnl Checks for std::right etc. in iomanip +-AC_MSG_CHECKING(for complete iomanip support in C++ standard library) +-complete_iomanip="no" +-AC_LANG_SAVE +-AC_LANG_CPLUSPLUS +-AC_TRY_COMPILE([#include <iomanip>],[ +- +- std::right; +-], +-AC_DEFINE(OPENEXR_IMF_HAVE_COMPLETE_IOMANIP) complete_iomanip=yes) +-AC_MSG_RESULT($complete_iomanip) +-AC_LANG_RESTORE +- +- +-AC_MSG_CHECKING(for gcc optimization flags) +-old_cflags=$CFLAGS +-CFLAGS="$CFLAGS -pipe" +-AC_TRY_COMPILE([#include <stdio.h>], +-[ printf ("hello, world"); ], +-[ EXTRA_OPT_CFLAGS="-pipe"],[ EXTRA_OPT_CFLAGS=""]) +-CFLAGS=$old_cflags +-AC_MSG_RESULT([$EXTRA_OPT_CFLAGS]) + + dnl Check to see if the toolset supports AVX instructions in inline asm +-AC_MSG_CHECKING(for AVX instructions in GCC style inline asm) +-gcc_inline_asm_avx="no" +-AC_COMPILE_IFELSE( +- [ +- AC_LANG_PROGRAM([], +- [ +- #if defined(__GNUC__) && defined(__SSE2__) +- int n = 0; +- int eax = 0; +- int edx = 0; +- __asm__( +- "xgetbv \n" +- "vzeroupper " +- : "=a"(eax), "=d"(edx) : "c"(n) : ); +- #else +- #error No GCC style inline asm supported for AVX instructions +- #endif +- ]) +- ], +- [ +- gcc_inline_asm_avx="yes" +- ], +- [ +- gcc_inline_asm_avx="no" +- ] +-) +-AC_MSG_RESULT([$gcc_inline_asm_avx]) +-if test "x${gcc_inline_asm_avx}" == xyes ; then +- AC_DEFINE(OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX) +-fi ++AC_ARG_ENABLE([avx], ++ AS_HELP_STRING([--enable-avx], [Enable avx optimization])) ++ ++AS_IF([test "x$enable_avx" = "xyes"], [ ++ dnl Enable AVX ++ gcc_inline_asm_avx="yes" ++ AC_DEFINE([OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX], [1], [Define if AVX is available]) ++], [ ++ dnl Disable AVX ++ gcc_inline_asm_avx="no" ++]) ++ + + dnl Check if sysconf(_SC_NPROCESSORS_ONLN) can be used for CPU count + AC_MSG_CHECKING([for sysconf(_SC_NPROCESSORS_ONLN)]) +@@ -221,16 +150,16 @@ + ) + AC_MSG_RESULT([$sysconf_nproc]) + if test "x${sysconf_nproc}" == xyes ; then +- AC_DEFINE(OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN) ++ AC_DEFINE([OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN], [1], [Define if sysconf(_SC_NPROCESSORS_ONLN) can be used for CPU count]) + fi + + dnl Platform-specific stuff + case "$host" in + *linux*) +- AC_DEFINE(OPENEXR_IMF_HAVE_LINUX_PROCFS) ++ AC_DEFINE([OPENEXR_IMF_HAVE_LINUX_PROCFS], [1], [Define if procfs is available]) + ;; + *darwin*) +- AC_DEFINE(OPENEXR_IMF_HAVE_DARWIN) ++ AC_DEFINE([OPENEXR_IMF_HAVE_DARWIN], [1], [Define if on Darwin]) + + dnl OS X universal binary support, requires --disable-dependency-tracking + AC_ARG_ENABLE(osx-universal-binaries, +@@ -245,19 +174,13 @@ + --disable-dependency-tracking --enable-osx-universal-binary + ]) + fi +- CXXFLAGS="$CXXFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" ++ dnl CXXFLAGS="$CXXFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" + dnl LDFLAGS="$LDFLAGS -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386" + fi + + ;; + esac + +-AM_CFLAGS="$EXTRA_OPT_CFLAGS" +-AM_CXXFLAGS="$EXTRA_OPT_CFLAGS" +- +-AC_SUBST(AM_CFLAGS) +-AC_SUBST(AM_CXXFLAGS) +- + dnl build imfexamples example program? + build_imfexamples="no" + AC_ARG_ENABLE(imfexamples, +@@ -286,7 +209,7 @@ + AM_CONDITIONAL(BUILD_IMFHUGETEST, test "x$build_imfhugetest" = xyes) + + if test "x${build_imfhugetest}" != xno ; then +- AC_DEFINE(OPENEXR_IMF_HUGETEST) ++ AC_DEFINE([OPENEXR_IMF_HUGETEST], [1], [Define if IlmImf huge input resilience]) + fi + + +@@ -307,19 +230,19 @@ + + lib_namespace="Imf" + if test "x${library_namespace_versioning}" == xyes ; then +- AC_DEFINE_UNQUOTED(OPENEXR_IMF_INTERNAL_NAMESPACE, Imf_${OPENEXR_VERSION_API}) +- AC_DEFINE(OPENEXR_IMF_INTERNAL_NAMESPACE_CUSTOM) ++ AC_DEFINE_UNQUOTED([OPENEXR_IMF_INTERNAL_NAMESPACE], [Imf_${OPENEXR_VERSION_API}], [OpenEXR]) ++ AC_DEFINE([OPENEXR_IMF_INTERNAL_NAMESPACE_CUSTOM], [1], [OpenEXR]) + + lib_namespace="Imf_${OPENEXR_VERSION_API}" + LIB_SUFFIX="${OPENEXR_VERSION_API}" + lib_suffix_valid="yes" + elif test "x${library_namespace_versioning}" == xno ; then +- AC_DEFINE_UNQUOTED(OPENEXR_IMF_INTERNAL_NAMESPACE, Imf) ++ AC_DEFINE_UNQUOTED([OPENEXR_IMF_INTERNAL_NAMESPACE], [Imf], [OpenEXR]) + + lib_namespace="Imf" + else +- AC_DEFINE_UNQUOTED(OPENEXR_IMF_INTERNAL_NAMESPACE, ${library_namespace_versioning} ) +- AC_DEFINE(OPENEXR_IMF_INTERNAL_NAMESPACE_CUSTOM) ++ AC_DEFINE_UNQUOTED([OPENEXR_IMF_INTERNAL_NAMESPACE], [${library_namespace_versioning}], [OpenEXR]) ++ AC_DEFINE([OPENEXR_IMF_INTERNAL_NAMESPACE_CUSTOM], [1], [OpenEXR]) + + lib_namespace="${library_namespace_versioning}" + LIB_SUFFIX="${library_namespace_versioning}" +@@ -349,14 +272,14 @@ + + if test "x${custom_usr_namespace}" == xyes ; then + AC_MSG_WARN([Enabling 'custom user namespace' requires an additional argument, reverting to 'Imf']) +- AC_DEFINE_UNQUOTED(OPENEXR_IMF_NAMESPACE, Imf) ++ AC_DEFINE_UNQUOTED([OPENEXR_IMF_NAMESPACE], [Imf], [OpenEXR]) + usr_namespace="Imf" + elif test "x${custom_usr_namespace}" == xno ; then +- AC_DEFINE_UNQUOTED(OPENEXR_IMF_NAMESPACE, Imf) ++ AC_DEFINE_UNQUOTED([OPENEXR_IMF_NAMESPACE], [Imf], [OpenEXR]) + usr_namespace="Imf" + else +- AC_DEFINE_UNQUOTED(OPENEXR_IMF_NAMESPACE, ${custom_usr_namespace}) +- AC_DEFINE(OPENEXR_IMF_NAMESPACE_CUSTOM) ++ AC_DEFINE_UNQUOTED([OPENEXR_IMF_NAMESPACE], [${custom_usr_namespace}], [OpenEXR]) ++ AC_DEFINE([OPENEXR_IMF_NAMESPACE_CUSTOM], [1], [OpenEXR]) + + usr_namespace=${custom_usr_namespace} + fi +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -6,5 +6,4 @@ + InterpretingDeepPixels.pdf \ + TheoryDeepPixels.pdf + +-docdir=$(datadir)/doc/OpenEXR-@OPENEXR_VERSION@ + doc_DATA = $(EXTRA_DIST) +--- a/exrenvmap/Makefile.am ++++ b/exrenvmap/Makefile.am +@@ -4,11 +4,11 @@ + + INCLUDES = -I$(top_builddir) \ + -I$(top_srcdir)/IlmImf -I$(top_srcdir)/config \ +- @ILMBASE_CXXFLAGS@ ++ $(ILMBASE_CFLAGS) $(ZLIB_CFLAGS) + +-LDADD = @ILMBASE_LDFLAGS@ @ILMBASE_LIBS@\ ++LDADD = $(ILMBASE_LIBS) \ + $(top_builddir)/IlmImf/libIlmImf.la \ +- -lz ++ $(ZLIB_LIBS) + + exrenvmap_SOURCES = main.cpp EnvmapImage.cpp EnvmapImage.h \ + readInputImage.cpp readInputImage.h \ +--- a/exrheader/Makefile.am ++++ b/exrheader/Makefile.am +@@ -4,11 +4,11 @@ + + INCLUDES = -I$(top_builddir) \ + -I$(top_srcdir)/IlmImf -I$(top_srcdir)/config \ +- @ILMBASE_CXXFLAGS@ ++ $(ILMBASE_CFLAGS) $(ZLIB_CFLAGS) + +-LDADD = @ILMBASE_LDFLAGS@ @ILMBASE_LIBS@ \ ++LDADD = $(ILMBASE_LIBS) \ + $(top_builddir)/IlmImf/libIlmImf.la \ +- -lz ++ $(ZLIB_LIBS) + + exrheader_SOURCES = main.cpp + +--- a/exrmakepreview/Makefile.am ++++ b/exrmakepreview/Makefile.am +@@ -4,11 +4,11 @@ + + INCLUDES = -I$(top_builddir) \ + -I$(top_srcdir)/IlmImf -I$(top_srcdir)/config \ +- @ILMBASE_CXXFLAGS@ ++ $(ILMBASE_CFLAGS) $(ZLIB_CFLAGS) + +-LDADD = @ILMBASE_LDFLAGS@ @ILMBASE_LIBS@\ ++LDADD = $(ILMBASE_LIBS) \ + $(top_builddir)/IlmImf/libIlmImf.la \ +- -lz ++ $(ZLIB_LIBS) + + exrmakepreview_SOURCES = main.cpp makePreview.cpp makePreview.h + +--- a/exrmaketiled/Makefile.am ++++ b/exrmaketiled/Makefile.am +@@ -4,11 +4,11 @@ + + INCLUDES = -I$(top_builddir) \ + -I$(top_srcdir)/IlmImf -I$(top_srcdir)/config \ +- @ILMBASE_CXXFLAGS@ ++ $(ILMBASE_CFLAGS) $(ZLIB_CFLAGS) + +-LDADD = @ILMBASE_LDFLAGS@ @ILMBASE_LIBS@ \ ++LDADD = $(ILMBASE_LIBS) \ + $(top_builddir)/IlmImf/libIlmImf.la \ +- -lz ++ $(ZLIB_LIBS) + + exrmaketiled_SOURCES = main.cpp \ + Image.h Image.cpp \ +--- a/exrmultipart/Makefile.am ++++ b/exrmultipart/Makefile.am +@@ -4,11 +4,11 @@ + + INCLUDES = -I$(top_builddir) \ + -I$(top_srcdir)/IlmImf -I$(top_srcdir)/config \ +-@ILMBASE_CXXFLAGS@ ++$(ILMBASE_CFLAGS) $(ZLIB_CFLAGS) + +-LDADD = @ILMBASE_LDFLAGS@ @ILMBASE_LIBS@ \ +-$(top_builddir)/IlmImf/libIlmImf.la \ +--lz ++LDADD = $(ILMBASE_LIBS) \ ++ $(top_builddir)/IlmImf/libIlmImf.la \ ++ $(ZLIB_LIBS) + + exrmultipart_SOURCES = exrmultipart.cpp + +--- a/exrmultiview/Makefile.am ++++ b/exrmultiview/Makefile.am +@@ -4,11 +4,11 @@ + + INCLUDES = -I$(top_builddir) \ + -I$(top_srcdir)/IlmImf -I$(top_srcdir)/config \ +- @ILMBASE_CXXFLAGS@ ++ $(ILMBASE_CFLAGS) $(ZLIB_CFLAGS) + +-LDADD = @ILMBASE_LDFLAGS@ @ILMBASE_LIBS@ \ ++LDADD = $(ILMBASE_LIBS) \ + $(top_builddir)/IlmImf/libIlmImf.la \ +- -lz ++ $(ZLIB_LIBS) + + exrmultiview_SOURCES = main.cpp \ + Image.h Image.cpp \ +--- a/exrstdattr/Makefile.am ++++ b/exrstdattr/Makefile.am +@@ -4,11 +4,11 @@ + + INCLUDES = -I$(top_builddir) \ + -I$(top_srcdir)/IlmImf -I$(top_srcdir)/config \ +- @ILMBASE_CXXFLAGS@ ++ $(ILMBASE_CFLAGS) $(ZLIB_CFLAGS) + +-LDADD = @ILMBASE_LDFLAGS@ @ILMBASE_LIBS@ \ ++LDADD = $(ILMBASE_LIBS) \ + $(top_builddir)/IlmImf/libIlmImf.la \ +- -lz ++ $(ZLIB_LIBS) + + exrstdattr_SOURCES = main.cpp CMakeLists.txt + +--- a/IlmImf/Makefile.am ++++ b/IlmImf/Makefile.am +@@ -93,7 +93,7 @@ + ImfSystemSpecific.cpp ImfZip.h ImfZip.cpp + + +-libIlmImf_la_LDFLAGS = @ILMBASE_LDFLAGS@ -version-info @LIBTOOL_VERSION@ \ ++libIlmImf_la_LDFLAGS = -version-info @LIBTOOL_VERSION@ \ + -no-undefined + + +@@ -102,7 +102,7 @@ + endif + + +-libIlmImf_la_LIBADD = -lz @ILMBASE_LIBS@ ++libIlmImf_la_LIBADD = $(ZLIB_LIBS) $(ILMBASE_LIBS) + + libIlmImfincludedir = $(includedir)/OpenEXR + +@@ -188,20 +188,21 @@ + EXTRA_DIST = $(noinst_HEADERS) b44ExpLogTable.cpp b44ExpLogTable.h dwaLookups.cpp dwaLookups.h CMakeLists.txt + + +-INCLUDES = @ILMBASE_CXXFLAGS@ \ +- -I$(top_builddir) \ +- -I$(top_srcdir)/config ++INCLUDES = \ ++ -I$(top_builddir) \ ++ -I$(top_srcdir)/config \ ++ $(ILMBASE_CFLAGS) $(ZLIB_CFLAGS) + + CLEANFILES = b44ExpLogTable b44ExpLogTable.h dwaLookups dwaLookups.h + + b44ExpLogTable_SOURCES = b44ExpLogTable.cpp +-b44ExpLogTable_LDADD = @ILMBASE_LDFLAGS@ @ILMBASE_LIBS@ ++b44ExpLogTable_LDADD = $(ILMBASE_LIBS) + + b44ExpLogTable.h: b44ExpLogTable + ./b44ExpLogTable > b44ExpLogTable.h + + dwaLookups_SOURCES = dwaLookups.cpp +-dwaLookups_LDADD = @ILMBASE_LDFLAGS@ @ILMBASE_LIBS@ ++dwaLookups_LDADD = $(ILMBASE_LIBS) + + dwaLookups.h: dwaLookups + ./dwaLookups > dwaLookups.h +--- a/IlmImfExamples/Makefile.am ++++ b/IlmImfExamples/Makefile.am +@@ -6,11 +6,11 @@ + + INCLUDES = -I$(top_builddir) \ + -I$(top_srcdir)/IlmImf -I$(top_srcdir)/config \ +- @ILMBASE_CXXFLAGS@ ++ $(ILMBASE_CFLAGS) $(ZLIB_CFLAGS) + + LDADD = -L$(top_builddir)/IlmImf \ +- @ILMBASE_LDFLAGS@ @ILMBASE_LIBS@ \ +- -lIlmImf -lz ++ $(ILMBASE_LIBS) \ ++ -lIlmImf $(ZLIB_CFLAGS) + + imfexamples_SOURCES = main.cpp drawImage.cpp rgbaInterfaceExamples.cpp \ + rgbaInterfaceTiledExamples.cpp \ +@@ -23,7 +23,7 @@ + lowLevelIoExamples.h previewImageExamples.h \ + namespaceAlias.h + +-examplesdir = $(datadir)/doc/OpenEXR-@OPENEXR_VERSION@/examples ++examplesdir = $(docdir)/examples + examples_DATA = $(imfexamples_SOURCES) + + imfexamplesdir = $(examplesdir) +--- a/IlmImfFuzzTest/Makefile.am ++++ b/IlmImfFuzzTest/Makefile.am +@@ -14,11 +14,11 @@ + INCLUDES = -I$(top_builddir) \ + -I$(top_srcdir)/IlmImf \ + -I$(top_srcdir)/config \ +- @ILMBASE_CXXFLAGS@ ++ $(ILMBASE_CFLAGS) $(ZLIB_CFLAGS) + + LDADD = -L$(top_builddir)/IlmImf \ +- @ILMBASE_LDFLAGS@ @ILMBASE_LIBS@ \ +- -lIlmImf -lz ++ $(ILMBASE_LIBS) \ ++ -lIlmImf $(ZLIB_LIBS) + + if BUILD_IMFFUZZTEST + TESTS = IlmImfFuzzTest +--- a/IlmImfTest/Makefile.am ++++ b/IlmImfTest/Makefile.am +@@ -62,11 +62,11 @@ + INCLUDES = -I$(top_builddir) \ + -I$(top_srcdir)/IlmImf \ + -I$(top_srcdir)/config \ +- @ILMBASE_CXXFLAGS@ ++ $(ILMBASE_CFLAGS) $(ZLIB_CFLAGS) + + LDADD = -L$(top_builddir)/IlmImf \ +- @ILMBASE_LDFLAGS@ @ILMBASE_LIBS@ \ +- -lIlmImf -lz ++ $(ILMBASE_LIBS) \ ++ -lIlmImf $(ZLIB_LIBS) + + TESTS = IlmImfTest + +--- a/IlmImfUtil/Makefile.am ++++ b/IlmImfUtil/Makefile.am +@@ -20,7 +20,7 @@ + ImfImageChannelRenaming.h + + +-libIlmImfUtil_la_LDFLAGS = @ILMBASE_LDFLAGS@ -version-info @LIBTOOL_VERSION@ \ ++libIlmImfUtil_la_LDFLAGS = -version-info @LIBTOOL_VERSION@ \ + -no-undefined + + +@@ -29,14 +29,15 @@ + endif + + +-libIlmImfUtil_la_LIBADD = -L$(top_builddir)/IlmImf @ILMBASE_LIBS@ -lIlmImf ++libIlmImfUtil_la_LIBADD = -L$(top_builddir)/IlmImf $(ILMBASE_LIBS) -lIlmImf + + libIlmImfUtilincludedir = $(includedir)/OpenEXR + + EXTRA_DIST = CMakeLists.txt + +-INCLUDES = @ILMBASE_CXXFLAGS@ \ +- -I$(top_builddir) \ +- -I$(top_srcdir)/IlmImf \ +- -I$(top_srcdir)/config ++INCLUDES = \ ++ -I$(top_builddir) \ ++ -I$(top_srcdir)/IlmImf \ ++ -I$(top_srcdir)/config \ ++ $(ILMBASE_CFLAGS) + +--- a/IlmImfUtilTest/Makefile.am ++++ b/IlmImfUtilTest/Makefile.am +@@ -11,12 +11,12 @@ + -I$(top_srcdir)/IlmImf \ + -I$(top_srcdir)/IlmImfUtil \ + -I$(top_srcdir)/config \ +- @ILMBASE_CXXFLAGS@ ++ $(ILMBASE_CFLAGS) $(ZLIB_CFLAGS) + + LDADD = -L$(top_builddir)/IlmImf \ + -L$(top_builddir)/IlmImfUtil \ +- @ILMBASE_LDFLAGS@ @ILMBASE_LIBS@ \ +- -lIlmImfUtil -lIlmImf -lz ++ $(ILMBASE_LIBS) \ ++ -lIlmImfUtil -lIlmImf $(ZLIB_LIBS) + + TESTS = IlmImfUtilTest + diff --git a/media-libs/openexr/files/openexr-2.2.0-fix-config.h-collision.patch b/media-libs/openexr/files/openexr-2.2.0-fix-config.h-collision.patch new file mode 100644 index 000000000000..53421194c2da --- /dev/null +++ b/media-libs/openexr/files/openexr-2.2.0-fix-config.h-collision.patch @@ -0,0 +1,43 @@ +Rename enum from VERSION to MYVERSION due to +collision with VERSION from autoheader. + +--- a/IlmImf/ImfDwaCompressor.cpp ++++ b/IlmImf/ImfDwaCompressor.cpp +@@ -1944,7 +1944,7 @@ + + #define OBIDX(x) (Int64 *)&_outBuffer[x * sizeof (Int64)] + +- Int64 *version = OBIDX (VERSION); ++ Int64 *version = OBIDX (MYVERSION); + Int64 *unknownUncompressedSize = OBIDX (UNKNOWN_UNCOMPRESSED_SIZE); + Int64 *unknownCompressedSize = OBIDX (UNKNOWN_COMPRESSED_SIZE); + Int64 *acCompressedSize = OBIDX (AC_COMPRESSED_SIZE); +@@ -2356,7 +2356,7 @@ + + const Int64 *inPtr64 = (const Int64*) inPtr; + +- Int64 version = *(inPtr64 + VERSION); ++ Int64 version = *(inPtr64 + MYVERSION); + Int64 unknownUncompressedSize = *(inPtr64 + UNKNOWN_UNCOMPRESSED_SIZE); + Int64 unknownCompressedSize = *(inPtr64 + UNKNOWN_COMPRESSED_SIZE); + Int64 acCompressedSize = *(inPtr64 + AC_COMPRESSED_SIZE); +@@ -3142,7 +3142,7 @@ + + + // +-// Setup channel classification rules when reading files with VERSION < 2 ++// Setup channel classification rules when reading files with MYVERSION < 2 + // + + void +--- a/IlmImf/ImfDwaCompressor.h ++++ b/IlmImf/ImfDwaCompressor.h +@@ -124,7 +124,7 @@ + + enum DataSizesSingle + { +- VERSION = 0, // Version number: ++ MYVERSION = 0, // Version number: + // 0: classic + // 1: adds "end of block" to the AC RLE + diff --git a/media-libs/openexr/files/openexr-2.2.0-fix-cpuid-on-abi_x86_32.patch b/media-libs/openexr/files/openexr-2.2.0-fix-cpuid-on-abi_x86_32.patch new file mode 100644 index 000000000000..1dc13c724074 --- /dev/null +++ b/media-libs/openexr/files/openexr-2.2.0-fix-cpuid-on-abi_x86_32.patch @@ -0,0 +1,75 @@ +$NetBSD: patch-IlmImf_ImfSystemSpecific.cpp,v 1.2 2014/08/19 13:34:42 joerg Exp $ + +Rework cpuid function to use gnuc __get_cpuid (requiring at least gcc 4.3) +This get's over issues such as encountered with PIC builds. +Upstream issue : https://github.com/openexr/openexr/issues/128 + +https://raw.githubusercontent.com/jsonn/pkgsrc/trunk/graphics/openexr/patches/patch-IlmImf_ImfSystemSpecific.cpp +https://github.com/jsonn/pkgsrc/commit/5158af44e65b6d7b9f1a8aca2eb24cb87d003724 +https://bugs.gentoo.org/show_bug.cgi?id=626760 + +--- a/IlmImf/ImfSystemSpecific.cpp.orig 2014-08-10 04:23:57.000000000 +0000 ++++ b/IlmImf/ImfSystemSpecific.cpp +@@ -40,21 +40,30 @@ OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_EN + + namespace { + #if defined(IMF_HAVE_SSE2) && defined(__GNUC__) +- + // Helper functions for gcc + SSE enabled +- void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx) ++ void cpuid(unsigned int n, unsigned int &eax, unsigned int &ebx, ++ unsigned int &ecx, unsigned int &edx) + { ++#ifdef __i386__ ++ __asm__ __volatile__ ( ++ "pushl %%ebx; cpuid; movl %%ebx, %0; popl %%ebx" ++ : /* Output */ "=m"(ebx), "=a"(eax), "=c"(ecx), "=d"(edx) ++ : /* Input */ "a"(n) ++ : /* Clobber */); ++#else + __asm__ __volatile__ ( + "cpuid" + : /* Output */ "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx) + : /* Input */ "a"(n) + : /* Clobber */); ++#endif + } + + #else // IMF_HAVE_SSE2 && __GNUC__ + + // Helper functions for generic compiler - all disabled +- void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx) ++ void cpuid(unsigned int n, unsigned int &eax, unsigned int &ebx, ++ unsigned int &ecx, unsigned int &edx) + { + eax = ebx = ecx = edx = 0; + } +@@ -64,7 +73,7 @@ namespace { + + #ifdef OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX + +- void xgetbv(int n, int &eax, int &edx) ++ void xgetbv(unsigned int n, unsigned int &eax, unsigned int &edx) + { + __asm__ __volatile__ ( + "xgetbv" +@@ -75,7 +84,7 @@ namespace { + + #else // OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX + +- void xgetbv(int n, int &eax, int &edx) ++ void xgetbv(unsigned int n, unsigned int &eax, unsigned int &edx) + { + eax = edx = 0; + } +@@ -94,8 +103,8 @@ CpuId::CpuId(): + f16c(false) + { + bool osxsave = false; +- int max = 0; +- int eax, ebx, ecx, edx; ++ unsigned int max = 0; ++ unsigned int eax, ebx, ecx, edx; + + cpuid(0, max, ebx, ecx, edx); + if (max > 0) diff --git a/media-libs/openexr/files/openexr-2.2.0-use-ull-for-64-bit-literals.patch b/media-libs/openexr/files/openexr-2.2.0-use-ull-for-64-bit-literals.patch new file mode 100644 index 000000000000..6b107af29927 --- /dev/null +++ b/media-libs/openexr/files/openexr-2.2.0-use-ull-for-64-bit-literals.patch @@ -0,0 +1,60 @@ +From 57ecf581d053f5cacf2e8fc3c024490e0bbe536f Mon Sep 17 00:00:00 2001 +From: Brendan Bolles <brendan@fnordware.com> +Date: Wed, 13 Aug 2014 19:54:10 -0700 +Subject: [PATCH] Use ULL for 64-bit literals + +On a 32-bit architecture, these literals are too big for just a long, +they need to be ULL, since Int64 is unsigned. +--- + IlmImf/ImfFastHuf.cpp | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/IlmImf/ImfFastHuf.cpp b/IlmImf/ImfFastHuf.cpp +index 86c84dc..01edad4 100644 +--- a/IlmImf/ImfFastHuf.cpp ++++ b/IlmImf/ImfFastHuf.cpp +@@ -107,7 +107,7 @@ FastHufDecoder::FastHufDecoder + for (int i = 0; i <= MAX_CODE_LEN; ++i) + { + codeCount[i] = 0; +- base[i] = 0xffffffffffffffffL; ++ base[i] = 0xffffffffffffffffULL; + offset[i] = 0; + } + +@@ -352,7 +352,7 @@ FastHufDecoder::buildTables (Int64 *base, Int64 *offset) + + for (int i = 0; i <= MAX_CODE_LEN; ++i) + { +- if (base[i] != 0xffffffffffffffffL) ++ if (base[i] != 0xffffffffffffffffULL) + { + _ljBase[i] = base[i] << (64 - i); + } +@@ -362,7 +362,7 @@ FastHufDecoder::buildTables (Int64 *base, Int64 *offset) + // Unused code length - insert dummy values + // + +- _ljBase[i] = 0xffffffffffffffffL; ++ _ljBase[i] = 0xffffffffffffffffULL; + } + } + +@@ -417,7 +417,7 @@ FastHufDecoder::buildTables (Int64 *base, Int64 *offset) + + int minIdx = TABLE_LOOKUP_BITS; + +- while (minIdx > 0 && _ljBase[minIdx] == 0xffffffffffffffffL) ++ while (minIdx > 0 && _ljBase[minIdx] == 0xffffffffffffffffULL) + minIdx--; + + if (minIdx < 0) +@@ -427,7 +427,7 @@ FastHufDecoder::buildTables (Int64 *base, Int64 *offset) + // Set the min value such that the table is never tested. + // + +- _tableMin = 0xffffffffffffffffL; ++ _tableMin = 0xffffffffffffffffULL; + } + else + { diff --git a/media-libs/openexr/metadata.xml b/media-libs/openexr/metadata.xml new file mode 100644 index 000000000000..fc9e500d69e1 --- /dev/null +++ b/media-libs/openexr/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>media-video@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">openexr/openexr</remote-id> + </upstream> +</pkgmetadata> diff --git a/media-libs/openexr/openexr-1.7.0.ebuild b/media-libs/openexr/openexr-1.7.0.ebuild new file mode 100644 index 000000000000..ac9a2a1e958b --- /dev/null +++ b/media-libs/openexr/openexr-1.7.0.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=2 +inherit eutils libtool + +DESCRIPTION="ILM's OpenEXR high dynamic-range image file format libraries" +HOMEPAGE="http://openexr.com/" +SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 -arm hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd" +IUSE="examples static-libs" + +RDEPEND="sys-libs/zlib + >=media-libs/ilmbase-1.0.2" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +src_prepare() { + sed -i \ + -e "s:/var/tmp/:${T}:" \ + IlmImfTest/tmpDir.h || die # Fix path for testsuite + + epatch "${FILESDIR}"/${P}-gcc43.patch + + elibtoolize +} + +src_configure() { + econf \ + --disable-dependency-tracking \ + $(use_enable static-libs static) \ + $(use_enable examples imfexamples) +} + +src_install() { + emake \ + DESTDIR="${D}" \ + docdir="/usr/share/doc/${PF}/pdf" \ + examplesdir="/usr/share/doc/${PF}/examples" \ + install || die + + dodoc AUTHORS ChangeLog NEWS README + + if use examples; then + dobin IlmImfExamples/imfexamples || die + else + rm -rf "${D}"/usr/share/doc/${PF}/examples + fi + + find "${D}" -name '*.la' -delete +} diff --git a/media-libs/openexr/openexr-2.0.1-r1.ebuild b/media-libs/openexr/openexr-2.0.1-r1.ebuild new file mode 100644 index 000000000000..ef20bade0aea --- /dev/null +++ b/media-libs/openexr/openexr-2.0.1-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools-multilib + +DESCRIPTION="ILM's OpenEXR high dynamic-range image file format libraries" +HOMEPAGE="http://openexr.com/" +SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/2.0.1" # 2.0.1 for the namespace off -> on switch, caused library renaming +KEYWORDS="~amd64 -arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="examples static-libs" + +RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] + >=media-libs/ilmbase-${PV}:=[${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND} + virtual/pkgconfig" +DOCS=( AUTHORS ChangeLog NEWS README ) + +src_prepare() { + # Fix path for testsuite + sed -i -e "s:/var/tmp/:${T}:" IlmImfTest/tmpDir.h || die + autotools-multilib_src_prepare +} + +src_configure() { + local myeconfargs=( + $(use_enable static-libs static) + $(use_enable examples imfexamples) + ) + autotools-multilib_src_configure +} + +src_install() { + autotools-multilib_src_install \ + docdir=/usr/share/doc/${PF}/pdf \ + examplesdir=/usr/share/doc/${PF}/examples + + docompress -x /usr/share/doc/${PF}/examples + + if ! use examples; then + rm -rf "${ED}"/usr/share/doc/${PF}/examples + fi +} diff --git a/media-libs/openexr/openexr-2.1.0.ebuild b/media-libs/openexr/openexr-2.1.0.ebuild new file mode 100644 index 000000000000..14cc4d86d161 --- /dev/null +++ b/media-libs/openexr/openexr-2.1.0.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools-multilib + +DESCRIPTION="ILM's OpenEXR high dynamic-range image file format libraries" +HOMEPAGE="http://openexr.com/" +SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/21" # 21 from SONAME +KEYWORDS="amd64 -arm hppa ia64 ppc ppc64 ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="examples static-libs" + +RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] + >=media-libs/ilmbase-${PV}:=[${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND} + virtual/pkgconfig" +DOCS=( AUTHORS ChangeLog NEWS README ) + +src_prepare() { + # Fix path for testsuite + sed -i -e "s:/var/tmp/:${T}:" IlmImfTest/tmpDir.h || die + autotools-multilib_src_prepare +} + +src_configure() { + local myeconfargs=( + $(use_enable static-libs static) + $(use_enable examples imfexamples) + ) + autotools-multilib_src_configure +} + +src_install() { + autotools-multilib_src_install \ + docdir="${EPREFIX}"/usr/share/doc/${PF}/pdf \ + examplesdir="${EPREFIX}"/usr/share/doc/${PF}/examples + + docompress -x /usr/share/doc/${PF}/examples + + if ! use examples; then + rm -rf "${ED}"/usr/share/doc/${PF}/examples + fi +} diff --git a/media-libs/openexr/openexr-2.2.0-r1.ebuild b/media-libs/openexr/openexr-2.2.0-r1.ebuild new file mode 100644 index 000000000000..257ac2303b6a --- /dev/null +++ b/media-libs/openexr/openexr-2.2.0-r1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools multilib-minimal + +DESCRIPTION="ILM's OpenEXR high dynamic-range image file format libraries" +HOMEPAGE="http://openexr.com/" +SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/22" # based on SONAME +KEYWORDS="~amd64 -arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="cpu_flags_x86_avx examples static-libs" + +RDEPEND=" + sys-libs/zlib[${MULTILIB_USEDEP}] + >=media-libs/ilmbase-${PV}:=[${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND} + virtual/pkgconfig + >=sys-devel/autoconf-archive-2016.09.16" + +PATCHES=( + "${FILESDIR}/${P}-fix-cpuid-on-abi_x86_32.patch" + "${FILESDIR}/${P}-use-ull-for-64-bit-literals.patch" + "${FILESDIR}/${P}-fix-build-system.patch" + "${FILESDIR}/${P}-fix-config.h-collision.patch" +) + +src_prepare() { + default + # Fix path for testsuite + sed -i -e "s:/var/tmp/:${T}:" IlmImfTest/tmpDir.h || die + + # delete stray config files causing havoc + rm -f config*/OpenEXRConfig.h* || die + + eautoreconf +} + +multilib_src_configure() { + ECONF_SOURCE="${S}" econf \ + --enable-threading \ + $(use_enable cpu_flags_x86_avx avx) \ + $(use_enable static-libs static) \ + $(use_enable examples imfexamples) +} + +multilib_src_install_all() { + einstalldocs + + docompress -x /usr/share/doc/${PF}/examples + if ! use examples; then + rm -rf "${ED%/}"/usr/share/doc/${PF}/examples || die + fi + + # package provides .pc files + find "${D}" -name '*.la' -delete || die +} diff --git a/media-libs/openexr/openexr-2.2.0-r2.ebuild b/media-libs/openexr/openexr-2.2.0-r2.ebuild new file mode 100644 index 000000000000..91e85f36c2b7 --- /dev/null +++ b/media-libs/openexr/openexr-2.2.0-r2.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools multilib-minimal + +DESCRIPTION="ILM's OpenEXR high dynamic-range image file format libraries" +HOMEPAGE="http://openexr.com/" +SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/22" # based on SONAME +KEYWORDS="~amd64 -arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="cpu_flags_x86_avx examples static-libs" + +RDEPEND=" + sys-libs/zlib[${MULTILIB_USEDEP}] + >=media-libs/ilmbase-${PV}:=[${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND} + virtual/pkgconfig[${MULTILIB_USEDEP}] + >=sys-devel/autoconf-archive-2016.09.16" + +PATCHES=( + "${FILESDIR}/${P}-fix-cpuid-on-abi_x86_32.patch" + "${FILESDIR}/${P}-use-ull-for-64-bit-literals.patch" + "${FILESDIR}/${P}-fix-build-system.patch" + "${FILESDIR}/${P}-fix-config.h-collision.patch" + "${FILESDIR}/${P}-Fix-typo-in-C-bindings.patch" + "${FILESDIR}/${P}-Install-missing-header-files.patch" + "${FILESDIR}/${P}-CVE-2017-9110-to-9116-security-fixes.patch" +) + +src_prepare() { + default + # Fix path for testsuite + sed -i -e "s:/var/tmp/:${T}:" IlmImfTest/tmpDir.h || die + + # delete stray config files causing havoc + rm -f config*/OpenEXRConfig.h* || die + + eautoreconf +} + +multilib_src_configure() { + ECONF_SOURCE="${S}" econf \ + --enable-threading \ + $(use_enable cpu_flags_x86_avx avx) \ + $(use_enable static-libs static) \ + $(use_enable examples imfexamples) +} + +multilib_src_install_all() { + einstalldocs + + if use examples; then + docompress -x /usr/share/doc/${PF}/examples + else + rm -rf "${ED%/}"/usr/share/doc/${PF}/examples || die + fi + + # package provides .pc files + find "${D}" -name '*.la' -delete || die +} diff --git a/media-libs/openexr/openexr-2.2.0.ebuild b/media-libs/openexr/openexr-2.2.0.ebuild new file mode 100644 index 000000000000..0e33854ab294 --- /dev/null +++ b/media-libs/openexr/openexr-2.2.0.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit autotools-multilib + +DESCRIPTION="ILM's OpenEXR high dynamic-range image file format libraries" +HOMEPAGE="http://openexr.com/" +SRC_URI="http://download.savannah.gnu.org/releases/openexr/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/22" # based on SONAME +KEYWORDS="~amd64 -arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="examples static-libs" + +RDEPEND=">=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] + >=media-libs/ilmbase-${PV}:=[${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND} + virtual/pkgconfig" +DOCS=( AUTHORS ChangeLog NEWS README ) + +src_prepare() { + # Fix path for testsuite + sed -i -e "s:/var/tmp/:${T}:" IlmImfTest/tmpDir.h || die + autotools-multilib_src_prepare +} + +src_configure() { + local myeconfargs=( + $(use_enable static-libs static) + $(use_enable examples imfexamples) + ) + autotools-multilib_src_configure +} + +src_install() { + autotools-multilib_src_install \ + docdir="${EPREFIX}"/usr/share/doc/${PF}/pdf \ + examplesdir="${EPREFIX}"/usr/share/doc/${PF}/examples + + docompress -x /usr/share/doc/${PF}/examples + use examples || rm -rf "${ED}"/usr/share/doc/${PF}/examples +} |