Accepting request 1082394 from graphics

- libgphoto2-enable-vusb-ptp.patch: enable virtual PTP camera in vusb

- added %bcond_with vusb in case anyone needs a test drive

OBS-URL: https://build.opensuse.org/request/show/1082394
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libgphoto2?expand=0&rev=135
This commit is contained in:
Dominique Leuenberger 2023-04-25 14:53:20 +00:00 committed by Git OBS Bridge
commit 4e9f065a11
3 changed files with 41 additions and 6 deletions

View File

@ -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 <stdio.h>

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Apr 24 07:19:55 UTC 2023 - Marcus Meissner <meissner@suse.com>
- libgphoto2-enable-vusb-ptp.patch: enable virtual PTP camera in vusb
-------------------------------------------------------------------
Sat Apr 22 19:43:26 UTC 2023 - Christopher Yeleighton <giecrilj@stegny.2a.pl>
- added %bcond_with vusb in case anyone needs a test drive
-------------------------------------------------------------------
Sat Jul 2 09:39:31 UTC 2022 - Marcus Meissner <meissner@suse.com>

View File

@ -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
@ -16,6 +16,16 @@
#
%{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
@ -35,10 +45,8 @@ BuildRequires: libusb-1_0-devel
BuildRequires: libxml2-devel
BuildRequires: lockdev-devel
BuildRequires: pkg-config
BuildRequires: pkgconfig(udev)
%if 0%{?suse_version} > 1230
BuildRequires: systemd-rpm-macros
%endif
BuildRequires: pkgconfig(udev)
URL: https://gphoto.sourceforge.io/
# bug437293
%ifarch ppc64
@ -54,6 +62,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 +71,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 +82,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 +96,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 +160,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 +169,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