summaryrefslogtreecommitdiff
blob: 6cada0f70b28aac82aec102b2d7b4d7448079375 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit cmake-utils versionator

PV_MAJ=$(get_version_component_range 1-2)

DESCRIPTION="An enterprise quality OCR engine developed in USSR/Russia in the 90's."
HOMEPAGE="https://launchpad.net/cuneiform-linux"
SRC_URI="http://launchpad.net/${PN}-linux/${PV_MAJ}/${PV_MAJ}/+download/${P}.tar.bz2
			http://omploader.org/vejho/${P}-visibility.patch.bz2"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"

IUSE="imagemagick debug"

RDEPEND="imagemagick? ( media-gfx/imagemagick )"
DEPEND=">=dev-util/cmake-2.6.0
	${RDEPEND}"

DOCS="readme.txt"

S="${S}.0"

src_unpack(){
	unpack ${A}
	cd "${S}"
	epatch "${WORKDIR}"/${P}-visibility.patch
	# Fix automagic dependencies / linking
	if ! use imagemagick; then
		sed -e '/pkg_check_modules(MAGICK ImageMagick++)/s/^/#DONOTFIND /' \
			-i "${S}/cuneiform_src/Kern/CMakeLists.txt" \
		|| die "Sed for ImageMagick automagic dependency failed."
	fi
}