source: trunk/dports/aqua/fltk/Portfile @ 127818

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

fltk:
+ merge release and devel into a single Portfile;
+ update release to 1.3.3;
+ update devel to r10425.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
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: Portfile 127818 2014-11-04 16:26:03Z michaelld@macports.org $
3
4PortSystem      1.0
5
6name            fltk
7categories      aqua devel
8license         LGPL
9platforms       macosx
10maintainers     michaelld openmaintainer
11description     Fast Light Tool Kit Version 1.3
12
13long_description \
14    FLTK (pronounced fulltick) \
15    is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), \
16    Microsoft Windows, and Mac OS X. \
17    FLTK provides modern GUI functionality without the bloat \
18    and supports 3D graphics via OpenGL and \
19    its built-in GLUT emulation. \
20    FLTK is designed to be small and modular enough to be \
21    statically linked, but works fine as a shared library. \
22    FLTK also includes an excellent UI builder called FLUID \
23    that can be used to create applications in minutes.
24
25homepage        http://www.fltk.org/
26
27livecheck.type  regexm
28livecheck.url   ${homepage}
29
30subport fltk-devel {}
31
32if {${subport} eq ${name}} {
33
34    conflicts       fltk-devel
35
36    version         1.3.3
37    master_sites    http://fltk.org/pub/fltk/${version}/
38    worksrcdir      ${name}-${version}
39    distname        ${worksrcdir}-source
40
41    checksums       rmd160 a1736ec7da1ff751153e09bc5b5136d2fa95c18b \
42                    sha256 f8398d98d7221d40e77bc7b19e761adaf2f1ef8bb0c30eceb7beb4f2273d0d97
43
44    livecheck.regex "Stable Release.*?\n.*?VERSION=(\\d+(\\.\\d+)*)'"
45
46} else {
47
48    long_description ${long_description} \
49        This port provides snapshot released of FLTK, updated weekly to monthly.
50
51    conflicts       fltk
52
53    version         1.3.x-r10425
54    checksums       rmd160 688af6369fa558d6423da416ca6a26deb967af70 \
55                    sha256 34618e1e58edb1c3d5b41da5cac95e8de90a344618aad8848999bd00ff9b5406
56
57    master_sites    http://fltk.org/pub/fltk/snapshots/
58    distname        fltk-${version}
59    use_bzip2       yes
60
61    livecheck.regex "Snapshots:.*\n.*v(1\\.3\\.x-r\\d+)"
62
63}
64
65depends_lib     port:jpeg \
66                port:libpng \
67                port:zlib
68
69patchfiles      patch-fluid-Makefile.diff \
70                patch-src-Makefile.diff \
71                patch-src-Fl_JPEG_Image.cxx.diff
72
73post-patch {
74
75    reinplace "s|/Applications|${applications_dir}/fltk|g" \
76        ${worksrcpath}/fluid/Makefile \
77        ${worksrcpath}/test/Makefile
78
79    # Disable silent rules
80    reinplace "/^\\.SILENT:$/d" ${worksrcpath}/makeinclude.in
81
82    # tell fltk's make script to create config.sub, which is required
83    # before configure will execute properly.  This command actually
84    # runs configure through once, to create the file; we then call
85    # configure manually with the correct arguments, which overwrites
86    # this (and other) files to be what we want.  Make sure CC is set
87    # correctly per "using the right compiler".  While this port will
88    # work correctly without this addition, doing this allows the port
89    # to not error out on dev's systems set up to check whether the
90    # right compiler is being used.
91
92    system -W ${worksrcpath} "CC=${configure.cc} make config.sub"
93
94}
95
96pre-configure {
97    configure.args-append \
98        --with-archflags="[get_canonical_archflags]"
99}
100
101configure.args  --enable-shared \
102                --disable-localjpeg \
103                --disable-localzlib \
104                --disable-localpng
105
106configure.universal_args-delete --disable-dependency-tracking
107
108post-configure {
109    reinplace -E {s|-arch [a-z0-9_]+||g} ${worksrcpath}/fltk-config
110}
111
112destroot.target install install-desktop
Note: See TracBrowser for help on using the repository browser.