# -*- 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 PortSystem 1.0 PortGroup github 1.0 name fltk categories aqua devel license LGPL platforms macosx maintainers {michaelld @michaelld} openmaintainer description Fast Light Tool Kit homepage https://www.fltk.org/ long_description \ FLTK (pronounced fulltick) \ is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), \ Microsoft Windows, and Mac OS X. \ FLTK provides modern GUI functionality without the bloat \ and supports 3D graphics via OpenGL and \ its built-in GLUT emulation. \ FLTK is designed to be small and modular enough to be \ statically linked, but works fine as a shared library. \ FLTK also includes an excellent UI builder called FLUID \ that can be used to create applications in minutes. subport fltk-devel {} if {${subport} eq ${name}} { conflicts fltk-devel long_description ${long_description} \ This port provides the release of FLTK, typically updated a few times a year. github.setup fltk fltk 1.3.9 release- checksums rmd160 031992413cc1381bee45fae324767d958fc96676 \ sha256 5986cf5849d9c12dc07d7894051524bdaa81f97c175e830fdc66cc8545b1e8df \ size 5405526 revision 0 # Backport of: https://github.com/fltk/fltk/commit/356ccc4b708f67efcd5494d18589e6ff54afb2cf patchfiles-append 0001-Fl_cocoa.mm-fix-Apple-macro-for-PPC-case.patch # overload the github livecheck regex to look for versions that # are just numbers and '.', no letters (e.g., "3.7.3_rc2"). github.livecheck.regex {([0-9.]+)} } else { conflicts fltk long_description ${long_description} \ This port provides the snapshot released of FLTK, typically updated a few times a month. github.setup fltk fltk 3384776f8e4b88da17b8418ddb3c9d752551bb6f version 20230818-[string range ${github.version} 0 7] checksums rmd160 28d3005c5002184bf81b2f73f9ac03e14fba9d3d \ sha256 d033a9e9096b0d93b6b9475d8ed8d0bc6827f02ec057228999ded538f9a994ef \ size 7879806 revision 0 } depends_build port:autoconf depends_lib path:include/turbojpeg.h:libjpeg-turbo \ port:libpng \ port:zlib post-patch { reinplace "s|/Applications|${applications_dir}/fltk|g" \ ${worksrcpath}/fluid/Makefile \ ${worksrcpath}/test/Makefile # Disable silent rules reinplace "/^\\.SILENT:$/d" ${worksrcpath}/makeinclude.in # tell fltk's make script to create config.sub, which is required # before configure will execute properly. This command actually # runs configure through once, to create the file; we then call # configure manually with the correct arguments, which overwrites # this (and other) files to be what we want. Make sure CC is set # correctly per "using the right compiler". While this port will # work correctly without this addition, doing this allows the port # to not error out on dev's systems set up to check whether the # right compiler is being used. system -W ${worksrcpath} "CC=${configure.cc} make config.sub" } pre-configure { configure.args-append \ --with-archflags="[get_canonical_archflags]" configure.cc_archflags configure.cxx_archflags configure.objc_archflags configure.objcxx_archflags configure.ld_archflags } configure.args --enable-shared \ --disable-localjpeg \ --disable-localzlib \ --disable-localpng configure.cppflags-delete -I${prefix}/include configure.ldflags-delete -L${prefix}/lib configure.universal_args-delete --disable-dependency-tracking post-configure { reinplace -E {s|-arch [a-z0-9_]+||g} ${worksrcpath}/fltk-config if {${configure.sdkroot} ne ""} { reinplace -E "s|-\[^ \"\]+[quotemeta ${configure.sdkroot}]||g" ${worksrcpath}/fltk-config } } destroot.target install install-desktop