Accepting request 120552 from multimedia:libs

- Run make check 
- Do not use gcc -ansi flag
- Ensure all C files include "config.h" (forwarded request 120539 from elvigia)

OBS-URL: https://build.opensuse.org/request/show/120552
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libopenraw?expand=0&rev=23
This commit is contained in:
Stephan Kulow 2012-05-10 12:33:09 +00:00 committed by Git OBS Bridge
commit c8dfdf6ff0
3 changed files with 158 additions and 1 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu May 10 01:47:04 UTC 2012 - crrodriguez@opensuse.org
- Run make check
- Do not use gcc -ansi flag
- Ensure all C files include "config.h"
-------------------------------------------------------------------
Fri Feb 24 17:21:51 UTC 2012 - crrodriguez@opensuse.org

View File

@ -28,6 +28,7 @@ Source0: http://libopenraw.freedesktop.org/download/%{name}-%{version}.ta
Source99: baselibs.conf
# PATCH-FIX-UPSTREAM libopenraw-orf-thumbnail.patch bnc699678 glin@suse.com - Decompress otf files
Patch2: libopenraw-orf-thumbnail.patch
Patch3: openraw-noansiflag.patch
BuildRequires: boost-devel >= 1.33.1
BuildRequires: gcc-c++
BuildRequires: libjpeg-devel
@ -71,7 +72,7 @@ libopenraw is a library that aim at decoding digital camera RAW files.
%prep
%setup -q
%patch2 -p1
%patch3
%build
autoreconf -fiv
export CXXFLAGS="%optflags -fvisibility-inlines-hidden"
@ -82,6 +83,9 @@ export CXXFLAGS="%optflags -fvisibility-inlines-hidden"
%makeinstall
find %{buildroot} -type f -name "*.la" -delete -print
%check
make check
%post -n libopenraw1 -p /sbin/ldconfig
%postun -n libopenraw1 -p /sbin/ldconfig

146
openraw-noansiflag.patch Normal file
View File

@ -0,0 +1,146 @@
--- configure.in.orig
+++ configure.in
@@ -62,12 +62,13 @@ pkgconfigdir='${libdir}/pkgconfig'
AC_SUBST(pkgconfigdir)
dnl Checks for programs.
-AC_PROG_CC
+AC_PROG_CC_STDC
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_INSTALL
-AC_PROG_LIBTOOL
-
+LT_INIT([disable-static pic-only])
dnl Requirements
EXEMPI_REQUIRED=1.99.5
@@ -166,16 +167,13 @@ AM_CONDITIONAL(BUILD_GNOME_SUPPORT, test
AX_CFLAGS_GCC_OPTION([-Wextra])
AX_CXXFLAGS_GCC_OPTION([-Wextra])
-CXXFLAGS="$CXXFLAGS -ansi -pedantic -g -Wall -Wshadow"
-CFLAGS="$CFLAGS -pedantic -g -Wall"
+CXXFLAGS="$CXXFLAGS -g -Wall -Wshadow"
+CFLAGS="$CFLAGS -g -Wall"
-SHAVE_INIT
AC_OUTPUT([
Makefile
-shave
-shave-libtool
include/Makefile
include/libopenraw/Makefile
include/libopenraw++/Makefile
--- lib/Makefile.am.orig
+++ lib/Makefile.am
@@ -1,5 +1,5 @@
-INCLUDES = -I$(top_srcdir)/include
+AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include
SUBDIRS = io capi
@@ -40,7 +40,7 @@ noinst_HEADERS = or_debug.h \
lib_LTLIBRARIES = libopenraw.la
-libopenraw_la_LDFLAGS = \
+libopenraw_la_LDFLAGS = -no-undefined \
-version-info @LIBOPENRAW_VERSION_INFO@
# -export-symbols $(srcdir)/libopenraw.sym
--- tools/ordiag.cpp.orig
+++ tools/ordiag.cpp
@@ -19,6 +19,7 @@
* <http://www.gnu.org/licenses/>.
*/
+#include "config.h"
#include <unistd.h>
#include <iostream>
--- gnome/gdkpixbuf.c.orig
+++ gnome/gdkpixbuf.c
@@ -20,6 +20,8 @@
/** @brief gdkpixbuf support */
+#include "config.h"
+
#include <stdlib.h>
#include <string.h>
#include <glib.h>
--- gnome/pixbuf-loader.c.orig
+++ gnome/pixbuf-loader.c
@@ -21,6 +21,8 @@
/** @brief gdkpixbuf loader for RAW files */
+#include "config.h"
+
#include <stdlib.h>
#include <libopenraw/libopenraw.h>
--- lib/io/Makefile.am.orig
+++ lib/io/Makefile.am
@@ -1,5 +1,5 @@
-INCLUDES = -I$(top_srcdir)/include -I$(srcdir)/..
+AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include -I$(srcdir)/..
TESTS = teststream
--- lib/capi/Makefile.am.orig
+++ lib/capi/Makefile.am
@@ -1,7 +1,7 @@
-INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/lib
+AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include -I$(top_srcdir)/lib
noinst_LTLIBRARIES = libopenrawc.la
--- test/Makefile.am.orig
+++ test/Makefile.am
@@ -4,7 +4,7 @@ TESTS_ENVIRONMENT =
OPENRAW_LIB = $(top_builddir)/lib/libopenraw.la
-INCLUDES = \
+AM_CPPFLAGS = -include $(top_builddir)/config.h \
-I$(top_srcdir)/include \
-I$(top_srcdir)/lib
--- testsuite/Makefile.am.orig
+++ testsuite/Makefile.am
@@ -4,10 +4,10 @@ TESTS_ENVIRONMENT =
OPENRAW_LIB = $(top_builddir)/lib/libopenraw.la
-INCLUDES = \
+AM_CFLAGS = @LIBXML_CFLAGS@ @CURL_CFLAGS@
+AM_CPPFLAGS = -include $(top_builddir)/config.h \
-I$(top_srcdir)/include \
- -I$(top_srcdir)/lib \
- @LIBXML_CFLAGS@ @CURL_CFLAGS@
+ -I$(top_srcdir)/lib
noinst_PROGRAMS = testsuite
noinst_HEADERS = testsuitetags.h
--- gnome/Makefile.am.orig
+++ gnome/Makefile.am
@@ -29,7 +29,7 @@ libopenrawgnome_la_LIBADD = ../lib/libop
libopenrawgnome_la_SOURCES = gdkpixbuf.c
-libopenraw_pixbuf_la_LDFLAGS = -no-undefined -module -avoid-version
+libopenraw_pixbuf_la_LDFLAGS = -no-undefined -export-dynamic -shared -module -avoid-version
libopenraw_pixbuf_la_LIBADD = ../lib/libopenraw.la \
$(LIBGLIB_LIBS) \
$(LIBGDKPIXBUF_LIBS)