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
This commit is contained in:
Marcus Meissner 2023-04-24 07:19:38 +00:00 committed by Git OBS Bridge
parent e53b976dcf
commit b74c5011e4
3 changed files with 34 additions and 5 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,8 @@
-------------------------------------------------------------------
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
@ -15,6 +15,15 @@
# 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
@ -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