commit:     109f3017d88392afc0ceaf5216454828c007f344
Author:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 23 16:51:08 2019 +0000
Commit:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Fri Aug 23 16:54:45 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=109f3017

media-libs/libinsane: initial import

New dependency for app-text/paperwork

Package-Manager: Portage-2.3.72, Repoman-2.3.17
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>

 media-libs/libinsane/Manifest                      |  1 +
 .../files/libinsane-1.0.1-meson_options.patch      | 39 ++++++++++++++++++
 media-libs/libinsane/libinsane-1.0.1.ebuild        | 46 ++++++++++++++++++++++
 media-libs/libinsane/metadata.xml                  | 20 ++++++++++
 4 files changed, 106 insertions(+)

diff --git a/media-libs/libinsane/Manifest b/media-libs/libinsane/Manifest
new file mode 100644
index 00000000000..aa253766695
--- /dev/null
+++ b/media-libs/libinsane/Manifest
@@ -0,0 +1 @@
+DIST libinsane-1.0.1.tar.gz 706575 BLAKE2B 
32ae63c275e6e9c709aefd0c6ed2237df70ad027626cf6ded2009071c74ce925d50ab730bd36b677915d2bd6e606d6337e890cfcc3e8bf4a1f281e026140537a
 SHA512 
1b7091b207b8ea559f21084aa8231c62f34dfa6043e9f358d55708006989c50ee131011dbe5bd03bcd1212cd0219ae9d65a544e57cf3a71c4c2f65e5d89257bc

diff --git a/media-libs/libinsane/files/libinsane-1.0.1-meson_options.patch 
b/media-libs/libinsane/files/libinsane-1.0.1-meson_options.patch
new file mode 100644
index 00000000000..a56bba0c16f
--- /dev/null
+++ b/media-libs/libinsane/files/libinsane-1.0.1-meson_options.patch
@@ -0,0 +1,39 @@
+diff -Naur libinsane-1.0.1.orig/meson_options.txt 
libinsane-1.0.1/meson_options.txt
+--- libinsane-1.0.1.orig/meson_options.txt     1970-01-01 01:00:00.000000000 
+0100
++++ libinsane-1.0.1/meson_options.txt  2019-08-23 15:14:21.374086921 +0200
+@@ -0,0 +1 @@
++option('doc', type: 'boolean', value: true, yield: true)
+diff -Naur libinsane-1.0.1.orig/subprojects/libinsane/meson.build 
libinsane-1.0.1/subprojects/libinsane/meson.build
+--- libinsane-1.0.1.orig/subprojects/libinsane/meson.build     2019-08-18 
13:09:37.000000000 +0200
++++ libinsane-1.0.1/subprojects/libinsane/meson.build  2019-08-23 
15:16:14.289190985 +0200
+@@ -22,6 +22,8 @@
+ subdir('include')
+ subdir('src')
+ 
+-subdir('doc')
++if get_option('doc')
++    subdir('doc')
++endif
+ subdir('examples')
+ subdir('tests')
+diff -Naur libinsane-1.0.1.orig/subprojects/libinsane/meson_options.txt 
libinsane-1.0.1/subprojects/libinsane/meson_options.txt
+--- libinsane-1.0.1.orig/subprojects/libinsane/meson_options.txt       
1970-01-01 01:00:00.000000000 +0100
++++ libinsane-1.0.1/subprojects/libinsane/meson_options.txt    2019-08-23 
15:14:51.290114436 +0200
+@@ -0,0 +1 @@
++option('doc', type: 'boolean', value: true, yield: true)
+diff -Naur libinsane-1.0.1.orig/subprojects/libinsane-gobject/meson.build 
libinsane-1.0.1/subprojects/libinsane-gobject/meson.build
+--- libinsane-1.0.1.orig/subprojects/libinsane-gobject/meson.build     
2019-08-18 13:09:37.000000000 +0200
++++ libinsane-1.0.1/subprojects/libinsane-gobject/meson.build  2019-08-23 
15:15:25.593146036 +0200
+@@ -9,4 +9,6 @@
+ 
+ subdir('include')
+ subdir('src')
+-subdir('doc')
++if get_option('doc')
++    subdir('doc')
++endif
+diff -Naur 
libinsane-1.0.1.orig/subprojects/libinsane-gobject/meson_options.txt 
libinsane-1.0.1/subprojects/libinsane-gobject/meson_options.txt
+--- libinsane-1.0.1.orig/subprojects/libinsane-gobject/meson_options.txt       
1970-01-01 01:00:00.000000000 +0100
++++ libinsane-1.0.1/subprojects/libinsane-gobject/meson_options.txt    
2019-08-23 15:14:53.859116801 +0200
+@@ -0,0 +1 @@
++option('doc', type: 'boolean', value: true, yield: true)

diff --git a/media-libs/libinsane/libinsane-1.0.1.ebuild 
b/media-libs/libinsane/libinsane-1.0.1.ebuild
new file mode 100644
index 00000000000..a2d1169ab99
--- /dev/null
+++ b/media-libs/libinsane/libinsane-1.0.1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit meson vala
+
+DESCRIPTION="Crossplatform access to image scanners"
+HOMEPAGE="https://gitlab.gnome.org/World/OpenPaperwork/libinsane";
+SRC_URI="https://gitlab.gnome.org/World/OpenPaperwork/libinsane/-/archive/${PV}/${P}.tar.gz";
+
+LICENSE="LGPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc gtk-doc test"
+
+RDEPEND="media-gfx/sane-backends"
+DEPEND="${RDEPEND}
+       doc? (
+               app-doc/doxygen
+               dev-util/gtk-doc
+       )
+       test? (
+               dev-util/cunit
+               dev-util/valgrind
+       )"
+
+BDEPEND="virtual/pkgconfig
+       $(vala_depend)"
+
+# Tests require an operational valgrind
+# https://wiki.gentoo.org/wiki/Debugging
+RESTRICT="test"
+:
+PATCHES=( "${FILESDIR}"/${P}-meson_options.patch )
+
+src_prepare() {
+       vala_src_prepare
+       default
+}
+
+src_configure() {
+       local emesonargs=(
+               $(meson_use doc doc)
+       )
+       meson_src_configure
+}

diff --git a/media-libs/libinsane/metadata.xml 
b/media-libs/libinsane/metadata.xml
new file mode 100644
index 00000000000..2b345ff1a9a
--- /dev/null
+++ b/media-libs/libinsane/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+  <maintainer type="person">
+    <email>[email protected]</email>
+    <name>Bernard Cafarelli</name>
+  </maintainer>
+  <longdescription lang="en">
+Libinsane is the library to access scanners on both Linux and Windows. It's 
cross-platform, cross-programming languages, cross-scanners :-). It takes care 
of all the quirks of all the platforms and scanners
+
+It has however some limitations:
+
+* It is only designed to work with scanners, not webcams, not USB keys, etc 
(think paper-eaters only)
+* TWAIN API may display some dialogs. Libinsane cannot prevent them.
+* Full bed page scan only: Presence of the option to set the scan area cannot 
be guaranteed. You may have to crop the image later in your own application 
(see Paperwork for example).
+* 24 bits color scans only (may be fixed later)
+
+It is the successor of Pyinsane2 but shares no code with it.
+  </longdescription>
+</pkgmetadata>

Reply via email to