summaryrefslogtreecommitdiff
path: root/textproc/gtk-doc/patches/patch-aa
blob: 3e531ac8d0328f93f9aadc2060157e8519b1cee4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
$NetBSD: patch-aa,v 1.1 2010/01/22 14:21:32 wiz Exp $

From b39bb84dfb5f16c8b2977105bd5876b7b8d58a11 Mon Sep 17 00:00:00 2001
From: Vincent Untz <vuntz@gnome.org>
Date: Tue, 22 Dec 2009 11:54:31 +0000
Subject: fixxref: make it work again without --module argument, Fixes #605211

This restores a compatible behavior with previous versions of gtk-doc,
which is required by many tarballs.

--- gtkdoc-fixxref.in.orig	2009-12-17 19:36:51.000000000 +0000
+++ gtkdoc-fixxref.in
@@ -168,36 +168,38 @@ foreach my $dir (@EXTRA_DIRS) {
     }
 }
 
-open (INPUT, "$MODULE-sections.txt")
-	|| die "Can't open $MODULE-sections.txt: $!";
-my $subsection = "";
-while (<INPUT>) {
-    if (m/^#/) {
-        next;
-
-    } elsif (m/^<SECTION>/) {
-        $subsection = "";
-    } elsif (m/^<SUBSECTION\s*(.*)>/i) {
-        $subsection = $1;
-    } elsif (m/^<SUBSECTION>/) {
-        next;
-    } elsif (m/^<TITLE>(.*)<\/TITLE>/) {
-        next;
-    } elsif (m/^<FILE>(.*)<\/FILE>/) {
-        next;
-    } elsif (m/^<INCLUDE>(.*)<\/INCLUDE>/) {
-        next;
-    } elsif (m/^<\/SECTION>/) {
-        next;
-    } elsif (m/^(\S+)/) {
-        my $symbol=CreateValidSGMLID($1);
-
-        if ($subsection eq "Standard" || $subsection eq "Private") {
-            $NoLinks{$symbol} = 1;
+if (defined($MODULE)) {
+    open (INPUT, "$MODULE-sections.txt")
+            || die "Can't open $MODULE-sections.txt: $!";
+    my $subsection = "";
+    while (<INPUT>) {
+        if (m/^#/) {
+            next;
+
+        } elsif (m/^<SECTION>/) {
+            $subsection = "";
+        } elsif (m/^<SUBSECTION\s*(.*)>/i) {
+            $subsection = $1;
+        } elsif (m/^<SUBSECTION>/) {
+            next;
+        } elsif (m/^<TITLE>(.*)<\/TITLE>/) {
+            next;
+        } elsif (m/^<FILE>(.*)<\/FILE>/) {
+            next;
+        } elsif (m/^<INCLUDE>(.*)<\/INCLUDE>/) {
+            next;
+        } elsif (m/^<\/SECTION>/) {
+            next;
+        } elsif (m/^(\S+)/) {
+            my $symbol=CreateValidSGMLID($1);
+
+            if ($subsection eq "Standard" || $subsection eq "Private") {
+                $NoLinks{$symbol} = 1;
+            }
         }
     }
+    close (INPUT);
 }
-close (INPUT);
 
 &FixCrossReferences ($MODULE_DIR);