# -*- 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 name MyPaint set my_name mypaint 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 port:pkgconfig \ port:scons \ port:swig-python depends_lib port:json-c \ port:lcms2 \ port:libpng \ port:python27 \ port:py27-numpy \ port:py27-protobuf depends_run port:hicolor-icon-theme 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 ${destroot}${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 ${docdir} xinstall -m 644 -W ${worksrcpath} \ COPYING \ LICENSE \ ${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} } } if {${name} eq ${subport}} { conflicts ${name}-devel version 1.1.0 revision 3 master_sites http://download.gna.org/mypaint/ distname ${my_name}-${version} use_xz yes checksums rmd160 a102688793e2392f70bd625d65cd5b4ea763adec \ sha256 58fd90b08fa3142b6dddc2a656c0e406fc3ebcf9086b84e83815780ab7698036 depends_lib-append port:py27-pygtk patchfiles-append patch-${subport}-SConstruct.diff patchfiles-append patch-${subport}-brushlib-SConscript.diff patchfiles-append patch-${subport}-malloc.diff post-destroot { xinstall -m 644 -W ${worksrcpath} \ README \ ${docdir} } post-activate { system "${prefix}/bin/gtk-update-icon-cache -tf ${prefix}/share/icons/hicolor" } livecheck.type regex livecheck.url [lindex ${master_sites} 0] livecheck.regex ${my_name}-(\[0-9.\]+)${extract.suffix} } else { livecheck.type none } subport ${name}-devel { PortGroup github 1.0 github.setup mypaint mypaint 508f6654095b46d2e62a012f374def32b8538cec version 1.2.0-beta.20150712+git.[string range ${git.branch} 0 7] set libmypaint_branch 833e9e6b64fb52306aacdd411c365f77f9b09af0 conflicts ${name} 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 7fe5dc6922e7595616384fad38e2426cde7342d0 \ sha256 c173a68b498081c5ce59211c7c8e836eeae9e51ea26023e52cd94ad3bf4b3485 \ libmypaint-${libmypaint_branch}${extract.suffix} \ rmd160 8bca1a1a3217382cf17697649a32d33b4bb6f4cc \ sha256 3b72a4043b3f3716f209522366b3d6c11e3c25538b4562ba5247a06ba684c693 depends_lib-append port:gtk3 \ port:librsvg \ port:py27-cairo \ port:py27-gobject3 post-extract { delete ${workpath}/mypaint-${git.branch}/brushlib move {*}[glob ${workpath}/mypaint-libmypaint-*] ${workpath}/mypaint-${git.branch}/brushlib } post-destroot { xinstall -m 644 -W ${worksrcpath} \ README.md \ ${docdir} } post-activate { system "${prefix}/bin/gtk-update-icon-cache-3.0 -tf ${prefix}/share/icons/hicolor" } }