rev 18138 - in trunk/packages/kdenetwork/debian: . patches
Modestas Vainius
modax at alioth.debian.org
Sun May 30 00:34:08 UTC 2010
Author: modax
Date: 2010-05-30 00:34:00 +0000 (Sun, 30 May 2010)
New Revision: 18138
Added:
trunk/packages/kdenetwork/debian/patches/01_backport_use_system_libktorrent.diff
trunk/packages/kdenetwork/debian/patches/02_debian_libktorrent_porting.diff
Removed:
trunk/packages/kdenetwork/debian/patches/01_use_system_libktorrent.diff
Modified:
trunk/packages/kdenetwork/debian/changelog
trunk/packages/kdenetwork/debian/patches/series
Log:
More libktorrent porting.
Modified: trunk/packages/kdenetwork/debian/changelog
===================================================================
--- trunk/packages/kdenetwork/debian/changelog 2010-05-29 18:50:45 UTC (rev 18137)
+++ trunk/packages/kdenetwork/debian/changelog 2010-05-30 00:34:00 UTC (rev 18138)
@@ -1,4 +1,4 @@
-kdenetwork (4:4.4.4-0r2) UNRELEASED; urgency=low
+kdenetwork (4:4.4.4-0r3) UNRELEASED; urgency=low
* New upstream release.
@@ -17,7 +17,9 @@
* Bump kde-sc-dev-latest build dependency to 4:4.4.4.
* Drop 01_kget_CVE-2010-1000.diff patch, merged upstream.
* Build kget against system libktorrent:
- - add 01_use_system_libktorrent.diff patch (mostly a backport);
+ - add 01_backport_use_system_libktorrent.diff patch (backport);
+ - add 02_debian_libktorrent_porting.diff with custom porting changes for
+ libktorrent;
- add libktorrent-dev to Build-Depends.
* Build conflict with libmediastreamer-dev (= 3.3.0-1) on amd64. It (or
rather closely related libortp-dev) is broken. See #583008.
Added: trunk/packages/kdenetwork/debian/patches/01_backport_use_system_libktorrent.diff
===================================================================
--- trunk/packages/kdenetwork/debian/patches/01_backport_use_system_libktorrent.diff (rev 0)
+++ trunk/packages/kdenetwork/debian/patches/01_backport_use_system_libktorrent.diff 2010-05-30 00:34:00 UTC (rev 18138)
@@ -0,0 +1,424 @@
+Description: backport some support for libktorrent from trunk
+ This patch is mostly a backport of upstream commit r1117656 excluding
+ CMakeLists.txt changes. See the next patch for adapted version of those.
+Author: Lukas Appelhans <l.appelhans at gmx.de>
+Origin: backport, http://websvn.kde.org/?view=revision&revision=1117656
+Forwarded: not-needed
+Last-Update: 2010-05-30
+
+--- a/kget/transfer-plugins/bittorrent/btsettingswidget.cpp
++++ b/kget/transfer-plugins/bittorrent/btsettingswidget.cpp
+@@ -28,6 +28,7 @@ BTSettingsWidget::BTSettingsWidget(QWidg
+ connect(torrentEdit, SIGNAL(textChanged(const QString &)), SLOT(changed()));
+ connect(tempEdit, SIGNAL(textChanged(const QString &)), SLOT(changed()));
+ connect(preallocBox, SIGNAL(stateChanged(int)), SLOT(changed()));
++ connect(utpBox, SIGNAL(stateChanged(int)), SLOT(changed()));
+ }
+
+ void BTSettingsWidget::load()
+@@ -48,6 +49,7 @@ void BTSettingsWidget::save()
+ BittorrentSettings::setTorrentDir(torrentEdit->url().url());
+ BittorrentSettings::setTmpDir(tempEdit->url().url());
+ BittorrentSettings::setPreAlloc(preallocBox->isChecked());
++ BittorrentSettings::setEnableUTP(utpBox->isChecked());
+
+ BittorrentSettings::self()->writeConfig();
+ }
+@@ -60,6 +62,7 @@ void BTSettingsWidget::defaults()
+ torrentEdit->setUrl(BittorrentSettings::torrentDir());
+ tempEdit->setUrl(BittorrentSettings::tmpDir());
+ preallocBox->setChecked(BittorrentSettings::preAlloc());
++ utpBox->setChecked(BittorrentSettings::enableUTP());
+ }
+
+ #include "btsettingswidget.moc"
+--- a/kget/transfer-plugins/bittorrent/btsettingswidget.ui
++++ b/kget/transfer-plugins/bittorrent/btsettingswidget.ui
+@@ -1,7 +1,8 @@
+-<ui version="4.0" >
++<?xml version="1.0" encoding="UTF-8"?>
++<ui version="4.0">
+ <class>BTSettingsWidget</class>
+- <widget class="QWidget" name="BTSettingsWidget" >
+- <property name="geometry" >
++ <widget class="QWidget" name="BTSettingsWidget">
++ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+@@ -9,140 +10,147 @@
+ <height>363</height>
+ </rect>
+ </property>
+- <layout class="QVBoxLayout" name="verticalLayout" >
++ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+- <widget class="QGroupBox" name="networkGroupBox" >
+- <property name="sizePolicy" >
+- <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
++ <widget class="QGroupBox" name="networkGroupBox">
++ <property name="sizePolicy">
++ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+- <property name="title" >
++ <property name="title">
+ <string>Network</string>
+ </property>
+- <layout class="QFormLayout" name="formLayout" >
+- <property name="fieldGrowthPolicy" >
++ <layout class="QFormLayout" name="formLayout">
++ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+ </property>
+- <item row="0" column="0" >
+- <widget class="QLabel" name="portLabel" >
+- <property name="text" >
++ <item row="0" column="0">
++ <widget class="QLabel" name="portLabel">
++ <property name="text">
+ <string>Port:</string>
+ </property>
+ </widget>
+ </item>
+- <item row="0" column="1" >
+- <widget class="QSpinBox" name="portBox" >
+- <property name="maximum" >
++ <item row="0" column="1">
++ <widget class="QSpinBox" name="portBox">
++ <property name="maximum">
+ <number>99000</number>
+ </property>
+- <property name="value" >
++ <property name="value">
+ <number>6881</number>
+ </property>
+ </widget>
+ </item>
+- <item row="1" column="0" >
+- <widget class="QLabel" name="uploadLimitLabel" >
+- <property name="text" >
++ <item row="1" column="0">
++ <widget class="QLabel" name="uploadLimitLabel">
++ <property name="text">
+ <string>Upload limit per transfer:</string>
+ </property>
+ </widget>
+ </item>
+- <item row="1" column="1" >
+- <widget class="QSpinBox" name="uploadBox" >
+- <property name="specialValueText" >
++ <item row="1" column="1">
++ <widget class="QSpinBox" name="uploadBox">
++ <property name="specialValueText">
+ <string>No Limit</string>
+ </property>
+- <property name="suffix" >
++ <property name="suffix">
+ <string>KiB</string>
+ </property>
+- <property name="maximum" >
++ <property name="maximum">
+ <number>10000</number>
+ </property>
+ </widget>
+ </item>
+- <item row="2" column="0" >
+- <widget class="QLabel" name="downloadLabel" >
+- <property name="text" >
++ <item row="2" column="0">
++ <widget class="QLabel" name="downloadLabel">
++ <property name="text">
+ <string>Download limit per transfer:</string>
+ </property>
+ </widget>
+ </item>
+- <item row="2" column="1" >
+- <widget class="QSpinBox" name="downloadBox" >
+- <property name="specialValueText" >
++ <item row="2" column="1">
++ <widget class="QSpinBox" name="downloadBox">
++ <property name="specialValueText">
+ <string>No Limit</string>
+ </property>
+- <property name="suffix" >
++ <property name="suffix">
+ <string>KiB</string>
+ </property>
+- <property name="maximum" >
++ <property name="maximum">
+ <number>100000</number>
+ </property>
+ </widget>
+ </item>
++ <item row="3" column="1">
++ <widget class="QCheckBox" name="utpBox">
++ <property name="text">
++ <string>Enable UTP protocol</string>
++ </property>
++ </widget>
++ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+- <widget class="QGroupBox" name="folderGroupBox" >
+- <property name="sizePolicy" >
+- <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
++ <widget class="QGroupBox" name="folderGroupBox">
++ <property name="sizePolicy">
++ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+- <property name="title" >
++ <property name="title">
+ <string>Folders</string>
+ </property>
+- <layout class="QFormLayout" name="formLayout_2" >
+- <item row="0" column="0" >
+- <widget class="QLabel" name="torrentFolderLabel" >
+- <property name="sizePolicy" >
+- <sizepolicy vsizetype="Minimum" hsizetype="Preferred" >
++ <layout class="QFormLayout" name="formLayout_2">
++ <item row="0" column="0">
++ <widget class="QLabel" name="torrentFolderLabel">
++ <property name="sizePolicy">
++ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+- <property name="text" >
++ <property name="text">
+ <string>Default torrent folder:</string>
+ </property>
+ </widget>
+ </item>
+- <item row="0" column="1" >
+- <widget class="KUrlRequester" name="torrentEdit" >
+- <property name="sizePolicy" >
+- <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
++ <item row="0" column="1">
++ <widget class="KUrlRequester" name="torrentEdit">
++ <property name="sizePolicy">
++ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+- <property name="filter" >
++ <property name="filter">
+ <string/>
+ </property>
+ </widget>
+ </item>
+- <item row="1" column="0" >
+- <widget class="QLabel" name="tempFolderLabel" >
+- <property name="text" >
++ <item row="1" column="0">
++ <widget class="QLabel" name="tempFolderLabel">
++ <property name="text">
+ <string>Default temporary folder</string>
+ </property>
+ </widget>
+ </item>
+- <item row="1" column="1" >
+- <widget class="KUrlRequester" name="tempEdit" >
+- <property name="sizePolicy" >
+- <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
++ <item row="1" column="1">
++ <widget class="KUrlRequester" name="tempEdit">
++ <property name="sizePolicy">
++ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+- <item row="2" column="1" >
+- <widget class="QCheckBox" name="preallocBox" >
+- <property name="text" >
++ <item row="2" column="1">
++ <widget class="QCheckBox" name="preallocBox">
++ <property name="text">
+ <string>Pre-allocate disk space</string>
+ </property>
+ </widget>
+@@ -152,10 +160,10 @@
+ </item>
+ <item>
+ <spacer>
+- <property name="orientation" >
++ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+- <property name="sizeHint" stdset="0" >
++ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+--- a/kget/transfer-plugins/bittorrent/bttransfer.cpp
++++ b/kget/transfer-plugins/bittorrent/bttransfer.cpp
+@@ -31,7 +31,8 @@
+ #include <util/log.h>
+ #include <peer/authenticationmonitor.h>
+ #include <interfaces/trackerinterface.h>
+-#include <btversion.h>
++#include <utp/utpserver.h>
++#include <version.h>
+
+ #include <KDebug>
+ #include <KLocale>
+@@ -200,9 +201,7 @@ void BTTransfer::newDestResult()
+ void BTTransfer::stop()
+ {
+ if (m_movingFile)
+- {
+ return;
+- }
+
+ if (m_ready)
+ {
+@@ -235,7 +234,7 @@ void BTTransfer::load(const QDomElement
+ {
+ Transfer::load(element);
+
+- if((m_totalSize == m_downloadedSize) && (m_totalSize != 0))
++ if ((m_totalSize == m_downloadedSize) && (m_totalSize != 0))
+ {
+ setStatus(Job::Stopped, i18nc("transfer state: finished", "Finished"), SmallIcon("dialog-ok"));
+ }
+@@ -254,7 +253,9 @@ void BTTransfer::load(const QDomElement
+
+ void BTTransfer::setPort(int port)
+ {
+- bt::Globals::instance().getServer().changePort(port);
++ bt::Globals::instance().getTCPServer().changePort(port);
++ if (BittorrentSettings::enableUTP())
++ bt::Globals::instance().getUTPServer().changePort(port + 1);
+ }
+
+ void BTTransfer::setSpeedLimits(int ulLimit, int dlLimit)
+@@ -269,16 +270,14 @@ void BTTransfer::setSpeedLimits(int ulLi
+ void BTTransfer::addTracker(const QString &url)
+ {
+ kDebug(5001);
+- if(torrent->getStats().priv_torrent)
+- {
+- KMessageBox::sorry(0, i18n("Cannot add a tracker to a private torrent."));
+- return;
++ if(torrent->getStats().priv_torrent) {
++ KMessageBox::sorry(0, i18n("Cannot add a tracker to a private torrent."));
++ return;
+ }
+
+- if(!KUrl(url).isValid())
+- {
+- KMessageBox::error(0, i18n("Malformed URL."));
+- return;
++ if(!KUrl(url).isValid()) {
++ KMessageBox::error(0, i18n("Malformed URL."));
++ return;
+ }
+
+ torrent->getTrackersList()->addTracker(url,true);
+@@ -449,16 +448,17 @@ void BTTransfer::btTransferInit(const KU
+ bt::SetClientInfo("KGet", 2, KDE_VERSION_MINOR, KDE_VERSION_RELEASE, bt::NORMAL, "KG");//Set client info to KGet
+
+ bt::Uint16 i = 0;
+- do
+- {
+- bt::Globals::instance().initServer(BittorrentSettings::port() + i);
++ while (!bt::Globals::instance().initTCPServer(BittorrentSettings::port() + i) && i < 10)
+ i++;
+- }while (!bt::Globals::instance().getServer().isOK() && i < 10);
+-
+- if (!bt::Globals::instance().getServer().isOK()) {
++
++ if (i == 10) {
+ setStatus(Job::Aborted, i18n("An error occurred...."), SmallIcon("document-preview"));
+ return;
+ }
++ if (BittorrentSettings::enableUTP()) {
++ while (!bt::Globals::instance().initUTPServer(BittorrentSettings::port() + i) && i < 10) //We don't care if it fails for now as UTP is experimental...
++ i++;
++ }
+
+ QDir tmpDir(m_tmp + m_source.fileName().remove(".torrent"));
+ if (tmpDir.exists())
+@@ -496,6 +496,8 @@ void BTTransfer::btTransferInit(const KU
+ catch (bt::Error &err)
+ {
+ m_ready = false;
++ torrent->deleteLater();
++ torrent = 0;
+ setStatus(Job::Aborted, i18n("An error occurred...."), SmallIcon("document-preview"));
+ KMessageBox::error(0, err.toString(), i18n("Error"));
+ }
+@@ -750,7 +752,7 @@ void BTTransfer::filesSelected()
+ // setTransferChange(Tc_TotalSize | Tc_DownloadedSize | Tc_Percent, true);
+ }
+
+-FileModel *BTTransfer::fileModel()//TODO korrektes file-model wenn nur eine datei im torrent!
++FileModel *BTTransfer::fileModel()//TODO correct file model for one-file-torrents
+ {
+ if (!m_fileModel)
+ {
+--- a/kget/transfer-plugins/bittorrent/bttransfer.h
++++ b/kget/transfer-plugins/bittorrent/bttransfer.h
+@@ -1,6 +1,6 @@
+ /* This file is part of the KDE project
+
+- Copyright (C) 2007 Lukas Appelhans <l.appelhans at gmx.de>
++ Copyright (C) 2007 - 2010 Lukas Appelhans <l.appelhans at gmx.de>
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public
+--- a/kget/transfer-plugins/bittorrent/bttransferfactory.cpp
++++ b/kget/transfer-plugins/bittorrent/bttransferfactory.cpp
+@@ -69,7 +69,7 @@ const QList<KAction *> BTTransferFactory
+ BTTransferHandler * bttransfer = static_cast<BTTransferHandler *>(handler);
+
+ QList<KAction*> actions;
+- if (bttransfer)
++ if (bttransfer && bttransfer->torrentControl())
+ {
+ KAction *openAdvancedDetailsAction = new KAction(KIcon("document-open"), i18n("&Advanced Details"), this);
+
+--- a/kget/transfer-plugins/bittorrent/bttransferhandler.cpp
++++ b/kget/transfer-plugins/bittorrent/bttransferhandler.cpp
+@@ -35,6 +35,8 @@ BTTransferHandler::~BTTransferHandler()
+
+ void BTTransferHandler::createAdvancedDetails()
+ {
++ if (!torrentControl())
++ return;
+ kDebug(5001);
+
+ if (!advancedDetails)
+@@ -67,6 +69,8 @@ kt::Monitor* BTTransferHandler::torrentM
+
+ void BTTransferHandler::createScanDlg()
+ {
++ if (!torrentControl())
++ return;
+ kDebug(5001);
+ if (scanDlg)
+ {
+--- a/kget/transfer-plugins/bittorrent/kget_bittorrentfactory.kcfg
++++ b/kget/transfer-plugins/bittorrent/kget_bittorrentfactory.kcfg
+@@ -14,6 +14,9 @@
+ <entry name="Port" type="Int">
+ <default>6881</default>
+ </entry>
++ <entry name="EnableUTP" type="Bool">
++ <default>false</default>
++ </entry>
+ </group>
+ <group name="Dirs">
+ <entry name="TorrentDir" type="String">
Added: trunk/packages/kdenetwork/debian/patches/02_debian_libktorrent_porting.diff
===================================================================
--- trunk/packages/kdenetwork/debian/patches/02_debian_libktorrent_porting.diff (rev 0)
+++ trunk/packages/kdenetwork/debian/patches/02_debian_libktorrent_porting.diff 2010-05-30 00:34:00 UTC (rev 18138)
@@ -0,0 +1,332 @@
+Description: port existing code to libktorrent (custom changes)
+ This patch makes necessary changes to CMakeLists.txt files. Mostly based on
+ upstream commit r1117656.
+ .
+ It also makes current bittorent plugin compile with libktorrent 1.0.0.
+Author: Modestas Vainius <modax at debian.org>
+Origin: vendor
+Forwarded: not-needed
+Last-Update: 2010-05-30
+
+--- a/kget/transfer-plugins/bittorrent/scandlg.cpp
++++ b/kget/transfer-plugins/bittorrent/scandlg.cpp
+@@ -69,16 +69,14 @@ namespace kt
+
+ void ScanDlg::scan()
+ {
+- try
+- {
+- tc->startDataCheck(this);
+- timer.start(500);
+- scanning = true;
+- }
+- catch (bt::Error & err)
+- {
+- KMessageBox::error(0,i18n("Error scanning data: %1",err.toString()));
+- }
++ tc->startDataCheck(this);
++ timer.start(500);
++ scanning = true;
++ }
++
++ void ScanDlg::error(const QString & err)
++ {
++ KMessageBox::queuedMessageBox(0,KMessageBox::Error,i18n("Error scanning data: %1",err));
+ }
+
+ void ScanDlg::execute(bt::TorrentInterface* tc,bool silently)
+--- a/kget/transfer-plugins/bittorrent/scandlg.h
++++ b/kget/transfer-plugins/bittorrent/scandlg.h
+@@ -55,6 +55,9 @@ namespace kt
+
+ /// Scan finished, runs in app thread
+ virtual void finished();
++
++ /// Scan error, runs in app thread
++ virtual void error(const QString & err);
+
+ /// Handle the close event
+ virtual void closeEvent(QCloseEvent* e);
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -60,6 +60,9 @@ macro_log_feature(QGPGME_FOUND "QGpgME"
+ macro_optional_find_package(TelepathyQt4)
+ macro_log_feature(TELEPATHY_QT4_FOUND "telepathy-qt4" "Telepathy Qt Bindings" "https://telepathy.freedesktop.org" FALSE "0.18" "Needed to build Telepathy Tubes support.")
+
++macro_optional_find_package(KTorrent)
++macro_log_feature(LIBKTORRENT_FOUND "KTorrent" "KTorrent library" "http://ktorrent.org/" FALSE "" "Needed to build Torrent support in KGet.")
++
+ if(TELEPATHY_QT4_FOUND)
+ add_definitions(-DTELEPATHY_SUPPORT)
+ include_directories(${TELEPATHY_QT4_INCLUDE_DIR})
+--- a/kget/transfer-plugins/CMakeLists.txt
++++ b/kget/transfer-plugins/CMakeLists.txt
+@@ -1,6 +1,8 @@
+ add_subdirectory(kio)
+ add_subdirectory(multisegmentkio)
+-add_subdirectory(metalink)
++if (LIBKTORRENT_FOUND)
++ add_subdirectory(metalink)
++endif (LIBKTORRENT_FOUND)
+ add_subdirectory(bittorrent)
+ add_subdirectory(mirrorsearch)
+ add_subdirectory(contentfetch)
+--- a/kget/transfer-plugins/bittorrent/CMakeLists.txt
++++ b/kget/transfer-plugins/bittorrent/CMakeLists.txt
+@@ -1,220 +1,9 @@
+-option(ENABLE_EMBEDDED_TORRENT_SUPPORT "Whether to build KGet torrent support with embedded torrent library or not" true)
+-
+-if (ENABLE_EMBEDDED_TORRENT_SUPPORT)
+- message(STATUS "Building KGet torrent support with embedded torrent library (libbtcore) (-DENABLE_EMBEDDED_TORRENT_SUPPORT=false to disable)")
+- add_definitions(-DENABLE_EMBEDDED_TORRENT_SUPPORT)
+-
+- macro_optional_find_package(GMP)
+- macro_log_feature(GMP_FOUND "GMP" "The GNU Multiple Precision Arithmetic Library" "http://gmplib.org/" FALSE "" "Needed to build KGet Torrent support.")
+-
+-if (GMP_FOUND AND QCA2_FOUND)
++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
+ include_directories(
+ ../../
+- libbtcore
+- ${QCA2_INCLUDE_DIR}
+- ${GMP_INCLUDE_DIR}
++ ${LIBKTORRENT_INCLUDE_DIR}
+ )
+
+-# keep the following list in sync with libbtcore/CMakeLists.txt
+-#XFS prealloc
+-CHECK_INCLUDE_FILES(xfs/xfs.h HAVE_XFS_XFS_H)
+-IF(HAVE_XFS_XFS_H)
+- SET(CMAKE_EXTRA_INCLUDE_FILES xfs/xfs.h)
+- CHECK_TYPE_SIZE(__u64 HAVE___U64)
+- CHECK_TYPE_SIZE(__s64 HAVE___S64)
+- SET(CMAKE_EXTRA_INCLUDE_FILES)
+-ENDIF(HAVE_XFS_XFS_H)
+-
+-# check for 64 bit file I/O functions
+-check_function_exists(fopen64 HAVE_FOPEN64)
+-check_function_exists(fseeko64 HAVE_FSEEKO64)
+-check_function_exists(fseeko HAVE_FSEEKO)
+-check_function_exists(ftello64 HAVE_FTELLO64)
+-check_function_exists(ftello HAVE_FTELLO)
+-check_function_exists(fstat64 HAVE_FSTAT64)
+-check_function_exists(stat64 HAVE_STAT64)
+-check_function_exists(ftruncate64 HAVE_FTRUNCATE64)
+-check_function_exists(lseek64 HAVE_LSEEK64)
+-check_function_exists(mmap64 HAVE_MMAP64)
+-check_function_exists(munmap64 HAVE_MUNMAP64)
+-check_function_exists(posix_fallocate64 HAVE_POSIX_FALLOCATE64)
+-check_function_exists(posix_fallocate HAVE_POSIX_FALLOCATE)
+-check_function_exists(statvfs HAVE_STATVFS)
+-check_function_exists(statvfs64 HAVE_STATVFS64)
+-
+-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libbtcore/config-btcore.h.cmake ${CMAKE_BINARY_DIR}/config-btcore.h)
+-
+-set(libbtcore_SRC
+- libbtcore/util/bitset.cpp
+- libbtcore/util/timer.cpp
+- libbtcore/util/urlencoder.cpp
+- libbtcore/util/sha1hashgen.cpp
+- libbtcore/util/sha1hash.cpp
+- libbtcore/util/functions.cpp
+- libbtcore/util/ptrmap.cpp
+- libbtcore/util/array.cpp
+- libbtcore/util/error.cpp
+- libbtcore/util/file.cpp
+- libbtcore/util/fileops.cpp
+- libbtcore/util/log.cpp
+- libbtcore/util/waitjob.cpp
+- libbtcore/util/autorotatelogjob.cpp
+- libbtcore/util/compressfilejob.cpp
+- libbtcore/util/logsystemmanager.cpp
+-
+- libbtcore/bcodec/bdecoder.cpp
+- libbtcore/bcodec/bencoder.cpp
+- libbtcore/bcodec/bnode.cpp
+- libbtcore/bcodec/value.cpp
+-
+- libbtcore/net/address.cpp
+- libbtcore/net/bufferedsocket.cpp
+- libbtcore/net/portlist.cpp
+- libbtcore/net/socket.cpp
+- libbtcore/net/socketmonitor.cpp
+- libbtcore/net/speed.cpp
+- libbtcore/net/uploadthread.cpp
+- libbtcore/net/downloadthread.cpp
+- libbtcore/net/networkthread.cpp
+- libbtcore/net/socketgroup.cpp
+- libbtcore/net/socks.cpp
+- libbtcore/net/wakeuppipe.cpp
+- libbtcore/net/reverseresolver.cpp
+-
+- libbtcore/mse/bigint.cpp
+- libbtcore/mse/functions.cpp
+- libbtcore/mse/rc4encryptor.cpp
+- libbtcore/mse/streamsocket.cpp
+- libbtcore/mse/encryptedauthenticate.cpp
+- libbtcore/mse/encryptedserverauthenticate.cpp
+-
+- libbtcore/peer/authenticatebase.cpp
+- libbtcore/peer/authenticate.cpp
+- libbtcore/peer/serverauthenticate.cpp
+- libbtcore/peer/authenticationmonitor.cpp
+- libbtcore/peer/chunkcounter.cpp
+- libbtcore/peer/peerid.cpp
+- libbtcore/peer/peer.cpp
+- libbtcore/peer/peermanager.cpp
+- libbtcore/peer/peerdownloader.cpp
+- libbtcore/peer/peeruploader.cpp
+- libbtcore/peer/packetwriter.cpp
+- libbtcore/peer/packetreader.cpp
+- libbtcore/peer/utpex.cpp
+- libbtcore/peer/accessmanager.cpp
+- libbtcore/peer/badpeerslist.cpp
+-
+- libbtcore/download/piece.cpp
+- libbtcore/download/request.cpp
+- libbtcore/download/packet.cpp
+- libbtcore/download/webseed.cpp
+- libbtcore/download/chunkdownload.cpp
+- libbtcore/download/chunkselector.cpp
+- libbtcore/download/downloader.cpp
+- libbtcore/download/httpconnection.cpp
+-
+- libbtcore/interfaces/piecedownloader.cpp
+- libbtcore/interfaces/peerinterface.cpp
+- libbtcore/interfaces/peersource.cpp
+- libbtcore/interfaces/torrentinterface.cpp
+- libbtcore/interfaces/torrentfileinterface.cpp
+- libbtcore/interfaces/trackerslist.cpp
+- libbtcore/interfaces/trackerinterface.cpp
+- libbtcore/interfaces/logmonitorinterface.cpp
+- libbtcore/interfaces/blocklistinterface.cpp
+- libbtcore/interfaces/exitoperation.cpp
+- libbtcore/interfaces/chunkdownloadinterface.cpp
+- libbtcore/interfaces/monitorinterface.cpp
+- libbtcore/interfaces/queuemanagerinterface.cpp
+- libbtcore/interfaces/chunkselectorinterface.cpp
+- libbtcore/interfaces/cachefactory.cpp
+- libbtcore/interfaces/webseedinterface.cpp
+-
+- libbtcore/torrent/globals.cpp
+- libbtcore/torrent/server.cpp
+- libbtcore/torrent/torrent.cpp
+- libbtcore/torrent/torrentfile.cpp
+- libbtcore/torrent/peersourcemanager.cpp
+- libbtcore/torrent/uploader.cpp
+- libbtcore/torrent/timeestimator.cpp
+- libbtcore/torrent/statsfile.cpp
+- libbtcore/torrent/choker.cpp
+- libbtcore/torrent/advancedchokealgorithm.cpp
+- libbtcore/torrent/torrentcontrol.cpp
+- libbtcore/torrent/torrentcreator.cpp
+- libbtcore/torrent/torrentstats.cpp
+- libbtcore/torrent/job.cpp
+- libbtcore/torrent/jobqueue.cpp
+-
+- libbtcore/dht/announcetask.cpp
+- libbtcore/dht/dht.cpp
+- libbtcore/dht/kclosestnodessearch.cpp
+- libbtcore/dht/nodelookup.cpp
+- libbtcore/dht/rpcmsg.cpp
+- libbtcore/dht/taskmanager.cpp
+- libbtcore/dht/database.cpp
+- libbtcore/dht/dhttrackerbackend.cpp
+- libbtcore/dht/key.cpp
+- libbtcore/dht/pack.cpp
+- libbtcore/dht/rpcserver.cpp
+- libbtcore/dht/dhtbase.cpp
+- libbtcore/dht/kbucket.cpp
+- libbtcore/dht/node.cpp
+- libbtcore/dht/rpccall.cpp
+- libbtcore/dht/task.cpp
+-
+- libbtcore/diskio/cache.cpp
+- libbtcore/diskio/chunk.cpp
+- libbtcore/diskio/dndfile.cpp
+- libbtcore/diskio/singlefilecache.cpp
+- libbtcore/diskio/multifilecache.cpp
+- libbtcore/diskio/preallocationthread.cpp
+- libbtcore/diskio/movedatafilesjob.cpp
+- libbtcore/diskio/deletedatafilesjob.cpp
+- libbtcore/diskio/piecedata.cpp
+- libbtcore/diskio/cachefile.cpp
+- libbtcore/diskio/chunkmanager.cpp
+- libbtcore/diskio/preallocationjob.cpp
+-
+- libbtcore/tracker/httptracker.cpp
+- libbtcore/tracker/tracker.cpp
+- libbtcore/tracker/udptracker.cpp
+- libbtcore/tracker/udptrackersocket.cpp
+- libbtcore/tracker/httpannouncejob.cpp
+- libbtcore/tracker/trackermanager.cpp
+-
+- libbtcore/datachecker/datachecker.cpp
+- libbtcore/datachecker/datacheckerthread.cpp
+- libbtcore/datachecker/singledatachecker.cpp
+- libbtcore/datachecker/datacheckerlistener.cpp
+- libbtcore/datachecker/multidatachecker.cpp
+- libbtcore/datachecker/datacheckerjob.cpp
+-
+- libbtcore/migrate/cachemigrate.cpp
+- libbtcore/migrate/ccmigrate.cpp
+- libbtcore/migrate/migrate.cpp
+-
+- libbtcore/btversion.cpp
+-)
+-
+-if(WIN32)
+-# Compile stuff for windows
+-set(libbtcore_SRC ${libbtcore_SRC} libbtcore/util/win32.cpp)
+-endif(WIN32)
+-
+-endif (GMP_FOUND AND QCA2_FOUND)
+-else (ENABLE_EMBEDDED_TORRENT_SUPPORT)
+- find_package(BTCore REQUIRED)
+- macro_log_feature(BTCORE_FOUND "BTCore" "KTorrent core library" "http://ktorrent.org/" FALSE "" "Needed to build Torrent support in KGet. Please install it or pass -DENABLE_EMBEDDED_TORRENT_SUPPORT=true to build embedded torrent support.")
+-
+- include_directories(
+- ../../
+- ${BTCORE_INCLUDE_DIR}
+- )
+-endif (ENABLE_EMBEDDED_TORRENT_SUPPORT)
+-
+-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
+-
+ set(kget_bittorrentfactory_PART_SRCS
+ bttransfer.cpp
+ bttransferfactory.cpp
+@@ -257,25 +46,14 @@ kde4_add_ui_files(kget_bittorrentfactory
+ advanceddetails/webseedstab.ui
+ )
+
+-if (GMP_FOUND AND QCA2_FOUND AND ENABLE_EMBEDDED_TORRENT_SUPPORT)
+- kde4_add_kcfg_files(kget_bittorrentfactory_PART_SRCS bittorrentsettings.kcfgc)
+- kde4_add_plugin(kget_bittorrentfactory ${kget_bittorrentfactory_PART_SRCS} ${libbtcore_SRC})
+- if (HAVE_NEPOMUK)
+- target_link_libraries(kget_bittorrentfactory ${SOPRANO_LIBRARIES} ${NEPOMUK_LIBRARIES})
+- endif (HAVE_NEPOMUK)
+- target_link_libraries(kget_bittorrentfactory ${KDE4_KIO_LIBS} ${GMP_LIBRARIES} ${QCA2_LIBRARIES} kgetcore)
+- install(TARGETS kget_bittorrentfactory DESTINATION ${PLUGIN_INSTALL_DIR})
+- install(FILES kget_bittorrentfactory.desktop DESTINATION ${SERVICES_INSTALL_DIR})
+-else (GMP_FOUND AND QCA2_FOUND AND ENABLE_EMBEDDED_TORRENT_SUPPORT)
+- kde4_add_kcfg_files(kget_bittorrentfactory_PART_SRCS bittorrentsettings.kcfgc)
+- kde4_add_plugin(kget_bittorrentfactory ${kget_bittorrentfactory_PART_SRCS})
+- if (HAVE_NEPOMUK)
+- target_link_libraries(kget_bittorrentfactory ${SOPRANO_LIBRARIES} ${NEPOMUK_LIBRARIES})
+- endif (HAVE_NEPOMUK)
+- target_link_libraries(kget_bittorrentfactory ${KDE4_KIO_LIBS} ${BTCORE_LIBRARIES} kgetcore)
+- install(TARGETS kget_bittorrentfactory DESTINATION ${PLUGIN_INSTALL_DIR})
+- install(FILES kget_bittorrentfactory.desktop DESTINATION ${SERVICES_INSTALL_DIR})
+-endif (GMP_FOUND AND QCA2_FOUND AND ENABLE_EMBEDDED_TORRENT_SUPPORT)
++kde4_add_kcfg_files(kget_bittorrentfactory_PART_SRCS bittorrentsettings.kcfgc)
++kde4_add_plugin(kget_bittorrentfactory ${kget_bittorrentfactory_PART_SRCS})
++if (HAVE_NEPOMUK)
++ target_link_libraries(kget_bittorrentfactory ${SOPRANO_LIBRARIES} ${NEPOMUK_LIBRARIES})
++endif (HAVE_NEPOMUK)
++target_link_libraries(kget_bittorrentfactory ${KDE4_KIO_LIBS} ${LIBKTORRENT_LIBRARIES} kgetcore)
++install(TARGETS kget_bittorrentfactory DESTINATION ${PLUGIN_INSTALL_DIR})
++install(FILES kget_bittorrentfactory.desktop DESTINATION ${SERVICES_INSTALL_DIR})
+
+ ###Build KCM-Module
+ set(kcm_kget_bittorrentfactory_PART_SRCS
Modified: trunk/packages/kdenetwork/debian/patches/series
===================================================================
--- trunk/packages/kdenetwork/debian/patches/series 2010-05-29 18:50:45 UTC (rev 18137)
+++ trunk/packages/kdenetwork/debian/patches/series 2010-05-30 00:34:00 UTC (rev 18138)
@@ -1 +1,2 @@
-01_use_system_libktorrent.diff
+01_backport_use_system_libktorrent.diff
+02_debian_libktorrent_porting.diff
More information about the pkg-kde-commits
mailing list