source: trunk/dports/aqua/fltk/Portfile

Last change on this file was 154291, checked in by michaelld@…, 13 months ago

fltk-devel: update to 1.3.x-r12052.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 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 154291 2016-10-26 16:30:31Z ryandesign@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    # NOTE: when this release is updated fix the octave port to use it
37    # again on 10.11.
38
39    version         1.3.3
40    master_sites    http://fltk.org/pub/fltk/${version}/
41    worksrcdir      ${name}-${version}
42    distname        ${worksrcdir}-source
43
44    checksums       rmd160 a1736ec7da1ff751153e09bc5b5136d2fa95c18b \
45                    sha256 f8398d98d7221d40e77bc7b19e761adaf2f1ef8bb0c30eceb7beb4f2273d0d97
46
47    livecheck.regex "Stable Release.*?\n.*?VERSION=(\\d+(\\.\\d+)*)'"
48
49} else {
50
51    long_description ${long_description} \
52        This port provides snapshot released of FLTK, updated weekly to monthly.
53
54    conflicts       fltk
55
56    version         1.3.x-r12052
57    checksums       rmd160 1238ec1346cb756a7db530859789973d4a68f9fc \
58                    sha256 5ce6c0d4139f871912b750097262882c2e24e73a499e12ce8280f45dff1ece00
59
60    master_sites    http://fltk.org/pub/fltk/snapshots/
61    distname        fltk-${version}
62    use_bzip2       yes
63
64    livecheck.regex "Snapshots:.*\n.*v(1\\.3\\.x-r\\d+)"
65
66}
67
68depends_lib     port:jpeg \
69                port:libpng \
70                port:zlib
71
72if {${subport} eq "fltk"} {
73    patchfiles-append \
74        patch-src-Makefile.release.diff \
75        patch-fix_LP64.release.diff \
76        patch-fluid-Makefile.release.diff
77
78    # the following patches are already integrated into the devel version
79    patchfiles-append \
80        patch-src-Fl_JPEG_Image.cxx.diff \
81        patch-src_fl_line_style.cxx.diff
82
83} else {
84    patchfiles-append \
85        patch-src-Makefile.devel.diff \
86        patch-fix_LP64.devel.diff \
87        patch-fluid-Makefile.devel.diff
88}
89
90post-patch {
91
92    reinplace "s|/Applications|${applications_dir}/fltk|g" \
93        ${worksrcpath}/fluid/Makefile \
94        ${worksrcpath}/test/Makefile
95
96    # Disable silent rules
97    reinplace "/^\\.SILENT:$/d" ${worksrcpath}/makeinclude.in
98
99    # tell fltk's make script to create config.sub, which is required
100    # before configure will execute properly.  This command actually
101    # runs configure through once, to create the file; we then call
102    # configure manually with the correct arguments, which overwrites
103    # this (and other) files to be what we want.  Make sure CC is set
104    # correctly per "using the right compiler".  While this port will
105    # work correctly without this addition, doing this allows the port
106    # to not error out on dev's systems set up to check whether the
107    # right compiler is being used.
108
109    system -W ${worksrcpath} "CC=${configure.cc} make config.sub"
110
111}
112
113pre-configure {
114    configure.args-append \
115        --with-archflags="[get_canonical_archflags]"
116    configure.cc_archflags
117    configure.cxx_archflags
118    configure.objc_archflags
119    configure.objcxx_archflags
120    configure.ld_archflags
121}
122
123configure.args  --enable-shared \
124                --disable-localjpeg \
125                --disable-localzlib \
126                --disable-localpng
127
128configure.universal_args-delete --disable-dependency-tracking
129
130post-configure {
131    reinplace -E {s|-arch [a-z0-9_]+||g} ${worksrcpath}/fltk-config
132}
133
134destroot.target install install-desktop
Note: See TracBrowser for help on using the repository browser.