[122344] trunk/dports/graphics/MyPaint/Portfile

ryandesign at macports.org ryandesign at macports.org
Mon Jul 21 03:23:16 PDT 2014


Revision: 122344
          https://trac.macports.org/changeset/122344
Author:   ryandesign at macports.org
Date:     2014-07-21 03:23:16 -0700 (Mon, 21 Jul 2014)
Log Message:
-----------
MyPaint: add MyPaint-devel subport, which actually builds

Modified Paths:
--------------
    trunk/dports/graphics/MyPaint/Portfile

Modified: trunk/dports/graphics/MyPaint/Portfile
===================================================================
--- trunk/dports/graphics/MyPaint/Portfile	2014-07-21 10:22:31 UTC (rev 122343)
+++ trunk/dports/graphics/MyPaint/Portfile	2014-07-21 10:23:16 UTC (rev 122344)
@@ -6,16 +6,12 @@
 
 name                        MyPaint
 set my_name                 mypaint
-version                     1.1.0
-revision                    3
 homepage                    http://mypaint.info/
 categories                  graphics
 maintainers                 ryandesign
 license                     GPL-2 LGPL
-use_xz                      yes
 platforms                   darwin
 use_parallel_build          yes
-distname                    ${my_name}-${version}
 
 description                 a fast and easy graphics application for digital painters
 
@@ -24,11 +20,6 @@
                             minimum distractions, bringing up the interface only \
                             when you need it.
 
-master_sites                http://download.gna.org/mypaint/
-
-checksums                   rmd160  a102688793e2392f70bd625d65cd5b4ea763adec \
-                            sha256  58fd90b08fa3142b6dddc2a656c0e406fc3ebcf9086b84e83815780ab7698036
-
 depends_build               port:pkgconfig \
                             port:scons \
                             port:swig-python
@@ -36,16 +27,13 @@
 depends_lib                 port:json-c \
                             port:lcms2 \
                             port:libpng \
+                            port:python27 \
                             port:py27-pygtk \
                             port:py27-numpy \
                             port:py27-protobuf
 
 depends_run                 port:hicolor-icon-theme
 
-patchfiles                  patch-SConstruct.diff
-patchfiles-append           patch-brushlib-SConscript.diff
-patchfiles-append           patch-malloc.diff
-
 use_configure               no
 
 variant universal {}
@@ -70,6 +58,13 @@
 # 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
@@ -79,12 +74,10 @@
             system -W ${destroot} "tar -C ${d} -c -f - .${prefix} | tar -x -p -v -f -"
         }
     }
-    set docdir ${destroot}${prefix}/share/doc/${name}
     xinstall -d ${docdir}
     xinstall -m 644 -W ${worksrcpath} \
         COPYING \
         LICENSE \
-        README \
         ${docdir}
 }
 
@@ -104,6 +97,66 @@
     }
 }
 
-livecheck.type              regex
-livecheck.url               [lindex ${master_sites} 0]
-livecheck.regex             ${my_name}-(\[0-9.\]+)\\.tar
+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
+
+    patchfiles-append       patch-SConstruct.diff
+    patchfiles-append       patch-brushlib-SConscript.diff
+    patchfiles-append       patch-malloc.diff
+
+    post-destroot {
+        xinstall -m 644 -W ${worksrcpath} \
+            README \
+            ${docdir}
+    }
+
+    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 fb3de641b7bcf5aeaf78bda4e808591c713bb423
+    version                 1.1.1.alpha.20140720+git.[string range ${git.branch} 0 7]
+    set libmypaint_branch   b945a5c20fbbb5badff1ec7ec05a6a0443d286ad
+    conflicts               ${name}
+
+    master_sites-append     https://github.com/mypaint/libmypaint/tarball/${libmypaint_branch}:libmypaint
+    distfiles-append        libmypaint-${libmypaint_branch}${extract.suffix}:libmypaint
+
+    checksums               mypaint-${git.branch}${extract.suffix} \
+                            rmd160  dbd6073635ca6697cccf66610268417ab167d040 \
+                            sha256  34c2b10bf52976a404ce6177cd081497886742d599c1de65d5ebd29da031bf37 \
+                            libmypaint-${libmypaint_branch}${extract.suffix} \
+                            rmd160  8eef7e7d34bdb276536212e52538b3bd1504d12d \
+                            sha256  f7b449237924aa3486331a64b96199480da6303c28f5de28081d6828dc15946e
+
+    depends_lib-append      port:gtk3 \
+                            port:librsvg \
+                            port:py27-cairo \
+                            port:py27-gobject3
+
+    post-extract {
+        eval move [glob ${workpath}/mypaint-mypaint-*] ${workpath}/mypaint-${git.branch}
+        delete ${workpath}/mypaint-${git.branch}/brushlib
+        eval move [glob ${workpath}/mypaint-libmypaint-*] ${workpath}/mypaint-${git.branch}/brushlib
+    }
+
+    post-destroot {
+        xinstall -m 644 -W ${worksrcpath} \
+            README.md \
+            ${docdir}
+    }
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140721/11532ebd/attachment-0001.html>


More information about the macports-changes mailing list