# HG changeset patch # User Aleksej Bobylev # Date 1524313797 -10800 # Node ID e9b3d0cd4c89a2348283133d7bf4c38403a1ace5 # Parent d329acd936d36cb90cc3c95582ed967f000ff201 Up / fix build: wvstreams, xalan-c, xerces-c diff -r d329acd936d3 -r e9b3d0cd4c89 wvstreams/receipt --- a/wvstreams/receipt Sat Apr 21 14:23:02 2018 +0300 +++ b/wvstreams/receipt Sat Apr 21 15:29:57 2018 +0300 @@ -6,55 +6,55 @@ SHORT_DESC="makes modem-based connection to Internet" MAINTAINER="jozee@slitaz.org" LICENSE="GPL2" +WEB_SITE="https://code.google.com/archive/p/wvstreams/" + TARBALL="$PACKAGE-$VERSION.tar.gz" -WEB_SITE="http://wvstreams.googlecode.com" -WGET_URL="http://wvstreams.googlecode.com/files/$TARBALL" +WGET_URL="https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/wvstreams/$TARBALL" -BUILD_DEPENDS="ppp-dev openssl-dev xplc-dev readline-dev bash zlib-dev" -SPLIT="wvstreams wvstreams-dev" +BUILD_DEPENDS="ppp-dev openssl10-dev xplc-dev readline-dev bash zlib-dev" +SPLIT="wvstreams-dev" -# Rules to configure and make the package. -compile_rules() -{ +compile_rules() { sed -i 's/wvuid.h"/&\n#include /' utils/wvuid.cc sed -i 's/ X509V3_EXT_METHOD/ const X509V3_EXT_METHOD/' crypto/wvx509.cc sed -i 's/def MACOS/ 1/' streams/wvatomicfile.cc \ ipstreams/wvunixdgsocket.cc - ./configure $CONFIGURE_ARGS \ - --prefix=/usr \ + + CPPFLAGS=-I/usr/include/openssl-1.0 \ + LDFLAGS=-L/usr/lib/openssl-1.0 \ + ./configure \ --without-dbus \ --without-tcl \ --without-qt \ --without-pam \ - --without-valgrind && - make -j1 && make -j1 install + --without-valgrind \ + $CONFIGURE_ARGS && + make \ + -j1 \ + COPTS="$CFLAGS -fPIC" \ + CXXOPTS="$CXXFLAGS -fPIC -fpermissive -fno-tree-dce -fno-optimize-sibling-calls" \ + VERBOSE=1 && + make -j1 install || return 1 + + # --without-dbus still installs the .pc file + rm $install/usr/lib/pkgconfig/libwvdbus.pc + # --without-qt still installs the .pc file + rm $install/usr/lib/pkgconfig/libwvqt.pc } -# Rules to gen a SliTaz package suitable for Tazpkg. -genpkg_rules() -{ +genpkg_rules() { case $PACKAGE in - wvstreams) - TAGS="network 3G" - DEPENDS="ppp openssl xplc readline" - mkdir -p $fs/usr/lib $fs/etc $fs/var - cp -a $install/usr/bin $fs/usr - cp -a $install/usr/lib/*.so* $fs/usr/lib - cp -a $install/usr/lib/valgrind $fs/usr/lib - cp -a $install/usr/sbin $fs/usr - cp -a $install/usr/etc/* $fs/etc - cp -a $install/usr/var/* $fs/var - ;; - wvstreams-dev) - mkdir -p $fs/usr/lib - cp -a $install/usr/lib/pkgconfig $fs/usr/lib - cp -a $install/usr/lib/*.*a $fs/usr/lib - cp -a $install/usr/include/ $fs/usr - ;; + wvstreams) + copy @std + DEPENDS="openssl10 readline zlib ppp xplc" + TAGS="network 3G" + ;; + *-dev) + copy @dev + ;; esac } -post_remove_wvstreams() -{ +post_remove_wvstreams() { rm -rf "$1/etc/ppp/peers/wvdial" } diff -r d329acd936d3 -r e9b3d0cd4c89 wvstreams/stuff/patches/openssl-buildfix.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wvstreams/stuff/patches/openssl-buildfix.patch Sat Apr 21 15:29:57 2018 +0300 @@ -0,0 +1,14 @@ +--- wvstreams-4.6.1/crypto/wvx509.cc 2008-10-23 22:23:49.000000000 +0200 ++++ wvstreams-4.6.1-1/crypto/wvx509.cc 2010-01-27 11:09:06.000000000 +0100 +@@ -1157,7 +1157,11 @@ + + if (ext) + { ++#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++ const X509V3_EXT_METHOD *method = X509V3_EXT_get(ext); ++#else + X509V3_EXT_METHOD *method = X509V3_EXT_get(ext); ++#endif + if (!method) + { + WvDynBuf buf; diff -r d329acd936d3 -r e9b3d0cd4c89 wvstreams/stuff/patches/package-wvstreams-add-patch-to-fix-build-with-C99-compilers.patch --- a/wvstreams/stuff/patches/package-wvstreams-add-patch-to-fix-build-with-C99-compilers.patch Sat Apr 21 14:23:02 2018 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,170 +0,0 @@ -From patchwork Fri Sep 23 21:42:27 2016 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 8bit -Subject: package/wvstreams: add patch to fix build with C99 compilers -X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rg_Krause?= - -X-Patchwork-Id: 674238 -Message-Id: <20160923214227.12888-1-joerg.krause@embedded.rocks> -To: buildroot@buildroot.org -Date: Fri, 23 Sep 2016 23:42:27 +0200 -From: =?UTF-8?q?J=C3=B6rg=20Krause?= -List-Id: Discussion and development of buildroot - -wvstreams uses a bundled version of argp. Compiling argp fails for all -compilers not using the C89 standard by default: - -""" -In file included from argp-fmtstream.c:35:0: -argp-namefrob.h:62:32: error: redefinition of ‘argp_fmtstream_write’ - #define __argp_fmtstream_write argp_fmtstream_write - ^ -argp-fmtstream.c:395:1: note: in expansion of macro -‘__argp_fmtstream_write’ - __argp_fmtstream_write (argp_fmtstream_t __fs, - ^ -In file included from argp-fmtstream.c:34:0: -argp-fmtstream.h:209:32: note: previous definition of -‘argp_fmtstream_write’ was here - #define __argp_fmtstream_write argp_fmtstream_write - ^ -argp-fmtstream.h:223:1: note: in expansion of macro -‘__argp_fmtstream_write’ - __argp_fmtstream_write (argp_fmtstream_t __fs, - ^ -""" - -The issue is that C99 changed inline semantics. This patch takes these -changes into account and allows to build the bundled argp and therefore -wvstreams with non-C89-compilers. - -Note, that wvstreams is not maintained anymore. Last activity was on -Github was 2011, the current version 1.6.1 dates from 2009. - -Fetch-from: http://review.gluster.org/6034 - -Fixes: -http://autobuild.buildroot.net/results/f01/f0166f030875ecaf0d757790de6361339071831e/ -http://autobuild.buildroot.net/results/32b/32b4eba8c7cbe8a3b1cde2d67f1af3f913fcc292/ -http://autobuild.buildroot.net/results/38f/38fefa126596c6e267ffaf0f2dd9c5e3dcf09aff/ -http://autobuild.buildroot.net/results/ea2/ea223c8a4f817541f55aa36c47b159a316031bff/ -.. and many more. - -Signed-off-by: Jörg Krause ---- - .../0006-fix-build-with-C99-compilers.patch | 105 +++++++++++++++++++++ - 1 file changed, 105 insertions(+) - create mode 100644 package/wvstreams/0006-fix-build-with-C99-compilers.patch - -diff --git a/package/wvstreams/0006-fix-build-with-C99-compilers.patch b/package/wvstreams/0006-fix-build-with-C99-compilers.patch -new file mode 100644 -index 0000000..2bd34a0 ---- /dev/null -+++ b/package/wvstreams/0006-fix-build-with-C99-compilers.patch -@@ -0,0 +1,105 @@ -+From b2dfa011a3fdcb7d22764d143517d0fbd1c2a201 Mon Sep 17 00:00:00 2001 -+From: Emmanuel Dreyfus -+Date: Wed, 22 Jan 2014 14:47:23 +0100 -+Subject: [PATCH] Fix build with C99 compilers -+ -+wvstreams uses a bundled version of argp. Compiling argp fails for all compilers -+not using the C89 standard by default: -+ -+""" -+In file included from argp-fmtstream.c:35:0: -+argp-namefrob.h:62:32: error: redefinition of ‘argp_fmtstream_write’ -+ #define __argp_fmtstream_write argp_fmtstream_write -+ ^ -+argp-fmtstream.c:395:1: note: in expansion of macro ‘__argp_fmtstream_write’ -+ __argp_fmtstream_write (argp_fmtstream_t __fs, -+ ^ -+In file included from argp-fmtstream.c:34:0: -+argp-fmtstream.h:209:32: note: previous definition of ‘argp_fmtstream_write’ was here -+ #define __argp_fmtstream_write argp_fmtstream_write -+ ^ -+argp-fmtstream.h:223:1: note: in expansion of macro ‘__argp_fmtstream_write’ -+ __argp_fmtstream_write (argp_fmtstream_t __fs, -+ ^ -+""" -+ -+The issue is that C99 changed inline semantics. This patch allows to build -+argp with non-C89-compilers. -+ -+Fetch-from: http://review.gluster.org/6034 -+ -+Signed-off-by: Emmanuel Dreyfus -+Reviewed-by: Harshavardhana -+Tested-by: Gluster Build System -+ -+[Adapt paths for wvstreams. Add commit message.] -+Signed-off-by: Jörg Krause -+--- -+ -+diff --git a/argp/argp-fmtstream.c b/argp/argp-fmtstream.c -+index 7f79285..494b6b3 100644 -+--- a/argp/argp-fmtstream.c -++++ b/argp/argp-fmtstream.c -+@@ -389,6 +389,7 @@ -+ weak_alias (__argp_fmtstream_printf, argp_fmtstream_printf) -+ #endif -+ -++#if __STDC_VERSION__ - 199900L < 1 -+ /* Duplicate the inline definitions in argp-fmtstream.h, for compilers -+ * that don't do inlining. */ -+ size_t -+@@ -471,5 +472,6 @@ -+ __argp_fmtstream_update (__fs); -+ return __fs->point_col >= 0 ? __fs->point_col : 0; -+ } -++#endif /* __STDC_VERSION__ - 199900L < 1 */ -+ -+ #endif /* !ARGP_FMTSTREAM_USE_LINEWRAP */ -+diff --git a/argp/argp-fmtstream.h b/argp/argp-fmtstream.h -+index e797b11..828f435 100644 -+--- a/argp/argp-fmtstream.h -++++ b/argp/argp-fmtstream.h -+@@ -153,6 +153,7 @@ -+ __const char *__fmt, ...) -+ PRINTF_STYLE(2,3); -+ -++#if __STDC_VERSION__ - 199900L < 1 -+ extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch); -+ extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch); -+ -+@@ -163,6 +164,7 @@ -+ __const char *__str, size_t __len); -+ extern size_t argp_fmtstream_write (argp_fmtstream_t __fs, -+ __const char *__str, size_t __len); -++#endif /* __STDC_VERSION__ - 199900L < 1 */ -+ -+ /* Access macros for various bits of state. */ -+ #define argp_fmtstream_lmargin(__fs) ((__fs)->lmargin) -+@@ -172,6 +174,7 @@ -+ #define __argp_fmtstream_rmargin argp_fmtstream_rmargin -+ #define __argp_fmtstream_wmargin argp_fmtstream_wmargin -+ -++#if __STDC_VERSION__ - 199900L < 1 -+ /* Set __FS's left margin to LMARGIN and return the old value. */ -+ extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, -+ size_t __lmargin); -+@@ -193,6 +196,7 @@ -+ /* Return the column number of the current output point in __FS. */ -+ extern size_t argp_fmtstream_point (argp_fmtstream_t __fs); -+ extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs); -++#endif /* __STDC_VERSION__ - 199900L < 1 */ -+ -+ /* Internal routines. */ -+ extern void _argp_fmtstream_update (argp_fmtstream_t __fs); -+@@ -216,7 +220,11 @@ -+ #endif -+ -+ #ifndef ARGP_FS_EI -++#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__) -+ #define ARGP_FS_EI extern inline -++#else -++#define ARGP_FS_EI inline -++#endif -+ #endif -+ -+ ARGP_FS_EI size_t diff -r d329acd936d3 -r e9b3d0cd4c89 wvstreams/stuff/patches/series --- a/wvstreams/stuff/patches/series Sat Apr 21 14:23:02 2018 +0300 +++ b/wvstreams/stuff/patches/series Sat Apr 21 15:29:57 2018 +0300 @@ -1,2 +1,5 @@ -package-wvstreams-add-patch-to-fix-build-with-C99-compilers.patch -gcc-6.patch +# from https://www.archlinux.org/packages/community/x86_64/wvstreams/ +-p0|wvstreams-4.6.1-glibc212.patch +-p0|wvstreams-4.6.1-gcc47.patch +-p1|openssl-buildfix.patch +-p1|gcc-6.patch diff -r d329acd936d3 -r e9b3d0cd4c89 wvstreams/stuff/patches/wvstreams-4.6.1-gcc47.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wvstreams/stuff/patches/wvstreams-4.6.1-gcc47.patch Sat Apr 21 15:29:57 2018 +0300 @@ -0,0 +1,50 @@ +http://bugs.gentoo.org/419563 +http://bugs.gentoo.org/419971 + +See -gcc47-patch and -magic.patch in Fedora git: + +http://pkgs.fedoraproject.org/gitweb/?p=libwvstreams.git;a=tree + +--- include/wvtask.h ++++ include/wvtask.h +@@ -45,7 +45,8 @@ + typedef void TaskFunc(void *userdata); + + static int taskcount, numtasks, numrunning; +- int magic_number, *stack_magic; ++ int volatile magic_number; ++ int *stack_magic; + WvString name; + int tid; + +@@ -84,7 +85,7 @@ + static WvTaskMan *singleton; + static int links; + +- static int magic_number; ++ static int volatile magic_number; + static WvTaskList all_tasks, free_tasks; + + static void get_stack(WvTask &task, size_t size); +--- include/wvuid.h ++++ include/wvuid.h +@@ -7,6 +7,7 @@ + #ifndef __WVUID_H + #define __WVUID_H + ++#include + #include "wvstring.h" + + #if WIN32 +--- utils/wvtask.cc ++++ utils/wvtask.cc +@@ -58,7 +58,8 @@ + int WvTask::taskcount, WvTask::numtasks, WvTask::numrunning; + + WvTaskMan *WvTaskMan::singleton; +-int WvTaskMan::links, WvTaskMan::magic_number; ++int WvTaskMan::links; ++int volatile WvTaskMan::magic_number; + WvTaskList WvTaskMan::all_tasks, WvTaskMan::free_tasks; + ucontext_t WvTaskMan::stackmaster_task, WvTaskMan::get_stack_return, + WvTaskMan::toplevel; diff -r d329acd936d3 -r e9b3d0cd4c89 wvstreams/stuff/patches/wvstreams-4.6.1-glibc212.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/wvstreams/stuff/patches/wvstreams-4.6.1-glibc212.patch Sat Apr 21 15:29:57 2018 +0300 @@ -0,0 +1,24 @@ +http://bugs.gentoo.org/333301 +https://bugs.archlinux.org/task/27188 + +--- ipstreams/wvunixdgsocket.cc ++++ ipstreams/wvunixdgsocket.cc +@@ -1,5 +1,5 @@ + #include "wvunixdgsocket.h" +-#ifdef MACOS ++#if defined(MACOS) || defined(__GNUC__) + #include + #include + #endif +--- streams/wvatomicfile.cc ++++ streams/wvatomicfile.cc +@@ -11,7 +11,8 @@ + #include "wvfileutils.h" + #include "wvstrutils.h" + +-#ifdef MACOS ++#if defined(MACOS) || defined(__GNUC__) ++#include + #include + #endif + diff -r d329acd936d3 -r e9b3d0cd4c89 xalan-c/receipt --- a/xalan-c/receipt Sat Apr 21 14:23:02 2018 +0300 +++ b/xalan-c/receipt Sat Apr 21 15:29:57 2018 +0300 @@ -1,7 +1,7 @@ # SliTaz package receipt v2. PACKAGE="xalan-c" -VERSION="1.10.0-r705082" +VERSION="1.11" CATEGORY="development" SHORT_DESC="An XSLT processor for transforming XML documents into HTML, text, \ or other XML document types" @@ -9,22 +9,16 @@ LICENSE="Apache" WEB_SITE="http://xalan.apache.org/" -TARBALL="Xalan-C_r705082-src.tar.gz" -# Need to use the patched r705082 version on Gentoo's mirrors -# Normal WGET_URL would be "http://www.apache.org/dist/xml/$PACKAGE/source/$TARBALL" -WGET_URL="http://www.gtlib.gatech.edu/pub/gentoo/distfiles/$TARBALL" +TARBALL="xalan_c-$VERSION-src.tar.gz" +WGET_URL="http://www.eu.apache.org/dist/xalan/xalan-c/sources/$TARBALL" BUILD_DEPENDS="xerces-c-dev" SPLIT="xalan-c-dev" compile_rules() { - fix math - mv c/* . && rm -r c - sed -i 's/isnan/std::&/' src/xalanc/PlatformSupport/DoubleSupport.hpp - sed -i 's/mutable MemoryManager/MemoryManager/' src/xalanc/*/*.hpp - export XERCESCROOT=/usr - export XALANCROOT=$src + export XALANCROOT=$src/c + cd c ./runConfigure \ -p linux \ @@ -40,14 +34,11 @@ genpkg_rules() { case $PACKAGE in xalan-c) - mkdir -p $fs/usr/lib - cp -a $install/usr/lib/*.so* $fs/usr/lib - cp -a $install/usr/bin $fs/usr - DEPENDS="glibc-base gcc-lib-base xerces-c libcurl openssl icu" + copy @std + DEPENDS="xerces-c" ;; *-dev) - mkdir -p $fs/usr - cp -a $install/usr/include $fs/usr + copy @dev ;; esac } diff -r d329acd936d3 -r e9b3d0cd4c89 xerces-c/receipt --- a/xerces-c/receipt Sat Apr 21 14:23:02 2018 +0300 +++ b/xerces-c/receipt Sat Apr 21 15:29:57 2018 +0300 @@ -1,12 +1,12 @@ # SliTaz package receipt v2. PACKAGE="xerces-c" -VERSION="3.1.1" +VERSION="3.2.1" CATEGORY="development" SHORT_DESC="A validating XML parser written in a portable subset of C++" MAINTAINER="rcx@zoominternet.net" LICENSE="Apache" -WEB_SITE="http://xerces.apache.org/xerces-c" +WEB_SITE="http://xerces.apache.org/xerces-c/" TARBALL="$PACKAGE-$VERSION.tar.gz" WGET_URL="http://apache.osuosl.org/xerces/c/3/sources/$TARBALL" @@ -14,7 +14,14 @@ SPLIT="xerces-c-dev" compile_rules() { - ./configure $CONFIGURE_ARGS && + case $ARCH in + i?86) ARCH_ARGS='--disable-sse2';; + *) ARCH_ARGS='';; + esac + + ./configure \ + $ARCH_ARGS \ + $CONFIGURE_ARGS && fix libtool && make $MAKEFLAGS && make install @@ -22,12 +29,7 @@ genpkg_rules() { case $PACKAGE in - xerces-c) - copy @std - DEPENDS="libcurl openssl icu" - ;; - *-dev) - copy @dev - ;; + xerces-c) copy @std;; + *-dev) copy @dev;; esac }