Ticket #28573: Portfile

File Portfile, 2.6 KB (added by jarno.rajahalme@…, 14 years ago)

Updated Portfile

Line 
1# -*- Mode: Tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
2# $Id: $
3
4PortSystem      1.0
5
6name            fltk-devel
7conflicts       fltk
8version         1.3.x-r8472
9categories      aqua devel
10platforms       macosx
11maintainers     nomaintainer
12description     Fast Light Tool Kit
13
14long_description \
15    FLTK (pronounced fulltick) \
16    is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), \
17    Microsoft Windows, and Mac OS X. \
18    FLTK provides modern GUI functionality without the bloat \
19    and supports 3D graphics via OpenGL and \
20    its built-in GLUT emulation. \
21    \
22    FLTK is designed to be small and modular enough to be \
23    statically linked, but works fine as a shared library. \
24    FLTK also includes an excellent UI builder called FLUID \
25    that can be used to create applications in minutes.
26
27homepage        http://www.fltk.org/
28master_sites    http://ftp.easysw.com/pub/fltk/snapshots/
29worksrcdir      ${name}-${version}
30distname        fltk-${version}
31use_bzip2       yes
32
33checksums       md5     b27b9d75effbd88505ed22851e9babf3 \
34                sha1    8258df43f9a60ebe1b4560075a0a8fd85b9127ec \
35                rmd160  7b672d5adb99ffef6cedbdbb4a76b12f5313b82c
36
37worksrcdir      ${distname}
38
39use_parallel_build  yes
40
41post-patch {
42    # set .app directory
43    reinplace "s|/Applications|${applications_dir}/fltk|g" \
44        ${worksrcpath}/fluid/Makefile \
45        ${worksrcpath}/test/Makefile
46}
47
48pre-configure {
49    if {[variant_isset universal]} {
50        set archflags ${configure.universal_cflags}
51    } else {
52        set archflags ${configure.cc_archflags}
53    }
54    configure.args-append --with-archflags=\"${archflags}\"
55
56    # arch flags are in ARCHFLAGS due to --with-archflags, remove them from other flags
57    configure.cflags-replace "g/-arch \[^ \]* *//"
58    configure.cppflags-replace "g/-arch \[^ \]* *//"
59    configure.cxxflags-replace "g/-arch \[^ \]* *//"
60    configure.ldflags-replace "g/-arch \[^ \]* *//"
61    configure.universal_cflags-replace "g/-arch \[^ \]* *//"
62    configure.universal_cppflags-replace "g/-arch \[^ \]* *//"
63    configure.universal_cxxflags-replace "g/-arch \[^ \]* *//"
64    configure.universal_ldflags-replace "g/-arch \[^ \]* *//"
65
66    configure.args-append  --enable-shared
67}
68
69destroot.target install \
70                install-desktop
71
72universal_variant   yes
73# Make universal variant the default, so that both 32-bit and 64-bit apps can depend on this
74default_variants    +universal
75
76livecheck.type  regexm
77livecheck.url   ${homepage}
78livecheck.regex "Snapshots:.*VERSION=(1\\.3\\.x-r\\d+)'"