tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
codeblocks: fix builds
Weijia Wang
3 years ago
9e24dd01
e6834ffb
+70
-5
2 changed files
expand all
collapse all
unified
split
pkgs
applications
editors
codeblocks
default.nix
fix-clipboard-flush.patch
+46
-5
pkgs/applications/editors/codeblocks/default.nix
···
1
1
-
{ lib, stdenv, fetchurl, pkg-config, file, zip, wxGTK30-gtk3, gtk3
1
1
+
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, file, zip, wxGTK31-gtk3, gtk3
2
2
, contribPlugins ? false, hunspell, gamin, boost, wrapGAppsHook
3
3
}:
4
4
···
15
15
};
16
16
17
17
nativeBuildInputs = [ pkg-config file zip wrapGAppsHook ];
18
18
-
buildInputs = [ wxGTK30-gtk3 gtk3 ]
18
18
+
buildInputs = [ wxGTK31-gtk3 gtk3 ]
19
19
++ optionals contribPlugins [ hunspell gamin boost ];
20
20
enableParallelBuilding = true;
21
21
-
patches = [ ./writable-projects.patch ];
21
21
+
patches = [
22
22
+
./writable-projects.patch
23
23
+
./fix-clipboard-flush.patch
24
24
+
# Fix build on non-x86 machines
25
25
+
(fetchpatch {
26
26
+
name = "remove-int3.patch";
27
27
+
url = "https://github.com/arnholm/codeblocks_sfmirror/commit/d76c015c456561d2c7987935a5f4dc6c0932b0c4.patch";
28
28
+
sha256 = "sha256-dpH33vGf2aNdYTeLwxglYDNbvwoY2bGSG6YFRyoGw+A=";
29
29
+
})
30
30
+
(fetchpatch {
31
31
+
name = "remove-pragmas.patch";
32
32
+
url = "https://github.com/arnholm/codeblocks_sfmirror/commit/966949d5ab7f3cb86e2a2c7ef4e853ee209b5a1a.patch";
33
33
+
sha256 = "sha256-XjejjGOvDk3gl1/n9R69XATGLj5n7tOZNyG8vIlwfyg=";
34
34
+
})
35
35
+
# Fix build with GCC 11
36
36
+
(fetchpatch {
37
37
+
name = "use-gcc11-openfilelist.patch";
38
38
+
url = "https://github.com/arnholm/codeblocks_sfmirror/commit/a5ea6ff7ff301d739d3dc8145db1578f504ee4ca.patch";
39
39
+
sha256 = "sha256-kATaLej8kJf4xm0VicHfRetOepX8O9gOhwdna0qylvQ=";
40
40
+
})
41
41
+
(fetchpatch {
42
42
+
name = "use-gcc11-ccmanager.patch";
43
43
+
url = "https://github.com/arnholm/codeblocks_sfmirror/commit/04b7c50fb8c6a29b2d84579ee448d2498414d855.patch";
44
44
+
sha256 = "sha256-VPy/M6IvNBxUE4hZRbLExFm0DJf4gmertrqrvsXQNz4=";
45
45
+
})
46
46
+
# Fix build with wxGTK 3.1.5
47
47
+
(fetchpatch {
48
48
+
name = "use-wxgtk315.patch";
49
49
+
url = "https://github.com/arnholm/codeblocks_sfmirror/commit/2345b020b862ec855038dd32a51ebb072647f28d.patch";
50
50
+
sha256 = "sha256-RRjwZA37RllnG8cJdBEnASpEd8z0+ru96fjntO42OvU=";
51
51
+
})
52
52
+
(fetchpatch {
53
53
+
name = "fix-getstring.patch";
54
54
+
url = "https://github.com/arnholm/codeblocks_sfmirror/commit/dbdf5c5ea9e3161233f0588a7616b7e4fedc7870.patch";
55
55
+
sha256 = "sha256-DrEMFluN8vs0LERa7ULGshl7HdejpsuvXAMjIr/K1fQ=";
56
56
+
})
57
57
+
];
22
58
preConfigure = "substituteInPlace ./configure --replace /usr/bin/file ${file}/bin/file";
23
59
postConfigure = optionalString stdenv.isLinux "substituteInPlace libtool --replace ldconfig ${stdenv.cc.libc.bin}/bin/ldconfig";
24
24
-
configureFlags = [ "--enable-pch=no" ]
25
25
-
++ optionals contribPlugins [ "--with-contrib-plugins" "--with-boost-libdir=${boost}/lib" ];
60
60
+
configureFlags = [ "--enable-pch=no" ] ++ optionals contribPlugins [
61
61
+
("--with-contrib-plugins" + optionalString stdenv.isDarwin "=all,-FileManager,-NassiShneiderman")
62
62
+
"--with-boost-libdir=${boost}/lib"
63
63
+
];
64
64
+
postInstall = optionalString stdenv.isDarwin ''
65
65
+
ln -s $out/lib/codeblocks/plugins $out/share/codeblocks/plugins
66
66
+
'';
26
67
27
68
meta = {
28
69
maintainers = [ maintainers.linquize ];
+24
pkgs/applications/editors/codeblocks/fix-clipboard-flush.patch
···
1
1
+
diff --git a/src/src/app.cpp b/src/src/app.cpp
2
2
+
index 81130fd..f98d37b 100644
3
3
+
--- a/src/src/app.cpp
4
4
+
+++ b/src/src/app.cpp
5
5
+
@@ -602,7 +602,8 @@ bool CodeBlocksApp::OnInit()
6
6
+
m_BatchWindowAutoClose = true;
7
7
+
m_pSingleInstance = nullptr;
8
8
+
9
9
+
- wxTheClipboard->Flush();
10
10
+
+ if (wxTheClipboard->IsOpened())
11
11
+
+ wxTheClipboard->Flush();
12
12
+
13
13
+
wxCmdLineParser& parser = *Manager::GetCmdLineParser();
14
14
+
parser.SetDesc(cmdLineDesc);
15
15
+
@@ -851,7 +852,8 @@ bool CodeBlocksApp::OnInit()
16
16
+
17
17
+
int CodeBlocksApp::OnExit()
18
18
+
{
19
19
+
- wxTheClipboard->Flush();
20
20
+
+ if (wxTheClipboard->IsOpened())
21
21
+
+ wxTheClipboard->Flush();
22
22
+
23
23
+
if (g_DDEServer) delete g_DDEServer;
24
24
+