# -*- 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 # $Id$ PortSystem 1.0 PortGroup cxx11 1.0 name ipe version 7.2.2 set branch [join [lrange [split ${version} .] 0 1] .] categories graphics maintainers gmail.com:m7.thon openmaintainer 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 sha1 a0934e9c01487219ae4726ab1cac42cc6fd27e96 \ rmd160 12fdc48bf37a477b5f6dddd2f18cbdafa1dd8ca0 depends_build-append path:bin/pkg-config:pkgconfig depends_lib-append port:freetype \ path:lib/pkgconfig/cairo.pc:cairo \ port:lua \ port:libpng \ port:zlib patchfiles patch-ipe-mainmenu.xib.diff \ patch-ipe-older-osx-versions.diff use_configure no universal_variant no 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/qhull 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 } 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"