gtk-doc/gtk-doc-fixxref-module.patch
OBS User autobuild e5c0586827 Accepting request 27839 from GNOME:Factory
Copy from GNOME:Factory/gtk-doc based on submit request 27839 from user vuntz

OBS-URL: https://build.opensuse.org/request/show/27839
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gtk-doc?expand=0&rev=8
2009-12-29 18:02:06 +00:00

89 lines
2.5 KiB
Diff

From 9205ac8259016e7f07ee2fb608a81a4fad635032 Mon Sep 17 00:00:00 2001
From: Vincent Untz <vuntz@gnome.org>
Date: Tue, 22 Dec 2009 12:54:31 +0100
Subject: [PATCH] gtkdoc-fixxref: make it work again without --module argument
This restores a compatible behavior with previous versions of gtk-doc,
which is required by many tarballs.
https://bugzilla.gnome.org/show_bug.cgi?id=605211
---
gtkdoc-fixxref.in | 58 ++++++++++++++++++++++++++++------------------------
1 files changed, 31 insertions(+), 27 deletions(-)
diff --git a/gtkdoc-fixxref.in b/gtkdoc-fixxref.in
index 8f166ef..cd784d3 100755
--- a/gtkdoc-fixxref.in
+++ b/gtkdoc-fixxref.in
@@ -168,36 +168,40 @@ 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);
+} else {
+ print "WARNING: Please fix your gtk-doc setup to use --module when calling gtkdoc-fixxref.\n"
}
-close (INPUT);
&FixCrossReferences ($MODULE_DIR);
--
1.6.4.2