summaryrefslogtreecommitdiff
path: root/dev-libs/kpathsea
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/kpathsea')
-rw-r--r--dev-libs/kpathsea/Manifest2
-rw-r--r--dev-libs/kpathsea/files/kpathsea-6.4.0_p20240311-c23.patch52
-rw-r--r--dev-libs/kpathsea/kpathsea-6.4.0_p20240311-r1.ebuild110
3 files changed, 164 insertions, 0 deletions
diff --git a/dev-libs/kpathsea/Manifest b/dev-libs/kpathsea/Manifest
index 04d9dbadfccc..e7efa98f267a 100644
--- a/dev-libs/kpathsea/Manifest
+++ b/dev-libs/kpathsea/Manifest
@@ -1,3 +1,4 @@
+AUX kpathsea-6.4.0_p20240311-c23.patch 1624 BLAKE2B 2f2b6ebbeee5f0bc8472c86179b7346352cab03d349dc39ae6fec9693cda2299469413cdd2d08161c3f8388e54c34fa8dec9fe34ea18324afd9c12ee24a02011 SHA512 fe156536a3124bb92f5383721c4f4c4592e0d101a9b5a81a0b04a5c2ce2655aa798952c58734329fdec39bf698ec8f32d95fe07447072f4775cf020cd817dabb
AUX kpathsea.conf 36 BLAKE2B 5f3ea92946c78a2a4aa336aa38783cf894859e368ec2437facdb9a814ba258097831166df15afc412d6df3fd6639fbca8f2c2f33efa5d69fde75090a9fc7dd3b SHA512 4221eda451499869a3b9b6b5c07e6866df963368481c7169645e0923f674ce6aa7bd9411303bb087fe55d99eea8b187b2a978c9f9ba0e40802f1863268566e28
AUX texmf-update-r2 6017 BLAKE2B b9ded4693768342c6fe9a0d99b6836e74b3d8b9a5bb3d335d8ecbbe5c2a45967ac880ebfc2476c04e461ca2dac3eb02ee6c41ee34a050ba94b54d9d731853ee0 SHA512 924c6a53d778b1a05252830d914c92f8d1a8d1c479cd8a065b861bf1f263d6bb529c42c365134fea19ea1d9bedf68a943d609cd89abf73912f90bbc3397fb14f
DIST kpathsea-texmf.d-11.tar.xz 12616 BLAKE2B f64dcaae859d6c95d534907f69519428973fad5b7a734eec269b3cc89fc2ae527a459b4ae4d966a3394d6a95f40fac16841f59f9f6cabf2a07dcdcb98a14cba9 SHA512 eec72ecc35edd47bd9a5762f0d06212e4625eea1ee2ffc36f93885b548ca6c4e0eb65345a1ec050f3f838aed5128bb32eda509b5aadbad6643469b4955441f22
@@ -8,5 +9,6 @@ DIST kpathsea.r72376.tar.xz 33080 BLAKE2B f40fea6d5b6f1918b185d123914fca8e618b43
DIST texlive-20230311-source.tar.xz 68359984 BLAKE2B 6263e8d3e066db96f071138f2442b1ed7e1f3db7e6d261cdeb9a7e6e636c6e6ed45305c6bda3ab6f9a439c92eabf32a79bf6e371d16b747eebbc05ee47b85035 SHA512 93ac43f3055fee0103a6cfceea18d39ece63984914f3af9ad76da218f2d568852d9b987d1c9647c1497b985e4ffa297ef97dc2d50d3e90f62b03ad685af31d96
DIST texlive-20240311-source.tar.xz 70130920 BLAKE2B f7e0c99694734585e36cbfa815e8c50b4e73c2b8b9a81a0c13f2ca22b1f54d46d92d07792c2036bdd2b3ebfcdf2c100638f4302b3dd64d478b04d1eb7a7aaee1 SHA512 2f1d567abba2ba98e236c1de034a861a86af9ce34a9be4f6b478a9f4eaf07a78d09104c652dddab9db2e7057a66f39504c0403a456c72a74f612d0efeccb0714
EBUILD kpathsea-6.3.5_p20230311.ebuild 3217 BLAKE2B 118e961324a55e715fce9dc90ba7b864b7b477cd7379334b7eda1cb3d7b57846156f3469d85cc61a797dfe5fc960b0d35d862453e29afb7ada7c453041401e37 SHA512 5ec42d1659a91efafe414b99ad6cf7d1ae6ba0b34b4f72005c13b986769d4249428bc6a84f3def0a4f47367a90de080d4d946923df9acd62ff0e41bfda77a1d1
+EBUILD kpathsea-6.4.0_p20240311-r1.ebuild 3288 BLAKE2B 8beaa3b0a7816259a01452ab5eef4ee78dbf5e3687338ecc956cc28888a518b6cee54c42ad84afeef4555258e076dce46cb095f0755b26caa4bf497591a38123 SHA512 8010709ea31391a569165943ea5403165e92ca558dfd81ebd35903b64a56d41d4025cd3ee35694baab22dbb538ed0b7722605067ae5564c9f7838ad59e4e6de4
EBUILD kpathsea-6.4.0_p20240311.ebuild 3218 BLAKE2B addf09542c9902269f01729a3818442f4ebdbb4b96ef6cf0902df2216aca6582077286ac5263726352825925dbc88a053ea446ef8d3e92ce3a1c9fb0dccd10c5 SHA512 91cef8d804579433212d317e26a091548427cede3e3cfb57064fb6658ff512cbaefc4190a6e4d27356b6a287fc443a3f83f41ee7cfa912ca7c7ea1da98ae51c1
MISC metadata.xml 338 BLAKE2B 7ca1ed44ed7096024174f97102764464e83c4f28ccc40a02d48cf705e14bd485b8f9f04c41e17f45f102c7bddcaacb747f00ad927bfe79bc9f4bde134c548d75 SHA512 990338976401375ed87f65f728913ef679629825e5b5b3733eff61aec88480fcba16de58a7f47a042b4fbb0d12270719a418ce4191c62ef776dc31152b023dd2
diff --git a/dev-libs/kpathsea/files/kpathsea-6.4.0_p20240311-c23.patch b/dev-libs/kpathsea/files/kpathsea-6.4.0_p20240311-c23.patch
new file mode 100644
index 000000000000..0c06095c3567
--- /dev/null
+++ b/dev-libs/kpathsea/files/kpathsea-6.4.0_p20240311-c23.patch
@@ -0,0 +1,52 @@
+https://bugs.gentoo.org/952902
+https://bugs.gentoo.org/955549
+https://github.com/TeX-Live/texlive-source/commit/cc687b6c0ae8c6a4b566646282a7bc702d822e6d (cherry-picked)
+.. then another fix on top.
+
+From cc687b6c0ae8c6a4b566646282a7bc702d822e6d Mon Sep 17 00:00:00 2001
+From: Karl Berry <karl@freefriends.org>
+Date: Tue, 8 Apr 2025 22:40:48 +0000
+Subject: [PATCH] begin groveling to C23 (fixes mostly from Hilmar)
+
+git-svn-id: svn://tug.org/texlive/trunk/Build/source@74888 c570f23f-e606-0410-a88d-b1316a301751
+---
+ texk/kpathsea/c-memstr.h | 7 -------
+ 17 files changed, 81 insertions(+), 25 deletions(-)
+
+diff --git a/texk/kpathsea/c-memstr.h b/texk/kpathsea/c-memstr.h
+index e8e107a6f9..fdd4faeb7e 100644
+--- a/c-memstr.h
++++ b/c-memstr.h
+@@ -53,11 +53,4 @@
+ #define memcpy(to, from, len) bcopy ((from), (to), (len))
+ #endif
+
+-#if !defined(HAVE_STRING_H)
+-extern char *strtok ();
+-#ifndef strstr
+-extern char *strstr ();
+-#endif
+-#endif
+-
+ #endif /* not KPATHSEA_C_MEMSTR_H */
+diff --git a/c-std.h b/c-std.h
+index 6d65d15..f001f0a 100644
+--- a/c-std.h
++++ b/c-std.h
+@@ -37,16 +37,10 @@
+ /* Be sure we have constants from <unistd.h>. */
+ #include <kpathsea/c-unistd.h>
+
+-#ifdef HAVE_STDLIB_H
+ #include <stdlib.h>
+ /* Include <stdlib.h> before <stddef.h>, to help avoid NULL
+ redefinitions on some systems. (We don't include <stddef.h>
+ ourselves any more, but FYI.) */
+-#else
+-/* It's impossible to say for sure what the system will deign to put in
+- <stdlib.h>, but let's hope it's at least this. */
+-extern char *getenv ();
+-#endif /* not HAVE_STDLIB_H */
+
+ #ifdef WIN32
+ #include <malloc.h>
diff --git a/dev-libs/kpathsea/kpathsea-6.4.0_p20240311-r1.ebuild b/dev-libs/kpathsea/kpathsea-6.4.0_p20240311-r1.ebuild
new file mode 100644
index 000000000000..92ba84fd116e
--- /dev/null
+++ b/dev-libs/kpathsea/kpathsea-6.4.0_p20240311-r1.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit texlive-common libtool prefix tmpfiles
+
+TEXMFD_VERSION="11"
+MY_SOURCE_FILE="texlive-${PV#*_p}-source.tar.xz"
+
+DESCRIPTION="Path searching library for TeX-related files"
+HOMEPAGE="https://tug.org/texlive/"
+SRC_URI="
+ https://mirrors.ctan.org/systems/texlive/Source/${MY_SOURCE_FILE}
+ https://dev.gentoo.org/~flow/distfiles/texlive/${MY_SOURCE_FILE}
+ https://dev.gentoo.org/~sam/distfiles/texlive/${PN}-texmf.d-${TEXMFD_VERSION}.tar.xz
+"
+
+S=${WORKDIR}/texlive-${PV#*_p}-source/texk/${PN}
+LICENSE="LGPL-2.1"
+SLOT="0/${PV%_p*}"
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="doc source static-libs"
+
+TL_REVISION=72376
+EXTRA_TL_MODULES="kpathsea.r${TL_REVISION}"
+EXTRA_TL_DOC_MODULES="kpathsea.doc.r${TL_REVISION}"
+
+texlive-common_append_to_src_uri EXTRA_TL_MODULES
+
+SRC_URI="${SRC_URI} doc? ( "
+texlive-common_append_to_src_uri EXTRA_TL_DOC_MODULES
+SRC_URI="${SRC_URI} ) "
+
+TEXMF_PATH=/usr/share/texmf-dist
+
+PATCHES=(
+ "${FILESDIR}"/kpathsea-6.4.0_p20240311-c23.patch
+)
+
+src_prepare() {
+ default
+ cd "${WORKDIR}/texlive-${PV#*_p}-source" || die
+ S="${WORKDIR}/texlive-${PV#*_p}-source" elibtoolize
+ cp "${FILESDIR}/texmf-update-r2" "${S}"/texmf-update || die
+ eprefixify "${S}"/texmf-update
+}
+
+src_configure() {
+ # Too many regexps use A-Z a-z constructs, what causes problems with locales
+ # that don't have the same alphabetical order than ascii. Bug #347798
+ # So we set LC_ALL to C in order to avoid problems.
+ export LC_ALL=C
+
+ # Disable largefile because it seems to cause problems on big endian 32 bits
+ # systems...
+ econf \
+ --disable-largefile \
+ "$(use_enable static-libs static)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" web2cdir="${EPREFIX}/usr/share/texmf-dist/web2c" install
+ find "${D}" -name '*.la' -delete || die
+
+ dodir /usr/share # just in case
+ cp -pR "${WORKDIR}"/texmf-dist "${ED}/usr/share/" || die "failed to install texmf trees"
+ if use source ; then
+ cp -pR "${WORKDIR}"/tlpkg "${ED}/usr/share/" || die "failed to install tlpkg files"
+ fi
+
+ # Take care of fmtutil.cnf and texmf.cnf
+ dodir /etc/texmf/{fmtutil.d,texmf.d}
+
+ # Remove default texmf.cnf to ship our own, greatly based on texlive dvd's
+ # texmf.cnf
+ # It will also be generated from /etc/texmf/texmf.d files by texmf-update
+ rm -f "${ED}${TEXMF_PATH}/web2c/texmf.cnf" || die
+
+ insinto /etc/texmf/texmf.d
+ doins "${WORKDIR}/texmf.d/"*.cnf
+
+ # Remove fmtutil.cnf, it will be regenerated from /etc/texmf/fmtutil.d files
+ # by texmf-update
+ rm -f "${ED}${TEXMF_PATH}/web2c/fmtutil.cnf" || die
+
+ dosym ../../../../etc/texmf/web2c/fmtutil.cnf ${TEXMF_PATH}/web2c/fmtutil.cnf
+ dosym ../../../../etc/texmf/web2c/texmf.cnf ${TEXMF_PATH}/web2c/texmf.cnf
+
+ newsbin "${S}/texmf-update" texmf-update
+
+ # Keep it as that's where the formats will go
+ keepdir /var/lib/texmf
+
+ dodoc ChangeLog NEWS PROJECTS README
+
+ # The default configuration expects it to be world writable, bug #266680
+ # People can still change it with texconfig though.
+ dotmpfiles "${FILESDIR}"/kpathsea.conf
+}
+
+pkg_postinst() {
+ tmpfiles_process kpathsea.conf
+ etexmf-update
+}
+
+pkg_postrm() {
+ etexmf-update
+}