summaryrefslogtreecommitdiff
path: root/kde-misc/tork/files
blob: bec0f31414735e671472f7e8382c922b8dc2f280 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
/var/paludis/repositories/gentoo/kde-misc/tork/filesd under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/kde-misc/tork/tork-0.27.ebuild,v 1.3 2008/06/30 01:38:27 carlo Exp $

ARTS_REQUIRED="never"

inherit kde multilib cvs autotools

DESCRIPTION="TorK is a powerful anonymity manager for the KDE and acts as a frontedn to Tor."
HOMEPAGE="http://tork.sourceforge.net/"
SRC_URI=""

ECVS_SERVER="tork.cvs.sourceforge.net:/cvsroot/tork"
ECVS_MODULE="tork"
ECVS_AUTH="pserver"
ECVS_USER="anonymous"
S="${WORKDIR}/${PN}"


LICENSE="GPL-2"
SLOT=""
KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
IUSE="gnutls"

DEPEND="dev-libs/openssl
	>=dev-libs/geoip-1.4.0
	gnutls? ( >=net-libs/gnutls-2.2.2 )
	!gnutls? ( >=dev-libs/openssl-0.9.8g )"

RDEPEND="${DEPEND}
	>=net-misc/tor-0.1.2.14
	>=net-proxy/privoxy-3.0.3-r5
	>=net-proxy/tsocks-1.8_beta5-r2"

need-kde 3.5

#PATCHES=( "${FILESDIR}/${P}-ext_tsocks.patch"
#	"${FILESDIR}/${P}+gcc-4.3.patch" )

src_compile() {
	# Fix desktop file
	cd ${S}
	sed -i -e "s:^\(Categories=.*\):\1;:" "${S}/src/tork.desktop"

	local myconf="--with-external-geoip --with-conf=/etc/socks/tsocks.conf"
	use gnutls && myconf="${myconf} --enable-gnutls"

	kde_src_compile
}

pkg_postinst() {
	if ! built_with_use --missing false net-proxy/tsocks tordns; then
		ewarn "WARNING: you have net-proxy/tsocks installed without"
		ewarn "the patch to avoid DNS leaking while using Tor."
		ewarn "For better privacy, please emerge again net-proxy/tsocks"
		ewarn "with the USE flag 'tordns' enabled."
	fi
}
	fi
}

src_install() {
	emake DESTDIR="${D}" install
	rm "${D}/etc/pango/pango.modules"
}

pkg_postinst() {
	if [[ "${ROOT}" == "/" ]] ; then
		einfo "Generating modules listing..."

		local PANGO_CONFDIR=

		if multilib_enabled ; then
			PANGO_CONFDIR="/etc/pango/${CHOST}"
		else
			PANGO_CONFDIR="/etc/pango"
		fi

		mkdir -p ${PANGO_CONFDIR}

		pango-querymodules > ${PANGO_CONFDIR}/pango.modules
	fi
}

src_compile(){
	econf\
	$(use_enable doc gtk-doc) \
	$(use_enable doc man) \
	$(useq debug && echo --enable-debug=yes )
	emake
}
ib.patch"

	# Workaround adobe flash infinite loop. Patch from http://bugzilla.gnome.org/show_bug.cgi?id=463773#c11
	epatch "${FILESDIR}/${PN}-2.12.0-flash-workaround.patch"

	# Don't break inclusion of gtkclist.h, upstream bug 536767
	epatch "${FILESDIR}/${PN}-2.14.3-limit-gtksignal-includes.patch"

	# -O3 and company cause random crashes in applications. Bug #133469
	replace-flags -O3 -O2
	strip-flags

	use ppc64 && append-flags -mminimal-toc

	elibtoolize
}

src_compile() {
	# png always on to display icons (foser)
	local myconf="$(use_enable doc gtk-doc) \
		$(use_with jpeg libjpeg) \
		$(use_with jpeg2k libjasper) \
		$(use_with tiff libtiff) \
		$(use_enable xinerama) \
		$(use_enable cups cups auto) \
		--with-libpng \
		--with-gdktarget=x11 \
		--with-xinput"

	# Passing --disable-debug is not recommended for production use
	use debug && myconf="${myconf} --enable-debug=yes"

	econf ${myconf} || die "configure failed"
	emake || die "compile failed"
}

src_test() {
	Xemake check || die "tests failed"
}

src_install() {
	emake DESTDIR="${D}" install || die "Installation failed"

	set_gtk2_confdir
	dodir ${GTK2_CONFDIR}
	keepdir ${GTK2_CONFDIR}

	# see bug #133241
	echo 'gtk-fallback-icon-theme = "gnome"' > "${D}/${GTK2_CONFDIR}/gtkrc"

	# Enable xft in environment as suggested by <utx@gentoo.org>
	dodir /etc/env.d
	echo "GDK_USE_XFT=1" > "${D}/etc/env.d/50gtk2"

	dodoc AUTHORS ChangeLog* HACKING NEWS* README*

	# This has to be removed, because it's multilib specific; genep