# -*- 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 PortSystem 1.0 name ipe version 7.2.11 revision 3 set branch [join [lrange [split ${version} .] 0 1] .] categories graphics maintainers nomaintainer description The Ipe extensible drawing editor long_description \ Ipe is a drawing editor for creating figures in PDF or \ (encapsulated) Postscript format. It supports making small \ figures for inclusion into LaTeX-documents as well as making \ multi-page PDF presentations that can be shown on-line with \ Acrobat Reader. license GPL-3+ homepage http://ipe.otfried.org platforms macosx master_sites https://dl.bintray.com/otfried/generic/ipe/${branch} distname ${name}-${version}-src worksrcdir ${name}-${version}/src checksums rmd160 eaa2b9fc1a923a78b14e1c1c27f8ffc139febe0e \ sha256 a22dcae9cb660f466678a6b568e9fed1b12a3830e49465594d65fc789b0ba725 \ size 1950071 depends_build-append port:pkgconfig depends_lib-append port:freetype \ path:lib/pkgconfig/cairo.pc:cairo \ port:lua \ port:libpng \ port:zlib use_configure no universal_variant no patch.pre_args -p1 compiler.cxx_standard 2014 # Fix missing cstdlib include # https://github.com/otfried/ipe-issues/issues/240 patchfiles fix-missing-cstdlib.patch variant qt4 conflicts qt5 description {Build using Qt4 based gui} { PortGroup qt4 1.0 build.args-append QT_CFLAGS="`pkg-config --cflags QtGui QtCore`" \ QT_LIBS="`pkg-config --libs QtGui QtCore`" } variant qt5 conflicts qt4 description {Build using Qt5 based gui} { PortGroup qt5 1.0 } variant qvoronoi description {Add qvoronoi ipelet} { depends_lib-append port:qhull build.args-append IPEQVORONOI=1 QHULL_CFLAGS=-I${prefix}/include/libqhull_r destroot.post_args IPEQVORONOI=1 } default_variants +qvoronoi pre-build { build.env CXXFLAGS=[get_canonical_archflags cxx] \ LDFLAGS=[get_canonical_archflags ld] build.args-append IPEPREFIX=${prefix} \ CXX=${configure.cxx} \ LUA_PACKAGE="lua" \ JPEG_LIBS="-framework ApplicationServices" \ IPECONFIGMAK="config.mak" if {[variant_isset qt4] || [variant_isset qt5]} { build.env-append PKG_CONFIG_PATH=\$PKG_CONFIG_PATH:${qt_pkg_config_dir} build.args-append IPEUI="QT" \ MOC=${qt_moc_cmd} } else { build.args-append IPEBUNDLE=1 } } use_parallel_build no destroot.args-append IPEPREFIX=${prefix} \ IPECONFIGMAK="config.mak" if {[variant_isset qt4] || [variant_isset qt5]} { destroot.args-append IPEUI="QT" } else { destroot.args-append IPEBUNDLE=1 destroot.target app use_xcode yes } platform macosx { post-destroot { if {[variant_isset qt4] || [variant_isset qt5]} { set app Ipe xinstall -d ${destroot}${applications_dir}/${app}.app/Contents/MacOS \ ${destroot}${applications_dir}/${app}.app/Contents/Resources xinstall -m 644 ${filespath}/Info.plist.in ${destroot}${applications_dir}/${app}.app/Contents/Info.plist reinplace "s|@VERSION@|${version}|g" ${destroot}${applications_dir}/${app}.app/Contents/Info.plist reinplace "s|@PREFIX@|${prefix}|g" ${destroot}${applications_dir}/${app}.app/Contents/Info.plist ln -s ${prefix}/bin/ipe ${destroot}${applications_dir}/${app}.app/Contents/MacOS/${app} xinstall -m 644 ${worksrcpath}/ipe/ipe.icns ${destroot}${applications_dir}/${app}.app/Contents/Resources/ipe.icns } else { copy ${worksrcpath}/../build/Ipe.app ${destroot}${applications_dir}/Ipe.app reinplace "s|/usr/local/bin|/usr/local/bin:${prefix}/bin|g" ${destroot}${applications_dir}/Ipe.app/Contents/Info.plist xinstall -m 755 ${filespath}/ipe.in ${destroot}${prefix}/bin/ipe reinplace "s|@APPLICATIONSDIR@|${applications_dir}|g" ${destroot}${prefix}/bin/ipe } } } livecheck.type regex livecheck.url ${homepage} livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)-src"