summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
Diffstat (limited to 'libre')
-rw-r--r--libre/cuneiform/PKGBUILD61
-rw-r--r--libre/cuneiform/libre.patch11
2 files changed, 72 insertions, 0 deletions
diff --git a/libre/cuneiform/PKGBUILD b/libre/cuneiform/PKGBUILD
new file mode 100644
index 000000000..c40bf9297
--- /dev/null
+++ b/libre/cuneiform/PKGBUILD
@@ -0,0 +1,61 @@
+# $Id: PKGBUILD 148996 2015-12-06 17:43:52Z bpiotrowski $
+# Maintainer (Arch): Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor (Arch): Maxim Vuets <maxim.vuets@gmail.com>
+# Maintainer: André Silva <emulatorman@parabola.nu>
+
+pkgname=cuneiform
+pkgver=1.1.0
+_dpkgver=1.1
+pkgrel=14.parabola1
+pkgdesc="GNU/Linux port of an OCR system developed in Russia. Supports more than 20 languages, without nonfree data files"
+arch=('i686' 'x86_64')
+url="https://launchpad.net/cuneiform-linux"
+license=('BSD')
+depends=('imagemagick')
+makedepends=('cmake')
+mksource=(http://launchpad.net/cuneiform-linux/${_dpkgver}/${_dpkgver}/+download/cuneiform-linux-${pkgver}.tar.bz2)
+source=("https://repo.parabola.nu/other/${pkgname}-libre/${pkgname}-libre-${pkgver}.tar.bz2"
+ 'libre.patch')
+mkmd5sums=('09fd160cdfc512f26442a7e91246598d')
+md5sums=('88416aca3998ea61cc800874bab945bd'
+ '6d1ad29ec454de83622b6b044f6cfb67')
+
+mksource() {
+ mv "${srcdir}/${pkgname}-linux-${pkgver}" "${srcdir}/${pkgname}-${pkgver}"
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ rm -rv datafiles
+}
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 -i ../libre.patch
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -i 's#lib64#lib#' install_files.cmake
+ mkdir -p builddir
+ cd builddir
+
+ LMAGICK=`ls -1 /usr/lib/libMagick++*.so.?`
+
+ cmake \
+ -DCMAKE_BUILD_TYPE=release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DImageMagick_Magick++_LIBRARY=$LMAGICK \
+ -DImageMagick_Magick++_INCLUDE_DIR=/usr/include/ImageMagick-6 \
+ ..
+ make
+}
+
+check() {
+ ldd "${srcdir}/${pkgname}-${pkgver}/builddir/cuneiform" | grep Magick >/dev/null
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"/builddir
+ make DESTDIR="${pkgdir}" install
+
+ install -Dm644 "${srcdir}/${pkgname}-${pkgver}/cuneiform_src/Kern/license.txt" \
+ "${pkgdir}/usr/share/licenses/cuneiform/license.txt"
+}
diff --git a/libre/cuneiform/libre.patch b/libre/cuneiform/libre.patch
new file mode 100644
index 000000000..4fe59878d
--- /dev/null
+++ b/libre/cuneiform/libre.patch
@@ -0,0 +1,11 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0015a04..679a98d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -33,6 +33,5 @@ include(install_files.cmake)
+
+ #add_subdirectory(tests)
+ add_subdirectory(headers)
+-add_subdirectory(datafiles)
+ add_subdirectory(cuneiform_src)
+