-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Portfile
111 lines (89 loc) · 4.01 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2
PortSystem 1.0
PortGroup wxWidgets 1.0
PortGroup boost 1.0
PortGroup app 1.0
PortGroup compiler_blacklist_versions 1.0
name codeblocks-devel
conflicts codeblocks
categories devel aqua x11
license GPL-3+
license_noconflict boost
maintainers nomaintainer
homepage https://www.codeblocks.org/
description Open Source, Cross-platform, Free C/C++/D IDE
long_description {*}${description}. This port tracks the upstream development \
of CodeBlocks.
fetch.type svn
svn.url svn://svn.code.sf.net/p/codeblocks/code/trunk
svn.revision 13428
svn.method checkout
version 20240112-r${svn.revision}
revision 0
worksrcdir trunk
# work around github no longer supporting svn externals
svn.args-append --ignore-externals
if {${os.major} >= 14 || ${os.platform} ne "darwin"} {
depends_fetch-append bin:git:git
} else {
depends_fetch-append port:git
}
post-fetch {
system -W ${worksrcpath}/src/plugins/contrib/ "${svn.cmd} checkout https://svn.code.sf.net/p/fortranproject/code/trunk FortranProject"
system -W ${worksrcpath}/src/plugins/contrib/ "${git.cmd} clone https://github.com/spillz/codeblocks-python PythonPlugins"
}
use_autoconf yes
autoconf.cmd ./bootstrap
depends_build-append port:autoconf \
port:automake \
port:libtool \
port:pkgconfig
boost.depends_type build
# bzip2 is used by the libhelp_plugin
depends_lib-append port:hunspell \
port:bzip2
compiler.cxx_standard 2011
# the build issue this was based on has scrolled off the buildbot logs
compiler.blacklist-append {clang < 801}
# FileManager does not build with Carbon/Cocoa
# and reportedly requires "gamin" to be installed when using wxGTK
configure.args --with-boost=[boost::install_area] \
--with-contrib-plugins=all,-FileManager
# work around a directory layout issue based on MacPorts default non-bundled layout
post-destroot {
ln -s ${prefix}/lib/codeblocks/plugins ${destroot}${prefix}/share/codeblocks/plugins
}
# this will need to be reassessed if we use the full bundle build
app.name CodeBlocks
app.executable codeblocks
app.use_launch_script yes
app.icon src/src/resources/icons/app.icns
app.hide_dock_icon yes
variant wxwidgets32 conflicts wxgtk30 description {Use Cocoa-based wxWidgets 3.2} {
wxWidgets.use wxWidgets-3.2
depends_lib-append port:${wxWidgets.port}
autoconf.env-append ACLOCAL_PATH=${wxWidgets.prefix}/share/aclocal
configure.args-append --with-wxdir=${wxWidgets.wxdir}
}
variant wxgtk30 conflicts wxwidgets32 description {Use wxWidgets 3.0 with GTK} {
wxWidgets.use wxGTK-3.0
depends_lib-append port:${wxWidgets.port}
autoconf.env-append ACLOCAL_PATH=${wxWidgets.prefix}/share/aclocal
configure.args-append --with-wxdir=${wxWidgets.wxdir}
depends_lib-append port:atk \
path:lib/pkgconfig/cairo.pc:cairo \
path:lib/pkgconfig/gdk-pixbuf-2.0.pc:gdk-pixbuf2 \
path:lib/pkgconfig/gtk+-3.0.pc:gtk3 \
path:lib/pkgconfig/glib-2.0.pc:glib2 \
port:harfbuzz \
port:gettext-runtime \
path:lib/pkgconfig/pango.pc:pango
}
if {![variant_isset wxwidgets32] && ![variant_isset wxgtk30]} {
if {${os.platform} eq "darwin" && ${os.major} > 15} {
default_variants +wxwidgets32
} else {
default_variants +wxgtk30
}
}
livecheck.type none