r25934 - /packages/experimental/gobject-introspection/debian/dh_girepository

pochu at users.alioth.debian.org pochu at users.alioth.debian.org
Mon Dec 13 23:03:59 UTC 2010


Author: pochu
Date: Mon Dec 13 23:03:58 2010
New Revision: 25934

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=25934
Log:
fix indentation

Modified:
    packages/experimental/gobject-introspection/debian/dh_girepository

Modified: packages/experimental/gobject-introspection/debian/dh_girepository
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/experimental/gobject-introspection/debian/dh_girepository?rev=25934&op=diff
==============================================================================
--- packages/experimental/gobject-introspection/debian/dh_girepository [utf-8] (original)
+++ packages/experimental/gobject-introspection/debian/dh_girepository [utf-8] Mon Dec 13 23:03:58 2010
@@ -241,79 +241,79 @@
     my @c_files = ();
     my @typelib_deps = ();
     foreach my $dir (@typelibdirs) {
-      my $typelibdir = "$tmp$dir";
-      next unless -d $typelibdir;
-      opendir(DIRHANDLE, $typelibdir);
-      while (my $typelib = readdir(DIRHANDLE)) {
-        next unless $typelib =~ /\.typelib$/;
-        next if excludefile ($typelib);
-        my $girfile = find_gir ($typelib);
-        error("Unable to open $girfile") unless open (my $f, "<", $girfile);
-        verbose_print ("$girfile...");
-        my @libraries = ();
-        my @symbols = ();
-        my $infunction = 0;
-        while (<$f>) {
-            # "Parse" the XML file
-            chomp;
-            if (/<repository\s+version="(.*?)"/) {
-                # gir format version
-                $format="$1";
-            } elsif (/<include\s+name="(.*?)"\s+version="(.*?)"\/>/) {
-                # Dependency on another typelib file
-                my $deptypelib="$1-$2.typelib";
-                verbose_print ("  Dependency: $deptypelib");
-                if (! grep { $_ eq $deptypelib } @typelib_deps) {
-                    push @typelib_deps, $deptypelib;
+        my $typelibdir = "$tmp$dir";
+        next unless -d $typelibdir;
+        opendir(DIRHANDLE, $typelibdir);
+        while (my $typelib = readdir(DIRHANDLE)) {
+            next unless $typelib =~ /\.typelib$/;
+            next if excludefile ($typelib);
+            my $girfile = find_gir ($typelib);
+            error("Unable to open $girfile") unless open (my $f, "<", $girfile);
+            verbose_print ("$girfile...");
+            my @libraries = ();
+            my @symbols = ();
+            my $infunction = 0;
+            while (<$f>) {
+                # "Parse" the XML file
+                chomp;
+                if (/<repository\s+version="(.*?)"/) {
+                    # gir format version
+                    $format="$1";
+                } elsif (/<include\s+name="(.*?)"\s+version="(.*?)"\/>/) {
+                    # Dependency on another typelib file
+                    my $deptypelib="$1-$2.typelib";
+                    verbose_print ("  Dependency: $deptypelib");
+                    if (! grep { $_ eq $deptypelib } @typelib_deps) {
+                        push @typelib_deps, $deptypelib;
+                    }
+                } elsif (/shared-library="(.*?)"/) {
+                    # Dependency on a shared library
+                    foreach my $shlibname (split ",", $1) {
+                        if ($shlibname !~ /\.so/) {
+                            $shlibname = "lib$shlibname.so"
+                        }
+                        verbose_print ("  Library: $shlibname");
+                        push @libraries, find_library ($shlibname, $package);
+                    }
+                } elsif (/<(method|constructor|function)\s.*c:identifier="(.*?)"/) {
+                    push @symbols, $2;
+                } elsif (/<(method|constructor|function)/) {
+                    $infunction = 1;
+                } elsif ($infunction and /c:identifier="(.*?)"/) {
+                    push @symbols, $1;
                 }
-            } elsif (/shared-library="(.*?)"/) {
-                # Dependency on a shared library
-                foreach my $shlibname (split ",", $1) {
-                    if ($shlibname !~ /\.so/) {
-                        $shlibname = "lib$shlibname.so"
+                if (/>$/) {
+                    $infunction = 0;
+                }
+            }
+            close $f;
+            error("Unable to determine gir format") unless $format;
+            error("Package name $package doesn't match gir format $format")
+                unless $package =~ /^gir$format/
+                or not $typelibdir =~ /usr\/lib\/girepository/;
+            verbose_print(sprintf("  %d symbols found", $#symbols+1));
+            if (@libraries or @symbols) {
+                my $c_file = "$typelibdir/$typelib.c";
+                my $bin_file = "$typelibdir/$typelib.so";
+                verbose_print ("  writing $c_file");
+                if (!$dh{NO_ACT}){
+                    error("Unable to open $girfile") unless open (F, ">", $c_file);
+                    print F "void gir_dummy_function () {\n";
+                    foreach my $symbol (@symbols) {
+                        print F "$symbol ();\n";
                     }
-                    verbose_print ("  Library: $shlibname");
-                    push @libraries, find_library ($shlibname, $package);
+                    print F "}";
+                    close F;
                 }
-            } elsif (/<(method|constructor|function)\s.*c:identifier="(.*?)"/) {
-                push @symbols, $2;
-            } elsif (/<(method|constructor|function)/) {
-                $infunction = 1;
-            } elsif ($infunction and /c:identifier="(.*?)"/) {
-                push @symbols, $1;
-            }
-            if (/>$/) {
-                $infunction = 0;
-            }
-        }
-        close $f;
-        error("Unable to determine gir format") unless $format;
-        error("Package name $package doesn't match gir format $format")
-            unless $package =~ /^gir$format/
-            or not $typelibdir =~ /usr\/lib\/girepository/;
-        verbose_print(sprintf("  %d symbols found", $#symbols+1));
-        if (@libraries or @symbols) {
-            my $c_file = "$typelibdir/$typelib.c";
-            my $bin_file = "$typelibdir/$typelib.so";
-            verbose_print ("  writing $c_file");
-            if (!$dh{NO_ACT}){
-                error("Unable to open $girfile") unless open (F, ">", $c_file);
-                print F "void gir_dummy_function () {\n";
-                foreach my $symbol (@symbols) {
-                    print F "$symbol ();\n";
-                }
-                print F "}";
-                close F;
-            }
-            push @c_files, $c_file;
-
-            # Build a dummy binary using all referenced symbols and libraries
-            # We use -shared so that gcc doesn’t try to resolve references
-            verbose_print ("  building $bin_file");
-            doit (("gcc", "-shared", "-fPIC", "-o", $bin_file, $c_file, @libraries));
-            push @bin_files, $bin_file;
-        }
-      }
+                push @c_files, $c_file;
+
+                # Build a dummy binary using all referenced symbols and libraries
+                # We use -shared so that gcc doesn’t try to resolve references
+                verbose_print ("  building $bin_file");
+                doit (("gcc", "-shared", "-fPIC", "-o", $bin_file, $c_file, @libraries));
+                push @bin_files, $bin_file;
+            }
+        }
     }
     if (@bin_files) {
         # dpkg-shlibdeps expects this directory to exist
@@ -326,7 +326,7 @@
         doit (("dpkg-shlibdeps", "-pgir", "-Tdebian/${ext}substvars", "-xlibc6", "-xlibc0", @bin_files));
     }
     doit (("rm", "-f", @c_files, @bin_files));
-    
+
     # Generate dependencies on other .typelib files
     foreach my $dep (@typelib_deps) {
         require_typelib ($dep, $package);




More information about the pkg-gnome-commits mailing list