summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Bar-Lev <alonbl@gentoo.org>2008-03-13 07:01:40 +0000
committerAlon Bar-Lev <alonbl@gentoo.org>2008-03-13 07:01:40 +0000
commit816172281ac00b3c29330a2f347b4bbfb9043538 (patch)
treed8b4e51825cae0479b148bb16d4a47fca25e06d3 /app-crypt/truecrypt
parentstable x86/amd64 (diff)
downloadgentoo-2-816172281ac00b3c29330a2f347b4bbfb9043538.tar.gz
gentoo-2-816172281ac00b3c29330a2f347b4bbfb9043538.tar.bz2
gentoo-2-816172281ac00b3c29330a2f347b4bbfb9043538.zip
Version bump
(Portage version: 2.1.4.4)
Diffstat (limited to 'app-crypt/truecrypt')
-rw-r--r--app-crypt/truecrypt/ChangeLog9
-rw-r--r--app-crypt/truecrypt/files/truecrypt-5.1-64bit.patch14
-rw-r--r--app-crypt/truecrypt/files/truecrypt-5.1-nogui.patch351
-rw-r--r--app-crypt/truecrypt/truecrypt-5.1.ebuild76
4 files changed, 449 insertions, 1 deletions
diff --git a/app-crypt/truecrypt/ChangeLog b/app-crypt/truecrypt/ChangeLog
index 663f29ecd6d7..3f8456524eb1 100644
--- a/app-crypt/truecrypt/ChangeLog
+++ b/app-crypt/truecrypt/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-crypt/truecrypt
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/truecrypt/ChangeLog,v 1.34 2008/02/22 22:31:21 alonbl Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/truecrypt/ChangeLog,v 1.35 2008/03/13 07:01:39 alonbl Exp $
+
+*truecrypt-5.1 (13 Mar 2008)
+
+ 13 Mar 2008; Alon Bar-Lev <alonbl@gentoo.org>
+ +files/truecrypt-5.1-64bit.patch, +files/truecrypt-5.1-nogui.patch,
+ +truecrypt-5.1.ebuild:
+ Version bump, bug#213074
22 Feb 2008; Alon Bar-Lev <alonbl@gentoo.org>
files/truecrypt-5.0-nogui.patch:
diff --git a/app-crypt/truecrypt/files/truecrypt-5.1-64bit.patch b/app-crypt/truecrypt/files/truecrypt-5.1-64bit.patch
new file mode 100644
index 000000000000..e354c7b5502d
--- /dev/null
+++ b/app-crypt/truecrypt/files/truecrypt-5.1-64bit.patch
@@ -0,0 +1,14 @@
+--- truecrypt-5.0a-source.org/Makefile 2008-02-04 20:19:02.000000000 +0200
++++ truecrypt-5.0a-source/Makefile 2008-02-13 19:47:58.000000000 +0200
+@@ -42,7 +42,11 @@ export CFLAGS := -W
+ export CXXFLAGS := -Wall
+
+ C_CXX_FLAGS := -MMD -I$(BASE_DIR) -I$(BASE_DIR)/Crypto
+ C_CXX_FLAGS += -DBOOL=int -DFALSE=0 -DTRUE=1
++ifeq "$(origin USE64BIT)" "command line"
++C_CXX_FLAGS += -D__int8=char -D__int16=short -D__int32=int '-D__int64=long' # Tested in PlatformTest
++else
+ C_CXX_FLAGS += -D__int8=char -D__int16=short -D__int32=int '-D__int64=long long' # Tested in PlatformTest
++endif
+
+ export LFLAGS :=
diff --git a/app-crypt/truecrypt/files/truecrypt-5.1-nogui.patch b/app-crypt/truecrypt/files/truecrypt-5.1-nogui.patch
new file mode 100644
index 000000000000..569e2636765f
--- /dev/null
+++ b/app-crypt/truecrypt/files/truecrypt-5.1-nogui.patch
@@ -0,0 +1,351 @@
+diff -urNp truecrypt-5.1-source.org/Main/Application.cpp truecrypt-5.1-source/Main/Application.cpp
+--- truecrypt-5.1-source.org/Main/Application.cpp 2008-03-02 13:03:30.000000000 +0200
++++ truecrypt-5.1-source/Main/Application.cpp 2008-03-12 23:40:04.000000000 +0200
+@@ -23,12 +23,14 @@ namespace TrueCrypt
+ return mUserInterface;
+ }
+
++#ifdef ENABLE_wxGUI
+ wxApp* Application::CreateGuiApp ()
+ {
+ mUserInterface = new GraphicUserInterface;
+ mUserInterfaceType = UserInterfaceType::Graphic;
+ return mUserInterface;
+ }
++#endif
+
+ FilePath Application::GetConfigFilePath (const wxString &configFileName, bool createConfigDir)
+ {
+@@ -74,11 +76,13 @@ namespace TrueCrypt
+ wxAppInitializer wxTheAppInitializer((wxAppInitializerFunction) CreateConsoleApp);
+ break;
+ }
++#ifdef ENABLE_wxGUI
+ case UserInterfaceType::Graphic:
+ {
+ wxAppInitializer wxTheAppInitializer((wxAppInitializerFunction) CreateGuiApp);
+ break;
+ }
++#endif
+
+ default:
+ throw ParameterIncorrect (SRC_POS);
+diff -urNp truecrypt-5.1-source.org/Main/FatalErrorHandler.cpp truecrypt-5.1-source/Main/FatalErrorHandler.cpp
+--- truecrypt-5.1-source.org/Main/FatalErrorHandler.cpp 2008-03-09 21:18:58.000000000 +0200
++++ truecrypt-5.1-source/Main/FatalErrorHandler.cpp 2008-03-12 23:39:24.000000000 +0200
+@@ -92,6 +92,7 @@ namespace TrueCrypt
+
+ #endif // wxUSE_STACKWALKER
+
++#ifdef ENABLE_wxGUI
+ wxString url = Gui->GetHomepageLinkURL (L"err-report", vars.str());
+ url.Replace (L"0x", L"");
+
+@@ -111,6 +112,7 @@ namespace TrueCrypt
+
+ if (Gui->AskYesNo (msg, true))
+ wxLaunchDefaultBrowser (url, wxBROWSER_NEW_WINDOW);
++#endif
+
+ _exit (1);
+ }
+@@ -157,6 +159,7 @@ namespace TrueCrypt
+ vars.Replace (L"::", L".");
+ vars.Replace (L":", L".");
+
++#ifdef ENABLE_wxGUI
+ wxString url = Gui->GetHomepageLinkURL (L"err-report", vars);
+
+ wxString msg = L"An unhandled exception has occured and TrueCrypt must be terminated. If this is caused by a bug in TrueCrypt, we would like to fix it. To help us, you can send us an automatically generated error report containing the following items:\n\n- Program version\n- Operating system version\n- Hardware architecture\n- Error description\n- Error location\n";
+@@ -166,15 +169,20 @@ namespace TrueCrypt
+
+ if (Gui->AskYesNo (msg, true))
+ wxLaunchDefaultBrowser (url, wxBROWSER_NEW_WINDOW);
++#endif
+
+ }
+ catch (exception &e)
+ {
++#ifdef ENABLE_wxGUI
+ Gui->ShowError (e);
++#endif
+ }
+ catch (...)
+ {
++#ifdef ENABLE_wxGUI
+ Gui->ShowError (_("Unknown exception occurred."));
++#endif
+ }
+
+ _exit (1);
+diff -urNp truecrypt-5.1-source.org/Main/GraphicUserInterface.cpp truecrypt-5.1-source/Main/GraphicUserInterface.cpp
+--- truecrypt-5.1-source.org/Main/GraphicUserInterface.cpp 2008-03-09 09:41:24.000000000 +0200
++++ truecrypt-5.1-source/Main/GraphicUserInterface.cpp 2008-03-12 23:39:24.000000000 +0200
+@@ -19,6 +19,9 @@
+ #include "Application.h"
+ #include "GraphicUserInterface.h"
+ #include "FatalErrorHandler.h"
++
++#ifdef ENABLE_wxGUI
++
+ #include "Forms/DeviceSelectionDialog.h"
+ #include "Forms/MainFrame.h"
+ #include "Forms/MountOptionsDialog.h"
+@@ -1055,3 +1058,4 @@ namespace TrueCrypt
+
+ GraphicUserInterface *Gui = nullptr;
+ }
++#endif
+diff -urNp truecrypt-5.1-source.org/Main/GraphicUserInterface.h truecrypt-5.1-source/Main/GraphicUserInterface.h
+--- truecrypt-5.1-source.org/Main/GraphicUserInterface.h 2008-03-09 09:40:00.000000000 +0200
++++ truecrypt-5.1-source/Main/GraphicUserInterface.h 2008-03-12 23:39:24.000000000 +0200
+@@ -14,6 +14,7 @@
+ #include "Main.h"
+ #include "UserInterface.h"
+
++#ifdef ENABLE_wxGUI
+ namespace TrueCrypt
+ {
+ class GraphicUserInterface : public UserInterface
+@@ -129,5 +130,6 @@ namespace TrueCrypt
+
+ extern GraphicUserInterface *Gui;
+ }
++#endif
+
+ #endif // TC_HEADER_Main_GraphicUserInterface
+diff -urNp truecrypt-5.1-source.org/Main/Main.make truecrypt-5.1-source/Main/Main.make
+--- truecrypt-5.1-source.org/Main/Main.make 2008-03-12 23:38:24.000000000 +0200
++++ truecrypt-5.1-source/Main/Main.make 2008-03-12 23:39:24.000000000 +0200
+@@ -21,6 +21,7 @@ OBJS += UserPreferences.o
+ OBJS += VolumeHistory.o
+ OBJS += Xml.o
+ OBJS += Unix/Main.o
++ifeq "$(TC_BUILD_GUI)" "True"
+ OBJS += Forms/AboutDialog.o
+ OBJS += Forms/ChangePasswordDialog.o
+ OBJS += Forms/DeviceSelectionDialog.o
+@@ -47,6 +48,7 @@ OBJS += Forms/VolumeLocationWizardPage.o
+ OBJS += Forms/VolumePasswordWizardPage.o
+ OBJS += Forms/VolumeSizeWizardPage.o
+ OBJS += Forms/WizardFrame.o
++endif
+ OBJS += Resources.o
+
+ ifndef DISABLE_PRECOMPILED_HEADERS
+@@ -72,12 +74,12 @@ WX_CONFIG_EXTRA ?= --static
+ ifeq "$(TC_BUILD_CONFIG)" "Release"
+
+ CXXFLAGS += $(shell $(WX_CONFIG) $(WX_CONFIG_EXTRA) --cxxflags)
+-WX_LIBS = $(shell $(WX_CONFIG) $(WX_CONFIG_EXTRA) --libs adv,core,base)
++WX_LIBS = $(shell $(WX_CONFIG) $(WX_CONFIG_EXTRA) --libs)
+
+ else
+
+ CXXFLAGS += $(shell $(WX_CONFIG) $(WX_CONFIG_EXTRA) --debug --cxxflags)
+-WX_LIBS = $(shell $(WX_CONFIG) $(WX_CONFIG_EXTRA) --debug --libs adv,core,base)
++WX_LIBS = $(shell $(WX_CONFIG) $(WX_CONFIG_EXTRA) --debug --libs)
+
+ endif
+
+diff -urNp truecrypt-5.1-source.org/Main/Resources.cpp truecrypt-5.1-source/Main/Resources.cpp
+--- truecrypt-5.1-source.org/Main/Resources.cpp 2008-02-04 13:14:16.000000000 +0200
++++ truecrypt-5.1-source/Main/Resources.cpp 2008-03-12 23:39:24.000000000 +0200
+@@ -35,6 +35,7 @@ namespace TrueCrypt
+ }
+ #endif // TC_WINDOWS
+
++#ifdef ENABLE_wxGUI
+ wxBitmap Resources::GetDriveIconBitmap ()
+ {
+ #ifdef TC_WINDOWS
+@@ -72,6 +73,7 @@ namespace TrueCrypt
+ # endif
+ #endif
+ }
++#endif
+
+ string Resources::GetLanguageXml ()
+ {
+@@ -111,6 +113,7 @@ namespace TrueCrypt
+ #endif
+ }
+
++#ifdef ENABLE_wxGUI
+ wxBitmap Resources::GetLogoBitmap ()
+ {
+ #ifdef TC_WINDOWS
+@@ -173,4 +176,5 @@ namespace TrueCrypt
+ return wxBitmap (image);
+ #endif
+ }
++#endif
+ }
+diff -urNp truecrypt-5.1-source.org/Main/Resources.h truecrypt-5.1-source/Main/Resources.h
+--- truecrypt-5.1-source.org/Main/Resources.h 2008-02-04 13:14:14.000000000 +0200
++++ truecrypt-5.1-source/Main/Resources.h 2008-03-12 23:39:24.000000000 +0200
+@@ -17,14 +17,18 @@ namespace TrueCrypt
+ class Resources
+ {
+ public:
++#ifdef ENABLE_wxGUI
+ static wxBitmap GetDriveIconBitmap ();
+ static wxBitmap GetDriveIconMaskBitmap ();
++#endif
+ static string GetLanguageXml ();
+ static string GetLegalNotices ();
++#ifdef ENABLE_wxGUI
+ static wxBitmap GetLogoBitmap ();
+ static wxBitmap GetTextualLogoBitmap ();
+ static wxIcon GetTrueCryptIcon ();
+ static wxBitmap GetVolumeCreationWizardBitmap (int height = -1);
++#endif
+
+ protected:
+ };
+diff -urNp truecrypt-5.1-source.org/Main/SystemPrecompiled.h truecrypt-5.1-source/Main/SystemPrecompiled.h
+--- truecrypt-5.1-source.org/Main/SystemPrecompiled.h 2008-02-04 13:22:08.000000000 +0200
++++ truecrypt-5.1-source/Main/SystemPrecompiled.h 2008-03-12 23:39:24.000000000 +0200
+@@ -7,16 +7,24 @@
+ */
+
+ #include <wx/wx.h>
++#ifdef ENABLE_wxGUI
+ #include <wx/dnd.h>
++#endif
+ #include <wx/filename.h>
++#ifdef ENABLE_wxGUI
+ #include <wx/imaglist.h>
+ #include <wx/listctrl.h>
++#endif
+ #include <wx/mstream.h>
+ #include <wx/power.h>
+ #include <wx/snglinst.h>
++#ifdef ENABLE_wxGUI
+ #include <wx/taskbar.h>
++#endif
+ #include <wx/txtstrm.h>
++#ifdef ENABLE_wxGUI
+ #include <wx/valgen.h>
++#endif
+ #include <wx/wfstream.h>
+
+ #include <iostream>
+diff -urNp truecrypt-5.1-source.org/Main/TextUserInterface.cpp truecrypt-5.1-source/Main/TextUserInterface.cpp
+--- truecrypt-5.1-source.org/Main/TextUserInterface.cpp 2008-03-10 15:05:40.000000000 +0200
++++ truecrypt-5.1-source/Main/TextUserInterface.cpp 2008-03-12 23:39:24.000000000 +0200
+@@ -712,8 +712,9 @@ namespace TrueCrypt
+
+ InterfaceType = UserInterfaceType::Text;
+ Init();
+-
++#ifdef ENABLE_wxGUI
+ SetExitOnFrameDelete (false);
++#endif
+ }
+ catch (exception &e)
+ {
+diff -urNp truecrypt-5.1-source.org/Main/Unix/Main.cpp truecrypt-5.1-source/Main/Unix/Main.cpp
+--- truecrypt-5.1-source.org/Main/Unix/Main.cpp 2008-03-09 22:13:10.000000000 +0200
++++ truecrypt-5.1-source/Main/Unix/Main.cpp 2008-03-12 23:39:24.000000000 +0200
+@@ -61,6 +61,9 @@ int main (int argc, char **argv)
+ if (!getenv ("DISPLAY"))
+ forceTextUI = true;
+ #endif
++#ifndef ENABLE_wxGUI
++ forceTextUI = true;
++#endif
+
+ // Set user interface type
+ if (forceTextUI || (argc > 1 && (strcmp (argv[1], "-t") == 0 || strcmp (argv[1], "--text") == 0)))
+diff -urNp truecrypt-5.1-source.org/Main/UserInterface.cpp truecrypt-5.1-source/Main/UserInterface.cpp
+--- truecrypt-5.1-source.org/Main/UserInterface.cpp 2008-03-09 19:02:54.000000000 +0200
++++ truecrypt-5.1-source/Main/UserInterface.cpp 2008-03-12 23:41:46.000000000 +0200
+@@ -356,11 +356,13 @@ namespace TrueCrypt
+ {
+ wxString message = ExceptionTypeToString (typeid (ex));
+
++#ifdef ENABLE_wxGUI
+ #ifdef __WXGTK__
+ if (Application::GetUserInterfaceType() != UserInterfaceType::Text)
+ #endif
+ if (wxGetKeyState (WXK_CAPITAL))
+ message += wxString (L"\n\n") + LangString["CAPSLOCK_ON"];
++#endif
+
+ return message;
+ }
+diff -urNp truecrypt-5.1-source.org/Main/VolumeHistory.cpp truecrypt-5.1-source/Main/VolumeHistory.cpp
+--- truecrypt-5.1-source.org/Main/VolumeHistory.cpp 2008-02-04 13:14:16.000000000 +0200
++++ truecrypt-5.1-source/Main/VolumeHistory.cpp 2008-03-12 23:39:24.000000000 +0200
+@@ -10,6 +10,9 @@
+ #include "Application.h"
+ #include "GraphicUserInterface.h"
+ #include "Xml.h"
++
++#ifdef ENABLE_wxGUI
++
+ #include "VolumeHistory.h"
+
+ namespace TrueCrypt
+@@ -150,3 +153,5 @@ namespace TrueCrypt
+ Mutex VolumeHistory::AccessMutex;
+
+ }
++
++#endif
+diff -urNp truecrypt-5.1-source.org/Makefile truecrypt-5.1-source/Makefile
+--- truecrypt-5.1-source.org/Makefile 2008-03-12 23:38:33.000000000 +0200
++++ truecrypt-5.1-source/Makefile 2008-03-12 23:39:24.000000000 +0200
+@@ -12,6 +12,7 @@
+ # NOSTRIP: Do not strip release binary
+ # NOTEST: Do not test release binary
+ # VERBOSE: Enable verbose messages
++# NOGUI: Do not build GUI truecrypt
+
+ #------ Targets ------
+ # all
+@@ -31,6 +32,11 @@ TC_BUILD_CONFIG := Debug
+ endif
+ endif
+
++export TC_BUILD_GUI := True
++
++ifeq "$(origin NOGUI)" "command line"
++TC_BUILD_GUI := False
++endif
+
+ #------ Build configuration ------
+
+@@ -147,6 +153,9 @@ endif
+
+ endif
+
++ifeq "$(TC_BUILD_GUI)" "True"
++C_CXX_FLAGS += -DENABLE_wxGUI
++endif
+
+ #------ FreeBSD configuration ------
+
+@@ -203,6 +212,12 @@ CXXFLAGS :=
+ LFLAGS :=
+ endif
+
++ifeq "$(TC_BUILD_GUI)" "True"
++WX_NO_GUI:=
++else
++WX_NO_GUI:=--disable-gui
++endif
++
+ wxbuild:
+
+ ifneq "$(shell test -f $(WX_ROOT)/configure || test -f $(WX_BUILD_DIR)/../configure && echo 1)" "1"
+@@ -212,7 +227,7 @@ endif
+
+ mkdir -p $(WX_BUILD_DIR)
+ @echo Configuring wxWidgets library...
+- cd $(WX_BUILD_DIR) && $(WX_ROOT)/configure $(WX_CONFIGURE_FLAGS) >/dev/null
++ cd $(WX_BUILD_DIR) && $(WX_ROOT)/configure $(WX_NO_GUI) $(WX_CONFIGURE_FLAGS) >/dev/null
+
+ @echo Building wxWidgets library...
+ cd $(WX_BUILD_DIR) && make
diff --git a/app-crypt/truecrypt/truecrypt-5.1.ebuild b/app-crypt/truecrypt/truecrypt-5.1.ebuild
new file mode 100644
index 000000000000..4ef18f542642
--- /dev/null
+++ b/app-crypt/truecrypt/truecrypt-5.1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/truecrypt/truecrypt-5.1.ebuild,v 1.1 2008/03/13 07:01:39 alonbl Exp $
+
+inherit eutils toolchain-funcs multilib wxwidgets
+
+DESCRIPTION="Free open-source disk encryption software"
+HOMEPAGE="http://www.truecrypt.org/"
+SRC_URI="${P}.tar.gz"
+
+LICENSE="truecrypt-collective-1.3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+RESTRICT="fetch"
+
+RDEPEND="sys-fs/fuse
+ =x11-libs/wxGTK-2.8*"
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/${P}-source"
+
+pkg_nofetch() {
+ einfo "Please download tar.gz source from:"
+ einfo "http://www.truecrypt.org/downloads2.php"
+ einfo "Then put the file in ${DISTDIR}/${P}.tar.gz"
+}
+
+pkg_setup() {
+ WX_GTK_VER="2.8"
+ if use X; then
+ need-wxwidgets unicode
+ else
+ need-wxwidgets base-unicode
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${PN}-5.0-build.patch"
+ epatch "${FILESDIR}/${P}-64bit.patch"
+ epatch "${FILESDIR}/${PN}-5.0-bool.patch"
+ epatch "${FILESDIR}/${P}-nogui.patch"
+}
+
+src_compile() {
+ local EXTRA
+ use amd64 && EXTRA="${EXTRA} USE64BIT=1"
+ use X || EXTRA="${EXTRA} NOGUI=1"
+ emake \
+ ${EXTRA} \
+ NOSTRIP=1 \
+ VERBOSE=1 \
+ CC="$(tc-getCC)" \
+ AR="$(tc-getAR)" \
+ CXX="$(tc-getCXX)" \
+ RANLIB="$(tc-getRANLIB)" \
+ EXTRA_CFLAGS="${CFLAGS}" \
+ EXTRA_CXXFLAGS="${CXXFLAGS}" \
+ EXTRA_LDFLAGS="${LDFLAGS}" \
+ WX_CONFIG="${WX_CONFIG}" \
+ WX_CONFIG_EXTRA="" \
+ || die
+}
+
+src_test() {
+ "${S}/Main/truecrypt" --text --test
+}
+
+src_install() {
+ dobin Main/truecrypt
+ dodoc Readme.txt 'Release/Setup Files/TrueCrypt User Guide.pdf'
+ insinto "/$(get_libdir)/rcscripts/addons"
+ newins "${FILESDIR}/${PN}-stop.sh" "${PN}-stop.sh"
+}