diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2018-12-25 15:33:32 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2018-12-25 22:23:19 +0100 |
commit | da7926182391bd95b006f7fc6ac44cac3e54bf40 (patch) | |
tree | 7614c8f34009399477241f4672d13e992ab58f46 /media-gfx | |
parent | profiles: Mask media-gfx/exiv2-0.27.0 (diff) | |
download | gentoo-da7926182391bd95b006f7fc6ac44cac3e54bf40.tar.gz gentoo-da7926182391bd95b006f7fc6ac44cac3e54bf40.tar.bz2 gentoo-da7926182391bd95b006f7fc6ac44cac3e54bf40.zip |
media-gfx/exiv2: 0.27.0 version bump
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/exiv2/Manifest | 1 | ||||
-rw-r--r-- | media-gfx/exiv2/exiv2-0.27.0.ebuild | 107 | ||||
-rw-r--r-- | media-gfx/exiv2/files/exiv2-0.27.0-png-broken-icc-profile.patch | 34 |
3 files changed, 142 insertions, 0 deletions
diff --git a/media-gfx/exiv2/Manifest b/media-gfx/exiv2/Manifest index 017a87d6e8b3..2a0cbfc60290 100644 --- a/media-gfx/exiv2/Manifest +++ b/media-gfx/exiv2/Manifest @@ -1 +1,2 @@ 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 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..c45a92101c25 --- /dev/null +++ b/media-gfx/exiv2/exiv2-0.27.0.ebuild @@ -0,0 +1,107 @@ +# 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 ) + +S="${S}-Source" + +PATCHES=( + # pending upstream + "${FILESDIR}"/${P}-png-broken-icc-profile.patch +) + +pkg_setup() { + use doc && python-any-r1_pkg_setup +} + +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]; |