1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit eutils toolchain-funcs multilib wxwidgets
7 DESCRIPTION="Free open-source disk encryption software"
8 HOMEPAGE="http://www.truecrypt.org/"
9 #SRC_URI="TrueCrypt ${PV} Source.tar.gz"
15 LICENSE="truecrypt-collective-1.4"
17 KEYWORDS="~amd64 ~x86"
19 RESTRICT="mirror fetch bindist"
25 S="${WORKDIR}/${P}-source"
29 einfo "Please download tar.gz source from:"
30 einfo "http://www.truecrypt.org/downloads2.php"
31 einfo "Then put the file in ${DISTDIR}/${MY_P}"
32 einfo "Please download RSA Security Inc. PKCS #11 Cryptographic Token Interface (Cryptoki) 2.20"
34 einfo "ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11.h"
35 einfo "ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11f.h"
36 einfo "ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11t.h"
37 einfo "Then put files in ${DISTDIR}"
43 need-wxwidgets unicode
45 need-wxwidgets base-unicode
52 # epatch "${FILESDIR}/${P}-gcc-4.3.patch"
53 # epatch "${FILESDIR}/${PN}-5.1a-external-wx.patch"
54 # epatch "${FILESDIR}/${PN}-5.1-64bit.patch"
55 # epatch "${FILESDIR}/${PN}-5.0-bool.patch"
56 epatch "${FILESDIR}/${PN}-6.1-64bit.patch"
57 epatch "${FILESDIR}/${PN}-6.1-bool.patch"
58 epatch "${FILESDIR}/${PN}-6.1-external-wx.patch"
63 use amd64 && EXTRA="${EXTRA} USE64BIT=1"
64 use X || EXTRA="${EXTRA} NOGUI=1"
65 if has_version '<=sys-libs/glibc-2.7'; then
66 if [ "$(gcc-version)" = "4.3" ]; then
67 elog "You are trying to compile ${P} using >=sys-devel/gcc-4.3 and <sys-libs/glibc-2.7"
68 elog "In this case compiling will failed if not -O0 optimization flag used."
69 elog "Therefore ${P} will compliling with -O0 flag."
70 elog "Otherwise you could install >=sys-libs/glibc-2.7 or use <sys-devel/gcc-4.3"
71 CFLAGS="${CFLAGS} -O0"
72 CXXFLAGS="${CXXFLAGS} -O0"
77 PKCS11_INC="${DISTDIR}" \
84 RANLIB="$(tc-getRANLIB)" \
85 EXTRA_CFLAGS="${CFLAGS}" \
86 EXTRA_CXXFLAGS="${CXXFLAGS}" \
87 EXTRA_LDFLAGS="${LDFLAGS}" \
88 WX_CONFIG="${WX_CONFIG}" \
94 "${S}/Main/truecrypt" --text --test
99 dodoc Readme.txt 'Release/Setup Files/TrueCrypt User Guide.pdf'
100 insinto "/$(get_libdir)/rcscripts/addons"
101 newins "${FILESDIR}/${PN}-stop.sh" "${PN}-stop.sh"
105 elog "potential legal problems - use at own risk"
106 elog "http://lists.freedesktop.org/archives/distributions/2008-October/000276.html"