summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-08-30 00:35:05 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-09-04 19:22:23 -0300
commit9cdecfa6d86591c752cc2c23b1920ac1598b8cc2 (patch)
treeb8171ce8d494707de4afa1b6b1325fb2d25cf715 /libre
parentc00410ae2885ebf7cbbbc8ee2c566491379ffed5 (diff)
downloadabslibre-9cdecfa6d86591c752cc2c23b1920ac1598b8cc2.tar.gz
abslibre-9cdecfa6d86591c752cc2c23b1920ac1598b8cc2.tar.bz2
abslibre-9cdecfa6d86591c752cc2c23b1920ac1598b8cc2.zip
cuneiform: add new package to [libre] - Freedom issue #1054 -> https://labs.parabola.nu/issues/1054
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)
+