diff --git a/w3c-libwww-HTRDF.patch b/w3c-libwww-HTRDF.patch new file mode 100644 index 0000000..e249d05 --- /dev/null +++ b/w3c-libwww-HTRDF.patch @@ -0,0 +1,12 @@ +Index: libwww-dev/Library/src/HTRDF.c +=================================================================== +--- libwww-dev.orig/Library/src/HTRDF.c ++++ libwww-dev/Library/src/HTRDF.c +@@ -25,6 +25,7 @@ + #include "WWWInit.h" + #include "WWWXML.h" + #include "HTRDF.h" ++#include "HTXML.h" + + extern HTStream * HTXML_new (HTRequest * request, void * param, HTFormat input_format, HTFormat output_format, HTStream * output_stream); + extern BOOL HTXMLCallback_registerNew (HTXMLCallback_new * me, void * context); diff --git a/w3c-libwww-UndefinedOp.patch b/w3c-libwww-UndefinedOp.patch new file mode 100644 index 0000000..677c140 --- /dev/null +++ b/w3c-libwww-UndefinedOp.patch @@ -0,0 +1,57 @@ +Index: libwww-dev/Library/src/HTWWWStr.c +=================================================================== +--- libwww-dev.orig/Library/src/HTWWWStr.c ++++ libwww-dev/Library/src/HTWWWStr.c +@@ -426,10 +426,10 @@ PUBLIC time_t HTParseTime (const char * + } + tm.tm_mday = strtol(s, &s, 10); + tm.tm_mon = make_month(s, &s); +- tm.tm_year = strtol(++s, &s, 10); ++ ++s; tm.tm_year = strtol(s, &s, 10); + tm.tm_hour = strtol(s, &s, 10); +- tm.tm_min = strtol(++s, &s, 10); +- tm.tm_sec = strtol(++s, &s, 10); ++ ++s; tm.tm_min = strtol(s, &s, 10); ++ ++s; tm.tm_sec = strtol(s, &s, 10); + + } else { /* Second format */ + HTTRACE(CORE_TRACE, "Format...... Wkd, 00 Mon 0000 00:00:00 GMT\n"); +@@ -441,8 +441,8 @@ PUBLIC time_t HTParseTime (const char * + tm.tm_mon = make_month(s, &s); + tm.tm_year = strtol(s, &s, 10) - 1900; + tm.tm_hour = strtol(s, &s, 10); +- tm.tm_min = strtol(++s, &s, 10); +- tm.tm_sec = strtol(++s, &s, 10); ++ ++s; tm.tm_min = strtol(s, &s, 10); ++ ++s; tm.tm_sec = strtol(s, &s, 10); + } + } else if (isdigit((int) *str)) { + +@@ -455,11 +455,11 @@ PUBLIC time_t HTParseTime (const char * + return 0; + } + tm.tm_year = strtol(s, &s, 10) - 1900; +- tm.tm_mon = strtol(++s, &s, 10); +- tm.tm_mday = strtol(++s, &s, 10); +- tm.tm_hour = strtol(++s, &s, 10); +- tm.tm_min = strtol(++s, &s, 10); +- tm.tm_sec = strtol(++s, &s, 10); ++ ++s; tm.tm_mon = strtol(s, &s, 10); ++ ++s; tm.tm_mday = strtol(s, &s, 10); ++ ++s; tm.tm_hour = strtol(s, &s, 10); ++ ++s; tm.tm_min = strtol(s, &s, 10); ++ ++s; tm.tm_sec = strtol(s, &s, 10); + + } else { /* delta seconds */ + t = expand ? time(NULL) + atol(str) : atol(str); +@@ -499,8 +499,8 @@ PUBLIC time_t HTParseTime (const char * + tm.tm_mon = make_month(s, &s); + tm.tm_mday = strtol(s, &s, 10); + tm.tm_hour = strtol(s, &s, 10); +- tm.tm_min = strtol(++s, &s, 10); +- tm.tm_sec = strtol(++s, &s, 10); ++ ++s; tm.tm_min = strtol(s, &s, 10); ++ ++s; tm.tm_sec = strtol(s, &s, 10); + tm.tm_year = strtol(s, &s, 10) - 1900; + } + if (tm.tm_sec < 0 || tm.tm_sec > 59 || diff --git a/w3c-libwww-fix_protos.patch b/w3c-libwww-fix_protos.patch index fe4d678..dfcf1b2 100644 --- a/w3c-libwww-fix_protos.patch +++ b/w3c-libwww-fix_protos.patch @@ -1,6 +1,8 @@ ---- Library/src/HTRDF.c.orig 2009-09-27 23:01:34.000000000 +0200 -+++ Library/src/HTRDF.c 2009-09-27 23:05:24.000000000 +0200 -@@ -25,6 +25,9 @@ +Index: Library/src/HTRDF.c +=================================================================== +--- Library/src/HTRDF.c.orig ++++ Library/src/HTRDF.c +@@ -26,6 +26,9 @@ #include "WWWXML.h" #include "HTRDF.h" @@ -10,7 +12,7 @@ struct _HTStream { const HTStreamClass * isa; int state; -@@ -2701,7 +2705,7 @@ +@@ -2702,7 +2705,7 @@ PUBLIC BOOL HTRDF_parseFile (const char else buff_len = strlen (buff); if (! XML_Parse(xmlparser, buff, buff_len, done)) { @@ -19,7 +21,7 @@ XML_GetCurrentLineNumber(xmlparser), XML_ErrorString(XML_GetErrorCode(xmlparser))); HT_FREE(uri); -@@ -2779,7 +2783,7 @@ +@@ -2780,7 +2783,7 @@ PUBLIC BOOL HTRDF_parseBuffer (const cha return NO; if (! XML_Parse(xmlparser, buffer, buffer_len, 1)) { diff --git a/w3c-libwww.spec b/w3c-libwww.spec index 5de68ed..52d3417 100644 --- a/w3c-libwww.spec +++ b/w3c-libwww.spec @@ -7,7 +7,7 @@ Name: w3c-libwww Version: 5.4.1 Release: 0 License: W3C (see: http://www.w3.org/Consortium/Legal/copyright-software.html) -Group: System Environment/Libraries +Group: System/Libraries #cvs -d :pserver:anonymous@dev.w3.org:/sources/public login #after which you type "anonymous" as password. #cvs -d :pserver:anonymous@dev.w3.org:/sources/public -z3 checkout libwww @@ -18,6 +18,8 @@ Patch3: w3c-libwww-md5.patch Patch4: w3c-libwww-makefile.patch Patch5: w3c-libwww-multiarch.patch Patch6: w3c-libwww-fix_protos.patch +Patch7: w3c-libwww-HTRDF.patch +Patch8: w3c-libwww-UndefinedOp.patch URL: http://www.w3.org/Library BuildRoot: /var/tmp/%{name}-root BuildRequires: libtool autoconf automake zlib-devel @@ -77,6 +79,8 @@ until someone updates it to some new interfaces. (hint, hint...) %patch4 %patch5 %patch6 +%patch7 -p1 +%patch8 -p1 %__rm -rf modules/expat @@ -98,12 +102,23 @@ export CPPFLAGS="$RPM_OPT_FLAGS -fPIC" export tagname=CC # Omit unused direct shared library dependencies. -%__sed -i 's! -shared ! -Wl,--as-needed\0!g' libtool +%__sed -i 's! \\\$compiler_flags !\0-Wl,--as-needed !g' libtool -%__make %{?jobs:-j%{jobs}} +# cannot figure out what to do to this mix of -l and libraries supplied +# with full path. Local builds are fine, resetting SUSE_ASNEEDED solves this +export SUSE_ASNEEDED=0 +%__make %install export tagname=CC + +# manual install of this lib. +install -d %{buildroot}%{_libdir} +for ext in so so.0 so.0.0.0; do + install Library/src/.libs/libwwwxml.$ext \ + %{buildroot}%{_libdir}/libwwwxml.$ext +done + %makeinstall %__rm "%{buildroot}%{_libdir}"/*.la @@ -112,6 +127,7 @@ export tagname=CC %__install -p -m644 wwwconf.h "%{buildroot}%{_includedir}/w3c-libwww/" + # multiarch timestamps touch -r README.html \ %{buildroot}%{_bindir}/libwww-config \ @@ -173,6 +189,8 @@ touch -r README.html \ %{_libdir}/libwwwutils.so.%{soname}.* %{_libdir}/libwwwzip.so.%{soname} %{_libdir}/libwwwzip.so.%{soname}.* +%{_libdir}/libwwwxml.so.%{soname} +%{_libdir}/libwwwxml.so.%{soname}.* %{_datadir}/w3c-libwww %files apps