From 24bbb91f600499f03e2749ebcdcc9a855983c42a Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: May 13 2013 15:12:47 +0000 Subject: Update to c-ares-1.10.0 - Obsolete upstreamed patches - Amend the multilib patch, there's no need to patch configure since we are running autoreconf anyways - https://raw.github.com/bagder/c-ares/cares-1_10_0/RELEASE-NOTES --- diff --git a/0002-cares-override.m4-provide-AC_CONFIG_MACRO_DIR-defini.patch b/0002-cares-override.m4-provide-AC_CONFIG_MACRO_DIR-defini.patch deleted file mode 100644 index 1301d8a..0000000 --- a/0002-cares-override.m4-provide-AC_CONFIG_MACRO_DIR-defini.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 70ac469a0c138eff5c0678fcb753d56710f589ec Mon Sep 17 00:00:00 2001 -From: Yang Tse -Date: Tue, 1 Jan 2013 18:21:34 +0100 -Subject: [PATCH] cares-override.m4: provide AC_CONFIG_MACRO_DIR definition - conditionally - -Provide a 'traceable' AC_CONFIG_MACRO_DIR definition only when using -an autoconf version that does not provide it, instead of what we were -doing up to now of providing and overriding AC_CONFIG_MACRO_DIR for -all autoconf versions. ---- - m4/cares-override.m4 | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - -diff --git a/m4/cares-override.m4 b/m4/cares-override.m4 -index afd7aeedf3db9da6fda6da1a95e2cc019c0184e6..72f486e8e0e3f0b1feb3ae6a1aa8929026d2056d 100644 ---- a/m4/cares-override.m4 -+++ b/m4/cares-override.m4 -@@ -2,7 +2,7 @@ - #*************************************************************************** - - # File version for 'aclocal' use. Keep it a single number. --# serial 5 -+# serial 6 - - dnl CARES_OVERRIDE_AUTOCONF - dnl ------------------------------------------------- -@@ -89,12 +89,12 @@ m4_defun([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], - [CARES_CHECK_PATH_SEPARATOR - m4_define([$0],[])]) - --dnl Override Autoconf's AC_CONFIG_MACRO_DIR (DIR) -+dnl Provide Autoconf's AC_CONFIG_MACRO_DIR (DIR) - dnl ------------------------------------------------- --dnl This is an emulation of Autoconf's 2.61 macro. --dnl This is done to use fixed macro across Autoconf --dnl versions, and avoid warnings from modern libtool --dnl which traces usage of this macro. -+dnl Allow usage of mentioned macro in configure.ac -+dnl even with ancient Autoconf versions, such as 2.57, -+dnl that do not provide a definition for this macro. - --AC_DEFUN([AC_CONFIG_MACRO_DIR],[:]) -+m4_ifndef([AC_CONFIG_MACRO_DIR], -+[AC_DEFUN([AC_CONFIG_MACRO_DIR],[:])]) - --- -1.8.1.4 - diff --git a/0003-configure-fix-automake-1.13-compatibility.patch b/0003-configure-fix-automake-1.13-compatibility.patch deleted file mode 100644 index 22a494e..0000000 --- a/0003-configure-fix-automake-1.13-compatibility.patch +++ /dev/null @@ -1,126 +0,0 @@ -From dc6c864108e16ad5821cadcf67d8e8faaab9443c Mon Sep 17 00:00:00 2001 -From: Yang Tse -Date: Wed, 23 Jan 2013 16:16:13 +0100 -Subject: [PATCH] configure: fix automake 1.13 compatibility - -Tested with: - -buildconf: autoconf version 2.69 -buildconf: autom4te version 2.69 -buildconf: autoheader version 2.69 -buildconf: automake version 1.13.1 -buildconf: aclocal version 1.13.1 -buildconf: libtool version 2.4 -buildconf: GNU m4 version 1.4.16 - -diff --git a/configure.ac b/configure.ac -index d520aa839717920b185c611cfc24e69a89648d03..68ec829e1faf47135f7549008a709a36ef2d18fc 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -5,6 +5,7 @@ AC_INIT([c-ares], [-], - [c-ares mailing list: http://cool.haxx.se/mailman/listinfo/c-ares]) - - XC_OVR_ZZ50 -+XC_OVR_ZZ60 - CARES_OVERRIDE_AUTOCONF - - AC_CONFIG_SRCDIR([ares_ipv6.h]) -diff --git a/m4/cares-override.m4 b/m4/cares-override.m4 -index 72f486e8e0e3f0b1feb3ae6a1aa8929026d2056d..524a92694b2ffad57ba1693db901ed6415c9a659 100644 ---- a/m4/cares-override.m4 -+++ b/m4/cares-override.m4 -@@ -2,7 +2,7 @@ - #*************************************************************************** - - # File version for 'aclocal' use. Keep it a single number. --# serial 6 -+# serial 7 - - dnl CARES_OVERRIDE_AUTOCONF - dnl ------------------------------------------------- -@@ -89,12 +89,3 @@ m4_defun([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR], - [CARES_CHECK_PATH_SEPARATOR - m4_define([$0],[])]) - --dnl Provide Autoconf's AC_CONFIG_MACRO_DIR (DIR) --dnl ------------------------------------------------- --dnl Allow usage of mentioned macro in configure.ac --dnl even with ancient Autoconf versions, such as 2.57, --dnl that do not provide a definition for this macro. -- --m4_ifndef([AC_CONFIG_MACRO_DIR], --[AC_DEFUN([AC_CONFIG_MACRO_DIR],[:])]) -- -diff --git a/m4/zz60-xc-ovr.m4 b/m4/zz60-xc-ovr.m4 -new file mode 100644 -index 0000000000000000000000000000000000000000..959f1188377c8c478524c21dfd3dc98a7b3d1f59 ---- /dev/null -+++ b/m4/zz60-xc-ovr.m4 -@@ -0,0 +1,64 @@ -+#--------------------------------------------------------------------------- -+# -+# zz60-xc-ovr.m4 -+# -+# Copyright (c) 2013 Daniel Stenberg -+# -+# Permission to use, copy, modify, and distribute this software for any -+# purpose with or without fee is hereby granted, provided that the above -+# copyright notice and this permission notice appear in all copies. -+# -+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -+# -+#--------------------------------------------------------------------------- -+ -+# serial 1 -+ -+ -+dnl The funny name of this file is intentional in order to make it -+dnl sort alphabetically after any libtool, autoconf or automake -+dnl provided .m4 macro file that might get copied into this same -+dnl subdirectory. This allows that macro (re)definitions from this -+dnl file may override those provided in other files. -+ -+ -+dnl Override an autoconf provided macro -+dnl ------------------------------------------------- -+dnl This macro overrides the one provided by autoconf -+dnl 2.58 or newer, and provides macro definition for -+dnl autoconf 2.57 or older which lack it. This allows -+dnl using libtool 2.2 or newer, which requires that -+dnl this macro is used in configure.ac, with autoconf -+dnl 2.57 or older. -+ -+m4_ifdef([AC_CONFIG_MACRO_DIR], -+[dnl -+m4_undefine([AC_CONFIG_MACRO_DIR])dnl -+]) -+m4_define([AC_CONFIG_MACRO_DIR],[]) -+ -+ -+dnl XC_OVR_ZZ60 -+dnl ------------------------------------------------- -+dnl Placing a call to this macro in configure.ac will -+dnl make macros in this file visible to other macros -+dnl used for same configure script, overriding those -+dnl provided elsewhere. -+ -+AC_DEFUN([XC_OVR_ZZ60], -+[dnl -+AC_BEFORE([$0],[LT_INIT])dnl -+AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl -+AC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl -+AC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl -+dnl -+AC_BEFORE([$0],[AC_CONFIG_MACRO_DIR])dnl -+AC_BEFORE([$0],[AC_CONFIG_MACRO_DIRS])dnl -+]) -+ --- -1.8.1.4 - diff --git a/c-ares-1.10.0-multilib.patch b/c-ares-1.10.0-multilib.patch new file mode 100644 index 0000000..4daa9d2 --- /dev/null +++ b/c-ares-1.10.0-multilib.patch @@ -0,0 +1,30 @@ +diff -up c-ares-1.10.0/ares_build.h.in.multilib c-ares-1.10.0/ares_build.h.in +--- c-ares-1.10.0/ares_build.h.in.multilib 2013-05-13 11:40:22.697814087 +0200 ++++ c-ares-1.10.0/ares_build.h.in 2013-05-13 11:40:26.236813966 +0200 +@@ -96,7 +96,14 @@ + #endif + + /* The size of `long', as computed by sizeof. */ +-#undef CARES_SIZEOF_LONG ++#include ++#if __WORDSIZE == 32 ++#define CARES_SIZEOF_LONG 4 ++#elif __WORDSIZE == 64 ++#define CARES_SIZEOF_LONG 8 ++#else ++#error "Unknown word size" ++#endif + + /* Integral data type used for ares_socklen_t. */ + #undef CARES_TYPEOF_ARES_SOCKLEN_T +diff -up c-ares-1.10.0/configure.ac.multilib c-ares-1.10.0/configure.ac +--- c-ares-1.10.0/configure.ac.multilib 2013-05-13 11:41:00.480812797 +0200 ++++ c-ares-1.10.0/configure.ac 2013-05-13 11:41:17.210812226 +0200 +@@ -457,7 +457,6 @@ AC_CHECK_SIZEOF(size_t) + AC_CHECK_SIZEOF(long) + AC_CHECK_SIZEOF(int) + AC_CHECK_SIZEOF(short) +-CARES_CONFIGURE_LONG + AC_CHECK_SIZEOF(time_t) + + AC_CHECK_TYPE(long long, diff --git a/c-ares-1.8.0-multilib.patch b/c-ares-1.8.0-multilib.patch deleted file mode 100644 index 64e8a48..0000000 --- a/c-ares-1.8.0-multilib.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- ares_build.h.in -+++ ares_build.h.in -@@ -96,7 +96,14 @@ - #endif - - /* The size of `long', as computed by sizeof. */ --#undef CARES_SIZEOF_LONG -+#include -+#if __WORDSIZE == 32 -+#define CARES_SIZEOF_LONG 4 -+#elif __WORDSIZE == 64 -+#define CARES_SIZEOF_LONG 8 -+#else -+#error "Unknown word size" -+#endif - - /* Integral data type used for ares_socklen_t. */ - #undef CARES_TYPEOF_ARES_SOCKLEN_T ---- configure.ac -+++ configure.ac -@@ -468,7 +468,6 @@ AC_CHECK_SIZEOF(size_t) - AC_CHECK_SIZEOF(long) - AC_CHECK_SIZEOF(int) - AC_CHECK_SIZEOF(short) --CARES_CONFIGURE_LONG - AC_CHECK_SIZEOF(time_t) - - AC_CHECK_TYPE(long long, ---- configure -+++ configure -@@ -18096,17 +18096,6 @@ - _ACEOF - - -- -- if test -z "$ac_cv_sizeof_long" || -- test "$ac_cv_sizeof_long" -eq "0"; then -- as_fn_error "cannot find out size of long." "$LINENO" 5 -- fi -- --cat >>confdefs.h <<_EOF --#define CARES_SIZEOF_LONG $ac_cv_sizeof_long --_EOF -- -- - # The cast to long int works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. diff --git a/c-ares.spec b/c-ares.spec index 2215752..cae7bfc 100644 --- a/c-ares.spec +++ b/c-ares.spec @@ -1,7 +1,7 @@ Summary: A library that performs asynchronous DNS operations Name: c-ares -Version: 1.9.1 -Release: 6%{?dist} +Version: 1.10.0 +Release: 1%{?dist} License: MIT Group: System Environment/Libraries URL: http://c-ares.haxx.se/ @@ -9,9 +9,7 @@ Source0: http://c-ares.haxx.se/download/%{name}-%{version}.tar.gz # The license can be obtained at http://c-ares.haxx.se/license.html Source1: LICENSE Patch0: 0001-Use-RPM-compiler-options.patch -Patch1: c-ares-1.8.0-multilib.patch -Patch2: 0002-cares-override.m4-provide-AC_CONFIG_MACRO_DIR-defini.patch -Patch3: 0003-configure-fix-automake-1.13-compatibility.patch +Patch1: c-ares-1.10.0-multilib.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -37,9 +35,7 @@ compile applications or shared objects that use c-ares. %prep %setup -q %patch0 -p1 -b .optflags -%patch1 -p0 -b .multilib -%patch2 -p1 -b .override -%patch3 -p1 -b .autoconf +%patch1 -p1 -b .multilib cp %{SOURCE1} . f=CHANGES ; iconv -f iso-8859-1 -t utf-8 $f -o $f.utf8 ; mv $f.utf8 $f @@ -78,6 +74,13 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/ares_* %changelog +* Mon May 13 2013 Jakub Hrozek - 1.10.1-1 +- New upstream release 1.10 +- Obsolete upstreamed patches +- Amend the multilib patch, there's no need to patch configure since we + are running autoreconf anyways +- https://raw.github.com/bagder/c-ares/cares-1_10_0/RELEASE-NOTES + * Thu Apr 11 2013 Jakub Hrozek - 1.9.1-6 - Apply an upstream patch to override AC_CONFIG_MACRO_DIR only conditionally