From bd82eb9f5c039c38274bfc58776843eceead228e30b77daf081842841a997ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Thu, 19 Jul 2012 16:59:57 +0000 Subject: [PATCH] Accepting request 128137 from home:elvigia:branches:devel:libraries:c_c++ - Enable IPV6 support... - Fix autotools, all C files must include "*config.h" - DO not build samples OBS-URL: https://build.opensuse.org/request/show/128137 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libupnp?expand=0&rev=7 --- libupnp-configure.patch | 114 ++++++++++++++++++++++++++++++++++++++++ libupnp.changes | 7 +++ libupnp.spec | 9 ++-- 3 files changed, 127 insertions(+), 3 deletions(-) create mode 100644 libupnp-configure.patch diff --git a/libupnp-configure.patch b/libupnp-configure.patch new file mode 100644 index 0000000..616a026 --- /dev/null +++ b/libupnp-configure.patch @@ -0,0 +1,114 @@ +--- configure.ac.orig ++++ configure.ac +@@ -7,9 +7,9 @@ + # (C) Copyright 2005-2007 RĂ©mi Turboult + # + +-AC_PREREQ(2.60) ++AC_PREREQ([2.60]) + +-AC_INIT([libupnp], [1.6.13], [mroberto@users.sourceforge.net]) ++AC_INIT([libupnp],[1.6.13],[mroberto@users.sourceforge.net]) + dnl ############################################################################ + dnl # *Independently* of the above libupnp package version, the libtool version + dnl # of the 3 libraries need to be updated whenever there is a change released: +@@ -293,7 +293,6 @@ AC_CANONICAL_HOST + # installed libraries. + # + AC_CONFIG_HEADERS([autoconfig.h upnp/inc/upnpconfig.h]) +-#AC_SYS_LARGEFILE_SENSITIVE + + AC_REVISION([$Revision: 1.11 $]) + +@@ -405,9 +404,12 @@ AC_MSG_RESULT($docdir) + # + # Checks for programs + # +-AC_PROG_CC ++AC_PROG_CC_STDC ++AC_USE_SYSTEM_EXTENSIONS ++AC_SYS_LARGEFILE + AM_PROG_CC_C_O +-AC_PROG_LIBTOOL ++m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) ++LT_INIT + AC_PROG_INSTALL + AC_PROG_MAKE_SET + AC_PROG_EGREP +@@ -431,9 +433,6 @@ freebsd*) + #: + # Use -O0 in debug so that variables do not get optimized out + AX_CFLAGS_GCC_OPTION([-O0, -g]) +- else +- # add optimise for size +- AX_CFLAGS_GCC_OPTION([-Os]) + fi + ;; + esac +@@ -447,8 +446,6 @@ echo "---------------------------------- + # + AC_TYPE_SIZE_T + AC_TYPE_OFF_T +-AC_DEFINE([_LARGE_FILE_SOURCE], [], [Large files support]) +-AC_DEFINE([_FILE_OFFSET_BITS], [64], [File Offset size]) + + + # +--- ixml/Makefile.am.orig ++++ ixml/Makefile.am +@@ -7,7 +7,7 @@ + + SUBDIRS = doc + +-AM_CPPFLAGS = -I$(srcdir)/inc -I$(srcdir)/src/inc ++AM_CPPFLAGS = -include $(top_builddir)/autoconfig.h -I$(srcdir)/inc -I$(srcdir)/src/inc + AM_CFLAGS = + + LDADD = libixml.la +--- threadutil/Makefile.am.orig ++++ threadutil/Makefile.am +@@ -4,7 +4,7 @@ + # (C) Copyright 2005 Remi Turboult + # + +-AM_CPPFLAGS = -I$(srcdir)/inc -I$(srcdir)/src/inc ++AM_CPPFLAGS = -include $(top_builddir)/autoconfig.h -I$(srcdir)/inc -I$(srcdir)/src/inc + + if ENABLE_DEBUG + AM_CPPFLAGS += -DDEBUG -DSTATS +--- upnp/src/api/UpnpString.c.orig ++++ upnp/src/api/UpnpString.c +@@ -28,33 +28,6 @@ + /* Other systems have strncasecmp */ + #endif + +-/* strnlen() is a GNU extension. */ +-#if HAVE_STRNLEN +- extern size_t strnlen(const char *s, size_t maxlen); +-#else /* HAVE_STRNLEN */ +- static size_t strnlen(const char *s, size_t n) +- { +- const char *p = (const char *)memchr(s, 0, n); +- return p ? p - s : n; +- } +-#endif /* HAVE_STRNLEN */ +- +-/* strndup() is a GNU extension. */ +-#if HAVE_STRNDUP && !defined(WIN32) +- extern char *strndup(__const char *__string, size_t __n); +-#else /* HAVE_STRNDUP && !defined(WIN32) */ +- static char *strndup(const char *__string, size_t __n) +- { +- size_t strsize = strnlen(__string, __n); +- char *newstr = (char *)malloc(strsize + 1); +- +- strncpy(newstr, __string, strsize); +- newstr[strsize] = 0; +- +- return newstr; +- } +-#endif /* HAVE_STRNDUP && !defined(WIN32) */ +- + /*! + * \brief Internal implementation of the class UpnpString. + * diff --git a/libupnp.changes b/libupnp.changes index 08458fa..37802bb 100644 --- a/libupnp.changes +++ b/libupnp.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jul 17 14:53:58 UTC 2012 - crrodriguez@opensuse.org + +- Enable IPV6 support... +- Fix autotools, all C files must include "*config.h" +- DO not build samples + ------------------------------------------------------------------- Sat Feb 25 08:35:41 UTC 2012 - coolo@suse.com diff --git a/libupnp.spec b/libupnp.spec index 3adc95f..3f14751 100644 --- a/libupnp.spec +++ b/libupnp.spec @@ -28,7 +28,9 @@ Group: System/Libraries Url: http://sourceforge.net/projects/pupnp/ Source0: http://downloads.sourceforge.net/pupnp/libupnp-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: libtool BuildRequires: pkgconfig +Patch: libupnp-configure.patch %description The portable Universal Plug and Play (UPnP) SDK provides support for building @@ -55,10 +57,11 @@ UPnP-compliant control points, devices, and bridges on several operating systems. %prep -%setup - +%setup -q +%patch %build -%configure --disable-static +autoreconf -fiv +%configure --disable-samples --enable-ipv6 --disable-static make %{?_smp_mflags} %install