Title: [116875] releases/WebKitGTK/webkit-1.8/Tools
Revision
116875
Author
[email protected]
Date
2012-05-13 06:40:59 -0700 (Sun, 13 May 2012)

Log Message

Merge 111929 - [GTK] libgcrypt and p11-kit should not be in jhbuild modules
https://bugs.webkit.org/show_bug.cgi?id=82073

Reviewed by Martin Robinson.

* Scripts/webkitdirs.pm:
(jhbuildConfigurationChanged): new function that isolates the
jhbuild configuration change checking from the autogen logic.
(mustReRunAutogen): code for the new function lived here.
(buildAutotoolsProject): now calls jhbuildConfigurationChanged
itself, and cleans up the jhbuild root if configuration has
changed; it also forces autogen to be run in that case, to
make sure the new libraries are used.
* gtk/jhbuild.modules: removed libgcrypt and p11-kit.
* jhbuild/jhbuild-wrapper:
(ensure_jhbuild): this might be run inside a jhbuild environment,
in which case aclocal fails when trying to use the now deleted
aclocal directory in the jhbuild prefix, so work around that.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-1.8/Tools/ChangeLog (116874 => 116875)


--- releases/WebKitGTK/webkit-1.8/Tools/ChangeLog	2012-05-13 13:40:44 UTC (rev 116874)
+++ releases/WebKitGTK/webkit-1.8/Tools/ChangeLog	2012-05-13 13:40:59 UTC (rev 116875)
@@ -1,3 +1,24 @@
+2012-03-23  Gustavo Noronha Silva  <[email protected]>
+
+        [GTK] libgcrypt and p11-kit should not be in jhbuild modules
+        https://bugs.webkit.org/show_bug.cgi?id=82073
+
+        Reviewed by Martin Robinson.
+
+        * Scripts/webkitdirs.pm:
+        (jhbuildConfigurationChanged): new function that isolates the
+        jhbuild configuration change checking from the autogen logic.
+        (mustReRunAutogen): code for the new function lived here.
+        (buildAutotoolsProject): now calls jhbuildConfigurationChanged
+        itself, and cleans up the jhbuild root if configuration has
+        changed; it also forces autogen to be run in that case, to
+        make sure the new libraries are used.
+        * gtk/jhbuild.modules: removed libgcrypt and p11-kit.
+        * jhbuild/jhbuild-wrapper:
+        (ensure_jhbuild): this might be run inside a jhbuild environment,
+        in which case aclocal fails when trying to use the now deleted
+        aclocal directory in the jhbuild prefix, so work around that.
+
 2012-03-22  Carlos Garcia Campos  <[email protected]>
 
         [GTK] Allow to run any jhbuild command with jhbuild-wrapper script

Modified: releases/WebKitGTK/webkit-1.8/Tools/Scripts/webkitdirs.pm (116874 => 116875)


--- releases/WebKitGTK/webkit-1.8/Tools/Scripts/webkitdirs.pm	2012-05-13 13:40:44 UTC (rev 116874)
+++ releases/WebKitGTK/webkit-1.8/Tools/Scripts/webkitdirs.pm	2012-05-13 13:40:59 UTC (rev 116875)
@@ -1829,6 +1829,29 @@
     }
 }
 
+sub jhbuildConfigurationChanged()
+{
+    foreach my $file (qw(jhbuildrc.md5sum jhbuild.modules.md5sum)) {
+        if (! -e $file) {
+            return 1;
+        }
+
+        # Get the md5 sum of the file we're testing.
+        $file =~ m/(.+)\.md5sum/;
+        my $actualFile = join('/', $sourceDir, 'Tools', 'gtk', $1);
+        my $currentSum = getMD5HashForFile($actualFile);
+
+        # Get our previous record.
+        open(PREVIOUS_MD5, $file);
+        chomp(my $previousSum = <PREVIOUS_MD5>);
+        close(PREVIOUS_MD5);
+
+        if ($previousSum ne $currentSum) {
+            return 1;
+        }
+    }
+}
+
 sub mustReRunAutogen($@)
 {
     my ($sourceDir, $filename, @currentArguments) = @_;
@@ -1852,27 +1875,6 @@
         return 1;
     }
 
-    # Now check jhbuild configuration for changes.
-    foreach my $file (qw(jhbuildrc.md5sum jhbuild.modules.md5sum)) {
-        if (! -e $file) {
-            return 1;
-        }
-
-        # Get the md5 sum of the file we're testing.
-        $file =~ m/(.+)\.md5sum/;
-        my $actualFile = join('/', $sourceDir, 'Tools', 'gtk', $1);
-        my $currentSum = getMD5HashForFile($actualFile);
-
-        # Get our previous record.
-        open(PREVIOUS_MD5, $file);
-        chomp(my $previousSum = <PREVIOUS_MD5>);
-        close(PREVIOUS_MD5);
-
-        if ($previousSum ne $currentSum) {
-            return 1;
-        }
-    }
-
     return 0;
 }
 
@@ -1899,11 +1901,6 @@
         return 0;
     }
 
-    # We might need to update jhbuild dependencies.
-    if (checkForArgumentAndRemoveFromArrayRef("--update-gtk", \@buildParams)) {
-        system("perl", "$sourceDir/Tools/Scripts/update-webkitgtk-libs") == 0 or die $!;
-    }
-
     my @buildArgs = ();
     my $makeArgs = $ENV{"WebKitMakeArguments"} || "";
     for my $i (0 .. $#buildParams) {
@@ -1939,6 +1936,34 @@
         push @buildArgs, "--disable-debug";
     }
 
+    # We might need to update jhbuild dependencies.
+    my $needUpdate = 0;
+    if (jhbuildConfigurationChanged()) {
+        # If the configuration changed, dependencies may have been removed.
+        # Since we lack a granular way of uninstalling those we wipe out the
+        # jhbuild root and start from scratch.
+        if (system("rm -rf $baseProductDir/Dependencies/Root") ne 0) {
+            die "Cleaning jhbuild root failed!";
+        }
+
+        if (system("perl $sourceDir/Tools/jhbuild/jhbuild-wrapper --gtk clean") ne 0) {
+            die "Cleaning jhbuild modules failed!";
+        }
+
+        $needUpdate = 1;
+    }
+
+    if (checkForArgumentAndRemoveFromArrayRef("--update-gtk", \@buildArgs)) {
+        $needUpdate = 1;
+    }
+
+    if ($needUpdate) {
+        # Force autogen to run, to catch the possibly updated libraries.
+        system("rm -f previous-autogen-arguments.txt");
+
+        system("perl", "$sourceDir/Tools/Scripts/update-webkitgtk-libs") == 0 or die $!;
+    }
+
     # If GNUmakefile exists, don't run autogen.sh unless its arguments
     # have changed. The makefile should be smart enough to track autotools
     # dependencies and re-run autogen.sh when build files change.

Modified: releases/WebKitGTK/webkit-1.8/Tools/gtk/jhbuild.modules (116874 => 116875)


--- releases/WebKitGTK/webkit-1.8/Tools/gtk/jhbuild.modules	2012-05-13 13:40:44 UTC (rev 116874)
+++ releases/WebKitGTK/webkit-1.8/Tools/gtk/jhbuild.modules	2012-05-13 13:40:59 UTC (rev 116875)
@@ -27,10 +27,6 @@
       href=""
   <repository type="tarball" name="sourceware.org"
       href=""
-  <repository type="tarball" name="gnupg.org"
-      href=""
-  <repository type="tarball" name="p11-glue.freedesktop.org"
-      href=""
   <repository type="tarball" name="ftp.gnome.org"
       href=""
   <repository type="git" name="git.gnome.org"
@@ -85,20 +81,6 @@
             md5sum="647ee8ed266f9a4117c8d0a4855b3d3e"/>
   </tarball>
 
-  <autotools id="libgcrypt" autogen-sh="./autogen.sh; configure">
-    <branch module="/gcrypt/libgcrypt/libgcrypt-1.5.0.tar.bz2" version="1.5.0"
-             repo="gnupg.org"
-             hash="sha256:4b62fc516004940a0571025401a0581d49199f1a76dfb5ce6fd63f50db8173fa"
-             md5sum="693f9c64d50c908bc4d6e01da3ff76d8"/>
-  </autotools>
-
-  <autotools id="p11-kit">
-    <branch module="/releases/p11-kit-0.9.tar.gz" version="0.9"
-             repo="p11-glue.freedesktop.org"
-             hash="sha256:96486f971111f976743be05f2f88b75ced7f14954fad42861b54480c889c66d0"
-             md5sum="029aa2a3a103e7eb81b4aa731b93539e"/>
-  </autotools>
-
   <autotools id="libffi" autogen-sh="configure">
     <branch module="/pub/libffi/libffi-3.0.10.tar.gz" version="3.0.10"
              repo="sourceware.org"
@@ -152,10 +134,6 @@
 
   <autotools id="gnutls"
              autogenargs="--enable-ld-version-script --enable-cxx --without-lzo --with-libgcrypt">
-    <dependencies>
-      <dep package="libgcrypt"/>
-      <dep package="p11-kit"/>
-    </dependencies>
     <branch module="/gnu/gnutls/gnutls-2.12.14.tar.bz2" version="2.12.14"
             repo="gnu.org"
             hash="sha256:5ee72ba6de7a23cf315792561954451e022dac8730149ca95f93c61e95be2ce3"

Modified: releases/WebKitGTK/webkit-1.8/Tools/jhbuild/jhbuild-wrapper (116874 => 116875)


--- releases/WebKitGTK/webkit-1.8/Tools/jhbuild/jhbuild-wrapper	2012-05-13 13:40:44 UTC (rev 116874)
+++ releases/WebKitGTK/webkit-1.8/Tools/jhbuild/jhbuild-wrapper	2012-05-13 13:40:59 UTC (rev 116875)
@@ -129,6 +129,11 @@
         update_jhbuild()
         install_jhbuild()
 
+# Work-around the fact that we may get called from inside the jhbuild environment
+# which will cause problems if we just cleaned the jhbuild install root
+if os.environ.has_key('UNDER_JHBUILD'):
+    del os.environ['ACLOCAL_FLAGS']
+
 try:
     platform = determine_platform()
 except ValueError as e:
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to