* Re: [PR REVIEW] New package: jbig2enc-0.29
2024-02-21 0:08 [PR PATCH] New package: jbig2enc-0.29 TheEgghead27
@ 2024-02-21 0:12 ` abenson
2024-02-21 0:12 ` abenson
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: abenson @ 2024-02-21 0:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 238 bytes --]
New review comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/48860#discussion_r1496705434
Comment:
Most of those will be detected automatically, you can leave it at just `depends="python3"`
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR REVIEW] New package: jbig2enc-0.29
2024-02-21 0:08 [PR PATCH] New package: jbig2enc-0.29 TheEgghead27
2024-02-21 0:12 ` [PR REVIEW] " abenson
@ 2024-02-21 0:12 ` abenson
2024-02-21 3:21 ` [PR PATCH] [Updated] " TheEgghead27
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: abenson @ 2024-02-21 0:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 179 bytes --]
New review comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/48860#discussion_r1496705572
Comment:
Remove the commented variables.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] New package: jbig2enc-0.29
2024-02-21 0:08 [PR PATCH] New package: jbig2enc-0.29 TheEgghead27
2024-02-21 0:12 ` [PR REVIEW] " abenson
2024-02-21 0:12 ` abenson
@ 2024-02-21 3:21 ` TheEgghead27
2024-02-21 3:21 ` [PR REVIEW] " TheEgghead27
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: TheEgghead27 @ 2024-02-21 3:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]
There is an updated pull request by TheEgghead27 against master on the void-packages repository
https://github.com/TheEgghead27/void-packages jbig2enc
https://github.com/void-linux/void-packages/pull/48860
New package: jbig2enc-0.29
#### Testing the changes
- I tested the changes in this PR: **briefly**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
jbig2enc upstream has been sparsely maintained for a few years, only commits have been bug fixes without a new release tag, with the most recent two patches being necessary for libleptonia linkage.
I personally use this package alongside `ocrmypdf` (via pipx), though `jbig2enc` might not offer much of value to most users.
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- x86_64-musl
- i686
- aarch64 (cross)
A patch file from https://github.com/void-linux/void-packages/pull/48860.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-jbig2enc-48860.patch --]
[-- Type: text/x-diff, Size: 5450 bytes --]
From 6d59a40f4a679c777d4e36217d07b077d87dfa7f Mon Sep 17 00:00:00 2001
From: David Chen <dchen07@protonmail.com>
Date: Tue, 20 Feb 2024 18:50:26 -0500
Subject: [PATCH] New package: jbig2enc-0.29
Signed-off-by: David Chen <dchen07@protonmail.com>
---
.../patches/libleptonica-update.patch | 70 +++++++++++++++++++
.../patches/rename-liblept-libleptonica.patch | 24 +++++++
srcpkgs/jbig2enc/template | 27 +++++++
3 files changed, 121 insertions(+)
create mode 100644 srcpkgs/jbig2enc/patches/libleptonica-update.patch
create mode 100644 srcpkgs/jbig2enc/patches/rename-liblept-libleptonica.patch
create mode 100644 srcpkgs/jbig2enc/template
diff --git a/srcpkgs/jbig2enc/patches/libleptonica-update.patch b/srcpkgs/jbig2enc/patches/libleptonica-update.patch
new file mode 100644
index 0000000000000..aece0c2186138
--- /dev/null
+++ b/srcpkgs/jbig2enc/patches/libleptonica-update.patch
@@ -0,0 +1,70 @@
+From a614bdb580d65653dbfe5c9925940797a065deac Mon Sep 17 00:00:00 2001
+From: Federico <19206300+quaqo@users.noreply.github.com>
+Date: Sun, 8 Jan 2023 14:12:51 +0100
+Subject: [PATCH] Fix build with Leptonica >=1.83
+
+From leptonica 1.83 release notes:
+ * Use stdatomic.h to make cloning string safe. Remove all *GetRefcount() and *ChangeRefcount() accessors.
+ * Remove information about fields in many structs from the public interface allheaders.h, instead putting them in internal files pix_internal.h, array_internal.h and ccbord_internal.h.
+---
+ src/jbig2.cc | 3 +++
+ src/jbig2enc.cc | 8 ++++++++
+ src/jbig2sym.cc | 4 ++++
+ 3 files changed, 15 insertions(+)
+
+diff --git a/src/jbig2.cc b/src/jbig2.cc
+index 0bddb90..baf62ea 100644
+--- a/src/jbig2.cc
++++ b/src/jbig2.cc
+@@ -29,6 +29,9 @@
+ #endif
+
+ #include <leptonica/allheaders.h>
++#if (LIBLEPT_MAJOR_VERSION == 1 && LIBLEPT_MINOR_VERSION >= 83) || LIBLEPT_MAJOR_VERSION > 1
++#include "leptonica/pix_internal.h"
++#endif
+
+ #include "jbig2enc.h"
+
+diff --git a/src/jbig2enc.cc b/src/jbig2enc.cc
+index 7603696..524b26f 100644
+--- a/src/jbig2enc.cc
++++ b/src/jbig2enc.cc
+@@ -24,6 +24,10 @@
+ #include <string.h>
+
+ #include <leptonica/allheaders.h>
++#if (LIBLEPT_MAJOR_VERSION == 1 && LIBLEPT_MINOR_VERSION >= 83) || LIBLEPT_MAJOR_VERSION > 1
++#include "leptonica/pix_internal.h"
++#include "leptonica/array_internal.h"
++#endif
+
+ #include <math.h>
+ #if defined(sun)
+@@ -206,7 +210,11 @@ unite_templates(struct jbig2ctx *ctx,
+ numaSetValue(ctx->classer->naclass, i, new_representant);
+ }
+ }
++#if (LIBLEPT_MAJOR_VERSION == 1 && LIBLEPT_MINOR_VERSION >= 83) || LIBLEPT_MAJOR_VERSION > 1
++ ctx->classer->pixat->pix[new_representant]->refcount += ctx->classer->pixat->pix[second_template]->refcount;
++#else
+ pixChangeRefcount(ctx->classer->pixat->pix[new_representant],pixGetRefcount(ctx->classer->pixat->pix[second_template]));
++#endif
+ }
+ return 0;
+ }
+diff --git a/src/jbig2sym.cc b/src/jbig2sym.cc
+index b419b71..43d2ff9 100644
+--- a/src/jbig2sym.cc
++++ b/src/jbig2sym.cc
+@@ -29,6 +29,10 @@
+ #include <stdio.h>
+
+ #include <leptonica/allheaders.h>
++#if (LIBLEPT_MAJOR_VERSION == 1 && LIBLEPT_MINOR_VERSION >= 83) || LIBLEPT_MAJOR_VERSION > 1
++#include "leptonica/pix_internal.h"
++#include "leptonica/array_internal.h"
++#endif
+
+ #include <math.h>
+
diff --git a/srcpkgs/jbig2enc/patches/rename-liblept-libleptonica.patch b/srcpkgs/jbig2enc/patches/rename-liblept-libleptonica.patch
new file mode 100644
index 0000000000000..b11518fdff41b
--- /dev/null
+++ b/srcpkgs/jbig2enc/patches/rename-liblept-libleptonica.patch
@@ -0,0 +1,24 @@
+From d211d8c9c65fbc103594580484a3b7fa0249e160 Mon Sep 17 00:00:00 2001
+From: Federico <19206300+quaqo@users.noreply.github.com>
+Date: Sun, 8 Jan 2023 20:15:45 +0100
+Subject: [PATCH] Fix autotools with leptonica >= 1.83
+
+From leptonica 1.83 release notes:
+* Rename the autotools generated libraries from liblept to libleptonica
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3b8404b..b38f11e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -73,7 +73,7 @@ AC_CONFIG_COMMANDS([libtool-rpath-patch],
+ fi],
+ [libtool_patch_use_rpath=$enable_rpath])
+
+-AC_CHECK_LIB([lept], [findFileFormatStream], [], [
++AC_CHECK_LIB([leptonica], [findFileFormatStream], [], [
+ echo "Error! Leptonica not detected."
+ exit -1
+ ])
diff --git a/srcpkgs/jbig2enc/template b/srcpkgs/jbig2enc/template
new file mode 100644
index 0000000000000..c2a0c4a10f125
--- /dev/null
+++ b/srcpkgs/jbig2enc/template
@@ -0,0 +1,27 @@
+# Template file for 'jbig2enc'
+pkgname=jbig2enc
+version=0.29
+revision=1
+#archs="i686 x86_64"
+#build_wrksrc=
+build_style=gnu-configure
+#configure_args=""
+#make_build_args=""
+#make_install_args=""
+#conf_files=""
+#make_dirs="/var/log/dir 0755 root root"
+hostmakedepends="autoconf automake pkg-config libtool"
+makedepends="leptonica-devel tiff-devel libpng-devel giflib-devel libwebp-devel"
+depends="leptonica tiff libpng giflib libwebp python3"
+short_desc="JBIG2 Encoder"
+maintainer="David Chen <dchen07@protonmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/agl/jbig2enc"
+#changelog=""
+distfiles="https://github.com/agl/jbig2enc/archive/refs/tags/${version}.tar.gz"
+checksum=bfcf0d0448ee36046af6c776c7271cd5a644855723f0a832d1c0db4de3c21280
+python_version="3"
+
+pre_configure() {
+ ./autogen.sh
+}
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR REVIEW] New package: jbig2enc-0.29
2024-02-21 0:08 [PR PATCH] New package: jbig2enc-0.29 TheEgghead27
` (2 preceding siblings ...)
2024-02-21 3:21 ` [PR PATCH] [Updated] " TheEgghead27
@ 2024-02-21 3:21 ` TheEgghead27
2024-02-23 0:07 ` abenson
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: TheEgghead27 @ 2024-02-21 3:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 178 bytes --]
New review comment by TheEgghead27 on void-packages repository
https://github.com/void-linux/void-packages/pull/48860#discussion_r1496838386
Comment:
Neat! Thanks for the tip.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR REVIEW] New package: jbig2enc-0.29
2024-02-21 0:08 [PR PATCH] New package: jbig2enc-0.29 TheEgghead27
` (3 preceding siblings ...)
2024-02-21 3:21 ` [PR REVIEW] " TheEgghead27
@ 2024-02-23 0:07 ` abenson
2024-02-23 0:32 ` [PR PATCH] [Updated] " TheEgghead27
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: abenson @ 2024-02-23 0:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 210 bytes --]
New review comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/48860#discussion_r1500087078
Comment:
Don't mark something as "Resolved" unless you've addressed it.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] New package: jbig2enc-0.29
2024-02-21 0:08 [PR PATCH] New package: jbig2enc-0.29 TheEgghead27
` (4 preceding siblings ...)
2024-02-23 0:07 ` abenson
@ 2024-02-23 0:32 ` TheEgghead27
2024-02-23 0:33 ` [PR REVIEW] " TheEgghead27
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: TheEgghead27 @ 2024-02-23 0:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]
There is an updated pull request by TheEgghead27 against master on the void-packages repository
https://github.com/TheEgghead27/void-packages jbig2enc
https://github.com/void-linux/void-packages/pull/48860
New package: jbig2enc-0.29
#### Testing the changes
- I tested the changes in this PR: **briefly**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
jbig2enc upstream has been sparsely maintained for a few years, only commits have been bug fixes without a new release tag, with the most recent two patches being necessary for libleptonia linkage.
I personally use this package alongside `ocrmypdf` (via pipx), though `jbig2enc` might not offer much of value to most users.
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- x86_64-musl
- i686
- aarch64 (cross)
A patch file from https://github.com/void-linux/void-packages/pull/48860.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-jbig2enc-48860.patch --]
[-- Type: text/x-diff, Size: 5236 bytes --]
From 4e72b6ae031746b349555b9e4abf601419b07ed9 Mon Sep 17 00:00:00 2001
From: David Chen <dchen07@protonmail.com>
Date: Tue, 20 Feb 2024 18:50:26 -0500
Subject: [PATCH] New package: jbig2enc-0.29
Signed-off-by: David Chen <dchen07@protonmail.com>
---
.../patches/libleptonica-update.patch | 70 +++++++++++++++++++
.../patches/rename-liblept-libleptonica.patch | 24 +++++++
srcpkgs/jbig2enc/template | 19 +++++
3 files changed, 113 insertions(+)
create mode 100644 srcpkgs/jbig2enc/patches/libleptonica-update.patch
create mode 100644 srcpkgs/jbig2enc/patches/rename-liblept-libleptonica.patch
create mode 100644 srcpkgs/jbig2enc/template
diff --git a/srcpkgs/jbig2enc/patches/libleptonica-update.patch b/srcpkgs/jbig2enc/patches/libleptonica-update.patch
new file mode 100644
index 0000000000000..aece0c2186138
--- /dev/null
+++ b/srcpkgs/jbig2enc/patches/libleptonica-update.patch
@@ -0,0 +1,70 @@
+From a614bdb580d65653dbfe5c9925940797a065deac Mon Sep 17 00:00:00 2001
+From: Federico <19206300+quaqo@users.noreply.github.com>
+Date: Sun, 8 Jan 2023 14:12:51 +0100
+Subject: [PATCH] Fix build with Leptonica >=1.83
+
+From leptonica 1.83 release notes:
+ * Use stdatomic.h to make cloning string safe. Remove all *GetRefcount() and *ChangeRefcount() accessors.
+ * Remove information about fields in many structs from the public interface allheaders.h, instead putting them in internal files pix_internal.h, array_internal.h and ccbord_internal.h.
+---
+ src/jbig2.cc | 3 +++
+ src/jbig2enc.cc | 8 ++++++++
+ src/jbig2sym.cc | 4 ++++
+ 3 files changed, 15 insertions(+)
+
+diff --git a/src/jbig2.cc b/src/jbig2.cc
+index 0bddb90..baf62ea 100644
+--- a/src/jbig2.cc
++++ b/src/jbig2.cc
+@@ -29,6 +29,9 @@
+ #endif
+
+ #include <leptonica/allheaders.h>
++#if (LIBLEPT_MAJOR_VERSION == 1 && LIBLEPT_MINOR_VERSION >= 83) || LIBLEPT_MAJOR_VERSION > 1
++#include "leptonica/pix_internal.h"
++#endif
+
+ #include "jbig2enc.h"
+
+diff --git a/src/jbig2enc.cc b/src/jbig2enc.cc
+index 7603696..524b26f 100644
+--- a/src/jbig2enc.cc
++++ b/src/jbig2enc.cc
+@@ -24,6 +24,10 @@
+ #include <string.h>
+
+ #include <leptonica/allheaders.h>
++#if (LIBLEPT_MAJOR_VERSION == 1 && LIBLEPT_MINOR_VERSION >= 83) || LIBLEPT_MAJOR_VERSION > 1
++#include "leptonica/pix_internal.h"
++#include "leptonica/array_internal.h"
++#endif
+
+ #include <math.h>
+ #if defined(sun)
+@@ -206,7 +210,11 @@ unite_templates(struct jbig2ctx *ctx,
+ numaSetValue(ctx->classer->naclass, i, new_representant);
+ }
+ }
++#if (LIBLEPT_MAJOR_VERSION == 1 && LIBLEPT_MINOR_VERSION >= 83) || LIBLEPT_MAJOR_VERSION > 1
++ ctx->classer->pixat->pix[new_representant]->refcount += ctx->classer->pixat->pix[second_template]->refcount;
++#else
+ pixChangeRefcount(ctx->classer->pixat->pix[new_representant],pixGetRefcount(ctx->classer->pixat->pix[second_template]));
++#endif
+ }
+ return 0;
+ }
+diff --git a/src/jbig2sym.cc b/src/jbig2sym.cc
+index b419b71..43d2ff9 100644
+--- a/src/jbig2sym.cc
++++ b/src/jbig2sym.cc
+@@ -29,6 +29,10 @@
+ #include <stdio.h>
+
+ #include <leptonica/allheaders.h>
++#if (LIBLEPT_MAJOR_VERSION == 1 && LIBLEPT_MINOR_VERSION >= 83) || LIBLEPT_MAJOR_VERSION > 1
++#include "leptonica/pix_internal.h"
++#include "leptonica/array_internal.h"
++#endif
+
+ #include <math.h>
+
diff --git a/srcpkgs/jbig2enc/patches/rename-liblept-libleptonica.patch b/srcpkgs/jbig2enc/patches/rename-liblept-libleptonica.patch
new file mode 100644
index 0000000000000..b11518fdff41b
--- /dev/null
+++ b/srcpkgs/jbig2enc/patches/rename-liblept-libleptonica.patch
@@ -0,0 +1,24 @@
+From d211d8c9c65fbc103594580484a3b7fa0249e160 Mon Sep 17 00:00:00 2001
+From: Federico <19206300+quaqo@users.noreply.github.com>
+Date: Sun, 8 Jan 2023 20:15:45 +0100
+Subject: [PATCH] Fix autotools with leptonica >= 1.83
+
+From leptonica 1.83 release notes:
+* Rename the autotools generated libraries from liblept to libleptonica
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3b8404b..b38f11e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -73,7 +73,7 @@ AC_CONFIG_COMMANDS([libtool-rpath-patch],
+ fi],
+ [libtool_patch_use_rpath=$enable_rpath])
+
+-AC_CHECK_LIB([lept], [findFileFormatStream], [], [
++AC_CHECK_LIB([leptonica], [findFileFormatStream], [], [
+ echo "Error! Leptonica not detected."
+ exit -1
+ ])
diff --git a/srcpkgs/jbig2enc/template b/srcpkgs/jbig2enc/template
new file mode 100644
index 0000000000000..67a31392458d2
--- /dev/null
+++ b/srcpkgs/jbig2enc/template
@@ -0,0 +1,19 @@
+# Template file for 'jbig2enc'
+pkgname=jbig2enc
+version=0.29
+revision=1
+build_style=gnu-configure
+hostmakedepends="autoconf automake pkg-config libtool"
+makedepends="leptonica-devel tiff-devel libpng-devel giflib-devel libwebp-devel"
+depends="python3"
+short_desc="JBIG2 Encoder"
+maintainer="David Chen <dchen07@protonmail.com>"
+license="Apache-2.0"
+homepage="https://github.com/agl/jbig2enc"
+distfiles="https://github.com/agl/jbig2enc/archive/refs/tags/${version}.tar.gz"
+checksum=bfcf0d0448ee36046af6c776c7271cd5a644855723f0a832d1c0db4de3c21280
+python_version="3"
+
+pre_configure() {
+ ./autogen.sh
+}
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR REVIEW] New package: jbig2enc-0.29
2024-02-21 0:08 [PR PATCH] New package: jbig2enc-0.29 TheEgghead27
` (5 preceding siblings ...)
2024-02-23 0:32 ` [PR PATCH] [Updated] " TheEgghead27
@ 2024-02-23 0:33 ` TheEgghead27
2024-03-21 21:55 ` arbitrarygit
2024-06-20 1:47 ` github-actions
8 siblings, 0 replies; 10+ messages in thread
From: TheEgghead27 @ 2024-02-23 0:33 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 219 bytes --]
New review comment by TheEgghead27 on void-packages repository
https://github.com/void-linux/void-packages/pull/48860#discussion_r1500102446
Comment:
Sorry about that, forgot the `-a` flag in my `git commit --amend`.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: New package: jbig2enc-0.29
2024-02-21 0:08 [PR PATCH] New package: jbig2enc-0.29 TheEgghead27
` (6 preceding siblings ...)
2024-02-23 0:33 ` [PR REVIEW] " TheEgghead27
@ 2024-03-21 21:55 ` arbitrarygit
2024-06-20 1:47 ` github-actions
8 siblings, 0 replies; 10+ messages in thread
From: arbitrarygit @ 2024-03-21 21:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 471 bytes --]
New comment by arbitrarygit on void-packages repository
https://github.com/void-linux/void-packages/pull/48860#issuecomment-2013881770
Comment:
I want to report that I built this package a little over a week ago using this template, and have been running it successfully. I primarily use it with OCRmyPDF, and have converted a few hundred pages to jbig2 using this with no issues.
- Build arch: x86_64 glibc
- Testing on: x86_64 glibc
Hope this is of some help.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: New package: jbig2enc-0.29
2024-02-21 0:08 [PR PATCH] New package: jbig2enc-0.29 TheEgghead27
` (7 preceding siblings ...)
2024-03-21 21:55 ` arbitrarygit
@ 2024-06-20 1:47 ` github-actions
8 siblings, 0 replies; 10+ messages in thread
From: github-actions @ 2024-06-20 1:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/48860#issuecomment-2179668562
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 10+ messages in thread