diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
commit | 3cf7c3ef441822c889356fd1812ebf2944a59851 (patch) | |
tree | c513fe68548b40365c1c2ebfe35c58ad431cdd77 /dev-util/gtk-doc | |
parent | 05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff) |
gentoo resync : 25.08.2020
Diffstat (limited to 'dev-util/gtk-doc')
-rw-r--r-- | dev-util/gtk-doc/Manifest | 8 | ||||
-rw-r--r-- | dev-util/gtk-doc/files/1.32-deprecation-parse-fixes.patch | 180 | ||||
-rw-r--r-- | dev-util/gtk-doc/gtk-doc-1.32-r1.ebuild | 2 | ||||
-rw-r--r-- | dev-util/gtk-doc/gtk-doc-1.32-r2.ebuild (renamed from dev-util/gtk-doc/gtk-doc-1.25-r1.ebuild) | 43 | ||||
-rw-r--r-- | dev-util/gtk-doc/metadata.xml | 5 |
5 files changed, 199 insertions, 39 deletions
diff --git a/dev-util/gtk-doc/Manifest b/dev-util/gtk-doc/Manifest index a22ceca77664..71aaaa04433f 100644 --- a/dev-util/gtk-doc/Manifest +++ b/dev-util/gtk-doc/Manifest @@ -1,7 +1,7 @@ +AUX 1.32-deprecation-parse-fixes.patch 7181 BLAKE2B e7415a1d8f9aad544581c8fc5d5b2e5c50dc3cb7830bee1c2ec6777006841488fa8b0c56b5b1fd92dad811ddb9a5b207a29d677114b0ba4e381a4b05c4a26dc8 SHA512 4c68a0d355e9fbbc6f36b5877da3f510e6b5fe184488117b7545a5b30a3b3730d05aa191fa414f341235d4e6199fb220d3b95169b5e8c7d495cdbc8d469f07c5 AUX 61gtk-doc-gentoo.el 283 BLAKE2B 116d2b43d42b05130482c5bff7a10f13930a0d04f34874d25bfa6c61dc8920efe60ae615e6d54de1eeed87044a7232a992a37582d608b0756f0b099b5ee62d03 SHA512 d9e7c8bacd97a5147dbbe9ad568323356c9c38ad982ce88c63ef5f8e3955289274393a91e07d2159c082ac2a058455a1905c251ff3676f60bad596379fb12837 AUX gtk-doc-1.8-emacs-keybindings.patch 582 BLAKE2B 9591f8f58dbd2c5897abf020f96a3ad8124830c274bfa581756ccaa43c67002264cc6d5a04c0316e4bb2dfa75a3cb08b5de6217a81a295b3a31e18dae8d1ad7d SHA512 360e97c0d2603c17dd1c1ca92739eb5ac229f3bcda6dc76267b95cac73db1008a52164ac9cba5a0e43f7b6359b5e6d3b242fde757fa1b7409051bade5f6f35a6 -DIST gtk-doc-1.25.tar.xz 673184 BLAKE2B 2468b70403c0334b52ce1bcb77d2015fe83e0af9fac861464db605de9744ec1c7300e9b9a4b4fe0a3641e016083df063d92e1b74e44771d7a88c66815a396765 SHA512 7ac8c73ab9f9ecb6a142bd2232450a6431c3e4fe2372ff40460145b5d0bcffa1953c8cf49436539db86c3a32461cbd4180c714cb19cdd68bfd557816b789339c DIST gtk-doc-1.32.tar.xz 762000 BLAKE2B e87b0ed5dffd04acc7569171343839a742a874438248546b1b85ca71102d5a546f41b450c5cedf54ecab5b7b6585a4dac36d7600b21b5cce491470a50f82d3b0 SHA512 6d28395968c2951f1685570e5778b5add76d1b9cff8fcb8632b200b3ba251602a1ea59b1def84fc28560988b87fc0dbbc6947af88d268db6ff23e9c28aea3b28 -EBUILD gtk-doc-1.25-r1.ebuild 2764 BLAKE2B c038d0737340ecc172d6bf11977b98ab45c22cfb36c412548c67f89e6b9fe09727a59100160bf9ff885b8e0453b84de9707cb6ed77cfb248ff6ce6bb6b585077 SHA512 95ac0021363d8b8bc6e0d9309f2d9c56d8ada1c8ba88ab75cad0f8ebfba66bebf5131745327867325dfbb66368f559e6f74c5e722083bbb21422c6c9ace4fef6 -EBUILD gtk-doc-1.32-r1.ebuild 2341 BLAKE2B 26e5e53ff697a2335131cd04382754e67b3f3a383051ba0ef7d4ed6acdc6f00c44ffc385f8d5d607b0162342ff98b8d45c91a7842ba805d78fbb55a207808b79 SHA512 d539edce95b307db14915083298e4aaa426bb0dfbc193c6039441520a197749b6a1bd3194034a258b0e84ec1c55b0394c898d5c972e4cad89807fd5435b2272f -MISC metadata.xml 659 BLAKE2B 8c57567cad76724388d746e74bd1056a062c7280552494d6265b5fa38be518983188f22948bdb389916ec6384c17308e1ec292ec36f633b6ecd6f27102f74f94 SHA512 4ffcd239d0a5788ed94a204395a51d8b706663ac69139965e7d28282c473b55cd006cf3786a3cfd60386439f9ffa5d9242ed43ba05783962cbac002f8a00539b +EBUILD gtk-doc-1.32-r1.ebuild 2340 BLAKE2B bd2c6091b9237fe011e29429bf7a515d3e9149667fd8e553319d04da49f0a8983dac1a3aebf0f5aa7df589e03398f1dcbb816fc3381cd10cf2f8da328e4afbd3 SHA512 e70e382d6f2f73de8a9205055f9766b1b18318c4707044c595f6ea8b4f75a53afe0f09c7cf5774a8820ec234f9b31196b2d1a2fa18be6cf6112cb35ea05f8368 +EBUILD gtk-doc-1.32-r2.ebuild 2557 BLAKE2B bcbe0aab1994af6361449636ac7a1736d609e7bcc7e201340d710ecdcbcab2737040bcc9ef5a10319b1840d30fc2392d7258628de32135d55ea789e9ae325516 SHA512 c7a13bcc30b4fb31bbd484446be1a2933cdc4138b37db9a20a0cbf5ea37123df746607431fc89f6169c28d4a6819a36a017648980479116da0301c5558f22e2c +MISC metadata.xml 490 BLAKE2B 9b4d27b146f567501af858fd704d7713e8eea66caac0b5878d685814b48825f4222a6286acd3a8ec4d8e698ace318c52c74e301dc8eb3eec41bca3d83d24a130 SHA512 0d33e970b5924c264711c8a77aa966ff8f1e6cd2695d34088c0f9af825cd72603173e07e39fb6d6bd22098d76c048b3dc03dd83916b092f2c68c58f94aa95b7a 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 000000000000..59f878cceac4 --- /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-r1.ebuild b/dev-util/gtk-doc/gtk-doc-1.32-r1.ebuild index 8d725f8fbcde..4abe6de1c034 100644 --- a/dev-util/gtk-doc/gtk-doc-1.32-r1.ebuild +++ b/dev-util/gtk-doc/gtk-doc-1.32-r1.ebuild @@ -11,7 +11,7 @@ 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" +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}" diff --git a/dev-util/gtk-doc/gtk-doc-1.25-r1.ebuild b/dev-util/gtk-doc/gtk-doc-1.32-r2.ebuild index 23d51c05ae3f..a434b00475f0 100644 --- a/dev-util/gtk-doc/gtk-doc-1.25-r1.ebuild +++ b/dev-util/gtk-doc/gtk-doc-1.32-r2.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=6 -PYTHON_COMPAT=( python2_7 ) +PYTHON_COMPAT=( python3_{6,7} ) inherit eutils elisp-common gnome2 python-single-r1 readme.gentoo-r1 @@ -11,16 +11,14 @@ 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" +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 highlight test vim" -RESTRICT="!test? ( test )" +IUSE="debug doc emacs" REQUIRED_USE="${PYTHON_REQUIRED_USE}" RDEPEND=" ${PYTHON_DEPS} >=dev-libs/glib-2.6:2 - >=dev-lang/perl-5.18 dev-libs/libxslt >=dev-libs/libxml2-2.3.6:2 ~app-text/docbook-xml-dtd-4.3 @@ -28,11 +26,9 @@ RDEPEND=" ~app-text/docbook-sgml-dtd-3.0 >=app-text/docbook-dsssl-stylesheets-1.40 emacs? ( >=app-editors/emacs-23.1:* ) - highlight? ( - vim? ( || ( app-editors/vim app-editors/gvim ) ) - !vim? ( dev-util/source-highlight ) - ) - test? ( sys-devel/bc ) + $(python_gen_cond_dep ' + dev-python/pygments[${PYTHON_MULTI_USEDEP}] + ') " DEPEND="${RDEPEND} ~dev-util/gtk-doc-am-${PV} @@ -40,6 +36,9 @@ DEPEND="${RDEPEND} 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 @@ -51,26 +50,17 @@ pkg_setup() { src_prepare() { # Remove global Emacs keybindings, bug #184588 eapply "${FILESDIR}"/${PN}-1.8-emacs-keybindings.patch - - # Apply upstream commit 1baf9a6, bug #646850 - sed -e '1,/exit 1/s/exit 1/exit $1/' \ - -i gtkdoc-mkpdf.in || die + # 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() { - local myconf - if use vim; then - myconf="${myconf} $(use_with highlight highlight vim)" - else - myconf="${myconf} $(use_with highlight highlight source-highlight)" - fi - gnome2_src_configure \ --with-xml-catalog="${EPREFIX}"/etc/xml/catalog \ - $(use_enable debug) \ - ${myconf} + $(use_enable debug) } src_compile() { @@ -83,9 +73,8 @@ src_install() { python_fix_shebang "${ED}"/usr/bin/gtkdoc-depscan - # Don't install those files, they are in gtk-doc-am now + # 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" - rm "${ED}"/usr/bin/gtkdoc-rebase || die "failed to remove gtkdoc-rebase" if use doc; then docinto doc @@ -101,10 +90,6 @@ src_install() { fi } -src_test() { - emake -j1 check -} - pkg_postinst() { gnome2_pkg_postinst if use emacs; then diff --git a/dev-util/gtk-doc/metadata.xml b/dev-util/gtk-doc/metadata.xml index 1a3871ad27fb..8c9b95e54348 100644 --- a/dev-util/gtk-doc/metadata.xml +++ b/dev-util/gtk-doc/metadata.xml @@ -5,11 +5,6 @@ <email>gnome@gentoo.org</email> <name>Gentoo GNOME Desktop</name> </maintainer> -<use> - <flag name="highlight">Enable source code highlighting</flag> - <flag name="vim">Enable source code highlighting through - <pkg>app-editors/vim</pkg></flag> -</use> <longdescription lang="en"> GTK-Doc is used to document C code. It is typically used to document the public API of libraries, |