From 65eeff79fff8a1bfdf67ca51d147384f46f4d5c0 Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Fri, 27 Dec 2013 23:55:53 +0000 Subject: Fri Dec 27 23:54:04 UTC 2013 --- community/tork/PKGBUILD | 63 +++++++++++++++++++++++++++++++++++++++ community/tork/fix_getuid.patch | 23 ++++++++++++++ community/tork/fix_net_port.patch | 20 +++++++++++++ community/tork/tork.install | 12 ++++++++ 4 files changed, 118 insertions(+) create mode 100644 community/tork/PKGBUILD create mode 100644 community/tork/fix_getuid.patch create mode 100644 community/tork/fix_net_port.patch create mode 100644 community/tork/tork.install (limited to 'community/tork') diff --git a/community/tork/PKGBUILD b/community/tork/PKGBUILD new file mode 100644 index 000000000..fe8a4121b --- /dev/null +++ b/community/tork/PKGBUILD @@ -0,0 +1,63 @@ +# $Id: PKGBUILD 103134 2013-12-27 05:36:23Z fyan $ +# Maintainer: Felix Yan +# Contributor: Darwin Bautista +# Contributor: Chris Giles + +_libname=tor +pkgname=${_libname}k +pkgver=0.33 +pkgrel=5 +pkgdesc="An anonymity manager for KDE" +arch=("i686" "x86_64") +url="http://sourceforge.net/projects/$pkgname/" +license=("GPL") +depends=("geoip" "kdelibs3" "${_libname}" "torsocks" "hicolor-icon-theme" "desktop-file-utils" "xdg-utils") +optdepends=("privoxy: For anonymous browsing with Konqueror") +options=("!emptydirs") +install=${pkgname}.install + +source=( + http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2 + fix_net_port.patch + fix_getuid.patch +) +sha1sums=( + 'cf94b9579cf24254fcb344f579088a241bbd4028' + '70c450031bf5e603801451fc016e5cfc22cfd19c' + '9fe1de823850e6a0d0a4a18c3b86955206f544bd' +) + +build() { + cd ${pkgname}-${pkgver} + + # Source the KDE and QT profiles + source /etc/profile.d/kde3.sh + #source /etc/profile.d/qt3.sh + + msg "Applying patch(es) ..." + + patch -Np1 -i ../fix_net_port.patch + patch -Np1 -i ../fix_getuid.patch + + # Build + msg "Compiling tork ..." + ./configure --prefix=/opt/kde --mandir=/usr/share/man \ + --sysconfdir=/etc --with-external-geoip --without-arts + + # Fix --as-needed and --hash-style=gnu options not recognized error + find . -name Makefile -exec sed -i "s/-Wl,//g" {} \; + find . -name Makefile -exec sed -i "s/-Wl//g" {} \; + find . -name Makefile -exec sed -i "s/--hash-style=gnu,//g" {} \; + find . -name Makefile -exec sed -i "s/--hash-style=gnu//g" {} \; + find . -name Makefile -exec sed -i "s/--as-needed,//g" {} \; + find . -name Makefile -exec sed -i "s/--as-needed//g" {} \; + + make +} + +package() { + cd ${pkgname}-${pkgver} + make DESTDIR="${pkgdir}" install +} + +# vim:set ts=2 sw=2 et: diff --git a/community/tork/fix_getuid.patch b/community/tork/fix_getuid.patch new file mode 100644 index 000000000..6afdae74a --- /dev/null +++ b/community/tork/fix_getuid.patch @@ -0,0 +1,23 @@ +--- A/src/tork.h 2009-08-13 03:41:23.000000000 +0800 ++++ B/src/tork.h 2012-04-04 22:43:55.924940588 +0800 +@@ -45,6 +45,9 @@ + #include + #include + ++#include ++#include ++ + #include "update.h" + #include "trayicon.h" + #include "upnpmanager.h" +--- A/src/likeback.h 2006-10-01 19:58:11.000000000 +0800 ++++ B/src/likeback.h 2012-04-04 22:50:38.024921928 +0800 +@@ -22,6 +22,8 @@ + #define LIKEBACK_H + + #include ++#include ++#include + + class KConfig; + class KAboutData; diff --git a/community/tork/fix_net_port.patch b/community/tork/fix_net_port.patch new file mode 100644 index 000000000..b5545e0b2 --- /dev/null +++ b/community/tork/fix_net_port.patch @@ -0,0 +1,20 @@ +--- A/src/upnp/upnprouter.h ++++ B/src/upnp/upnprouter.h +@@ -242,7 +242,7 @@ + * @param port The local port to forward + */ + void forward(const net::Port & externalport, +- const net::Port & internalport = net::Port::Port(), ++ const net::Port & internalport = net::Port(), + bool force = false); + + /** +@@ -291,7 +291,7 @@ + bt::HTTPRequest* sendSoapQuery(const QString & query,const QString & soapact,const QString & controlurl,bool fwd, bool at_exit = false ); + bool verbose; + +- void forward(UPnPService* srv,const net::Port & externalport,const net::Port & internalport = net::Port::Port()); ++ void forward(UPnPService* srv,const net::Port & externalport,const net::Port & internalport = net::Port()); + void undoForward(UPnPService* srv,const net::Port & externalport,const net::Port & + internalport,bt::WaitJob* waitjob); + void httpRequestDone(bt::HTTPRequest* r,bool erase_fwd); diff --git a/community/tork/tork.install b/community/tork/tork.install new file mode 100644 index 000000000..5c501dc49 --- /dev/null +++ b/community/tork/tork.install @@ -0,0 +1,12 @@ +post_install() { + xdg-icon-resource forceupdate --theme hicolor &> /dev/null + update-desktop-database -q +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} -- cgit v1.2.3-54-g00ecf