summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Gahde2016-05-28 19:59:32 +0200
committerJakob Gahde2016-05-28 19:59:32 +0200
commiteee3cfcdbe4713a1452527d428fdd8bd1b762e88 (patch)
tree417c5c18b6e264dc6a90c97d1d7418071a1e817f
downloadaur-eee3cfcdbe4713a1452527d428fdd8bd1b762e88.tar.gz
twaindsm 2.3.1-1: Initial package
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD52
-rw-r--r--no-werror.patch15
-rw-r--r--standard-lib-dir.patch12
4 files changed, 100 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..782363fb1c6f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+# Generated by mksrcinfo v8
+# Sat May 28 17:52:36 UTC 2016
+pkgbase = twaindsm
+ pkgdesc = TWAIN Data Source Manager
+ pkgver = 2.3.1
+ pkgrel = 1
+ url = http://twain.org/
+ arch = i686
+ arch = x86_64
+ license = LGPL2.1
+ makedepends = cmake
+ depends = gcc-libs
+ source = https://sourceforge.net/projects/twain-dsm/files/TWAIN%20DSM%202%20Source/twaindsm-2.3.1.source.zip
+ source = standard-lib-dir.patch
+ source = no-werror.patch
+ md5sums = c7787b31cae16ee572fd4d2d1c57f527
+ md5sums = 54b8caf90da42d6d3fc60dd89f097544
+ md5sums = 7880d330686bffad0c00b6a2731be338
+
+pkgname = twaindsm
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a0843471bb47
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Jakob Gahde <j5lx@fmail.co.uk>
+
+pkgname=twaindsm
+pkgver=2.3.1
+pkgrel=1
+pkgdesc="TWAIN Data Source Manager"
+arch=('i686' 'x86_64')
+url="http://twain.org/"
+license=('LGPL2.1')
+depends=('gcc-libs')
+makedepends=('cmake')
+source=("https://sourceforge.net/projects/twain-dsm/files/TWAIN%20DSM%202%20Source/${pkgname}-${pkgver}.source.zip"
+ "standard-lib-dir.patch"
+ "no-werror.patch")
+md5sums=('c7787b31cae16ee572fd4d2d1c57f527'
+ '54b8caf90da42d6d3fc60dd89f097544'
+ '7880d330686bffad0c00b6a2731be338')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}.orig"
+
+ patch -Np1 < "${srcdir}/standard-lib-dir.patch"
+ patch -Np1 < "${srcdir}/no-werror.patch"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}.orig/TWAIN_DSM/src"
+
+ test -d build && rm -rf build
+ mkdir build
+ cd build
+
+ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}.orig/TWAIN_DSM/src/build"
+
+ make install DESTDIR="${pkgdir}"
+
+ # For some reason the people who made the TWAIN specification thought it was
+ # a good idea to put everything in /usr/local on Linux. So in order to comply
+ # with the spec while still having everything in Arch's usual filesystem
+ # hierarchy, we are going to create a few symlinks.
+ install -dm755 "${pkgdir}/usr/lib/twain"
+ install -dm755 "${pkgdir}/usr/local/lib"
+ for i in "${pkgdir}/usr/lib/libtwaindsm.so"*; do
+ ln -s "/usr/lib/$(basename "${i}")" "${pkgdir}/usr/local/lib/$(basename "${i}")"
+ done;
+ ln -s "/usr/lib/twain" "${pkgdir}/usr/local/lib/twain"
+}
diff --git a/no-werror.patch b/no-werror.patch
new file mode 100644
index 000000000000..e951e0e292a2
--- /dev/null
+++ b/no-werror.patch
@@ -0,0 +1,15 @@
+diff -aur package.pristine/TWAIN_DSM/src/CMakeLists.txt package.new/TWAIN_DSM/src/CMakeLists.txt
+--- package.pristine/TWAIN_DSM/src/CMakeLists.txt 2016-05-28 17:58:21.374985878 +0200
++++ package.new/TWAIN_DSM/src/CMakeLists.txt 2016-05-28 17:59:16.161254474 +0200
+@@ -14,9 +14,9 @@
+ #add definitions, compiler switches, etc.
+ IF(APPLE)
+ SET(CMAKE_OSX_ARCHITECTURES "i386;x86_64")
+- ADD_DEFINITIONS(-Wall -Wextra -Werror -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -fexceptions -fPIC)
++ ADD_DEFINITIONS(-Wall -Wextra -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -fexceptions -fPIC)
+ ELSE()
+- ADD_DEFINITIONS(-Wall -Wextra -Werror)
++ ADD_DEFINITIONS(-Wall -Wextra)
+ ENDIF()
+
+ #let's not be sharing our symbols...
diff --git a/standard-lib-dir.patch b/standard-lib-dir.patch
new file mode 100644
index 000000000000..1abf208586a3
--- /dev/null
+++ b/standard-lib-dir.patch
@@ -0,0 +1,12 @@
+diff -aur package.pristine/TWAIN_DSM/src/dsm.h package.new/TWAIN_DSM/src/dsm.h
+--- package.pristine/TWAIN_DSM/src/dsm.h 2016-05-28 19:19:53.266289508 +0200
++++ package.new/TWAIN_DSM/src/dsm.h 2016-05-28 19:21:41.208842006 +0200
+@@ -324,7 +324,7 @@
+ #if (TWNDSM_OS == TWNDSM_OS_MACOSX)
+ #define kTWAIN_DS_DIR "/Library/Image Capture/TWAIN Data Sources"
+ #else
+- #define kTWAIN_DS_DIR "/usr/local/lib/twain"
++ #define kTWAIN_DS_DIR "/usr/lib/twain"
+ #endif
+ #endif
+ typedef unsigned int UINT;