From 4f8311a15af7bfc2a693643437ed44a813d94c85567d8d72f67e139bb35ce9a5 Mon Sep 17 00:00:00 2001 From: Sascha Peilicke Date: Tue, 7 Jan 2014 09:01:15 +0000 Subject: [PATCH] Accepting request 212590 from home:elvigia:branches:multimedia:libs - Select the C standard to be used with autoconf macros instead of passing std=c99. - Correct CPPFLAGS and CFLAGS - Ensure config.h is always included, in 32 bit OS the library was using both fopen() and fopen64() this will cause problems with largefiles due to _FILE_OFFSET_BITS=64 beign used inconsistenly. - Patch name : libbluray-autotools.patch OBS-URL: https://build.opensuse.org/request/show/212590 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libbluray?expand=0&rev=20 --- libbluray-autotools.patch | 76 +++++++++++++++++++++++++++++++++++++++ libbluray.changes | 12 +++++++ libbluray.spec | 7 ++-- 3 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 libbluray-autotools.patch diff --git a/libbluray-autotools.patch b/libbluray-autotools.patch new file mode 100644 index 0000000..4fb90c6 --- /dev/null +++ b/libbluray-autotools.patch @@ -0,0 +1,76 @@ +--- libbluray-0.4.0.orig/configure.ac ++++ libbluray-0.4.0/configure.ac +@@ -99,8 +99,9 @@ AC_ARG_WITH([bdj-bootclasspath], + [BDJ_BOOTCLASSPATH=]) + + dnl required programs +-AC_PROG_CC +-AC_PROG_LIBTOOL ++AC_PROG_CC_STDC ++AC_USE_SYSTEM_EXTENSIONS ++LT_INIT([disable-static pic-only]) + + dnl required types + AC_TYPE_SIGNAL +@@ -115,23 +116,12 @@ AC_STRUCT_DIRENT_D_TYPE + + dnl required system services + AC_SYS_LARGEFILE ++AC_FUNC_FSEEKO + + dnl required functions + AC_CHECK_FUNC([snprintf],, [AC_MSG_ERROR($function_not_found)]) + +-dnl required libraries +-dnl pthreads (not on win32) +-AS_IF([test "${SYS}" != "mingw32"], [ +- AC_CHECK_HEADERS([pthread.h], , +- [AC_MSG_ERROR([pthread required])]) +- AC_SEARCH_LIBS([pthread_create], [pthread], , +- [AC_MSG_ERROR([pthread required])]) +- AC_SEARCH_LIBS([dlopen], [dl]) +- DLOPEN_LIBS="$ac_cv_search_dlopen" +- AS_CASE([$DLOPEN_LIBS], +- [no|none\ required], [DLOPEN_LIBS=""]) +- AC_SUBST([DLOPEN_LIBS]) +-]) ++AC_CHECK_HEADERS_ONCE([pthread.h]) + + dnl libxml2 for metadata parser + AS_IF([test "x$with_libxml2" != "xno"], [ +--- libbluray-0.4.0.orig/src/Makefile.am ++++ libbluray-0.4.0/src/Makefile.am +@@ -1,7 +1,7 @@ +-SET_FEATURES = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L -D_REENTRANT + SET_INCLUDES = -I$(top_srcdir) -Ifile -Ilibbluray -Ilibbluray/bdnav + +-AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_INCLUDES) $(LIBXML2_CFLAGS) $(FT2_CFLAGS) ++AM_CFLAGS = -pthread $(LIBXML2_CFLAGS) $(FT2_CFLAGS) ++AM_CPPFLAGS = $(SET_INCLUDES) -include config.h + + EXTRA_DIST = \ + libbluray/bdj/build.xml \ +@@ -109,8 +109,8 @@ endif + endif + + +-libbluray_la_LDFLAGS= -version-info $(LT_VERSION_INFO) +-libbluray_la_LIBADD= $(LIBXML2_LIBS) $(FT2_LIBS) ++libbluray_la_LDFLAGS= -no-undefined -version-info $(LT_VERSION_INFO) ++libbluray_la_LIBADD= $(LIBXML2_LIBS) $(FT2_LIBS) -ldl + + pkginclude_HEADERS = \ + file/filesystem.h \ +--- libbluray-0.4.0.orig/src/examples/Makefile.am ++++ libbluray-0.4.0/src/examples/Makefile.am +@@ -1,7 +1,8 @@ +-SET_FEATURES = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L -D_REENTRANT ++SET_FEATURES = -D_REENTRANT + SET_INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src/file -I$(top_srcdir)/src/libbluray/bdnav + +-AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_INCLUDES) ++AM_CFLAGS = $(SET_FEATURES) $(SET_INCLUDES) ++AM_CPPFLAGS = -include config.h + + if USING_EXAMPLES + diff --git a/libbluray.changes b/libbluray.changes index e1bba99..5411a8f 100644 --- a/libbluray.changes +++ b/libbluray.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Jan 1 22:21:18 UTC 2014 - crrodriguez@opensuse.org + +- Select the C standard to be used with autoconf macros + instead of passing std=c99. +- Correct CPPFLAGS and CFLAGS +- Ensure config.h is always included, in 32 bit OS the library + was using both fopen() and fopen64() this will cause + problems with largefiles due to _FILE_OFFSET_BITS=64 beign + used inconsistenly. +- Patch name : libbluray-autotools.patch + ------------------------------------------------------------------- Wed Dec 11 18:29:00 UTC 2013 - hrvoje.senjan@gmail.com diff --git a/libbluray.spec b/libbluray.spec index 970ab2f..01271da 100644 --- a/libbluray.spec +++ b/libbluray.spec @@ -1,7 +1,7 @@ # # spec file for package libbluray # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2011 Dominique Leuenberger, Amsterdam, The Netherlands # # All modifications and additions to the file contributed by third parties @@ -28,7 +28,9 @@ Source: ftp://ftp.videolan.org/pub/videolan/%{name}/%{version}/%{name}-% # PATCH-FIX-UPSTREAM use-recommended-freetype-include.patch -- Freetype upstream recommends using their macros together with # ft2build include. Positive sideeffect is that this patch makes it build with both freetype2 2.5.1, and older versions Patch0: use-recommended-freetype-include.patch +Patch1: libbluray-autotools.patch Source99: baselibs.conf +BuildRequires: libtool BuildRequires: pkg-config BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(libxml-2.0) >= 2.6 @@ -70,8 +72,9 @@ MPlayer). We, the authors of this library, do not condone nor endorse piracy. %prep %setup -q %patch0 -p1 - +%patch1 -p1 %build +autoreconf -fiv %configure --disable-static make %{?_smp_mflags}