summaryrefslogtreecommitdiff
path: root/media-gfx/exiv2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-12-31 13:43:35 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-12-31 13:43:35 +0000
commit2891d29af8907ce881662f4a02844926d7a293c7 (patch)
tree56979d96839d0827aa52008b81b746b4934d88df /media-gfx/exiv2
parentde49812990871e1705b64051c35161d5e6400269 (diff)
gentoo resync : 31.12.2018
Diffstat (limited to 'media-gfx/exiv2')
-rw-r--r--media-gfx/exiv2/Manifest3
-rw-r--r--media-gfx/exiv2/exiv2-0.27.0.ebuild113
-rw-r--r--media-gfx/exiv2/files/exiv2-0.27.0-png-broken-icc-profile.patch34
3 files changed, 150 insertions, 0 deletions
diff --git a/media-gfx/exiv2/Manifest b/media-gfx/exiv2/Manifest
index 1f175f5fa846..796fe1ace89e 100644
--- a/media-gfx/exiv2/Manifest
+++ b/media-gfx/exiv2/Manifest
@@ -1,5 +1,8 @@
AUX exiv2-0.26-fix-docs.patch 2532 BLAKE2B c648454a7c9a56c2d4a3844cbe212630ff6c3d0d687928d86487380e0b12b3b7f6458b827285806afa73034497265cae169998ab281f4687d736cc5e3e6df1b5 SHA512 de245f08860fd6fccbd4e617cb9dfe105d1a64ecb16fc37376c257f7547c91e5dffaa46531d21201497473d6708817e7015fe6c061379834b892de08bcc05ee4
AUX exiv2-0.26-tools-optional.patch 1386 BLAKE2B 84e0903934187aaa914c0a4fe04afe63ed3314ea76d6929b7435899a731bb90831418b2162e1dca4a487b88041fe7b9aa50a3c438e66ac3893dd1d12b363714f SHA512 efdd848dd728fcb0ba5dbc305fef6eb6af4385b5bd09e2c3722c0dea2009207c282b95a07cdb608fc2298d18686c764dded2fd9de4166dbecabf7eeb187e6483
+AUX exiv2-0.27.0-png-broken-icc-profile.patch 1699 BLAKE2B e9d019d3d885198e9945a387325435618f200dcac5a70cc96a6151f9ba8036609162fd93a7857cb8677bb7c1d3fe250f9750b8d7e660f34e31e50e3bc15e71a1 SHA512 8cb9b1f4129161861aee384e634433e3fa82aa933804d5f63de95475f6f6658f7b2f63fca1da624ea7b634f71cde5ee0de7e0466247d687494383d001df92ace
DIST exiv2-0.26_p20180811d.tar.xz 1722216 BLAKE2B 9e1c8307eb923c340894c82c37e9f6c31d82ff1b1de3c79d4ec9b0ec9428ad1d05f945e9a4e440028335857e7fc32d50cdc5245842d743e017037bd641b654db SHA512 5453650888440028acb139a02b387eab0232551c97256ce88dd626fa4cc8800ec02ad66e093c314bbfdc60726995b6c8482572d1ffaec73a265209c98c901780
+DIST exiv2-0.27.0-Source.tar.gz 27222970 BLAKE2B a935f6a41e322dda14d11400801f6b98fd3254af45a44d9d6e9f90d955cc58bb6f7477c49f1f99612a519216cdc954bacea74c68f76545c662db37849e99367e SHA512 3037d8e84b414e3915b807c5bea39f903668c0774f9dbc1367e23c595d5abaf318c746009e994234bcaf0088ad32a820ea42c9c77c9a53c65a7b5d7781a2c6d4
EBUILD exiv2-0.26_p20180811-r3.ebuild 2954 BLAKE2B 06ad8b544150e1f5d4f1a305d78ab3ff7772b7c797e67e47ce01a233d0afee514d7660921c33b43634da60883b2adba119a80830c2493ad01800bd9b05b34072 SHA512 172e65b6210cb383afee4f344d585fae40dc7af1b7bb5d8dd2e5acbd7fcb4086b4caca998ce3627aefb4be3f8e4cebcaef24ccfb67d61d580b674fee50b24627
+EBUILD exiv2-0.27.0.ebuild 2820 BLAKE2B 2b1f2ebe29471d06010bab528c33e04884bdb8340f70babdf133dc688b4d7cff22fdb3f8ac612f2260adf91f48528aa2dc918aee573483ad1615fc5668e547a1 SHA512 99fbcb120caa5bb211a4cd29e0718fbfc8ca3f10224dc059e8ba82f06ec324c27288e6eca3be50351a0c6efb880632ba6bceaaea8c98d30fd27dd67f96636082
MISC metadata.xml 612 BLAKE2B f98a074e9e3a4411baf8255cd8cab5be4257469463634218b664bb9e7f159c98615f0721bb4463c6183cecc8b2be00c34a031e7b99d745b9807634cbaab8d479 SHA512 9b4926ba8420a125dc4cefd351ee1ec10a4df2fc4306a56720f6e8de7c5fd9f36a8646c8583958fca9a45ebe1b65b19c053c7da37176546bc19ae64afa87e4f5
diff --git a/media-gfx/exiv2/exiv2-0.27.0.ebuild b/media-gfx/exiv2/exiv2-0.27.0.ebuild
new file mode 100644
index 000000000000..f59464a6685d
--- /dev/null
+++ b/media-gfx/exiv2/exiv2-0.27.0.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+if [[ ${PV} = *9999 ]]; then
+ EGIT_REPO_URI="https://github.com/Exiv2/exiv2.git"
+ inherit git-r3
+else
+ SRC_URI="http://exiv2.dyndns.org/builds/${P}-Source.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-solaris ~x86-solaris"
+fi
+
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
+inherit cmake-multilib python-any-r1
+
+DESCRIPTION="EXIF, IPTC and XMP metadata C++ library and command line utility"
+HOMEPAGE="http://www.exiv2.org/"
+
+LICENSE="GPL-2"
+SLOT="0/27"
+IUSE="doc examples nls +png webready +xmp"
+
+RDEPEND="
+ >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+ nls? ( >=virtual/libintl-0-r1[${MULTILIB_USEDEP}] )
+ png? ( sys-libs/zlib[${MULTILIB_USEDEP}] )
+ webready? (
+ net-libs/libssh[${MULTILIB_USEDEP}]
+ net-misc/curl[${MULTILIB_USEDEP}]
+ )
+ xmp? ( dev-libs/expat[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ doc? (
+ ${PYTHON_DEPS}
+ app-doc/doxygen
+ dev-libs/libxslt
+ media-gfx/graphviz
+ virtual/pkgconfig
+ )
+ nls? ( sys-devel/gettext )
+"
+
+DOCS=( README.md doc/ChangeLog doc/cmd.txt )
+
+PATCHES=(
+ # pending upstream
+ "${FILESDIR}"/${P}-png-broken-icc-profile.patch
+)
+
+pkg_setup() {
+ use doc && python-any-r1_pkg_setup
+}
+
+src_unpack() {
+ # FIXME @upstream: MacOS cruft is getting installed, don't let it in...
+ # https://github.com/Exiv2/exiv2/issues/620
+ tar -C "${WORKDIR}" --exclude=.* -xpf "${DISTDIR}/${A}" --gz 2> /dev/null ||
+ elog "${my_tar}: tar extract command failed at least partially - continuing"
+ mv "${P}-Source" "${S}" || die "Failed to create source dir ${S}"
+}
+
+src_prepare() {
+ # FIXME @upstream:
+ einfo "Converting doc/cmd.txt to UTF-8"
+ iconv -f LATIN1 -t UTF-8 doc/cmd.txt > doc/cmd.txt.tmp || die
+ mv -f doc/cmd.txt.tmp doc/cmd.txt || die
+
+ if use doc; then
+ einfo "Updating doxygen config"
+ doxygen &>/dev/null -u config/Doxyfile || die
+ fi
+
+ cmake-utils_src_prepare
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DEXIV2_BUILD_SAMPLES=NO
+ -DEXIV2_BUILD_PO=$(usex nls)
+ -DEXIV2_ENABLE_NLS=$(usex nls)
+ -DEXIV2_ENABLE_PNG=$(usex png)
+ -DEXIV2_ENABLE_CURL=$(usex webready)
+ -DEXIV2_ENABLE_SSH=$(usex webready)
+ -DEXIV2_ENABLE_WEBREADY=$(usex webready)
+ -DEXIV2_ENABLE_XMP=$(usex xmp)
+ $(multilib_is_native_abi || echo -DEXIV2_BUILD_EXIV2_COMMAND=NO)
+ )
+
+ cmake-utils_src_configure
+}
+
+multilib_src_compile() {
+ cmake-utils_src_compile
+
+ if multilib_is_native_abi; then
+ use doc && emake -j1 doc
+ fi
+}
+
+multilib_src_install_all() {
+ use xmp && DOCS+=( doc/{COPYING-XMPSDK,README-XMP,cmdxmp.txt} )
+ use doc && HTML_DOCS=( "${S}"/doc/html/. )
+
+ einstalldocs
+ find "${D}" -name '*.la' -delete || die
+
+ if use examples; then
+ docinto examples
+ dodoc samples/*.cpp
+ fi
+}
diff --git a/media-gfx/exiv2/files/exiv2-0.27.0-png-broken-icc-profile.patch b/media-gfx/exiv2/files/exiv2-0.27.0-png-broken-icc-profile.patch
new file mode 100644
index 000000000000..ae0a0ee30dce
--- /dev/null
+++ b/media-gfx/exiv2/files/exiv2-0.27.0-png-broken-icc-profile.patch
@@ -0,0 +1,34 @@
+diff --git a/src/pngimage.cpp b/src/pngimage.cpp
+index 90844d09..b5b0cd24 100644
+--- a/src/pngimage.cpp
++++ b/src/pngimage.cpp
+@@ -501,7 +501,20 @@ namespace Exiv2 {
+ }
+ else if (!memcmp(cheaderBuf.pData_ + 4, "iCCP", 4))
+ {
+- zlibToDataBuf(cdataBuf.pData_ +12+1,dataOffset-13,iccProfile_); // +1 = 'compressed' flag
++ // The ICC profile name can vary from 1-79 characters.
++ uint32_t iccOffset = 0;
++ while (iccOffset < 80 && iccOffset < dataOffset) {
++
++ const byte* profileName = cdataBuf.pData_ + iccOffset;
++ ++iccOffset;
++
++ if (*profileName == 0x00)
++ break;
++ }
++
++ ++iccOffset; // +1 = 'compressed' flag
++
++ zlibToDataBuf(cdataBuf.pData_ +iccOffset,dataOffset-iccOffset,iccProfile_);
+ #ifdef DEBUG
+ std::cout << "Exiv2::PngImage::readMetadata: Found iCCP chunk length: " << dataOffset << std::endl;
+ std::cout << "Exiv2::PngImage::readMetadata: iccProfile.size_ : " << iccProfile_.size_ << std::endl;
+@@ -662,6 +675,7 @@ namespace Exiv2 {
+
+ // calculate CRC
+ uLong tmp = crc32(0L, Z_NULL, 0);
++ tmp = crc32(tmp, (const Bytef*)type ,typeLen);
+ tmp = crc32(tmp, (const Bytef*)header ,headerLen);
+ tmp = crc32(tmp, (const Bytef*)compressed.pData_,compressed.size_);
+ byte crc[4];