[35974] trunk/dports/gnome/dasher/Portfile

jmr at macports.org jmr at macports.org
Fri Apr 11 20:13:18 PDT 2008


Revision: 35974
          http://trac.macosforge.org/projects/macports/changeset/35974
Author:   jmr at macports.org
Date:     2008-04-11 20:13:18 -0700 (Fri, 11 Apr 2008)

Log Message:
-----------
dasher: register gconf schemas and update icon cache as per #14729

Modified Paths:
--------------
    trunk/dports/gnome/dasher/Portfile

Modified: trunk/dports/gnome/dasher/Portfile
===================================================================
--- trunk/dports/gnome/dasher/Portfile	2008-04-12 03:03:00 UTC (rev 35973)
+++ trunk/dports/gnome/dasher/Portfile	2008-04-12 03:13:18 UTC (rev 35974)
@@ -35,6 +35,45 @@
 configure.args  --mandir=${prefix}/share/man \
                 --disable-scrollkeeper
 
-post-activate   {
+set storagedir  ${prefix}/etc/macports/gconf
+set storagefile $storagedir/${name}
+
+post-destroot {
+    # Register schemas with gconf. See http://trac.macosforge.org/projects/macports/ticket/14729
+
+    # Find all .schemas file in the destroot
+    fs-traverse schema ${destroot}${prefix}/etc/gconf/schemas {
+        if { [ file isfile $schema ] } {
+            lappend schemafiles $schema
+        }
+    }
+
+    # And put them in etc/macports/gconf/$name
+    if { [ llength $schemafiles ] > 0 } {
+        file mkdir ${destroot}${storagedir}
+        set fh [open ${destroot}${storagefile} w]
+        foreach file $schemafiles {
+            puts $fh [exec basename $file]
+        }
+        close $fh
+    }
+}
+
+post-activate {
+    if { [file exists ${storagefile} ] } {
+        set fh [open ${storagefile} r]
+        while { ! [eof $fh] } {
+            lappend schemafiles [gets $fh]
+        }
+        close $fh
+    }
+
+    set schemastring [join $schemafiles " "]
+
+    system "cd ${prefix}/etc/gconf/schemas && \
+         GCONF_CONFIG_SOURCE=`${prefix}/bin/gconftool-2 --get-default-source` \
+         ${prefix}/bin/gconftool-2 --makefile-install-rule $schemastring"
+
     system "${prefix}/bin/scrollkeeper-update"
+    system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
 }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080411/1d8abd93/attachment-0001.html


More information about the macports-changes mailing list