Compare commits

..

36 commits

Author SHA1 Message Date
Gwyn Ciesla
257ee58d88 Rebuild for Python 3.15.0b4 2026-08-04 14:27:07 -05:00
Michal Schorm
6c6747c812 Remove stale 'xmlto' BuildRequires
Man pages have been pre-built in the upstream tarball since the
initial packaging (525f75c, 2009). A stamp file prevents
regeneration during the build.

Related: rhbz#2503124

Co-Authored-By: Claude AI <noreply@anthropic.com>
2026-07-21 07:40:31 +02:00
Fedora Release Engineering
ce2f2dbd06 Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 09:39:04 +00:00
Python Maint
13577c08e5 Rebuilt for Python 3.15 2026-06-03 23:53:33 +02:00
Simone Caronni
a1e97927fd Fix FTBFS 2026-02-02 13:35:52 +01:00
Fedora Release Engineering
9796c95d23 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 21:06:31 +00:00
Yaakov Selkowitz
3b470a2d65 Fix Qt overlinking
This was causing Qt5 to be linked into every binary in zbar, where it is only
needed for the Qt bindings (which already specify QT_CFLAGS, QT_LIBS, etc).
2025-09-05 11:08:42 -04:00
Fedora Release Engineering
bb34380f84 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 21:16:33 +00:00
Python Maint
d99b509668 Rebuilt for Python 3.14 2025-06-03 14:09:04 +02:00
Fedora Release Engineering
85f877885c Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 16:42:27 +00:00
Fedora Release Engineering
8b34b04285 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 10:49:18 +00:00
Python Maint
84f4d66df0 Rebuilt for Python 3.13 2024-06-07 14:12:34 +02:00
Gwyn Ciesla
f07fb24c88 Update python3-gobject BuildRequires 2024-04-15 15:41:43 -05:00
Fedora Release Engineering
228839a243 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 11:00:53 +00:00
Yaakov Selkowitz
dec080b68c Use default java-devel
The JNI bindings were introduced with 1.8.0 was still the default JDK,
so 11 was intended to select the newer version.  The default JDK is now
17, and there is no reason to continue to use what is now an older
version.
2024-01-11 23:48:02 -05:00
Gwyn Ciesla
23ba05b98d 0.23.93 2024-01-09 10:07:01 -06:00
Florian Weimer
107c91c11f Add missing Py_SIZE to py311.patch 2024-01-05 12:52:10 +01:00
Fedora Release Engineering
8304c4ae98 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 19:38:07 +00:00
d5b34494c9 Fix FTBFS with python 3.12 (rhbz#2220630) 2023-07-07 11:37:10 +02:00
Python Maint
267ec547c2 Rebuilt for Python 3.12 2023-06-15 17:00:48 +02:00
Yaakov Selkowitz
50012aaeef Fix flatpak build
Flatpaks are built in /app prefix instead of /usr.
2023-04-30 21:27:19 -04:00
Gwyn Ciesla
ee527c1110 migrated to SPDX license 2023-03-01 12:37:28 -06:00
Fedora Release Engineering
d9ab6bd465 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 08:12:47 +00:00
Gwyn Ciesla
239937f7f0 Bump Release 2022-12-21 11:16:10 -06:00
Gwyn Ciesla
76753c237f BR setuptools. 2022-12-21 11:15:25 -06:00
Kalev Lember
1d27d2f2d2 Misc packaging cleanup 2022-08-26 16:12:00 +02:00
Kalev Lember
3382cddf1b Use make_build and make_install macros 2022-08-26 16:09:08 +02:00
Kalev Lember
a7acfe6d3d Rename zbar-python3 to python3-zbar as per latest Python guidelines 2022-08-26 16:09:08 +02:00
Kalev Lember
888b226546 Drop manual requires on pkgconfig and rely on rpm dep extractor 2022-08-26 16:08:34 +02:00
Kalev Lember
ce06971a59 Tighten subpackage deps with %%{_isa} 2022-08-26 16:08:34 +02:00
Kalev Lember
5db803bc6f Split libzbar out to zbar-libs subpackage
This allows other apps that link with libzbar, such as GNOME
authenticator to not have to pull in GraphicsMagick that
/usr/bin/zbarimg depends on.
2022-08-26 16:08:34 +02:00
Kalev Lember
a8a6072c5d Move GObject Introspection bindings to -gtk and -gtk-devel subpackages
... so it's packaged the same way as we package all of GNOME libraries.
2022-08-26 15:48:01 +02:00
Kalev Lember
1eb32e16c5 Sort BuildRequires and Requires and split them out one per line 2022-08-26 15:43:36 +02:00
Gwyn Ciesla
4da8028c1a Only build java on supported platforms 2022-08-01 15:38:10 -05:00
Fedora Release Engineering
9cdd221147 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 13:52:13 +00:00
Python Maint
1ec754dc2c Rebuilt for Python 3.11 2022-06-13 21:00:09 +02:00
5 changed files with 176 additions and 89 deletions

1
.gitignore vendored
View file

@ -11,3 +11,4 @@ zbar-0.10.tar.bz2
/zbar-0.22.92.tar.bz2
/zbar-0.23.tar.bz2
/zbar-0.23.90.tar.bz2
/zbar-0.23.93.tar.bz2

16
fix_qt_overlinking.patch Normal file
View file

@ -0,0 +1,16 @@
This was causing Qt5 to be linked into every binary in zbar, where it is only
needed for the Qt bindings (which already specify QT_CFLAGS, QT_LIBS, etc).
diff --git a/configure.ac b/configure.ac
index f0f9723..2a26973 100644
--- a/configure.ac
+++ b/configure.ac
@@ -689,8 +689,6 @@ AM_CONDITIONAL([HAVE_QT], [test "x$with_qt" = "xyes"])
AM_COND_IF([HAVE_QT],
[AC_MSG_NOTICE([using Qt version $QT_VERSION])
AC_MSG_NOTICE([using moc from $MOC])
- CPPFLAGS="$CPPFLAGS $QT_CPPFLAGS"
- LIBS="$LIBS $QT_LIBS"
AC_CONFIG_FILES([zbar-qt.pc:"${qt_pkgconfig_file}.in"])
#dnl -fPIC has no effect on Windows and breaks windres
AS_IF([test "x$win32" = "xno"], [CPPFLAGS="$CPPFLAGS -fPIC"])])

View file

@ -1,35 +0,0 @@
--- python/enum.c~ 2022-01-12 10:07:02.151116991 -0600
+++ python/enum.c 2022-01-12 10:14:04.093001534 -0600
@@ -23,6 +23,12 @@
#include "zbarmodule.h"
+#if PY_VERSION_HEX < 0x030900A4 && !defined(Py_SET_SIZE)
+static inline void _Py_SET_SIZE(PyVarObject *ob, Py_ssize_t size)
+{ ob->ob_size = size; }
+#define Py_SET_SIZE(ob, size) _Py_SET_SIZE((PyVarObject*)(ob), size)
+#endif
+
static char enumitem_doc[] = PyDoc_STR(
"simple enumeration item.\n"
"\n"
--- python/enum.c~ 2022-01-12 10:16:29.670271662 -0600
+++ python/enum.c 2022-01-12 10:52:11.671258442 -0600
@@ -58,7 +58,7 @@
/* we assume the "fast path" for a single-digit ints (see longobject.c) */
/* this also holds if we get a small_int preallocated long */
- Py_SIZE(&self->val) = Py_SIZE(longval);
+ Py_SET_SIZE(&self->val, longval);
self->val.ob_digit[0] = longval->ob_digit[0];
Py_DECREF(longval);
#else
@@ -148,7 +148,7 @@
/* we assume the "fast path" for a single-digit ints (see longobject.c) */
/* this also holds if we get a small_int preallocated long */
- Py_SIZE(&self->val) = Py_SIZE(longval);
+ Py_SET_SIZE(&self->val, longval);
self->val.ob_digit[0] = longval->ob_digit[0];
Py_DECREF(longval);

View file

@ -1 +1 @@
SHA512 (zbar-0.23.90.tar.bz2) = c4ccac8526acab4e28c6145c5cdb95b6a6c5c81b6d2f883053435794f7c351edee20abdc9599cb0de96db546f584c9479896baa87b01ad409d5e75ea8b48118c
SHA512 (zbar-0.23.93.tar.bz2) = 8b1d57557cb1c425109b709f0cbe94830939cb4cd9a0cb505d44ba3c7cfb3522560c3bbf2a8b37985da4577b677ad675491f6ef0e9796749382079c0e844e21e

209
zbar.spec
View file

@ -1,21 +1,41 @@
%ifarch %{java_arches}
%global JAVA 1
%else
%global JAVA 0
%endif
Name: zbar
Version: 0.23.90
Release: 1%{?dist}
Version: 0.23.93
Release: 13%{?dist}
Summary: Bar code reader
License: LGPLv2+
License: LGPL-2.1-or-later
URL: http://zbar.sourceforge.net/
Source0: https://linuxtv.org/downloads/%{name}/%{name}-%{version}.tar.bz2
Patch0: use_python3_on_python_script.patch
Patch1: py311.patch
Patch1: fix_qt_overlinking.patch
BuildRequires: make
BuildRequires: autoconf automake libtool gettext-devel
BuildRequires: qt5-qtbase-devel qt5-qtx11extras-devel
BuildRequires: gtk3-devel GraphicsMagick-devel pygobject3-devel
BuildRequires: libv4l-devel libXv-devel xmlto dbus-devel libSM-devel
BuildRequires: java-11-openjdk-devel
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: dbus-devel
BuildRequires: gettext-devel
BuildRequires: GraphicsMagick-devel
BuildRequires: gtk3-devel
BuildRequires: libSM-devel
BuildRequires: libtool
BuildRequires: libv4l-devel
BuildRequires: libXv-devel
BuildRequires: make
BuildRequires: python3-gobject-devel
BuildRequires: qt5-qtbase-devel
BuildRequires: qt5-qtx11extras-devel
%if %{JAVA}
BuildRequires: java-devel
%endif
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: xmlto
BuildRequires: gobject-introspection-devel
%description
ZBar Bar Code Reader is an open source software suite for reading bar
@ -24,42 +44,42 @@ intensity sensors. It supports EAN-13/UPC-A, UPC-E, EAN-8, Code 128,
Code 93, Code 39, Codabar, Interleaved 2 of 5, QR Code and SQ Code.
%package devel
Summary: Bar code library extra development files
Requires: pkgconfig, %{name} = %{version}-%{release}
Summary: Bar code reader library extra development files
Requires: %{name}-libs%{_isa} = %{version}-%{release}
%description devel
This package contains header files and additional libraries used for
developing applications that read bar codes with this library.
%package libs
Summary: Bar code reader library
%description libs
This package contains the ZBar Bar Code Reader library.
%package gtk
Summary: Bar code reader GTK widget
Requires: %{name} = %{version}-%{release}
Requires: %{name}-libs%{_isa} = %{version}-%{release}
# Obsoleted in F37
Obsoletes: %{name}-gi < %{version}-%{release}
%description gtk
This package contains a bar code scanning widget for use with GUI
applications based on GTK+-2.0.
%package gi
Summary: Bar code reader GObject Introspection (GIR) Gtk bindings
Requires: %{name}-gtk = %{version}-%{release}
%description gi
This package contains a bar code scanning GObject Introspection
(GIR) Gtk bindings, with allow the usage of ZBar with GUI
support on any application compatible with GIR, like python3.
applications based on GTK 3.
%package gtk-devel
Summary: Bar code reader GTK widget extra development files
Requires: pkgconfig, %{name}-gtk = %{version}-%{release}, %{name}-devel = %{version}-%{release}
Requires: %{name}-devel%{_isa} = %{version}-%{release}
Requires: %{name}-gtk%{_isa} = %{version}-%{release}
%description gtk-devel
This package contains header files and additional libraries used for
developing GUI applications based on GTK+-2.0 that include a bar code
developing GUI applications based on GTK 3 that include a bar code
scanning widget.
%package qt
Summary: Bar code reader Qt widget
Requires: %{name} = %{version}-%{release}
Requires: %{name}-libs%{_isa} = %{version}-%{release}
%description qt
This package contains a bar code scanning widget for use with GUI
@ -67,57 +87,65 @@ applications based on Qt4.
%package qt-devel
Summary: Bar code reader Qt widget extra development files
Requires: pkgconfig, %{name}-qt = %{version}-%{release}, %{name}-devel = %{version}-%{release}
Requires: %{name}-devel%{_isa} = %{version}-%{release}
Requires: %{name}-qt%{_isa} = %{version}-%{release}
%description qt-devel
This package contains header files and additional libraries used for
developing GUI applications based on Qt4 that include a bar code
developing GUI applications based on Qt5 that include a bar code
scanning widget.
%package python3
%package -n python3-zbar
Summary: Bar code reader PyGTK widget
Requires: python3-pillow, %{name} = %{version}-%{release}
Requires: %{name}-libs%{_isa} = %{version}-%{release}
Requires: python3-pillow
# Renamed in F37
Obsoletes: %{name}-python3 < %{version}-%{release}
%description python3
%description -n python3-zbar
This package contains a bar code scanning widget for use on
python applications that work with images.
%if %{JAVA}
%package java
Summary: Bar code reader Java library
Requires: pkgconfig, %{name}-gtk = %{version}-%{release}, %{name}-devel = %{version}-%{release}
Requires: %{name}-devel%{_isa} = %{version}-%{release}
Requires: %{name}-gtk%{_isa} = %{version}-%{release}
%description java
This package contains header files and additional libraries used for
on Java Native Interface (JNI) applications using ZBar.
%endif
%prep
%setup -q
%patch0 -p1
%patch1 -p0
%patch 0 -p1
%patch 1 -p1
%build
%configure --with-python=python3 --with-gtk=auto --docdir=%{_docdir}/%{name}-%{version} --with-graphicsmagick --without-xshm --without-xv --enable-codes=ean,databar,code128,code93,code39,codabar,i25,qrcode,sqcode,pdf417
autoreconf -fiv
%configure --with-python=python3 --with-gtk=auto --with-dbusconfdir=%{_sysconfdir} --docdir=%{_docdir}/%{name}-%{version} --with-graphicsmagick --without-xshm --without-xv --enable-codes=ean,databar,code128,code93,code39,codabar,i25,qrcode,sqcode,pdf417
# rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
%make_build
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
%make_install
%if %{JAVA}
install -d %{buildroot}%{_jnidir}
mv %{buildroot}%{_datadir}/zbar/lib/zbar.jar %{buildroot}%{_jnidir}
mv %{buildroot}%{_datadir}/zbar/lib/libzbarjni.so* %{buildroot}%{_libdir}
%endif
cp test/test_python.py %{buildroot}%{_docdir}
#Remove .la and .a files
find ${RPM_BUILD_ROOT} -name '*.la' -or -name '*.a' | xargs rm -f
# Remove installed doc
rm -rf $RPM_BUILD_ROOT/usr/share/doc/zbar-%{version}/
rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/
%ldconfig_scriptlets
@ -129,19 +157,20 @@ rm -rf $RPM_BUILD_ROOT/usr/share/doc/zbar-%{version}/
%find_lang zbar
%files -f zbar.lang
%files
%doc NEWS.md README.md INSTALL.md
%license COPYING LICENSE.md
%{_bindir}/zbarimg
%{_bindir}/zbarcam
%{_libdir}/libzbar.so.*
%{_mandir}/man1/*
%{_sysconfdir}/dbus-1/system.d/org.linuxtv.Zbar.conf
%files libs -f zbar.lang
%license COPYING LICENSE.md
%{_libdir}/libzbar.so.0*
%{_libdir}/girepository-1.0/ZBar-1.0.typelib
%files devel
%doc HACKING.md TODO.md
%{_libdir}/libzbar.so
%{_libdir}/pkgconfig/zbar.pc
%dir %{_includedir}/zbar
@ -155,17 +184,12 @@ rm -rf $RPM_BUILD_ROOT/usr/share/doc/zbar-%{version}/
%{_includedir}/zbar/Video.h
%{_includedir}/zbar/Window.h
%{_includedir}/zbar/Processor.h
%{_datadir}/gir-1.0/ZBar-1.0.gir
%files gtk
%{_libdir}/libzbargtk.so.*
%{_bindir}/zbarcam-gtk
%files gi
%dir %{_libdir}/girepository-1.0
%dir %{_datadir}/gir-1.0
%{_libdir}/girepository-1.0/ZBar-1.0.typelib
%{_datadir}/gir-1.0/ZBar-1.0.gir
%files gtk-devel
%{_libdir}/libzbargtk.so
%{_libdir}/pkgconfig/zbar-gtk.pc
@ -180,15 +204,96 @@ rm -rf $RPM_BUILD_ROOT/usr/share/doc/zbar-%{version}/
%{_libdir}/pkgconfig/zbar-qt.pc
%{_includedir}/zbar/QZBar*.h
%if %{JAVA}
%files java
%{_jnidir}/zbar.jar
%{_libdir}/libzbarjni.so*
%endif
%files python3
%files -n python3-zbar
%{python3_sitearch}/zbar.so
%{_docdir}/test_python.py
%changelog
* Tue Aug 04 2026 Gwyn Ciesla <gwync@protonmail.com> - 0.23.93-13
- Rebuild for Python 3.15.0b4
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.93-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Wed Jun 03 2026 Python Maint <python-maint@redhat.com> - 0.23.93-11
- Rebuilt for Python 3.15
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.93-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Fri Sep 05 2025 Yaakov Selkowitz <yselkowi@redhat.com> - 0.23.93-9
- Fix Qt overlinking
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.93-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 0.23.93-7
- Rebuilt for Python 3.14
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.93-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.93-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 0.23.93-4
- Rebuilt for Python 3.13
* Mon Apr 15 2024 Gwyn Ciesla <gwync@protonmail.com> - 0.23.93-3
- Update python3-gobject BuildRequires
* Sat Jan 27 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.93-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Jan 09 2024 Gwyn Ciesla <gwync@protonmail.com> - 0.23.93-1
- 0.23.93
* Fri Jan 05 2024 Florian Weimer <fweimer@redhat.com> - 0.23.90-12
- Add missing Py_SIZE to py311.patch
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.90-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jul 07 2023 Michael J Gruber <mjg@fedoraproject.org> - 0.23.90-10
- Fix FTBFS with python 3.12 (rhbz#2220630)
* Thu Jun 15 2023 Python Maint <python-maint@redhat.com> - 0.23.90-9
- Rebuilt for Python 3.12
* Wed Mar 01 2023 Gwyn Ciesla <gwync@protonmail.com> - 0.23.90-8
- migrated to SPDX license
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.90-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Dec 21 2022 Gwyn Ciesla <gwync@protonmail.com> - 0.23.90-6
- BR setuptools
* Fri Aug 26 2022 Kalev Lember <klember@redhat.com> - 0.23.90-5
- Misc packaging cleanup
- Sort BuildRequires and Requires and split them out one per line
- Move GObject Introspection bindings to -gtk and -gtk-devel subpackages
- Split libzbar out to zbar-libs subpackage
- Tighten subpackage deps with %%{_isa}
- Drop manual requires on pkgconfig and rely on rpm dep extractor
- Rename zbar-python3 to python3-zbar as per latest Python guidelines
- Use make_build and make_install macros
* Mon Aug 01 2022 Gwyn Ciesla <gwync@protonmail.com> - 0.23.90-4
- Only build Java on supported platforms.
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.90-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.23.90-2
- Rebuilt for Python 3.11
* Tue May 31 2022 Gwyn Ciesla <gwync@protonmail.com> - 0.23.90-1
- 0.23.90