1 | # -*- coding:utf-8 -*- |
---|
2 | # vim: set ts=2:sts=2: |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name wxWidgets-devel |
---|
7 | version 2.9.0 |
---|
8 | categories graphics devel |
---|
9 | platforms darwin |
---|
10 | maintainers jwa mww |
---|
11 | description mature cross-platform C++ GUI framework |
---|
12 | long_description wxWidgets is a mature open-source cross-platform C++ \ |
---|
13 | GUI framework for Mac OS, Unix, Linux, Windows. It can \ |
---|
14 | make use of a variety of native widget sets as well as \ |
---|
15 | its own widget set: Mac OS, GTK+, Motif, WIN32. \ |
---|
16 | wxWidgets will even run on embedded systems using \ |
---|
17 | Linux and X11. |
---|
18 | |
---|
19 | homepage http://www.wxwidgets.org/ |
---|
20 | distname wxWidgets |
---|
21 | master_sites http://biolpc22.york.ac.uk/pub/CVS_HEAD/v2/files/ \ |
---|
22 | http://biolpc22.york.ac.uk/pub/${version}/ \ |
---|
23 | ftp://ftp.wxwidgets.org/pub/${version} |
---|
24 | use_bzip2 yes |
---|
25 | |
---|
26 | distfiles ${distname}-${version}${extract.suffix} |
---|
27 | dist_subdir ${distname}/${version} |
---|
28 | |
---|
29 | checksums ${distname}-${version}${extract.suffix} \ |
---|
30 | md5 09058928eeb72853142c062bdec056ce \ |
---|
31 | ${distname}-${version}${extract.suffix} \ |
---|
32 | sha1 0e14fa85637d07a93a22d4d6a01871cc0e9e31b7 \ |
---|
33 | ${distname}-${version}${extract.suffix} \ |
---|
34 | rmd160 72d91bfa5fdd2ffafcce50d4440d8fba37ab8872 |
---|
35 | |
---|
36 | depends_lib port:jpeg \ |
---|
37 | port:tiff \ |
---|
38 | port:libpng \ |
---|
39 | port:zlib \ |
---|
40 | port:libiconv \ |
---|
41 | port:expat \ |
---|
42 | port:libsdl \ |
---|
43 | port:libsdl_mixer |
---|
44 | |
---|
45 | set worksrcdir ${distname}-${version}/build |
---|
46 | |
---|
47 | extract.only ${distname}-${version}${extract.suffix} |
---|
48 | |
---|
49 | set sub wx-devel |
---|
50 | configure.cmd ../configure |
---|
51 | configure.ldflags -L${build.dir}/lib -L${prefix}/lib |
---|
52 | configure.args --mandir=${prefix}/share/man \ |
---|
53 | --libdir=${prefix}/lib/${sub} \ |
---|
54 | --bindir=${prefix}/lib/${sub}/bin \ |
---|
55 | --includedir=${prefix}/include/${sub} \ |
---|
56 | --datadir=${prefix}/share/${sub} \ |
---|
57 | --with-libiconv-prefix=${prefix} \ |
---|
58 | --with-libjpeg \ |
---|
59 | --with-libtiff \ |
---|
60 | --with-libpng \ |
---|
61 | --with-zlib \ |
---|
62 | --with-sdl \ |
---|
63 | --with-opengl \ |
---|
64 | --with-mac \ |
---|
65 | --disable-sdltest \ |
---|
66 | --enable-unicode \ |
---|
67 | --enable-display \ |
---|
68 | --enable-monolithic |
---|
69 | |
---|
70 | variant universal description {builds 32/64-bit Cocoa version} { |
---|
71 | configure.args-delete --with-sdl |
---|
72 | configure.args-append --without-sdl |
---|
73 | configure.args-delete --with-mac |
---|
74 | configure.args-append --with-osx_cocoa |
---|
75 | configure.args-append --with-macosx-version-min=10.5 |
---|
76 | |
---|
77 | depends_lib-delete port:libsdl |
---|
78 | depends_lib-delete port:libsdl_mixer |
---|
79 | } |
---|
80 | |
---|
81 | set installtype release |
---|
82 | #set contrib "gizmos stc ogl" |
---|
83 | |
---|
84 | build.target |
---|
85 | |
---|
86 | post-configure { |
---|
87 | if {[variant_isset universal]} { |
---|
88 | system "cd ${worksrcpath} && \ |
---|
89 | patch < ${filespath}/patch_bk_make_pch.diff" |
---|
90 | |
---|
91 | system "cd ${worksrcpath}/../src/osx/cocoa && \ |
---|
92 | patch < ${filespath}/patch_textctrl_mm.diff" |
---|
93 | |
---|
94 | reinplace -E \ |
---|
95 | "s|^(OBJCXXFLAGS =.*)|\\1 ${configure.universal_cflags}|" \ |
---|
96 | ${worksrcpath}/Makefile |
---|
97 | |
---|
98 | reinplace -E \ |
---|
99 | "s|\\$\\{1}/|${prefix}/lib/${sub}/|" \ |
---|
100 | ${worksrcpath}/change-install-names |
---|
101 | |
---|
102 | system "chmod +x ${filespath}/patch_setup_h" |
---|
103 | system "${filespath}/patch_setup_h \ |
---|
104 | ${worksrcpath}/lib/wx/include/osx_cocoa-unicode-${installtype}-2.9/wx/setup.h" |
---|
105 | } |
---|
106 | } |
---|
107 | |
---|
108 | post-build { |
---|
109 | if {[variant_isset universal]} { |
---|
110 | system "${worksrcpath}/change-install-names \ |
---|
111 | ${worksrcpath}/lib ${worksrcpath}/lib" |
---|
112 | } |
---|
113 | } |
---|
114 | |
---|
115 | post-destroot { |
---|
116 | # foreach c { ${contrib} } { |
---|
117 | # system "cd ${destroot.dir} && make -C contrib/src/${c} install ${destroot.destdir}" |
---|
118 | # } |
---|
119 | xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name} |
---|
120 | # xinstall -m 644 -W ${workpath}/${distname}-${version} \ |
---|
121 | # install-mac.txt install-mgl.txt install-motif.txt \ |
---|
122 | # INSTALL-OS2.txt install-x11.txt readme-cocoa.txt \ |
---|
123 | # readme-gtk.txt readme-mac.txt \ |
---|
124 | # readme-mgl.txt readme-motif.txt readme-x11.txt \ |
---|
125 | # ${destroot}${prefix}/share/doc/${name} |
---|
126 | if {[variant_isset universal]} { |
---|
127 | reinplace "s|-L${build.dir}/lib||" \ |
---|
128 | ${destroot}${prefix}/lib/${sub}/wx/config/osx_cocoa-unicode-${installtype}-2.9 |
---|
129 | } else { |
---|
130 | reinplace "s|-L${build.dir}/lib||" \ |
---|
131 | ${destroot}${prefix}/lib/${sub}/wx/config/osx_carbon-unicode-${installtype}-2.9 |
---|
132 | } |
---|
133 | } |
---|
134 | |
---|
135 | variant nonmonolithic description {build libraries separately} { |
---|
136 | configure.args-delete --enable-monolithic |
---|
137 | } |
---|
138 | |
---|
139 | variant debug description {add debug info to libraries} { |
---|
140 | configure.args-append --enable-debug |
---|
141 | set installtype debug |
---|
142 | } |
---|
143 | |
---|
144 | livecheck.type regex |
---|
145 | livecheck.url http://biolpc22.york.ac.uk/pub/ |
---|
146 | livecheck.regex (2.\[0-9\]+.\[0-9\]+-rc\[0-9\])/ |
---|