From df60b633e6bcca8d2ce590be2f989432b4d83e9f Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Thu, 9 Mar 2017 19:12:38 +0100 Subject: [PATCH] partially repaired debian kioslave build. Does not work on trusty any more because the recoll code needs -std=c++11 --- packaging/debian/buildppa.sh | 17 ++-- packaging/debian/debiankio/changelog | 6 ++ packaging/debian/debiankio/control-4 | 33 -------- .../debian/debiankio/patches/kioslave.patch | 77 +++++++++++++++++++ packaging/debian/debiankio/patches/series | 1 + packaging/debian/debiankio/rules-4 | 6 -- src/Makefile.am | 2 +- src/kde/kioslave/kio_recoll/CMakeLists.txt | 2 +- src/kde/kioslave/kio_recoll/dirif.cpp | 5 +- src/kde/kioslave/kio_recoll/htmlif.cpp | 2 +- 10 files changed, 97 insertions(+), 54 deletions(-) delete mode 100644 packaging/debian/debiankio/control-4 create mode 100644 packaging/debian/debiankio/patches/kioslave.patch create mode 100644 packaging/debian/debiankio/patches/series delete mode 100755 packaging/debian/debiankio/rules-4 diff --git a/packaging/debian/buildppa.sh b/packaging/debian/buildppa.sh index 80e3b055..67cd4fe2 100644 --- a/packaging/debian/buildppa.sh +++ b/packaging/debian/buildppa.sh @@ -44,7 +44,7 @@ check_recoll_orig() debdir=debian # Note: no new releases for lucid: no webkit. Or use old debianrclqt4 dir. series="trusty xenial yakkety" -# series=yakkety +series= if test "X$series" != X ; then check_recoll_orig @@ -71,9 +71,12 @@ for series in $series ; do dput $PPANAME recoll_${RCLVERS}-1~ppa${PPAVERS}~${series}1_source.changes done -### KIO -series="trusty xenial yakkety" -series= + + +### KIO. Does not build on trusty from recoll 1.23 because of the need +### for c++11 +series="xenial yakkety" +#series=xenial debdir=debiankio topdir=kio-recoll-${RCLVERS} @@ -99,12 +102,6 @@ for svers in $series ; do sed -e s/SERIES/$svers/g \ -e s/PPAVERS/${PPAVERS}/g \ < ${debdir}/changelog > $topdir/debian/changelog ; - if test $svers = "trusty" ; then - mv -f $topdir/debian/control-4 $topdir/debian/control - mv -f $topdir/debian/rules-4 $topdir/debian/rules - else - rm -f $topdir/debian/control-4 $topdir/debian/rules-4 - fi (cd $topdir;debuild -S -sa) || exit 1 dput $PPANAME kio-recoll_${RCLVERS}-0~ppa${PPAVERS}~${svers}1_source.changes diff --git a/packaging/debian/debiankio/changelog b/packaging/debian/debiankio/changelog index ce15e57f..2d4e833f 100644 --- a/packaging/debian/debiankio/changelog +++ b/packaging/debian/debiankio/changelog @@ -1,3 +1,9 @@ +kio-recoll (1.23.0-0~ppaPPAVERS~SERIES1) SERIES; urgency=low + + * Misc changes, mostly internal + + -- Jean-Francois Dockes Tue, 27 Feb 2017 18:53:00 +0100 + kio-recoll (1.22.4-0~ppaPPAVERS~SERIES1) SERIES; urgency=low * Switch to kf5 for appropriate series. Update to 1.22.4 (same as .3) diff --git a/packaging/debian/debiankio/control-4 b/packaging/debian/debiankio/control-4 deleted file mode 100644 index cbc1b236..00000000 --- a/packaging/debian/debiankio/control-4 +++ /dev/null @@ -1,33 +0,0 @@ -Source: kio-recoll -Section: kde -Priority: extra -Maintainer: Jean-Francois Dockes -Build-Depends: cdbs, - cmake, - libtool, - debhelper (>= 7), - bison, - kdelibs5-dev (>= 4:4.2.2), - pkg-kde-tools (>= 0.4.0), - libxapian-dev, - libz-dev -Standards-Version: 3.9.5 -Homepage: http://www.recoll.org/ - -Package: kio-recoll -Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends}, recoll -Description: A Recoll KIO slave for KDE 4 - A Recoll KIO slave for KDE 4, allows performing a Recoll search by - entering an appropriate URL in a KDE open dialog, or with an HTML-based - interface displayed in Konqueror. - The HTML-based interface is similar to the Recoll GUI QT-based interface, - slightly less powerful. It allows performing a search while staying fully - within the KDE framework: drag and drop from the result list works - normally and you have your normal choice of applications for opening files. - An alternative interface uses a directory view of search results. Due to - limitations in the current KIO slave interface, it is currently not - obviously useful. - The interface is described in more detail inside a help file which you can - access by entering recoll:/ inside the konqueror URL line (this works only - if the recoll KIO slave has been previously installed). diff --git a/packaging/debian/debiankio/patches/kioslave.patch b/packaging/debian/debiankio/patches/kioslave.patch new file mode 100644 index 00000000..d72bb41d --- /dev/null +++ b/packaging/debian/debiankio/patches/kioslave.patch @@ -0,0 +1,77 @@ +diff --git a/Makefile.am b/Makefile.am +index 892ed4f..b50345e 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -274,7 +274,7 @@ librecoll_la_LIBADD = $(LIBXAPIAN) $(LIBICONV) $(LIBTHREADS) + PicStatic: $(librecoll_la_OBJECTS) + rm -f .libs/librecoll.a + rm -f .libs/librecoll.so +- libtool --tag=LD --mode=link gcc -g -O -o librecoll.la \ ++ $(LIBTOOL) --tag=LD --mode=link gcc -g -O -o librecoll.la \ + $(librecoll_la_OBJECTS) + + bin_PROGRAMS = recollindex +diff --git a/Makefile.in b/Makefile.in +index 9fc916d..7eb90d9 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -2160,7 +2160,7 @@ CXXFLAGS ?= @CXXFLAGS@ + PicStatic: $(librecoll_la_OBJECTS) + rm -f .libs/librecoll.a + rm -f .libs/librecoll.so +- libtool --tag=LD --mode=link gcc -g -O -o librecoll.la \ ++ $(LIBTOOL) --tag=LD --mode=link gcc -g -O -o librecoll.la \ + $(librecoll_la_OBJECTS) + + # EXTRA_DIST: The Php Code does not build anymore. No need to ship it until +diff --git a/kde/kioslave/kio_recoll/dirif.cpp b/kde/kioslave/kio_recoll/dirif.cpp +index 3a96891..9d0a5f8 100644 +--- a/kde/kioslave/kio_recoll/dirif.cpp ++++ b/kde/kioslave/kio_recoll/dirif.cpp +@@ -305,7 +305,8 @@ void RecollProtocol::listDir(const QUrl& url) + // which offers an opportunity to not perform it. + if (ingest.endSlashQuery()) { + qDebug() << "RecollProtocol::listDir: Ends With /"; +- error(ERR_SLAVE_DEFINED, u8s2qs("Autocompletion search aborted")); ++ error(ERR_SLAVE_DEFINED, ++ QString::fromUtf8("Autocompletion search aborted")); + return; + } + if (!syncSearch(qd)) { +@@ -335,7 +336,7 @@ void RecollProtocol::listDir(const QUrl& url) + int pagelen = m_source->getSeqSlice(pagebase, pagesize, page); + UDSEntry entry; + if (pagelen < 0) { +- error(ERR_SLAVE_DEFINED, u8s2qs("Internal error")); ++ error(ERR_SLAVE_DEFINED, QString::fromUtf8("Internal error")); + break; + } + UDSEntryList entries; +diff --git a/kde/kioslave/kio_recoll/htmlif.cpp b/kde/kioslave/kio_recoll/htmlif.cpp +index 3e79038..cb396c3 100644 +--- a/kde/kioslave/kio_recoll/htmlif.cpp ++++ b/kde/kioslave/kio_recoll/htmlif.cpp +@@ -240,7 +240,7 @@ void RecollProtocol::showPreview(const Rcl::Doc& idoc) + string ipath = idoc.ipath; + if (!interner.internfile(fdoc, ipath)) { + error(KIO::ERR_SLAVE_DEFINED, +- u8s2qs("Cannot convert file to internal format")); ++ QString::fromUtf8("Cannot convert file to internal format")); + return; + } + if (!interner.get_html().empty()) { +diff --git a/kde/kioslave/kio_recoll/kio_recoll.h b/kde/kioslave/kio_recoll/kio_recoll.h +index 6529f91..970019e 100644 +--- a/kde/kioslave/kio_recoll/kio_recoll.h ++++ b/kde/kioslave/kio_recoll/kio_recoll.h +@@ -201,10 +201,5 @@ extern "C" { + kdemain(int argc, char **argv); + } + +-inline QString u8s2qs(const string& s) +-{ +- return QString::fromUtf8(s.c_str()); +-} +- + + #endif // _RECOLL_H diff --git a/packaging/debian/debiankio/patches/series b/packaging/debian/debiankio/patches/series new file mode 100644 index 00000000..6b02ed06 --- /dev/null +++ b/packaging/debian/debiankio/patches/series @@ -0,0 +1 @@ +kioslave.patch diff --git a/packaging/debian/debiankio/rules-4 b/packaging/debian/debiankio/rules-4 deleted file mode 100755 index 7798525d..00000000 --- a/packaging/debian/debiankio/rules-4 +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/make -f - -include /usr/share/cdbs/1/rules/debhelper.mk -include /usr/share/pkg-kde-tools/makefiles/1/cdbs/kde.mk - -DEB_SRCDIR = kde/kioslave/kio_recoll-kde4 diff --git a/src/Makefile.am b/src/Makefile.am index 892ed4f2..b50345ea 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -274,7 +274,7 @@ librecoll_la_LIBADD = $(LIBXAPIAN) $(LIBICONV) $(LIBTHREADS) PicStatic: $(librecoll_la_OBJECTS) rm -f .libs/librecoll.a rm -f .libs/librecoll.so - libtool --tag=LD --mode=link gcc -g -O -o librecoll.la \ + $(LIBTOOL) --tag=LD --mode=link gcc -g -O -o librecoll.la \ $(librecoll_la_OBJECTS) bin_PROGRAMS = recollindex diff --git a/src/kde/kioslave/kio_recoll/CMakeLists.txt b/src/kde/kioslave/kio_recoll/CMakeLists.txt index 816c1916..ba98d670 100644 --- a/src/kde/kioslave/kio_recoll/CMakeLists.txt +++ b/src/kde/kioslave/kio_recoll/CMakeLists.txt @@ -74,7 +74,7 @@ ${rcltop}/qtgui/guiutils.cpp) add_library(kio_recoll MODULE ${kio_recoll_SRCS}) add_custom_target(rcllib - COMMAND make -j 6 PicStatic + COMMAND make -j 3 PicStatic WORKING_DIRECTORY ${rcltop} ) add_dependencies(kio_recoll rcllib) diff --git a/src/kde/kioslave/kio_recoll/dirif.cpp b/src/kde/kioslave/kio_recoll/dirif.cpp index 3a96891b..9d0a5f81 100644 --- a/src/kde/kioslave/kio_recoll/dirif.cpp +++ b/src/kde/kioslave/kio_recoll/dirif.cpp @@ -305,7 +305,8 @@ void RecollProtocol::listDir(const QUrl& url) // which offers an opportunity to not perform it. if (ingest.endSlashQuery()) { qDebug() << "RecollProtocol::listDir: Ends With /"; - error(ERR_SLAVE_DEFINED, u8s2qs("Autocompletion search aborted")); + error(ERR_SLAVE_DEFINED, + QString::fromUtf8("Autocompletion search aborted")); return; } if (!syncSearch(qd)) { @@ -335,7 +336,7 @@ void RecollProtocol::listDir(const QUrl& url) int pagelen = m_source->getSeqSlice(pagebase, pagesize, page); UDSEntry entry; if (pagelen < 0) { - error(ERR_SLAVE_DEFINED, u8s2qs("Internal error")); + error(ERR_SLAVE_DEFINED, QString::fromUtf8("Internal error")); break; } UDSEntryList entries; diff --git a/src/kde/kioslave/kio_recoll/htmlif.cpp b/src/kde/kioslave/kio_recoll/htmlif.cpp index 3e790382..cb396c37 100644 --- a/src/kde/kioslave/kio_recoll/htmlif.cpp +++ b/src/kde/kioslave/kio_recoll/htmlif.cpp @@ -240,7 +240,7 @@ void RecollProtocol::showPreview(const Rcl::Doc& idoc) string ipath = idoc.ipath; if (!interner.internfile(fdoc, ipath)) { error(KIO::ERR_SLAVE_DEFINED, - u8s2qs("Cannot convert file to internal format")); + QString::fromUtf8("Cannot convert file to internal format")); return; } if (!interner.get_html().empty()) {