- Adding libgphoto2-c99.patch so that the package builds for 32bit
with GCC 14. - Using %autosetup -p1 because this is the prefered way to apply patches. If the request is ok, please forward it to factory soon so that it is ready when the default compiler is switched. OBS-URL: https://build.opensuse.org/package/show/graphics/libgphoto2?expand=0&rev=245
This commit is contained in:
commit
57a9209d96
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
7
baselibs.conf
Normal file
7
baselibs.conf
Normal file
@ -0,0 +1,7 @@
|
||||
libgphoto2_port12
|
||||
libgphoto2-6
|
||||
libgphoto2-devel
|
||||
requires "libexif-devel-<targettype>"
|
||||
requires "libusb-1_0-devel-<targettype>"
|
||||
requires "libgphoto2-6-<targettype> = %version"
|
||||
requires "libgphoto2_port12-<targettype> = %version"
|
3
libgphoto2-2.5.31.tar.xz
Normal file
3
libgphoto2-2.5.31.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8fc7bf40f979459509b87dd4ff1aae9b6c1c2b4724d37db576081eec15406ace
|
||||
size 6322264
|
16
libgphoto2-2.5.31.tar.xz.asc
Normal file
16
libgphoto2-2.5.31.tar.xz.asc
Normal file
@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCgAdFiEEfEr9Ydiq51cHlqUXIgnWkC+WnJUFAmTzALYACgkQIgnWkC+W
|
||||
nJVldg//d9p6IsqxaNJ1sVkDdO59SLuZAw1cbrPlVAkRb78QZefIZcfQeYlCSo7g
|
||||
SzvoqkeJd1fuWSCQl4c5YOY1sbw6sa40edSq2AI/7aOpS7E8y6OVHnI6tlhPjnfH
|
||||
jOMKNxTb+ucRs+QtwRX9dBxLrtyup7BdLmSFDChgnlaMxJlpxrDEEyEE/B8geTk9
|
||||
FaqoLosPUum9ja536JIk/TFyc4luBeRTS0KiM/q582o9Sxgeiiny+GVOIXyzl/ho
|
||||
DesKeEbc3G1MkDetlTl82z2cAGsB2SfTarPaE3PXokAYYthQgf6QkeMJgcvcrBaS
|
||||
yBr91WcG8tmW4ewhhNtOISEpWE6XGfUBDtHGOmjo7bC8Y2s4RRyDhETB9O/xoUnH
|
||||
fOi0p2sZLjRn3a8crA1Ut7P+vVfdQAHcrI9f5s0y6IB+CzMrtq+MuU0MAlNhj6rG
|
||||
T/SjOzT/vgU59xpletdKWdiii3ncUuwDGuzUb+R1MM5whQFEubzkVI03ZHUM1v42
|
||||
2fkDTeTBl9TEb4jKPw9AZyWkw5PxHjOw7q1J0z2p9y29eKVwKa+QwU6sz4i+ZRoL
|
||||
maseJSviSkUXadReCmPbAZB1jNmt8r6EXy9OLxLfQxIDTseU9Dh40Azcjg4ZEurr
|
||||
7n3q2D6Myy0JpNrVgbJ4b4nHtOlUgisVSJjmcy7xG1zJS3/QObQ=
|
||||
=f+AI
|
||||
-----END PGP SIGNATURE-----
|
35
libgphoto2-c99.patch
Normal file
35
libgphoto2-c99.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From 721f7f8c3ec8058d504607873e4c317aac0c99c5 Mon Sep 17 00:00:00 2001
|
||||
From: Marcus Meissner <marcus@jet.franken.de>
|
||||
Date: Mon, 4 Dec 2023 13:26:08 +0100
|
||||
Subject: [PATCH] align outlen length with jpeg jeaders. fixes
|
||||
https://github.com/gphoto/libgphoto2/issues/941
|
||||
|
||||
---
|
||||
camlibs/ptp2/chdk.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/camlibs/ptp2/chdk.c b/camlibs/ptp2/chdk.c
|
||||
index e1d898f378..e775ea1d4b 100644
|
||||
--- a/camlibs/ptp2/chdk.c
|
||||
+++ b/camlibs/ptp2/chdk.c
|
||||
@@ -1150,7 +1150,7 @@ static void yuv_live_to_jpeg(unsigned char *p_yuv,
|
||||
struct jpeg_error_mgr jerr;
|
||||
JSAMPROW row_ptr[1];
|
||||
uint8_t *outbuf = NULL, *tmprowbuf = NULL;
|
||||
- uint64_t outlen = 0;
|
||||
+ unsigned long outlen = 0;
|
||||
unsigned int row_inc;
|
||||
int sshift, dshift, xshift, skip;
|
||||
|
||||
@@ -1161,8 +1161,8 @@ static void yuv_live_to_jpeg(unsigned char *p_yuv,
|
||||
sshift = 6;
|
||||
dshift = (width/height > 2) ? 6 : 12;
|
||||
xshift = 4;
|
||||
- /* Digic 6 cameras: 8 bit per element UYVY,
|
||||
- * 4 bytes used to encode 2 pixels, need 6 bytes raw YUV data for jpeg encoding */
|
||||
+ /* Digic 6 cameras: 8 bit per element UYVY,
|
||||
+ * 4 bytes used to encode 2 pixels, need 6 bytes raw YUV data for jpeg encoding */
|
||||
} else {
|
||||
row_inc = buf_width*2;
|
||||
sshift = 4;
|
||||
|
2126
libgphoto2.changes
Normal file
2126
libgphoto2.changes
Normal file
File diff suppressed because it is too large
Load Diff
1608
libgphoto2.keyring
Normal file
1608
libgphoto2.keyring
Normal file
File diff suppressed because it is too large
Load Diff
284
libgphoto2.spec
Normal file
284
libgphoto2.spec
Normal file
@ -0,0 +1,284 @@
|
||||
#
|
||||
# spec file for package libgphoto2
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{nil <URL:
|
||||
https://github.com/gphoto/libgphoto2/issues/408#issuecomment-1472123588 >
|
||||
}
|
||||
%bcond_with vusb
|
||||
%if %{with:vusb}
|
||||
%define configure_vusb --enable-vusb --without-libusb --with-libusb-1.0=no
|
||||
%else
|
||||
%define configure_vusb %{nil}
|
||||
%endif
|
||||
|
||||
%if %( pkg-config --modversion udev ) > 190
|
||||
%define _udevrulesdir /usr/lib/udev/rules.d
|
||||
%else
|
||||
%define _udevrulesdir /lib/udev/rules.d
|
||||
%endif
|
||||
|
||||
%define major 6
|
||||
|
||||
Name: libgphoto2
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gd-devel
|
||||
BuildRequires: libexif-devel
|
||||
BuildRequires: libjpeg-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libusb-1_0-devel
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: pkgconfig(udev)
|
||||
URL: https://gphoto.sourceforge.io/
|
||||
# bug437293
|
||||
%ifarch ppc64
|
||||
Obsoletes: libgphoto2-64bit
|
||||
%endif
|
||||
#
|
||||
Summary: A Digital Camera Library
|
||||
License: LGPL-2.1-or-later
|
||||
Group: Hardware/Camera
|
||||
Version: 2.5.31
|
||||
Release: 0
|
||||
Source0: https://downloads.sourceforge.net/project/gphoto/libgphoto/%version/%name-%version.tar.xz
|
||||
Source1: https://downloads.sourceforge.net/project/gphoto/libgphoto/%version/%name-%version.tar.xz.asc
|
||||
Source2: %name.keyring
|
||||
Source3: baselibs.conf
|
||||
Patch0: libgphoto2-c99.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%package -n libgphoto2-%major
|
||||
Summary: A Digital Camera Library
|
||||
Group: System/Libraries
|
||||
Requires(pre): /sbin/ldconfig
|
||||
Requires(post): /sbin/ldconfig
|
||||
Requires(post): udev
|
||||
Requires(postun): udev
|
||||
|
||||
%package -n libgphoto2_port12
|
||||
Summary: Port drivers for the libgphoto2 digital camera library
|
||||
Group: System/Libraries
|
||||
Requires(pre): /sbin/ldconfig
|
||||
Requires(post): /sbin/ldconfig
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for libgphoto2
|
||||
Group: Documentation/Other
|
||||
BuildArch: noarch
|
||||
|
||||
%package devel
|
||||
Summary: Development headers for libgphoto2
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: libexif-devel
|
||||
Requires: libgphoto2-%major = %version
|
||||
Requires: libgphoto2_port12 = %version
|
||||
Requires: libusb-1_0-devel
|
||||
|
||||
%package devel-doc
|
||||
Summary: Development documentation for libgphoto2
|
||||
Group: Documentation/HTML
|
||||
Recommends: libgphoto2-devel
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
gPhoto (GNU Photo) is a set of libraries for previewing, retrieving,
|
||||
and capturing images from a range of supported digital cameras to your
|
||||
local hard drive. It does not support digital cameras based on the USB
|
||||
storage protocol. Those can be mounted by Linux directly.
|
||||
|
||||
As of this time, gPhoto supports around 1700 cameras, listed on:
|
||||
|
||||
https://gphoto.sourceforge.io/proj/libgphoto2/support.php
|
||||
|
||||
or by running
|
||||
|
||||
gphoto2 --list-cameras
|
||||
|
||||
%description -n libgphoto2-%major
|
||||
gPhoto (GNU Photo) is a set of libraries for previewing, retrieving,
|
||||
and capturing images from a range of supported digital cameras to your
|
||||
local hard drive. It does not support digital cameras based on the USB
|
||||
storage protocol as those can be mounted by Linux directly.
|
||||
|
||||
As of this time, gPhoto supports around 1700 cameras, listed on:
|
||||
|
||||
https://gphoto.sourceforge.io/proj/libgphoto2/support.php
|
||||
|
||||
or by running
|
||||
|
||||
gphoto2 --list-cameras
|
||||
|
||||
%description -n libgphoto2_port12
|
||||
gPhoto (GNU Photo) is a set of libraries for previewing, retrieving,
|
||||
and capturing images from a range of supported digital cameras to your
|
||||
local hard drive. It does not support digital cameras based on the USB
|
||||
storage protocol as those can be mounted by Linux directly.
|
||||
|
||||
This package contains the port drivers (e.g. the USB drivers, the PTP/IP
|
||||
driver).
|
||||
|
||||
%description doc
|
||||
gPhoto (GNU Photo) is a set of libraries for previewing, retrieving,
|
||||
and capturing images from a range of supported digital cameras to your
|
||||
local hard drive.
|
||||
|
||||
This is the user documentation.
|
||||
|
||||
%description devel
|
||||
gPhoto (GNU Photo) is a set of libraries for previewing, retrieving,
|
||||
and capturing images from a range of supported digital cameras to your
|
||||
local hard drive.
|
||||
|
||||
These are its development libraries and headers.
|
||||
|
||||
%description devel-doc
|
||||
gPhoto (GNU Photo) is a set of libraries for previewing, retrieving,
|
||||
and capturing images from a range of supported digital cameras to your
|
||||
local hard drive.
|
||||
|
||||
This is its API documentation in HTML format.
|
||||
|
||||
%lang_package -n libgphoto2-%major
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
(cd doc && tar -xaf libgphoto2-api.html.tar.gz)
|
||||
|
||||
%build
|
||||
#AUTOPOINT=true autoreconf -fi
|
||||
PATH="/usr/X11R6/bin:$PATH" \
|
||||
%configure \
|
||||
--with-doc-dir=%_defaultdocdir/%name \
|
||||
--without-hal \
|
||||
--with-drivers=all %configure_vusb
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
make check
|
||||
|
||||
%install
|
||||
# skip-check-libtool-deps
|
||||
export LIBRARY_PATH="%buildroot/%_libdir"
|
||||
%make_install
|
||||
|
||||
# .la files are not needed
|
||||
rm %buildroot/%_libdir/*.la
|
||||
rm %buildroot/%_libdir/libgphoto2/%version/*.la
|
||||
rm %buildroot/%_libdir/libgphoto2_port/0.12.2/*.la
|
||||
|
||||
rm -rf %buildroot/usr/share/doc/libgphoto2_port
|
||||
|
||||
%find_lang libgphoto2-%major
|
||||
%find_lang libgphoto2_port-12
|
||||
cat libgphoto2-%major.lang libgphoto2_port-12.lang >libgphoto2-all.lang
|
||||
pushd packaging/generic
|
||||
export CAMLIBS="%buildroot/%_libdir/libgphoto2/%version/"
|
||||
# new style UDEV rules (gudev) which will obsolete HAL fdi files
|
||||
if [ ! -d "%_udevrulesdir" ] ; then
|
||||
echo "*** The udev rules file location has changed. Fix the build."
|
||||
exit 1
|
||||
fi
|
||||
%if 0%{?suse_version} > 1230
|
||||
install -m 0755 -d %buildroot/%_udevhwdbdir
|
||||
./print-camera-list hwdb >%buildroot/%_udevhwdbdir/20-gphoto.hwdb
|
||||
# We still need UDEV rules for /dev/sg* and /dev/sd* for picture frames.
|
||||
# We also need it for PTP cameras that we do not know to appear in GVFS.
|
||||
install -m 0755 -d %buildroot/%_udevrulesdir
|
||||
./print-camera-list udev-rules version 201 >%buildroot/%_udevrulesdir/40-libgphoto2.rules
|
||||
%else
|
||||
install -m 0755 -d %buildroot/%_udevrulesdir
|
||||
./print-camera-list udev-rules version 175 >%buildroot/%_udevrulesdir/40-libgphoto2.rules
|
||||
%endif
|
||||
popd
|
||||
# udev helpers not used here.
|
||||
rm %buildroot/usr/%_lib/udev/check-ptp-camera
|
||||
mv doc/libgphoto2-api.html apidocs
|
||||
mv doc/README.apidocs .
|
||||
find apidocs -type f -name "*.md5" -delete
|
||||
fn="%buildroot/%_libdir/pkgconfig/libgphoto2_port.pc"
|
||||
grep -v driverdir= $fn > $fn.new
|
||||
mv $fn.new $fn
|
||||
|
||||
find "%buildroot/%_libdir" -type f -name "*.la" -delete
|
||||
%fdupes %buildroot/%_prefix
|
||||
|
||||
%files -n libgphoto2-%major
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS NEWS README
|
||||
%_libdir/libgphoto2
|
||||
# support files for konica camlib
|
||||
%_datadir/%name
|
||||
%_libdir/libgphoto2.so.*
|
||||
%if 0%{?suse_version} > 1230
|
||||
%_udevhwdbdir/20-gphoto.hwdb
|
||||
%endif
|
||||
%_udevrulesdir/40-libgphoto2.rules
|
||||
|
||||
%files -n libgphoto2_port12
|
||||
%defattr(-,root,root)
|
||||
%doc libgphoto2_port/README libgphoto2_port/AUTHORS libgphoto2_port/NEWS
|
||||
%_libdir/libgphoto2_port
|
||||
%_libdir/libgphoto2_port.so.*
|
||||
%_datadir/libgphoto2_port
|
||||
|
||||
%files -n libgphoto2-doc
|
||||
%defattr(-,root,root)
|
||||
%dir /usr/share/doc/%name
|
||||
/usr/share/doc/%name/*
|
||||
%_mandir/man3/libgphoto2.3*
|
||||
%_mandir/man3/libgphoto2_port.3*
|
||||
|
||||
%files -n libgphoto2-%major-lang -f libgphoto2-all.lang
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%_includedir/gphoto2
|
||||
%_bindir/gphoto2-config
|
||||
%_bindir/gphoto2-port-config
|
||||
%_libdir/libgphoto2.so
|
||||
%_libdir/libgphoto2_port.so
|
||||
%_libdir/pkgconfig/libgphoto2.pc
|
||||
%_libdir/pkgconfig/libgphoto2_port.pc
|
||||
|
||||
%files devel-doc
|
||||
%defattr(-,root,root)
|
||||
%doc apidocs README.apidocs
|
||||
|
||||
%post -n libgphoto2_port12 -p /sbin/ldconfig
|
||||
%postun -n libgphoto2_port12 -p /sbin/ldconfig
|
||||
|
||||
%post -n %name-%major
|
||||
/sbin/ldconfig
|
||||
%if 0%{?suse_version} > 1230
|
||||
%udev_hwdb_update
|
||||
%endif
|
||||
udevadm control --reload >/dev/null 2>&1 || :
|
||||
|
||||
%postun -n %name-%major
|
||||
/sbin/ldconfig
|
||||
if [ $1 -eq 0 ]; then
|
||||
%if 0%{?suse_version} > 1230
|
||||
%udev_hwdb_update
|
||||
%udev_rules_update
|
||||
%endif
|
||||
udevadm control --reload 2>&1 > /dev/null || :
|
||||
fi
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user