[packages/wvstreams] - added tcl patch (fix tcl > 8.3 detection) - added qt patch (fix qt [3.x] detection via pkg-config)

qboosh qboosh at pld-linux.org
Wed Dec 31 15:23:46 CET 2014


commit c87b63e8022fd5e5044310cbd5ae5f6affab8491
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Dec 31 15:23:38 2014 +0100

    - added tcl patch (fix tcl > 8.3 detection)
    - added qt patch (fix qt [3.x] detection via pkg-config), build qt interface

 wvstreams-qt.patch  | 44 +++++++++++++++++++++++++++++++++++++++++
 wvstreams-tcl.patch | 16 +++++++++++++++
 wvstreams.spec      | 57 ++++++++++++++++++++++++++++++++++++++++++++++-------
 3 files changed, 110 insertions(+), 7 deletions(-)
---
diff --git a/wvstreams.spec b/wvstreams.spec
index f36119a..b359214 100644
--- a/wvstreams.spec
+++ b/wvstreams.spec
@@ -1,7 +1,7 @@
 #
 # Conditional build:
 %bcond_without	apidocs	# Doxygen documentation
-%bcond_without	slp	# OpenSLP support
+%bcond_without	qt	# wvstreams-qt library
 #
 Summary:	A network programming library written in C++
 Summary(pl.UTF-8):	Biblioteka programowania sieciowego napisana w C++
@@ -14,6 +14,8 @@ Group:		Libraries
 Source0:	http://wvstreams.googlecode.com/files/%{name}-%{version}.tar.gz
 # Source0-md5:	2760dac31a43d452a19a3147bfde571c
 Patch0:		%{name}-sort.patch
+Patch1:		%{name}-tcl.patch
+Patch2:		%{name}-qt.patch
 Patch3:		%{name}-openssl.patch
 Patch4:		%{name}-includes.patch
 Patch5:		%{name}-4.2.2-multilib.patch
@@ -22,16 +24,15 @@ Patch7:		%{name}-4.6.1-make.patch
 Patch8:		%{name}-4.6.1-gcc47.patch
 Patch9:		%{name}-4.6.1-magic.patch
 URL:		http://alumnit.ca/wiki/index.php?page=WvStreams
-BuildRequires:	autoconf
-BuildRequires:	automake
+BuildRequires:	autoconf >= 2.50
 BuildRequires:	boost-devel
 BuildRequires:	dbus-devel >= 1.2.14
 %{?with_apidocs:BuildRequires:	doxygen}
 BuildRequires:	libstdc++-devel
-%{?with_slp:BuildRequires:	openslp-devel}
 BuildRequires:	openssl-devel >= 0.9.7i
 BuildRequires:	pam-devel
 BuildRequires:	pkgconfig
+%{?with_qt:BuildRequires:	qt-devel >= 3}
 BuildRequires:	readline-devel
 BuildRequires:	tcl-devel
 BuildRequires:	zlib-devel
@@ -76,6 +77,32 @@ Static WvStreams library.
 %description static -l pl.UTF-8
 Statyczna wersja biblioteki WvStreams.
 
+%package qt
+Summary:	WvStreams interface to Qt 3 library
+Summary(pl.UTF-8):	Interfejs WvStreams do biblioteki Qt 3
+Group:		X11/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description qt
+WvStreams interface to Qt 3 library.
+
+%description qt -l pl.UTF-8
+Interfejs WvStreams do biblioteki Qt 3.
+
+%package qt-devel
+Summary:	WvStreams interface to Qt 3 library - development files
+Summary(pl.UTF-8):	Interfejs WvStreams do biblioteki Qt 3 - pliki programistyczne
+Group:		X11/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+Requires:	%{name}-qt = %{version}-%{release}
+Requires:	qt-devel >= 3
+
+%description qt-devel
+WvStreams interface to Qt 3 library - development files.
+
+%description qt-devel -l pl.UTF-8
+Interfejs WvStreams do biblioteki Qt 3 - pliki programistyczne.
+
 %package apidocs
 Summary:	API documentation for WvStreams libraries
 Summary(pl.UTF-8):	Dokumentacja API bibliotek WvStreams
@@ -132,6 +159,8 @@ Obsługa WvStreams dla Valgrinda.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
@@ -141,11 +170,11 @@ Obsługa WvStreams dla Valgrinda.
 %patch9 -p1
 
 %build
+%{__autoconf}
 # disable-optimization disables -O2 override
 %configure \
 	--disable-optimization \
-	--with-openslp%{!?with_slp:=no} \
-	--without-vorbis
+	%{!?with_qt:--without-qt}
 
 %{__make} -j1 \
 	VPATH=%{_libdir} \
@@ -195,10 +224,11 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/libwvutils.so
 %{_libdir}/libwvtest.a
 %{_includedir}/wvstreams
+%exclude %{_includedir}/wvstreams/wvqthook.h
+%exclude %{_includedir}/wvstreams/wvqtstreamclone.h
 %{_pkgconfigdir}/libuniconf.pc
 %{_pkgconfigdir}/libwvbase.pc
 %{_pkgconfigdir}/libwvdbus.pc
-#%{_pkgconfigdir}/libwvqt.pc
 %{_pkgconfigdir}/libwvstreams.pc
 %{_pkgconfigdir}/libwvtest.pc
 %{_pkgconfigdir}/libwvutils.pc
@@ -207,6 +237,19 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %{_libdir}/libwvstatic.a
 
+%if %{with qt}
+%files qt
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libwvqt.so.*.*
+
+%files qt-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libwvqt.so
+%{_includedir}/wvstreams/wvqthook.h
+%{_includedir}/wvstreams/wvqtstreamclone.h
+%{_pkgconfigdir}/libwvqt.pc
+%endif
+
 %if %{with apidocs}
 %files apidocs
 %defattr(644,root,root,755)
diff --git a/wvstreams-qt.patch b/wvstreams-qt.patch
new file mode 100644
index 0000000..1f35941
--- /dev/null
+++ b/wvstreams-qt.patch
@@ -0,0 +1,44 @@
+--- wvstreams-4.6.1/configure.ac.orig	2009-09-29 18:12:39.000000000 +0200
++++ wvstreams-4.6.1/configure.ac	2014-12-31 13:45:44.259648015 +0100
+@@ -496,11 +496,22 @@
+         CPPFLAGS_save="$CPPFLAGS"
+         LDFLAGS_save="$LDFLAGS"
+         LIBS_save="$LIBS"
+-        for wv_qtdir in $with_qt $QTDIR $QT_SEARCH_PATH $(pkg-config --variable=prefix qt-mt); do
++        for wv_qtdir in $with_qt _PKGCONFIG_ $QTDIR $QT_SEARCH_PATH ; do
++            if test "$wv_qtdir" = "_PKGCONFIG_"; then
++                qt_CPPFLAGS="$(pkg-config --cflags qt-mt)"
++                qt_LIBS="$(pkg-config --libs qt-mt)"
++		wv_qtdir="$(pkg-config --variable=prefix qt-mt)"
++            else
+             eval wv_qtdir="$wv_qtdir"
+-            CPPFLAGS="$CPPFLAGS_save -I$wv_qtdir/include -I$wv_qtdir/include/qt3"
+-            LDFLAGS="$LDFLAGS_save -L$wv_qtdir/lib"
+-            LIBS="$LIBS_save -lqt-mt"
++	    qt_CPPFLAGS="-I$wv_qtdir/include -I$wv_qtdir/include/qt3"
++                if test "$wv_qtdir" != "/usr" ; then
++	            qt_LIBS="-L$wv_qtdir/lib -lqt-mt"
++                else
++	            qt_LIBS="-lqt-mt"
++                fi
++	    fi
++            CPPFLAGS="$CPPFLAGS_save $qt_CPPFLAGS"
++            LIBS="$LIBS_save $qt_LIBS"
+             AC_TRY_LINK([#include <qstring.h>],
+                         [QString x("hello"); return 0; ],
+                         [wv_cv_with_qt=$wv_qtdir; break])
+@@ -511,12 +522,8 @@
+     ])
+     with_qt=$wv_cv_with_qt
+     if test "$with_qt" != no; then
+-        WV_APPEND(CPPFLAGS, -I$with_qt/include -I$with_qt/include/qt3)
+-        if test "$wv_qtdir" != "/usr" ; then
+-                # never explicitly include /usr/lib
+-	        WV_APPEND(LDFLAGS, -L$with_qt/lib)
+-	fi
+-        WV_APPEND(LIBS_QT, -lqt-mt)
++        WV_APPEND(CPPFLAGS, $qt_CPPFLAGS)
++        WV_APPEND(LIBS_QT, $qt_LIBS)
+     fi
+     AC_PATH_PROG(MOC, moc, [moc not found], $with_qt/bin)
+ fi
diff --git a/wvstreams-tcl.patch b/wvstreams-tcl.patch
new file mode 100644
index 0000000..471a29c
--- /dev/null
+++ b/wvstreams-tcl.patch
@@ -0,0 +1,16 @@
+--- wvstreams-4.6.1/configure.ac.orig	2009-09-29 18:12:39.000000000 +0200
++++ wvstreams-4.6.1/configure.ac	2014-12-24 13:57:47.088332025 +0100
+@@ -480,11 +480,11 @@
+     WV_APPEND(CPPFLAGS, -I/usr/include/tcl8.3)
+     AC_CHECK_HEADERS(tcl.h,, [with_tcl=no])
+     LIBS_save="$LIBS"
+-    AC_CHECK_LIB(tcl8.3, TclInterpInit,, [with_tcl=no])
++    AC_CHECK_LIB(tcl, TclInterpInit,, [with_tcl=no])
+     LIBS="$LIBS_save"
+     if test "$with_tcl" != "no"; then
+         CPPFLAGS="$CPPFLAGS_save"
+-        LIBS_TCL=-ltcl8.3
++        LIBS_TCL=-ltcl
+     fi
+ fi
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/wvstreams.git/commitdiff/ce3bff37e9c6deecd66387066a18545744660c6b



More information about the pld-cvs-commit mailing list