# -*- 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 app 1.0 PortGroup github 1.0 name MyPaint if {${name} eq ${subport}} { conflicts ${name}-devel github.setup mypaint mypaint 1.2.0 v revision 1 github.tarball_from releases use_xz yes checksums rmd160 89c0960d1e38f71623225221ef109b1ed0ea217c \ sha256 cdab33dd0c146cf678c97bcdd44e561f97a0aec40421b8c6785a74b33b9728e2 } subport ${name}-devel { conflicts ${name} github.setup mypaint mypaint 1fc6f4ccab6e421ef38004d481ceae95960c9f02 version 1.3.0-alpha.20160514+git.[string range ${git.branch} 0 7] set libmypaint_branch 65ffae19bc152749d30e78593b7f78749b294718 master_sites-append https://github.com/${github.author}/libmypaint/tarball/${libmypaint_branch}:libmypaint distfiles-append libmypaint-${libmypaint_branch}${extract.suffix}:libmypaint checksums mypaint-${git.branch}${extract.suffix} \ rmd160 9e59572660debb783819bbf1f74e041208a5a5f4 \ sha256 085e874d2cbe97473c7de2f82ac09cfa8ad3f4187e491c7a0310fdc30dae7c0c \ libmypaint-${libmypaint_branch}${extract.suffix} \ rmd160 2abaf3bf42fbeddf135fc2a63bf1d7574463b400 \ sha256 964db80901b4a442f43095c84437cc1e0170c8559b9fdbd3387ebe43be1f213a post-extract { delete ${workpath}/mypaint-${git.branch}/brushlib move {*}[glob ${workpath}/mypaint-libmypaint-*] ${workpath}/mypaint-${git.branch}/brushlib } } homepage http://mypaint.info/ categories graphics maintainers ryandesign license GPL-2+ LGPL platforms darwin use_parallel_build yes description a fast and easy graphics application for digital painters long_description ${name} is ${description}. It lets you focus on the art \ instead of the program. You work on your canvas with \ minimum distractions, bringing up the interface only \ when you need it. depends_build-append port:pkgconfig \ port:scons \ port:swig-python depends_lib-append path:lib/pkgconfig/glib-2.0.pc:glib2 \ port:gtk3 \ port:json-c \ port:lcms2 \ port:libpng \ port:librsvg \ port:python27 \ port:py27-cairo \ port:py27-gobject3 \ port:py27-numpy \ port:py27-protobuf \ port:py27-pyobjc-cocoa depends_run-append port:hicolor-icon-theme if {${name} eq ${subport}} { patchfiles-append GLib.filename_to_utf8.patch \ library-and-include-order.patch } use_configure no variant universal {} build.cmd ${prefix}/bin/scons build.target build.args python_binary=${prefix}/bin/python2.7 \ python_config=${prefix}/bin/python2.7-config build.env CC="${configure.cc} [get_canonical_archflags cc]" \ CXX="${configure.cxx} [get_canonical_archflags cxx]" \ PKG_CONFIG_PATH="${frameworks_dir}/Python.framework/Versions/2.7/lib/pkgconfig" destroot.args {*}${build.args} \ prefix=${prefix} destroot.env {*}${build.env} # Setting --install-sandbox to an absolute path to a subdirectory of ${worksrcpath} # is supposed to work, but doesn't; see https://gna.org/bugs/?20399 #destroot.destdir --install-sandbox=${worksrcpath}/destroot destroot.destdir --install-sandbox=pre-destroot # prefix must apparently be a nonexistent directory that MacPorts nevertheless has # permission to create during the build phase; see https://gna.org/bugs/?20399 build.args-append prefix=${workpath}/nonexistent if {[string match *clang* ${configure.compiler}]} { build.args-append enable_openmp=false } else { build.args-append enable_openmp=true } set docdir ${prefix}/share/doc/${name} post-destroot { # Because we must set --install-sandbox to a relative path for now, multiple pre-destroot # directories get created, which must now be combined; see https://gna.org/bugs/?20399 fs-traverse d ${worksrcpath} { if {[file tail ${d}] eq "pre-destroot"} { ui_debug "merging ${d} with destroot" system -W ${destroot} "tar -C ${d} -c -f - .${prefix} | tar -x -p -v -f -" } } xinstall -d ${destroot}${docdir} xinstall -m 644 -W ${worksrcpath} \ CODE_OF_CONDUCT.md \ CONTRIBUTING.md \ COPYING \ DEBUGGING.md \ Licenses.md \ README.md \ ${destroot}${docdir} } app.executable ${workpath}/${name} app.icon pixmaps/mypaint_logo.png platform macosx { post-extract { xinstall -m 755 ${filespath}/${name}.in ${workpath}/${name} } post-patch { reinplace "s|@PREFIX@|${prefix}|g" ${workpath}/${name} } } post-activate { system "${prefix}/bin/gtk-update-icon-cache-3.0 -tf ${prefix}/share/icons/hicolor" }