summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD45
-rw-r--r--fix.diff30
3 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c6766a4f8af2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = gtk-doc-git
+ pkgdesc = Documentation tool for public library API
+ pkgver = 1.32+52+gb209222
+ pkgrel = 1
+ url = https://www.gtk.org/gtk-doc/
+ arch = any
+ license = GPL
+ license = FDL
+ checkdepends = bc
+ checkdepends = gtk3
+ checkdepends = python-six
+ checkdepends = python-parameterized
+ makedepends = dblatex
+ makedepends = git
+ makedepends = yelp-tools
+ makedepends = meson
+ depends = docbook-xsl
+ depends = docbook-xml
+ depends = glib2-docs
+ depends = python-lxml
+ depends = python-pygments
+ depends = python-anytree
+ optdepends = dblatex: PDF support
+ provides = gtk-doc=1.32+52+gb209222
+ conflicts = gtk-doc
+ source = git+https://gitlab.gnome.org/GNOME/gtk-doc.git
+ source = fix.diff
+ sha512sums = SKIP
+ sha512sums = 6d5dd328f784986c1bc46e8bdd800226c5e7eaec2b2b921e0b930435cbe42d73283dd1f87272e1c1cfec9e24e21b7d551f5609d20e4838ba4d3eba1bb1479d43
+
+pkgname = gtk-doc-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b930b43c62f2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+pkgname=gtk-doc-git
+_pkgname=gtk-doc
+pkgver=1.32+52+gb209222
+pkgrel=1
+pkgdesc="Documentation tool for public library API"
+url="https://www.gtk.org/gtk-doc/"
+arch=(any)
+license=(GPL FDL)
+depends=(docbook-xsl docbook-xml glib2-docs python-lxml python-pygments
+ python-anytree)
+makedepends=(dblatex git yelp-tools meson)
+checkdepends=(bc gtk3 python-six python-parameterized)
+optdepends=('dblatex: PDF support')
+provides=(gtk-doc=$pkgver)
+conflicts=(gtk-doc)
+source=("git+https://gitlab.gnome.org/GNOME/gtk-doc.git"
+ fix.diff)
+sha512sums=('SKIP'
+ '6d5dd328f784986c1bc46e8bdd800226c5e7eaec2b2b921e0b930435cbe42d73283dd1f87272e1c1cfec9e24e21b7d551f5609d20e4838ba4d3eba1bb1479d43')
+
+pkgver() {
+ cd $_pkgname
+ git describe --tags | sed -e 's/GTK_DOC_//' -e 's/_/\./g' -e 's/-/+/g'
+}
+
+prepare() {
+ cd $_pkgname
+ patch -Np1 -i ../fix.diff
+}
+
+build() {
+ arch-meson $_pkgname build
+ ninja -C build
+}
+
+check() {
+ # Tests don't work yet
+ meson test -C build --print-errorlogs || :
+}
+
+package() {
+ DESTDIR="$pkgdir" meson install -C build
+ python -m compileall -d /usr/lib "$pkgdir/usr/lib"
+ python -O -m compileall -d /usr/lib "$pkgdir/usr/lib"
+}
diff --git a/fix.diff b/fix.diff
new file mode 100644
index 000000000000..66c81296187a
--- /dev/null
+++ b/fix.diff
@@ -0,0 +1,30 @@
+diff --git i/gtkdoc/highlight.py w/gtkdoc/highlight.py
+index ba1c601..226aa12 100644
+--- i/gtkdoc/highlight.py
++++ w/gtkdoc/highlight.py
+@@ -46,6 +46,9 @@ def highlight_code(code, lang='c'):
+
+
+ def append_style_defs(css_file_name):
+- os.chmod(css_file_name, 0o644)
++ try:
++ os.chmod(css_file_name, 0o644)
++ except OSError:
++ pass
+ with open(css_file_name, 'at', newline='\n', encoding='utf-8') as css:
+ css.write(HTML_FORMATTER.get_style_defs())
+diff --git i/gtkdoc/scan.py w/gtkdoc/scan.py
+index d04d4d4..2103d02 100644
+--- i/gtkdoc/scan.py
++++ w/gtkdoc/scan.py
+@@ -961,8 +961,8 @@ def ScanHeaderContent(input_lines, decl_list, get_types, options):
+ logging.info('struct/union level : %d', level)
+
+ # here we want in_declaration=='', otherwise we have a partial declaration
+- if in_declaration != '':
+- raise RuntimeError('partial declaration (%s) : %s ' % (in_declaration, decl))
++ #if in_declaration != '':
++ # raise RuntimeError('partial declaration (%s) : %s ' % (in_declaration, decl))
+
+ # print remaining forward declarations
+ for symbol in sorted(forward_decls.keys()):