source: trunk/dports/graphics/wxWidgets/Portfile @ 90312

Last change on this file since 90312 was 90312, checked in by jwa@…, 5 years ago

modernise checksums, fix 4.3 SDK location

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.4 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 90312 2012-03-01 19:02:55Z jwa@macports.org $
3
4PortSystem 1.0
5PortGroup       archcheck 1.0
6
7name            wxWidgets
8conflicts       wxgtk wxWidgets-python
9epoch           3
10version         2.8.12
11
12categories      graphics devel
13license         LGPL-2+
14platforms       darwin
15maintainers     jwa
16description     mature cross-platform C++ GUI framework
17long_description    wxWidgets is a mature open-source cross-platform C++ \
18    GUI framework for Mac OS, Unix, Linux, Windows. It can \
19    make use of a variety of native widget sets as well as \
20    its own widget set: Mac OS, GTK+, Motif, WIN32. \
21    wxWidgets will even run on embedded systems using \
22    Linux and X11.
23
24homepage        http://www.wxwidgets.org/
25distname        wxWidgets
26master_sites    sourceforge:wxwindows \
27                http://biolpc22.york.ac.uk/pub/${version}/
28
29use_bzip2       yes
30
31distfiles       ${distname}-${version}${extract.suffix}
32dist_subdir     ${distname}/${version}
33
34checksums           rmd160  928e221abe1a00cd2d72d2a4fd3640ba639b9915 \
35                    sha256  3b0ac1d2d017683851841501c8e1b744b97242d684a1668ded61809b0504f707
36
37depends_lib     port:jpeg \
38                port:tiff \
39                port:libpng \
40                port:zlib \
41                port:libiconv \
42                port:expat \
43                path:lib/pkgconfig/sdl.pc:libsdl \
44                port:libsdl_mixer
45
46archcheck.files lib/libjpeg.dylib \
47                lib/libtiff.dylib \
48                lib/libpng.dylib \
49                lib/libz.dylib \
50                lib/libiconv.dylib \
51                lib/libexpat.dylib \
52                lib/libSDL.dylib \
53                lib/libSDL_mixer.dylib
54
55set worksrcdir  ${distname}-${version}/build
56
57extract.only    ${distname}-${version}${extract.suffix}
58
59#patchfiles    patch-chkconf.diff patch-TECConvertText.diff
60patchfiles      patch-chkconf.diff
61patch.dir       ${workpath}/${distname}-${version}
62
63if {${configure.compiler} == "clang"} {
64    configure.compiler llvm-gcc-4.2
65}
66
67#configure.cmd    ../${distname}-${version}/configure
68configure.cmd   ../configure
69configure.ldflags   -L${build.dir}/lib -L${prefix}/lib
70configure.args      --mandir=${prefix}/share/man \
71                    --with-libiconv-prefix=${prefix} \
72                    --with-libjpeg \
73                    --with-libtiff \
74                    --with-libpng \
75                    --with-zlib \
76                    --with-sdl \
77                    --with-opengl \
78                    --with-mac \
79                    --disable-sdltest \
80                    --enable-unicode \
81                    --enable-display
82
83set contrib     "gizmos stc ogl"
84set installtype release
85
86build.target
87
88universal_variant   no
89use_parallel_build  no
90
91supported_archs     i386 ppc
92configure.cppflags-append    -arch ${configure.build_arch}
93
94platform darwin 11 {
95    configure.args-append \
96        --with-macosx-version-min=10.6
97    if {[vercmp $xcodeversion 4.3] >= 0} {
98        configure.args-append \
99            --with-macosx-sdk=${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
100    } else {
101        configure.args-append \
102            --with-macosx-sdk=${developer_dir}/SDKs/MacOSX10.6.sdk
103    }
104}
105
106post-build {
107    foreach c { ${contrib} } {
108        system "cd ${build.dir} && make -C contrib/src/${c}"
109    }
110}
111
112post-destroot {
113    foreach c { ${contrib} } {
114        system "cd ${build.dir} && make -C contrib/src/${c} install ${destroot.destdir}"
115    }
116
117    xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
118    xinstall -m 644 -W ${workpath}/${distname}-${version} \
119    install-mac.txt install-mgl.txt install-motif.txt \
120    INSTALL-OS2.txt install-x11.txt readme-cocoa.txt \
121    readme-gtk.txt readme-mac.txt \
122    readme-mgl.txt readme-motif.txt readme-x11.txt \
123    ${destroot}${prefix}/share/doc/${name}
124    set confscript ${prefix}/lib/wx/config/mac-unicode-${installtype}-2.8
125    reinplace "s|-L${build.dir}/lib||" ${destroot}${confscript}
126    ln -sf ${confscript} ${destroot}${prefix}/bin/wx-config
127}
128
129variant monolithic description {build only one library} {
130    configure.args-append    --enable-monolithic
131}
132
133variant debug description {add debug info to libraries} {
134    configure.args-append    --enable-debug
135    set installtype debug
136}
137
138livecheck.type  regex
139livecheck.url   ${homepage}/downloads/
140livecheck.regex Current Stable Release.*(2\\.\[0-9\]\\.\[0-9\]+)
Note: See TracBrowser for help on using the repository browser.