* [PR PATCH] zbar-qt: split from zbar template
@ 2022-07-10 11:05 sgn
2022-07-11 21:20 ` [PR PATCH] [Closed]: " paper42
0 siblings, 1 reply; 2+ messages in thread
From: sgn @ 2022-07-10 11:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1391 bytes --]
There is a new pull request by sgn against master on the void-packages repository
https://github.com/sgn/void-packages zbar-qt
https://github.com/void-linux/void-packages/pull/37971
zbar-qt: split from zbar template
```
Avoid cycle:
gst-plugins-bad1 -> zbar
^ |
| v
gtk4 <- libinput <- qt5
```
Close #37948
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->
<!-- 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, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/37971.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-zbar-qt-37971.patch --]
[-- Type: text/x-diff, Size: 7521 bytes --]
From 4f431cd2d2c61c7572f4a89aa3e8f17cd2caf927 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
<congdanhqx@gmail.com>
Date: Sun, 10 Jul 2022 18:00:49 +0700
Subject: [PATCH] zbar-qt: split from zbar template
Avoid cycle:
gst-plugins-bad1 -> zbar
^ |
| v
gtk4 <- libinput <- qt5
Close #37948
---
srcpkgs/libzbar-qt | 2 +-
srcpkgs/libzbar-qt-devel | 1 +
srcpkgs/zbar-qt | 1 -
srcpkgs/zbar-qt/template | 103 +++++++++++++++++++++++++++++++++++++++
srcpkgs/zbar-qt/update | 1 +
srcpkgs/zbar/template | 67 ++++---------------------
6 files changed, 116 insertions(+), 59 deletions(-)
create mode 120000 srcpkgs/libzbar-qt-devel
delete mode 120000 srcpkgs/zbar-qt
create mode 100644 srcpkgs/zbar-qt/template
create mode 100644 srcpkgs/zbar-qt/update
diff --git a/srcpkgs/libzbar-qt b/srcpkgs/libzbar-qt
index 8660d16a458f..5a72830bab2e 120000
--- a/srcpkgs/libzbar-qt
+++ b/srcpkgs/libzbar-qt
@@ -1 +1 @@
-zbar
\ No newline at end of file
+zbar-qt
\ No newline at end of file
diff --git a/srcpkgs/libzbar-qt-devel b/srcpkgs/libzbar-qt-devel
new file mode 120000
index 000000000000..5a72830bab2e
--- /dev/null
+++ b/srcpkgs/libzbar-qt-devel
@@ -0,0 +1 @@
+zbar-qt
\ No newline at end of file
diff --git a/srcpkgs/zbar-qt b/srcpkgs/zbar-qt
deleted file mode 120000
index 8660d16a458f..000000000000
--- a/srcpkgs/zbar-qt
+++ /dev/null
@@ -1 +0,0 @@
-zbar
\ No newline at end of file
diff --git a/srcpkgs/zbar-qt/template b/srcpkgs/zbar-qt/template
new file mode 100644
index 000000000000..16ef561ec2ac
--- /dev/null
+++ b/srcpkgs/zbar-qt/template
@@ -0,0 +1,103 @@
+# Template file for 'zbar-qt'
+# Keep in sync with zbar
+pkgname=zbar-qt
+version=0.23.1
+revision=6
+wrksrc="zbar-$version"
+build_style=gnu-configure
+configure_args="--with-qt --without-gir --without-gtk --without-python"
+hostmakedepends="pkg-config qt5-qmake qt5-host-tools"
+makedepends="libmagick-devel libXv-devel v4l-utils-devel qt5-x11extras-devel
+ libxml2-devel"
+depends="libzbar-qt>=${version}_${revision}"
+short_desc="Barcode reading library and application - Qt frondend"
+maintainer="Leah Neukirchen <leah@vuxu.org>"
+license="LGPL-2.1-or-later"
+homepage="https://git.linuxtv.org/zbar.git/"
+distfiles="https://linuxtv.org/downloads/zbar/zbar-${version}.tar.bz2"
+checksum=dad260b47ef887a639e840a89e5e6e132217b6bba2a8473565d1f459bcb97c1f
+
+case "$XBPS_TARGET_MACHINE" in
+ mips*)
+ broken="don't enable qt as it can't be built for mips*"
+ ;;
+esac
+
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+ makedepends+=" argp-standalone"
+ LDFLAGS="-largp"
+fi
+
+CFLAGS="-DNDEBUG"
+
+post_extract() {
+ # 0.23.1 doesn't ship this file, corrected in master
+ cat >zbar-qt5.pc.in <<-'_EOF'
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ libdir=@libdir@
+ includedir=@includedir@
+
+ Name: zbar-qt
+ Description: bar code scanning and decoding Qt5 widget
+ URL: http://zbar.sourceforge.net
+ Version: @VERSION@
+ Requires: zbar, Qt5Core >= 5, Qt5Gui >= 5
+ Libs: -L${libdir} -lzbarqt
+ Cflags: -I${includedir}
+ _EOF
+}
+
+post_patch() {
+ # https://github.com/mchehab/zbar/commit/a133aea7880bbb56d7553
+ vsed -i -e 's/^.include.*gettext[.]h.*/#include <locale.h>/' \
+ zbarcam/zbarcam.c zbarimg/zbarimg.c
+}
+
+post_install() {
+ local _file
+ # shipped by zbar
+ rm -rf "$DESTDIR"/etc
+ rm -rf "$DESTDIR"/usr/bin/zbarcam
+ # rm -rf "$DESTDIR"/usr/bin/zbarcam-gtk
+ rm -rf "$DESTDIR"/usr/bin/zbarimg
+ # shipped by zbar, libzbar-devel
+ rm -rf "$DESTDIR"/usr/share
+ # shipped by libzbar and libzbar-devel
+ rm -rf "$DESTDIR"/usr/lib/girepository-1.0
+ rm -rf "$DESTDIR"/usr/lib/libzbar.so*
+ # rm -rf "$DESTDIR"/usr/lib/libzbargtk.so*
+ rm -rf "$DESTDIR"/usr/lib/python*
+ # shipped by libzbar-devel
+ rm -rf "$DESTDIR"/usr/include/zbar.h
+ for _file in "$DESTDIR"/usr/include/zbar/*; do
+ case _file in
+ "$DESTDIR"/usr/include/zbar/QZBar*) ;;
+ *) rm -rf "$_file" ;;
+ esac
+ done
+ rm -rf "$DESTDIR"/usr/lib/libzbar.a
+ # rm -rf "$DESTDIR"/usr/lib/libzbargtk.a
+ rm -rf "$DESTDIR"/usr/lib/pkgconfig/zbar.pc
+ rm -rf "$DESTDIR"/usr/lib/pkgconfig/zbar-gtk.pc
+}
+
+libzbar-qt_package() {
+ conflicts="libzbar<0.10_10"
+ short_desc="${short_desc/frondend/bindings}"
+ pkg_install() {
+ vmove "usr/lib/libzbarqt.so.*"
+ }
+}
+
+libzbar-qt-devel_package() {
+ short_desc+=" - development files"
+ depends="libzbar-qt>=${version}_${revision}
+ libzbar-devel>=${version}_${revision}"
+ pkg_install() {
+ vmove usr/include
+ vmove usr/lib/pkgconfig
+ vmove "usr/lib/*.a"
+ vmove "usr/lib/*.so"
+ }
+}
diff --git a/srcpkgs/zbar-qt/update b/srcpkgs/zbar-qt/update
new file mode 100644
index 000000000000..e797246e05a6
--- /dev/null
+++ b/srcpkgs/zbar-qt/update
@@ -0,0 +1 @@
+ignore='*.*.9?'
diff --git a/srcpkgs/zbar/template b/srcpkgs/zbar/template
index e8c8bdc28aab..f4768c38febf 100644
--- a/srcpkgs/zbar/template
+++ b/srcpkgs/zbar/template
@@ -1,15 +1,15 @@
# Template file for 'zbar'
+# Keep in sync with zbar-qt
pkgname=zbar
version=0.23.1
-revision=5
+revision=6
build_style=gnu-configure
build_helper=gir
-configure_args="$(vopt_with qt) --with-gir --with-python=python3"
-hostmakedepends="pkg-config python3 glib-devel
- $(vopt_if qt 'qt5-qmake qt5-host-tools')"
+configure_args="--with-gir --with-python=python3"
+hostmakedepends="pkg-config python3 glib-devel"
makedepends="libmagick-devel libXv-devel python3-devel v4l-utils-devel
- gtk+3-devel $(vopt_if qt qt5-x11extras-devel)"
-depends="libzbar-${version}_${revision}"
+ gtk+3-devel libxml2-devel"
+depends="libzbar>=${version}_${revision}"
short_desc="Barcode reading library and application"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="LGPL-2.1-or-later"
@@ -17,45 +17,14 @@ homepage="https://git.linuxtv.org/zbar.git/"
distfiles="https://linuxtv.org/downloads/zbar/${pkgname}-${version}.tar.bz2"
checksum=dad260b47ef887a639e840a89e5e6e132217b6bba2a8473565d1f459bcb97c1f
-build_options="qt"
-case "$XBPS_TARGET_MACHINE" in
- mips*) ;; # don't enable qt as it can't be built for mips*
- *) build_options_default="qt" ;;
-esac
-
-case "$XBPS_TARGET_MACHINE" in
- *-musl) makedepends+=" argp-standalone"
- LDFLAGS="-largp"
- ;;
-esac
+if [ "$XBPS_TARGET_LIBC" = musl ]; then
+ makedepends+=" argp-standalone"
+ LDFLAGS="-largp"
+fi
export PYTHON_CFLAGS="-I$XBPS_CROSS_BASE/usr/include/python$py3_ver"
CFLAGS="-DNDEBUG"
-subpackages="libzbar libzbar-devel"
-
-if [ "$build_option_qt" ]; then
- subpackages+=" zbar-qt libzbar-qt"
-fi
-
-post_extract() {
- # 0.23.1 doesn't ship this file, corrected in master
- cat >zbar-qt5.pc.in <<-'_EOF'
- prefix=@prefix@
- exec_prefix=@exec_prefix@
- libdir=@libdir@
- includedir=@includedir@
-
- Name: zbar-qt
- Description: bar code scanning and decoding Qt5 widget
- URL: http://zbar.sourceforge.net
- Version: @VERSION@
- Requires: zbar, Qt5Core >= 5, Qt5Gui >= 5
- Libs: -L${libdir} -lzbarqt
- Cflags: -I${includedir}
- _EOF
-}
-
post_patch() {
# https://github.com/mchehab/zbar/commit/a133aea7880bbb56d7553
vsed -i -e 's/^.include.*gettext[.]h.*/#include <locale.h>/' \
@@ -72,22 +41,6 @@ libzbar_package() {
}
}
-zbar-qt_package() {
- short_desc+=" - Qt frontend"
- pkg_install() {
- vmove "usr/bin/*-qt"
- }
-}
-
-
-libzbar-qt_package() {
- conflicts="libzbar<0.10_10"
- short_desc+=" - Qt bindings"
- pkg_install() {
- vmove "usr/lib/libzbarqt.so.*"
- }
-}
-
libzbar-devel_package() {
short_desc+=" - development files"
depends="libzbar>=${version}_${revision}"
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PR PATCH] [Closed]: zbar-qt: split from zbar template
2022-07-10 11:05 [PR PATCH] zbar-qt: split from zbar template sgn
@ 2022-07-11 21:20 ` paper42
0 siblings, 0 replies; 2+ messages in thread
From: paper42 @ 2022-07-11 21:20 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1248 bytes --]
There's a closed pull request on the void-packages repository
zbar-qt: split from zbar template
https://github.com/void-linux/void-packages/pull/37971
Description:
```
Avoid cycle:
gst-plugins-bad1 -> zbar
^ |
| v
gtk4 <- libinput <- qt5
```
Close #37948
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->
<!-- 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, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-11 21:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-10 11:05 [PR PATCH] zbar-qt: split from zbar template sgn
2022-07-11 21:20 ` [PR PATCH] [Closed]: " paper42
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).