diff options
Diffstat (limited to 'media-libs/leptonica')
-rw-r--r-- | media-libs/leptonica/Manifest | 2 | ||||
-rw-r--r-- | media-libs/leptonica/leptonica-1.84.1.ebuild | 77 |
2 files changed, 79 insertions, 0 deletions
diff --git a/media-libs/leptonica/Manifest b/media-libs/leptonica/Manifest index 7dd2d3021fb0..fe187878b2a6 100644 --- a/media-libs/leptonica/Manifest +++ b/media-libs/leptonica/Manifest @@ -1,3 +1,5 @@ DIST leptonica-1.83.1.tar.gz 14028566 BLAKE2B 56c501f16eb58366e4ed2f168f714adef968c271a0636cc0f3663b762aac29352a508421702e8ab063f78f3faf01e3d9eb72fff43093b05722a1a604beb66a59 SHA512 14c76b8795e494637cd225982cd27a1cd82d22b34c0c0d6ed061530c0ed8cec87fc1c8482bbda8f56a04f240b9fb50d481b8fffe5df846958cb146f9d2d51553 +DIST leptonica-1.84.1.tar.gz 14102299 BLAKE2B 1da9b5bd2b72fa82320126dd8e6e647fbc50be0dcd71a0f8e392d9617911fe4f224d51158ab230476afbf7fd0e15cae1b59d8469cbf68a43893ada09a8d93673 SHA512 949be33a09e1dfc04527f5401d3d682999bd6904dca0b4950b457d12564e3290ec5b62ab4b14ef14d6f499a0fbfa0ebc37c2e8ab2966913883127b9489f47e97 EBUILD leptonica-1.83.1.ebuild 2066 BLAKE2B b72ce63ca165aea03f386bc43f5be4240d1a342ac7c9010a7a9fe46d6b1f0664e11deb96236d93f087c2bbd28df69457c4ac37cd2c5d82b3e6e499cda8616c8b SHA512 468c40bc767edaec9b4b7f285f568420908ee791567d281fe39d29e2a3484233eb0fd671b124c2c4acf9e71fa4a8ffe5e48c8b24f96a35c20dc1c41f372d283c +EBUILD leptonica-1.84.1.ebuild 2072 BLAKE2B f4b0d531b58f7a8955b75df0a135d362c880ec022ffeced68b856efc2635965277c59bbf614c6bdcf140be389e97fa936f91c554eb0263fe046ae5d9f0af7b36 SHA512 b897ecfb3fdf16d42ba2a9a97a94d44c9c90a4c7984d2e237b6726d1ebd50fc4f0301d2c179bf7ffde274dc599328d72766f691088aeaa803c49d7ba191eca52 MISC metadata.xml 669 BLAKE2B 27b4a63ae3b2603632b28a501a22ea6142f35969386be65d4b4ded7311a046d21d7a4faddcb1558a3872e80d708eeb22bb2d03a90d009383c3e34016ef1778d8 SHA512 3a547cefac4630ed8fc4b041a1925be4f3aced7aff960b7e98109da12d9c8e4e2ec3a85fae9f991516cb67fea4e9edeab1c46280741795991e01b0ace7aa9d16 diff --git a/media-libs/leptonica/leptonica-1.84.1.ebuild b/media-libs/leptonica/leptonica-1.84.1.ebuild new file mode 100644 index 000000000000..51b99d059922 --- /dev/null +++ b/media-libs/leptonica/leptonica-1.84.1.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit libtool multilib-minimal + +DESCRIPTION="C library for image processing and analysis" +HOMEPAGE="http://www.leptonica.org/" +SRC_URI="https://github.com/DanBloomberg/${PN}/releases/download/${PV}/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0/6" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~ppc-macos" +IUSE="gif jpeg jpeg2k png static-libs test tiff utils webp zlib" +# N.B. Tests need some features enabled: +REQUIRED_USE="test? ( jpeg png tiff zlib )" +RESTRICT="!test? ( test )" + +RDEPEND=" + gif? ( >=media-libs/giflib-5.1.3:=[${MULTILIB_USEDEP}] ) + jpeg? ( media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}] ) + jpeg2k? ( media-libs/openjpeg:2=[${MULTILIB_USEDEP}] ) + png? ( + media-libs/libpng:0=[${MULTILIB_USEDEP}] + sys-libs/zlib:=[${MULTILIB_USEDEP}] + ) + tiff? ( media-libs/tiff:=[${MULTILIB_USEDEP}] ) + webp? ( media-libs/libwebp:=[${MULTILIB_USEDEP}] ) + zlib? ( sys-libs/zlib:=[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + test? ( media-libs/tiff:0[jpeg,zlib] )" + +DOCS=( README version-notes ) + +src_prepare() { + default + elibtoolize + + # unhtmlize docs + local X + for X in ${DOCS[@]}; do + awk '/<\/pre>/{s--} {if (s) print $0} /<pre>/{s++}' \ + "${X}.html" > "${X}" || die 'awk failed' + rm -f -- "${X}.html" + done +} + +multilib_src_configure() { + ECONF_SOURCE="${S}" econf \ + --enable-shared \ + $(use_with gif giflib) \ + $(use_with jpeg) \ + $(use_with jpeg2k libopenjpeg) \ + $(use_with png libpng) \ + $(use_with tiff libtiff) \ + $(use_with webp libwebp) \ + $(use_with webp libwebpmux) \ + $(use_with zlib) \ + $(use_enable static-libs static) \ + $(multilib_native_use_enable utils programs) +} + +multilib_src_test() { + default + + # ${TMPDIR} is not respected. It used to be but it lead to issues + # and there have been long debates with upstream about it. :( + rm -rf /tmp/lept/ || die +} + +multilib_src_install_all() { + einstalldocs + + # libtool archives covered by pkg-config + find "${ED}" -name '*.la' -delete || die +} |