summaryrefslogtreecommitdiff
path: root/dev-util/ctags
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-06-13 00:08:30 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-06-13 00:08:30 +0100
commit0ebcd2cbf178600b5eb36b2f24cdbb3d2f4a9000 (patch)
tree941e6ba8c256dd27e9f9ca634f08d4bf0278798e /dev-util/ctags
parentf0ddcad13515f66d2f3bf827d33c277bdba7e1dd (diff)
gentoo auto-resync : 13:06:2024 - 00:08:29
Diffstat (limited to 'dev-util/ctags')
-rw-r--r--dev-util/ctags/Manifest6
-rw-r--r--dev-util/ctags/ctags-20230423.0-r1.ebuild98
-rw-r--r--dev-util/ctags/ctags-20240609.0.ebuild94
-rw-r--r--dev-util/ctags/ctags-99999999.ebuild4
-rw-r--r--dev-util/ctags/files/ctags-20230423.0-alignment.patch88
5 files changed, 287 insertions, 3 deletions
diff --git a/dev-util/ctags/Manifest b/dev-util/ctags/Manifest
index 402e6226becb..0444f98f7581 100644
--- a/dev-util/ctags/Manifest
+++ b/dev-util/ctags/Manifest
@@ -1,8 +1,12 @@
+AUX ctags-20230423.0-alignment.patch 3528 BLAKE2B 0b5a2c267067c1203021150f2c093f7538e8c287436121436d13f2f5aef2ef96ba80cabc0bb7ecf0773739c34bbd14267c3ba8b7c2f05c6f8c6f97c296205534 SHA512 619d2dc5e8feee9bef94e0bf75c6db012bf10c14a9f133e5a6c596544f2bc9e9451c4bd7485e16c2184e05371ef50c70e1e324b74791f9782f3dc7df30a49ee7
DIST ctags-20211017.0.tar.gz 2542128 BLAKE2B cade7149cb2fd0645f9b7ecd37c8b9acdeae7037fde2bb74aa94d67f04963327429b83dcf5cd658f082bd8ce4c407f69f4924da5f768bec029b4075997bbd882 SHA512 85bfb4d40c1d9045b4ba4dc280ee7108ee2fd4572c92794d5bdc854f3511dad1ecf282428e61161773f7bfaca725d774593a0e83fc767a1bb2e12b229a19bec0
DIST ctags-20220828.0.tar.gz 2952276 BLAKE2B 2ec3a01646cfb89446604af65387bb5cbf17188177505000f5803a9a535f59799961e8144d3ab36b23114fc093cb487589f52e7186b60041ff3bf2a439f77dab SHA512 4c1289dab24edded85c7ae31c06b0cad5b8f08f7f709a0bdacdf5f9d8ccf722c820d6fef6d46298bb06c48256e80f594dbf2456b91d1c50b3509ce4d3fe3ae9c
DIST ctags-20230423.0.tar.gz 3038197 BLAKE2B 4b6114526e9dc94c95dcf1b27136fe1fde185aadcd3f880459314b6567f4ec935da10f87aaad590f4c16999adea8b15b3a153f4e80b3b9e57d9a04ecee377a09 SHA512 7a4b3ffcc4906765dda381ad637981f5ce8c6fc24d4141b8b0e9997b71767dda307dab4d2c2aa0e5ba003774c100d8f85e494e368cedbef12c8f415a13b85554
+DIST ctags-20240609.0.tar.gz 3158634 BLAKE2B fe662dc0c48a0ac484bf3fc7ba7d0a31285398cd5da111a96f14b3637045fa0b0245119da034ab467e43b776849f47891e829af86a1889548f410070df6395d4 SHA512 60ebc506a04aabd7ada13801ab3ac662a9798960cf2aaa90270e6d5df82850b4e709a15a7523eb2e1e347a08b458ff2b85a99c787ab08b3c2599232492ef0ebc
EBUILD ctags-20211017.0.ebuild 1925 BLAKE2B cb0a590ebb35343a285c808da2a0c6e917dce94aea867e5a936c9123c6f482181089545702b7c199053fac2c1c051d88edad86b494f64634563da894ba57a03c SHA512 2d0ea70c31becb2b9d4bdbc0d1877434d663c9ee8e04dea7f92693f8804a30219d18aedaecc42cadf591dc314a19e4227494a8f4090d9afd025135b0b059e08b
EBUILD ctags-20220828.0-r1.ebuild 2241 BLAKE2B 29fbb42b31926b04de114727902259df35f2490421b918d69ffa258d177a0f34532271d79ff117ab73a119a7e402954b8e0f206510f5fc014272df4b243fb672 SHA512 2e520b0a5b1f289142a2eb5335df3828beb13b529a6be37f7df2d77b564ce5ae4b215ff396623e00e34580792a51ddd928aa4fe915ae55420e388a8c10fbb146
+EBUILD ctags-20230423.0-r1.ebuild 2492 BLAKE2B 39ab6242f64757e94a3739cb42d79c64d1752a0140ac1db73680f5698687ffa30b234b1f916645edaf7b075a50318ca9c73420ba6c12f814712a83923de09647 SHA512 cd021dc36c931e6244c087f667b934af0ec447828fb483599c09da0066f6d9665f03b602c6aa49473a87b045571a2433f512d17b60752705e35393b72a7e55ca
EBUILD ctags-20230423.0.ebuild 2434 BLAKE2B 60b567b1198818605b0aeda126e2d01bbe082a86c1e86f03a0df581258c6e69e02799d395b06799e755ed820f11fdd0271256e29b571c8ba9cf6f2bf0ac19afb SHA512 e57d07f26d67e7356970b6e867e95daa36cb761c61b7d9fc7644bccd88c61792f4eb82f04ef50afd029a702a3d80f0c4d733c4d6e1892018e1043dd17f6b35bd
-EBUILD ctags-99999999.ebuild 2437 BLAKE2B 87e28bc639470848f68db4ebdb0d95f9a3b628a455caedbd587de6d778b3e28d60719f5aa17c1867cdc5521669e467119758d9ce5c883e0571be08d11e8fc33b SHA512 3dd524c3f097f1e8285f7746a003ec7ae3c4f7e61e4516c968fe7ec65ba125a0fdd3ba61cfc5d20b90db23670bebc9e070ab7151db197c20a60d98c8d27b310d
+EBUILD ctags-20240609.0.ebuild 2437 BLAKE2B 911058bb57d7f692968478f38b532fd21a88e769aa989832f0d8db0d98287ff91e08ccda73e4b97bd88ea82bf21a70b73380cfee45e20f83b26f08429174bdb4 SHA512 c372b618cc0d16c11267fc012fd0bd7659717bc209c8696b0b10910f19e48f51a6eea044989a510419014d9c82ead155ff742be83ba12073b22fd93b337b0445
+EBUILD ctags-99999999.ebuild 2437 BLAKE2B 911058bb57d7f692968478f38b532fd21a88e769aa989832f0d8db0d98287ff91e08ccda73e4b97bd88ea82bf21a70b73380cfee45e20f83b26f08429174bdb4 SHA512 c372b618cc0d16c11267fc012fd0bd7659717bc209c8696b0b10910f19e48f51a6eea044989a510419014d9c82ead155ff742be83ba12073b22fd93b337b0445
MISC metadata.xml 584 BLAKE2B 13de5ebe8bea2b413552eb85af3d3a42c453ad8d7f808b21a5b016bbd3e7890ceabdb924e817c4d841ed2862b7f9dcecad03f7f22c7b738db1c4f88d784fc80d SHA512 c4930de987c3d846c4761d66a191ae2b2800b32234f63ebafee140920faa408cec1b22032c72da01ade807a4187f482bedad3e22058fdffc0af56aabd1deea8f
diff --git a/dev-util/ctags/ctags-20230423.0-r1.ebuild b/dev-util/ctags/ctags-20230423.0-r1.ebuild
new file mode 100644
index 000000000000..06278216a755
--- /dev/null
+++ b/dev-util/ctags/ctags-20230423.0-r1.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit autotools python-any-r1
+
+DESCRIPTION="Exuberant Ctags creates tags files for code browsing in editors"
+HOMEPAGE="https://ctags.io/ https://github.com/universal-ctags/ctags"
+
+if [[ ${PV} == *99999999* ]] ; then
+ EGIT_REPO_URI="https://github.com/universal-ctags/ctags"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/universal-ctags/ctags/archive/refs/tags/p6.0.${PV}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}"/${PN}-p6.0.${PV}
+
+ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+fi
+
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE="json pcre seccomp test xml yaml"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ json? ( dev-libs/jansson:= )
+ pcre? ( dev-libs/libpcre2 )
+ seccomp? ( sys-libs/libseccomp )
+ xml? ( dev-libs/libxml2:2 )
+ yaml? ( dev-libs/libyaml )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ dev-python/docutils
+ virtual/pkgconfig
+ test? ( ${PYTHON_DEPS} )
+"
+IDEPEND="app-eselect/eselect-ctags"
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+ # manual check for function in a library that doesn't exist, passes -liconv
+ # which either fails to link anyway (glibc) or passes this check (musl)
+ libiconv_open
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-20230423.0-alignment.patch
+)
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # Ignore check-genfile test (calls git which errors out)
+ sed -i 's/man-test check-genfile/man-test/' makefiles/testing.mak || die
+
+ default
+
+ #./misc/dist-test-cases > makefiles/test-cases.mak || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable json) \
+ $(use_enable pcre pcre2) \
+ $(use_enable seccomp) \
+ $(use_enable xml) \
+ $(use_enable yaml) \
+ --disable-etags \
+ --enable-tmpdir="${EPREFIX}"/tmp
+}
+
+src_install() {
+ emake prefix="${ED}"/usr mandir="${ED}"/usr/share/man install
+
+ # Namepace collision with X/Emacs-provided /usr/bin/ctags -- we
+ # rename ctags to exuberant-ctags (Mandrake does this also).
+ mv "${ED}"/usr/bin/{ctags,exuberant-ctags} || die
+ mv "${ED}"/usr/share/man/man1/{ctags,exuberant-ctags}.1 || die
+}
+
+pkg_postinst() {
+ eselect ctags update
+
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ elog "You can set the version to be started by ${EROOT}/usr/bin/ctags through"
+ elog "the ctags eselect module. \"man ctags.eselect\" for details."
+ fi
+}
+
+pkg_postrm() {
+ eselect ctags update
+}
diff --git a/dev-util/ctags/ctags-20240609.0.ebuild b/dev-util/ctags/ctags-20240609.0.ebuild
new file mode 100644
index 000000000000..4d1c75a03103
--- /dev/null
+++ b/dev-util/ctags/ctags-20240609.0.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+inherit autotools python-any-r1
+
+DESCRIPTION="Exuberant Ctags creates tags files for code browsing in editors"
+HOMEPAGE="https://ctags.io/ https://github.com/universal-ctags/ctags"
+
+if [[ ${PV} == *99999999* ]] ; then
+ EGIT_REPO_URI="https://github.com/universal-ctags/ctags"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/universal-ctags/ctags/archive/refs/tags/p6.1.${PV}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}"/${PN}-p6.1.${PV}
+
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+fi
+
+LICENSE="GPL-2+"
+SLOT="0"
+IUSE="json pcre seccomp test xml yaml"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+ json? ( dev-libs/jansson:= )
+ pcre? ( dev-libs/libpcre2 )
+ seccomp? ( sys-libs/libseccomp )
+ xml? ( dev-libs/libxml2:2 )
+ yaml? ( dev-libs/libyaml )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ dev-python/docutils
+ virtual/pkgconfig
+ test? ( ${PYTHON_DEPS} )
+"
+IDEPEND="app-eselect/eselect-ctags"
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+ # manual check for function in a library that doesn't exist, passes -liconv
+ # which either fails to link anyway (glibc) or passes this check (musl)
+ libiconv_open
+)
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # Ignore check-genfile test (calls git which errors out)
+ sed -i 's/man-test check-genfile/man-test/' makefiles/testing.mak || die
+
+ default
+
+ #./misc/dist-test-cases > makefiles/test-cases.mak || die
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable json) \
+ $(use_enable pcre pcre2) \
+ $(use_enable seccomp) \
+ $(use_enable xml) \
+ $(use_enable yaml) \
+ --disable-etags \
+ --enable-tmpdir="${EPREFIX}"/tmp
+}
+
+src_install() {
+ emake prefix="${ED}"/usr mandir="${ED}"/usr/share/man install
+
+ # Namepace collision with X/Emacs-provided /usr/bin/ctags -- we
+ # rename ctags to exuberant-ctags (Mandrake does this also).
+ mv "${ED}"/usr/bin/{ctags,exuberant-ctags} || die
+ mv "${ED}"/usr/share/man/man1/{ctags,exuberant-ctags}.1 || die
+}
+
+pkg_postinst() {
+ eselect ctags update
+
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ elog "You can set the version to be started by ${EROOT}/usr/bin/ctags through"
+ elog "the ctags eselect module. \"man ctags.eselect\" for details."
+ fi
+}
+
+pkg_postrm() {
+ eselect ctags update
+}
diff --git a/dev-util/ctags/ctags-99999999.ebuild b/dev-util/ctags/ctags-99999999.ebuild
index 2780d6573854..4d1c75a03103 100644
--- a/dev-util/ctags/ctags-99999999.ebuild
+++ b/dev-util/ctags/ctags-99999999.ebuild
@@ -13,8 +13,8 @@ if [[ ${PV} == *99999999* ]] ; then
EGIT_REPO_URI="https://github.com/universal-ctags/ctags"
inherit git-r3
else
- SRC_URI="https://github.com/universal-ctags/ctags/archive/refs/tags/p6.0.${PV}.tar.gz -> ${P}.tar.gz"
- S="${WORKDIR}"/${PN}-p6.0.${PV}
+ SRC_URI="https://github.com/universal-ctags/ctags/archive/refs/tags/p6.1.${PV}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}"/${PN}-p6.1.${PV}
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
fi
diff --git a/dev-util/ctags/files/ctags-20230423.0-alignment.patch b/dev-util/ctags/files/ctags-20230423.0-alignment.patch
new file mode 100644
index 000000000000..89544cb516bf
--- /dev/null
+++ b/dev-util/ctags/files/ctags-20230423.0-alignment.patch
@@ -0,0 +1,88 @@
+https://bugs.gentoo.org/920066
+https://github.com/universal-ctags/ctags/issues/3881
+https://github.com/universal-ctags/ctags/pull/3883
+
+From e6bc697502fcf582ea52e7098becf01ca0b00fc8 Mon Sep 17 00:00:00 2001
+From: Colomban Wendling <ban@herbesfolles.org>
+Date: Sat, 16 Dec 2023 19:20:32 +0100
+Subject: [PATCH] nestlevel: Fix user data alignment
+
+We need to align the user data properly not to trigger undefined
+behavior, which even apparently crashes on SPARC.
+
+As `NestingLevels::levels` is actually a single allocation for all
+levels and their user data mapped as `[NL0|UD0|NL1|UD1|...]` (where NL
+is a NestingLevel, and UD a user data), we need to align twice, as we
+need every `NL*` and every `UD*` to align properly.
+
+Here we align everything to `2*sizeof(size_t)`, which is a logic
+borrowed from GLib, which seems to have borrowed the value from glibc.
+This is pretty conservative in our case, because actually `NL*`s only
+need aligning to `int`'s requirements currently, which on some
+architectures is 4, not 16; but it's trickier to implement (and
+actually impossible with the current API) as we'd need to compute the
+actual alignment for each level taking into account it's position in
+the overall memory region to still align `UD*`s to a conservative
+value.
+Also, having all NL+UD group at the same size makes things a bit
+simpler for debugging, I guess.
+
+We make sure to only add alignment padding manually for cases where
+there's actually some user data, not to waste memory needlessly for the
+common case where `sizeof(UD)` is 0, and thus where we can merely
+align to `sizeof(NL)` -- which C does for us already.
+
+Note that currently only the Ruby parser is affected, as it's the only
+current consumer of nesting level user data.
+
+Fixes #3881.
+--- a/main/nestlevel.c
++++ b/main/nestlevel.c
+@@ -20,8 +20,16 @@
+
+ #include <string.h>
+
+-/* TODO: Alignment */
+-#define NL_SIZE(nls) (sizeof(NestingLevel) + (nls)->userDataSize)
++/* struct alignment trick, copied from GObject's gtype.c, which borrows
++ * 2*szieof(size_t) from glibc */
++#define STRUCT_ALIGNMENT (2 * sizeof (size_t))
++#define ALIGN_STRUCT(offset) ((offset + (STRUCT_ALIGNMENT - 1)) & -STRUCT_ALIGNMENT)
++
++/* account for the user data alignment if we have user data, otherwise allocate
++ * exactly what's needed not to waste memory for unneeded alignment */
++#define NL_SIZE(nls) ((nls)->userDataSize ? (ALIGN_STRUCT (sizeof (NestingLevel)) + ALIGN_STRUCT ((nls)->userDataSize)) : sizeof (NestingLevel))
++#define NL_USER_DATA(nl) ((void *)(((char *) nl) + ALIGN_STRUCT (sizeof (NestingLevel))))
++
+ #define NL_NTH(nls,n) (NestingLevel *)(((char *)((nls)->levels)) + ((n) * NL_SIZE (nls)))
+
+ /*
+@@ -73,7 +81,7 @@ extern NestingLevel * nestingLevelsPush(NestingLevels *nls, int corkIndex)
+
+ nl->corkIndex = corkIndex;
+ if (nls->userDataSize > 0)
+- memset (nl->userData, 0, nls->userDataSize);
++ memset (NL_USER_DATA (nl), 0, ALIGN_STRUCT (nls->userDataSize));
+
+ return nl;
+ }
+@@ -117,5 +125,5 @@ extern NestingLevel *nestingLevelsGetNthParent (const NestingLevels *nls, int n)
+
+ extern void *nestingLevelGetUserData (const NestingLevel *nl)
+ {
+- return (void *)nl->userData;
++ return NL_USER_DATA (nl);
+ }
+--- a/main/nestlevel.h
++++ b/main/nestlevel.h
+@@ -26,7 +26,8 @@ typedef struct NestingLevels NestingLevels;
+ struct NestingLevel
+ {
+ int corkIndex;
+- char userData [];
++ /* user data is allocated at the end of this struct (possibly with some
++ * offset for alignment), get it with nestingLevelGetUserData() */
+ };
+
+ struct NestingLevels
+