Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: paperwork-2.2.2
@ 2024-05-09 19:49 idealist1508
  2024-05-10  1:49 ` abenson
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: idealist1508 @ 2024-05-09 19:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]

There is a new pull request by idealist1508 against master on the void-packages repository

https://github.com/idealist1508/void-packages paperwork
https://github.com/void-linux/void-packages/pull/50265

New package: paperwork-2.2.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**


#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**


<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)



A patch file from https://github.com/void-linux/void-packages/pull/50265.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-paperwork-50265.patch --]
[-- Type: text/x-diff, Size: 10538 bytes --]

From 58695114e61a2c876a26c0ff7802ae13fae8e42d Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Thu, 9 May 2024 21:33:08 +0200
Subject: [PATCH] New package: paperwork-2.2.2

---
 srcpkgs/libinsane/template                    | 14 +++++
 srcpkgs/libpillowfight/template               | 27 +++++++++
 .../paperwork/patches/Fix4Scipy1.13.0.patch   | 55 +++++++++++++++++++
 srcpkgs/paperwork/template                    | 40 ++++++++++++++
 srcpkgs/python3-fabulous/template             | 13 +++++
 srcpkgs/python3-pillowfight/template          | 23 ++++++++
 srcpkgs/python3-pyocr/template                | 22 ++++++++
 7 files changed, 194 insertions(+)
 create mode 100644 srcpkgs/libinsane/template
 create mode 100644 srcpkgs/libpillowfight/template
 create mode 100644 srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch
 create mode 100644 srcpkgs/paperwork/template
 create mode 100644 srcpkgs/python3-fabulous/template
 create mode 100644 srcpkgs/python3-pillowfight/template
 create mode 100644 srcpkgs/python3-pyocr/template

diff --git a/srcpkgs/libinsane/template b/srcpkgs/libinsane/template
new file mode 100644
index 00000000000000..cc709da692065d
--- /dev/null
+++ b/srcpkgs/libinsane/template
@@ -0,0 +1,14 @@
+# Template file for 'libinsane'
+pkgname=libinsane
+version=1.0.10
+revision=1
+build_style=gnu-makefile
+hostmakedepends="meson pkg-config sane-devel vala-devel glib-devel gobject-introspection gtk-doc"
+depends="sane"
+short_desc="Crossplatform library to access scanners"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="LGPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libinsane"
+#changelog=""
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/$pkgname/-/archive/$version/$pkgname-$version.tar.gz"
+checksum=a9b8daaef03eb3bc4a8e638131e506ff3c2f99f715170da572e7f5ce7ba76467
diff --git a/srcpkgs/libpillowfight/template b/srcpkgs/libpillowfight/template
new file mode 100644
index 00000000000000..2c3309416b6b65
--- /dev/null
+++ b/srcpkgs/libpillowfight/template
@@ -0,0 +1,27 @@
+# Template file for 'libpillowfight'
+pkgname=libpillowfight
+version=0.3.0
+revision=1
+build_style=gnu-makefile
+hostmakedepends="cmake python3 python3-wheel python3-pip"
+makedepends="python3-setuptools_scm python3-devel"
+depends="python3-pillow-simd"
+short_desc="Small library containing various image processing algorithms"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-2.0-only"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight"
+python_version=3
+
+_COMMIT="50d965879eb89fdef9be09d6e934329486ff585d"
+
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/-/archive/${_COMMIT}/libpillowfight-${version}.tar.bz2"
+checksum=0f39a6b0099bf246e961e30ddb9d3c19e8f9460ee24fbfa5c463cda196209327
+
+export CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr"
+export PIP_ARGS="--root=/usr"
+
+pre_build() {
+	cat > src/pillowfight/_version.h <<- EOF || die
+		#define INTERNAL_PILLOWFIGHT_VERSION "$version"
+	EOF
+}
diff --git a/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch b/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch
new file mode 100644
index 00000000000000..9add28626a23a7
--- /dev/null
+++ b/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch
@@ -0,0 +1,55 @@
+From abcebfe9714644d4e259e53b10e0e9417b5b864f Mon Sep 17 00:00:00 2001
+From: Jerome Flesch <jflesch@openpaper.work>
+Date: Sun, 21 Apr 2024 13:31:03 +0200
+Subject: [PATCH] backend/guesswork/labels/sklearn: fix use of
+ scipy.sparse.hstack() + numpy.zeros()
+
+Closes #1111
+---
+ .../paperwork_backend/guesswork/label/sklearn/__init__.py   | 5 +++--
+ paperwork-backend/src/paperwork_backend/model/fake.py       | 6 ++++++
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/paperwork-backend/src/paperwork_backend/guesswork/label/sklearn/__init__.py b/paperwork-backend/src/paperwork_backend/guesswork/label/sklearn/__init__.py
+index b2af4350..8633211f 100644
+--- a/paperwork-backend/src/paperwork_backend/guesswork/label/sklearn/__init__.py
++++ b/paperwork-backend/src/paperwork_backend/guesswork/label/sklearn/__init__.py
+@@ -191,7 +191,8 @@ class UpdatableVectorizer(object):
+             )
+             if required_padding > 0:
+                 doc_vector = numpy.hstack([
+-                    doc_vector, numpy.zeros((required_padding,))
++                    doc_vector,
++                    numpy.zeros((required_padding,))
+                 ])
+             if sum_features is None:
+                 sum_features = doc_vector
+@@ -339,7 +340,7 @@ class Corpus(object):
+             if required_padding > 0:
+                 doc_vector = scipy.sparse.hstack([
+                     scipy.sparse.csr_matrix(doc_vector),
+-                    numpy.zeros((required_padding,))
++                    numpy.zeros((1, required_padding))
+                 ])
+             else:
+                 doc_vector = scipy.sparse.csr_matrix(doc_vector)
+diff --git a/paperwork-backend/src/paperwork_backend/model/fake.py b/paperwork-backend/src/paperwork_backend/model/fake.py
+index 29beae97..f06fe18e 100644
+--- a/paperwork-backend/src/paperwork_backend/model/fake.py
++++ b/paperwork-backend/src/paperwork_backend/model/fake.py
+@@ -125,6 +125,12 @@ class Plugin(openpaperwork_core.PluginBase):
+             if doc['url'] == doc_url:
+                 out.update(doc['labels'])
+ 
++    def doc_has_labels_by_url(self, doc_url):
++        for doc in self.docs:
++            if doc['url'] == doc_url:
++                return True if len(doc["labels"]) > 0 else None
++        return None
++
+     def doc_add_label_by_url(self, doc_url, label, color=None):
+         if color is None:
+             all_labels = set()
+-- 
+GitLab
+
diff --git a/srcpkgs/paperwork/template b/srcpkgs/paperwork/template
new file mode 100644
index 00000000000000..2b4151225a7db7
--- /dev/null
+++ b/srcpkgs/paperwork/template
@@ -0,0 +1,40 @@
+# Template file for 'paperwork'
+pkgname=paperwork
+version=2.2.2
+revision=1
+short_desc="Personal document manager for scanned documents (and PDFs)"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://www.openpaper.work/"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/archive/${version}/paperwork-${version}.tar.bz2"
+checksum=006b4f95d9c5665dbcd0cdbd851f7164f0abc5fbf91138157f3768d9cae3ff51
+
+python_version=3
+hostmakedepends="gettext which"
+makedepends="python3-pillow-simd python3-pillowfight python3-build python3-installer python3-setuptools_scm python3-wheel python3-distro python3-psutil python3-numpy python3-scipy python3-scikit-learn python3-pycountry python3-Whoosh python3-xdg python3-pyocr"
+depends="poppler-glib python3-distro python3-rich python3-psutil python3-pillowfight python3-pillow-simd python3-gobject python3-numpy python3-scipy python3-scikit-learn python3-distutils-extra python3-pycountry python3-Whoosh python3-xdg python3-fabulous python3-pyocr"
+
+export SETUPTOOLS_SCM_PRETEND_VERSION=${version}
+
+do_build() {
+	make l10n_compile
+
+	for dir in openpaperwork-{core,gtk} paperwork-{backend,shell,gtk}; do
+		pushd $dir
+		python -m build --wheel --no-isolation
+		popd
+	done
+}
+
+do_install() {
+	for dir in openpaperwork-{core,gtk} paperwork-{backend,shell,gtk}; do
+		pushd $dir
+		python -m installer --destdir="$DESTDIR" dist/*.whl
+		popd
+	done
+
+ PYTHONPATH="$DESTDIR"$(python -c 'import site; print(site.getsitepackages()[0])') \
+	"$DESTDIR"/usr/bin/paperwork-gtk install \
+	--icon_base_dir="$DESTDIR/usr/share/icons" \
+	--data_base_dir="$DESTDIR/usr/share"
+}
diff --git a/srcpkgs/python3-fabulous/template b/srcpkgs/python3-fabulous/template
new file mode 100644
index 00000000000000..6dbca5e73c3763
--- /dev/null
+++ b/srcpkgs/python3-fabulous/template
@@ -0,0 +1,13 @@
+# Template file for 'python3-fabulous'
+_pkgname=fabulous
+pkgname=python3-fabulous
+version=0.4.0
+revision=1
+build_style=python3-module
+makedepends="python3-build python3-installer python3-setuptools_scm python3-wheel"
+short_desc="Print images, colors, and stylish text to the terminal with Python"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="Apache-2.0"
+homepage="https://github.com/jart/fabulous"
+distfiles="https://github.com/jart/$_pkgname/releases/download/$version/$_pkgname-$version.tar.gz"
+checksum=60ae547be786b5c19b555939453ea8c1e906b99a93847c8baa65e7154801d14a
diff --git a/srcpkgs/python3-pillowfight/template b/srcpkgs/python3-pillowfight/template
new file mode 100644
index 00000000000000..fc383d241b0393
--- /dev/null
+++ b/srcpkgs/python3-pillowfight/template
@@ -0,0 +1,23 @@
+# Template file for 'python3-pillowfight'
+pkgname=python3-pillowfight
+version=0.3.0
+revision=1
+build_style=python3-module
+hostmakedepends="python3 python3-wheel python3-pip"
+makedepends="python3-setuptools_scm python3-devel"
+depends="python3-pillow-simd"
+short_desc="Python bindings for libpillowfigh"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight"
+python_version=3
+
+_COMMIT="50d965879eb89fdef9be09d6e934329486ff585d"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/-/archive/${_COMMIT}/libpillowfight-${version}.tar.bz2"
+checksum=0f39a6b0099bf246e961e30ddb9d3c19e8f9460ee24fbfa5c463cda196209327
+
+pre_build() {
+	cat > src/pillowfight/_version.h <<- EOF || die
+		#define INTERNAL_PILLOWFIGHT_VERSION "$version"
+	EOF
+}
diff --git a/srcpkgs/python3-pyocr/template b/srcpkgs/python3-pyocr/template
new file mode 100644
index 00000000000000..a32327722329d3
--- /dev/null
+++ b/srcpkgs/python3-pyocr/template
@@ -0,0 +1,22 @@
+# Template file for 'python3-pyocr'
+pkgname=python3-pyocr
+version=0.8.5
+revision=1
+build_style=python3-module
+makedepends="python3-build python3-installer python3-setuptools_scm python3-wheel"
+depends="tesseract-ocr"
+short_desc="Python wrapper for Tesseract and Cuneiform"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/pyocr"
+_COMMIT="ca191ba776743fe10a1c3dd99eaa82626ee4edc1"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/pyocr/-/archive/${_COMMIT}/pyocr-${version}.tar.bz2"
+checksum=ba9c63cfac7bb6e441590053954466b41768e6b87f1b279c2d62460cad8bb174
+
+do_build() {
+	python -m build --wheel --no-isolation
+}
+
+do_install() {
+	python -m installer --destdir="$DESTDIR" dist/*.whl
+}

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2024-05-24 15:04 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
2024-05-10  1:49 ` abenson
2024-05-10  1:49 ` [PR REVIEW] " abenson
2024-05-10  1:49 ` abenson
2024-05-10  1:51 ` abenson
2024-05-10  1:51 ` abenson
2024-05-10  1:51 ` abenson
2024-05-10  7:25 ` [PR PATCH] [Updated] " idealist1508
2024-05-10  7:28 ` idealist1508
2024-05-11  3:03 ` [PR REVIEW] " abenson
2024-05-11  3:06 ` abenson
2024-05-11 12:56 ` [PR PATCH] [Updated] " idealist1508
2024-05-11 13:01 ` idealist1508
2024-05-11 13:03 ` [PR REVIEW] " idealist1508
2024-05-11 13:34 ` idealist1508
2024-05-11 19:19 ` abenson
2024-05-11 19:19 ` abenson
2024-05-11 19:19 ` abenson
2024-05-11 19:21 ` abenson
2024-05-11 19:21 ` abenson
2024-05-14 19:45 ` [PR PATCH] [Updated] " idealist1508
2024-05-14 19:47 ` [PR REVIEW] " idealist1508
2024-05-14 19:58 ` [PR PATCH] [Updated] " idealist1508
2024-05-24 15:04 ` idealist1508

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).