commit: c6bdb11122fc1798ea012262add3b7a7310f213d Author: Filip Kobierski <fkobi <AT> pm <DOT> me> AuthorDate: Mon Jan 6 12:13:35 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Feb 20 01:09:56 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6bdb111
sci-libs/libgeotiff: add 1.7.3 with improvements - hardcode USE=tiff untill upstream fixes it - add src_test - move `use doc && ...` to src_configure - add comments - explicitly declare cmake arguments - add comments to upstream Bug: https://bugs.gentoo.org/837287 Signed-off-by: Filip Kobierski <fkobi <AT> pm.me> Closes: https://github.com/gentoo/gentoo/pull/40006 Signed-off-by: Sam James <sam <AT> gentoo.org> sci-libs/libgeotiff/Manifest | 1 + sci-libs/libgeotiff/libgeotiff-1.7.3.ebuild | 66 +++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/sci-libs/libgeotiff/Manifest b/sci-libs/libgeotiff/Manifest index acd4359a5eee..5d57a58c6f64 100644 --- a/sci-libs/libgeotiff/Manifest +++ b/sci-libs/libgeotiff/Manifest @@ -1 +1,2 @@ DIST libgeotiff-1.7.1.tar.gz 542779 BLAKE2B e26a14fcb463f4a9e5a3652b978223da6b11dcb4ec6a3b6068460f929a57e9affafdb652f16fad23a2da4612c6ae3c2624bfb4f26c96fc4290a33f1e0629b726 SHA512 af119040598f4349124848d9788ea1d0d2019e23fc48eaf4b0445320c51e91afa6c7e25b49738bdaf0aa4467a19104b00838d669da27dee77898c489fe5fe4c1 +DIST libgeotiff-1.7.3.tar.gz 547548 BLAKE2B cc22000d71c30d178c190a4e10487a49c970590148c92474e805957e3f7dee8211b3cb3543455a9c8a9aa48a9ee79c95e116bdb0741c458b9c7fe91fa2a8fd63 SHA512 a523d6117c7433fe37b7c0cdcba81698426cd4b084bcb35c7dacc9e87bfda1ab7a4c16a9aa64a69dedb78edc2f85e8032bf8b158411f50909603e04d13821cd3 diff --git a/sci-libs/libgeotiff/libgeotiff-1.7.3.ebuild b/sci-libs/libgeotiff/libgeotiff-1.7.3.ebuild new file mode 100644 index 000000000000..73a2d0594283 --- /dev/null +++ b/sci-libs/libgeotiff/libgeotiff-1.7.3.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Library for reading TIFF files with embedded tags for geographic information" +HOMEPAGE="https://trac.osgeo.org/geotiff/ https://github.com/OSGeo/libgeotiff" +SRC_URI="https://download.osgeo.org/geotiff/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0/5" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +# TODO: add tiff when resolved: https://github.com/OSGeo/libgeotiff/issues/125 +IUSE="doc jpeg zlib" + +DEPEND=" + >=sci-libs/proj-6.0.0:= + >=media-libs/tiff-3.9.1:= + jpeg? ( media-libs/libjpeg-turbo:= ) + zlib? ( sys-libs/zlib ) +" +RDEPEND="${DEPEND}" +BDEPEND=" + >=media-libs/tiff-3.9.1 + doc? ( app-text/doxygen ) +" + +src_configure() { + # in >1.7.3 there is BUILD_{DOC,MAN}, it should be added + local mycmakeargs=( + -DWITH_JPEG=$(usex jpeg) + -DWITH_TIFF=ON # bug 837287 + -DWITH_TOWGS84=OFF # default + -DWITH_ZLIB=$(usex zlib) + ) + use doc && HTML_DOCS=( docs/api/. ) + + cmake_src_configure +} + +src_compile() { + cmake_src_compile + + if use doc; then + mkdir -p docs/api || die + cp "${FILESDIR}"/Doxyfile Doxyfile || die + doxygen -u Doxyfile || die "updating doxygen config failed" + doxygen Doxyfile || die "docs generation failed" + fi +} + +# check if needed: https://github.com/OSGeo/libgeotiff/issues/126 +src_test() { + # Source: https://github.com/OSGeo/libgeotiff?tab=readme-ov-file#testing + pushd "${BUILD_DIR}"/bin || die + # prepare file + ./makegeo || die "makegeo failed" + [[ -f "newgeo.tif" ]] || die "makegeo did not produce a file" + # test + ./listgeo newgeo.tif > metadata.txt || die "listgeo metadata extraction failed" + ./geotifcp -g metadata.txt newgeo.tif newer.tif > /dev/null || die + cmp new{geo,er}.tif || die "geotifcp produces different files" + popd +}