Ticket #11762: Portfile

File Portfile, 2.8 KB (added by afb@…, 17 years ago)

dports/devel/codeblocks/Portfile

Line 
1# $Id$
2
3PortSystem 1.0
4name                    codeblocks
5version                 1.0
6revision                0
7categories              devel aqua x11
8#license                gpl
9maintainers             afb@users.sourceforge.net
10description             Open Source, Cross-platform, Free C++ IDE
11long_description        Code::Blocks is a free C++ IDE built specifically \
12                        to meet the most demanding needs of its users. \
13                        It was designed, right from the start, to be \
14                        extensible and configurable.
15homepage                http://codeblocks.org/
16
17fetch.type      svn
18svn.url         svn://svn.berlios.de/codeblocks/trunk
19#svn.tag        3823
20worksrcdir      trunk
21
22variant macosx {
23  depends_lib-append port:wxWidgets26
24}
25variant puredarwin {
26  depends_lib-append port:wxgtk26
27}
28
29# autoconf >= 2.50, automake >= 1.9, libtool >= 1.4
30depends_build   path:${prefix}/bin/autoconf:autoconf \
31                path:${prefix}/bin/aclocal:automake \
32                path:${prefix}/bin/glibtool:libtool
33
34configure.cmd   ./bootstrap && ./configure
35configure.env   CXXFLAGS="-I${prefix}/include" \
36                LDFLAGS="-L${prefix}/lib" \
37                ACLOCAL_FLAGS="-I ${prefix}/share/aclocal"
38configure.args  --enable-contrib
39
40post-destroot {
41        system "strip -S ${destroot}${prefix}/bin/codeblocks"
42        system "strip -S ${destroot}${prefix}/lib/libcodeblocks.*"
43        system "strip -S ${destroot}${prefix}/share/codeblocks/plugins/*.so"
44}
45variant macosx {
46post-destroot {
47        xinstall -d -m 0755 ${destroot}/Applications/MacPorts
48        set appPath ${destroot}/Applications/MacPorts/CodeBlocks.app/Contents
49
50        xinstall -d -m 0755 ${appPath}
51        file copy -force ${worksrcpath}/codeblocks.plist \
52                  ${appPath}/Info.plist
53        xinstall -d -m 0755 ${appPath}/Resources
54        file copy -force ${worksrcpath}/src/src/resources/icons/app.icns \
55                  ${appPath}/Resources
56        file copy -force ${worksrcpath}/src/src/resources/icons/cbp.icns \
57                  ${appPath}/Resources
58        file copy -force ${worksrcpath}/src/src/resources/icons/csd.icns \
59                  ${appPath}/Resources
60        file copy -force ${worksrcpath}/src/src/resources/icons/c.icns \
61                  ${appPath}/Resources
62        file copy -force ${worksrcpath}/src/src/resources/icons/cg.icns \
63                  ${appPath}/Resources
64        file copy -force ${worksrcpath}/src/src/resources/icons/cpp.icns \
65                  ${appPath}/Resources
66        file copy -force ${worksrcpath}/src/src/resources/icons/d.icns \
67                  ${appPath}/Resources
68        file copy -force ${worksrcpath}/src/src/resources/icons/f.icns \
69                  ${appPath}/Resources
70        file copy -force ${worksrcpath}/src/src/resources/icons/h.icns \
71                  ${appPath}/Resources
72        file copy -force ${worksrcpath}/src/src/resources/icons/rc.icns \
73                  ${appPath}/Resources
74        xinstall -d -m 0755 ${appPath}/MacOS
75        system "ln -sf ${prefix}/bin/codeblocks ${appPath}/MacOS/CodeBlocks"
76        xinstall -d -m 0755 ${appPath}/Resources/share/codeblocks
77        system "cd ${destroot}${prefix}; for f in share/codeblocks/*; do \
78        ln -sf ${prefix}/\$f ${appPath}/Resources/\$f; done"
79}
80}