comparison app-crypt/truecrypt/truecrypt-6.1a.ebuild @ 328:cee7e5f9f250

Automated merge with http://hoho.dyndns.org/hg/portage
author Dirk Olmes <dirk@xanthippe.ping.de>
date Mon, 02 Apr 2012 15:39:05 +0200
parents b31e97231708
children
comparison
equal deleted inserted replaced
327:19a25aae5976 328:cee7e5f9f250
1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils toolchain-funcs multilib wxwidgets
6
7 MY_P="${P}.tar.gz"
8
9 DESCRIPTION="Free open-source disk encryption software"
10 HOMEPAGE="http://www.truecrypt.org/"
11 #SRC_URI="TrueCrypt ${PV} Source.tar.gz"
12 SRC_URI="${P}.tar.gz
13 pkcs11.h
14 pkcs11f.h
15 pkcs11t.h"
16
17 LICENSE="truecrypt-collective-1.4"
18 SLOT="0"
19 KEYWORDS="~amd64 ~x86"
20 IUSE="X"
21 RESTRICT="mirror fetch bindist"
22
23 RDEPEND="sys-fs/fuse
24 =x11-libs/wxGTK-2.8*"
25 DEPEND="${RDEPEND}"
26
27 S="${WORKDIR}/${P}-source"
28
29 pkg_nofetch() {
30 einfo "Please download tar.gz source from:"
31 einfo "http://www.truecrypt.org/downloads2.php"
32 einfo "Then put the file in ${DISTDIR}/${MY_P}"
33 einfo "Please download RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki) 2.20"
34 einfo "header files:"
35 einfo "ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11.h"
36 einfo "ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11f.h"
37 einfo "ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11t.h"
38 einfo "Then put files in ${DISTDIR}"
39 }
40
41 pkg_setup() {
42 WX_GTK_VER="2.8"
43 if use X; then
44 need-wxwidgets unicode
45 else
46 need-wxwidgets base-unicode
47 fi
48 }
49
50 src_unpack() {
51 unpack ${MY_P}
52 cd "${S}"
53
54 epatch "${FILESDIR}/${PN}-6.1-64bit.patch"
55 epatch "${FILESDIR}/${PN}-6.1-bool.patch"
56 epatch "${FILESDIR}/${PN}-6.1-external-wx.patch"
57 }
58
59 src_compile() {
60 local EXTRA
61 use amd64 && EXTRA="${EXTRA} USE64BIT=1"
62 use X || EXTRA="${EXTRA} NOGUI=1"
63 if has_version '<sys-libs/glibc-2.7'; then
64 if [ "$(gcc-version)" = "4.3" ]; then
65 elog "You are trying to compile ${P} using >=sys-devel/gcc-4.3 and <sys-libs/glibc-2.7"
66 elog "In this case compiling will failed if not -O0 optimization flag used."
67 elog "Therefore ${P} will compliling with -O0 flag."
68 elog "Otherwise you could install >=sys-libs/glibc-2.7 or use <sys-devel/gcc-4.3"
69 CFLAGS="${CFLAGS} -O0"
70 CXXFLAGS="${CXXFLAGS} -O0"
71 fi
72 fi
73 emake \
74 ${EXTRA} \
75 PKCS11_INC="${DISTDIR}" \
76 NOSTRIP=1 \
77 VERBOSE=1 \
78 NOTEST=1 \
79 CC="$(tc-getCC)" \
80 AR="$(tc-getAR)" \
81 CXX="$(tc-getCXX)" \
82 RANLIB="$(tc-getRANLIB)" \
83 EXTRA_CFLAGS="${CFLAGS}" \
84 EXTRA_CXXFLAGS="${CXXFLAGS}" \
85 EXTRA_LDFLAGS="${LDFLAGS}" \
86 WX_CONFIG="${WX_CONFIG}" \
87 WX_CONFIG_EXTRA="" \
88 || die
89 }
90
91 src_test() {
92 "${S}/Main/truecrypt" --text --test
93 }
94
95 src_install() {
96 dobin Main/truecrypt
97 dodoc Readme.txt 'Release/Setup Files/TrueCrypt User Guide.pdf'
98 insinto "/$(get_libdir)/rcscripts/addons"
99 newins "${FILESDIR}/${PN}-stop.sh" "${PN}-stop.sh"
100 }
101
102 pkg_postinst() {
103 elog "potential legal problems - use at own risk"
104 elog "http://lists.freedesktop.org/archives/distributions/2008-October/000276.html"
105 }