* [gentoo-commits] repo/gentoo:master commit in: dev-util/gtk-doc/, dev-util/gtk-doc/files/
@ 2020-07-19 6:00 Mart Raudsepp
0 siblings, 0 replies; 3+ messages in thread
From: Mart Raudsepp @ 2020-07-19 6:00 UTC (permalink / raw
To: gentoo-commits
commit: 8f16873e62fbb88c28f9071982c1d1ccd9159bda
Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 19 05:51:54 2020 +0000
Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
CommitDate: Sun Jul 19 05:54:53 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f16873e
dev-util/gtk-doc: add patches to fix glib api doc generation
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
.../files/1.32-deprecation-parse-fixes.patch | 180 +++++++++++++++++++++
dev-util/gtk-doc/gtk-doc-1.32-r2.ebuild | 104 ++++++++++++
2 files changed, 284 insertions(+)
diff --git a/dev-util/gtk-doc/files/1.32-deprecation-parse-fixes.patch b/dev-util/gtk-doc/files/1.32-deprecation-parse-fixes.patch
new file mode 100644
index 00000000000..59f878cceac
--- /dev/null
+++ b/dev-util/gtk-doc/files/1.32-deprecation-parse-fixes.patch
@@ -0,0 +1,180 @@
+From 2667d8cd95a2a29c35c1bb8f4629c22fd0aa98e9 Mon Sep 17 00:00:00 2001
+From: Xavier Claessens <xavier.claessens@collabora.com>
+Date: Thu, 2 Jan 2020 21:56:10 -0500
+Subject: [PATCH 1/3] Skip G_GNUC_(BEGIN|END)_IGNORE_DEPRECATIONS lines
+
+For some reason, glib has to put empty line before and after each of
+these lines otherwise the symbol following it is undeclared.
+---
+ gtkdoc/scan.py | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/gtkdoc/scan.py b/gtkdoc/scan.py
+index d04d4d4..7de08ad 100644
+--- a/gtkdoc/scan.py
++++ b/gtkdoc/scan.py
+@@ -561,6 +561,11 @@ def ScanHeaderContent(input_lines, decl_list, get_types, options):
+ logging.info('Found start of comment: %s', line.strip())
+ continue
+
++ # Skip begin/end deprecation macros.
++ m = re.search(r'^\s*G_GNUC_(BEGIN|END)_IGNORE_DEPRECATIONS', line)
++ if m:
++ continue
++
+ logging.info('no decl: %s', line.strip())
+
+ cm = [m.match(line) for m in CLINE_MATCHER]
+--
+2.20.1
+
+
+From 9e58548688c9768cf41c59ccef531d438ffb2504 Mon Sep 17 00:00:00 2001
+From: Xavier Claessens <xavier.claessens@collabora.com>
+Date: Fri, 3 Jan 2020 06:47:47 -0500
+Subject: [PATCH 2/3] typedef can be followed by decorator
+
+---
+ gtkdoc/scan.py | 30 +++++++++++++++++-------------
+ 1 file changed, 17 insertions(+), 13 deletions(-)
+
+diff --git a/gtkdoc/scan.py b/gtkdoc/scan.py
+index 7de08ad..5a5da92 100644
+--- a/gtkdoc/scan.py
++++ b/gtkdoc/scan.py
+@@ -96,19 +96,8 @@ CLINE_MATCHER = [
+ (struct|union)\s*
+ \w*\s*{""", re.VERBOSE),
+ # 12-14: OTHER TYPEDEFS
+- re.compile(
+- r"""^\s*typedef\s+
+- (?:struct|union)\s+\w+[\s\*]+
+- (\w+) # 1: name
+- \s*;""", re.VERBOSE),
+- re.compile(
+- r"""^\s*
+- (?:G_GNUC_EXTENSION\s+)?
+- typedef\s+
+- (.+[\s\*]) # 1: e.g. 'unsigned int'
+- (\w+) # 2: name
+- (?:\s*\[[^\]]+\])*
+- \s*;""", re.VERBOSE),
++ None, # in InitScanner()
++ None, # in InitScanner()
+ re.compile(r'^\s*typedef\s+'),
+ # 15: VARIABLES (extern'ed variables)
+ None, # in InitScanner()
+@@ -267,6 +256,21 @@ def InitScanner(options):
+ %s # 3: optional decorator
+ \s*;""" % optional_decorators_regex, re.VERBOSE)
+ # OTHER TYPEDEFS
++ CLINE_MATCHER[12] = re.compile(
++ r"""^\s*typedef\s+
++ (?:struct|union)\s+\w+[\s\*]+
++ (\w+) # 1: name
++ %s # 2: optional decorator
++ \s*;""" % optional_decorators_regex, re.VERBOSE)
++ CLINE_MATCHER[13] = re.compile(
++ r"""^\s*
++ (?:G_GNUC_EXTENSION\s+)?
++ typedef\s+
++ (.+?[\s\*]) # 1: e.g. 'unsigned int'
++ (\w+) # 2: name
++ (?:\s*\[[^\]]+\])*
++ %s # 3: optional decorator
++ \s*;""" % optional_decorators_regex, re.VERBOSE)
+ CLINE_MATCHER[15] = re.compile(
+ r"""^\s*
+ (?:extern|[A-Za-z_]+VAR%s)\s+
+--
+2.20.1
+
+
+From 5bfe23f0257e1b4c6c9a4e3a2dbb180455f753f2 Mon Sep 17 00:00:00 2001
+From: Jason Crain <jason@inspiresomeone.us>
+Date: Mon, 6 Jan 2020 19:05:42 -0700
+Subject: [PATCH 3/3] scan: support deprecated struct members
+
+gcc allows deprecating members of structs. For example:
+
+struct data {
+ int x G_GNUC_DEPRECATED_FOR(replacement);
+};
+
+However, this currently causes the entire struct to be marked as
+deprecated and confuses mkdb because it doesn't understand the
+G_GNUC_DEPRECATED_FOR symbol.
+
+Fix this by having the whole struct only be marked as deprecated if the
+'_DEPRECATED' is after the closing bracket of the struct, similar to how
+it already does for enums, and having scan automatically remove all
+G_GNUC_* decorators from struct members, similar to how it already does
+for functions.
+---
+ gtkdoc/scan.py | 12 ++++++++++--
+ tests/scan.py | 17 +++++++++++++++++
+ 2 files changed, 27 insertions(+), 2 deletions(-)
+
+diff --git a/gtkdoc/scan.py b/gtkdoc/scan.py
+index 5a5da92..6c6534a 100644
+--- a/gtkdoc/scan.py
++++ b/gtkdoc/scan.py
+@@ -538,7 +538,7 @@ def ScanHeaderContent(input_lines, decl_list, get_types, options):
+ # section (#endif /* XXX_DEPRECATED */
+ if deprecated_conditional_nest == 0 and '_DEPRECATED' in line:
+ m = re.search(r'^\s*#\s*(if*|define|endif)', line)
+- if not (m or in_declaration == 'enum'):
++ if not (m or in_declaration == 'enum' or in_declaration == 'struct'):
+ logging.info('Found deprecation annotation (decl: "%s"): "%s"',
+ in_declaration, line.strip())
+ deprecated_conditional_nest += 0.1
+@@ -953,9 +953,17 @@ def ScanHeaderContent(input_lines, decl_list, get_types, options):
+ title = '<TITLE>%s</TITLE>' % objectname
+
+ logging.info('Store struct: "%s"', symbol)
++ # Structs could contain deprecated members and that doesn't
++ # mean the whole struct is deprecated, so they are ignored when
++ # setting deprecated_conditional_nest above. Here we can check
++ # if the _DEPRECATED is between '}' and ';' which would mean
++ # the struct as a whole is deprecated.
++ if re.search(r'\n\s*\}.*_DEPRECATED.*;\s*$', decl):
++ deprecated = '<DEPRECATED/>\n'
+ if AddSymbolToList(slist, symbol):
+ structsym = in_declaration.upper()
+- stripped_decl = re.sub('(%s)' % optional_decorators_regex, '', decl)
++ regex = r'(?:\s+(?:G_GNUC_\w+(?:\(\w*\))?%s))' % ignore_decorators
++ stripped_decl = re.sub(regex, '', decl)
+ decl_list.append('<%s>\n<NAME>%s</NAME>\n%s%s</%s>\n' %
+ (structsym, symbol, deprecated, stripped_decl, structsym))
+ if symbol in forward_decls:
+diff --git a/tests/scan.py b/tests/scan.py
+index ad63541..6d608b6 100755
+--- a/tests/scan.py
++++ b/tests/scan.py
+@@ -552,6 +552,23 @@ class ScanHeaderContentStructs(ScanHeaderContentTestCase):
+ slist, doc_comments = self.scanHeaderContent([header])
+ self.assertDecl('data', expected, slist)
+
++ def test_HandleDeprecatedMemberDecorator(self):
++ """Struct with deprecated members."""
++ header = textwrap.dedent("""\
++ struct data {
++ int x1 G_GNUC_DEPRECATED;
++ int x2 G_GNUC_DEPRECATED_FOR(replacement);
++ };""")
++ expected = textwrap.dedent("""\
++ struct data {
++ int x1;
++ int x2;
++ };""")
++ scan.InitScanner(self.options)
++ slist, doc_comments = self.scanHeaderContent(
++ header.splitlines(keepends=True))
++ self.assertDecl('data', expected, slist)
++
+
+ class ScanHeaderContentUnions(ScanHeaderContentTestCase):
+ """Test parsing of union declarations."""
+--
+2.20.1
+
diff --git a/dev-util/gtk-doc/gtk-doc-1.32-r2.ebuild b/dev-util/gtk-doc/gtk-doc-1.32-r2.ebuild
new file mode 100644
index 00000000000..ce7456739f6
--- /dev/null
+++ b/dev-util/gtk-doc/gtk-doc-1.32-r2.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python3_{6,7} )
+
+inherit eutils elisp-common gnome2 python-single-r1 readme.gentoo-r1
+
+DESCRIPTION="GTK+ Documentation Generator"
+HOMEPAGE="https://www.gtk.org/gtk-doc/"
+
+LICENSE="GPL-2 FDL-1.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris"
+
+IUSE="debug doc emacs"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ >=dev-libs/glib-2.6:2
+ dev-libs/libxslt
+ >=dev-libs/libxml2-2.3.6:2
+ ~app-text/docbook-xml-dtd-4.3
+ app-text/docbook-xsl-stylesheets
+ ~app-text/docbook-sgml-dtd-3.0
+ >=app-text/docbook-dsssl-stylesheets-1.40
+ emacs? ( >=app-editors/emacs-23.1:* )
+ $(python_gen_cond_dep '
+ dev-python/pygments[${PYTHON_MULTI_USEDEP}]
+ ')
+"
+DEPEND="${RDEPEND}
+ ~dev-util/gtk-doc-am-${PV}
+ dev-util/itstool
+ virtual/pkgconfig
+"
+
+# tests require unpackaged python module "anytree", and require java(fop) or tex(dblatex)
+RESTRICT="test"
+
+pkg_setup() {
+ DOC_CONTENTS="gtk-doc does no longer define global key bindings for Emacs.
+ You may set your own key bindings for \"gtk-doc-insert\" and
+ \"gtk-doc-insert-section\" in your ~/.emacs file."
+ SITEFILE=61${PN}-gentoo.el
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ # Remove global Emacs keybindings, bug #184588
+ eapply "${FILESDIR}"/${PN}-1.8-emacs-keybindings.patch
+ # Fix dev-libs/glib[gtk-doc] doc generation tests by fixing stuff surrounding deprecations
+ # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1488
+ eapply "${FILESDIR}"/${PV}-deprecation-parse-fixes.patch
+
+ gnome2_src_prepare
+}
+
+src_configure() {
+ gnome2_src_configure \
+ --with-xml-catalog="${EPREFIX}"/etc/xml/catalog \
+ $(use_enable debug)
+}
+
+src_compile() {
+ gnome2_src_compile
+ use emacs && elisp-compile tools/gtk-doc.el
+}
+
+src_install() {
+ gnome2_src_install
+
+ python_fix_shebang "${ED}"/usr/bin/gtkdoc-depscan
+
+ # Don't install this file, it's in gtk-doc-am now
+ rm "${ED}"/usr/share/aclocal/gtk-doc.m4 || die "failed to remove gtk-doc.m4"
+
+ if use doc; then
+ docinto doc
+ dodoc doc/*
+ docinto examples
+ dodoc examples/*
+ fi
+
+ if use emacs; then
+ elisp-install ${PN} tools/gtk-doc.el*
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ readme.gentoo_create_doc
+ fi
+}
+
+pkg_postinst() {
+ gnome2_pkg_postinst
+ if use emacs; then
+ elisp-site-regen
+ readme.gentoo_print_elog
+ fi
+}
+
+pkg_postrm() {
+ gnome2_pkg_postrm
+ use emacs && elisp-site-regen
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/gtk-doc/, dev-util/gtk-doc/files/
@ 2023-06-19 16:51 Matt Turner
0 siblings, 0 replies; 3+ messages in thread
From: Matt Turner @ 2023-06-19 16:51 UTC (permalink / raw
To: gentoo-commits
commit: 60beb97135ca31854872747b3ed8256784d94218
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 19 16:45:05 2023 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Jun 19 16:51:24 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60beb971
dev-util/gtk-doc: Add patch to avoid grep-3.8 warnings
Also bump to EAPI=8 and update PYTHON_COMPAT while we're here.
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
...on-t-backslash-escape-regular-characters-.patch | 175 +++++++++++++++++++++
...-doc-1.33.2.ebuild => gtk-doc-1.33.2-r1.ebuild} | 6 +-
2 files changed, 179 insertions(+), 2 deletions(-)
diff --git a/dev-util/gtk-doc/files/gtk-doc-1.33.2-gtkdocize-don-t-backslash-escape-regular-characters-.patch b/dev-util/gtk-doc/files/gtk-doc-1.33.2-gtkdocize-don-t-backslash-escape-regular-characters-.patch
new file mode 100644
index 000000000000..6b51b1398489
--- /dev/null
+++ b/dev-util/gtk-doc/files/gtk-doc-1.33.2-gtkdocize-don-t-backslash-escape-regular-characters-.patch
@@ -0,0 +1,175 @@
+https://gitlab.gnome.org/GNOME/gtk-doc/-/merge_requests/72
+
+From d20e5befb071e79ee0f23a0a7a1b28cb0755caac Mon Sep 17 00:00:00 2001
+From: Thomas Haller <thaller@redhat.com>
+Date: Tue, 18 Apr 2023 12:05:08 +0200
+Subject: [PATCH] gtkdocize: don't backslash escape regular characters in grep
+
+Grep 3.8 warns about wrongly escaped characters:
+
+ $ echo | grep '\,'
+ grep: warning: stray \ before ,
+ $ echo | grep '\ '
+ grep: warning: stray \ before white space
+ $ echo | grep ' \-'
+ grep: warning: stray \ before -
+
+Note that a '\-' as first character is OK, to not interpret the pattern
+as command line argument:
+
+ $ echo | grep '\--Wall'
+
+https://gitlab.gnome.org/GNOME/gtk-doc/-/issues/146
+---
+ buildsystems/autotools/gtk-doc.make | 14 +++++++-------
+ buildsystems/autotools/gtk-doc.no-xslt.make | 10 +++++-----
+ buildsystems/autotools/gtkdocize.in | 6 +++---
+ tests/gtk-doc.make | 4 ++--
+ 4 files changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/buildsystems/autotools/gtk-doc.make b/buildsystems/autotools/gtk-doc.make
+index c673175..fb2e7e2 100644
+--- a/buildsystems/autotools/gtk-doc.make
++++ b/buildsystems/autotools/gtk-doc.make
+@@ -136,7 +136,7 @@ scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB)
+ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES)
+ $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
+ scanobj_options=""; \
+- gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \
++ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\--verbose"; \
+ if test "$$?" = "0"; then \
+ if test "x$(V)" = "x1"; then \
+ scanobj_options="--verbose"; \
+@@ -198,13 +198,13 @@ GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references";
+ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files)
+ $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \
+ mkhtml_options=""; \
+- gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \
++ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\--verbose"; \
+ if test "$$?" = "0"; then \
+ if test "x$(V)" = "x1"; then \
+ mkhtml_options="$$mkhtml_options --verbose"; \
+ fi; \
+ fi; \
+- gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \
++ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\--path"; \
+ if test "$$?" = "0"; then \
+ mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \
+ fi; \
+@@ -227,7 +227,7 @@ GTK_DOC_V_PDF_0=@echo " DOC Building PDF";
+ pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files)
+ $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \
+ mkpdf_options=""; \
+- gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \
++ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\--verbose"; \
+ if test "$$?" = "0"; then \
+ if test "x$(V)" = "x1"; then \
+ mkpdf_options="$$mkpdf_options --verbose"; \
+@@ -236,7 +236,7 @@ pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_cont
+ if test "x$(HTML_IMAGES)" != "x"; then \
+ for img in $(HTML_IMAGES); do \
+ part=`dirname $$img`; \
+- echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \
++ echo $$mkpdf_options | grep >/dev/null "\--imgdir=$$part "; \
+ if test $$? != 0; then \
+ mkpdf_options="$$mkpdf_options --imgdir=$$part"; \
+ fi; \
+@@ -250,10 +250,10 @@ pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_cont
+ clean-local:
+ @rm -f *~ *.bak
+ @rm -rf .libs
+- @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \
++ @if echo $(SCAN_OPTIONS) | grep -q "\--rebuild-types" ; then \
+ rm -f $(DOC_MODULE).types; \
+ fi
+- @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \
++ @if echo $(SCAN_OPTIONS) | grep -q "\--rebuild-sections" ; then \
+ rm -f $(DOC_MODULE)-sections.txt; \
+ fi
+
+diff --git a/buildsystems/autotools/gtk-doc.no-xslt.make b/buildsystems/autotools/gtk-doc.no-xslt.make
+index 1acee5e..5a4b895 100644
+--- a/buildsystems/autotools/gtk-doc.no-xslt.make
++++ b/buildsystems/autotools/gtk-doc.no-xslt.make
+@@ -136,7 +136,7 @@ scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB)
+ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES)
+ $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
+ scanobj_options=""; \
+- gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \
++ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\--verbose"; \
+ if test "$$?" = "0"; then \
+ if test "x$(V)" = "x1"; then \
+ scanobj_options="--verbose"; \
+@@ -215,7 +215,7 @@ GTK_DOC_V_PDF_0=@echo " DOC Building PDF";
+ pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files)
+ $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \
+ mkpdf_options=""; \
+- gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \
++ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\--verbose"; \
+ if test "$$?" = "0"; then \
+ if test "x$(V)" = "x1"; then \
+ mkpdf_options="$$mkpdf_options --verbose"; \
+@@ -224,7 +224,7 @@ pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_cont
+ if test "x$(HTML_IMAGES)" != "x"; then \
+ for img in $(HTML_IMAGES); do \
+ part=`dirname $$img`; \
+- echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \
++ echo $$mkpdf_options | grep >/dev/null "\--imgdir=$$part "; \
+ if test $$? != 0; then \
+ mkpdf_options="$$mkpdf_options --imgdir=$$part"; \
+ fi; \
+@@ -238,10 +238,10 @@ pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_cont
+ clean-local:
+ @rm -f *~ *.bak
+ @rm -rf .libs
+- @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \
++ @if echo $(SCAN_OPTIONS) | grep -q "\--rebuild-types" ; then \
+ rm -f $(DOC_MODULE).types; \
+ fi
+- @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \
++ @if echo $(SCAN_OPTIONS) | grep -q "\--rebuild-sections" ; then \
+ rm -f $(DOC_MODULE)-sections.txt; \
+ fi
+
+diff --git a/buildsystems/autotools/gtkdocize.in b/buildsystems/autotools/gtkdocize.in
+index 83127bf..bf21563 100755
+--- a/buildsystems/autotools/gtkdocize.in
++++ b/buildsystems/autotools/gtkdocize.in
+@@ -57,9 +57,9 @@ if test $no_configure_found -eq 0; then
+ macro=`grep '^GTK_DOC_CHECK' $configure 2>/dev/null`
+ if test $? -eq 0; then
+ # GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
+- params=`echo $macro | sed -e 's/^GTK_DOC_CHECK(\ *\(.*\)).*$/\1/'`
+- if echo $params | grep -q '^.*\,\ *\[\{0,1\}'; then
+- extra_options=`echo $params | sed -e 's/^.*\,\ *\[\{0,1\}\([^]]*\)\]\{0,1\}\ *$/\1/'`
++ params=`echo $macro | sed -e 's/^GTK_DOC_CHECK( *\(.*\)).*$/\1/'`
++ if echo $params | grep -q '^.*, *\[\{0,1\}'; then
++ extra_options=`echo $params | sed -e 's/^.*, *\[\{0,1\}\([^]]*\)\]\{0,1\} *$/\1/'`
+ #echo >&2 "DEBUG: adding extra options [$extra_options] to [$*]"
+ set - $* $GTKDOCIZE_FLAGS $extra_options
+ else
+diff --git a/tests/gtk-doc.make b/tests/gtk-doc.make
+index 9235874..60d9853 100644
+--- a/tests/gtk-doc.make
++++ b/tests/gtk-doc.make
+@@ -196,7 +196,7 @@ pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+ if test "x$(HTML_IMAGES)" != "x"; then \
+ for img in $(HTML_IMAGES); do \
+ part=`dirname $$img`; \
+- echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \
++ echo $$mkpdf_options | grep >/dev/null "\--imgdir=$$part "; \
+ if test $$? != 0; then \
+ mkpdf_options="$$mkpdf_options --imgdir=$$part"; \
+ fi; \
+@@ -213,7 +213,7 @@ pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+ clean-local:
+ @rm -f *~ *.bak ts gtkdoc-*.log
+ @rm -rf .libs
+- @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \
++ @if echo $(SCAN_OPTIONS) | grep -q "\--rebuild-types" ; then \
+ rm -f $(DOC_MODULE).types; \
+ fi
+ $(MAKE) distclean-local
+--
+2.39.3
+
diff --git a/dev-util/gtk-doc/gtk-doc-1.33.2.ebuild b/dev-util/gtk-doc/gtk-doc-1.33.2-r1.ebuild
similarity index 95%
rename from dev-util/gtk-doc/gtk-doc-1.33.2.ebuild
rename to dev-util/gtk-doc/gtk-doc-1.33.2-r1.ebuild
index 6025905e457c..65209fd0d2a4 100644
--- a/dev-util/gtk-doc/gtk-doc-1.33.2.ebuild
+++ b/dev-util/gtk-doc/gtk-doc-1.33.2-r1.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
-PYTHON_COMPAT=( python3_{9..11} )
+EAPI=8
+PYTHON_COMPAT=( python3_{10..12} )
inherit elisp-common gnome.org meson python-single-r1 readme.gentoo-r1
@@ -47,6 +47,8 @@ BDEPEND="
PATCHES=(
# Remove global Emacs keybindings, bug #184588
"${FILESDIR}"/${PN}-1.8-emacs-keybindings.patch
+
+ "${FILESDIR}"/${P}-gtkdocize-don-t-backslash-escape-regular-characters-.patch
)
pkg_setup() {
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/gtk-doc/, dev-util/gtk-doc/files/
@ 2025-01-15 18:13 Pacho Ramos
0 siblings, 0 replies; 3+ messages in thread
From: Pacho Ramos @ 2025-01-15 18:13 UTC (permalink / raw
To: gentoo-commits
commit: 0bc0d3e6710662c10f85720b70233e88ae2415f8
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 15 18:06:10 2025 +0000
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Wed Jan 15 18:13:20 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bc0d3e6
dev-util/gtk-doc: add 1.34.0
Closes: https://github.com/gentoo/gentoo/pull/38077
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
Closes: https://bugs.gentoo.org/914917
dev-util/gtk-doc/Manifest | 1 +
.../gtk-doc/files/gtk-doc-1.34.0-mkhtml-test.patch | 33 ++++++
dev-util/gtk-doc/gtk-doc-1.34.0.ebuild | 113 +++++++++++++++++++++
3 files changed, 147 insertions(+)
diff --git a/dev-util/gtk-doc/Manifest b/dev-util/gtk-doc/Manifest
index a2c2e5e9f33e..0bd282af0262 100644
--- a/dev-util/gtk-doc/Manifest
+++ b/dev-util/gtk-doc/Manifest
@@ -1 +1,2 @@
DIST gtk-doc-1.33.2.tar.xz 507852 BLAKE2B dea3030060ecec89433fe3783dfacc2f58373780c49560a48ab1a32bedfe888692183de8396c92414255e4c8f537358cbc373fd307638ab8e7dbfd9ae44de58f SHA512 f50f68ab6b4bc59f55e84b49c1481f05700171cbf79eca9ba8f3a142a30a4ba88fe096983ebb8d117a9ef8bcea40934674096683d956f5c54cae457d31f651ab
+DIST gtk-doc-1.34.0.tar.xz 494116 BLAKE2B cb8550debed9f32b967de9d4ebdde8dbe83551eb8527221d2d788355431f34e62a4beedda3e7f5722516ae8e23794a56b97a4f761ede0f7f2c0ef288624b5f7a SHA512 d962fe31949b5f7c70122c7ebbd98f4d21725697804bf5dd75fd7a6662753a91c9350fd1e8bed22a58a957b173f35e200fcbb4c7c2ebc45ccbc0db2e916b27ea
diff --git a/dev-util/gtk-doc/files/gtk-doc-1.34.0-mkhtml-test.patch b/dev-util/gtk-doc/files/gtk-doc-1.34.0-mkhtml-test.patch
new file mode 100644
index 000000000000..982b5bd11f7a
--- /dev/null
+++ b/dev-util/gtk-doc/files/gtk-doc-1.34.0-mkhtml-test.patch
@@ -0,0 +1,33 @@
+From 951743698610eaaa0cc9030f7d7d02437419ac24 Mon Sep 17 00:00:00 2001
+From: Neil Hanlon <neil@shrug.pw>
+Date: Fri, 9 Feb 2024 15:32:38 -0500
+Subject: [PATCH] Add gobject example source code to path for mkhtml test
+
+Fixes #150
+
+I'm not really sure why this is required, but I suspect it has to do
+with changes in how GCC handles path traversal due to recent (ish)
+security issues, as the code here is evaluated to
+`../xml/../../examples/gobject.c` which probably looks unhealthy to
+automatically include.
+
+Signed-off-by: Neil Hanlon <neil@shrug.pw>
+---
+ tests/gobject/docs/meson.build | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/gobject/docs/meson.build b/tests/gobject/docs/meson.build
+index a1dd66c..236a1cc 100644
+--- a/tests/gobject/docs/meson.build
++++ b/tests/gobject/docs/meson.build
+@@ -119,6 +119,7 @@ test(
+ '--path=@0@'.format(':'.join([
+ gobject_test_docs_dir,
+ srcdir,
++ join_paths(srcdir, 'tests/gobject/examples'),
+ ])
+ ),
+ ],
+--
+GitLab
+
diff --git a/dev-util/gtk-doc/gtk-doc-1.34.0.ebuild b/dev-util/gtk-doc/gtk-doc-1.34.0.ebuild
new file mode 100644
index 000000000000..49e15e21f1e3
--- /dev/null
+++ b/dev-util/gtk-doc/gtk-doc-1.34.0.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit elisp-common gnome.org meson python-single-r1 readme.gentoo-r1
+
+DESCRIPTION="GTK+ Documentation Generator"
+HOMEPAGE="https://gitlab.gnome.org/GNOME/gtk-doc"
+
+LICENSE="GPL-2+ FDL-1.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-solaris"
+
+IUSE="emacs test"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ >=dev-libs/glib-2.38:2
+ dev-libs/libxslt
+ >=dev-libs/libxml2-2.3.6:2
+ ~app-text/docbook-xml-dtd-4.3
+ app-text/docbook-xsl-stylesheets
+ ~app-text/docbook-sgml-dtd-3.0
+ >=app-text/docbook-dsssl-stylesheets-1.40
+ emacs? ( >=app-editors/emacs-23.1:* )
+ $(python_gen_cond_dep '
+ dev-python/pygments[${PYTHON_USEDEP}]
+ ')
+"
+DEPEND="${RDEPEND}
+ test? (
+ $(python_gen_cond_dep '
+ dev-python/parameterized[${PYTHON_USEDEP}]
+ ')
+ )
+"
+BDEPEND="
+ ~dev-build/gtk-doc-am-${PV}
+ dev-util/itstool
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ # Remove global Emacs keybindings, bug #184588
+ "${FILESDIR}"/${PN}-1.8-emacs-keybindings.patch
+
+ # https://gitlab.gnome.org/GNOME/gtk-doc/-/issues/150
+ "${FILESDIR}"/${PN}-1.34.0-mkhtml-test.patch
+)
+
+pkg_setup() {
+ DOC_CONTENTS="gtk-doc does no longer define global key bindings for Emacs.
+ You may set your own key bindings for \"gtk-doc-insert\" and
+ \"gtk-doc-insert-section\" in your ~/.emacs file."
+ SITEFILE=61${PN}-gentoo.el
+ python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # Requires the unpackaged Python "anytree" module
+ sed -i -e '/mkhtml2/d' "${S}"/tests/meson.build || die
+}
+
+src_configure() {
+ local emesonargs=(
+ -Dautotools_support=true
+ -Dcmake_support=true
+ -Dyelp_manual=true
+ $(meson_use test tests)
+ )
+ meson_src_configure
+}
+
+src_compile() {
+ meson_src_compile
+ use emacs && elisp-compile tools/gtk-doc.el
+}
+
+src_install() {
+ meson_src_install
+
+ # The meson build system configures the shebangs to the temporary python
+ # used during the build. We need to fix it.
+ sed -i -e 's:^#!.*python3:#!/usr/bin/env python3:' "${ED}"/usr/bin/* || die
+ python_fix_shebang "${ED}"/usr/bin
+
+ # Don't install this file, it's in gtk-doc-am now
+ rm "${ED}"/usr/share/aclocal/gtk-doc.m4 || die "failed to remove gtk-doc.m4"
+ rmdir "${ED}"/usr/share/aclocal || die
+
+ if use emacs; then
+ elisp-install ${PN} tools/gtk-doc.el*
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ readme.gentoo_create_doc
+ fi
+}
+
+pkg_postinst() {
+ if use emacs; then
+ elisp-site-regen
+ readme.gentoo_print_elog
+ fi
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-15 18:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-19 16:51 [gentoo-commits] repo/gentoo:master commit in: dev-util/gtk-doc/, dev-util/gtk-doc/files/ Matt Turner
-- strict thread matches above, loose matches on Subject: below --
2025-01-15 18:13 Pacho Ramos
2020-07-19 6:00 Mart Raudsepp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox