lol
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #28982 from ryantm/truecrypt

truecrypt: fix build with gcc6 patch

authored by

Jörg Thalheim and committed by
GitHub
bafc53c7 c3a0c3c9

+81 -19
-15
pkgs/applications/misc/truecrypt/builder.sh
··· 1 - source $stdenv/setup 2 - 3 - tar xvfz $src 4 - cd truecrypt-* 5 - 6 - cp $pkcs11h pkcs11.h 7 - cp $pkcs11th pkcs11t.h 8 - cp $pkcs11fh pkcs11f.h 9 - 10 - make PKCS11_INC="`pwd`" 11 - 12 - mkdir -p $out/bin 13 - cp Main/truecrypt $out/bin 14 - mkdir -p $out/share/$name 15 - cp License.txt $out/share/$name/LICENSE
+20 -4
pkgs/applications/misc/truecrypt/default.nix
··· 46 46 47 47 stdenv.mkDerivation { 48 48 name = "truecrypt-7.1a"; 49 - builder = ./builder.sh; 49 + 50 + patchPhase = "patch -p0 < ${./gcc6.patch}"; 51 + 52 + preBuild = '' 53 + cp $pkcs11h pkcs11.h 54 + cp $pkcs11th pkcs11t.h 55 + cp $pkcs11fh pkcs11f.h 56 + ''; 57 + 58 + makeFlags = [ 59 + ''PKCS11_INC="`pwd`"'' 60 + (if wxGUI then "" else "NOGUI=1") 61 + ]; 62 + 63 + installPhase = '' 64 + install -D -t $out/bin Main/truecrypt 65 + install -D License.txt $out/share/$name/LICENSE 66 + ''; 50 67 51 68 src = fetchurl { 52 69 url = https://fossies.org/linux/misc/old/TrueCrypt-7.1a-Source.tar.gz; ··· 68 85 sha256 = "5ae6a4f32ca737e02def3bf314c9842fb89be82bf00b6f4022a97d8d565522b8"; 69 86 }; 70 87 71 - buildInputs = [ pkgconfig fuse devicemapper wxGTK nasm ]; 72 - makeFlags = if wxGUI then "" else "NOGUI=1"; 88 + buildInputs = [ pkgconfig fuse devicemapper wxGTK nasm ]; 73 89 74 90 meta = { 75 91 description = "Free Open-Source filesystem on-the-fly encryption"; 76 92 homepage = http://www.truecrypt.org/; 77 93 license = "TrueCrypt License Version 2.6"; 78 - maintainers = with stdenv.lib.maintainers; [viric]; 94 + maintainers = with stdenv.lib.maintainers; [ viric ryantm ]; 79 95 platforms = with stdenv.lib.platforms; linux; 80 96 }; 81 97 }
+61
pkgs/applications/misc/truecrypt/gcc6.patch
··· 1 + --- Main/Resources.cpp 2016-05-16 16:47:35.846462041 +0200 2 + +++ Main/Resources.cpp 2016-05-16 17:12:21.838202520 +0200 3 + @@ -45,13 +45,13 @@ 4 + strBuf.CopyFrom (res); 5 + return string (reinterpret_cast <char *> (strBuf.Ptr())); 6 + #else 7 + - static const char LanguageXml[] = 8 + + static byte LanguageXml[] = 9 + { 10 + # include "Common/Language.xml.h" 11 + , 0 12 + }; 13 + 14 + - return string (LanguageXml); 15 + + return string ((const char*) LanguageXml); 16 + #endif 17 + } 18 + 19 + @@ -64,13 +64,13 @@ 20 + strBuf.CopyFrom (res); 21 + return string (reinterpret_cast <char *> (strBuf.Ptr())); 22 + #else 23 + - static const char License[] = 24 + + static byte License[] = 25 + { 26 + # include "License.txt.h" 27 + , 0 28 + }; 29 + 30 + - return string (License); 31 + + return string ((const char*) License); 32 + #endif 33 + } 34 + 35 + --- Main/Forms/PreferencesDialog.cpp 2016-05-16 17:14:47.704707908 +0200 36 + +++ Main/Forms/PreferencesDialog.cpp 2016-05-16 17:15:56.927964437 +0200 37 + @@ -414,11 +414,11 @@ 38 + libExtension = wxDynamicLibrary::CanonicalizeName (L"x"); 39 + 40 + #ifdef TC_MACOSX 41 + - extensions.push_back (make_pair (L"dylib", LangString["DLL_FILES"])); 42 + + extensions.push_back (make_pair (L"dylib", static_cast<const wchar_t*>(LangString["DLL_FILES"].wc_str()))); 43 + #endif 44 + if (!libExtension.empty()) 45 + { 46 + - extensions.push_back (make_pair (libExtension.Mid (libExtension.find (L'.') + 1), LangString["DLL_FILES"])); 47 + + extensions.push_back (make_pair (static_cast<const wchar_t*>(libExtension.Mid (libExtension.find (L'.') + 1).wc_str()), static_cast<const wchar_t*>(LangString["DLL_FILES"].wc_str()))); 48 + extensions.push_back (make_pair (L"*", L"")); 49 + } 50 + 51 + --- Main/GraphicUserInterface.cpp 2016-05-16 17:16:38.724591342 +0200 52 + +++ Main/GraphicUserInterface.cpp 2016-05-16 17:17:09.854562653 +0200 53 + @@ -1445,7 +1445,7 @@ 54 + FilePath GraphicUserInterface::SelectVolumeFile (wxWindow *parent, bool saveMode, const DirectoryPath &directory) const 55 + { 56 + list < pair <wstring, wstring> > extensions; 57 + - extensions.push_back (make_pair (L"tc", LangString["TC_VOLUMES"])); 58 + + extensions.push_back (make_pair (L"tc", static_cast<const wchar_t*>(LangString["TC_VOLUMES"].wc_str()))); 59 + 60 + FilePathList selFiles = Gui->SelectFiles (parent, LangString[saveMode ? "OPEN_NEW_VOLUME" : "OPEN_VOL_TITLE"], saveMode, false, extensions, directory); 61 +