From 0bbb62e01c2210857a2bc4738cc7428b5f363078c9efc9420a5f51520562b6e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Thu, 15 Mar 2012 16:38:33 +0000 Subject: [PATCH 1/2] Accepting request 109341 from home:dimstar:gcc47 Fix build with gcc 4.7 - Please work with upstream to resolve it in upstream code base. There is also a chance that a newer version of the package might have this fixed already. OBS-URL: https://build.opensuse.org/request/show/109341 OBS-URL: https://build.opensuse.org/package/show/graphics/libraw?expand=0&rev=53 --- libraw-gcc47.patch | 12 ++++++++++++ libraw.changes | 5 +++++ libraw.spec | 15 +++++++-------- 3 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 libraw-gcc47.patch diff --git a/libraw-gcc47.patch b/libraw-gcc47.patch new file mode 100644 index 0000000..fdafcc4 --- /dev/null +++ b/libraw-gcc47.patch @@ -0,0 +1,12 @@ +Index: LibRaw-0.13.5/samples/dcraw_emu.cpp +=================================================================== +--- LibRaw-0.13.5.orig/samples/dcraw_emu.cpp ++++ LibRaw-0.13.5/samples/dcraw_emu.cpp +@@ -27,6 +27,7 @@ it under the terms of the one of three l + #endif + + #include ++#include // For getpagesize, read and close + #include + #include + #include diff --git a/libraw.changes b/libraw.changes index a8ac9c1..06f60ca 100644 --- a/libraw.changes +++ b/libraw.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Mar 14 19:29:33 UTC 2012 - dimstar@opensuse.org + +- Add libraw-gcc47.patch: Fix build with gcc 4.7. + ------------------------------------------------------------------- Wed Aug 24 11:53:14 UTC 2011 - idonmez@novell.com diff --git a/libraw.spec b/libraw.spec index 6a31810..0741a10 100644 --- a/libraw.spec +++ b/libraw.spec @@ -1,7 +1,7 @@ # # spec file for package libraw # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,12 +20,14 @@ Name: libraw Version: 0.13.5 -Release: 1 -License: CDDLv1.0 | LGPLv2.1 +Release: 0 Summary: Library for reading RAW files obtained from digital photo cameras -Url: http://www.libraw.org/ +License: CDDL-1.0 or LGPL-2.1 Group: System/Libraries +Url: http://www.libraw.org/ Source: http://www.libraw.org/data/%{tar_name}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM libraw-gcc47.patch dimstar@opensuse.org -- Fix build with gcc 4.7. +Patch0: libraw-gcc47.patch BuildRequires: gcc-c++ BuildRequires: libjpeg-devel BuildRequires: liblcms2-devel @@ -40,7 +42,6 @@ LibRaw is based on the source codes of the dcraw utility, where part of drawbacks have already been eliminated and part will be fixed in future. %package tools -License: CDDLv1.0 | LGPLv2.1 Summary: Library for reading RAW files obtained from digital photo cameras -- Tools Group: System/Libraries @@ -52,7 +53,6 @@ LibRaw is based on the source codes of the dcraw utility, where part of drawbacks have already been eliminated and part will be fixed in future. %package -n libraw2 -License: CDDLv1.0 | LGPLv2.1 Summary: Library for reading RAW files obtained from digital photo cameras Group: System/Libraries @@ -64,7 +64,6 @@ LibRaw is based on the source codes of the dcraw utility, where part of drawbacks have already been eliminated and part will be fixed in future. %package devel -License: CDDLv1.0 | LGPLv2.1 Summary: Development files for %{name} Group: Development/Libraries/Other Requires: libraw2 = %{version} @@ -77,7 +76,6 @@ LibRaw is based on the source codes of the dcraw utility, where part of drawbacks have already been eliminated and part will be fixed in future. %package devel-static -License: CDDLv1.0 | LGPLv2.1 Summary: Library for reading RAW files obtained from digital photo cameras Group: Development/Libraries/Other Requires: %{name}-devel = %{version} @@ -94,6 +92,7 @@ against LibRaw. LibRaw does not provide dynamic libraries. %prep %setup -q -n %{tar_name}-%{version} +%patch0 -p1 %build CXXFLAGS="%{optflags} -fPIC" \ From 8e3419d2e80368611e65dc8cdc5548658b041e0aec310daea2979391f70e9ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Tue, 20 Mar 2012 12:49:22 +0000 Subject: [PATCH 2/2] drop obsolete patch OBS-URL: https://build.opensuse.org/package/show/graphics/libraw?expand=0&rev=54 --- libraw-lcms2-build.patch | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 libraw-lcms2-build.patch diff --git a/libraw-lcms2-build.patch b/libraw-lcms2-build.patch deleted file mode 100644 index ea90756..0000000 --- a/libraw-lcms2-build.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- configure.ac -+++ configure.ac -@@ -44,9 +44,9 @@ - esac],[lcms=true]) - - if test x$lcms = xtrue; then -- PKG_CHECK_MODULES([LCMS2],[lcms2],[ -- CPPFLAGS="$CPPFLAGS $LCMS2_CFLAGS -DUSE_LCMS2" -- LDFLAGS="$LDFLAGS $LCMS2_LIBS" -+ PKG_CHECK_MODULES([LCMS],[lcms2],[ -+ CPPFLAGS="$CPPFLAGS $LCMS_CFLAGS -DUSE_LCMS2" -+ LDFLAGS="$LDFLAGS $LCMS_LIBS" - AC_SUBST([PACKAGE_REQUIRES],[lcms2]) - ],[ - PKG_CHECK_MODULES([LCMS],[lcms],[