void-packages/srcpkgs/leptonica/template

58 lines
1.4 KiB
Bash

# Template file for 'leptonica'
pkgname=leptonica
version=1.84.0
revision=1
build_style=gnu-configure
hostmakedepends="pkg-config automake libtool"
makedepends="libopenjpeg2-devel libwebp-devel"
checkdepends="which gnuplot"
short_desc="Image processing and analysis library"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-2-Clause"
homepage="http://leptonica.org/"
changelog="http://leptonica.org/source/version-notes.html"
distfiles="https://github.com/DanBloomberg/leptonica/archive/${version}.tar.gz"
checksum=440e6bb1b11e385310b31fab2505c9b0e0835a42f2fc985c2f79c81a8684ff98
pre_check() {
# disable failing tests
vsed -i prog/Makefile.am \
-e "s/boxa3_reg//" \
-e "s/projection_reg//" \
-e "s/rankhisto_reg//" \
-e "s/rankbin_reg//"
}
pre_configure() {
./autogen.sh
}
post_install() {
vdoc moller52.jpg
vdoc version-notes.html
vlicense leptonica-license.txt
}
leptonica-devel_package() {
depends="leptonica>=${version}_${revision} ${makedepends}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include/leptonica
vmove usr/lib/cmake
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
vmove "usr/lib/*.a"
vdoc style-guide.txt
}
}
leptonica-examples_package() {
depends="leptonica>=${version}_${revision}"
short_desc+=" - library tests and demos"
pkg_install() {
vmkdir usr/share/leptonica
rm -f -r prog/*.{l,}o prog/.deps prog/.libs
# binaries, example source, images and data
vcopy prog usr/share/leptonica
}
}