adding osx application bundler scripts
[pspp] / utilities / osxbundler / macports-custom-packages / gtk-mac-bundler / Portfile
1 # -*- 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
2 # $Id: Portfile 118061 2014-03-20 17:21:11Z ryandesign@macports.org $
3
4 PortSystem          1.0
5 PortGroup           github 1.0
6
7 github.setup        jralls gtk-mac-bundler 0.7.4 bundler-
8 categories          devel
9 license             GPL-2
10 platforms           darwin
11 maintainers         gmail.com:gellule.xg \
12                     openmaintainer
13 supported_archs     noarch
14
15 description         Mac OS X application bundle utility
16 long_description    A utility that aids in the creation of Mac OS X \
17                     application bundles. The gtk3-demo example is \
18                     patched in macports to produce a the gtk3-demo \
19                     without jhbuild environment. To test the demo run \
20                     gtk-mac-bundler <prefix>/share/gtk-mac-bundler/examples/gtk3-demo.bundle \
21                     This will create the GtkDemo bundle in ~/Desktop 
22
23 #-------
24 # CHECKSUM
25 #---------
26 checksums           rmd160  aeff015024a918ffa4e190d14a65e711ab331014 \
27                     sha256  6b67916e48e4e75e677732333060581996ed8759fa9e506a4684db2752d63eb7
28
29 #---------
30 # PATCHING
31 #---------
32 #Note: patch-0.7.4-to-24Feb2016.diff brings 0.7.4 to the commit dated 2016/02/24 - Remove after update
33 patchfiles          patch-0.7.4-to-24Feb2016.diff \
34                     patch-bundler_py.diff \
35                     patch-gtk3-demo-bundle.diff \
36                     patch-gtk3-launcher.diff
37
38 #---------------------------
39 # CONFIGURATION AND BUILDING
40 #---------------------------
41 use_configure       no
42
43 build {}
44
45 #-----------
46 # DEPLOYMENT
47 #-----------
48 pre-destroot {
49     reinplace "s|/usr/bin/env python|${prefix}/bin/python2.7|g" ${worksrcpath}/gtk-mac-bundler.in
50     reinplace "s|@PATH@|${frameworks_dir}/Python.framework/Version/2.7/lib/site-packages|g" ${worksrcpath}/gtk-mac-bundler.in
51     reinplace "s|\${env:JHBUILD_PREFIX}|${prefix}|g" ${worksrcpath}/examples/gtk3-demo.bundle
52     xinstall -m 755 -d ${destroot}${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7
53     copy ${worksrcpath}/bundler ${destroot}${frameworks_dir}/Python.framework/Versions/2.7/lib/python2.7/
54     file mkdir ${destroot}${prefix}/share/${name}
55     copy ${worksrcpath}/examples ${destroot}${prefix}/share/${name}
56 }
57 destroot.args       bindir=${destroot}${prefix}/bin