From b74c5011e4f3636502edf4a8fc668b51d41a5323d2014960f1629d15044afd9c Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 24 Apr 2023 07:19:38 +0000 Subject: [PATCH] Accepting request 1082210 from home:yecril71pl:branches:graphics - added %bcond_with vusb in case anyone needs a test drive OBS-URL: https://build.opensuse.org/request/show/1082210 OBS-URL: https://build.opensuse.org/package/show/graphics/libgphoto2?expand=0&rev=236 --- libgphoto2-enable-vusb-ptp.patch | 13 +++++++++++++ libgphoto2.changes | 5 +++++ libgphoto2.spec | 21 ++++++++++++++++----- 3 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 libgphoto2-enable-vusb-ptp.patch diff --git a/libgphoto2-enable-vusb-ptp.patch b/libgphoto2-enable-vusb-ptp.patch new file mode 100644 index 0000000..f08eefb --- /dev/null +++ b/libgphoto2-enable-vusb-ptp.patch @@ -0,0 +1,13 @@ +Index: libgphoto2-2.5.30/libgphoto2_port/vusb/vcamera.h +=================================================================== +--- libgphoto2-2.5.30.orig/libgphoto2_port/vusb/vcamera.h ++++ libgphoto2-2.5.30/libgphoto2_port/vusb/vcamera.h +@@ -22,7 +22,7 @@ + #ifndef IOLIBS_VUSB_VCAMERA_H + #define IOLIBS_VUSB_VCAMERA_H + +-#undef FUZZ_PTP ++#define FUZZ_PTP + + #include + diff --git a/libgphoto2.changes b/libgphoto2.changes index 0ea444e..886b923 100644 --- a/libgphoto2.changes +++ b/libgphoto2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Apr 22 19:43:26 UTC 2023 - Christopher Yeleighton + +- added %bcond_with vusb in case anyone needs a test drive + ------------------------------------------------------------------- Sat Jul 2 09:39:31 UTC 2022 - Marcus Meissner diff --git a/libgphoto2.spec b/libgphoto2.spec index 5246577..916c022 100644 --- a/libgphoto2.spec +++ b/libgphoto2.spec @@ -1,7 +1,7 @@ # # spec file for package libgphoto2 # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,6 +15,15 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # +%{nil + } +%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 @@ -36,9 +45,7 @@ BuildRequires: libxml2-devel BuildRequires: lockdev-devel BuildRequires: pkg-config BuildRequires: pkgconfig(udev) -%if 0%{?suse_version} > 1230 BuildRequires: systemd-rpm-macros -%endif URL: https://gphoto.sourceforge.io/ # bug437293 %ifarch ppc64 @@ -54,6 +61,7 @@ Source0: https://downloads.sourceforge.net/project/gphoto/libgphoto/%vers Source1: https://downloads.sourceforge.net/project/gphoto/libgphoto/%version/%name-%version.tar.xz.asc Source2: %name.keyring Source3: baselibs.conf +Patch0: libgphoto2-enable-vusb-ptp.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %package -n libgphoto2-%major @@ -62,7 +70,7 @@ Group: System/Libraries Requires(pre): /sbin/ldconfig Requires(post): /sbin/ldconfig Requires(post): udev -Requires(postun): udev +Requires(postun):udev %package -n libgphoto2_port12 Summary: Port drivers for the libgphoto2 digital camera library @@ -73,6 +81,7 @@ Requires(post): /sbin/ldconfig %package doc Summary: Documentation for libgphoto2 Group: Documentation/Other +BuildArch: noarch %package devel Summary: Development headers for libgphoto2 @@ -86,6 +95,7 @@ Requires: libusb-1_0-devel 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, @@ -149,6 +159,7 @@ This is its API documentation in HTML format. %prep %setup -q +%patch0 -p1 (cd doc && tar -xaf libgphoto2-api.html.tar.gz) %build @@ -157,7 +168,7 @@ PATH="/usr/X11R6/bin:$PATH" \ %configure \ --with-doc-dir=%_defaultdocdir/%name \ --without-hal \ - --with-drivers=all + --with-drivers=all %configure_vusb make %{?_smp_mflags} %check