[gentoo-commits] repo/gentoo:master commit in: dev-util/ctags/files/, dev-util/ctags/
commit: 58828a694155b06dd9d8c97fcd563e7e1d6a9fb4 Author: Sam James gentoo org> AuthorDate: Wed Jun 12 03:20:24 2024 + Commit: Sam James gentoo org> CommitDate: Wed Jun 12 03:20:24 2024 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58828a69 dev-util/ctags: backport alignment fix Closes: https://bugs.gentoo.org/920066 Bug: https://bugs.gentoo.org/919480 Signed-off-by: Sam James gentoo.org> dev-util/ctags/ctags-20230423.0-r1.ebuild | 98 ++ .../ctags/files/ctags-20230423.0-alignment.patch | 88 +++ 2 files changed, 186 insertions(+) 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 ..b74769c09a50 --- /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} == ** ]] ; 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/files/ctags-20230423.0-alignment.patch b/dev-util/ctags/files/ctags-20230423.0-alignment.patch new file mode 100644 index ..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 +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 t
[gentoo-commits] repo/gentoo:master commit in: dev-util/ctags/files/, dev-util/ctags/
commit: 7771acdc33b51b57096b4fc920acc8f2c7f5f016 Author: Patrice Clement gentoo org> AuthorDate: Sun Jun 4 16:21:09 2017 + Commit: Patrice Clement gentoo org> CommitDate: Mon Jun 5 21:49:28 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7771acdc dev-util/ctags: EAPI 6 bump. Package-Manager: Portage-2.3.3, Repoman-2.3.1 dev-util/ctags/ctags-5.8-r2.ebuild | 69 ++ .../files/ctags-20161028-automagic-deps.patch | 4 +- dev-util/ctags/files/ctags-5.6-ebuilds.patch | 4 +- dev-util/ctags/files/ctags-5.8-ada.patch | 4 +- dev-util/ctags/files/ctags-5.8-f95-pointers.patch | 4 +- .../ctags-5.8-python-vars-starting-with-def.patch | 4 +- 6 files changed, 79 insertions(+), 10 deletions(-) diff --git a/dev-util/ctags/ctags-5.8-r2.ebuild b/dev-util/ctags/ctags-5.8-r2.ebuild new file mode 100644 index 000..033b4876829 --- /dev/null +++ b/dev-util/ctags/ctags-5.8-r2.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Exuberant Ctags creates tags files for code browsing in editors" +HOMEPAGE="http://ctags.sourceforge.net"; +SRC_URI=" + mirror://sourceforge/${PN}/${P}.tar.gz + ada? ( mirror://sourceforge/gnuada/ctags-ada-mode-4.3.11.tar.bz2 ) +" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="ada" + +RDEPEND="app-eselect/eselect-ctags" + +PATCHES=( + "${FILESDIR}/${PN}-5.6-ebuilds.patch" + # Upstream fix for python variables starting with def + "${FILESDIR}/${P}-python-vars-starting-with-def.patch" + # Bug #273697 + "${FILESDIR}/${P}-f95-pointers.patch" +) + +HTML_DOCS=( EXTENDING.html ctags.html ) + +DOCS=( FAQ NEWS README ) + +src_prepare() { + default + + # enabling Ada support + if use ada ; then + cp "${WORKDIR}/${PN}-ada-mode-4.3.11/ada.c" "${S}" || die + epatch "${FILESDIR}/${P}-ada.patch" + fi +} + +src_configure() { + econf \ + --with-posix-regex \ + --without-readlib \ + --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 + + einstalldocs +} + +pkg_postinst() { + eselect ctags update + elog "You can set the version to be started by /usr/bin/ctags through" + elog "the ctags eselect module. \"man ctags.eselect\" for details." +} + +pkg_postrm() { + eselect ctags update +} diff --git a/dev-util/ctags/files/ctags-20161028-automagic-deps.patch b/dev-util/ctags/files/ctags-20161028-automagic-deps.patch index a22481be7be..980d7d1c5ac 100644 --- a/dev-util/ctags/files/ctags-20161028-automagic-deps.patch +++ b/dev-util/ctags/files/ctags-20161028-automagic-deps.patch @@ -1,7 +1,7 @@ Add options to control libxml2, jansson, and libyaml automagic deps. ctags-20161028/configure.ac -+++ ctags-20161028/configure.ac +--- a/configure.ac b/configure.ac @@ -585,30 +585,48 @@ AC_CHECK_FUNCS(fork waitpid execv pipe,[enable_xcmd=yes],[enable_xcmd=no]) AM_CONDITIONAL([ENABLE_XCMD], [test "xyes" = "x$enable_xcmd"]) diff --git a/dev-util/ctags/files/ctags-5.6-ebuilds.patch b/dev-util/ctags/files/ctags-5.6-ebuilds.patch index 5b0de663a15..9fce6c5defc 100644 --- a/dev-util/ctags/files/ctags-5.6-ebuilds.patch +++ b/dev-util/ctags/files/ctags-5.6-ebuilds.patch @@ -1,6 +1,6 @@ diff -ur ctags-5.6/sh.c ctags-5.6-ebuild/sh.c ctags-5.6/sh.c 2006-05-30 00:37:13.0 -0400 -+++ ctags-5.6-ebuild/sh.c 2006-10-07 17:37:31.0 -0400 +--- a/sh.c 2006-05-30 00:37:13.0 -0400 b/sh.c 2006-10-07 17:37:31.0 -0400 @@ -7,7 +7,8 @@ * GNU General Public License. * diff --git a/dev-util/ctags/files/ctags-5.8-ada.patch b/dev-util/ctags/files/ctags-5.8-ada.patch index 48ed96f0d88..9026bc54040 100644 --- a/dev-util/ctags/files/ctags-5.8-ada.patch +++ b/dev-util/ctags/files/ctags-5.8-ada.patch @@ -1,5 +1,5 @@ parsers-orig.h 2009-11-16 23:39:49.747328066 +0200 -+++ parsers.h 2009-11-16 23:40:26.541581805 +0200 +--- a/parsers.h2009-11-16 23:39:49.747328066 +0200 b/parsers.h2009-11-16 23:40:26.541581805 +0200 @@ -16,6 +16,7 @@ /* Add the name of any new parser definition function here */ diff --git a/dev-util/ctags/files/ctag