[117510] trunk/dports/devel
Ryan Schmidt
ryandesign at macports.org
Sun Mar 2 14:21:33 PST 2014
On Mar 1, 2014, at 12:47, cal at macports.org wrote:
> Revision
> 117510
> Author
> cal at macports.org
> Date
> 2014-03-01 10:47:56 -0800 (Sat, 01 Mar 2014)
> Log Message
>
> new port: gtk-mac-bundler, see #41905
> Added Paths
>
> • trunk/dports/devel/gtk-mac-bundler/
> • trunk/dports/devel/gtk-mac-bundler/Portfile
> • trunk/dports/devel/gtk-mac-bundler/files/
> • trunk/dports/devel/gtk-mac-bundler/files/patch-bundler_py.diff
> • trunk/dports/devel/gtk-mac-bundler/files/patch-launcher_sh.diff
> Diff
>
> Added: trunk/dports/devel/gtk-mac-bundler/Portfile (0 => 117510)
>
> --- trunk/dports/devel/gtk-mac-bundler/Portfile (rev 0)
> +++ trunk/dports/devel/gtk-mac-bundler/Portfile 2014-03-01 18:47:56 UTC (rev 117510)
>
> @@ -0,0 +1,64 @@
>
> +# -*- 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
> +
> +name gtk-mac-bundler
> +version 0.7.3
> +set branch 0.7
You could avoid hardcoding the branch by using this recipe:
https://trac.macports.org/wiki/PortfileRecipes#branch
> +#---------
> +# FETCHING
> +#---------
These types of comment headers are unusual and unnecessary.
> +master_sites ftp://ftp.gnome.org/pub/GNOME/sources/${name}/${branch}
This should use the gnome fetch group.
> +distfiles ${name}-${version}.tar.xz
This line can be removed because it is the default.
> +build {}
> +
> +#-----------
> +# DEPLOYMENT
> +#-----------
> +pre-destroot {
> + reinplace "s|/usr/bin/env python|${prefix}/bin/python2.7|g" ${worksrcpath}/gtk-mac-bundler.in
> + reinplace "s|@PATH@|${prefix}/Library/Framework/Python.framework/Version/2.7/lib/site-packages|g" ${worksrcpath}/gtk-mac-bundler.in
> + xinstall -m 755 -d ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
> + copy ${worksrcpath}/bundler ${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
> +}
The reinplaces you’re doing in pre-destroot probably belong in post-patch instead, or since you don’t have a build phase you could do them there.
You should use the variable ${frameworks_dir} instead of assuming its value is ${prefix}/Library/Frameworks. Note that you typo’d “Framework” instead of “Frameworks” in the second reinplace so a revbump is warranted to fix that.
More information about the macports-dev
mailing list