about summary refs log tree commit diff
path: root/pkgs/development/libraries/glib/setup-hook.sh
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-10-28 11:52:23 +0100
committerVladimír Čunát <vcunat@gmail.com>2015-10-28 11:52:23 +0100
commit55b7d3a181f644586bfc4c6ee5be0dd2a213a733 (patch)
treea41b284b3ad0f7a415b08518eda43e37777bc223 /pkgs/development/libraries/glib/setup-hook.sh
parent30845d07d8110c034156407c71d71e22f92d194a (diff)
glib: fixup output paths and use system pcre
Now pcre costs us <0.5 MB and using internal one would cost ~0.2 MB,
so if we take into account that pcre is often used, e.g. by grep...
Diffstat (limited to 'pkgs/development/libraries/glib/setup-hook.sh')
-rw-r--r--pkgs/development/libraries/glib/setup-hook.sh32
1 files changed, 10 insertions, 22 deletions
diff --git a/pkgs/development/libraries/glib/setup-hook.sh b/pkgs/development/libraries/glib/setup-hook.sh
index 5ead702f00698..c5cf293902cd4 100644
--- a/pkgs/development/libraries/glib/setup-hook.sh
+++ b/pkgs/development/libraries/glib/setup-hook.sh
@@ -1,5 +1,3 @@
-# Install gschemas, if any, in a package-specific directory
-installFlagsArray+=("gsettingsschemadir=$out/share/gsettings-schemas/$name/glib-2.0/schemas/")
 
 make_glib_find_gsettings_schemas() {
     # For packages that need gschemas of other packages (e.g. empathy)
@@ -7,32 +5,22 @@ make_glib_find_gsettings_schemas() {
         addToSearchPath GSETTINGS_SCHEMAS_PATH "$1/share/gsettings-schemas/"*
     fi
 }
-
 envHooks+=(make_glib_find_gsettings_schemas)
 
+# Install gschemas, if any, in a package-specific directory
+glibPreInstallPhase() {
+  installFlagsArray+=("gsettingsschemadir=${!outputLib}/share/gsettings-schemas/$name/glib-2.0/schemas/")
+}
+preInstallPhases+=(glibPreInstallPhase)
+
 glibPreFixupPhase() {
     # Move gschemas in case the install flag didn't help
-    if [ -d "$out/share/glib-2.0/schemas" ]; then
-        mkdir -p "$out/share/gsettings-schemas/$name/glib-2.0"
-        mv "$out/share/glib-2.0/schemas" "$out/share/gsettings-schemas/$name/glib-2.0/"
+    if [ -d "${!outputLib}/share/glib-2.0/schemas" ]; then
+        mkdir -p "${!outputLib}/share/gsettings-schemas/$name/glib-2.0"
+        mv "${!outputLib}/share/glib-2.0/schemas" "${!outputLib}/share/gsettings-schemas/$name/glib-2.0/"
     fi
 
-    addToSearchPath GSETTINGS_SCHEMAS_PATH "$out/share/gsettings-schemas/$name"
+    addToSearchPath GSETTINGS_SCHEMAS_PATH "${!outputLib}/share/gsettings-schemas/$name"
 }
-
 preFixupPhases+=(glibPreFixupPhase)
 
-
-preFixupHooks+=(_multioutGtkDocs)
-
-# Move documentation to the desired outputs.
-_multioutGtkDocs() {
-    if [ "$outputs" = "out" ]; then return; fi;
-    _moveToOutput share/gtk-doc "${!outputDoc}"
-
-    # Remove empty share directory.
-    if [ -d "$out/share" ]; then
-        rmdir "$out/share" 2> /dev/null || true
-    fi
-}
-