[media-libs/leptonica] New package added, it's a requirement in order to close bug #2345

This commit is contained in:
Danilo Pianini
2011-12-16 12:35:56 +01:00
parent cdb0fb479f
commit 4fa32cdda3
3 changed files with 70 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
AUX leptonica-1.68-pngio.patch 409 RMD160 d32bd53d67e31c78d6b1279278240a88909fefa0 SHA1 116e2dfd9a5be16e8c1911a9cec383f163e37bdf SHA256 fdc7ce7378c5b5c789a93e3ce90f87c33b7f65a298d2710ac48c079bfb9f8bd5
DIST leptonica-1.68.tar.gz 6695020 RMD160 f1d20f0bae963b5c6753d5ceca5873d604a16e40 SHA1 a50563ac091f4195a5a3b4579c4fcc674b81c316 SHA256 acefb6c50db2913f117afdbb19a549f7409cf8fa5d9a435692cb10ff89a81f8f
EBUILD leptonica-1.68.ebuild 1237 RMD160 ce5dbefb92898765c899396c2db2d7c8a594e1c1 SHA1 b9a4eb41cfb616f9a2fbeed7c41ccb41c5fb7e9b SHA256 b72e4ef07379d80c254a971cad70adea111b135d085ba94c51eb78c5f1b01972
@@ -0,0 +1,12 @@
*** src/pngio.c 2011-12-05 12:15:10.000000000 +0100
--- src/pngio.c.new 2011-12-05 12:14:07.000000000 +0100
***************
*** 107,112 ****
--- 107,113 ----
/* --------------------------------------------*/
#include "png.h"
+ #include "zlib.h"
/* ----------------Set defaults for read/write options ----------------- */
/* strip 16 bpp --> 8 bpp on reading png; default is for stripping */
@@ -0,0 +1,55 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=2
inherit autotools multilib
#MY_P="leptonlib-${PV}"
DESCRIPTION="An open source C library for image processing and analysis"
HOMEPAGE="http://www.leptonica.com/"
SRC_URI="http://www.leptonica.com/source/${P}.tar.gz"
LICENSE="Apache-2.0"
KEYWORDS="~amd64 ~x86"
IUSE=""
SLOT="0"
DEPEND="virtual/jpeg
media-libs/giflib
media-libs/tiff"
RDEPEND="${DEPEND}"
#S=${WORKDIR}/${MY_P}
DOCS=( README version-notes )
src_prepare() {
epatch "${FILESDIR}/${P}-pngio.patch"
# We need a fake m4 dir, as setting AT_M4DIR to
# an empty value does not make eAT forget to
# add "-I m4" to the AT commands
#mkdir m4
eautoreconf
# unhtmlize docs (they're just one big <pre/>s)
local docf
for _docf in ${DOCS[@]}; do
awk '/<\/pre>/{s--} {if (s) print $0} /<pre>/{s++}' \
${_docf}.html > ${_docf} || die 'awk failed.'
done
}
src_install() {
emake DESTDIR="${D}" install || die 'emake install failed.'
dodoc ${DOCS[@]} || die 'dodoc failed.'
# remove .la file, it was needed only to build shared lib
rm "${D}"/usr/$(get_libdir)/liblept.la || die 'rm failed.'
# remove fake m4 dir
rm m4/*
rmdir m4
}