Merge pull request #3295 from flatcar/buildbot/weekly-portage-stable-package-updates-2025-09-22

Weekly portage-stable package updates 2025-09-22
This commit is contained in:
Krzesimir Nowak 2025-10-08 08:11:59 +02:00 committed by GitHub
commit 8a095cf544
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
235 changed files with 6121 additions and 5899 deletions

View File

@ -0,0 +1,3 @@
- binutils ([CVE-2025-5244](https://www.cve.org/CVERecord?id=CVE-2025-5244), [CVE-2025-5245](https://www.cve.org/CVERecord?id=CVE-2025-5245) [CVE-2025-8225](https://www.cve.org/CVERecord?id=CVE-2025-8225))
- curl ([CVE-2025-9086](https://www.cve.org/CVERecord?id=CVE-2025-9086), [CVE-2025-10148](https://www.cve.org/CVERecord?id=CVE-2025-10148))
- go ([CVE-2025-47910](https://www.cve.org/CVERecord?id=CVE-2025-47910))

View File

@ -0,0 +1,21 @@
- SDK: go ([1.24.7](https://go.dev/doc/devel/release#go1.24.minor))
- SDK: pkgcheck ([0.10.37](https://github.com/pkgcore/pkgcheck/releases/tag/v0.10.37))
- SDK: rust ([1.89.0](https://blog.rust-lang.org/2025/08/07/Rust-1.89.0/))
- base, dev: bash ([5.3_p3](https://lists.gnu.org/archive/html/bug-bash/2025-07/msg00005.html))
- base, dev: btrfs-progs ([6.16](https://github.com/kdave/btrfs-progs/releases/tag/v6.16))
- base, dev: cryptsetup ([2.8.1](https://gitlab.com/cryptsetup/cryptsetup/-/raw/v2.8.1/docs/v2.8.1-ReleaseNotes))
- base, dev: curl ([8.16.0](https://curl.se/ch/8.16.0.html))
- base, dev: expat ([2.7.2](https://github.com/libexpat/libexpat/blob/R_2_7_2/expat/Changes))
- base, dev: gcc ([14.3.1_p20250801](https://gcc.gnu.org/pipermail/gcc/2025-May/246078.html))
- base, dev: hwdata ([0.398](https://github.com/vcrhonek/hwdata/releases/tag/v0.398))
- base, dev: readline ([8.3_p1](https://lists.gnu.org/archive/html/bug-bash/2025-07/msg00005.html))
- base, dev: samba ([4.22.3](https://www.samba.org/samba/history/samba-4.22.3.html) (includes [4.22.2](https://www.samba.org/samba/history/samba-4.22.2.html), [4.22.1](https://www.samba.org/samba/history/samba-4.22.1.html), [4.22.0](https://www.samba.org/samba/history/samba-4.22.0.html), [4.21.0](https://www.samba.org/samba/history/samba-4.21.0.html)))
- base, dev: talloc ([2.4.3](https://gitlab.com/samba-team/samba/-/commit/77229f73c20af69ab0f3c96efbb229ff64a9dfe4))
- base, dev: tdb ([1.4.13](https://gitlab.com/samba-team/samba/-/commit/70a8c7a89a6d62d2ff172d79b5f4e6439300b88d))
- base, dev: tevent ([0.16.2](https://gitlab.com/samba-team/samba/-/commit/8d398acbbb7fdc0ff50fe6ba80433deaf92515c6))
- dev: binutils ([2.45](https://lists.gnu.org/archive/html/info-gnu/2025-07/msg00009.html))
- sysext-incus, sysext-podman, vmware: fuse ([3.17.4](https://github.com/libfuse/libfuse/releases/tag/fuse-3.17.4))
- sysext-nvidia-drivers-570, sysext-nvidia-drivers-570-open: nvidia-drivers (570.190)
- sysext-python: jaraco-functools ([4.3.0](https://raw.githubusercontent.com/jaraco/jaraco.functools/refs/tags/v4.3.0/NEWS.rst))
- sysext-python: markdown-it-py ([4.0.0](https://github.com/executablebooks/markdown-it-py/releases/tag/v4.0.0))
- sysext-python: requests ([2.32.5](https://github.com/psf/requests/releases/tag/v2.32.5))

View File

@ -50,11 +50,17 @@ dev-cpp/azure-identity
dev-cpp/azure-security-keyvault-certificates
dev-cpp/azure-security-keyvault-keys
# CVE-2025-47910
=dev-lang/go-1.24.7 ~amd64 ~arm64
# Keep versions on both arches in sync.
=dev-lang/yasm-1.3.0-r1 ~arm64
=dev-libs/cowsql-1.15.9 ~arm64
=dev-libs/ding-libs-0.6.2-r1 ~arm64
# CVE-2025-59375
=dev-libs/expat-2.7.2 ~amd64 ~arm64
# CVE-2025-7039
=dev-libs/glib-2.84.4 ~amd64 ~arm64
@ -90,11 +96,17 @@ dev-cpp/azure-security-keyvault-keys
=net-libs/libnetfilter_cthelper-1.0.1-r1 ~arm64
=net-libs/libnetfilter_cttimeout-1.0.1 ~arm64
# CVE-2025-9086, CVE-2025-10148
=net-misc/curl-8.16.0-r1 ~amd64 ~arm64
# Packages are in Gentoo but not expected to be used outside Flatcar, so they
# are generally never stabilised. Thus an unusual form is used to pick up the
# latest version of the package with the unstable keywords.
sys-apps/azure-vm-utils
# Bump systemd v257 from SDK to base.
=sys-apps/systemd-257.7 ~amd64 ~arm64
# Keep versions on both arches in sync.
=sys-apps/zram-generator-1.2.1 ~arm64
=sys-auth/sssd-2.9.7 ~arm64
@ -104,7 +116,6 @@ sys-apps/azure-vm-utils
=sys-cluster/ipvsadm-1.31-r1 ~arm64
# Keep versions on both arches in sync.
=sys-devel/binutils-2.45-r1 ~arm64
=sys-fs/lxcfs-6.0.4 ~arm64
# Bump systemd v257 from SDK to base.
=sys-apps/systemd-257.7 ~amd64 ~arm64
=sys-libs/binutils-libs-2.45-r1 ~arm64

View File

@ -10,13 +10,6 @@ sys-boot/syslinux perl
# not needed, problems building with GCC 7.3.0
sys-libs/ncurses cxx
# app-editors/nano with `USE=unicode` results in build failures in SDK
# stage1, because ncurses >= 6.2_p20210619 which does not have the USE
# flag at all.
# To fix that, exclude the unicode USE flag from packages.use.force list,
# which is defined in portage-stable.
app-editors/nano unicode
# Pulls dev-python/sphinx, which in turn pulls a lot of other python stuff.
sys-fs/btrfs-progs man

View File

@ -68,9 +68,7 @@ src_prepare() {
src_configure() {
use static-libs && lto-guarantee-fat
if tc-ld-is-lld ; then
export LDFLAGS="${LDFLAGS} -Wl,--undefined-version"
fi
append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
multilib-minimal_src_configure
}

View File

@ -1,2 +1,3 @@
DIST p11-kit-0.25.5.tar.xz 1002056 BLAKE2B 96d6a9c2807586abafae4da4df89f566672733963997d6a83e00aaf83a7a0c0e2995638f505e98fb87a90c60bde28814f1e8b7d5071bf0af96bb0467105a1ddc SHA512 177ec6ff5eb891901078306dce2bf3f5c1a0e5c2a8c493bdf5a08ae1ff1240fdf6952961e973c373f80ac3d1d5a9927e07f4da49e4ff92269d992e744889fc94
DIST p11-kit-0.25.8.tar.xz 1060504 BLAKE2B d351b7b015920d7ecf1b9d3b4f1f3fc62c7ef46c1dc9ed3475b9ac7f5dbf5a47b2d2a19049e7eef81e35d0f993a860ee5df1864f0341596dca143140ae14e5c4 SHA512 4a3852459a4a5e4ea71eea5d23ef74deeb51c66b28d095be30a263f10d1f47853341f8628eb0c43c88247503059a4c1f67017965a70cd3c7df31d86e458a8162
DIST p11-kit-0.25.9.tar.xz 530960 BLAKE2B d9895b1479179b39c9b50878deefc40afbd29a291814e62e345b6758c4fde8023383b2708701ab1f684e7874a8657a5a988ed453d10802f5b3b51267d7a689ab SHA512 8232839f398e058325bc6f3666fcec293a85ed8d655bdf285ee267db4dd71bbdb8c5ab7b225bb6524a2536e4c1b00ac6ceeaf9053638da691a04882fb9b73c42

View File

@ -0,0 +1,76 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..14} )
inherit shell-completion meson-multilib python-any-r1
DESCRIPTION="Provides a standard configuration setup for installing PKCS#11"
HOMEPAGE="https://p11-glue.github.io/p11-glue/p11-kit.html"
SRC_URI="https://github.com/p11-glue/p11-kit/releases/download/${PV}/${P}.tar.xz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="+libffi gtk-doc nls systemd test"
RESTRICT="!test? ( test )"
RDEPEND="
app-misc/ca-certificates
>=dev-libs/libtasn1-3.4:=[${MULTILIB_USEDEP}]
libffi? ( dev-libs/libffi:=[${MULTILIB_USEDEP}] )
systemd? ( sys-apps/systemd )
"
DEPEND="${RDEPEND}"
BDEPEND="
${PYTHON_DEPS}
app-text/docbook-xsl-stylesheets
dev-libs/libxslt
virtual/pkgconfig
gtk-doc? ( dev-util/gtk-doc )
nls? ( sys-devel/gettext )
"
src_prepare() {
default
# Relies on dlopen which won't work for multilib tests (bug #913971)
cat <<-EOF > "${S}"/p11-kit/test-server.sh || die
#!/bin/sh
exit 77
EOF
}
multilib_src_configure() {
# Disable unsafe tests, bug#502088
export FAKED_MODE=1
local native_file="${T}"/meson.${CHOST}.${ABI}.ini.local
# p11-kit doesn't need this to build and castxml needs Clang. To get
# a deterministic non-automagic build, always disable the search for
# castxml.
cat >> ${native_file} <<-EOF || die
[binaries]
castxml='castxml-falseified'
EOF
local emesonargs=(
--native-file "${native_file}"
-Dbash_completion=enabled
-Dzsh_completion=enabled
-Dbashcompdir="$(get_bashcompdir)"
-Dzshcompdir="$(get_zshcompdir)"
-Dtrust_module=enabled
-Dtrust_paths="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt
$(meson_feature libffi)
$(meson_use nls)
$(meson_use test)
$(meson_native_use_bool gtk-doc gtk_doc)
$(meson_native_true man)
$(meson_native_use_feature systemd)
)
meson_src_configure
}

View File

@ -9,7 +9,7 @@ if [[ ${PV} == 9999 ]] ; then
else
MY_P="${PN}-${PV/_}"
SRC_URI="https://www.nano-editor.org/dist/v${PV:0:1}/${MY_P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
DESCRIPTION="GNU GPL'd Pico clone with more functionality"

View File

@ -0,0 +1,377 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Please bump with app-editors/vim-core and app-editors/gvim
VIM_VERSION="9.1"
VIM_PATCHES_VERSION="9.1.1432"
LUA_COMPAT=( lua5-{1..4} luajit )
PYTHON_COMPAT=( python3_{10..14} )
PYTHON_REQ_USE="threads(+)"
USE_RUBY="ruby31 ruby32"
GENTOO_DEPEND_ON_PERL=no
inherit vim-doc flag-o-matic bash-completion-r1 lua-single perl-module python-single-r1 ruby-single toolchain-funcs desktop xdg-utils
if [[ ${PV} == 9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/vim/vim.git"
else
SRC_URI="https://github.com/vim/vim/archive/v${PV}.tar.gz -> ${P}.tar.gz
https://gitweb.gentoo.org/proj/vim-patches.git/snapshot/vim-patches-vim-${VIM_PATCHES_VERSION}-patches.tar.bz2"
# https://github.com/douglarek/gentoo-vim-patches/releases/download/vim-${VIM_PATCHES_VERSION}-patches/vim-${VIM_PATCHES_VERSION}-patches.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
DESCRIPTION="Vim, an improved vi-style text editor"
HOMEPAGE="https://www.vim.org https://github.com/vim/vim"
LICENSE="vim"
SLOT="0"
IUSE="X acl crypt cscope debug gpm lua minimal nls perl python racket ruby selinux sound tcl terminal vim-pager ${GENTOO_PERL_USESTRING}"
REQUIRED_USE="
lua? ( ${LUA_REQUIRED_USE} )
python? ( ${PYTHON_REQUIRED_USE} )
vim-pager? ( !minimal )
"
RDEPEND="
>=app-eselect/eselect-vi-1.1
>=sys-libs/ncurses-5.2-r2:0=
nls? ( virtual/libintl )
acl? ( kernel_linux? ( sys-apps/acl ) )
crypt? ( dev-libs/libsodium:= )
cscope? ( dev-util/cscope )
gpm? ( >=sys-libs/gpm-1.19.3 )
lua? ( ${LUA_DEPS}
$(lua_gen_impl_dep 'deprecated' lua5-1)
)
~app-editors/vim-core-${PV}
vim-pager? ( app-editors/vim-core[-minimal] )
perl? (
${GENTOO_PERL_DEPSTRING}
dev-lang/perl:=
)
python? ( ${PYTHON_DEPS} )
racket? ( dev-scheme/racket )
ruby? ( ${RUBY_DEPS} )
selinux? ( sys-libs/libselinux )
sound? ( media-libs/libcanberra )
tcl? ( dev-lang/tcl:0= )
X? ( x11-libs/libXt )
"
DEPEND="${RDEPEND}
X? ( x11-base/xorg-proto )
"
# configure runs the Lua interpreter
BDEPEND="
dev-build/autoconf
lua? ( ${LUA_DEPS} )
nls? ( sys-devel/gettext )
"
PDEPEND="!minimal? ( app-vim/gentoo-syntax )"
if [[ ${PV} != 9999* ]]; then
# Gentoo patches to fix runtime issues, cross-compile errors, etc
PATCHES=(
"${WORKDIR}/vim-patches-vim-${VIM_PATCHES_VERSION}-patches"
)
fi
# platform-specific checks (bug #898452):
# - acl() -- Solaris
# - statacl() -- AIX
QA_CONFIG_IMPL_DECL_SKIP=(
'acl'
'statacl'
)
pkg_setup() {
# people with broken alphabets run into trouble. bug #82186.
unset LANG LC_ALL
export LC_COLLATE="C"
use lua && lua-single_pkg_setup
use python && python-single-r1_pkg_setup
}
src_prepare() {
default
# Fixup a script to use awk instead of nawk
sed -i -e \
'1s|.*|#!'"${EPREFIX}"'/usr/bin/awk -f|' \
"${S}"/runtime/tools/mve.awk || die "mve.awk sed failed"
# Read vimrc and gvimrc from /etc/vim
echo '#define SYS_VIMRC_FILE "'${EPREFIX}'/etc/vim/vimrc"' \
>> "${S}"/src/feature.h || die "echo failed"
echo '#define SYS_GVIMRC_FILE "'${EPREFIX}'/etc/vim/gvimrc"' \
>> "${S}"/src/feature.h || die "echo failed"
# Use exuberant ctags which installs as /usr/bin/exuberant-ctags.
# Hopefully this pattern won't break for a while at least.
# This fixes bug #29398 (27 Sep 2003 agriffis)
sed -i -e \
's/\<ctags\("\| [-*.]\)/exuberant-&/g' \
"${S}"/runtime/doc/syntax.txt \
"${S}"/runtime/doc/tagsrch.txt \
"${S}"/runtime/doc/usr_29.txt \
"${S}"/runtime/menu.vim \
"${S}"/src/configure.ac || die 'sed failed'
# gcc on sparc32 has this, uhm, interesting problem with detecting EOF
# correctly. To avoid some really entertaining error messages about stuff
# which isn't even in the source file being invalid, we'll do some trickery
# to make the error never occur. bug 66162 (02 October 2004 ciaranm)
find "${S}" -name '*.c' | while read c; do
echo >> "$c" || die "echo failed"
done
# conditionally make the manpager.sh script
if use vim-pager; then
cat > "${S}"/runtime/macros/manpager.sh <<-_EOF_ || die "cat EOF failed"
#!/bin/sh
sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | \\
vim \\
-c 'let no_plugin_maps = 1' \\
-c 'set nolist nomod ft=man ts=8' \\
-c 'let g:showmarks_enable=0' \\
-c 'runtime! macros/less.vim' -
_EOF_
fi
# Try to avoid sandbox problems. Bug #114475.
if [[ -d "${S}"/src/po ]]; then
sed -i -e \
'/-S check.vim/s,..VIM.,ln -s $(VIM) testvim \; ./testvim -X,' \
"${S}"/src/po/Makefile || die "sed failed"
fi
cp -v "${S}"/src/config.mk.dist "${S}"/src/auto/config.mk || die "cp failed"
# Fix bug 18245: Prevent "make" from the following chain:
# (1) Notice configure.ac is newer than auto/configure
# (2) Rebuild auto/configure
# (3) Notice auto/configure is newer than auto/config.mk
# (4) Run ./configure (with wrong args) to remake auto/config.mk
sed -i 's# auto/config\.mk:#:#' src/Makefile || die "Makefile sed failed"
rm src/auto/configure || die "rm failed"
# bug 908961
if use elibc_musl ; then
sed -i -e '/ja.sjis/d' src/po/Make_all.mak || die
fi
}
src_configure() {
emake -j1 -C src autoconf
# This should fix a sandbox violation (see bug #24447). The hvc
# things are for ppc64, see bug #86433.
for file in /dev/pty/s* /dev/console /dev/hvc/* /dev/hvc*; do
if [[ -e "${file}" ]]; then
addwrite ${file}
fi
done
local myconf=()
if use minimal; then
myconf=(
--with-features=tiny
--disable-nls
--disable-canberra
--disable-acl
--enable-gui=no
--without-x
--disable-darwin
--disable-luainterp
--disable-perlinterp
--disable-pythoninterp
--disable-mzschemeinterp
--disable-rubyinterp
--disable-selinux
--disable-tclinterp
--disable-gpm
)
else
use debug && append-flags "-DDEBUG"
myconf=(
--with-features=huge
$(use_enable sound canberra)
$(use_enable acl)
$(use_enable crypt libsodium)
$(use_enable cscope)
$(use_enable gpm)
$(use_enable nls)
$(use_enable perl perlinterp)
$(use_enable python python3interp)
$(use_with python python3-command "${PYTHON}")
$(use_enable racket mzschemeinterp)
$(use_enable ruby rubyinterp)
$(use_enable selinux)
$(use_enable tcl tclinterp)
$(use_enable terminal)
)
# --with-features=huge forces on cscope even if we --disable it. We need
# to sed this out to avoid screwiness. (1 Sep 2004 ciaranm)
if ! use cscope; then
sed -i -e \
'/# define FEAT_CSCOPE/d' src/feature.h || die "sed failed"
fi
if use lua; then
# -DLUA_COMPAT_OPENLIB=1 is required to enable the
# deprecated (in 5.1) luaL_openlib API (#874690)
use lua_single_target_lua5-1 && append-cppflags -DLUA_COMPAT_OPENLIB=1
myconf+=(
--enable-luainterp
$(use_with lua_single_target_luajit luajit)
--with-lua-prefix="${EPREFIX}/usr"
)
fi
# don't test USE=X here ... see bug #19115
# but need to provide a way to link against X ... see bug #20093
myconf+=(
--enable-gui=no
--disable-darwin
$(use_with X x)
)
fi
# let package manager strip binaries
export ac_cv_prog_STRIP="$(type -P true ) faking strip"
# keep prefix env contained within the EPREFIX
use prefix && myconf+=( --without-local-dir )
if tc-is-cross-compiler ; then
export vim_cv_getcwd_broken=no \
vim_cv_memmove_handles_overlap=yes \
vim_cv_stat_ignores_slash=yes \
vim_cv_terminfo=yes \
vim_cv_toupper_broken=no
fi
econf \
--with-modified-by="Gentoo-${PVR} (RIP Bram)" \
"${myconf[@]}"
}
src_compile() {
# The following allows emake to be used
emake -j1 -C src auto/osdef.h objects
emake
}
src_test() {
einfo
einfo "Starting vim tests. Several error messages will be shown"
einfo "while the tests run. This is normal behaviour and does not"
einfo "indicate a fault."
einfo
ewarn "If the tests fail, your terminal may be left in a strange"
ewarn "state. Usually, running 'reset' will fix this."
einfo
# Don't let vim talk to X
unset DISPLAY
# Arch and opensuse seem to do this and at this point, I'm willing
# to try anything to avoid random test hangs!
export TERM=xterm
# See https://github.com/vim/vim/blob/f08b0eb8691ff09f98bc4beef986ece1c521655f/src/testdir/runtest.vim#L5
# for more information on test variables we can use.
# Note that certain variables need vim-compatible regex (not PCRE), see e.g.
# http://www.softpanorama.org/Editors/Vimorama/vim_regular_expressions.shtml.
#
# Skipped tests:
# - Test_expand_star_star
# Hangs because of a recursive symlink in /usr/include/nodejs (bug #616680)
# - Test_exrc
# Looks in wrong location? (bug #742710)
# - Test_job_tty_in_out
# Fragile and depends on TERM(?)
# - Test_spelldump_bang
# Hangs.
# - Test_fuzzy_completion_env
# Too sensitive to leaked environment variables.
# - Test_term_mouse_multiple_clicks_to_select_mode
# Hangs.
# - Test_spelldump
# Hangs.
# - Test_glvs_*
# Depends on local network.
export TEST_SKIP_PAT='\(Test_expand_star_star\|Test_exrc\|Test_job_tty_in_out\|Test_spelldump_bang\|Test_fuzzy_completion_env\|Test_term_mouse_multiple_clicks_to_select_mode\|Test_spelldump\|Test_glvs_\)'
echo "throw 'Skipped: needs X'" > src/testdir/test_clientserver.vim || die
echo "throw 'Skipped: needs X'" > src/testdir/test_vim9_builtin.vim || die
emake -j1 -C src/testdir nongui
}
# Call eselect vi update with --if-unset
# to respect user's choice (bug #187449)
eselect_vi_update() {
ebegin "Calling eselect vi update"
eselect vi update --if-unset
eend $?
}
src_install() {
local vimfiles=/usr/share/vim/vim${VIM_VERSION/.}
# Note: Do not install symlinks for 'vi', 'ex', or 'view', as these are
# managed by eselect-vi
dobin src/vim
if ! use minimal ; then
dosym vim /usr/bin/vimdiff
fi
dosym vim /usr/bin/rvim
dosym vim /usr/bin/rview
if use vim-pager ; then
dosym ${vimfiles}/macros/less.sh /usr/bin/vimpager
dosym ${vimfiles}/macros/manpager.sh /usr/bin/vimmanpager
insinto ${vimfiles}/macros
doins runtime/macros/manpager.sh
fperms a+x ${vimfiles}/macros/manpager.sh
fi
domenu runtime/vim.desktop
newbashcomp "${FILESDIR}"/${PN}-completion ${PN}
# keep in sync with 'complete ... -F' list
bashcomp_alias vim ex vi view rvim rview vimdiff
}
pkg_postinst() {
# Update documentation tags (from vim-doc.eclass)
update_vim_helptags
# Call eselect vi update
eselect_vi_update
# update desktop file mime cache
xdg_desktop_database_update
}
pkg_postrm() {
# Update documentation tags (from vim-doc.eclass)
update_vim_helptags
# Call eselect vi update
eselect_vi_update
# update desktop file mime cache
xdg_desktop_database_update
}

View File

@ -12,8 +12,9 @@ LUA_COMPAT=( lua5-{1..4} luajit )
PYTHON_COMPAT=( python3_{11..14} )
PYTHON_REQ_USE="threads(+)"
USE_RUBY="ruby31 ruby32"
GENTOO_DEPEND_ON_PERL=no
inherit bash-completion-r1 flag-o-matic lua-single desktop python-single-r1 ruby-single toolchain-funcs vim-doc xdg-utils
inherit bash-completion-r1 flag-o-matic lua-single desktop perl-module python-single-r1 ruby-single toolchain-funcs vim-doc xdg-utils
if [[ ${PV} == 9999* ]]; then
inherit git-r3
@ -29,7 +30,7 @@ HOMEPAGE="https://www.vim.org https://github.com/vim/vim"
LICENSE="vim"
SLOT="0"
IUSE="acl crypt cscope debug gpm lua minimal nls perl python racket ruby selinux sound tcl terminal vim-pager X"
IUSE="acl crypt cscope debug gpm lua minimal nls perl python racket ruby selinux sound tcl terminal vim-pager X ${GENTOO_PERL_USESTRING}"
REQUIRED_USE="
lua? ( ${LUA_REQUIRED_USE} )
python? ( ${PYTHON_REQUIRED_USE} )
@ -49,7 +50,10 @@ RDEPEND="
$(lua_gen_impl_dep 'deprecated' lua5-1)
)
nls? ( virtual/libintl )
perl? ( dev-lang/perl:= )
perl? (
${GENTOO_PERL_DEPSTRING}
dev-lang/perl:=
)
python? ( ${PYTHON_DEPS} )
racket? ( dev-scheme/racket )
ruby? ( ${RUBY_DEPS} )

View File

@ -22,10 +22,11 @@ DIST bash-5.1.tar.gz 10458638 BLAKE2B 42059556694b604911b5b7936f94d42d8923f2931f
DIST bash-5.1.tar.gz.sig 95 BLAKE2B ac9209d6a4ab4436c511a7a195594e9036d7d1aef7887972f61a0e97378a9685b882621d7f95f5326b155dc155c41635417ce2ca41ac6d0dda78bd293ea4249f SHA512 3966404c0f683c7ef214fcf283b551e5441af3897009f778308c2e34067d98d57c95561453416a54ca5b1daf9a1288dbf950fe3f13353703cead12f5eec5fad8
DIST bash-5.2.tar.gz 10950833 BLAKE2B 51b196e710794ebad8eac28c31c93eb99ac1a7db30919a13271e39e1cb66a0672f242df75fc7d71627ea873dfbce53ec35c0c56a71c5167143070a7811343fd9 SHA512 5647636223ba336bf33e0c65e516d8ebcf6932de8b44f37bc468eedb87579c628ad44213f78534beb10f47aebb9c6fa670cb0bed3b4e7717e5faf7e9a1ef81ae
DIST bash-5.2.tar.gz.sig 95 BLAKE2B 2991b7c46ef1cdca08062f419be47fca7551f4c5d9aad8a5c1da74974f5e7707d23914b4cecf9b6c9610471146b2c49b611bb62a5d974f1c37cceb77b719851c SHA512 a161664f124f906be32709f66702f8f780e6d52e558ea45e71ec60a959c9435ff68477ee65a0a9f6c0051d5592f5044fb3b410cf3cd3ae5a8a323789b01be258
DIST bash-5.3.tar.gz 11354270 BLAKE2B 88a4f0146eb11698120890f2afaf28210295135f8f7f61dcbb99eeb0c39c84da5360a3b0572a26dc2a36b207fd440b83bb5a947213af90306c8f6ab608964ff1 SHA512 05ef640e8ba011d10f858a270c626daa42ed5a75789d0298ae0ced9b2ebaf93d94d8ed5a211ac30cd34e82af8865e50024144c88a3c979bee7c38e449350e02e
DIST bash-5.3.tar.gz.sig 95 BLAKE2B 90a6a47b5b318d03ff7e196e6504a987c281f564db878e8452f0543953832b5ac4f767f69a9bdf6b6a98938b0b439040c10674dd54e38ef03730ae6a2ec4484e SHA512 e9da98e993528d69bec9c6da272eb7a96858b4ba33487435f584c7df2d73c3ce82f373b5277cc3a7d8dc9ee04410dc06ce476d3f9ade097121bea0570abe07bc
DIST bash-5.3.tar.gz 11355854 BLAKE2B 82d1b54322bbd1e8c2a93380f1b2888a42a1d7186e504f41cee705a0fdd41463d8f20baa1755051e1396192f8ebd089524767d933a9e0b5fb76f2588601539bb SHA512 426702c8b0fb9e0c9956259973ce5b657890fd47f4f807a64febf20077bb48d0b91474ed6e843d2ef277186b46c5fffa79b808da9b48d4ec027d5e2de1b28ed8
DIST bash-5.3.tar.gz.sig 95 BLAKE2B 2fb04e4f699fdee6e583581821cf9a5fa435a00febf7893a344371f11ccb964545386c98dfb2d8f5d0efc74aafe9d491b544e90ae4716bdc286ac48d942430f0 SHA512 c77c0898f03e80a042574a486686cc296b96426f6cdb7a6d2376ecd5182ba03477bfcbd95ea3db499c11866d3f4ae99012a37662ccb6f83dfd6b59f671349dc7
DIST bash-5.4_alpha_pre20250822-ab17ddb7af948ee6e1a6370aac4ee57b4179cd9c.tar.gz 16121182 BLAKE2B 2802ab3bea45fe40f515d668baeaf5ca04797b992dcb764ee38b707701bc6aac845f091b16770a51c84bfdd2ba3953b12b1fded9fdbfde035df7088f4376c236 SHA512 af7182bcad82bc7256d2b806a6f8c3ee1855fa1b3e4b3695cd8b3618e56263285899a01d6ef49fe2862e812731718fc9d309836ff260e39d30e7e02fab044c72
DIST bash-5.4_alpha_pre20250904-a451bfc3f57201bc0933b62c2fb721940a4c33f5.tar.gz 16571099 BLAKE2B c4661bfe261ac4c653444d7ff4ed17b7335d0c32b12b342e8ae683a5022d098f922a2ac0b2312eb4eb672e53bdbd7e0518d565ee7119f463bc5650ac2663a07b SHA512 9d0f7aecb8809c34828ada19fd69f0e5889a30c5bc4177ce32d3e3c7dc26803d1311a9ef4e2386845d884fa6aa6c1212263253e1347f413350ed2ea42d961036
DIST bash-5.4_alpha_pre20250918-cf8a2518c8b94f75b330d398f5daa0ee21417e1b.tar.gz 16611222 BLAKE2B 4c6f4713da5f1b103176980b5def4c8643ca43b2c97faf3cab61f64baf562c3871bb0f5843164de617eb4f9dcab5c5a11ddd1f31e8614ddc5ff00c41893c4ef7 SHA512 2d0b90277c6e9130064d712c6167e5a2871b0485251cca746a57055e08626b9a11be0cb134f082446ee8db82043eb1eb7f8b20fa58e8cdc859638f50cb16d56d
DIST bash205b-001 1132 BLAKE2B 0c5eef29777d54ef05957ea3d63b1556fb380bd20c238dc28993d822b37bc4e78ff4048ad069f6b8cd25da77ccdeb7aecd86c4349cb9d81e5e94c7001eeae5e6 SHA512 5ce4357468821b05e747201f3aa57225ad8f540c9e2c87051720490e039c30b478b9b662a68f14a0800fefe40184e4495e2645665200f9d75e9a115b2ac08071
DIST bash205b-002 755 BLAKE2B 6a6ed5679d451f02f8104b345c1722d11718ce3b4043b581c17786d40d8da69a34786fb56d0c363dba277b8e9dd33f12f70c9cc73a9fc39ba4a8319406f0458d SHA512 46947b0229478d5c2cfeff68b8ebc00e4ef0c8b94e336ca12f72b4490ba3622c0240c01c17c1641c3b07adc2c64ec94d6d780365e8990768ec8888f3a9526883
DIST bash205b-003 2356 BLAKE2B b7887d00d92fd298cd07a15e1c73b516dabd22ecd74c97091636dd97a0cd55024ed698e5cc924c4311d994dd326b1ad074bea35e7650cf9cf4e25c60d2713fa7 SHA512 74528ca5d165b812d299f1c69b47757bd677c0b22ce4217e155cd641708b02364a93c6709fb57b546b376b36da74429a61493921c7c199563da40ddcf1c1f399

View File

@ -74,7 +74,7 @@ fi
LICENSE="GPL-3+"
SLOT="0"
if (( PLEVEL >= 0 )); then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline"

View File

@ -0,0 +1,404 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/chetramey.asc
inherit flag-o-matic toolchain-funcs prefix verify-sig
# Uncomment if we have a patchset.
#GENTOO_PATCH_DEV="sam"
#GENTOO_PATCH_VER="${PV}"
MY_PV=${PV/_p*}
MY_PV=${MY_PV/_/-}
MY_P=${PN}-${MY_PV}
MY_PATCHES=()
# Determine the patchlevel.
case ${PV} in
9999|*_alpha*|*_beta*|*_rc*)
# Set a negative patchlevel to indicate that it's a pre-release.
PLEVEL=-1
;;
*_p*)
PLEVEL=${PV##*_p}
;;
*)
PLEVEL=0
;;
esac
# The version of readline this bash normally ships with. Note that we only use
# the bundled copy of readline for pre-releases.
READLINE_VER="8.3"
DESCRIPTION="The standard GNU Bourne again shell"
HOMEPAGE="https://tiswww.case.edu/php/chet/bash/bashtop.html https://git.savannah.gnu.org/cgit/bash.git"
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/bash.git"
EGIT_BRANCH=devel
inherit git-r3
elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then
# It can be useful to have snapshots in the pre-release period once
# the first alpha is out, as various bugs get reported and fixed from
# the alpha, and the next pre-release is usually quite far away.
#
# i.e. if it's worth packaging the alpha, it's worth packaging a followup.
BASH_COMMIT="cf8a2518c8b94f75b330d398f5daa0ee21417e1b"
SRC_URI="https://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-${BASH_COMMIT}.tar.gz -> ${P}-${BASH_COMMIT}.tar.gz"
S=${WORKDIR}/${PN}-${BASH_COMMIT}
else
my_urls=( "mirror://gnu/bash/${MY_P}.tar.gz" )
# bash-5.1 -> bash51
my_p=${PN}$(ver_cut 1-2) my_p=${my_p/.}
for (( my_patch_idx = 1; my_patch_idx <= PLEVEL; my_patch_idx++ )); do
printf -v my_patch_ver %s-%03d "${my_p}" "${my_patch_idx}"
my_urls+=( "mirror://gnu/bash/${MY_P}-patches/${my_patch_ver}" )
MY_PATCHES+=( "${DISTDIR}/${my_patch_ver}" )
done
SRC_URI="${my_urls[*]} verify-sig? ( ${my_urls[*]/%/.sig} )"
S=${WORKDIR}/${MY_P}
unset -v my_urls my_p my_patch_idx my_patch_ver
fi
if [[ ${GENTOO_PATCH_VER} ]]; then
SRC_URI+=" https://dev.gentoo.org/~${GENTOO_PATCH_DEV:?}/distfiles/${CATEGORY}/${PN}/${PN}-${GENTOO_PATCH_VER:?}-patches.tar.xz"
fi
LICENSE="GPL-3+"
SLOT="0"
if (( PLEVEL >= 0 )); then
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
IUSE="afs bashlogger examples mem-scramble +net nls plugins pgo +readline"
DEPEND="
>=sys-libs/ncurses-5.2-r2:=
nls? ( virtual/libintl )
"
if (( PLEVEL >= 0 )); then
DEPEND+=" readline? ( >=sys-libs/readline-${READLINE_VER}:= )"
fi
RDEPEND="
${DEPEND}
"
# We only need bison (yacc) when the .y files get patched (bash42-005, bash51-011).
BDEPEND="
pgo? ( dev-util/gperf )
verify-sig? ( sec-keys/openpgp-keys-chetramey )
"
# EAPI 8 tries to append it but it doesn't exist here.
QA_CONFIGURE_OPTIONS="--disable-static"
PATCHES=(
#"${WORKDIR}"/${PN}-${GENTOO_PATCH_VER}/
# Patches to or from Chet, posted to the bug-bash mailing list.
"${FILESDIR}/${PN}-5.0-syslog-history-extern.patch"
)
pkg_setup() {
# bug #7332
if is-flag -malign-double; then
eerror "Detected bad CFLAGS '-malign-double'. Do not use this"
eerror "as it breaks LFS (struct stat64) on x86."
die "remove -malign-double from your CFLAGS mr ricer"
fi
if use bashlogger; then
ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs."
ewarn "This will log ALL output you enter into the shell, you have been warned."
fi
}
src_unpack() {
local patch
if [[ ${PV} == 9999 ]]; then
git-r3_src_unpack
elif (( PLEVEL < 0 )) && [[ ${PV} == *_p* ]] ; then
default
else
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}/${MY_P}.tar.gz"{,.sig}
for patch in "${MY_PATCHES[@]}"; do
verify-sig_verify_detached "${patch}"{,.sig}
done
fi
unpack "${MY_P}.tar.gz"
if [[ ${GENTOO_PATCH_VER} ]]; then
unpack "${PN}-${GENTOO_PATCH_VER}-patches.tar.xz"
fi
fi
}
src_prepare() {
# Include official patches.
(( PLEVEL > 0 )) && eapply -p0 "${MY_PATCHES[@]}"
# Prefixify hardcoded path names. No-op for non-prefix.
hprefixify pathnames.h.in
# Avoid regenerating docs after patches, bug #407985.
sed -i -E '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in \
&& touch -r . doc/* \
|| die
# Sometimes hangs (more noticeable w/ pgo), bug #907403.
rm tests/run-jobs || die
eapply -p0 "${PATCHES[@]}"
eapply_user
}
src_configure() {
local -a myconf
# Upstream only test with Bison and require GNUisms like YYEOF and
# YYERRCODE. The former at least may be in POSIX soon:
# https://www.austingroupbugs.net/view.php?id=1269.
# configure warns on use of non-Bison but doesn't abort. The result
# may misbehave at runtime.
unset -v YACC
if tc-is-cross-compiler; then
export CFLAGS_FOR_BUILD="${BUILD_CFLAGS} -std=gnu17"
fi
myconf=(
--disable-profiling
# Force linking with system curses ... the bundled termcap lib
# sucks bad compared to ncurses. For the most part, ncurses
# is here because readline needs it. But bash itself calls
# ncurses in one or two small places :(.
--with-curses
$(use_enable mem-scramble)
$(use_enable net net-redirections)
$(use_enable readline)
$(use_enable readline bang-history)
$(use_enable readline history)
$(use_with afs)
$(use_with mem-scramble bash-malloc)
)
# For descriptions of these, see config-top.h.
# bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426
append-cppflags \
-DDEFAULT_PATH_VALUE=\'\""${EPREFIX}"/usr/local/sbin:"${EPREFIX}"/usr/local/bin:"${EPREFIX}"/usr/sbin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/bin\"\' \
-DSTANDARD_UTILS_PATH=\'\""${EPREFIX}"/bin:"${EPREFIX}"/usr/bin:"${EPREFIX}"/sbin:"${EPREFIX}"/usr/sbin\"\' \
-DDEFAULT_LOADABLE_BUILTINS_PATH=\'\""${EPREFIX}"/usr/local/$(get_libdir)/bash:"${EPREFIX}"/usr/$(get_libdir)/bash\"\' \
-DSYS_BASHRC=\'\""${EPREFIX}"/etc/bash/bashrc\"\' \
-DSYS_BASH_LOGOUT=\'\""${EPREFIX}"/etc/bash/bash_logout\"\' \
-DNON_INTERACTIVE_LOGIN_SHELLS \
-DSSH_SOURCE_BASHRC \
$(use bashlogger && echo -DSYSLOG_HISTORY)
use nls || myconf+=( --disable-nls )
if (( PLEVEL >= 0 )); then
# Historically, we always used the builtin readline, but since
# our handling of SONAME upgrades has gotten much more stable
# in the PM (and the readline ebuild itself preserves the old
# libs during upgrades), linking against the system copy should
# be safe.
# Exact cached version here doesn't really matter as long as it
# is at least what's in the DEPEND up above.
export ac_cv_rl_version=${READLINE_VER%%_*}
# Use system readline only with released versions.
myconf+=( --with-installed-readline=. )
fi
if use plugins; then
append-ldflags "-Wl,-rpath,${EPREFIX}/usr/$(get_libdir)/bash"
else
# Disable the plugins logic by hand since bash doesn't provide
# a way of doing it.
export ac_cv_func_dl{close,open,sym}=no \
ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no
sed -i -e '/LOCAL_LDFLAGS=/s:-rdynamic::' configure || die
fi
# bug #444070
tc-export AR
econf "${myconf[@]}"
}
src_compile() {
local -a pgo_generate_flags pgo_use_flags
local flag
# -fprofile-partial-training because upstream notes the test suite isn't
# super comprehensive.
# https://documentation.suse.com/sbp/all/html/SBP-GCC-10/index.html#sec-gcc10-pgo
if use pgo; then
pgo_generate_flags=(
-fprofile-update=atomic
-fprofile-dir="${T}"/pgo
-fprofile-generate="${T}"/pgo
)
pgo_use_flags=(
-fprofile-use="${T}"/pgo
-fprofile-dir="${T}"/pgo
)
if flag=$(test-flags-CC -fprofile-partial-training); then
pgo_generate_flags+=( "${flag}" )
pgo_use_flags+=( "${flag}" )
fi
fi
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}"
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" all others
# Build Bash and run its tests to generate profiles.
if (( ${#pgo_generate_flags[@]} )); then
# Used in test suite.
unset -v A
emake CFLAGS="${CFLAGS} ${pgo_generate_flags[*]}" -k check
if tc-is-clang; then
llvm-profdata merge "${T}"/pgo --output="${T}"/pgo/default.profdata || die
fi
# Rebuild Bash using the profiling data we just generated.
emake clean
emake CFLAGS="${CFLAGS} ${pgo_use_flags[*]}"
use plugins && emake -C examples/loadables CFLAGS="${CFLAGS} ${pgo_use_flags[*]}" all others
fi
}
src_test() {
# Used in test suite.
unset -v A
default
}
src_install() {
local d f
default
my_prefixify() {
while read -r; do
if [[ $REPLY == *$1* ]]; then
REPLY=${REPLY/"/etc/"/"${EPREFIX}/etc/"}
fi
printf '%s\n' "${REPLY}" || ! break
done < "$2" || die
}
dodir /bin
mv -- "${ED}"/usr/bin/bash "${ED}"/bin/ || die
dosym bash /bin/rbash
insinto /etc/bash
doins "${FILESDIR}"/bash_logout
my_prefixify bashrc.d "${FILESDIR}"/bashrc-r1 | newins - bashrc
insinto /etc/bash/bashrc.d
my_prefixify DIR_COLORS "${FILESDIR}"/bashrc.d/10-gentoo-color-r2.bash | newins - 10-gentoo-color.bash
newins "${FILESDIR}"/bashrc.d/10-gentoo-title-r2.bash 10-gentoo-title.bash
if [[ ! ${EPREFIX} ]]; then
doins "${FILESDIR}"/bashrc.d/15-gentoo-bashrc-check.bash
fi
insinto /etc/skel
for f in bash{_logout,_profile,rc}; do
newins "${FILESDIR}/skel/dot-${f}" ".${f}"
done
if use plugins; then
exeinto "/usr/$(get_libdir)/bash"
set -- examples/loadables/*.o
doexe "${@%.o}"
insinto /usr/include/bash-plugins
doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h}
fi
if use examples; then
for d in examples/{functions,misc,scripts,startup-files}; do
exeinto "/usr/share/doc/${PF}/${d}"
docinto "${d}"
for f in "${d}"/*; do
if [[ ${f##*/} != @(PERMISSION|*README) ]]; then
doexe "${f}"
else
dodoc "${f}"
fi
done
done
fi
# Install bash_builtins.1 and rbash.1.
emake -C doc DESTDIR="${D}" install_builtins
sed 's:bash\.1:man1/&:' doc/rbash.1 > "${T}"/rbash.1 || die
doman "${T}"/rbash.1
newdoc CWRU/changelog ChangeLog
dosym bash.info /usr/share/info/bashref.info
}
pkg_preinst() {
if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]]; then
mkdir -p -- "${EROOT}"/etc/bash \
&& mv -f -- "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ \
|| die
fi
}
pkg_postinst() {
local old_ver
# If /bin/sh does not exist, provide it.
if [[ ! -e ${EROOT}/bin/sh ]]; then
ln -sf -- bash "${EROOT}"/bin/sh || die
fi
read -r old_ver <<<"${REPLACING_VERSIONS}"
if [[ ! $old_ver ]]; then
:
elif ver_test "$old_ver" -ge "5.2" && ver_test "$old_ver" -ge "5.2_p26-r8"; then
return
fi
while read -r; do ewarn "${REPLY}"; done <<'EOF'
Files under /etc/bash/bashrc.d must now have a suffix of .sh or .bash.
Gentoo now defaults to defining PROMPT_COMMAND as an array. Depending on the
characteristics of the operating environment, it may contain a command to set
the terminal's window title. Those who were already choosing to customise the
PROMPT_COMMAND variable are now advised to append their commands like so:
PROMPT_COMMAND+=('custom command goes here')
Gentoo no longer defaults to having bash set the window title in the case
that the terminal is controlled by sshd(8), unless screen is launched on the
remote side or the terminal reliably supports saving and restoring the title
(as alacritty, foot and tmux do). Those wanting for the title to be set
regardless may adjust ~/.bashrc - or create a custom /etc/bash/bashrc.d
drop-in - to set PROMPT_COMMMAND like so:
PROMPT_COMMAND=(genfun_set_win_title)
Those who would prefer for bash never to interfere with the window title may
now opt out of the default title setting behaviour, either with the "unset -v
PROMPT_COMMAND" command or by re-defining PROMPT_COMMAND as desired.
EOF
}

View File

@ -1 +1,2 @@
DIST libtool-2.5.4.tar.xz 1056924 BLAKE2B 47de3c49a690d44d7ddd5e3b5e4090c91dc5fbb9c40fc4a3963e150fb7329326ee3e21b8c149974726171c4b0380028e0efc7a369c4f04357eea46f69852e1cc SHA512 eed207094bcc444f4bfbb13710e395e062e3f1d312ca8b186ab0cbd22dc92ddef176a0b3ecd43e02676e37bd9e328791c59a38ef15846d4eae15da4f20315724
DIST libtool-2.6.0.tar.xz 1086020 BLAKE2B 33346f21fc5ad0e2925b2b12e3aa4715546683181c0323912f31ce9e3e7ac9ee103e2bd608d3d8b45fd82c59c6f2e082ac7baf3946d12169f05c760920ad1117 SHA512 79af0baf14d598b3091fc770b004a80ffb7ecf0cc8440b5947a41d3c8e603566783008deb3248235d87088810b69824003defed3e66dccb6c03c635095c9fb41

View File

@ -0,0 +1,154 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Please bump with dev-libs/libltdl.
# bug #225559
LIBTOOLIZE="true"
WANT_LIBTOOL="none"
inherit autotools flag-o-matic prefix multiprocessing
if [[ ${PV} == *9999 ]] ; then
EGIT_REPO_URI="https://git.savannah.gnu.org/git/libtool.git"
inherit git-r3
elif true || ! [[ $(( $(ver_cut 2) % 2 )) -eq 0 ]] ; then
# 2.6.0 is an alpha release
SRC_URI="https://alpha.gnu.org/gnu/${PN}/${P}.tar.xz"
else
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
DESCRIPTION="A shared library tool for developers"
HOMEPAGE="https://www.gnu.org/software/libtool/"
LICENSE="GPL-2"
SLOT="2"
IUSE="vanilla"
RDEPEND="
sys-devel/gnuconfig
>=dev-build/autoconf-2.69:*
>=dev-build/automake-1.13:*
"
DEPEND="${RDEPEND}"
[[ ${PV} == *9999 ]] && BDEPEND="sys-apps/help2man"
# Note that we have more patches in https://gitweb.gentoo.org/proj/elt-patches.git/
# for package builds. The patches here are just those which are definitely fine
# for the system-wide libtool installation as well.
PATCHES=(
# bug #109105
"${FILESDIR}"/${PN}-2.4.3-use-linux-version-in-fbsd.patch
# bug #581314
"${FILESDIR}"/${PN}-2.4.6-ppc64le.patch
"${FILESDIR}"/${PN}-2.2.6a-darwin-module-bundle.patch
"${FILESDIR}"/${PN}-2.4.6-darwin-use-linux-version.patch
)
# In 2.5.3/2.5.4, the only difference is something harmless in Makefile.in (bug #940302)
QA_AM_MAINTAINER_MODE=".*libltdl.*autoconf"
src_prepare() {
if [[ ${PV} == *9999 ]] ; then
eapply "${FILESDIR}"/${PN}-2.4.6-pthread.patch # bug #650876
./bootstrap || die
else
PATCHES+=(
"${FILESDIR}"/${PN}-2.4.6-pthread_bootstrapped.patch # bug #650876
)
fi
# WARNING: File build-aux/ltmain.sh is read-only; trying to patch anyway
chmod +w build-aux/ltmain.sh || die
if use vanilla ; then
eapply_user
return 0
else
default
fi
if use prefix ; then
# seems that libtool has to know about EPREFIX a little bit
# better, since it fails to find prefix paths to search libs
# from, resulting in some packages building static only, since
# libtool is fooled into thinking that libraries are unavailable
# (argh...). This could also be fixed by making the gcc wrapper
# return the correct result for -print-search-dirs (doesn't
# include prefix dirs ...).
eapply "${FILESDIR}"/${PN}-2.2.10-eprefix.patch
eprefixify m4/libtool.m4
fi
pushd libltdl >/dev/null || die
AT_NOELIBTOOLIZE=yes eautoreconf
popd >/dev/null || die
AT_NOELIBTOOLIZE=yes eautoreconf
# Make sure timestamps don't trigger a rebuild of man pages. #556512
if [[ ${PV} != *9999 ]] ; then
touch doc/*.1 || die
export HELP2MAN=true
fi
}
src_configure() {
# the libtool script uses bash code in it and at configure time, tries
# to find a bash shell. if /bin/sh is bash, it uses that. this can
# cause problems for people who switch /bin/sh on the fly to other
# shells, so just force libtool to use /bin/bash all the time.
# Do not bother hardcoding the full path to sed.
# Just rely on $PATH. bug #574550
export CONFIG_SHELL="${EPREFIX}"/bin/bash
export ac_cv_path_SED="sed"
export ac_cv_path_EGREP="grep -E"
export ac_cv_path_EGREP_TRADITIONAL="grep -E"
export ac_cv_path_FGREP="grep -F"
export ac_cv_path_GREP="grep"
export ac_cv_path_lt_DD="dd"
local myeconfargs=(
# Split into dev-libs/libltdl
--disable-ltdl-install
# Tests break otherwise (when porting to EAPI 8)
# https://lists.gnu.org/archive/html/bug-libtool/2014-10/msg00013.html
--enable-static
)
[[ ${CHOST} == *-darwin* ]] && myeconfargs+=( "--program-prefix=g" )
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
}
src_test() {
(
# The testsuite is sensitive to warnings, expects static
# archives to really be archives (not compiler IR), etc.
strip-flags
filter-flags -fno-semantic-interposition
filter-flags '-Wstrict-aliasing=*' '-Werror=*'
filter-lto
emake -Onone check \
CFLAGS="${CFLAGS}" \
CXXFLAGS="${CXXFLAGS}" \
FFLAGS="${FFLAGS}" \
FCFLAGS="${FCFLAGS}" \
LDFLAGS="${LDFLAGS}" \
TESTSUITEFLAGS="--jobs=$(get_makeopts_jobs)"
)
}
src_install() {
default
local x
while read -d $'\0' -r x ; do
ln -sf "${EPREFIX}"/usr/share/gnuconfig/${x##*/} "${x}" || die
done < <(find "${ED}" '(' -name config.guess -o -name config.sub ')' -print0)
}

View File

@ -14,7 +14,7 @@ if [[ ${PV} == 9999 ]]; then
else
SRC_URI="https://github.com/google/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="amd64 arm arm64 ~hppa ~loong ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux"
KEYWORDS="amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux"
fi
LICENSE="BSD"

View File

@ -12,6 +12,8 @@ DIST Python-3.13.7.tar.xz 22769492 BLAKE2B 8654588ed12e8cd1d691a1869ed1db0d4b9db
DIST Python-3.13.7.tar.xz.asc 963 BLAKE2B ae8721488c7ce01c9c6fe1b184526044900b39d033b0ba1ac573c742cf99a902b32cfefc9b73af8573667b47c71b8356fced5abf0a4b581ef8d0aff1bbcacf47 SHA512 71cd002c18ebb47861abd3309c8cf38972d3d916cca5595d895ba3940719243c66fa28595c2370a8846d9d1c4b3cb4ac5baeda9e9cf94be30302892d01df5e87
DIST Python-3.14.0rc2.tar.xz 23566140 BLAKE2B 6871d31eba6167f2d0b2d098b1582e465b1bb8df90ede41bba57b8dbdcb087ceba7cc047e93e43cf93c3c36d3166f4f99ab4c321566ec64cdc4c0e65c0abd1da SHA512 8021dc8e23239fd9e53fafd1fcaa1108da41ef376ee5b5e9c8dfd74995537131990239cd83de45b8bd5fb52b44c4dc08df1c837f69ce82c5b2d99ddf3ea5ef77
DIST Python-3.14.0rc2.tar.xz.sigstore 4942 BLAKE2B 650404fe155c874f05d114dda6ff47ef90b9ed09f6d40f7a3757a3f0fe4420380cb2e52696dda76badccd86b31117e6f8b906a61881b8f65949d00d692abd959 SHA512 2cce5b68b32f9f0f400e5c2d571ad9ce479cff904690ddd454ea69b612cd8c5c003f632f8866a220be46e5e56b92a1dfb12c4e12b381fc7c58710635be5ea715
DIST Python-3.14.0rc3.tar.xz 23585028 BLAKE2B a74f441855f20001e04e576bb85227f73907213c435e7cdebcd3d5f04962181ebf7ab9d8fd7503ed51696fa4d285cd64c74a9c48e13250db6b5b3fce8e20bbb4 SHA512 15c55660fc0168bd0f2348fa6d669352b422a626b151b7a7131eb338459e552a15908874ad872eea0eea48801d5a489647e1643bf00548fd6d9c1aff6fc2044f
DIST Python-3.14.0rc3.tar.xz.sigstore 5278 BLAKE2B f03ca95d4c143547533744e943045f22d493ad5c05f41644c20007792b6b4dd8fe3677a3bbab62b44c05dcf370e4bce109ed3fba1ac094f564c86538d6be8ec4 SHA512 8101d92af5e4fb67f5d7a378d817ffa8982898865986f1ed47ec0009b2203af4f797d60a07eb50453a85833a23349c472e9be4a7e10c2c9ea7f18c30ae45544c
DIST Python-3.8.20.tar.xz 18962788 BLAKE2B 715c75e0c0a3d3b77af7f07478311bb0554b80aac72915be703aa2d0dd6459a972e5669808e64da14a0b91bb183e00655055c1726f302dc3ccd8721e3b4ae3e6 SHA512 3c9341ee1fd33cb687958dcf2b7c0c7700489726c4d530c3e9d9537d46a6ab534541a4b312232d8505bea395a07e4518c42d75fb7571103e6b266f8f44115c61
DIST Python-3.8.20.tar.xz.asc 833 BLAKE2B 5c86c15a1090b42e42bb7512565b1a7ad9d2137d59e9fd1ab0f83fdfc37dfcf184389418d6703db809e9c8c04a169af292665a2b58bf5dc61b7724ecbb4132d9 SHA512 a751ae0407a593d97acac4d5f8a0456580c753efa12a7d960125c219b4897fdb26fc1ffd43d8ea33ad1449162dd3b2904c16b6c51c57561ba73de3ffa62e0eed
DIST Python-3.9.23.tar.xz 19659284 BLAKE2B 17c7c9acec1e2f2e9d146b2c35738ea05cf16609f267dd784668ab43bcce7be93e164c14106f9640a060326ebb2b8bd4ee4e58086bdced4ca611d7f96dbb3699 SHA512 ad2eb2eebff286a16ad631339bc0890b0686cf5e669d28905a98f96e9b1af6673d255f36bf19e146aa4de8d012587dc6b3193e903718f9cdba4b97041318f418
@ -25,9 +27,10 @@ DIST python-gentoo-patches-3.12.11.tar.xz 12020 BLAKE2B b419d32b1d7bef9408027edd
DIST python-gentoo-patches-3.12.11_p1.tar.xz 23276 BLAKE2B 794485d0fa596f0f2797e2aa505f888a05e2ef63840068b3214efbe51b592586bcfdf193b71e239beb3c3037f01ca086b6b97aeff092b2a344e74d962fb9dffc SHA512 1402b0bbeb189ed4a16364398495fcccc31da0aad4fc88e30978e7754575fbd8f51974dcd97d2a57a581072f083233dfb00b30af687455ad170fc3c64875a9d5
DIST python-gentoo-patches-3.13.4.tar.xz 8912 BLAKE2B e3d9f2a12f801dc75e09c5301757f35216d712b5e5394f2ec3ce1d79d0cb57571dbca525e3d5c35b90fa059c2b78ee24341b6a51cbe9691deac84c9ee0578824 SHA512 1a7141accb7aa70c7bd8dd12528f7de031dfeab9ff089f3d044da0b7b52461e2d6d7d1467161e0fe1e259d9fa06d70bcf107d86ad3590e8cf73aa1132ef3aaf9
DIST python-gentoo-patches-3.13.5_p1.tar.xz 19756 BLAKE2B ecc594573bbe3a28364d541d5e1014778c342b6e8ecb09e5e9def238ce73d51f178d02ae91bedce3f7aee4a753f2653aee4f4035f238fa60d603baa59ce4e89b SHA512 a60f3cf65b57aa6c85f59dc5f36fbabe1fa19a5225c3e224c99696bb3d1186b54bdad94627638a3a73b66ceb5958b3a5dcb2b83d13357c71ded04c98ad7da0b9
DIST python-gentoo-patches-3.13.7.tar.xz 7088 BLAKE2B 07acf2a1cc25f95131875e0282f33ce4710094bcb75b8ac1c383aa88456194d19ede17b41dda1b29bbb194a467f56e8fe976e387128aa82507529cba6ba315b7 SHA512 d79a450db4678bb494e85167e5f035ec146f9b8c400e34cbfa1211cda19aef517ffc624b11687425b1e0ff7a63c22129c649aba663fb9cfec12512b09b64d6a6
DIST python-gentoo-patches-3.13.7_p1.tar.xz 8944 BLAKE2B f7d7769328fc5cb83f03a8e30602a556be032b71bf068871d22a2ae234fbe865a8f3801300c959d216274025b824fa1d0e5c8cc866c5e6ab38c0b484dc1c1b75 SHA512 a102b66d3b1766261b5bc56ed08c88dc0b34480750177b1d6051bc8b5e9e51df956dc604c5e3509b02fb0dd09d00473f7955652d41cf76299537e18c9bc16389
DIST python-gentoo-patches-3.14.0b1.tar.xz 5680 BLAKE2B 514b3edc3025e5bf675d371b5ada17dea426856edf1fb6095c2ee400eae95bd4265ef81fe593ae9338e801e7d0a25b1d5ba2d05ca563fd9dd020114b13575746 SHA512 74289e42cf532b54bb1b66a283ec19156f8a36ba38764209c133842314c9efb2ce2ebcba5aa9213bcf7fc0c8a5ca9b6e7adbd5dbfa4397233136d7cd55f53ee7
DIST python-gentoo-patches-3.14.0rc2.tar.xz 3776 BLAKE2B 122a49783f12cf0274ab74ff06edfc483971fca125085914dbc69c2a147a91178b8e573aac6567f5f540aec968e04af6e76a5dec0028b7a8abaac599ce1ae9b4 SHA512 3a16fbbf9e1d71ac87c79f0940634ab299b9f68f98928ac7fde44eae47b5a3f89232e63366bd8fda4484eb6721dcf05e17f92459f95b5786f3649d5ae499df4d
DIST python-gentoo-patches-3.14.0rc2_p1.tar.xz 7988 BLAKE2B fdcdb5a7319172284f8ad7bc8a1a1ce92f5eee3e6864cf5e7055093b9128928de2a17dce443dd786679ac1f7a33ffa2f7993ea6aa279a904bc9126e2db199f48 SHA512 b30f2b2d5b6fd6263533ebea6545c52e2bb365d035652bbbb215ab828685e2c48585a0544c0fead43c9622c82f51f327e946911d9cbc8717b92e5f75169234ea
DIST python-gentoo-patches-3.14.0rc3.tar.xz 7992 BLAKE2B fd4f0be9f78a6d1f193c62db16f896ee19445f2dd95ffff4f1bca0b55dca0c837dc7a2e4fc07b8633043091e2fc8aa170e6782d66710ce371388896f65b4d68d SHA512 2ab39d1265e51747b2a20fc0dfe8b7391847bace5b5c88561be2c2de6ab2595813d2c84ab32d9df022f8f075f48968b4fd0106140e6eedfee56a6a7201b311b6
DIST python-gentoo-patches-3.8.20_p7.tar.xz 54544 BLAKE2B e31fc9fb5e98b62b0f70165670ec58ed4fa932cfc95d5287c249015a3a372fdbf0d1ba08cb98f63c2dc500700edfd6ffea6db670385d2c86a4fdb92ffb991192 SHA512 a9e7e4976be226931a503af2c986da207d060d4ce436af61f5e8427da513639adbed32bb0061963b83fef275a5de91707ab13b7a9abf3a7472ee0e2c5310eda1
DIST python-gentoo-patches-3.9.23.tar.xz 37148 BLAKE2B a7c0514037169b9938b2180ec2dd22063621d532367f6febfa47da43f47534559baab992d9c5257271121af755b8445346d4d92582e7e11b6468a1c359f28bf2 SHA512 73ef00a7aa671016de396c9e1c4bb5f5c1a97dc735739f806d809f987e802ec440370bf4c85468097547284a5d2b476cbffcec3cf219b7cb6fc890d5029eb5bd
DIST python-gentoo-patches-3.9.23_p2.tar.xz 48060 BLAKE2B 2d4ddd3aa48fc52b9f63fbc6020e534234b4183366d121e836544cab93632cd05439205893a11bb505f679946b0690f0962eb0fc029e624cb1c61bc0936127be SHA512 61b3e2c7e8629e1c522c9de8ce9384ee8d1f90ca5ef0f7b902e6315c80196e5f13e0258f8002405a2a752e1c9b5e60f5c3c767c07554d83635fa074bce8a86bd

View File

@ -13,7 +13,7 @@ REAL_PV=${PV#0.}
MY_PV=${REAL_PV}
MY_P="Python-${MY_PV%_p*}"
PYVER="$(ver_cut 2-3)t"
PATCHSET="python-gentoo-patches-${MY_PV}"
PATCHSET="python-gentoo-patches-${MY_PV}_p1"
DESCRIPTION="Freethreading (no-GIL) version of Python programming language"
HOMEPAGE="

View File

@ -14,7 +14,7 @@ REAL_PV=${PV#0.}
MY_PV=${REAL_PV/_/}
MY_P="Python-${MY_PV%_p*}"
PYVER="$(ver_cut 2-3)t"
PATCHSET="python-gentoo-patches-${MY_PV}"
PATCHSET="python-gentoo-patches-${MY_PV}_p1"
DESCRIPTION="Freethreading (no-GIL) version of Python programming language"
HOMEPAGE="

View File

@ -0,0 +1,621 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
VERIFY_SIG_METHOD=sigstore
WANT_LIBTOOL="none"
inherit autotools check-reqs eapi9-ver flag-o-matic linux-info
inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs
inherit verify-sig
REAL_PV=${PV#0.}
MY_PV=${REAL_PV/_/}
MY_P="Python-${MY_PV%_p*}"
PYVER="$(ver_cut 2-3)t"
PATCHSET="python-gentoo-patches-${MY_PV}"
DESCRIPTION="Freethreading (no-GIL) version of Python programming language"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://www.python.org/ftp/python/${REAL_PV%%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${REAL_PV%%_*}/${MY_P}.tar.xz.sigstore
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="
bluetooth debug +ensurepip examples gdbm libedit +ncurses pgo
+readline +sqlite +ssl tail-call-interp test tk valgrind
"
RESTRICT="!test? ( test )"
# Do not add a dependency on dev-lang/python to this ebuild.
# If you need to apply a patch which requires python for bootstrapping, please
# run the bootstrap code on your dev box and include the results in the
# patchset. See bug 447752.
RDEPEND="
app-arch/bzip2:=
app-arch/xz-utils:=
app-arch/zstd:=
app-misc/mime-types
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
dev-libs/mpdecimal:=
dev-python/gentoo-common
>=sys-libs/zlib-1.1.3:=
virtual/libintl
gdbm? ( sys-libs/gdbm:=[berkdb] )
kernel_linux? ( sys-apps/util-linux:= )
ncurses? ( >=sys-libs/ncurses-5.2:= )
readline? (
!libedit? ( >=sys-libs/readline-4.1:= )
libedit? ( dev-libs/libedit:= )
)
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
ssl? ( >=dev-libs/openssl-1.1.1:= )
tk? (
>=dev-lang/tcl-8.0:=
>=dev-lang/tk-8.0:=
dev-tcltk/blt:=
dev-tcltk/tix
)
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? (
dev-python/ensurepip-pip
dev-python/ensurepip-setuptools
)
valgrind? ( dev-debug/valgrind )
"
# autoconf-archive needed to eautoreconf
BDEPEND="
dev-build/autoconf-archive
app-alternatives/awk
virtual/pkgconfig
"
if [[ ${PV} != *_alpha* ]]; then
RDEPEND+="
dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
"
fi
PDEPEND="
ensurepip? ( dev-python/ensurepip-pip )
"
# https://www.python.org/downloads/metadata/sigstore/
VERIFY_SIG_CERT_IDENTITY=hugo@python.org
VERIFY_SIG_CERT_OIDC_ISSUER=https://github.com/login/oauth
# large file tests involve a 2.5G file being copied (duplicated)
CHECKREQS_DISK_BUILD=5500M
QA_PKGCONFIG_VERSION=${PYVER%t}
# false positives -- functions specific to *BSD
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
declare -rgA PYTHON_KERNEL_CHECKS=(
["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589
["DNOTIFY"]="test_fcntl" # bug 938662
)
pkg_pretend() {
if use pgo || use test; then
check-reqs_pkg_pretend
fi
}
pkg_setup() {
if [[ ${MERGE_TYPE} != binary ]]; then
if use test || use pgo; then
check-reqs_pkg_setup
local CONFIG_CHECK
for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do
CONFIG_CHECK+="~${f} "
done
linux-info_pkg_setup
fi
fi
}
src_unpack() {
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.sigstore}
fi
default
}
src_prepare() {
# Ensure that internal copies of expat and libffi are not used.
# TODO: Makefile has annoying deps on expat headers
#rm -r Modules/expat || die
local PATCHES=(
"${WORKDIR}/${PATCHSET}"
)
default
# force the correct number of jobs
# https://bugs.gentoo.org/737660
sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
# breaks tests when using --with-wheel-pkg-dir
rm -r Lib/test/wheeldata || die
eautoreconf
}
build_cbuild_python() {
# Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
# propagated to sysconfig for built extensions
#
# -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
local -x CFLAGS= LDFLAGS=
local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
# We need to build our own Python on CBUILD first, and feed it in.
# bug #847910
local myeconfargs_cbuild=(
"${myeconfargs[@]}"
--prefix="${BROOT}"/usr
--libdir="${cbuild_libdir:2}"
# Avoid needing to load the right libpython.so.
--disable-shared
# As minimal as possible for the mini CBUILD Python
# we build just for cross to satisfy --with-build-python.
--without-lto
--without-readline
--disable-optimizations
)
mkdir "${WORKDIR}"/${P}-${CBUILD} || die
pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
# Avoid as many dependencies as possible for the cross build.
mkdir Modules || die
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
_dbm _gdbm
_sqlite3
_hashlib _ssl
_curses _curses_panel
readline
_tkinter
pyexpat
zlib
# We disabled these for CBUILD because Python's setup.py can't handle locating
# libdir correctly for cross. This should be rechecked for the pure Makefile approach,
# and uncommented if needed.
#_ctypes
EOF
ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
# Unfortunately, we do have to build this immediately, and
# not in src_compile, because CHOST configure for Python
# will check the existence of the --with-build-python value
# immediately.
emake
popd &> /dev/null || die
}
src_configure() {
# disable automagic bluetooth headers detection
if ! use bluetooth; then
local -x ac_cv_header_bluetooth_bluetooth_h=no
fi
filter-flags -malign-double
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
# PKG_CONFIG needed for cross.
tc-export CXX PKG_CONFIG
local dbmliborder=
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
# Set baseline test skip flags.
COMMON_TEST_SKIPS=(
# running gdb inside an ebuild as non-root, within sandbox,
# and possibly within a container is unreliable
-x test_gdb
# this is actually test_gdb.test_pretty_print
-x test_pretty_print
# https://bugs.gentoo.org/933840
-x test_perf_profiler
)
# Arch-specific skips. See #931888 for a collection of these.
case ${CHOST} in
alpha*)
COMMON_TEST_SKIPS+=(
-x test_builtin
-x test_capi
-x test_cmath
-x test_float
# timeout
-x test_free_threading
-x test_math
-x test_numeric_tower
-x test_random
-x test_statistics
# bug 653850
-x test_resource
-x test_strtod
)
;;
mips*)
COMMON_TEST_SKIPS+=(
-x test_ctypes
-x test_external_inspection
-x test_statistics
)
;;
riscv*)
COMMON_TEST_SKIPS+=(
-x test_urllib2
)
;;
sparc*)
COMMON_TEST_SKIPS+=(
# bug 788022
-x test_multiprocessing_fork
-x test_multiprocessing_forkserver
-x test_multiprocessing_spawn
-x test_ctypes
# bug 931908
-x test_exceptions
)
;;
esac
# Kernel-config specific skips
for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do
if ! linux_config_exists || ! linux_chkconfig_present "${option}"
then
COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" )
fi
done
# musl-specific skips
use elibc_musl && COMMON_TEST_SKIPS+=(
# various musl locale deficiencies
-x test__locale
-x test_c_locale_coercion
-x test_locale
-x test_re
# known issues with find_library on musl
# https://bugs.python.org/issue21622
-x test_ctypes
# fpathconf, ttyname errno values
-x test_os
)
if use pgo; then
local profile_task_flags=(
-m test
"-j$(makeopts_jobs)"
--pgo-extended
--verbose3
-u-network
# We use a timeout because of how often we've had hang issues
# here. It also matches the default upstream PROFILE_TASK.
--timeout 1200
"${COMMON_TEST_SKIPS[@]}"
-x test_dtrace
# All of these seem to occasionally hang for PGO inconsistently
# They'll even hang here but be fine in src_test sometimes.
# bug #828535 (and related: bug #788022)
-x test_asyncio
-x test_httpservers
-x test_logging
-x test_multiprocessing_fork
-x test_socket
-x test_xmlrpc
# Hangs (actually runs indefinitely executing itself w/ many cpython builds)
# bug #900429
-x test_tools
)
if has_version "app-arch/rpm" ; then
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
profile_task_flags+=(
-x test_distutils
)
fi
# PGO sometimes fails randomly
local -x PROFILE_TASK="${profile_task_flags[*]} || true"
fi
local myeconfargs=(
# glibc-2.30 removes it; since we can't cleanly force-rebuild
# Python on glibc upgrade, remove it proactively to give
# a chance for users rebuilding python before glibc
ac_cv_header_stropts_h=no
--enable-shared
--without-static-libpython
--enable-ipv6
--infodir='${prefix}/share/info'
--mandir='${prefix}/share/man'
--with-dbmliborder="${dbmliborder}"
--with-libc=
--enable-loadable-sqlite-extensions
--without-ensurepip
--without-lto
--with-system-expat
--with-system-libmpdec
--with-platlibdir=lib
--with-pkg-config=yes
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
--disable-gil
$(use_with debug assertions)
$(use_enable pgo optimizations)
$(use_with readline readline "$(usex libedit editline readline)")
$(use_with tail-call-interp)
$(use_with valgrind)
)
if tc-is-lto; then
myeconfargs+=(
--with-lto
)
fi
# Force-disable modules we don't want built.
# See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
$(usev !gdbm '_gdbm _dbm')
$(usev !sqlite '_sqlite3')
$(usev !ssl '_hashlib _ssl')
$(usev !ncurses '_curses _curses_panel')
$(usev !readline 'readline')
$(usev !tk '_tkinter')
EOF
# disable implicit optimization/debugging flags
local -x OPT=
if tc-is-cross-compiler ; then
build_cbuild_python
myeconfargs+=(
# Point the imminent CHOST build to the Python we just
# built for CBUILD.
--with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
)
fi
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
# propagated to sysconfig for built extensions
local -x CFLAGS_NODIST=${CFLAGS}
local -x LDFLAGS_NODIST=${LDFLAGS}
local -x CFLAGS= LDFLAGS=
# Fix implicit declarations on cross and prefix builds. Bug #674070.
if use ncurses; then
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
fi
econf "${myeconfargs[@]}"
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
eerror "configure has detected that the sem_open function is broken."
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
die "Broken sem_open function (bug 496328)"
fi
# install epython.py as part of stdlib
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
}
src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
export PYTHONSTRICTEXTENSIONBUILD=1
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
# end up writing bytecode & violating sandbox.
# bug #831897
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
# Gentoo hack to disable accessing system site-packages
export GENTOO_CPYTHON_BUILD=1
if use pgo ; then
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
local -x TMPDIR=/var/tmp
fi
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Restore saved value from above.
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
# this just happens to skip test_support.test_freeze that is broken
# without bundled expat
# TODO: get a proper skip for it upstream
local -x LOGNAME=buildbot
local test_opts=(
--verbose3
-u-network
-j "$(makeopts_jobs)"
"${COMMON_TEST_SKIPS[@]}"
)
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
local -x TMPDIR=/var/tmp
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
local ret=${?}
[[ ${ret} -eq 0 ]] || die "emake test failed"
}
src_install() {
local libdir=${ED}/usr/lib/python${PYVER}
# -j1 hack for now for bug #843458
emake -j1 DESTDIR="${D}" TEST_MODULES=no altinstall
# Fix collisions between different slots of Python.
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
# Fix collision with GIL-enabled build.
rm "${ED}/usr/bin/python${PYVER%t}" || die
mv "${ED}"/usr/bin/pydoc{${PYVER%t},${PYVER}} || die
mv "${ED}"/usr/share/man/man1/python{${PYVER%t},${PYVER}}.1 || die
# Cheap hack to get version with ABIFLAGS
local abiver=$(cd "${ED}/usr/include"; echo python*)
if [[ ${abiver} != python${PYVER} ]]; then
# Replace python3.X with a symlink to python3.Xm
rm "${ED}/usr/bin/python${PYVER}" || die
dosym "${abiver}" "/usr/bin/python${PYVER}"
# Create python3.X-config symlink
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
# Create python-3.5m.pc symlink
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
fi
# python seems to get rebuilt in src_install (bug 569908)
# Work around it for now.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E "${ED}/usr/bin/${abiver}"
else
pax-mark m "${ED}/usr/bin/${abiver}"
fi
rm -r "${libdir}"/ensurepip/_bundled || die
if ! use sqlite; then
rm -r "${libdir}/"sqlite3 || die
fi
if use tk; then
# rename to avoid collision with dev-lang/python
mv "${ED}"/usr/bin/idle{${PYVER%t},${PYVER}} || die
else
rm -r "${ED}/usr/bin/idle${PYVER%t}" || die
rm -r "${libdir}/"{idlelib,tkinter} || die
fi
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
dodoc Misc/{ACKS,HISTORY,NEWS}
if use examples; then
docinto examples
find Tools -name __pycache__ -exec rm -fr {} + || die
dodoc -r Tools
fi
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
local libname=$(
printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
emake --no-print-directory -s -f - 2>/dev/null
)
newins Tools/gdb/libpython.py "${libname}"-gdb.py
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
sed \
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
-e "s:@PYDOC@:pydoc${PYVER}:" \
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
# python-exec wrapping support
local pymajor=${PYVER%.*}
local EPYTHON=python${PYVER}
local scriptdir=${D}$(python_get_scriptdir)
mkdir -p "${scriptdir}" || die
# python and pythonX
ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
ln -s "python${pymajor}" "${scriptdir}/python" || die
# python-config and pythonX-config
# note: we need to create a wrapper rather than symlinking it due
# to some random dirname(argv[0]) magic performed by python-config
cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
#!/bin/sh
exec "${abiver}-config" "\${@}"
EOF
chmod +x "${scriptdir}/python${pymajor}-config" || die
ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
# pydoc
ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
# idle
if use tk; then
ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
fi
}
pkg_postinst() {
if ver_replacing -lt 3.14.0_beta3; then
ewarn "Python 3.14.0b3 has changed its module ABI. The .pyc files"
ewarn "installed previously are no longer valid and will be regenerated"
ewarn "(or ignored) on the next import. This may cause sandbox failures"
ewarn "when installing some packages and checksum mismatches when removing"
ewarn "old versions. To actively prevent this, rebuild all packages"
ewarn "installing Python 3.14 modules, e.g. using:"
ewarn
ewarn " emerge -1v /usr/lib/python3.14t/site-packages"
fi
}

View File

@ -14,7 +14,7 @@ inherit verify-sig
MY_PV=${PV}
MY_P="Python-${MY_PV%_p*}"
PYVER=$(ver_cut 1-2)
PATCHSET="python-gentoo-patches-${MY_PV}"
PATCHSET="python-gentoo-patches-${MY_PV}_p1"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="

View File

@ -15,7 +15,7 @@ inherit verify-sig
MY_PV=${PV/_/}
MY_P="Python-${MY_PV%_p*}"
PYVER=$(ver_cut 1-2)
PATCHSET="python-gentoo-patches-${MY_PV}"
PATCHSET="python-gentoo-patches-${MY_PV}_p1"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="

View File

@ -0,0 +1,632 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
LLVM_COMPAT=( 19 )
LLVM_OPTIONAL=1
VERIFY_SIG_METHOD=sigstore
WANT_LIBTOOL="none"
inherit autotools check-reqs eapi9-ver flag-o-matic linux-info llvm-r1
inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs
inherit verify-sig
MY_PV=${PV/_/}
MY_P="Python-${MY_PV%_p*}"
PYVER=$(ver_cut 1-2)
PATCHSET="python-gentoo-patches-${MY_PV}"
DESCRIPTION="An interpreted, interactive, object-oriented programming language"
HOMEPAGE="
https://www.python.org/
https://github.com/python/cpython/
"
SRC_URI="
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz
https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz
verify-sig? (
https://www.python.org/ftp/python/${PV%%_*}/${MY_P}.tar.xz.sigstore
)
"
S="${WORKDIR}/${MY_P}"
LICENSE="PSF-2"
SLOT="${PYVER}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
IUSE="
bluetooth debug +ensurepip examples gdbm jit libedit +ncurses pgo
+readline +sqlite +ssl tail-call-interp test tk valgrind
"
REQUIRED_USE="jit? ( ${LLVM_REQUIRED_USE} )"
RESTRICT="!test? ( test )"
# Do not add a dependency on dev-lang/python to this ebuild.
# If you need to apply a patch which requires python for bootstrapping, please
# run the bootstrap code on your dev box and include the results in the
# patchset. See bug 447752.
RDEPEND="
app-arch/bzip2:=
app-arch/xz-utils:=
app-arch/zstd:=
app-misc/mime-types
>=dev-libs/expat-2.1:=
dev-libs/libffi:=
dev-libs/mpdecimal:=
dev-python/gentoo-common
>=sys-libs/zlib-1.1.3:=
virtual/libintl
gdbm? ( sys-libs/gdbm:=[berkdb] )
kernel_linux? ( sys-apps/util-linux:= )
ncurses? ( >=sys-libs/ncurses-5.2:= )
readline? (
!libedit? ( >=sys-libs/readline-4.1:= )
libedit? ( dev-libs/libedit:= )
)
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
ssl? ( >=dev-libs/openssl-1.1.1:= )
tk? (
>=dev-lang/tcl-8.0:=
>=dev-lang/tk-8.0:=
dev-tcltk/blt:=
dev-tcltk/tix
)
"
# bluetooth requires headers from bluez
DEPEND="
${RDEPEND}
bluetooth? ( net-wireless/bluez )
test? (
dev-python/ensurepip-pip
dev-python/ensurepip-setuptools
)
valgrind? ( dev-debug/valgrind )
"
# autoconf-archive needed to eautoreconf
BDEPEND="
dev-build/autoconf-archive
app-alternatives/awk
virtual/pkgconfig
jit? (
$(llvm_gen_dep '
llvm-core/clang:${LLVM_SLOT}
llvm-core/llvm:${LLVM_SLOT}
')
)
"
if [[ ${PV} != *_alpha* ]]; then
RDEPEND+="
dev-lang/python-exec[python_targets_python${PYVER/./_}(-)]
"
fi
PDEPEND="
ensurepip? ( dev-python/ensurepip-pip )
"
# https://www.python.org/downloads/metadata/sigstore/
VERIFY_SIG_CERT_IDENTITY=hugo@python.org
VERIFY_SIG_CERT_OIDC_ISSUER=https://github.com/login/oauth
# large file tests involve a 2.5G file being copied (duplicated)
CHECKREQS_DISK_BUILD=5500M
QA_PKGCONFIG_VERSION=${PYVER%t}
# false positives -- functions specific to *BSD
QA_CONFIG_IMPL_DECL_SKIP=( chflags lchflags )
declare -rgA PYTHON_KERNEL_CHECKS=(
["CROSS_MEMORY_ATTACH"]="test_external_inspection" #bug 938589
["DNOTIFY"]="test_fcntl" # bug 938662
)
pkg_pretend() {
if use pgo || use test; then
check-reqs_pkg_pretend
fi
if use jit; then
ewarn "USE=jit is considered experimental upstream. Using it"
ewarn "could lead to unexpected breakage, including race conditions"
ewarn "and crashes, respectively. Please do not file Gentoo bugs, unless"
ewarn "you can reproduce the problem with dev-lang/python[-jit]. Instead,"
ewarn "please consider reporting JIT problems upstream."
fi
}
pkg_setup() {
if [[ ${MERGE_TYPE} != binary ]]; then
use jit && llvm-r1_pkg_setup
if use test || use pgo; then
check-reqs_pkg_setup
local CONFIG_CHECK
for f in "${!PYTHON_KERNEL_CHECKS[@]}"; do
CONFIG_CHECK+="~${f} "
done
linux-info_pkg_setup
fi
fi
}
src_unpack() {
if use verify-sig; then
verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.xz{,.sigstore}
fi
default
}
src_prepare() {
# Ensure that internal copies of expat and libffi are not used.
# TODO: Makefile has annoying deps on expat headers
#rm -r Modules/expat || die
local PATCHES=(
"${WORKDIR}/${PATCHSET}"
)
default
# force the correct number of jobs
# https://bugs.gentoo.org/737660
sed -i -e "s:-j0:-j$(makeopts_jobs):" Makefile.pre.in || die
# breaks tests when using --with-wheel-pkg-dir
rm -r Lib/test/wheeldata || die
eautoreconf
}
build_cbuild_python() {
# Hack to workaround get_libdir not being able to handle CBUILD, bug #794181
local cbuild_libdir=$(unset PKG_CONFIG_PATH ; $(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libffi)
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
# propagated to sysconfig for built extensions
#
# -fno-lto to avoid bug #700012 (not like it matters for mini-CBUILD Python anyway)
local -x CFLAGS_NODIST="${BUILD_CFLAGS} -fno-lto"
local -x LDFLAGS_NODIST=${BUILD_LDFLAGS}
local -x CFLAGS= LDFLAGS=
local -x BUILD_CFLAGS="${CFLAGS_NODIST}"
local -x BUILD_LDFLAGS=${LDFLAGS_NODIST}
# We need to build our own Python on CBUILD first, and feed it in.
# bug #847910
local myeconfargs_cbuild=(
"${myeconfargs[@]}"
--prefix="${BROOT}"/usr
--libdir="${cbuild_libdir:2}"
# Avoid needing to load the right libpython.so.
--disable-shared
# As minimal as possible for the mini CBUILD Python
# we build just for cross to satisfy --with-build-python.
--without-lto
--without-readline
--disable-optimizations
)
mkdir "${WORKDIR}"/${P}-${CBUILD} || die
pushd "${WORKDIR}"/${P}-${CBUILD} &> /dev/null || die
# Avoid as many dependencies as possible for the cross build.
mkdir Modules || die
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
_dbm _gdbm
_sqlite3
_hashlib _ssl
_curses _curses_panel
readline
_tkinter
pyexpat
zlib
# We disabled these for CBUILD because Python's setup.py can't handle locating
# libdir correctly for cross. This should be rechecked for the pure Makefile approach,
# and uncommented if needed.
#_ctypes
EOF
ECONF_SOURCE="${S}" econf_build "${myeconfargs_cbuild[@]}"
# Unfortunately, we do have to build this immediately, and
# not in src_compile, because CHOST configure for Python
# will check the existence of the --with-build-python value
# immediately.
emake
popd &> /dev/null || die
}
src_configure() {
# disable automagic bluetooth headers detection
if ! use bluetooth; then
local -x ac_cv_header_bluetooth_bluetooth_h=no
fi
filter-flags -malign-double
# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
# PKG_CONFIG needed for cross.
tc-export CXX PKG_CONFIG
local dbmliborder=
if use gdbm; then
dbmliborder+="${dbmliborder:+:}gdbm"
fi
# Set baseline test skip flags.
COMMON_TEST_SKIPS=(
# running gdb inside an ebuild as non-root, within sandbox,
# and possibly within a container is unreliable
-x test_gdb
# this is actually test_gdb.test_pretty_print
-x test_pretty_print
# https://bugs.gentoo.org/933840
-x test_perf_profiler
)
# Arch-specific skips. See #931888 for a collection of these.
case ${CHOST} in
alpha*)
COMMON_TEST_SKIPS+=(
-x test_builtin
-x test_capi
-x test_cmath
-x test_float
# timeout
-x test_free_threading
-x test_math
-x test_numeric_tower
-x test_random
-x test_statistics
# bug 653850
-x test_resource
-x test_strtod
)
;;
mips*)
COMMON_TEST_SKIPS+=(
-x test_ctypes
-x test_external_inspection
-x test_statistics
)
;;
riscv*)
COMMON_TEST_SKIPS+=(
-x test_urllib2
)
;;
sparc*)
COMMON_TEST_SKIPS+=(
# bug 788022
-x test_multiprocessing_fork
-x test_multiprocessing_forkserver
-x test_multiprocessing_spawn
-x test_ctypes
# bug 931908
-x test_exceptions
)
;;
esac
# Kernel-config specific skips
for option in "${!PYTHON_KERNEL_CHECKS[@]}"; do
if ! linux_config_exists || ! linux_chkconfig_present "${option}"
then
COMMON_TEST_SKIPS+=( -x "${PYTHON_KERNEL_CHECKS[${option}]}" )
fi
done
# musl-specific skips
use elibc_musl && COMMON_TEST_SKIPS+=(
# various musl locale deficiencies
-x test__locale
-x test_c_locale_coercion
-x test_locale
-x test_re
# known issues with find_library on musl
# https://bugs.python.org/issue21622
-x test_ctypes
# fpathconf, ttyname errno values
-x test_os
)
if use pgo; then
local profile_task_flags=(
-m test
"-j$(makeopts_jobs)"
--pgo-extended
--verbose3
-u-network
# We use a timeout because of how often we've had hang issues
# here. It also matches the default upstream PROFILE_TASK.
--timeout 1200
"${COMMON_TEST_SKIPS[@]}"
-x test_dtrace
# All of these seem to occasionally hang for PGO inconsistently
# They'll even hang here but be fine in src_test sometimes.
# bug #828535 (and related: bug #788022)
-x test_asyncio
-x test_httpservers
-x test_logging
-x test_multiprocessing_fork
-x test_socket
-x test_xmlrpc
# Hangs (actually runs indefinitely executing itself w/ many cpython builds)
# bug #900429
-x test_tools
)
if has_version "app-arch/rpm" ; then
# Avoid sandbox failure (attempts to write to /var/lib/rpm)
profile_task_flags+=(
-x test_distutils
)
fi
# PGO sometimes fails randomly
local -x PROFILE_TASK="${profile_task_flags[*]} || true"
fi
local myeconfargs=(
# glibc-2.30 removes it; since we can't cleanly force-rebuild
# Python on glibc upgrade, remove it proactively to give
# a chance for users rebuilding python before glibc
ac_cv_header_stropts_h=no
--enable-shared
--without-static-libpython
--enable-ipv6
--infodir='${prefix}/share/info'
--mandir='${prefix}/share/man'
--with-dbmliborder="${dbmliborder}"
--with-libc=
--enable-loadable-sqlite-extensions
--without-ensurepip
--without-lto
--with-system-expat
--with-system-libmpdec
--with-platlibdir=lib
--with-pkg-config=yes
--with-wheel-pkg-dir="${EPREFIX}"/usr/lib/python/ensurepip
--enable-gil
$(use_with debug assertions)
$(use_enable jit experimental-jit)
$(use_enable pgo optimizations)
$(use_with readline readline "$(usex libedit editline readline)")
$(use_with tail-call-interp)
$(use_with valgrind)
)
if tc-is-lto; then
myeconfargs+=(
--with-lto
)
fi
# Force-disable modules we don't want built.
# See Modules/Setup for docs on how this works. Setup.local contains our local deviations.
cat > Modules/Setup.local <<-EOF || die
*disabled*
nis
$(usev !gdbm '_gdbm _dbm')
$(usev !sqlite '_sqlite3')
$(usev !ssl '_hashlib _ssl')
$(usev !ncurses '_curses _curses_panel')
$(usev !readline 'readline')
$(usev !tk '_tkinter')
EOF
# disable implicit optimization/debugging flags
local -x OPT=
if tc-is-cross-compiler ; then
build_cbuild_python
myeconfargs+=(
# Point the imminent CHOST build to the Python we just
# built for CBUILD.
--with-build-python="${WORKDIR}"/${P}-${CBUILD}/python
)
fi
# pass system CFLAGS & LDFLAGS as _NODIST, otherwise they'll get
# propagated to sysconfig for built extensions
local -x CFLAGS_NODIST=${CFLAGS}
local -x LDFLAGS_NODIST=${LDFLAGS}
local -x CFLAGS= LDFLAGS=
# Fix implicit declarations on cross and prefix builds. Bug #674070.
if use ncurses; then
append-cppflags -I"${ESYSROOT}"/usr/include/ncursesw
fi
econf "${myeconfargs[@]}"
if grep -q "#define POSIX_SEMAPHORES_NOT_ENABLED 1" pyconfig.h; then
eerror "configure has detected that the sem_open function is broken."
eerror "Please ensure that /dev/shm is mounted as a tmpfs with mode 1777."
die "Broken sem_open function (bug 496328)"
fi
# install epython.py as part of stdlib
echo "EPYTHON='python${PYVER}'" > Lib/epython.py || die
}
src_compile() {
# Ensure sed works as expected
# https://bugs.gentoo.org/594768
local -x LC_ALL=C
export PYTHONSTRICTEXTENSIONBUILD=1
# Save PYTHONDONTWRITEBYTECODE so that 'has_version' doesn't
# end up writing bytecode & violating sandbox.
# bug #831897
local -x _PYTHONDONTWRITEBYTECODE=${PYTHONDONTWRITEBYTECODE}
# Gentoo hack to disable accessing system site-packages
export GENTOO_CPYTHON_BUILD=1
if use pgo ; then
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
local -x TMPDIR=/var/tmp
fi
# also need to clear the flags explicitly here or they end up
# in _sysconfigdata*
emake CPPFLAGS= CFLAGS= LDFLAGS=
# Restore saved value from above.
local -x PYTHONDONTWRITEBYTECODE=${_PYTHONDONTWRITEBYTECODE}
# Work around bug 329499. See also bug 413751 and 457194.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E python
else
pax-mark m python
fi
}
src_test() {
# Tests will not work when cross compiling.
if tc-is-cross-compiler; then
elog "Disabling tests due to crosscompiling."
return
fi
# this just happens to skip test_support.test_freeze that is broken
# without bundled expat
# TODO: get a proper skip for it upstream
local -x LOGNAME=buildbot
local test_opts=(
--verbose3
-u-network
-j "$(makeopts_jobs)"
"${COMMON_TEST_SKIPS[@]}"
)
# bug 660358
local -x COLUMNS=80
local -x PYTHONDONTWRITEBYTECODE=
local -x TMPDIR=/var/tmp
nonfatal emake -Onone test EXTRATESTOPTS="${test_opts[*]}" \
CPPFLAGS= CFLAGS= LDFLAGS= < /dev/tty
local ret=${?}
[[ ${ret} -eq 0 ]] || die "emake test failed"
}
src_install() {
local libdir=${ED}/usr/lib/python${PYVER}
# -j1 hack for now for bug #843458
emake -j1 DESTDIR="${D}" TEST_MODULES=no altinstall
# Fix collisions between different slots of Python.
rm "${ED}/usr/$(get_libdir)/libpython3.so" || die
# Cheap hack to get version with ABIFLAGS
local abiver=$(cd "${ED}/usr/include"; echo python*)
if [[ ${abiver} != python${PYVER} ]]; then
# Replace python3.X with a symlink to python3.Xm
rm "${ED}/usr/bin/python${PYVER}" || die
dosym "${abiver}" "/usr/bin/python${PYVER}"
# Create python3.X-config symlink
dosym "${abiver}-config" "/usr/bin/python${PYVER}-config"
# Create python-3.5m.pc symlink
dosym "python-${PYVER}.pc" "/usr/$(get_libdir)/pkgconfig/${abiver/${PYVER}/-${PYVER}}.pc"
fi
# python seems to get rebuilt in src_install (bug 569908)
# Work around it for now.
if has_version dev-libs/libffi[pax-kernel]; then
pax-mark E "${ED}/usr/bin/${abiver}"
else
pax-mark m "${ED}/usr/bin/${abiver}"
fi
rm -r "${libdir}"/ensurepip/_bundled || die
if ! use sqlite; then
rm -r "${libdir}/"sqlite3 || die
fi
if ! use tk; then
rm -r "${ED}/usr/bin/idle${PYVER}" || die
rm -r "${libdir}/"{idlelib,tkinter} || die
fi
ln -s ../python/EXTERNALLY-MANAGED "${libdir}/EXTERNALLY-MANAGED" || die
dodoc Misc/{ACKS,HISTORY,NEWS}
if use examples; then
docinto examples
find Tools -name __pycache__ -exec rm -fr {} + || die
dodoc -r Tools
fi
insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510
local libname=$(
printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' |
emake --no-print-directory -s -f - 2>/dev/null
)
newins Tools/gdb/libpython.py "${libname}"-gdb.py
newconfd "${FILESDIR}/pydoc.conf" pydoc-${PYVER}
newinitd "${FILESDIR}/pydoc.init" pydoc-${PYVER}
sed \
-e "s:@PYDOC_PORT_VARIABLE@:PYDOC${PYVER/./_}_PORT:" \
-e "s:@PYDOC@:pydoc${PYVER}:" \
-i "${ED}/etc/conf.d/pydoc-${PYVER}" \
"${ED}/etc/init.d/pydoc-${PYVER}" || die "sed failed"
# python-exec wrapping support
local pymajor=${PYVER%.*}
local EPYTHON=python${PYVER}
local scriptdir=${D}$(python_get_scriptdir)
mkdir -p "${scriptdir}" || die
# python and pythonX
ln -s "../../../bin/${abiver}" "${scriptdir}/python${pymajor}" || die
ln -s "python${pymajor}" "${scriptdir}/python" || die
# python-config and pythonX-config
# note: we need to create a wrapper rather than symlinking it due
# to some random dirname(argv[0]) magic performed by python-config
cat > "${scriptdir}/python${pymajor}-config" <<-EOF || die
#!/bin/sh
exec "${abiver}-config" "\${@}"
EOF
chmod +x "${scriptdir}/python${pymajor}-config" || die
ln -s "python${pymajor}-config" "${scriptdir}/python-config" || die
# pydoc
ln -s "../../../bin/pydoc${PYVER}" "${scriptdir}/pydoc" || die
# idle
if use tk; then
ln -s "../../../bin/idle${PYVER}" "${scriptdir}/idle" || die
fi
}
pkg_postinst() {
if ver_replacing -lt 3.14.0_beta3; then
ewarn "Python 3.14.0b3 has changed its module ABI. The .pyc files"
ewarn "installed previously are no longer valid and will be regenerated"
ewarn "(or ignored) on the next import. This may cause sandbox failures"
ewarn "when installing some packages and checksum mismatches when removing"
ewarn "old versions. To actively prevent this, rebuild all packages"
ewarn "installing Python 3.14 modules, e.g. using:"
ewarn
ewarn " emerge -1v /usr/lib/python3.14/site-packages"
fi
}

View File

@ -204,8 +204,8 @@ rust_native_abi_install() {
if use prefix; then
local interpreter=$(patchelf --print-interpreter "${EPREFIX}"/bin/bash)
ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${SLOT}/bin"
find "${ED}/opt/${SLOT}/bin" -type f -print0 | \
ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/rust-bin-${SLOT}/bin"
find "${ED}/opt/rust-bin-${SLOT}/bin" -type f -print0 | \
while IFS= read -r -d '' filename; do
patchelf_for_bin ${filename} ${interpreter} \; || die
done

View File

@ -204,8 +204,8 @@ rust_native_abi_install() {
if use prefix; then
local interpreter=$(patchelf --print-interpreter "${EPREFIX}"/bin/bash)
ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${SLOT}/bin"
find "${ED}/opt/${SLOT}/bin" -type f -print0 | \
ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/rust-bin-${SLOT}/bin"
find "${ED}/opt/rust-bin-${SLOT}/bin" -type f -print0 | \
while IFS= read -r -d '' filename; do
patchelf_for_bin ${filename} ${interpreter} \; || die
done

View File

@ -205,8 +205,8 @@ rust_native_abi_install() {
if use prefix; then
local interpreter=$(patchelf --print-interpreter "${EPREFIX}"/bin/bash)
ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${SLOT}/bin"
find "${ED}/opt/${SLOT}/bin" -type f -print0 | \
ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/rust-bin-${SLOT}/bin"
find "${ED}/opt/rust-bin-${SLOT}/bin" -type f -print0 | \
while IFS= read -r -d '' filename; do
patchelf_for_bin ${filename} ${interpreter} \; || die
done

View File

@ -27,7 +27,7 @@ else
$(rust_arch_uri powerpc64le-unknown-linux-musl rust-${PV})
) ) )
"
KEYWORDS="amd64 arm arm64 ~loong ~mips ~ppc ppc64 ~riscv ~s390 ~sparc ~x86"
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
fi
GENTOO_BIN_BASEURI="https://github.com/projg2/rust-bootstrap/releases/download/${PVR}" # omit trailing slash
@ -206,8 +206,8 @@ rust_native_abi_install() {
if use prefix; then
local interpreter=$(patchelf --print-interpreter "${EPREFIX}"/bin/bash)
ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${SLOT}/bin"
find "${ED}/opt/${SLOT}/bin" -type f -print0 | \
ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/rust-bin-${SLOT}/bin"
find "${ED}/opt/rust-bin-${SLOT}/bin" -type f -print0 | \
while IFS= read -r -d '' filename; do
patchelf_for_bin ${filename} ${interpreter} \; || die
done

View File

@ -27,7 +27,7 @@ else
$(rust_arch_uri powerpc64le-unknown-linux-musl rust-${PV})
) ) )
"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
fi
GENTOO_BIN_BASEURI="https://github.com/projg2/rust-bootstrap/releases/download/${PVR}" # omit trailing slash
@ -206,8 +206,8 @@ rust_native_abi_install() {
if use prefix; then
local interpreter=$(patchelf --print-interpreter "${EPREFIX}"/bin/bash)
ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${SLOT}/bin"
find "${ED}/opt/${SLOT}/bin" -type f -print0 | \
ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/rust-bin-${SLOT}/bin"
find "${ED}/opt/rust-bin-${SLOT}/bin" -type f -print0 | \
while IFS= read -r -d '' filename; do
patchelf_for_bin ${filename} ${interpreter} \; || die
done

View File

@ -202,8 +202,8 @@ rust_native_abi_install() {
if use prefix; then
local interpreter=$(patchelf --print-interpreter "${EPREFIX}"/bin/bash)
ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${SLOT}/bin"
find "${ED}/opt/${SLOT}/bin" -type f -print0 | \
ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/rust-bin-${SLOT}/bin"
find "${ED}/opt/rust-bin-${SLOT}/bin" -type f -print0 | \
while IFS= read -r -d '' filename; do
patchelf_for_bin ${filename} ${interpreter} \; || die
done

View File

@ -32,7 +32,7 @@ else
verify-sig? ( https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz.asc )
"
S="${WORKDIR}/rustc-${MY_PV}-src"
KEYWORDS="amd64 arm arm64 ~loong ~mips ~ppc ppc64 ~riscv ~sparc ~x86"
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
fi
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"

View File

@ -32,7 +32,7 @@ else
verify-sig? ( https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz.asc )
"
S="${WORKDIR}/rustc-${MY_PV}-src"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
fi
LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4"

View File

@ -42,7 +42,7 @@ else
verify-sig? ( https://static.rust-lang.org/dist/${MY_P}-src.tar.xz.asc )
"
S="${WORKDIR}/${MY_P}-src"
KEYWORDS="amd64 arm arm64 ~loong ~mips ~ppc ppc64 ~riscv ~sparc ~x86"
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
fi
DESCRIPTION="Systems programming language originally developed by Mozilla"

View File

@ -42,7 +42,7 @@ else
verify-sig? ( https://static.rust-lang.org/dist/${MY_P}-src.tar.xz.asc )
"
S="${WORKDIR}/${MY_P}-src"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
fi
DESCRIPTION="Systems programming language originally developed by Mozilla"

View File

@ -1 +1,2 @@
DIST cJSON-1.7.18.tar.gz 354726 BLAKE2B 293c483ed39028a23a49994698be69de16274500298893711d5767c381f51802c52f4981e074b26fd9174c186f9874fdc1811f49272c1b90f8fb82a1a315db60 SHA512 2accb507c6b97222eb5f0232c015b356cf6d248d1247049928731aa8e897378245e62395c232b1ec57d28d1e53ac72c849be85e59c33616a382d40473649f66b
DIST cJSON-1.7.19.tar.gz 356247 BLAKE2B d668290f2a9de4a5a38ddfee3999f5d49947e79bfb0a8701cbad836b131bb29f2ddc8ea00a10956bcd81d8bf25d0fc7b4ec46beaed185dfbd053c685db213bd8 SHA512 7b22bdd05b8e0bf8b24ab79db128dbab9f8c2c167f4b1d3073922b8ff1e0f0e8917322283d6d4091002f014f42692984f4f641761f05965d3b66fb3eca14dc46

View File

@ -0,0 +1,34 @@
# Copyright 2021-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="Ultralightweight JSON parser in ANSI C"
HOMEPAGE="https://github.com/DaveGamble/cJSON"
SRC_URI="https://github.com/DaveGamble/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}"/1.7.18-cmake4.patch
)
src_prepare() {
cmake_src_prepare
sed -i -e '/-Werror/d' CMakeLists.txt || die
}
src_configure() {
local mycmakeargs=(
-DENABLE_CJSON_TEST=$(usex test)
)
cmake_src_configure
}

View File

@ -2,3 +2,4 @@ DIST expat-2.6.3.tar.xz 485600 BLAKE2B b8e0a0e779f0f136eaca91115cbbcf5a5cca457ca
DIST expat-2.6.4.tar.xz 486732 BLAKE2B 70d716722358db8d0acb2c74dbbc9d2362d04a0b856eab6b6d723614b656cf6aad9f6646339e0a32b4151db2e9541439bcb81ec87791e5e6ec0bd36a3ca067cc SHA512 620da34d98524478b445038bf1dd439790fe11169496516425fca922226797835c27549fc5fb825792b516563b24eb922d9ad8f27d20a0229e7ee8cd640dfb25
DIST expat-2.7.0.tar.xz 493060 BLAKE2B 44567e955b8cf2053665140b3557897c6e0e66c7e2ba5919970d91d55a05bb8db604afa37a441ff0a7abf4472b24b0e1e6c3964c56b4bb55358c000ccdc1459d SHA512 69fb19c2634821b657f550f609d0bcc6e45e9d903072bbc63e9a0bfc92ef7d04c6e1408dd39eb43eaa2951f28ae93dce4f796c9769253f440905db2d5606a4c7
DIST expat-2.7.1.tar.xz 496108 BLAKE2B 243ef1c3578234135018d31b567c88a50cadddac86441e4d4a6d6330e113596edbad13b40c79f541d49487e7df98d798032d39ec28b7d67d22f46e4290d14519 SHA512 4c9a6c1c1769d2c4404da083dd3013dbc73883da50e2b7353db2349a420e9b6d27cac7dbcb645991d6c7cdbf79bd88486fc1ac353084ce48e61081fb56e13d46
DIST expat-2.7.2.tar.xz 503392 BLAKE2B 35525274817dab4d6ae8698f5f83978e633a6e4afe7cf3b126c87d5aba4b64bcb9d26ec3e4a39b1ea82a7430e290950595bfa4150266ef3806026b423a870e33 SHA512 da64ae6d1762388873acbad9bc0edc80094c693bccacf89ca90d1626f53866c5e87c2019276e39643963d6479fb8a6d7b1f05f38caa1be84a24ff9d603449e38

View File

@ -0,0 +1,100 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
AUTOTOOLS_AUTO_DEPEND=no
inherit autotools multilib-minimal
DESCRIPTION="Stream-oriented XML parser library"
HOMEPAGE="https://libexpat.github.io/"
SRC_URI="https://github.com/libexpat/libexpat/releases/download/R_${PV//\./_}/expat-${PV}.tar.xz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="examples static-libs test unicode"
RESTRICT="!test? ( test )"
BDEPEND="unicode? ( ${AUTOTOOLS_DEPEND} )"
DOCS=( README.md )
QA_CONFIG_IMPL_DECL_SKIP=(
# https://bugs.gentoo.org/906384
arc4random
arc4random_buf
)
src_prepare() {
default
# fix interpreter to be a recent/good shell
sed -i -e "1s:/bin/sh:${BASH}:" conftools/get-version.sh || die
if use unicode; then
cp -R "${S}" "${S}"w || die
pushd "${S}"w >/dev/null
find -name Makefile.am \
-exec sed \
-e 's,libexpat\.la,libexpatw.la,' \
-e 's,libexpat_la,libexpatw_la,' \
-i {} + || die
eautoreconf
popd >/dev/null
fi
}
multilib_src_configure() {
local myconf="$(use_with test tests) $(use_enable static-libs static) --without-docbook"
mkdir -p "${BUILD_DIR}"w || die
if use unicode; then
pushd "${BUILD_DIR}"w >/dev/null
CPPFLAGS="${CPPFLAGS} -DXML_UNICODE" ECONF_SOURCE="${S}"w econf ${myconf}
popd >/dev/null
fi
ECONF_SOURCE="${S}" econf ${myconf}
}
multilib_src_compile() {
emake
if use unicode; then
pushd "${BUILD_DIR}"w >/dev/null
emake -C lib
popd >/dev/null
fi
}
multilib_src_install() {
emake install DESTDIR="${D}"
if use unicode; then
pushd "${BUILD_DIR}"w >/dev/null
emake -C lib install DESTDIR="${D}"
popd >/dev/null
pushd "${ED}"/usr/$(get_libdir)/pkgconfig >/dev/null
cp expat.pc expatw.pc
sed -i -e '/^Libs/s:-lexpat:&w:' expatw.pc || die
popd >/dev/null
fi
}
multilib_src_install_all() {
einstalldocs
doman doc/xmlwf.1
# Note: Use of HTML_DOCS would add unwanted "doc" subfolder
docinto html
dodoc doc/*.{css,html}
if use examples; then
docinto examples
dodoc examples/*.c
docompress -x usr/share/doc/${PF}/examples
fi
find "${D}" -name '*.la' -type f -delete || die
}

View File

@ -1,10 +1,4 @@
DIST glib-2.78.6.tar.xz 5344808 BLAKE2B d16173794c4aa019459cf8c8c84d4107fb8393828f41ec6c631b9452890f34f9022ed848a543ed134fdb8a575faef6b941cea3e05de512eb1b7a99f7601a2485 SHA512 8d75f8fd77b6309215ca86a0c7648878efe11051f18b279840c137669017ea4066388f8682367e4ea3f154333d833c9dc28ccd4a66a91f0c3854a40a2838f8da
DIST glib-2.80.5.tar.xz 5538308 BLAKE2B 3f17ff85a85d20858b69c2dccc1e5d6ffd92661a8cfda8b8770dd391861999ff3381008f4fe382e90f0a7798fe218debda7f559f6e3ac8f9305e3be98b879969 SHA512 c9cc9f99e217fd950810fcfbfa7300c7850cae4dbfbabc03cdcadb6dcca2e51ea7979ceb68c09d8e9776fd1c04db73b89b81f748c8bd911e1f7ad9f704dff172
DIST glib-2.82.5.tar.xz 5554704 BLAKE2B e7853034be1137f8b793483df9e9ce1465dd10a990eb9b3cb9ac76c9f8f86ccc6fda85645b04b35963b28c33e0f6c02df4f3d03e06cc278b8515e588d6bd05f6 SHA512 a6b035c32a42b9d6f4c031a29da405848002619654b58c9205f2f78dbb9698cd5866f31ab213adc04aa214d2c48840a9592c0a1e9201e6851ebd435635f393ae
DIST glib-2.84.0.tar.xz 5613328 BLAKE2B a482076d6b0c82824179094974110dbd10d47fce93f84f4626d0d3dbea528602c41ac4a7ab8feedc3d7cc5e404ef8bef30c6c744b6f0f4f3a764644e28210e28 SHA512 72b85e30c535c5da7d8598d1cec02b1b481c467e612dbb396a0a64ad1d37cf2f1802c6fa576885c99cf8a22f4f0fc7dfdf42a3f32f7f40394f72db588fdbebb7
DIST glib-2.84.1.tar.xz 5615396 BLAKE2B d20ade482eb95873adaefc656e22c57e6712a6263a4812e448220040e30144919331cb279566a89a2ab46495b46d6a79e3821e491317587325fa3a64b40d62cc SHA512 ee7f38a4726fd72e41ddb75c4933c7b1bb30935bb2fddc84902d0627a836af512534195132cc02e3d15f168fefc816576181a8d6e436472b582191437b79a456
DIST glib-2.84.2.tar.xz 5617588 BLAKE2B 31592cbeca58f03c138a02b0cd953b6bd2cdcbfa39283241affd1bff439d6376f0420b4b715856963c64903f3646cf89890f709f514a85d93fb3bbe26b99d516 SHA512 430928d7d7a442fc3927ca943f2569035fe8768768a0ebc6720ae1ef152b56fc5f8d4215d21b4828cc2f39a8632c907ed2c52a0c8566da1c533a2e049a1a121f
DIST glib-2.84.3.tar.xz 5615704 BLAKE2B 48444b91be68530de05667e2e009dcdc63af2f95cc978a461d930b943772e52b6c9d0e797aea3a9a5713758f22ee60a190c7d601b170c6c853fce624e5c327d7 SHA512 73f2d67d2ef5b4dc8cd2f6df9ce7903853ec619924e2927adbc73d706974a7d660afea55be18e12ccb0dee1145cf4149b743278d2b128fd466e3df2bbf90ef57
DIST glib-2.84.4.tar.xz 5618200 BLAKE2B 5faee382433085cd598545a99e2e95ce430be4ac5ca10106b70f2404ddacf328f4223bc092a23025f9bf8b936619a88a9dfb220674a07e9250cf4213c6213be9 SHA512 2de9b2f7376c0e5f6ee585087090675d597c474199a10d04aad18df688b6ca77d17e93a86ec07482898663f51c82121992272496318138f77ca5ad2c340a4bd3
DIST gobject-introspection-1.80.1.tar.xz 1040228 BLAKE2B 7a8c1da9bc8aef293deedde1eed97536fa2f42f79a9761ac8ededb0676e46b636545a69e20e63d812844aeb626fa4fb7ce3c7922e51554fdc79560f16443acd9 SHA512 f45c2c1b105086488d974c6134db9910746df8edb187772f2ecd249656a1047c8ac88ba51f5bf7393c3d99c3ace143ecd09be256c2f4d0ceee110c9ad51a839a
DIST gobject-introspection-1.82.0.tar.xz 1052872 BLAKE2B 8336ae26d48a71a203655d9d268076f603055ceabb55dbfa676f2c67b4096b83afc106d485dc45d02b3a8be806f9ef50d54806a82e61f2a252ae59543c61e934 SHA512 e139fadb4174c72b648914f3774d89fc0e5eaee45bba0c13edf05de883664dad8276dbc34006217bb09871ed4bad23adab51ff232a17b9eb131329b2926cafb7

View File

@ -1,36 +0,0 @@
https://bugs.gentoo.org/922654
https://gitlab.gnome.org/GNOME/glib/-/issues/3134
https://gitlab.gnome.org/GNOME/glib/-/commit/6ef967a0f930ce37a8c9b5aff969693b34714291
[sam: Trimmed the CI changes.]
From 6ef967a0f930ce37a8c9b5aff969693b34714291 Mon Sep 17 00:00:00 2001
From: Jordan Williams <jordan@jwillikers.com>
Date: Fri, 1 Dec 2023 09:53:50 -0600
Subject: [PATCH] Switch from the deprecated distutils module to the packaging
module
The distutils module was removed in Python 3.12.
---
--- a/gio/gdbus-2.0/codegen/utils.py
+++ b/gio/gdbus-2.0/codegen/utils.py
@@ -19,7 +19,7 @@
#
# Author: David Zeuthen <davidz@redhat.com>
-import distutils.version
+import packaging.version
import os
import sys
@@ -166,4 +166,4 @@ def version_cmp_key(key):
v = str(key[0])
else:
v = "0"
- return (distutils.version.LooseVersion(v), key[1])
+ return (packaging.version.Version(v), key[1])
--
GitLab

View File

@ -1,103 +0,0 @@
https://bugs.gentoo.org/946578
https://gitlab.gnome.org/GNOME/gobject-introspection/-/commit/a2139dba59eac283a7f543ed737f038deebddc19
From a2139dba59eac283a7f543ed737f038deebddc19 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Wed, 28 Aug 2024 21:26:02 +0200
Subject: [PATCH] giscanner: remove dependency on distutils.msvccompiler
It was removed with setuptools 74.0.0. Since we still depend on the
MSVCCompiler class use new_compiler() to get it some other way.
Remove any reference to MSVC9Compiler, which was for Visual Studio 2008
which we no longer support anyway.
Fixes #515
---
giscanner/ccompiler.py | 7 +++----
giscanner/msvccompiler.py | 14 +++++++-------
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
index d0ed70a3c..9a732cd5e 100644
--- a/giscanner/ccompiler.py
+++ b/giscanner/ccompiler.py
@@ -26,7 +26,6 @@ import tempfile
import sys
import distutils
-from distutils.msvccompiler import MSVCCompiler
from distutils.unixccompiler import UnixCCompiler
from distutils.cygwinccompiler import Mingw32CCompiler
from distutils.sysconfig import get_config_vars
@@ -167,7 +166,7 @@ class CCompiler(object):
# Now, create the distutils ccompiler instance based on the info we have.
if compiler_name == 'msvc':
# For MSVC, we need to create a instance of a subclass of distutil's
- # MSVC9Compiler class, as it does not provide a preprocess()
+ # MSVCCompiler class, as it does not provide a preprocess()
# implementation
from . import msvccompiler
self.compiler = msvccompiler.get_msvc_compiler()
@@ -460,7 +459,7 @@ class CCompiler(object):
return self.compiler.linker_exe
def check_is_msvc(self):
- return isinstance(self.compiler, MSVCCompiler)
+ return self.compiler.compiler_type == "msvc"
# Private APIs
def _set_cpp_options(self, options):
@@ -486,7 +485,7 @@ class CCompiler(object):
# macros for compiling using distutils
# get dropped for MSVC builds, so
# escape the escape character.
- if isinstance(self.compiler, MSVCCompiler):
+ if self.check_is_msvc():
macro_value = macro_value.replace('\"', '\\\"')
macros.append((macro_name, macro_value))
elif option.startswith('-U'):
diff --git a/giscanner/msvccompiler.py b/giscanner/msvccompiler.py
index 0a5439820..e333a80f5 100644
--- a/giscanner/msvccompiler.py
+++ b/giscanner/msvccompiler.py
@@ -19,30 +19,30 @@
#
import os
-import distutils
+from typing import Type
from distutils.errors import DistutilsExecError, CompileError
-from distutils.ccompiler import CCompiler, gen_preprocess_options
+from distutils.ccompiler import CCompiler, gen_preprocess_options, new_compiler
from distutils.dep_util import newer
# Distutil's MSVCCompiler does not provide a preprocess()
# Implementation, so do our own here.
+DistutilsMSVCCompiler: Type = type(new_compiler(compiler="msvc"))
+
+
def get_msvc_compiler():
return MSVCCompiler()
-class MSVCCompiler(distutils.msvccompiler.MSVCCompiler):
+class MSVCCompiler(DistutilsMSVCCompiler):
def __init__(self, verbose=0, dry_run=0, force=0):
- super(distutils.msvccompiler.MSVCCompiler, self).__init__()
+ super(DistutilsMSVCCompiler, self).__init__()
CCompiler.__init__(self, verbose, dry_run, force)
self.__paths = []
self.__arch = None # deprecated name
- if os.name == 'nt':
- if isinstance(self, distutils.msvc9compiler.MSVCCompiler):
- self.__version = distutils.msvc9compiler.VERSION
self.initialized = False
self.preprocess_options = None
if self.check_is_clang_cl():
--
GitLab

View File

@ -1,29 +0,0 @@
https://gitlab.gnome.org/GNOME/glib/-/commit/99382cfb4b5edf56f7c62eccc155f361a640298a.patch
https://bugs.gentoo.org/946789
From 99382cfb4b5edf56f7c62eccc155f361a640298a Mon Sep 17 00:00:00 2001
From: Andoni Morales Alastruey <ylatuya@gmail.com>
Date: Tue, 28 May 2024 17:26:38 +0200
Subject: [PATCH] girepository: fix autoptr tests build
In macOS compilation fails with the following error:
```
In file included from ../girepository/tests/autoptr.c:23:
../girepository/girffi.h:30:10: fatal error: 'ffi.h' file not found
```
---
girepository/tests/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/girepository/tests/meson.build b/girepository/tests/meson.build
index 6fa947cfdf..f9928267d5 100644
--- a/girepository/tests/meson.build
+++ b/girepository/tests/meson.build
@@ -72,6 +72,7 @@ if enable_gir
if cc.get_id() != 'msvc'
girepository_tests += {
'autoptr-girepository' : {
+ 'dependencies': [libffi_dep],
'source' : 'autoptr.c',
'depends': gio_gir_testing_dep,
},

View File

@ -1,57 +0,0 @@
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4575
From d6798089d447977ef4416d124a83344241aab14b Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Thu, 3 Apr 2025 19:03:27 +0100
Subject: [PATCH] gclosure: fix ATOMIC_CHANGE_FIELD to read vint atomically
Depending on luck, g_closure_ref may access closure->vint and observe
different values between reads. This manifests as a test failure in
signals-refcount{2,4}, properties-refcount1, and closure-refcount depending
on timing and re-runs.
Jakub Jelinek analysed this on GCC bug PR119607 after I'd reported it
over there as a possible GCC regression.
The critical part being g_closure_ref -> ATOMIC_INC_ASSIGN -> ATOMIC_CHANGE_FIELD
where closure->vint gets re-read repeatedly, both outside and inside the retry
loop. To fix that:
1. Atomically fetch it the first time;
2. Use the cached read, not a fresh read, of vint in the loop;
3. Use g_atomic_int_compare_and_exchange_full in the loop so we get a freshly
cached vint if it changed in another thread.
Bug: https://gcc.gnu.org/PR119607
Fixes: 834ddd19 ('turned all modifications to the first 32 integer bits in a closure into')
Co-authored-by: Jakub Jelinek <jakub@redhat.com>
---
gobject/gclosure.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gobject/gclosure.c b/gobject/gclosure.c
index 2552946e3b..e6e9769e46 100644
--- a/gobject/gclosure.c
+++ b/gobject/gclosure.c
@@ -110,15 +110,17 @@ typedef union {
G_STMT_START { \
ClosureInt *cunion = (ClosureInt*) _closure; \
gint new_int, old_int, success; \
+ old_int = g_atomic_int_get (&cunion->vint); \
do \
{ \
ClosureInt tmp; \
- tmp.vint = old_int = cunion->vint; \
+ tmp.vint = old_int; \
_SET_OLD tmp.closure._field; \
tmp.closure._field _OP _value; \
_SET_NEW tmp.closure._field; \
new_int = tmp.vint; \
- success = g_atomic_int_compare_and_exchange (&cunion->vint, old_int, new_int); \
+ success = g_atomic_int_compare_and_exchange_full (&cunion->vint, old_int, new_int,\
+ &old_int); \
} \
while (!success && _must_set); \
} G_STMT_END
--
GitLab

View File

@ -1,338 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_REQ_USE="xml(+)"
PYTHON_COMPAT=( python3_{11..13} )
inherit dot-a gnome.org gnome2-utils linux-info meson-multilib multilib python-any-r1 toolchain-funcs xdg
DESCRIPTION="The GLib library of C routines"
HOMEPAGE="https://www.gtk.org/"
LICENSE="LGPL-2.1+"
SLOT="2"
IUSE="dbus debug +elf gtk-doc +mime selinux static-libs sysprof systemtap test utils xattr"
RESTRICT="!test? ( test )"
REQUIRED_USE="gtk-doc? ( test )" # Bug #777636
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
# * elfutils (via libelf) does not build on Windows. gresources are not embedded
# within ELF binaries on that platform anyway and inspecting ELF binaries from
# other platforms is not that useful so exclude the dependency in this case.
# * Technically static-libs is needed on zlib, util-linux and perhaps more, but
# these are used by GIO, which glib[static-libs] consumers don't really seem
# to need at all, thus not imposing the deps for now and once some consumers
# are actually found to static link libgio-2.0.a, we can revisit and either add
# them or just put the (build) deps in that rare consumer instead of recursive
# RDEPEND here (due to lack of recursive DEPEND).
RDEPEND="
!<dev-util/gdbus-codegen-${PV}
>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
>=dev-libs/libpcre2-10.32:0=[${MULTILIB_USEDEP},unicode(+),static-libs?]
>=dev-libs/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) )
elf? ( virtual/libelf:0= )
sysprof? ( >=dev-util/sysprof-capture-3.40.1:4[${MULTILIB_USEDEP}] )
"
DEPEND="${RDEPEND}"
# libxml2 used for optional tests that get automatically skipped
BDEPEND="
app-text/docbook-xsl-stylesheets
dev-libs/libxslt
>=sys-devel/gettext-0.19.8
gtk-doc? ( >=dev-util/gtk-doc-1.33
app-text/docbook-xml-dtd:4.2
app-text/docbook-xml-dtd:4.5 )
systemtap? ( >=dev-debug/systemtap-1.3 )
${PYTHON_DEPS}
$(python_gen_any_dep '
dev-python/packaging[${PYTHON_USEDEP}]
')
test? ( >=sys-apps/dbus-1.2.14 )
virtual/pkgconfig
"
# TODO: >=dev-util/gdbus-codegen-${PV} test dep once we modify gio/tests/meson.build to use external gdbus-codegen
PDEPEND="
dbus? ( gnome-base/dconf )
mime? ( x11-misc/shared-mime-info )
"
# shared-mime-info needed for gio/xdgmime, bug #409481
# dconf is needed to be able to save settings, bug #498436
MULTILIB_CHOST_TOOLS=(
/usr/bin/gio-querymodules$(get_exeext)
)
PATCHES=(
"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
"${FILESDIR}"/${PN}-2.78.4-distutils.patch
)
python_check_deps() {
python_has_version "dev-python/packaging[${PYTHON_USEDEP}]"
}
pkg_setup() {
if use kernel_linux ; then
CONFIG_CHECK="~INOTIFY_USER"
if use test ; then
CONFIG_CHECK="~IPV6"
WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
fi
linux-info_pkg_setup
fi
python-any-r1_pkg_setup
}
src_prepare() {
if use test; then
# TODO: Review the test exclusions, especially now with meson
# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
if ! has_version dev-util/desktop-file-utils ; then
ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
ewarn "think on installing it to get these tests run."
sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
fi
# gdesktopappinfo requires existing terminal (gnome-terminal or any
# other), falling back to xterm if one doesn't exist
#if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
# ewarn "Some tests will be skipped due to missing terminal program"
# These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
# Also try https://gitlab.gnome.org/GNOME/glib/issues/1601 once ready
# for backport (or in a bump) and file new issue if still fails
sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
# desktop-app-info/launch* might fail similarly
sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
#fi
# https://bugzilla.gnome.org/show_bug.cgi?id=722604
sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
ewarn "Tests for search-utils have been skipped"
sed -i -e "/search-utils/d" glib/tests/meson.build || die
# Play nice with network-sandbox, but this approach would defeat the purpose of the test
#sed -i -e "s/localhost/127.0.0.1/g" gio/tests/gsocketclient-slow.c || die
else
# Don't build tests, also prevents extra deps, bug #512022
sed -i -e '/subdir.*tests/d' {.,gio,glib}/meson.build || die
fi
# Don't build fuzzing binaries - not used
sed -i -e '/subdir.*fuzzing/d' meson.build || die
# gdbus-codegen is a separate package
sed -i -e '/install_dir/d' gio/gdbus-2.0/codegen/meson.build || die
# Same kind of meson-0.50 issue with some installed-tests files; will likely be fixed upstream soon
sed -i -e '/install_dir/d' gio/tests/meson.build || die
cat > "${T}/glib-test-ld-wrapper" <<-EOF
#!/usr/bin/env sh
exec \${LD:-ld} "\$@"
EOF
chmod a+x "${T}/glib-test-ld-wrapper" || die
sed -i -e "s|'ld'|'${T}/glib-test-ld-wrapper'|g" gio/tests/meson.build || die
# make default sane for us
if use prefix ; then
sed -i -e "s:/usr/local:${EPREFIX}/usr:" gio/xdgmime/xdgmime.c || die
# bug #308609, without path, bug #314057
export PERL=perl
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# fix standards conflicts
sed -i \
-e 's/\<\(_XOPEN_SOURCE_EXTENDED\)\>/_POSIX_PTHREAD_SEMANTICS/' \
-e '/\<_XOPEN_SOURCE\>/s/\<2\>/600/' \
meson.build || die
sed -i -e '/#define\s\+_POSIX_SOURCE/d' \
glib/giounix.c || die
fi
# disable native macOS integrations
sed -i -e '/glib_conf.set(.HAVE_\(CARBON\|COCOA\).,/s/true/false/' \
meson.build || die
sed -i \
-e '/AvailabilityMacros.h/d' \
gio/giomodule.c || die
default
gnome2_environment_reset
# TODO: python_name sedding for correct python shebang? Might be relevant mainly for glib-utils only
}
src_configure() {
lto-guarantee-fat
meson-multilib_src_configure
}
multilib_src_configure() {
# TODO: figure a way to pass appropriate values for all cross properties
# that glib uses (search for get_cross_property)
#if tc-is-cross-compiler ; then
# https://bugzilla.gnome.org/show_bug.cgi?id=756473
# TODO-meson: This should be in meson cross file as 'growing_stack'
# property; and more, look at get_cross_property
#case ${CHOST} in
#hppa*|metag*) export glib_cv_stack_grows=yes ;;
#*) export glib_cv_stack_grows=no ;;
#esac
#fi
local emesonargs=(
$(meson_feature debug glib_debug)
-Ddefault_library=$(usex static-libs both shared)
-Druntime_dir="${EPREFIX}"/run
$(meson_feature selinux)
$(meson_use xattr)
-Dlibmount=enabled # only used if host_system == 'linux'
-Dman=true
$(meson_use systemtap dtrace)
$(meson_use systemtap)
$(meson_feature sysprof)
$(meson_native_use_bool gtk-doc gtk_doc)
$(meson_use test tests)
-Dinstalled_tests=false
-Dnls=enabled
-Doss_fuzz=disabled
$(meson_native_use_feature elf libelf)
-Dmultiarch=false
)
# Workaround for bug #938302
if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
local native_file="${T}"/meson.${CHOST}.ini.local
cat >> ${native_file} <<-EOF || die
[binaries]
dtrace='stap-dtrace'
EOF
emesonargs+=( --native-file "${native_file}" )
fi
meson_src_configure
}
multilib_src_test() {
export XDG_CONFIG_DIRS=/etc/xdg
export XDG_DATA_DIRS=/usr/local/share:/usr/share
export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
export LC_TIME=C # bug #411967
export TZ=UTC
unset GSETTINGS_BACKEND # bug #596380
python_setup
# https://bugs.gentoo.org/839807
local -x SANDBOX_PREDICT=${SANDBOX_PREDICT}
addpredict /usr/b
# Related test is a bit nitpicking
mkdir "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR"
meson_src_test --timeout-multiplier 20 --no-suite flaky
}
multilib_src_install() {
meson_src_install
keepdir /usr/$(get_libdir)/gio/modules
}
multilib_src_install_all() {
strip-lto-bytecode
# These are installed by dev-util/glib-utils
# TODO: With patching we might be able to get rid of the python-any deps
# and removals, and test depend on glib-utils instead; revisit now with
# meson
rm "${ED}/usr/bin/glib-genmarshal" || die
rm "${ED}/usr/share/man/man1/glib-genmarshal.1" || die
rm "${ED}/usr/bin/glib-mkenums" || die
rm "${ED}/usr/share/man/man1/glib-mkenums.1" || die
rm "${ED}/usr/bin/gtester-report" || die
rm "${ED}/usr/share/man/man1/gtester-report.1" || die
# gdbus-codegen manpage installed by dev-util/gdbus-codegen
rm "${ED}/usr/share/man/man1/gdbus-codegen.1" || die
}
pkg_preinst() {
xdg_pkg_preinst
# Make gschemas.compiled belong to glib alone
local cache="/usr/share/glib-2.0/schemas/gschemas.compiled"
if [[ -e ${EROOT}${cache} ]]; then
cp "${EROOT}"${cache} "${ED}"/${cache} || die
else
touch "${ED}"${cache} || die
fi
multilib_pkg_preinst() {
# Make giomodule.cache belong to glib alone
local cache="/usr/$(get_libdir)/gio/modules/giomodule.cache"
if [[ -e ${EROOT}${cache} ]]; then
cp "${EROOT}"${cache} "${ED}"${cache} || die
else
touch "${ED}"${cache} || die
fi
}
# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
# file due to inability to create it and GIO might not look at any of the modules there
if ! tc-is-cross-compiler ; then
multilib_foreach_abi multilib_pkg_preinst
fi
}
pkg_postinst() {
xdg_pkg_postinst
# glib installs no schemas itself, but we force update for fresh install in case
# something has dropped in a schemas file without direct glib dep; and for upgrades
# in case the compiled schema format could have changed
gnome2_schemas_update
multilib_pkg_postinst() {
gnome2_giomodule_cache_update \
|| die "Update GIO modules cache failed (for ${ABI})"
}
if ! tc-is-cross-compiler ; then
multilib_foreach_abi multilib_pkg_postinst
else
ewarn "Updating of GIO modules cache skipped due to cross-compilation."
ewarn "You might want to run gio-querymodules manually on the target for"
ewarn "your final image for performance reasons and re-run it when packages"
ewarn "installing GIO modules get upgraded or added to the image."
fi
for v in ${REPLACING_VERSIONS}; do
if ver_test "$v" "-lt" "2.63.6"; then
ewarn "glib no longer installs the gio-launch-desktop binary. You may need"
ewarn "to restart your session for \"Open With\" dialogs to work."
fi
done
}
pkg_postrm() {
xdg_pkg_postrm
gnome2_schemas_update
if [[ -z ${REPLACED_BY_VERSION} ]]; then
multilib_pkg_postrm() {
rm -f "${EROOT}"/usr/$(get_libdir)/gio/modules/giomodule.cache
}
multilib_foreach_abi multilib_pkg_postrm
rm -f "${EROOT}"/usr/share/glib-2.0/schemas/gschemas.compiled
fi
}

View File

@ -1,493 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_REQ_USE="xml(+)"
PYTHON_COMPAT=( python3_{11..13} )
inherit dot-a gnome.org gnome2-utils linux-info meson-multilib multilib python-any-r1 toolchain-funcs xdg
DESCRIPTION="The GLib library of C routines"
HOMEPAGE="https://www.gtk.org/"
INTROSPECTION_PN="gobject-introspection"
INTROSPECTION_PV="1.80.1"
INTROSPECTION_P="${INTROSPECTION_PN}-${INTROSPECTION_PV}"
SRC_URI="
${SRC_URI}
introspection? ( mirror://gnome/sources/gobject-introspection/${INTROSPECTION_PV%.*}/gobject-introspection-${INTROSPECTION_PV}.tar.${GNOME_TARBALL_SUFFIX} )
"
INTROSPECTION_SOURCE_DIR="${WORKDIR}/${INTROSPECTION_P}"
INTROSPECTION_BUILD_DIR="${WORKDIR}/${INTROSPECTION_P}-build"
LICENSE="LGPL-2.1+"
SLOT="2"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="dbus debug +elf doc +introspection +mime selinux static-libs sysprof systemtap test utils xattr"
RESTRICT="!test? ( test )"
# * elfutils (via libelf) does not build on Windows. gresources are not embedded
# within ELF binaries on that platform anyway and inspecting ELF binaries from
# other platforms is not that useful so exclude the dependency in this case.
# * Technically static-libs is needed on zlib, util-linux and perhaps more, but
# these are used by GIO, which glib[static-libs] consumers don't really seem
# to need at all, thus not imposing the deps for now and once some consumers
# are actually found to static link libgio-2.0.a, we can revisit and either add
# them or just put the (build) deps in that rare consumer instead of recursive
# RDEPEND here (due to lack of recursive DEPEND).
RDEPEND="
!<dev-libs/gobject-introspection-1.80.1
!<dev-util/gdbus-codegen-${PV}
>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
>=dev-libs/libpcre2-10.32:0=[${MULTILIB_USEDEP},unicode(+),static-libs?]
>=dev-libs/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
introspection? (
>=dev-libs/gobject-introspection-common-${INTROSPECTION_PV}
)
kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) )
elf? ( virtual/libelf:0= )
sysprof? ( >=dev-util/sysprof-capture-3.40.1:4[${MULTILIB_USEDEP}] )
"
DEPEND="${RDEPEND}"
# libxml2 used for optional tests that get automatically skipped
BDEPEND="
app-text/docbook-xsl-stylesheets
dev-libs/libxslt
>=sys-devel/gettext-0.19.8
doc? ( >=dev-util/gi-docgen-2023.1 )
dev-python/docutils
systemtap? ( >=dev-debug/systemtap-1.3 )
$(python_gen_any_dep '
dev-python/packaging[${PYTHON_USEDEP}]
')
${PYTHON_DEPS}
test? ( >=sys-apps/dbus-1.2.14 )
virtual/pkgconfig
introspection? (
$(python_gen_any_dep '
dev-python/setuptools[${PYTHON_USEDEP}]
')
virtual/pkgconfig
sys-devel/bison
app-alternatives/lex
${PYTHON_DEPS}
)
"
# TODO: >=dev-util/gdbus-codegen-${PV} test dep once we modify gio/tests/meson.build to use external gdbus-codegen
PDEPEND="
dbus? ( gnome-base/dconf )
mime? ( x11-misc/shared-mime-info )
"
# shared-mime-info needed for gio/xdgmime, bug #409481
# dconf is needed to be able to save settings, bug #498436
MULTILIB_CHOST_TOOLS=(
/usr/bin/gio-querymodules$(get_exeext)
)
PATCHES=(
"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
"${FILESDIR}"/${P}-tests-autoptr-ffi.patch
)
python_check_deps() {
if use introspection ; then
python_has_version "dev-python/packaging[${PYTHON_USEDEP}]" &&
python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
else
python_has_version "dev-python/packaging[${PYTHON_USEDEP}]"
fi
}
pkg_setup() {
if use kernel_linux ; then
CONFIG_CHECK="~INOTIFY_USER"
if use test ; then
CONFIG_CHECK="~IPV6"
WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
fi
linux-info_pkg_setup
fi
python-any-r1_pkg_setup
}
src_prepare() {
if use test; then
# TODO: Review the test exclusions, especially now with meson
# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
if ! has_version dev-util/desktop-file-utils ; then
ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
ewarn "think on installing it to get these tests run."
sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
fi
# gdesktopappinfo requires existing terminal (gnome-terminal or any
# other), falling back to xterm if one doesn't exist
#if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
# ewarn "Some tests will be skipped due to missing terminal program"
# These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
# Also try https://gitlab.gnome.org/GNOME/glib/issues/1601 once ready
# for backport (or in a bump) and file new issue if still fails
sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
# desktop-app-info/launch* might fail similarly
sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
#fi
# https://bugzilla.gnome.org/show_bug.cgi?id=722604
sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
ewarn "Tests for search-utils have been skipped"
sed -i -e "/search-utils/d" glib/tests/meson.build || die
# Play nice with network-sandbox, but this approach would defeat the purpose of the test
#sed -i -e "s/localhost/127.0.0.1/g" gio/tests/gsocketclient-slow.c || die
else
# Don't build tests, also prevents extra deps, bug #512022
sed -i -e '/subdir.*tests/d' {.,gio,glib}/meson.build || die
fi
# Don't build fuzzing binaries - not used
sed -i -e '/subdir.*fuzzing/d' meson.build || die
# gdbus-codegen is a separate package
sed -i -e '/install_dir/d' gio/gdbus-2.0/codegen/meson.build || die
sed -i -e '/install : true/d' gio/gdbus-2.0/codegen/meson.build || die
# Same kind of meson-0.50 issue with some installed-tests files; will likely be fixed upstream soon
sed -i -e '/install_dir/d' gio/tests/meson.build || die
cat > "${T}/glib-test-ld-wrapper" <<-EOF
#!/usr/bin/env sh
exec \${LD:-ld} "\$@"
EOF
chmod a+x "${T}/glib-test-ld-wrapper" || die
sed -i -e "s|'ld'|'${T}/glib-test-ld-wrapper'|g" gio/tests/meson.build || die
# make default sane for us
if use prefix ; then
sed -i -e "s:/usr/local:${EPREFIX}/usr:" gio/xdgmime/xdgmime.c || die
# bug #308609, without path, bug #314057
export PERL=perl
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# fix standards conflicts
sed -i \
-e 's/\<\(_XOPEN_SOURCE_EXTENDED\)\>/_POSIX_PTHREAD_SEMANTICS/' \
-e '/\<_XOPEN_SOURCE\>/s/\<2\>/600/' \
meson.build || die
sed -i -e '/#define\s\+_POSIX_SOURCE/d' \
glib/giounix.c || die
fi
# disable native macOS integrations
sed -i -e '/glib_conf.set(.HAVE_\(CARBON\|COCOA\).,/s/true/false/' \
meson.build || die
sed -i \
-e '/AvailabilityMacros.h/d' \
gio/giomodule.c || die
# Link the glib source to the introspection subproject directory so it can be built there first
if use introspection ; then
ln -s "${S}" "${INTROSPECTION_SOURCE_DIR}/subprojects/glib"
# bug #946578
cd "${INTROSPECTION_SOURCE_DIR}" || die
eapply "${FILESDIR}"/glib-2.80.5-gobject-introspection-1.80.patch
cd "${S}" || die
fi
default
gnome2_environment_reset
# TODO: python_name sedding for correct python shebang? Might be relevant mainly for glib-utils only
}
src_configure() {
lto-guarantee-fat
meson-multilib_src_configure
}
multilib_src_configure() {
# TODO: figure a way to pass appropriate values for all cross properties
# that glib uses (search for get_cross_property)
#if tc-is-cross-compiler ; then
# https://bugzilla.gnome.org/show_bug.cgi?id=756473
# TODO-meson: This should be in meson cross file as 'growing_stack'
# property; and more, look at get_cross_property
#case ${CHOST} in
#hppa*|metag*) export glib_cv_stack_grows=yes ;;
#*) export glib_cv_stack_grows=no ;;
#esac
#fi
_need_bootstrap_gi() {
if ! multilib_native_use introspection ; then
return 1
fi
if ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then
return 0
fi
# Is the installed gobject-introspection usable?
if ! g-ir-scanner --version &> /dev/null ; then
return 0
fi
# Do we somehow have a dev-libs/gobject-introspection installed
# with an unsatisfied dependency? (bug #951487)
if ! $(tc-getPKG_CONFIG) --cflags gobject-introspection-1.0 &> /dev/null ; then
return 0
fi
# Make sure has_version didn't lie to us while at it as well,
# given bug #951487.
if ! $(tc-getPKG_CONFIG) --atleast-version=${INTROSPECTION_PV} gobject-introspection-1.0 &> /dev/null ; then
return 0
fi
return 1
}
# Build internal copy of gobject-introspection to avoid circular dependency (built for native abi only)
if _need_bootstrap_gi ; then
einfo "Bootstrapping gobject-introspection..."
INTROSPECTION_BIN_DIR="${T}/bootstrap-gi-prefix/usr/bin"
INTROSPECTION_LIB_DIR="${T}/bootstrap-gi-prefix/usr/$(get_libdir)"
local emesonargs=(
--prefix="${T}/bootstrap-gi-prefix/usr"
-Dpython="${EPYTHON}"
-Dbuild_introspection_data=true
# Build an internal copy of glib for the internal copy of gobject-introspection
--force-fallback-for=glib
# Make the paths in pkgconfig files relative as we used to not
# do a proper install here and it seems less risky to keep it
# this way.
-Dpkgconfig.relocatable=true
# We want as minimal a build as possible here to speed things up
# and reduce the risk of failures.
-Dglib:selinux=disabled
-Dglib:xattr=false
-Dglib:libmount=disabled
-Dglib:man-pages=disabled
-Dglib:dtrace=false
-Dglib:systemtap=false
-Dglib:sysprof=disabled
-Dglib:documentation=false
-Dglib:tests=false
-Dglib:installed_tests=false
-Dglib:nls=disabled
-Dglib:oss_fuzz=disabled
-Dglib:libelf=disabled
-Dglib:multiarch=false
)
ORIG_SOURCE_DIR=${EMESON_SOURCE}
EMESON_SOURCE=${INTROSPECTION_SOURCE_DIR}
# g-ir-scanner has some relocatable logic but it searches
# for 'lib', not 'lib64', so it can't find itself and eventually
# falls back to the system installation. See bug #946221.
sed -i -e "/^pylibdir =/s:'lib:'$(get_libdir):" "${EMESON_SOURCE}"/tools/g-ir-tool-template.in || die
ORIG_BUILD_DIR=${BUILD_DIR}
BUILD_DIR=${INTROSPECTION_BUILD_DIR}
pushd ${INTROSPECTION_SOURCE_DIR} || die
meson_src_configure
meson_src_compile
# We already provide a prefix in ${T} above. Blank DESTDIR
# as it may be set in the environment by Portage (though not
# guaranteed in src_configure).
meson_src_install --destdir ""
popd || die
EMESON_SOURCE=${ORIG_SOURCE_DIR}
BUILD_DIR=${ORIG_BUILD_DIR}
# Add gobject-introspection binaries and pkgconfig files to path
export PATH="${INTROSPECTION_BIN_DIR}:${PATH}"
# Override primary pkgconfig search paths to prioritize our internal copy
export PKG_CONFIG_LIBDIR="${INTROSPECTION_LIB_DIR}/pkgconfig:${INTROSPECTION_BUILD_DIR}/meson-private"
# Set the normal primary pkgconfig search paths as secondary
# (We also need to prepend our just-built one for later use of
# g-ir-scanner to use the new one and to help workaround bugs like
# bug #946221.)
export PKG_CONFIG_PATH="${PKG_CONFIG_LIBDIR}:$(pkg-config --variable pc_path pkg-config)"
# Add the paths to the built glib libraries to the library path so that gobject-introspection can load them
for gliblib in glib gobject gthread gmodule gio girepository; do
export LD_LIBRARY_PATH="${BUILD_DIR}/${gliblib}:${LD_LIBRARY_PATH}"
done
# Add the path to introspection libraries so that glib can call gir utilities
export LD_LIBRARY_PATH="${INTROSPECTION_LIB_DIR}:${LD_LIBRARY_PATH}"
# Add the paths to the gobject-introspection python modules to python path so they can be imported
export PYTHONPATH="${INTROSPECTION_LIB_DIR}/gobject-introspection:${PYTHONPATH}"
fi
# TODO: Can this be cleaned up now we have -Dglib_debug? (bug #946485)
use debug && EMESON_BUILD_TYPE=debug
local emesonargs=(
-Ddefault_library=$(usex static-libs both shared)
-Druntime_dir="${EPREFIX}"/run
$(meson_feature debug glib_debug)
$(meson_feature selinux)
$(meson_use xattr)
-Dlibmount=enabled # only used if host_system == 'linux'
-Dman-pages=enabled
$(meson_use systemtap dtrace)
$(meson_use systemtap)
$(meson_feature sysprof)
$(meson_use doc documentation)
$(meson_use test tests)
-Dinstalled_tests=false
-Dnls=enabled
-Doss_fuzz=disabled
$(meson_native_use_feature elf libelf)
-Dmultiarch=false
$(meson_native_use_feature introspection)
)
# Workaround for bug #938302
if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
local native_file="${T}"/meson.${CHOST}.ini.local
cat >> ${native_file} <<-EOF || die
[binaries]
dtrace='stap-dtrace'
EOF
emesonargs+=( --native-file "${native_file}" )
fi
meson_src_configure
}
multilib_src_test() {
export XDG_CONFIG_DIRS=/etc/xdg
export XDG_DATA_DIRS=/usr/local/share:/usr/share
# TODO: Use ${ABI} here to be unique for multilib?
export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
export LC_TIME=C # bug #411967
export TZ=UTC
unset GSETTINGS_BACKEND # bug #596380
python_setup
# https://bugs.gentoo.org/839807
local -x SANDBOX_PREDICT=${SANDBOX_PREDICT}
addpredict /usr/b
# Related test is a bit nitpicking
mkdir -p "$G_DBUS_COOKIE_SHA1_KEYRING_DIR" || die
chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR" || die
meson_src_test --timeout-multiplier 20 --no-suite flaky
}
multilib_src_install() {
meson_src_install
keepdir /usr/$(get_libdir)/gio/modules
}
multilib_src_install_all() {
strip-lto-bytecode
# These are installed by dev-util/glib-utils
# TODO: With patching we might be able to get rid of the python-any deps
# and removals, and test depend on glib-utils instead; revisit now with
# meson
rm "${ED}/usr/bin/glib-genmarshal" || die
rm "${ED}/usr/share/man/man1/glib-genmarshal.1" || die
rm "${ED}/usr/bin/glib-mkenums" || die
rm "${ED}/usr/share/man/man1/glib-mkenums.1" || die
rm "${ED}/usr/bin/gtester-report" || die
rm "${ED}/usr/share/man/man1/gtester-report.1" || die
# gdbus-codegen manpage installed by dev-util/gdbus-codegen
rm "${ED}/usr/share/man/man1/gdbus-codegen.1" || die
}
pkg_preinst() {
xdg_pkg_preinst
# Make gschemas.compiled belong to glib alone
local cache="/usr/share/glib-2.0/schemas/gschemas.compiled"
if [[ -e ${EROOT}${cache} ]]; then
cp "${EROOT}"${cache} "${ED}"/${cache} || die
else
touch "${ED}"${cache} || die
fi
multilib_pkg_preinst() {
# Make giomodule.cache belong to glib alone
local cache="/usr/$(get_libdir)/gio/modules/giomodule.cache"
if [[ -e ${EROOT}${cache} ]]; then
cp "${EROOT}"${cache} "${ED}"${cache} || die
else
touch "${ED}"${cache} || die
fi
}
# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
# file due to inability to create it and GIO might not look at any of the modules there
if ! tc-is-cross-compiler ; then
multilib_foreach_abi multilib_pkg_preinst
fi
}
pkg_postinst() {
xdg_pkg_postinst
# glib installs no schemas itself, but we force update for fresh install in case
# something has dropped in a schemas file without direct glib dep; and for upgrades
# in case the compiled schema format could have changed
gnome2_schemas_update
multilib_pkg_postinst() {
gnome2_giomodule_cache_update \
|| die "Update GIO modules cache failed (for ${ABI})"
}
if ! tc-is-cross-compiler ; then
multilib_foreach_abi multilib_pkg_postinst
else
ewarn "Updating of GIO modules cache skipped due to cross-compilation."
ewarn "You might want to run gio-querymodules manually on the target for"
ewarn "your final image for performance reasons and re-run it when packages"
ewarn "installing GIO modules get upgraded or added to the image."
fi
for v in ${REPLACING_VERSIONS}; do
if ver_test "$v" "-lt" "2.63.6"; then
ewarn "glib no longer installs the gio-launch-desktop binary. You may need"
ewarn "to restart your session for \"Open With\" dialogs to work."
fi
done
}
pkg_postrm() {
xdg_pkg_postrm
gnome2_schemas_update
if [[ -z ${REPLACED_BY_VERSION} ]]; then
multilib_pkg_postrm() {
rm -f "${EROOT}"/usr/$(get_libdir)/gio/modules/giomodule.cache || die
}
multilib_foreach_abi multilib_pkg_postrm
rm -f "${EROOT}"/usr/share/glib-2.0/schemas/gschemas.compiled || die
fi
}

View File

@ -1,483 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_REQ_USE="xml(+)"
PYTHON_COMPAT=( python3_{11..13} )
inherit dot-a eapi9-ver gnome.org gnome2-utils linux-info meson-multilib multilib python-any-r1 toolchain-funcs xdg
DESCRIPTION="The GLib library of C routines"
HOMEPAGE="https://www.gtk.org/"
INTROSPECTION_PN="gobject-introspection"
INTROSPECTION_PV="1.82.0"
INTROSPECTION_P="${INTROSPECTION_PN}-${INTROSPECTION_PV}"
SRC_URI="
${SRC_URI}
introspection? ( mirror://gnome/sources/gobject-introspection/${INTROSPECTION_PV%.*}/gobject-introspection-${INTROSPECTION_PV}.tar.${GNOME_TARBALL_SUFFIX} )
"
INTROSPECTION_SOURCE_DIR="${WORKDIR}/${INTROSPECTION_P}"
INTROSPECTION_BUILD_DIR="${WORKDIR}/${INTROSPECTION_P}-build"
LICENSE="LGPL-2.1+"
SLOT="2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="dbus debug +elf doc +introspection +mime selinux static-libs sysprof systemtap test utils xattr"
RESTRICT="!test? ( test )"
# * elfutils (via libelf) does not build on Windows. gresources are not embedded
# within ELF binaries on that platform anyway and inspecting ELF binaries from
# other platforms is not that useful so exclude the dependency in this case.
# * Technically static-libs is needed on zlib, util-linux and perhaps more, but
# these are used by GIO, which glib[static-libs] consumers don't really seem
# to need at all, thus not imposing the deps for now and once some consumers
# are actually found to static link libgio-2.0.a, we can revisit and either add
# them or just put the (build) deps in that rare consumer instead of recursive
# RDEPEND here (due to lack of recursive DEPEND).
RDEPEND="
!<dev-libs/gobject-introspection-1.80.1
!<dev-util/gdbus-codegen-${PV}
>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
>=dev-libs/libpcre2-10.32:0=[${MULTILIB_USEDEP},unicode(+),static-libs?]
>=dev-libs/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
introspection? (
>=dev-libs/gobject-introspection-common-${INTROSPECTION_PV}
)
kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) )
elf? ( virtual/libelf:0= )
sysprof? ( >=dev-util/sysprof-capture-3.40.1:4[${MULTILIB_USEDEP}] )
"
DEPEND="${RDEPEND}"
# libxml2 used for optional tests that get automatically skipped
BDEPEND="
app-text/docbook-xsl-stylesheets
>=dev-build/meson-1.4.0
dev-libs/libxslt
>=sys-devel/gettext-0.19.8
doc? ( >=dev-util/gi-docgen-2023.1 )
dev-python/docutils
systemtap? ( >=dev-debug/systemtap-1.3 )
${PYTHON_DEPS}
test? ( >=sys-apps/dbus-1.2.14 )
virtual/pkgconfig
introspection? (
$(python_gen_any_dep '
dev-python/setuptools[${PYTHON_USEDEP}]
')
virtual/pkgconfig
sys-devel/bison
app-alternatives/lex
${PYTHON_DEPS}
)
"
# TODO: >=dev-util/gdbus-codegen-${PV} test dep once we modify gio/tests/meson.build to use external gdbus-codegen
PDEPEND="
dbus? ( gnome-base/dconf )
mime? ( x11-misc/shared-mime-info )
"
# shared-mime-info needed for gio/xdgmime, bug #409481
# dconf is needed to be able to save settings, bug #498436
MULTILIB_CHOST_TOOLS=(
/usr/bin/gio-querymodules$(get_exeext)
)
PATCHES=(
"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
)
python_check_deps() {
if use introspection ; then
python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
fi
}
pkg_setup() {
if use kernel_linux ; then
CONFIG_CHECK="~INOTIFY_USER"
if use test ; then
CONFIG_CHECK="~IPV6"
WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
fi
linux-info_pkg_setup
fi
python-any-r1_pkg_setup
}
src_prepare() {
if use test; then
# TODO: Review the test exclusions, especially now with meson
# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
if ! has_version dev-util/desktop-file-utils ; then
ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
ewarn "think on installing it to get these tests run."
sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
fi
# gdesktopappinfo requires existing terminal (gnome-terminal or any
# other), falling back to xterm if one doesn't exist
#if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
# ewarn "Some tests will be skipped due to missing terminal program"
# These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
# Also try https://gitlab.gnome.org/GNOME/glib/issues/1601 once ready
# for backport (or in a bump) and file new issue if still fails
sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
# desktop-app-info/launch* might fail similarly
sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
#fi
# https://bugzilla.gnome.org/show_bug.cgi?id=722604
sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
ewarn "Tests for search-utils have been skipped"
sed -i -e "/search-utils/d" glib/tests/meson.build || die
# Running gdb inside a test within sandbox is brittle
sed -i -e '/self.__gdb = shutil.which("gdb")/s:"gdb":"gdb-idonotexist":' glib/tests/assert-msg-test.py || die
# Play nice with network-sandbox, but this approach would defeat the purpose of the test
#sed -i -e "s/localhost/127.0.0.1/g" gio/tests/gsocketclient-slow.c || die
else
# Don't build tests, also prevents extra deps, bug #512022
sed -i -e '/subdir.*tests/d' {.,gio,glib}/meson.build || die
fi
# Don't build fuzzing binaries - not used
sed -i -e '/subdir.*fuzzing/d' meson.build || die
# gdbus-codegen is a separate package
sed -i -e '/install_dir/d' gio/gdbus-2.0/codegen/meson.build || die
sed -i -e '/install : true/d' gio/gdbus-2.0/codegen/meson.build || die
# Same kind of meson-0.50 issue with some installed-tests files; will likely be fixed upstream soon
sed -i -e '/install_dir/d' gio/tests/meson.build || die
cat > "${T}/glib-test-ld-wrapper" <<-EOF
#!/usr/bin/env sh
exec \${LD:-ld} "\$@"
EOF
chmod a+x "${T}/glib-test-ld-wrapper" || die
sed -i -e "s|'ld'|'${T}/glib-test-ld-wrapper'|g" gio/tests/meson.build || die
# make default sane for us
if use prefix ; then
sed -i -e "s:/usr/local:${EPREFIX}/usr:" gio/xdgmime/xdgmime.c || die
# bug #308609, without path, bug #314057
export PERL=perl
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# fix standards conflicts
sed -i \
-e 's/\<\(_XOPEN_SOURCE_EXTENDED\)\>/_POSIX_PTHREAD_SEMANTICS/' \
-e '/\<_XOPEN_SOURCE\>/s/\<2\>/600/' \
meson.build || die
sed -i -e '/#define\s\+_POSIX_SOURCE/d' \
glib/giounix.c || die
fi
# disable native macOS integrations
sed -i -e '/glib_conf.set(.HAVE_\(CARBON\|COCOA\).,/s/true/false/' \
meson.build || die
sed -i \
-e '/AvailabilityMacros.h/d' \
gio/giomodule.c || die
# Link the glib source to the introspection subproject directory so it can be built there first
if use introspection ; then
ln -s "${S}" "${INTROSPECTION_SOURCE_DIR}/subprojects/glib"
fi
default
gnome2_environment_reset
# TODO: python_name sedding for correct python shebang? Might be relevant mainly for glib-utils only
}
src_configure() {
lto-guarantee-fat
meson-multilib_src_configure
}
multilib_src_configure() {
# TODO: figure a way to pass appropriate values for all cross properties
# that glib uses (search for get_cross_property)
#if tc-is-cross-compiler ; then
# https://bugzilla.gnome.org/show_bug.cgi?id=756473
# TODO-meson: This should be in meson cross file as 'growing_stack'
# property; and more, look at get_cross_property
#case ${CHOST} in
#hppa*|metag*) export glib_cv_stack_grows=yes ;;
#*) export glib_cv_stack_grows=no ;;
#esac
#fi
_need_bootstrap_gi() {
if ! multilib_native_use introspection ; then
return 1
fi
if ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then
return 0
fi
# Is the installed gobject-introspection usable?
if ! g-ir-scanner --version &> /dev/null ; then
return 0
fi
# Do we somehow have a dev-libs/gobject-introspection installed
# with an unsatisfied dependency? (bug #951487)
if ! $(tc-getPKG_CONFIG) --cflags gobject-introspection-1.0 &> /dev/null ; then
return 0
fi
# Make sure has_version didn't lie to us while at it as well,
# given bug #951487.
if ! $(tc-getPKG_CONFIG) --atleast-version=${INTROSPECTION_PV} gobject-introspection-1.0 &> /dev/null ; then
return 0
fi
return 1
}
# Build internal copy of gobject-introspection to avoid circular dependency (built for native abi only)
if _need_bootstrap_gi ; then
einfo "Bootstrapping gobject-introspection..."
INTROSPECTION_BIN_DIR="${T}/bootstrap-gi-prefix/usr/bin"
INTROSPECTION_LIB_DIR="${T}/bootstrap-gi-prefix/usr/$(get_libdir)"
local emesonargs=(
--prefix="${T}/bootstrap-gi-prefix/usr"
-Dpython="${EPYTHON}"
-Dbuild_introspection_data=true
# Build an internal copy of glib for the internal copy of gobject-introspection
--force-fallback-for=glib
# Make the paths in pkgconfig files relative as we used to not
# do a proper install here and it seems less risky to keep it
# this way.
-Dpkgconfig.relocatable=true
# We want as minimal a build as possible here to speed things up
# and reduce the risk of failures.
-Dglib:selinux=disabled
-Dglib:xattr=false
-Dglib:libmount=disabled
-Dglib:man-pages=disabled
-Dglib:dtrace=disabled
-Dglib:systemtap=disabled
-Dglib:sysprof=disabled
-Dglib:documentation=false
-Dglib:tests=false
-Dglib:installed_tests=false
-Dglib:nls=disabled
-Dglib:oss_fuzz=disabled
-Dglib:libelf=disabled
-Dglib:multiarch=false
)
ORIG_SOURCE_DIR=${EMESON_SOURCE}
EMESON_SOURCE=${INTROSPECTION_SOURCE_DIR}
# g-ir-scanner has some relocatable logic but it searches
# for 'lib', not 'lib64', so it can't find itself and eventually
# falls back to the system installation. See bug #946221.
sed -i -e "/^pylibdir =/s:'lib:'$(get_libdir):" "${EMESON_SOURCE}"/tools/g-ir-tool-template.in || die
ORIG_BUILD_DIR=${BUILD_DIR}
BUILD_DIR=${INTROSPECTION_BUILD_DIR}
pushd ${INTROSPECTION_SOURCE_DIR} || die
meson_src_configure
meson_src_compile
# We already provide a prefix in ${T} above. Blank DESTDIR
# as it may be set in the environment by Portage (though not
# guaranteed in src_configure).
meson_src_install --destdir ""
popd || die
EMESON_SOURCE=${ORIG_SOURCE_DIR}
BUILD_DIR=${ORIG_BUILD_DIR}
# Add gobject-introspection binaries and pkgconfig files to path
export PATH="${INTROSPECTION_BIN_DIR}:${PATH}"
# Override primary pkgconfig search paths to prioritize our internal copy
export PKG_CONFIG_LIBDIR="${INTROSPECTION_LIB_DIR}/pkgconfig:${INTROSPECTION_BUILD_DIR}/meson-private"
# Set the normal primary pkgconfig search paths as secondary
# (We also need to prepend our just-built one for later use of
# g-ir-scanner to use the new one and to help workaround bugs like
# bug #946221.)
export PKG_CONFIG_PATH="${PKG_CONFIG_LIBDIR}:$(pkg-config --variable pc_path pkg-config)"
# Add the paths to the built glib libraries to the library path so that gobject-introspection can load them
for gliblib in glib gobject gthread gmodule gio girepository; do
export LD_LIBRARY_PATH="${BUILD_DIR}/${gliblib}:${LD_LIBRARY_PATH}"
done
# Add the path to introspection libraries so that glib can call gir utilities
export LD_LIBRARY_PATH="${INTROSPECTION_LIB_DIR}:${LD_LIBRARY_PATH}"
# Add the paths to the gobject-introspection python modules to python path so they can be imported
export PYTHONPATH="${INTROSPECTION_LIB_DIR}/gobject-introspection:${PYTHONPATH}"
fi
# TODO: Can this be cleaned up now we have -Dglib_debug? (bug #946485)
use debug && EMESON_BUILD_TYPE=debug
local emesonargs=(
-Ddefault_library=$(usex static-libs both shared)
-Druntime_dir="${EPREFIX}"/run
$(meson_feature debug glib_debug)
$(meson_feature selinux)
$(meson_use xattr)
-Dlibmount=enabled # only used if host_system == 'linux'
-Dman-pages=enabled
$(meson_feature systemtap dtrace)
$(meson_feature systemtap)
$(meson_feature sysprof)
$(meson_use doc documentation)
$(meson_use test tests)
-Dinstalled_tests=false
-Dnls=enabled
-Doss_fuzz=disabled
$(meson_native_use_feature elf libelf)
-Dmultiarch=false
$(meson_native_use_feature introspection)
)
# Workaround for bug #938302
if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
local native_file="${T}"/meson.${CHOST}.ini.local
cat >> ${native_file} <<-EOF || die
[binaries]
dtrace='stap-dtrace'
EOF
emesonargs+=( --native-file "${native_file}" )
fi
meson_src_configure
}
multilib_src_test() {
export XDG_CONFIG_DIRS=/etc/xdg
export XDG_DATA_DIRS=/usr/local/share:/usr/share
# TODO: Use ${ABI} here to be unique for multilib?
export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
export LC_TIME=C # bug #411967
export TZ=UTC
unset GSETTINGS_BACKEND # bug #596380
python_setup
# https://bugs.gentoo.org/839807
local -x SANDBOX_PREDICT=${SANDBOX_PREDICT}
addpredict /usr/b
# Related test is a bit nitpicking
mkdir -p "$G_DBUS_COOKIE_SHA1_KEYRING_DIR" || die
chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR" || die
meson_src_test --timeout-multiplier 20 --no-suite flaky
}
multilib_src_install() {
meson_src_install
keepdir /usr/$(get_libdir)/gio/modules
}
multilib_src_install_all() {
strip-lto-bytecode
# These are installed by dev-util/glib-utils
# TODO: With patching we might be able to get rid of the python-any deps
# and removals, and test depend on glib-utils instead; revisit now with
# meson
rm "${ED}/usr/bin/glib-genmarshal" || die
rm "${ED}/usr/share/man/man1/glib-genmarshal.1" || die
rm "${ED}/usr/bin/glib-mkenums" || die
rm "${ED}/usr/share/man/man1/glib-mkenums.1" || die
rm "${ED}/usr/bin/gtester-report" || die
rm "${ED}/usr/share/man/man1/gtester-report.1" || die
# gdbus-codegen manpage installed by dev-util/gdbus-codegen
rm "${ED}/usr/share/man/man1/gdbus-codegen.1" || die
}
pkg_preinst() {
xdg_pkg_preinst
# Make gschemas.compiled belong to glib alone
local cache="/usr/share/glib-2.0/schemas/gschemas.compiled"
if [[ -e ${EROOT}${cache} ]]; then
cp "${EROOT}"${cache} "${ED}"/${cache} || die
else
touch "${ED}"${cache} || die
fi
multilib_pkg_preinst() {
# Make giomodule.cache belong to glib alone
local cache="/usr/$(get_libdir)/gio/modules/giomodule.cache"
if [[ -e ${EROOT}${cache} ]]; then
cp "${EROOT}"${cache} "${ED}"${cache} || die
else
touch "${ED}"${cache} || die
fi
}
# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
# file due to inability to create it and GIO might not look at any of the modules there
if ! tc-is-cross-compiler ; then
multilib_foreach_abi multilib_pkg_preinst
fi
}
pkg_postinst() {
xdg_pkg_postinst
# glib installs no schemas itself, but we force update for fresh install in case
# something has dropped in a schemas file without direct glib dep; and for upgrades
# in case the compiled schema format could have changed
gnome2_schemas_update
multilib_pkg_postinst() {
gnome2_giomodule_cache_update \
|| die "Update GIO modules cache failed (for ${ABI})"
}
if ! tc-is-cross-compiler ; then
multilib_foreach_abi multilib_pkg_postinst
else
ewarn "Updating of GIO modules cache skipped due to cross-compilation."
ewarn "You might want to run gio-querymodules manually on the target for"
ewarn "your final image for performance reasons and re-run it when packages"
ewarn "installing GIO modules get upgraded or added to the image."
fi
if ver_replacing "-lt" "2.63.6"; then
ewarn "glib no longer installs the gio-launch-desktop binary. You may need"
ewarn "to restart your session for \"Open With\" dialogs to work."
fi
}
pkg_postrm() {
xdg_pkg_postrm
gnome2_schemas_update
if [[ -z ${REPLACED_BY_VERSION} ]]; then
multilib_pkg_postrm() {
rm -f "${EROOT}"/usr/$(get_libdir)/gio/modules/giomodule.cache || die
}
multilib_foreach_abi multilib_pkg_postrm
rm -f "${EROOT}"/usr/share/glib-2.0/schemas/gschemas.compiled || die
fi
}

View File

@ -1,484 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_REQ_USE="xml(+)"
PYTHON_COMPAT=( python3_{11..13} )
inherit dot-a eapi9-ver gnome.org gnome2-utils linux-info meson-multilib multilib python-any-r1 toolchain-funcs xdg
DESCRIPTION="The GLib library of C routines"
HOMEPAGE="https://www.gtk.org/"
INTROSPECTION_PN="gobject-introspection"
INTROSPECTION_PV="1.82.0"
INTROSPECTION_P="${INTROSPECTION_PN}-${INTROSPECTION_PV}"
SRC_URI="
${SRC_URI}
introspection? ( mirror://gnome/sources/gobject-introspection/${INTROSPECTION_PV%.*}/gobject-introspection-${INTROSPECTION_PV}.tar.${GNOME_TARBALL_SUFFIX} )
"
INTROSPECTION_SOURCE_DIR="${WORKDIR}/${INTROSPECTION_P}"
INTROSPECTION_BUILD_DIR="${WORKDIR}/${INTROSPECTION_P}-build"
LICENSE="LGPL-2.1+"
SLOT="2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="dbus debug +elf doc +introspection +mime selinux static-libs sysprof systemtap test utils xattr"
RESTRICT="!test? ( test )"
# * elfutils (via libelf) does not build on Windows. gresources are not embedded
# within ELF binaries on that platform anyway and inspecting ELF binaries from
# other platforms is not that useful so exclude the dependency in this case.
# * Technically static-libs is needed on zlib, util-linux and perhaps more, but
# these are used by GIO, which glib[static-libs] consumers don't really seem
# to need at all, thus not imposing the deps for now and once some consumers
# are actually found to static link libgio-2.0.a, we can revisit and either add
# them or just put the (build) deps in that rare consumer instead of recursive
# RDEPEND here (due to lack of recursive DEPEND).
RDEPEND="
!<dev-libs/gobject-introspection-1.80.1
!<dev-util/gdbus-codegen-${PV}
>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
>=dev-libs/libpcre2-10.32:0=[${MULTILIB_USEDEP},unicode(+),static-libs?]
>=dev-libs/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
introspection? (
>=dev-libs/gobject-introspection-common-${INTROSPECTION_PV}
)
kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) )
elf? ( virtual/libelf:0= )
sysprof? ( >=dev-util/sysprof-capture-3.40.1:4[${MULTILIB_USEDEP}] )
"
DEPEND="${RDEPEND}"
# libxml2 used for optional tests that get automatically skipped
BDEPEND="
app-text/docbook-xsl-stylesheets
>=dev-build/meson-1.4.0
dev-libs/libxslt
>=sys-devel/gettext-0.19.8
doc? ( >=dev-util/gi-docgen-2023.1 )
dev-python/docutils
systemtap? ( >=dev-debug/systemtap-1.3 )
${PYTHON_DEPS}
test? ( >=sys-apps/dbus-1.2.14 )
virtual/pkgconfig
introspection? (
$(python_gen_any_dep '
dev-python/setuptools[${PYTHON_USEDEP}]
')
virtual/pkgconfig
sys-devel/bison
app-alternatives/lex
${PYTHON_DEPS}
)
"
# TODO: >=dev-util/gdbus-codegen-${PV} test dep once we modify gio/tests/meson.build to use external gdbus-codegen
PDEPEND="
dbus? ( gnome-base/dconf )
mime? ( x11-misc/shared-mime-info )
"
# shared-mime-info needed for gio/xdgmime, bug #409481
# dconf is needed to be able to save settings, bug #498436
MULTILIB_CHOST_TOOLS=(
/usr/bin/gio-querymodules$(get_exeext)
)
PATCHES=(
"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
"${FILESDIR}"/${PN}-2.84.1-gclosure-vs-threads.patch
)
python_check_deps() {
if use introspection ; then
python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
fi
}
pkg_setup() {
if use kernel_linux ; then
CONFIG_CHECK="~INOTIFY_USER"
if use test ; then
CONFIG_CHECK="~IPV6"
WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
fi
linux-info_pkg_setup
fi
python-any-r1_pkg_setup
}
src_prepare() {
if use test; then
# TODO: Review the test exclusions, especially now with meson
# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
if ! has_version dev-util/desktop-file-utils ; then
ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
ewarn "think on installing it to get these tests run."
sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
fi
# gdesktopappinfo requires existing terminal (gnome-terminal or any
# other), falling back to xterm if one doesn't exist
#if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
# ewarn "Some tests will be skipped due to missing terminal program"
# These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
# Also try https://gitlab.gnome.org/GNOME/glib/issues/1601 once ready
# for backport (or in a bump) and file new issue if still fails
sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
# desktop-app-info/launch* might fail similarly
sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
#fi
# https://bugzilla.gnome.org/show_bug.cgi?id=722604
sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
ewarn "Tests for search-utils have been skipped"
sed -i -e "/search-utils/d" glib/tests/meson.build || die
# Running gdb inside a test within sandbox is brittle
sed -i -e '/self.__gdb = shutil.which("gdb")/s:"gdb":"gdb-idonotexist":' glib/tests/assert-msg-test.py || die
# Play nice with network-sandbox, but this approach would defeat the purpose of the test
#sed -i -e "s/localhost/127.0.0.1/g" gio/tests/gsocketclient-slow.c || die
else
# Don't build tests, also prevents extra deps, bug #512022
sed -i -e '/subdir.*tests/d' {.,gio,glib}/meson.build || die
fi
# Don't build fuzzing binaries - not used
sed -i -e '/subdir.*fuzzing/d' meson.build || die
# gdbus-codegen is a separate package
sed -i -e '/install_dir/d' gio/gdbus-2.0/codegen/meson.build || die
sed -i -e '/install : true/d' gio/gdbus-2.0/codegen/meson.build || die
# Same kind of meson-0.50 issue with some installed-tests files; will likely be fixed upstream soon
sed -i -e '/install_dir/d' gio/tests/meson.build || die
cat > "${T}/glib-test-ld-wrapper" <<-EOF
#!/usr/bin/env sh
exec \${LD:-ld} "\$@"
EOF
chmod a+x "${T}/glib-test-ld-wrapper" || die
sed -i -e "s|'ld'|'${T}/glib-test-ld-wrapper'|g" gio/tests/meson.build || die
# make default sane for us
if use prefix ; then
sed -i -e "s:/usr/local:${EPREFIX}/usr:" gio/xdgmime/xdgmime.c || die
# bug #308609, without path, bug #314057
export PERL=perl
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# fix standards conflicts
sed -i \
-e 's/\<\(_XOPEN_SOURCE_EXTENDED\)\>/_POSIX_PTHREAD_SEMANTICS/' \
-e '/\<_XOPEN_SOURCE\>/s/\<2\>/600/' \
meson.build || die
sed -i -e '/#define\s\+_POSIX_SOURCE/d' \
glib/giounix.c || die
fi
# disable native macOS integrations
sed -i -e '/glib_conf.set(.HAVE_\(CARBON\|COCOA\).,/s/true/false/' \
meson.build || die
sed -i \
-e '/AvailabilityMacros.h/d' \
gio/giomodule.c || die
# Link the glib source to the introspection subproject directory so it can be built there first
if use introspection ; then
ln -s "${S}" "${INTROSPECTION_SOURCE_DIR}/subprojects/glib"
fi
default
gnome2_environment_reset
# TODO: python_name sedding for correct python shebang? Might be relevant mainly for glib-utils only
}
src_configure() {
lto-guarantee-fat
meson-multilib_src_configure
}
multilib_src_configure() {
# TODO: figure a way to pass appropriate values for all cross properties
# that glib uses (search for get_cross_property)
#if tc-is-cross-compiler ; then
# https://bugzilla.gnome.org/show_bug.cgi?id=756473
# TODO-meson: This should be in meson cross file as 'growing_stack'
# property; and more, look at get_cross_property
#case ${CHOST} in
#hppa*|metag*) export glib_cv_stack_grows=yes ;;
#*) export glib_cv_stack_grows=no ;;
#esac
#fi
_need_bootstrap_gi() {
if ! multilib_native_use introspection ; then
return 1
fi
if ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then
return 0
fi
# Is the installed gobject-introspection usable?
if ! g-ir-scanner --version &> /dev/null ; then
return 0
fi
# Do we somehow have a dev-libs/gobject-introspection installed
# with an unsatisfied dependency? (bug #951487)
if ! $(tc-getPKG_CONFIG) --cflags gobject-introspection-1.0 &> /dev/null ; then
return 0
fi
# Make sure has_version didn't lie to us while at it as well,
# given bug #951487.
if ! $(tc-getPKG_CONFIG) --atleast-version=${INTROSPECTION_PV} gobject-introspection-1.0 &> /dev/null ; then
return 0
fi
return 1
}
# Build internal copy of gobject-introspection to avoid circular dependency (built for native abi only)
if _need_bootstrap_gi ; then
einfo "Bootstrapping gobject-introspection..."
INTROSPECTION_BIN_DIR="${T}/bootstrap-gi-prefix/usr/bin"
INTROSPECTION_LIB_DIR="${T}/bootstrap-gi-prefix/usr/$(get_libdir)"
local emesonargs=(
--prefix="${T}/bootstrap-gi-prefix/usr"
-Dpython="${EPYTHON}"
-Dbuild_introspection_data=true
# Build an internal copy of glib for the internal copy of gobject-introspection
--force-fallback-for=glib
# Make the paths in pkgconfig files relative as we used to not
# do a proper install here and it seems less risky to keep it
# this way.
-Dpkgconfig.relocatable=true
# We want as minimal a build as possible here to speed things up
# and reduce the risk of failures.
-Dglib:selinux=disabled
-Dglib:xattr=false
-Dglib:libmount=disabled
-Dglib:man-pages=disabled
-Dglib:dtrace=disabled
-Dglib:systemtap=disabled
-Dglib:sysprof=disabled
-Dglib:documentation=false
-Dglib:tests=false
-Dglib:installed_tests=false
-Dglib:nls=disabled
-Dglib:oss_fuzz=disabled
-Dglib:libelf=disabled
-Dglib:multiarch=false
)
ORIG_SOURCE_DIR=${EMESON_SOURCE}
EMESON_SOURCE=${INTROSPECTION_SOURCE_DIR}
# g-ir-scanner has some relocatable logic but it searches
# for 'lib', not 'lib64', so it can't find itself and eventually
# falls back to the system installation. See bug #946221.
sed -i -e "/^pylibdir =/s:'lib:'$(get_libdir):" "${EMESON_SOURCE}"/tools/g-ir-tool-template.in || die
ORIG_BUILD_DIR=${BUILD_DIR}
BUILD_DIR=${INTROSPECTION_BUILD_DIR}
pushd ${INTROSPECTION_SOURCE_DIR} || die
meson_src_configure
meson_src_compile
# We already provide a prefix in ${T} above. Blank DESTDIR
# as it may be set in the environment by Portage (though not
# guaranteed in src_configure).
meson_src_install --destdir ""
popd || die
EMESON_SOURCE=${ORIG_SOURCE_DIR}
BUILD_DIR=${ORIG_BUILD_DIR}
# Add gobject-introspection binaries and pkgconfig files to path
export PATH="${INTROSPECTION_BIN_DIR}:${PATH}"
# Override primary pkgconfig search paths to prioritize our internal copy
export PKG_CONFIG_LIBDIR="${INTROSPECTION_LIB_DIR}/pkgconfig:${INTROSPECTION_BUILD_DIR}/meson-private"
# Set the normal primary pkgconfig search paths as secondary
# (We also need to prepend our just-built one for later use of
# g-ir-scanner to use the new one and to help workaround bugs like
# bug #946221.)
export PKG_CONFIG_PATH="${PKG_CONFIG_LIBDIR}:$(pkg-config --variable pc_path pkg-config)"
# Add the paths to the built glib libraries to the library path so that gobject-introspection can load them
for gliblib in glib gobject gthread gmodule gio girepository; do
export LD_LIBRARY_PATH="${BUILD_DIR}/${gliblib}:${LD_LIBRARY_PATH}"
done
# Add the path to introspection libraries so that glib can call gir utilities
export LD_LIBRARY_PATH="${INTROSPECTION_LIB_DIR}:${LD_LIBRARY_PATH}"
# Add the paths to the gobject-introspection python modules to python path so they can be imported
export PYTHONPATH="${INTROSPECTION_LIB_DIR}/gobject-introspection:${PYTHONPATH}"
fi
# TODO: Can this be cleaned up now we have -Dglib_debug? (bug #946485)
use debug && EMESON_BUILD_TYPE=debug
local emesonargs=(
-Ddefault_library=$(usex static-libs both shared)
-Druntime_dir="${EPREFIX}"/run
$(meson_feature debug glib_debug)
$(meson_feature selinux)
$(meson_use xattr)
-Dlibmount=enabled # only used if host_system == 'linux'
-Dman-pages=enabled
$(meson_feature systemtap dtrace)
$(meson_feature systemtap)
$(meson_feature sysprof)
$(meson_use doc documentation)
$(meson_use test tests)
-Dinstalled_tests=false
-Dnls=enabled
-Doss_fuzz=disabled
$(meson_native_use_feature elf libelf)
-Dmultiarch=false
$(meson_native_use_feature introspection)
)
# Workaround for bug #938302
if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
local native_file="${T}"/meson.${CHOST}.ini.local
cat >> ${native_file} <<-EOF || die
[binaries]
dtrace='stap-dtrace'
EOF
emesonargs+=( --native-file "${native_file}" )
fi
meson_src_configure
}
multilib_src_test() {
export XDG_CONFIG_DIRS=/etc/xdg
export XDG_DATA_DIRS=/usr/local/share:/usr/share
# TODO: Use ${ABI} here to be unique for multilib?
export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
export LC_TIME=C # bug #411967
export TZ=UTC
unset GSETTINGS_BACKEND # bug #596380
python_setup
# https://bugs.gentoo.org/839807
local -x SANDBOX_PREDICT=${SANDBOX_PREDICT}
addpredict /usr/b
# Related test is a bit nitpicking
mkdir -p "$G_DBUS_COOKIE_SHA1_KEYRING_DIR" || die
chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR" || die
meson_src_test --timeout-multiplier 20 --no-suite flaky
}
multilib_src_install() {
meson_src_install
keepdir /usr/$(get_libdir)/gio/modules
}
multilib_src_install_all() {
strip-lto-bytecode
# These are installed by dev-util/glib-utils
# TODO: With patching we might be able to get rid of the python-any deps
# and removals, and test depend on glib-utils instead; revisit now with
# meson
rm "${ED}/usr/bin/glib-genmarshal" || die
rm "${ED}/usr/share/man/man1/glib-genmarshal.1" || die
rm "${ED}/usr/bin/glib-mkenums" || die
rm "${ED}/usr/share/man/man1/glib-mkenums.1" || die
rm "${ED}/usr/bin/gtester-report" || die
rm "${ED}/usr/share/man/man1/gtester-report.1" || die
# gdbus-codegen manpage installed by dev-util/gdbus-codegen
rm "${ED}/usr/share/man/man1/gdbus-codegen.1" || die
}
pkg_preinst() {
xdg_pkg_preinst
# Make gschemas.compiled belong to glib alone
local cache="/usr/share/glib-2.0/schemas/gschemas.compiled"
if [[ -e ${EROOT}${cache} ]]; then
cp "${EROOT}"${cache} "${ED}"/${cache} || die
else
touch "${ED}"${cache} || die
fi
multilib_pkg_preinst() {
# Make giomodule.cache belong to glib alone
local cache="/usr/$(get_libdir)/gio/modules/giomodule.cache"
if [[ -e ${EROOT}${cache} ]]; then
cp "${EROOT}"${cache} "${ED}"${cache} || die
else
touch "${ED}"${cache} || die
fi
}
# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
# file due to inability to create it and GIO might not look at any of the modules there
if ! tc-is-cross-compiler ; then
multilib_foreach_abi multilib_pkg_preinst
fi
}
pkg_postinst() {
xdg_pkg_postinst
# glib installs no schemas itself, but we force update for fresh install in case
# something has dropped in a schemas file without direct glib dep; and for upgrades
# in case the compiled schema format could have changed
gnome2_schemas_update
multilib_pkg_postinst() {
gnome2_giomodule_cache_update \
|| die "Update GIO modules cache failed (for ${ABI})"
}
if ! tc-is-cross-compiler ; then
multilib_foreach_abi multilib_pkg_postinst
else
ewarn "Updating of GIO modules cache skipped due to cross-compilation."
ewarn "You might want to run gio-querymodules manually on the target for"
ewarn "your final image for performance reasons and re-run it when packages"
ewarn "installing GIO modules get upgraded or added to the image."
fi
if ver_replacing "-lt" "2.63.6"; then
ewarn "glib no longer installs the gio-launch-desktop binary. You may need"
ewarn "to restart your session for \"Open With\" dialogs to work."
fi
}
pkg_postrm() {
xdg_pkg_postrm
gnome2_schemas_update
if [[ -z ${REPLACED_BY_VERSION} ]]; then
multilib_pkg_postrm() {
rm -f "${EROOT}"/usr/$(get_libdir)/gio/modules/giomodule.cache || die
}
multilib_foreach_abi multilib_pkg_postrm
rm -f "${EROOT}"/usr/share/glib-2.0/schemas/gschemas.compiled || die
fi
}

View File

@ -1,483 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_REQ_USE="xml(+)"
PYTHON_COMPAT=( python3_{11..14} )
inherit dot-a eapi9-ver gnome.org gnome2-utils linux-info meson-multilib multilib python-any-r1 toolchain-funcs xdg
DESCRIPTION="The GLib library of C routines"
HOMEPAGE="https://www.gtk.org/"
INTROSPECTION_PN="gobject-introspection"
INTROSPECTION_PV="1.82.0"
INTROSPECTION_P="${INTROSPECTION_PN}-${INTROSPECTION_PV}"
SRC_URI="
${SRC_URI}
introspection? ( mirror://gnome/sources/gobject-introspection/${INTROSPECTION_PV%.*}/gobject-introspection-${INTROSPECTION_PV}.tar.${GNOME_TARBALL_SUFFIX} )
"
INTROSPECTION_SOURCE_DIR="${WORKDIR}/${INTROSPECTION_P}"
INTROSPECTION_BUILD_DIR="${WORKDIR}/${INTROSPECTION_P}-build"
LICENSE="LGPL-2.1+"
SLOT="2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="dbus debug +elf doc +introspection +mime selinux static-libs sysprof systemtap test utils xattr"
RESTRICT="!test? ( test )"
# * elfutils (via libelf) does not build on Windows. gresources are not embedded
# within ELF binaries on that platform anyway and inspecting ELF binaries from
# other platforms is not that useful so exclude the dependency in this case.
# * Technically static-libs is needed on zlib, util-linux and perhaps more, but
# these are used by GIO, which glib[static-libs] consumers don't really seem
# to need at all, thus not imposing the deps for now and once some consumers
# are actually found to static link libgio-2.0.a, we can revisit and either add
# them or just put the (build) deps in that rare consumer instead of recursive
# RDEPEND here (due to lack of recursive DEPEND).
RDEPEND="
!<dev-libs/gobject-introspection-1.80.1
!<dev-util/gdbus-codegen-${PV}
>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
>=dev-libs/libpcre2-10.32:0=[${MULTILIB_USEDEP},unicode(+),static-libs?]
>=dev-libs/libffi-3.0.13-r1:=[${MULTILIB_USEDEP}]
>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
>=virtual/libintl-0-r2[${MULTILIB_USEDEP}]
introspection? (
>=dev-libs/gobject-introspection-common-${INTROSPECTION_PV}
)
kernel_linux? ( >=sys-apps/util-linux-2.23[${MULTILIB_USEDEP}] )
selinux? ( >=sys-libs/libselinux-2.2.2-r5[${MULTILIB_USEDEP}] )
xattr? ( !elibc_glibc? ( >=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}] ) )
elf? ( virtual/libelf:0= )
sysprof? ( >=dev-util/sysprof-capture-3.40.1:4[${MULTILIB_USEDEP}] )
"
DEPEND="${RDEPEND}"
# libxml2 used for optional tests that get automatically skipped
BDEPEND="
app-text/docbook-xsl-stylesheets
>=dev-build/meson-1.4.0
dev-libs/libxslt
>=sys-devel/gettext-0.19.8
doc? ( >=dev-util/gi-docgen-2023.1 )
dev-python/docutils
systemtap? ( >=dev-debug/systemtap-1.3 )
${PYTHON_DEPS}
test? ( >=sys-apps/dbus-1.2.14 )
virtual/pkgconfig
introspection? (
$(python_gen_any_dep '
dev-python/setuptools[${PYTHON_USEDEP}]
')
virtual/pkgconfig
sys-devel/bison
app-alternatives/lex
${PYTHON_DEPS}
)
"
# TODO: >=dev-util/gdbus-codegen-${PV} test dep once we modify gio/tests/meson.build to use external gdbus-codegen
PDEPEND="
dbus? ( gnome-base/dconf )
mime? ( x11-misc/shared-mime-info )
"
# shared-mime-info needed for gio/xdgmime, bug #409481
# dconf is needed to be able to save settings, bug #498436
MULTILIB_CHOST_TOOLS=(
/usr/bin/gio-querymodules$(get_exeext)
)
PATCHES=(
"${FILESDIR}"/${PN}-2.64.1-mark-gdbus-server-auth-test-flaky.patch
)
python_check_deps() {
if use introspection ; then
python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]"
fi
}
pkg_setup() {
if use kernel_linux ; then
CONFIG_CHECK="~INOTIFY_USER"
if use test ; then
CONFIG_CHECK="~IPV6"
WARNING_IPV6="Your kernel needs IPV6 support for running some tests, skipping them."
fi
linux-info_pkg_setup
fi
python-any-r1_pkg_setup
}
src_prepare() {
if use test; then
# TODO: Review the test exclusions, especially now with meson
# Disable tests requiring dev-util/desktop-file-utils when not installed, bug #286629, upstream bug #629163
if ! has_version dev-util/desktop-file-utils ; then
ewarn "Some tests will be skipped due dev-util/desktop-file-utils not being present on your system,"
ewarn "think on installing it to get these tests run."
sed -i -e "/appinfo\/associations/d" gio/tests/appinfo.c || die
sed -i -e "/g_test_add_func/d" gio/tests/desktop-app-info.c || die
fi
# gdesktopappinfo requires existing terminal (gnome-terminal or any
# other), falling back to xterm if one doesn't exist
#if ! has_version x11-terms/xterm && ! has_version x11-terms/gnome-terminal ; then
# ewarn "Some tests will be skipped due to missing terminal program"
# These tests seem to sometimes fail even with a terminal; skip for now and reevulate with meson
# Also try https://gitlab.gnome.org/GNOME/glib/issues/1601 once ready
# for backport (or in a bump) and file new issue if still fails
sed -i -e "/appinfo\/launch/d" gio/tests/appinfo.c || die
# desktop-app-info/launch* might fail similarly
sed -i -e "/desktop-app-info\/launch-as-manager/d" gio/tests/desktop-app-info.c || die
#fi
# https://bugzilla.gnome.org/show_bug.cgi?id=722604
sed -i -e "/timer\/stop/d" glib/tests/timer.c || die
sed -i -e "/timer\/basic/d" glib/tests/timer.c || die
ewarn "Tests for search-utils have been skipped"
sed -i -e "/search-utils/d" glib/tests/meson.build || die
# Running gdb inside a test within sandbox is brittle
sed -i -e '/self.__gdb = shutil.which("gdb")/s:"gdb":"gdb-idonotexist":' glib/tests/assert-msg-test.py || die
# Play nice with network-sandbox, but this approach would defeat the purpose of the test
#sed -i -e "s/localhost/127.0.0.1/g" gio/tests/gsocketclient-slow.c || die
else
# Don't build tests, also prevents extra deps, bug #512022
sed -i -e '/subdir.*tests/d' {.,gio,glib}/meson.build || die
fi
# Don't build fuzzing binaries - not used
sed -i -e '/subdir.*fuzzing/d' meson.build || die
# gdbus-codegen is a separate package
sed -i -e '/install_dir/d' gio/gdbus-2.0/codegen/meson.build || die
sed -i -e '/install : true/d' gio/gdbus-2.0/codegen/meson.build || die
# Same kind of meson-0.50 issue with some installed-tests files; will likely be fixed upstream soon
sed -i -e '/install_dir/d' gio/tests/meson.build || die
cat > "${T}/glib-test-ld-wrapper" <<-EOF
#!/usr/bin/env sh
exec \${LD:-ld} "\$@"
EOF
chmod a+x "${T}/glib-test-ld-wrapper" || die
sed -i -e "s|'ld'|'${T}/glib-test-ld-wrapper'|g" gio/tests/meson.build || die
# make default sane for us
if use prefix ; then
sed -i -e "s:/usr/local:${EPREFIX}/usr:" gio/xdgmime/xdgmime.c || die
# bug #308609, without path, bug #314057
export PERL=perl
fi
if [[ ${CHOST} == *-solaris* ]] ; then
# fix standards conflicts
sed -i \
-e 's/\<\(_XOPEN_SOURCE_EXTENDED\)\>/_POSIX_PTHREAD_SEMANTICS/' \
-e '/\<_XOPEN_SOURCE\>/s/\<2\>/600/' \
meson.build || die
sed -i -e '/#define\s\+_POSIX_SOURCE/d' \
glib/giounix.c || die
fi
# disable native macOS integrations
sed -i -e '/glib_conf.set(.HAVE_\(CARBON\|COCOA\).,/s/true/false/' \
meson.build || die
sed -i \
-e '/AvailabilityMacros.h/d' \
gio/giomodule.c || die
# Link the glib source to the introspection subproject directory so it can be built there first
if use introspection ; then
ln -s "${S}" "${INTROSPECTION_SOURCE_DIR}/subprojects/glib"
fi
default
gnome2_environment_reset
# TODO: python_name sedding for correct python shebang? Might be relevant mainly for glib-utils only
}
src_configure() {
lto-guarantee-fat
meson-multilib_src_configure
}
multilib_src_configure() {
# TODO: figure a way to pass appropriate values for all cross properties
# that glib uses (search for get_cross_property)
#if tc-is-cross-compiler ; then
# https://bugzilla.gnome.org/show_bug.cgi?id=756473
# TODO-meson: This should be in meson cross file as 'growing_stack'
# property; and more, look at get_cross_property
#case ${CHOST} in
#hppa*|metag*) export glib_cv_stack_grows=yes ;;
#*) export glib_cv_stack_grows=no ;;
#esac
#fi
_need_bootstrap_gi() {
if ! multilib_native_use introspection ; then
return 1
fi
if ! has_version ">=dev-libs/${INTROSPECTION_P}" ; then
return 0
fi
# Is the installed gobject-introspection usable?
if ! g-ir-scanner --version &> /dev/null ; then
return 0
fi
# Do we somehow have a dev-libs/gobject-introspection installed
# with an unsatisfied dependency? (bug #951487)
if ! $(tc-getPKG_CONFIG) --cflags gobject-introspection-1.0 &> /dev/null ; then
return 0
fi
# Make sure has_version didn't lie to us while at it as well,
# given bug #951487.
if ! $(tc-getPKG_CONFIG) --atleast-version=${INTROSPECTION_PV} gobject-introspection-1.0 &> /dev/null ; then
return 0
fi
return 1
}
# Build internal copy of gobject-introspection to avoid circular dependency (built for native abi only)
if _need_bootstrap_gi ; then
einfo "Bootstrapping gobject-introspection..."
INTROSPECTION_BIN_DIR="${T}/bootstrap-gi-prefix/usr/bin"
INTROSPECTION_LIB_DIR="${T}/bootstrap-gi-prefix/usr/$(get_libdir)"
local emesonargs=(
--prefix="${T}/bootstrap-gi-prefix/usr"
-Dpython="${EPYTHON}"
-Dbuild_introspection_data=true
# Build an internal copy of glib for the internal copy of gobject-introspection
--force-fallback-for=glib
# Make the paths in pkgconfig files relative as we used to not
# do a proper install here and it seems less risky to keep it
# this way.
-Dpkgconfig.relocatable=true
# We want as minimal a build as possible here to speed things up
# and reduce the risk of failures.
-Dglib:selinux=disabled
-Dglib:xattr=false
-Dglib:libmount=disabled
-Dglib:man-pages=disabled
-Dglib:dtrace=disabled
-Dglib:systemtap=disabled
-Dglib:sysprof=disabled
-Dglib:documentation=false
-Dglib:tests=false
-Dglib:installed_tests=false
-Dglib:nls=disabled
-Dglib:oss_fuzz=disabled
-Dglib:libelf=disabled
-Dglib:multiarch=false
)
ORIG_SOURCE_DIR=${EMESON_SOURCE}
EMESON_SOURCE=${INTROSPECTION_SOURCE_DIR}
# g-ir-scanner has some relocatable logic but it searches
# for 'lib', not 'lib64', so it can't find itself and eventually
# falls back to the system installation. See bug #946221.
sed -i -e "/^pylibdir =/s:'lib:'$(get_libdir):" "${EMESON_SOURCE}"/tools/g-ir-tool-template.in || die
ORIG_BUILD_DIR=${BUILD_DIR}
BUILD_DIR=${INTROSPECTION_BUILD_DIR}
pushd ${INTROSPECTION_SOURCE_DIR} || die
meson_src_configure
meson_src_compile
# We already provide a prefix in ${T} above. Blank DESTDIR
# as it may be set in the environment by Portage (though not
# guaranteed in src_configure).
meson_src_install --destdir ""
popd || die
EMESON_SOURCE=${ORIG_SOURCE_DIR}
BUILD_DIR=${ORIG_BUILD_DIR}
# Add gobject-introspection binaries and pkgconfig files to path
export PATH="${INTROSPECTION_BIN_DIR}:${PATH}"
# Override primary pkgconfig search paths to prioritize our internal copy
export PKG_CONFIG_LIBDIR="${INTROSPECTION_LIB_DIR}/pkgconfig:${INTROSPECTION_BUILD_DIR}/meson-private"
# Set the normal primary pkgconfig search paths as secondary
# (We also need to prepend our just-built one for later use of
# g-ir-scanner to use the new one and to help workaround bugs like
# bug #946221.)
export PKG_CONFIG_PATH="${PKG_CONFIG_LIBDIR}:$(pkg-config --variable pc_path pkg-config)"
# Add the paths to the built glib libraries to the library path so that gobject-introspection can load them
for gliblib in glib gobject gthread gmodule gio girepository; do
export LD_LIBRARY_PATH="${BUILD_DIR}/${gliblib}:${LD_LIBRARY_PATH}"
done
# Add the path to introspection libraries so that glib can call gir utilities
export LD_LIBRARY_PATH="${INTROSPECTION_LIB_DIR}:${LD_LIBRARY_PATH}"
# Add the paths to the gobject-introspection python modules to python path so they can be imported
export PYTHONPATH="${INTROSPECTION_LIB_DIR}/gobject-introspection:${PYTHONPATH}"
fi
# TODO: Can this be cleaned up now we have -Dglib_debug? (bug #946485)
use debug && EMESON_BUILD_TYPE=debug
local emesonargs=(
-Ddefault_library=$(usex static-libs both shared)
-Druntime_dir="${EPREFIX}"/run
$(meson_feature debug glib_debug)
$(meson_feature selinux)
$(meson_use xattr)
-Dlibmount=enabled # only used if host_system == 'linux'
-Dman-pages=enabled
$(meson_feature systemtap dtrace)
$(meson_feature systemtap)
$(meson_feature sysprof)
$(meson_use doc documentation)
$(meson_use test tests)
-Dinstalled_tests=false
-Dnls=enabled
-Doss_fuzz=disabled
$(meson_native_use_feature elf libelf)
-Dmultiarch=false
$(meson_native_use_feature introspection)
)
# Workaround for bug #938302
if use systemtap && has_version "dev-debug/systemtap[-dtrace-symlink(+)]" ; then
local native_file="${T}"/meson.${CHOST}.ini.local
cat >> ${native_file} <<-EOF || die
[binaries]
dtrace='stap-dtrace'
EOF
emesonargs+=( --native-file "${native_file}" )
fi
meson_src_configure
}
multilib_src_test() {
export XDG_CONFIG_DIRS=/etc/xdg
export XDG_DATA_DIRS=/usr/local/share:/usr/share
# TODO: Use ${ABI} here to be unique for multilib?
export G_DBUS_COOKIE_SHA1_KEYRING_DIR="${T}/temp"
export LC_TIME=C # bug #411967
export TZ=UTC
unset GSETTINGS_BACKEND # bug #596380
python_setup
# https://bugs.gentoo.org/839807
local -x SANDBOX_PREDICT=${SANDBOX_PREDICT}
addpredict /usr/b
# Related test is a bit nitpicking
mkdir -p "$G_DBUS_COOKIE_SHA1_KEYRING_DIR" || die
chmod 0700 "$G_DBUS_COOKIE_SHA1_KEYRING_DIR" || die
meson_src_test --timeout-multiplier 20 --no-suite flaky
}
multilib_src_install() {
meson_src_install
keepdir /usr/$(get_libdir)/gio/modules
}
multilib_src_install_all() {
strip-lto-bytecode
# These are installed by dev-util/glib-utils
# TODO: With patching we might be able to get rid of the python-any deps
# and removals, and test depend on glib-utils instead; revisit now with
# meson
rm "${ED}/usr/bin/glib-genmarshal" || die
rm "${ED}/usr/share/man/man1/glib-genmarshal.1" || die
rm "${ED}/usr/bin/glib-mkenums" || die
rm "${ED}/usr/share/man/man1/glib-mkenums.1" || die
rm "${ED}/usr/bin/gtester-report" || die
rm "${ED}/usr/share/man/man1/gtester-report.1" || die
# gdbus-codegen manpage installed by dev-util/gdbus-codegen
rm "${ED}/usr/share/man/man1/gdbus-codegen.1" || die
}
pkg_preinst() {
xdg_pkg_preinst
# Make gschemas.compiled belong to glib alone
local cache="/usr/share/glib-2.0/schemas/gschemas.compiled"
if [[ -e ${EROOT}${cache} ]]; then
cp "${EROOT}"${cache} "${ED}"/${cache} || die
else
touch "${ED}"${cache} || die
fi
multilib_pkg_preinst() {
# Make giomodule.cache belong to glib alone
local cache="/usr/$(get_libdir)/gio/modules/giomodule.cache"
if [[ -e ${EROOT}${cache} ]]; then
cp "${EROOT}"${cache} "${ED}"${cache} || die
else
touch "${ED}"${cache} || die
fi
}
# Don't run the cache ownership when cross-compiling, as it would end up with an empty cache
# file due to inability to create it and GIO might not look at any of the modules there
if ! tc-is-cross-compiler ; then
multilib_foreach_abi multilib_pkg_preinst
fi
}
pkg_postinst() {
xdg_pkg_postinst
# glib installs no schemas itself, but we force update for fresh install in case
# something has dropped in a schemas file without direct glib dep; and for upgrades
# in case the compiled schema format could have changed
gnome2_schemas_update
multilib_pkg_postinst() {
gnome2_giomodule_cache_update \
|| die "Update GIO modules cache failed (for ${ABI})"
}
if ! tc-is-cross-compiler ; then
multilib_foreach_abi multilib_pkg_postinst
else
ewarn "Updating of GIO modules cache skipped due to cross-compilation."
ewarn "You might want to run gio-querymodules manually on the target for"
ewarn "your final image for performance reasons and re-run it when packages"
ewarn "installing GIO modules get upgraded or added to the image."
fi
if ver_replacing "-lt" "2.63.6"; then
ewarn "glib no longer installs the gio-launch-desktop binary. You may need"
ewarn "to restart your session for \"Open With\" dialogs to work."
fi
}
pkg_postrm() {
xdg_pkg_postrm
gnome2_schemas_update
if [[ -z ${REPLACED_BY_VERSION} ]]; then
multilib_pkg_postrm() {
rm -f "${EROOT}"/usr/$(get_libdir)/gio/modules/giomodule.cache || die
}
multilib_foreach_abi multilib_pkg_postrm
rm -f "${EROOT}"/usr/share/glib-2.0/schemas/gschemas.compiled || die
fi
}

View File

@ -1,5 +1,2 @@
DIST gobject-introspection-1.76.1.tar.xz 1055416 BLAKE2B 2251c34b543c95f95bdec6853c8234db1b2e6271e729eaa5abf28e39c7718b326e0813a1214c62fb4634fd11218c4c856e6651de09081b01c9fcf8f73b8cf316 SHA512 84331a30f8854d2259609650c21aadd6363ea1417a75828bd395f8f4346da1c6d6550cff5f2c9f5f6fd6fbf2a9d27b5880c2ee1616fa905c5f362384d481a916
DIST gobject-introspection-1.78.1.tar.xz 1060296 BLAKE2B 115cf9ea27cec2d8d3a84081c909b72144fd1568bc316677c26f49652dc93b34fba10701678ad4977dcf97a89f7608545fbd2d73c2503c87635b2102e66ae024 SHA512 a3081882995a762645b04faa71082dbd523bee845519007e48b13235aad8a4cd4c74f0d042a6c17710125f945bd970e4b76e95a559274e294d595e04725a4e97
DIST gobject-introspection-1.80.1.tar.xz 1040228 BLAKE2B 7a8c1da9bc8aef293deedde1eed97536fa2f42f79a9761ac8ededb0676e46b636545a69e20e63d812844aeb626fa4fb7ce3c7922e51554fdc79560f16443acd9 SHA512 f45c2c1b105086488d974c6134db9910746df8edb187772f2ecd249656a1047c8ac88ba51f5bf7393c3d99c3ace143ecd09be256c2f4d0ceee110c9ad51a839a
DIST gobject-introspection-1.82.0.tar.xz 1052872 BLAKE2B 8336ae26d48a71a203655d9d268076f603055ceabb55dbfa676f2c67b4096b83afc106d485dc45d02b3a8be806f9ef50d54806a82e61f2a252ae59543c61e934 SHA512 e139fadb4174c72b648914f3774d89fc0e5eaee45bba0c13edf05de883664dad8276dbc34006217bb09871ed4bad23adab51ff232a17b9eb131329b2926cafb7
DIST gobject-introspection-1.84.0.tar.xz 1080316 BLAKE2B c888cc36f980db61bf7da46199fecfbe944034b9ffdf3e6e21cc56b2177c3ece1a0571166ab37c63c6f0d5c80be91963c9e342f5162e2b908838d8eef9e193e3 SHA512 764b5071472f93ed62bd64983c16fc4f73d4e20575d31eb475b40f4c6643080249aec4c5e9536d0ade719a99844cefa5a6e902b4d58e5644d0c0793212da3e5b

View File

@ -1,30 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
GNOME_ORG_MODULE="gobject-introspection"
inherit gnome.org
DESCRIPTION="Build infrastructure for GObject Introspection"
HOMEPAGE="https://wiki.gnome.org/Projects/GObjectIntrospection"
LICENSE="HPND"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
RDEPEND="!<${CATEGORY}/${GNOME_ORG_MODULE}-${PV}"
# Use !<${PV} because mixing gobject-introspection with different version of -common can cause issues like:
# https://forums.gentoo.org/viewtopic-p-7421930.html
src_configure() { :; }
src_compile() { :; }
src_install() {
insinto /usr/share/aclocal
doins m4/introspection.m4
insinto /usr/share/gobject-introspection-1.0
doins Makefile.introspection
}

View File

@ -1,30 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
GNOME_ORG_MODULE="gobject-introspection"
inherit gnome.org
DESCRIPTION="Build infrastructure for GObject Introspection"
HOMEPAGE="https://wiki.gnome.org/Projects/GObjectIntrospection"
LICENSE="HPND"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
RDEPEND="!<${CATEGORY}/${GNOME_ORG_MODULE}-${PV}"
# Use !<${PV} because mixing gobject-introspection with different version of -common can cause issues like:
# https://forums.gentoo.org/viewtopic-p-7421930.html
src_configure() { :; }
src_compile() { :; }
src_install() {
insinto /usr/share/aclocal
doins m4/introspection.m4
insinto /usr/share/gobject-introspection-1.0
doins Makefile.introspection
}

View File

@ -1,30 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
GNOME_ORG_MODULE="gobject-introspection"
inherit gnome.org
DESCRIPTION="Build infrastructure for GObject Introspection"
HOMEPAGE="https://gi.readthedocs.io/"
LICENSE="HPND"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
RDEPEND="!<${CATEGORY}/${GNOME_ORG_MODULE}-${PV}"
# Use !<${PV} because mixing gobject-introspection with different version of -common can cause issues like:
# https://forums.gentoo.org/viewtopic-p-7421930.html
src_configure() { :; }
src_compile() { :; }
src_install() {
insinto /usr/share/aclocal
doins m4/introspection.m4
insinto /usr/share/gobject-introspection-1.0
doins Makefile.introspection
}

View File

@ -1 +1,2 @@
DIST libtool-2.5.4.tar.xz 1056924 BLAKE2B 47de3c49a690d44d7ddd5e3b5e4090c91dc5fbb9c40fc4a3963e150fb7329326ee3e21b8c149974726171c4b0380028e0efc7a369c4f04357eea46f69852e1cc SHA512 eed207094bcc444f4bfbb13710e395e062e3f1d312ca8b186ab0cbd22dc92ddef176a0b3ecd43e02676e37bd9e328791c59a38ef15846d4eae15da4f20315724
DIST libtool-2.6.0.tar.xz 1086020 BLAKE2B 33346f21fc5ad0e2925b2b12e3aa4715546683181c0323912f31ce9e3e7ac9ee103e2bd608d3d8b45fd82c59c6f2e082ac7baf3946d12169f05c760920ad1117 SHA512 79af0baf14d598b3091fc770b004a80ffb7ecf0cc8440b5947a41d3c8e603566783008deb3248235d87088810b69824003defed3e66dccb6c03c635095c9fb41

View File

@ -0,0 +1,49 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Please bump with dev-build/libtool.
inherit multilib-minimal flag-o-matic
MY_P="libtool-${PV}"
DESCRIPTION="A shared library tool for developers"
HOMEPAGE="https://www.gnu.org/software/libtool/"
if true || ! [[ $(( $(ver_cut 2) % 2 )) -eq 0 ]] ; then
# 2.6.0 is an alpha release
SRC_URI="https://alpha.gnu.org/gnu/libtool/${MY_P}.tar.xz"
else
SRC_URI="mirror://gnu/libtool/${MY_P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
S="${WORKDIR}"/${MY_P}/libltdl
LICENSE="GPL-2"
SLOT="0"
IUSE="static-libs"
# libltdl doesn't have a testsuite. Don't bother trying.
RESTRICT="test"
BDEPEND="app-arch/xz-utils"
multilib_src_configure() {
# bug #907427
filter-lto
append-lfs-flags
ECONF_SOURCE="${S}" \
econf \
--enable-ltdl-install \
$(use_enable static-libs static)
}
multilib_src_install() {
emake DESTDIR="${D}" install
# While the libltdl.la file is not used directly, the m4 ltdl logic
# keys off of its existence when searching for ltdl support. # bug #293921
#use static-libs || find "${D}" -name libltdl.la -delete
}

View File

@ -1,4 +1,3 @@
DIST libxml2-2.13.8.tar.xz 2423128 BLAKE2B 9abe12acb2b619f8649dc4472c39d4c59074a83538bf1a534163737bf9e99e6387fec53404392c325102da1e77f53606f2679c47b7136d7f7541a8fcc6bcd995 SHA512 668e556404693f17e074bc31e2caa5e50bf003ee3cd81b61a51ea25e76efd7eff7ec70ff603eed87b9d9e9b2299673e6e8871798264113e660e703b74b58458f
DIST libxml2-2.13.9.tar.xz 2426164 BLAKE2B b14cb6953983ee83b5de39b8d80f623edae6198541e996fbda3c88ea7c3f5b354f8e064b378231bd60e88e0ea143f44be860252007eaafd7290f6f781fc6e8aa SHA512 62d4813860124c969f204aaf33b497105dbc32a6c5655f5a86168743660e10987d687d7e5e7ee49fdfdeb8f6ad9fa4503f81fcce2e4d459094895f02436d1b13
DIST libxml2-2.14.6.tar.xz 2327580 BLAKE2B ad5d7cb64f8081559a671e9d79b3ebcd7313dada39d7f0c2854994153a9dff2ef85bc81336437f5881abe637bae51b62e9104b3a099113f4ee2252b604325291 SHA512 9a62230487255af7cdaf135cc8a0978dc82ff2ee8826f6b21cc8b39c8e0a6b9efeea1c12e6cb7ae3f869730fb4ed628158e2848dd512558fc5bf177c56862774
DIST xmlts20130923.tar.gz 641522 BLAKE2B 63a47bc69278ef510cd0b3779aed729e1b309e30efa0015d28ed051cc03f9dfddb447ab57b07b3393e8f47393d15473b0e199c34cb1f5f746b15ddfaa55670be SHA512 d5c4d26b324ed21f4e0641cd7f8b76dbf9de80df8b519982e44d41c960df29fd03618e02e9693b2d11ad06d19c4a965274c95a048ec3b9653eacb919a7f8b733

View File

@ -1,182 +0,0 @@
From 81cef8c5b5aec2acdf5707e57a6db0c8d1d0abca Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Fri, 4 Jul 2025 14:28:26 +0200
Subject: [PATCH] [CVE-2025-49794] [CVE-2025-49796] schematron: Fix
xmlSchematronReportOutput
Fix use-after-free (CVE-2025-49794) and type confusion (CVE-2025-49796)
in xmlSchematronReportOutput.
Fixes #931.
Fixes #933.
---
result/schematron/cve-2025-49794_0.err | 2 ++
result/schematron/cve-2025-49796_0.err | 2 ++
schematron.c | 49 ++++++++++++++------------
test/schematron/cve-2025-49794.sct | 10 ++++++
test/schematron/cve-2025-49794_0.xml | 6 ++++
test/schematron/cve-2025-49796.sct | 9 +++++
test/schematron/cve-2025-49796_0.xml | 3 ++
7 files changed, 58 insertions(+), 23 deletions(-)
create mode 100644 result/schematron/cve-2025-49794_0.err
create mode 100644 result/schematron/cve-2025-49796_0.err
create mode 100644 test/schematron/cve-2025-49794.sct
create mode 100644 test/schematron/cve-2025-49794_0.xml
create mode 100644 test/schematron/cve-2025-49796.sct
create mode 100644 test/schematron/cve-2025-49796_0.xml
diff --git a/result/schematron/cve-2025-49794_0.err b/result/schematron/cve-2025-49794_0.err
new file mode 100644
index 00000000..57752310
--- /dev/null
+++ b/result/schematron/cve-2025-49794_0.err
@@ -0,0 +1,2 @@
+./test/schematron/cve-2025-49794_0.xml:2: element boo0: schematron error : /librar0/boo0 line 2:
+./test/schematron/cve-2025-49794_0.xml fails to validate
diff --git a/result/schematron/cve-2025-49796_0.err b/result/schematron/cve-2025-49796_0.err
new file mode 100644
index 00000000..bf875ee0
--- /dev/null
+++ b/result/schematron/cve-2025-49796_0.err
@@ -0,0 +1,2 @@
+./test/schematron/cve-2025-49796_0.xml:2: element boo0: schematron error : /librar0/boo0 line 2:
+./test/schematron/cve-2025-49796_0.xml fails to validate
diff --git a/schematron.c b/schematron.c
index da603402..6e2ceeb7 100644
--- a/schematron.c
+++ b/schematron.c
@@ -1414,27 +1414,15 @@ exit:
* *
************************************************************************/
-static xmlNodePtr
+static xmlXPathObjectPtr
xmlSchematronGetNode(xmlSchematronValidCtxtPtr ctxt,
xmlNodePtr cur, const xmlChar *xpath) {
- xmlNodePtr node = NULL;
- xmlXPathObjectPtr ret;
-
if ((ctxt == NULL) || (cur == NULL) || (xpath == NULL))
return(NULL);
ctxt->xctxt->doc = cur->doc;
ctxt->xctxt->node = cur;
- ret = xmlXPathEval(xpath, ctxt->xctxt);
- if (ret == NULL)
- return(NULL);
-
- if ((ret->type == XPATH_NODESET) &&
- (ret->nodesetval != NULL) && (ret->nodesetval->nodeNr > 0))
- node = ret->nodesetval->nodeTab[0];
-
- xmlXPathFreeObject(ret);
- return(node);
+ return(xmlXPathEval(xpath, ctxt->xctxt));
}
/**
@@ -1480,25 +1468,40 @@ xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt,
(child->type == XML_CDATA_SECTION_NODE))
ret = xmlStrcat(ret, child->content);
else if (IS_SCHEMATRON(child, "name")) {
+ xmlXPathObject *obj = NULL;
xmlChar *path;
path = xmlGetNoNsProp(child, BAD_CAST "path");
node = cur;
if (path != NULL) {
- node = xmlSchematronGetNode(ctxt, cur, path);
- if (node == NULL)
- node = cur;
+ obj = xmlSchematronGetNode(ctxt, cur, path);
+ if ((obj != NULL) &&
+ (obj->type == XPATH_NODESET) &&
+ (obj->nodesetval != NULL) &&
+ (obj->nodesetval->nodeNr > 0))
+ node = obj->nodesetval->nodeTab[0];
xmlFree(path);
}
- if ((node->ns == NULL) || (node->ns->prefix == NULL))
- ret = xmlStrcat(ret, node->name);
- else {
- ret = xmlStrcat(ret, node->ns->prefix);
- ret = xmlStrcat(ret, BAD_CAST ":");
- ret = xmlStrcat(ret, node->name);
+ switch (node->type) {
+ case XML_ELEMENT_NODE:
+ case XML_ATTRIBUTE_NODE:
+ if ((node->ns == NULL) || (node->ns->prefix == NULL))
+ ret = xmlStrcat(ret, node->name);
+ else {
+ ret = xmlStrcat(ret, node->ns->prefix);
+ ret = xmlStrcat(ret, BAD_CAST ":");
+ ret = xmlStrcat(ret, node->name);
+ }
+ break;
+
+ /* TODO: handle other node types */
+ default:
+ break;
}
+
+ xmlXPathFreeObject(obj);
} else if (IS_SCHEMATRON(child, "value-of")) {
xmlChar *select;
xmlXPathObjectPtr eval;
diff --git a/test/schematron/cve-2025-49794.sct b/test/schematron/cve-2025-49794.sct
new file mode 100644
index 00000000..7fc9ee3d
--- /dev/null
+++ b/test/schematron/cve-2025-49794.sct
@@ -0,0 +1,10 @@
+<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron">
+ <sch:pattern id="">
+ <sch:rule context="boo0">
+ <sch:report test="not(0)">
+ <sch:name path="&#9;e|namespace::*|e"/>
+ </sch:report>
+ <sch:report test="0"></sch:report>
+ </sch:rule>
+ </sch:pattern>
+</sch:schema>
diff --git a/test/schematron/cve-2025-49794_0.xml b/test/schematron/cve-2025-49794_0.xml
new file mode 100644
index 00000000..debc64ba
--- /dev/null
+++ b/test/schematron/cve-2025-49794_0.xml
@@ -0,0 +1,6 @@
+<librar0>
+ <boo0 t="">
+ <author></author>
+ </boo0>
+ <ins></ins>
+</librar0>
diff --git a/test/schematron/cve-2025-49796.sct b/test/schematron/cve-2025-49796.sct
new file mode 100644
index 00000000..e9702d75
--- /dev/null
+++ b/test/schematron/cve-2025-49796.sct
@@ -0,0 +1,9 @@
+<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron">
+ <sch:pattern id="">
+ <sch:rule context="boo0">
+ <sch:report test="not(0)">
+ <sch:name path="/"/>
+ </sch:report>
+ </sch:rule>
+ </sch:pattern>
+</sch:schema>
diff --git a/test/schematron/cve-2025-49796_0.xml b/test/schematron/cve-2025-49796_0.xml
new file mode 100644
index 00000000..be33c4ec
--- /dev/null
+++ b/test/schematron/cve-2025-49796_0.xml
@@ -0,0 +1,3 @@
+<librar0>
+ <boo0/>
+</librar0>
--
2.49.1

View File

@ -1,69 +0,0 @@
From 62048278a4c5fdf14d287dfb400005c0a0caa69f Mon Sep 17 00:00:00 2001
From: Michael Mann <mmann78@netscape.net>
Date: Sat, 21 Jun 2025 12:11:30 -0400
Subject: [PATCH] [CVE-2025-49795] schematron: Fix null pointer dereference
leading to DoS
Fixes #932
---
result/schematron/zvon16_0.err | 3 +++
schematron.c | 5 +++++
test/schematron/zvon16.sct | 7 +++++++
test/schematron/zvon16_0.xml | 5 +++++
4 files changed, 20 insertions(+)
create mode 100644 result/schematron/zvon16_0.err
create mode 100644 test/schematron/zvon16.sct
create mode 100644 test/schematron/zvon16_0.xml
diff --git a/result/schematron/zvon16_0.err b/result/schematron/zvon16_0.err
new file mode 100644
index 00000000..3d052409
--- /dev/null
+++ b/result/schematron/zvon16_0.err
@@ -0,0 +1,3 @@
+XPath error : Unregistered function
+./test/schematron/zvon16_0.xml:2: element book: schematron error : /library/book line 2: Book
+./test/schematron/zvon16_0.xml fails to validate
diff --git a/schematron.c b/schematron.c
index 1de25deb..da603402 100644
--- a/schematron.c
+++ b/schematron.c
@@ -1506,6 +1506,11 @@ xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt,
select = xmlGetNoNsProp(child, BAD_CAST "select");
comp = xmlXPathCtxtCompile(ctxt->xctxt, select);
eval = xmlXPathCompiledEval(comp, ctxt->xctxt);
+ if (eval == NULL) {
+ xmlXPathFreeCompExpr(comp);
+ xmlFree(select);
+ return ret;
+ }
switch (eval->type) {
case XPATH_NODESET: {
diff --git a/test/schematron/zvon16.sct b/test/schematron/zvon16.sct
new file mode 100644
index 00000000..f03848aa
--- /dev/null
+++ b/test/schematron/zvon16.sct
@@ -0,0 +1,7 @@
+<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron">
+ <sch:pattern id="TestPattern">
+ <sch:rule context="book">
+ <sch:report test="not(@available)">Book <sch:value-of select="falae()"/> test</sch:report>
+ </sch:rule>
+ </sch:pattern>
+</sch:schema>
diff --git a/test/schematron/zvon16_0.xml b/test/schematron/zvon16_0.xml
new file mode 100644
index 00000000..551e2d65
--- /dev/null
+++ b/test/schematron/zvon16_0.xml
@@ -0,0 +1,5 @@
+<library>
+ <book title="Test Book" id="bk101">
+ <author>Test Author</author>
+ </book>
+</library>
--
2.49.1

View File

@ -1,53 +0,0 @@
From 17d950ae33c23f87692aa179bacedb6743f3188a Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Tue, 27 May 2025 12:53:17 +0200
Subject: [PATCH] [CVE-2025-6021] tree: Fix integer overflow in xmlBuildQName
Fixes #926.
---
tree.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/tree.c b/tree.c
index f097cf87..5bc95b8a 100644
--- a/tree.c
+++ b/tree.c
@@ -47,6 +47,10 @@
#include "private/error.h"
#include "private/tree.h"
+#ifndef SIZE_MAX
+ #define SIZE_MAX ((size_t)-1)
+#endif
+
int __xmlRegisterCallbacks = 0;
/************************************************************************
@@ -167,10 +171,10 @@ xmlGetParameterEntityFromDtd(const xmlDtd *dtd, const xmlChar *name) {
xmlChar *
xmlBuildQName(const xmlChar *ncname, const xmlChar *prefix,
xmlChar *memory, int len) {
- int lenn, lenp;
+ size_t lenn, lenp;
xmlChar *ret;
- if (ncname == NULL) return(NULL);
+ if ((ncname == NULL) || (len < 0)) return(NULL);
if (prefix == NULL) return((xmlChar *) ncname);
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
@@ -181,8 +185,10 @@ xmlBuildQName(const xmlChar *ncname, const xmlChar *prefix,
lenn = strlen((char *) ncname);
lenp = strlen((char *) prefix);
+ if (lenn >= SIZE_MAX - lenp - 1)
+ return(NULL);
- if ((memory == NULL) || (len < lenn + lenp + 2)) {
+ if ((memory == NULL) || ((size_t) len < lenn + lenp + 2)) {
ret = (xmlChar *) xmlMallocAtomic(lenn + lenp + 2);
if (ret == NULL)
return(NULL);
--
2.49.1

View File

@ -1,102 +0,0 @@
From 5e9ec5c107d3f5b5179c3dbc19df43df041cd55b Mon Sep 17 00:00:00 2001
From: Michael Mann <mmann78@netscape.net>
Date: Fri, 20 Jun 2025 23:05:00 -0400
Subject: [PATCH] [CVE-2025-6170] Fix potential buffer overflows of interactive
shell
Fixes #941
---
debugXML.c | 15 ++++++++++-----
result/scripts/long_command | 8 ++++++++
test/scripts/long_command.script | 6 ++++++
test/scripts/long_command.xml | 1 +
4 files changed, 25 insertions(+), 5 deletions(-)
create mode 100644 result/scripts/long_command
create mode 100644 test/scripts/long_command.script
create mode 100644 test/scripts/long_command.xml
diff --git a/debugXML.c b/debugXML.c
index ed56b0f8..452b9573 100644
--- a/debugXML.c
+++ b/debugXML.c
@@ -1033,6 +1033,10 @@ xmlCtxtDumpOneNode(xmlDebugCtxtPtr ctxt, xmlNodePtr node)
xmlCtxtGenericNodeCheck(ctxt, node);
}
+#define MAX_PROMPT_SIZE 500
+#define MAX_ARG_SIZE 400
+#define MAX_COMMAND_SIZE 100
+
/**
* xmlCtxtDumpNode:
* @output: the FILE * for the output
@@ -2795,10 +2799,10 @@ void
xmlShell(xmlDocPtr doc, const char *filename, xmlShellReadlineFunc input,
FILE * output)
{
- char prompt[500] = "/ > ";
+ char prompt[MAX_PROMPT_SIZE] = "/ > ";
char *cmdline = NULL, *cur;
- char command[100];
- char arg[400];
+ char command[MAX_COMMAND_SIZE];
+ char arg[MAX_ARG_SIZE];
int i;
xmlShellCtxtPtr ctxt;
xmlXPathObjectPtr list;
@@ -2856,7 +2860,8 @@ xmlShell(xmlDocPtr doc, const char *filename, xmlShellReadlineFunc input,
cur++;
i = 0;
while ((*cur != ' ') && (*cur != '\t') &&
- (*cur != '\n') && (*cur != '\r')) {
+ (*cur != '\n') && (*cur != '\r') &&
+ (i < (MAX_COMMAND_SIZE - 1))) {
if (*cur == 0)
break;
command[i++] = *cur++;
@@ -2871,7 +2876,7 @@ xmlShell(xmlDocPtr doc, const char *filename, xmlShellReadlineFunc input,
while ((*cur == ' ') || (*cur == '\t'))
cur++;
i = 0;
- while ((*cur != '\n') && (*cur != '\r') && (*cur != 0)) {
+ while ((*cur != '\n') && (*cur != '\r') && (*cur != 0) && (i < (MAX_ARG_SIZE-1))) {
if (*cur == 0)
break;
arg[i++] = *cur++;
diff --git a/result/scripts/long_command b/result/scripts/long_command
new file mode 100644
index 00000000..e6f00708
--- /dev/null
+++ b/result/scripts/long_command
@@ -0,0 +1,8 @@
+/ > b > b > Object is a Node Set :
+Set contains 1 nodes:
+1 ELEMENT a:c
+b > Unknown command This_is_a_really_long_command_string_designed_to_test_the_limits_of_the_memory_that_stores_the_comm
+b > b > Unknown command ess_currents_of_time_and_existence
+b > <?xml version="1.0"?>
+<a xmlns:a="bar"><b xmlns:a="foo">Navigating_the_labyrinthine_corridors_of_human_cognition_one_often_encounters_the_perplexing_paradox_that_the_more_we_delve_into_the_intricate_dance_of_neural_pathways_and_synaptic_firings_the_further_we_seem_to_stray_from_a_truly_holistic_understanding_of_consciousness_a_phenomenon_that_remains_as_elusive_as_a_moonbeam_caught_in_a_spiderweb_yet_undeniably_shapes_every_fleeting_thought_every_prof</b></a>
+b >
\ No newline at end of file
diff --git a/test/scripts/long_command.script b/test/scripts/long_command.script
new file mode 100644
index 00000000..00f6df09
--- /dev/null
+++ b/test/scripts/long_command.script
@@ -0,0 +1,6 @@
+cd a/b
+set <a:c/>
+xpath //*[namespace-uri()="foo"]
+This_is_a_really_long_command_string_designed_to_test_the_limits_of_the_memory_that_stores_the_command_please_dont_crash foo
+set Navigating_the_labyrinthine_corridors_of_human_cognition_one_often_encounters_the_perplexing_paradox_that_the_more_we_delve_into_the_intricate_dance_of_neural_pathways_and_synaptic_firings_the_further_we_seem_to_stray_from_a_truly_holistic_understanding_of_consciousness_a_phenomenon_that_remains_as_elusive_as_a_moonbeam_caught_in_a_spiderweb_yet_undeniably_shapes_every_fleeting_thought_every_profound_emotion_and_every_grand_aspiration_that_propels_our_species_ever_onward_through_the_relentless_currents_of_time_and_existence
+save -
diff --git a/test/scripts/long_command.xml b/test/scripts/long_command.xml
new file mode 100644
index 00000000..1ba44016
--- /dev/null
+++ b/test/scripts/long_command.xml
@@ -0,0 +1 @@
+<a xmlns:a="bar"><b xmlns:a="foo"/></a>
--
2.49.1

View File

@ -1,195 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
# Note: Please bump in sync with dev-libs/libxslt
PYTHON_COMPAT=( python3_{11..14} )
PYTHON_REQ_USE="xml(+)"
inherit autotools python-r1 multilib-minimal
XSTS_HOME="https://www.w3.org/XML/2004/xml-schema-test-suite"
XSTS_NAME_1="xmlschema2002-01-16"
XSTS_NAME_2="xmlschema2004-01-14"
XSTS_TARBALL_1="xsts-2002-01-16.tar.gz"
XSTS_TARBALL_2="xsts-2004-01-14.tar.gz"
XMLCONF_TARBALL="xmlts20130923.tar.gz"
DESCRIPTION="XML C parser and toolkit"
HOMEPAGE="https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home"
if [[ ${PV} == 9999 ]] ; then
EGIT_REPO_URI="https://gitlab.gnome.org/GNOME/libxml2"
inherit git-r3
else
inherit gnome.org
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
SRC_URI+="
test? (
${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1}
${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2}
https://www.w3.org/XML/Test/${XMLCONF_TARBALL}
)
"
S="${WORKDIR}/${PN}-${PV%_rc*}"
LICENSE="MIT"
SLOT="2"
IUSE="examples icu lzma +python readline static-libs test"
RESTRICT="!test? ( test )"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND="
virtual/libiconv
>=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] )
lzma? ( >=app-arch/xz-utils-5.0.5-r1:=[${MULTILIB_USEDEP}] )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:= )
"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
if [[ ${PV} == 9999 ]] ; then
BDEPEND+=" dev-build/gtk-doc-am"
fi
MULTILIB_CHOST_TOOLS=(
/usr/bin/xml2-config
)
PATCHES=(
"${FILESDIR}"/${PN}-2.12.9-icu-pkgconfig.patch
"${FILESDIR}"/${PN}-2.13.8-CVE-2025-49794-CVE-2025-49796.patch
"${FILESDIR}"/${PN}-2.13.8-CVE-2025-49795.patch
"${FILESDIR}"/${PN}-2.13.8-CVE-2025-6021.patch
"${FILESDIR}"/${PN}-2.13.8-CVE-2025-6170.patch
)
src_unpack() {
if [[ ${PV} == 9999 ]] ; then
git-r3_src_unpack
else
local tarname=${P/_rc/-rc}.tar.xz
# ${A} isn't used to avoid unpacking of test tarballs into ${WORKDIR},
# as they are needed as tarballs in ${S}/xstc instead and not unpacked
unpack ${tarname}
if [[ -n ${PATCHSET_VERSION} ]] ; then
unpack ${PN}-${PATCHSET_VERSION}.tar.xz
fi
fi
cd "${S}" || die
if use test ; then
cp "${DISTDIR}/${XSTS_TARBALL_1}" \
"${DISTDIR}/${XSTS_TARBALL_2}" \
"${S}"/xstc/ \
|| die "Failed to install test tarballs"
unpack ${XMLCONF_TARBALL}
fi
}
src_prepare() {
default
# Please do not remove, as else we get references to PORTAGE_TMPDIR
# in /usr/lib/python?.?/site-packages/libxml2mod.la among things.
#elibtoolize
eautoreconf
}
multilib_src_configure() {
libxml2_configure() {
ECONF_SOURCE="${S}" econf \
$(use_with icu) \
$(use_with lzma) \
$(use_enable static-libs static) \
$(multilib_native_use_with readline) \
$(multilib_native_use_with readline history) \
--with-legacy \
"$@"
}
# Build python bindings separately
libxml2_configure --without-python
multilib_is_native_abi && use python &&
python_foreach_impl run_in_build_dir libxml2_configure --with-python
}
libxml2_py_emake() {
pushd "${BUILD_DIR}"/python >/dev/null || die
emake top_builddir="${NATIVE_BUILD_DIR}" "$@"
popd >/dev/null || die
}
multilib_src_compile() {
default
if multilib_is_native_abi && use python ; then
NATIVE_BUILD_DIR="${BUILD_DIR}"
python_foreach_impl run_in_build_dir libxml2_py_emake all
fi
}
multilib_src_test() {
ln -s "${S}"/xmlconf || die
emake check
multilib_is_native_abi && use python &&
python_foreach_impl run_in_build_dir libxml2_py_emake check
}
multilib_src_install() {
emake DESTDIR="${D}" install
multilib_is_native_abi && use python &&
python_foreach_impl run_in_build_dir libxml2_py_emake DESTDIR="${D}" install
# Hack until automake release is made for the optimise fix
# https://git.savannah.gnu.org/cgit/automake.git/commit/?id=bde43d0481ff540418271ac37012a574a4fcf097
multilib_is_native_abi && use python && python_foreach_impl python_optimize
}
multilib_src_install_all() {
einstalldocs
if ! use examples ; then
rm -rf "${ED}"/usr/share/doc/${PF}/examples || die
rm -rf "${ED}"/usr/share/doc/${PF}/python/examples || die
fi
rm -rf "${ED}"/usr/share/doc/${PN}-python-${PVR} || die
find "${ED}" -name '*.la' -delete || die
}
pkg_postinst() {
# We don't want to do the xmlcatalog during stage1, as xmlcatalog will not
# be in / and stage1 builds to ROOT=/tmp/stage1root. This fixes bug #208887.
if [[ -n "${ROOT}" ]]; then
elog "Skipping XML catalog creation for stage building (bug #208887)."
else
# Need an XML catalog, so no-one writes to a non-existent one
CATALOG="${EROOT}/etc/xml/catalog"
# We don't want to clobber an existing catalog though,
# only ensure that one is there
# <obz@gentoo.org>
if [[ ! -e "${CATALOG}" ]]; then
[[ -d "${EROOT}/etc/xml" ]] || mkdir -p "${EROOT}/etc/xml"
"${EPREFIX}"/usr/bin/xmlcatalog --create > "${CATALOG}"
einfo "Created XML catalog in ${CATALOG}"
fi
fi
}

View File

@ -12,4 +12,4 @@ HOMEPAGE="https://github.com/tree-sitter/tree-sitter-bash"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
KEYWORDS="~alpha ~amd64 arm arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"

View File

@ -1,43 +1,61 @@
DIST asn1-0.21.3.crate 40295 BLAKE2B 83135948a525b0ed432bd8e76e87f7400c56887c4a7cc505210014b8f4c9e47f9d139f723bf61165dfc772b9d86c0fe6a471336e480613ec556114afcf9fee83 SHA512 5f7b484e6081569cb1bd86b690ffcb49b51c5dff20dc08fedd9f803d634265fb4c157e2912b4763152cf8baf5556807aee109787618c3ecdb4a7307863502417
DIST asn1-0.22.0.crate 47124 BLAKE2B d3ebce2752152968862a957c3bf87291d09dd7895ec1ac8012e4b968174b7a8013c98dde65f54dedf3c4ed4a206d1c306393e93c5b39783af44dbe36bb1b3116 SHA512 403c9fccf8a4c7f487a52528b23fd37790770526b75187b3634744ab9aff072eccdec5bf309e8532df6eb86fe70e60535d0783638c77c248b37296a0993feedf
DIST asn1_derive-0.21.3.crate 8570 BLAKE2B 3b94274d1c1ecbf5dd1c70cbacfbf6885a68734483eb990b090f230b6d8da3b7f2400355ce944c456b8712a1ae01b1b5a42cc277609ba752acb664337751dcec SHA512 b7feb53a380fec0a2db010a0af2ba1228aa45de99246ac7d388f5164735beff12ca882356eaa2c0eb710a099ac51ec8e739080715790af8f3d1ced6b3ff6c69e
DIST asn1_derive-0.22.0.crate 8953 BLAKE2B ef2f3d248b0b5980b2475b4eb8127f4846ac200d2f8c7324757b571359ddf393f664b5b7189020bb12a390840c8fe0c423ab4c58e2359bf667d244d2e8f4e13c SHA512 bbbf3b498d2a59f19f044b627335e1b75a5341ee75b5cb281b09e3ab6e23c9f5a3d5f0eb09435fbeda211daedd9f9a867dbd99400b74e95f192fb0e09e694ab1
DIST autocfg-1.4.0.crate 17712 BLAKE2B 7f7300439899be03d001dd32b7e797bc4b9a58103081b6f7353c4b5897813cedf870b3fb1fa25d320a75326b334b44d8287e8603de34fc560d0b567143915cc6 SHA512 3b5e7c30bc73e105e4bfcab584c24fc4016db41fac9c356c6649fd841051704bbe8848e09546eb50d7c1f18ea8ce1cb72fbc268a620d5c609b3472114b5be73c
DIST autocfg-1.5.0.crate 18729 BLAKE2B 27580e39b366c6fca02c9db09997b6415c409f12068f1249184268bf96fd85ba659e25ec730f99e10caf452f96c486f3d7442bf09c4552b5f39519b21d6f88cc SHA512 f279856f234d39d369623576acf9546a1ca24d7fe449f36d4fb93ea75a7efaf2c4015b9616a69bbbed358c5e5882e16b045352f046aa4c049b3d13b1e8257b08
DIST base64-0.22.1.crate 81597 BLAKE2B 6f216a560bd36e6e6b74e908344b457594cc768d9763070e269b56a14b150cbfc4b7f599d4c2a0a5f783638170ee132f0796fefb14fcac7fd73c58db0791007a SHA512 91cf2e4e7fc8815f9b8a86a7fa722a20eee3dc1dd57111b29e420de87ce7836bcdb1db01d3cafb9a977710ef63e7cc41b7772762323e68e0e832156858aace20
DIST bitflags-2.9.1.crate 47913 BLAKE2B b14ee41348336981ab86459417b9feab90879a11a6524a8b43f2b89c09c844b4441c31e315c471be00ad21fa88b5dcc7671b56567fdcd72bb0790ceeaa25813b SHA512 6baeac42e4227e58030e317125a3c23997beceb44f9262f029e59c6dc36dd1733f2e88b3c3c8ad22f806245ef404512a880b16f3c8c52fa5c4aab287bb3cfe27
DIST bitflags-2.9.4.crate 47950 BLAKE2B b880246b54377ef161c54a811f09ced975d1f2049400c1bbba944712b8ef8b9ea79599d2354cc2a9ccd4c1b1329faad78738ed4e051735b14b642a9451ce68ae SHA512 a832e01985551db9d700ba177bb2ffe436e78e3bdcf7b2d8e86fc7cb885674d5656fce05bffb5a4cbe0df7b015dcfa6df8dbc1351c097d2c3a3dac199d3f37b1
DIST cc-1.2.23.crate 106527 BLAKE2B 0fd9e69ad743f4df15da3d25f85e1a422ef64b81b72af491001ccfba5c0c39e448deecc92e3a553bf74574460ecd2bf8f4056a1cd05d05856a1f3f36fa25bc19 SHA512 3fced846c630c09f629854754dc247affeae3e71375953617d77947b2bdfb479369db159cec941c7b094fd9d2fee62f7d5898d6d76de920dbd70de24ee35fd0b
DIST cc-1.2.37.crate 90111 BLAKE2B c97656ab4642b180af1adf16736de03b5117774a2fd85d3cbbeb06744ab14a1f20accf8eb59c43dfc7fd803c59f92f30ccd7b2a6e3b53d8ecf45c8a2adb71483 SHA512 062bf65f73e5ae092391efaad510af39c96913d5647073eaa32e9475b34b6d87d2e4448f0dd54ecdf9b979a84819f861d05daf7fdbc06885f6b41162d55bb81f
DIST cfg-if-1.0.0.crate 7934 BLAKE2B e99a5589c11d79d77a4537b34ce0a45d37b981c123b79b807cea836c89fc3926d693458893baca2882448d3d44e3f64e06141f6d916b748daa10b8cc1ae16d1b SHA512 0fb16a8882fd30e86b62c5143b1cb18ab564e84e75bd1f28fd12f24ffdc4a42e0d2e012a99abb606c12efe3c11061ff5bf8e24ab053e550ae083f7d90f6576ff
DIST cryptography-45.0.4.tar.gz 744890 BLAKE2B 34687a369894b0dfcf8a81c6d1b8cbb0b4a711fd17d4419c5368c41b7e5192cad7233295976a236a52c20493b980a5df77ff4af5a9d54925510d00e833971a22 SHA512 d5bdb21956b80675ccfae78be3d56a2e3bfe8c6ceac15c87c9a3ca470605cb798774018c6c9b9597e90a6918912c9a6b5d83eac9f446364b917d7e8888b83eee
DIST cryptography-45.0.5.tar.gz 744903 BLAKE2B c8bee14a11b613b8e37fa9ed57dc8fc65b136c738ebe41a2aa753e9dbfed1976bebb429a62e869fd0a138ff222860d629280589b2340a4654f85b5b968af3a8c SHA512 1704f17250d8da6a33ac361f0fe07f6f91ebf087e81cee8fa783b220e118eba83f5c79eab001d79b383d7577b6dabd1e18de718cb16b5780d2f145107bf9cc79
DIST cfg-if-1.0.3.crate 8719 BLAKE2B 5cd0ac122110740895b45cdf8e0f738f2de1882d5a06c696d08e906765e4ddcd72a866dcc115da52d9fece205c9ad15dc25ad98dff36b32517012a7586e986ee SHA512 afe424a191c2aaaffec3d114e0116d0324d12117aeb22df78e47ad6752444bc5acb074ab0a174476b71e584a37743f9dcc2b0e8036d590fcc5afc7c55f86122b
DIST cryptography-45.0.6.tar.gz 744949 BLAKE2B 271143188d0a7485066b5c89fc0397e6f9e5f5219844961a85e9fd382fb0b05521a093fb943252ea2985bb89645a285345fcf66a6022a58176fe809a83376a81 SHA512 2c675834fa26db0773fe51855c248927a2a7d45963e07144afdfa73573ce1e6940d40849d23fb45f7599c0821e4dbbec956ce2bd993c614617312b8e67fe7f1f
DIST cryptography-45.0.7.tar.gz 744980 BLAKE2B 4df55f24e60a2d8f9da9532c1b8000b835feb5d9ecb2cc6ed3d047652d353a296350ee1e98416c56877b36d71274b2e60637d017d03efd0cff1ccee8ed48c3b2 SHA512 a5149bc43b4c172d6ca17f2e6dabb4b11295970205b1cd4fcb897e58bef4ca154ceeb384ac29a568dfcfd3ba75326c2a1d7e9e590c617a154b12b2e7922bd824
DIST cryptography_vectors-45.0.4.tar.gz 35345034 BLAKE2B 578bd6dc066079a47cc8291a6b4ecec055b2374046efe12fdc1479505fd9bd5afbc9750e879d6d66b896ff7465abf4f1c133eb41dc4a75c57f5dc635ed8163f0 SHA512 0f2b6310eec21add1caa8ab60e8bb1399177b5a4bc50832fb5db581ed94d030871d2fdd53256e3764c67f58391673005db0527e15063554876306364a8111972
DIST cryptography_vectors-45.0.5.tar.gz 35344700 BLAKE2B 620d31f2ef2482990567bfaeb21163a96b4da20829c80367511a9803bfc2ecad9edb54e37ad1d3c2848c747d14db61323d9613765bd94462adb9228d8a6d43fc SHA512 7d5706243ec69ae670a7d8e0e6e7a650d4ba7e10b5bd8b05641d7f0e2291cd719c3b2bfccb975c429046a1a347316aa86f40d128160ef176efa294c1d843ff86
DIST cryptography-46.0.1.tar.gz 749198 BLAKE2B 291ad3070f257082e620e4452b977b8600a4f53a0c40d526afe98f86689b32bd49e472dd128a6401e4fb926f94bca17e381c03bd9707047fb48faa9b5fe74983 SHA512 5d0ebdc3c86c03507389b2223f668818ce8c5b35ac506feb67fca9dbb43d38e684983cb9b805930caa9cea0c53e9f324354eef03bf8b651140c07e39ac4f8c07
DIST cryptography_vectors-45.0.6.tar.gz 35344645 BLAKE2B 78e8cc7b27eefdf9f499ce64479c67be9ea320967fa6791f19e89c298b783972845728fe43b3c7e6d37fbe1bcd894b268a63cf47be7cc10c5487612cd3587cc5 SHA512 0571c8b5b6e6f7b8787f6bcd395f75460ef615cb9cfd2c779b11326c74b38f285dcb1d84123d3a7996530976fdda78ec266d5c849ea9d6c51835c5ef933b9bfa
DIST cryptography_vectors-45.0.7.tar.gz 35344680 BLAKE2B 4e6586777fcd24ed38f33a6dc7bdb60f959b22a96d7b8ef66c2172aec72f48b7afa99a4a2d58463bf2d5d07dc0b808eb6dfe8808435c03694416d348834c7bd6 SHA512 8f2d06fcc3192d6c3c54c8114d79f6d96faa61e11c81d9a8551b783db9afba6d972a1a91bc97dfac388661ff975bcd570a1291bd81abba575d5f04807e2d9294
DIST cryptography_vectors-46.0.1.tar.gz 33809230 BLAKE2B 40e4f411c85c98175d246a6a089e5a0adb02b5944de23f75f2e4225f250344f994f3afa097e6e761303d1626ff21a839fc5f511dc971c11801501295e3d544bf SHA512 60a6cc937ef1d819343ea90894c16655e6c3f932684ad5d602d55c6af776c8aaa43214868d04d9bde4ff19bb0b9d0d4e2eed8e3aaccc7b6f277f5f0aa8aac893
DIST find-msvc-tools-0.1.1.crate 30228 BLAKE2B 9f6d84697a0310021a59789a0aebcf5895490e4dd719a2ef820ddf2f225ecd13c814e2c03e8d4de4089a2d1599b469a900c0c1072f9b57dcce9fb8634dcea6b2 SHA512 cc91ce79858db4a6feb3ff0fe24d7b29a523285247116a42b27affacc3f034afc0d458ac8716922f5fec5f23deafd62e875ec899d4ea58531d028535c22e137e
DIST foreign-types-0.3.2.crate 7504 BLAKE2B 520818b702d990d296ecd31a8646850202509ccfa18edd0e1b260289619a6c351e758f317ec0824bd76eccb209b6f087057c25f1bd01a47897715013dd834867 SHA512 bf27b8243ed482c202d120383374f19ff09422535e24b9c1aebccc66529bf300ca17b8bbc76d67f98ac092e614497afe3add9dc68aa69c93074df05762f91232
DIST foreign-types-shared-0.1.1.crate 5672 BLAKE2B d2e42e04b6657e7a69fe0bd20c672176629c743e49a55fd007bb30e289710b70045d445ae9cae0eeaa747ee708c90e8abd9b5fc39bad8ec0666befe1b696d4f1 SHA512 bafdb2143e136fb0818e2ffd90b5c862b7181647d6568947d4e4531012bbf7a57b597221ec7056c1b562dfc0c3b5dead26d1a4111ebc15e7863737a873518a4a
DIST heck-0.5.0.crate 11517 BLAKE2B 5365ec43b2239a76b33a174f1a4292ece4147f9d382a68c6c60db78fdc8bad0afb1d51a65bcb25e96675372faa4ea37c318265030b0546ba51942f7c929e1835 SHA512 f044fc9c3d22466629fd8f772ec0555350fd611c0cfadca51d99a3d2f10e155f77c1091916c8a95a6b9b499f366c2e99a5fbf45b010f988bfb9b2501bf9f6a76
DIST indoc-2.0.6.crate 17164 BLAKE2B 1a6cff95bc12ea885ef36b935bf4f1c7870d65be0ff31ffc67dcab904fa80215c1254c1803c5d0c5686252addfad3512e9e1ec79d3edcba026a879f4706926d1 SHA512 e2ea2e5c8226c802bbe0631c1a99d2edd088cbafbf978b2a7b71c7c7f47754c6d4653f466e286441b61cc46def1c7f7a02d4785caab93a61dd785211dba7d1a9
DIST itoa-1.0.15.crate 11231 BLAKE2B 17c261baf95bff2f6cf0dbc33ab78ebbab0cf5dc56aeb7f8977377af868deb5957918f1763c2fe8c080e931489ea89ebcc16b3ebd976eeeb7663ff74989a1071 SHA512 158ca5dd4b04cb12d9292a4df63c72443adaf5aab1bd9aacdb964dc58878d847a64251f84897cb25c34648d4c973b44fef5b4c175d7c04cabc2c13b4631c2e42
DIST libc-0.2.172.crate 791646 BLAKE2B 3a6eb0eba1e31cf89ac792a8e667c0f68b2a0e62502710ffe77c2b06321103a30ffdc4516c0a91fd3ff44508d5304dfb04ab919bd3e723e34c66b560a20e7f86 SHA512 7bfe400ee65c1b7e540fd19a9b7eb1429a66863d5e94ee7caa83a227d19a4143316d3b401013fb7f88c8e4cdb1a40cfbd58826597c8e23799e02e29553b67e34
DIST libc-0.2.175.crate 788728 BLAKE2B dfbcc891a6da7d327916883deec54dbcb0ee5e7fda0b805926f06088dbbbef0520a838c07a62ea075d6a5a035994ea8130efbbc88e08b928c13b06bc5cf75bb9 SHA512 02fa1b6e61ecec3b626f3c802b53e7f46c98558f6e8c810b46d7322c2e4825f1be87068942ac81c07a2188356c6e2b6836b0dddd784396e43ab3712a62cd17ea
DIST memoffset-0.9.1.crate 9032 BLAKE2B 0aab55fe084134bb599c52d77c96400db40949b1013e7037747ada4fcec8dc4a124b6f3755f04b36e057eb2fb4a6bd6f07d6eebcf166f8a71405ef434d802fbf SHA512 3a236c0f481e36973b9f805e454c2efe4dd375e6b4ee406b57145136c70d5fbf4e1183d563ebf3b5fbde7363bbf5f08f0d88e507aae5bda4cc75664ecd0e33aa
DIST once_cell-1.21.3.crate 34534 BLAKE2B 3578aaef305cad2fdffdc40c392775a3540bfab3f3aeafd22466d9507bf8346b9fcc200929d48525b051070c0aaa423ecbcaa12868b34dca007991effb224166 SHA512 32a87506c6f4598f3ca2c88556014ef2093d5db9a08602335e847caa537a866492fa74c894e7e1da2e4289a1d3dbffcb90a9e37a4a1453203832f434b8206990
DIST openssl-0.10.72.crate 283852 BLAKE2B a221ff329fd068da6d88b98e32c0fb9750e074fd87eb261614ba08771df0879fefb80ed0b60a26fcf4ef808e0ff6484f7e4fcbc38146186d30ca4e74d17fa803 SHA512 ee4cfb893e7112fd274baef3283f3bc44385a3e014c9bb4eb24ffc6153fe56e2f66807d8d5874f97254390041cec3affc41bf7b2bc7e5d39bf60413ffb747786
DIST openssl-0.10.73.crate 283994 BLAKE2B 06675b7c6bb1c73b10826577d7d928f4d001494a4c2add24a593c8dd82731a91974147981a63f56b2f11f769b1b93194b9cbcd14e77a578d6d649ad8119e856c SHA512 be1b5384ba72984fbca1aec534764d7b5180cbafe33433cda9662c492fcf219a3a3fe4148fc3c0702aeef63e2570ae7f27dc6a8dba95c7471d4a4c20f7ab1926
DIST openssl-macros-0.1.1.crate 5601 BLAKE2B 69dc1c1f3b7bc4f934cae0dce64c3efa501162e5279efd6af3b74f7a7716c04b6996b306b310f1c045cfa2eff2895314a47ecbb020a817e461c6d77d0bc11e92 SHA512 57e75c84f78fb83f884eeaedb0dd135ecb40192dad2facd908e6a575c9b65b38a2c93bca4630e09ea5a82c77d8bc8364cb2f5778cbfe9d8f484cafe3346b883c
DIST openssl-sys-0.9.108.crate 78190 BLAKE2B 202b0a380bb8d462842c7c2190d8d61e3d959b10aba462a75a3f1722a2a975f6f5eaaa30078dde7b56a7c2bb3a93d776b30cf3f718a8e723c2ef14d9ca400294 SHA512 f1d2cbf26b6bf7faf840e9afa6e86e7a38a303c169f54c098433c106cfb3aa264a692419ef2ca31f734551b5f7b97cffb1a3e28984eec0324cfb60e9cf3f1865
DIST openssl-sys-0.9.109.crate 78247 BLAKE2B 3bf1da4b999a0c9a0891baafccdc541809169921837166b31381590aedc5356992cd71f21a374877dea4cf8015eaf5d8ac7c7ffccb11511893d5d0b8e57e037c SHA512 2dbb01e3b734554d85f9fedfbf9f3ef55132fdd5a328e2930ce056d05ed55a579c3fb12b907f3989ffe15344e7f1633ccd610524d56fe6c9a687acba2d0e6fc9
DIST pem-3.0.5.crate 18140 BLAKE2B 1a19acf6c5d4dafb4411688d87b668d2ea1abe8f561dc2d5de8894066c06e32c5c1392d0e6963d07bab27368a1b39a4f0520485500a1312e2ae43b5c0959ab16 SHA512 09b4a75bda0df6153799e56cdf175d88b7c88b49fda3e19fffba5aa821e433bf3bc9f254f5016131d3dd2d3146c3f6b73e71e04b81ac7d52b581c638cd60d0ff
DIST pkg-config-0.3.32.crate 21370 BLAKE2B 74ded191f066bc223739b3d4afec58f23de57566e7604e3dd62001d9a095a7b6a3633fdb01fdc46960c8134a694d6bf097d9ecec62b38c4f14acafbbabd6e893 SHA512 59569110185fa665f76a13e884a67ad1578c55246abacfc18cb9f037b2d2d9ec3f2078a3adfe5cc82a451892c9ad55f918ee01362a741f57dc9ff6846a4e32e5
DIST portable-atomic-1.11.0.crate 181258 BLAKE2B 627bd7c306f6c4d7991abd9f995b7e0ce110a7ace738690c287a43ce3b979691214e525876f8ace0c2f0d10d781fba95c7d3bf29aea28e09b05b06f4764db03f SHA512 71774f8308963c5399095c6b755befdf9ff3d28f9529b4bae1fe0f2aba733339a267aa6f0ff854e59fa5044a9b0c2c86bad3bc4fcaa951724c839b0d6a22041e
DIST portable-atomic-1.11.1.crate 185506 BLAKE2B 953bb1f2059dc1d891305eb89945f1f6a172fa50972725aee499de72b5dd9b4ad8ccefe4e891183ff8e6b64f4d1bb45ec33b06e0f5af34c940f817b290f746d9 SHA512 4c037ae0b4aef43077bdbf803389bc078d963f20d023e2e1d339a54f67fa9b27c174e7c1b6eca8881ecf301e30c431632d2c0dcedfb5b19552892fac0f81e2e1
DIST proc-macro2-1.0.101.crate 53886 BLAKE2B db566c4fb6a197e0aa45cc074310853eaa24ceeafe9fb91f2014ba47cf6b1cbc34e4e9391456c946587540c8e270e1a37f5195cf03bd15ea5d4f171bba9772db SHA512 3171c807d24371da2931f9c706fb3129bb9bf3ac40418e5d14cfc372baf96e5fee9ede72091163858e3ba0b4f88594efa1031b0bb7128ca68e7b847dead6856c
DIST proc-macro2-1.0.95.crate 51820 BLAKE2B 93229d80556ec03bce4031607d13c7902cacc2d7e2586a692ffe8543d52e3f3ba253c9c311ddedf6d9348ce8758ae8ff64577675cda2dac557f936a328de47e3 SHA512 f78e4d47ecd29c1b2315554705e445507bbfb9449afd0bf1b74df28f266ac6382ca8c3ce135ddc55c989eaee64d1794a0933a941c8ff55f543fa21c400016547
DIST pyo3-0.25.0.crate 1120850 BLAKE2B 6f373129d032e6980d058ec5dbfea58a7ce0cb8ed2b32aa852a14746cfd3a541b02286676c934a5d7f7bc1bea03e986e93e44de42114f7620b487977c0092d85 SHA512 83336d284eefdef5bc26dec4880e21c608a001b4676b3628eb59b7c0011fb672ca81fca035666b714eeb158809064f9b5b0720802045d5ff8fc9f6af02813c30
DIST pyo3-0.26.0.crate 1151579 BLAKE2B bcc8236785502928bf4a0b7a320e0a8f3d6140c562de4351a52d015aaebb8dd6b4d68fe607c8ea13ec66941c8f01d2c18c4249adfacb521355d4bf158667f3a3 SHA512 e073a4d893f88aa0301ef0ead78048137515edd93c490e6dccbc301ff65a208534c65c1d216b04639d4b1ec1e4b69bc87bd34974e5d0659134c28dcce589c194
DIST pyo3-build-config-0.25.0.crate 34122 BLAKE2B ba098ff1c963c43d0cd1fdfaec43573ee0d9afff7cc010b7b371504ab66e1fec9233bab04c8c7656c382366d622589d0d5e865a8a271c68a9831ca657b49fcb9 SHA512 f6580bcc12bf8235bd8bdc09908f861645adfcdee31cf88d6443e628601bf3107c1d823c09dacb8e1bdaa171ae49f15e19811b9752600b799a4e86cdea081d40
DIST pyo3-build-config-0.26.0.crate 34309 BLAKE2B 5ea8b51da2f425674cd3bfcc1090ffdd08da01d2161dc66b08995c20cc859422f9f84077c545e5a0580182910aeb9dbba97838915148a82b86948d1cca3c8722 SHA512 a982d0a0baa4af58c2cef7c0c4b2671e3f559ca7f30586eda9fbd05e842efa2bfea0089ddbc729225b848871f6a25f85e86576e1dff519192ba289cd92c6aa8b
DIST pyo3-ffi-0.25.0.crate 77991 BLAKE2B 0474051570bf71070eab2578e0f9278327ccc48510419d292a81887fffad753ba434db6b795536512a688426eff42ea9805f99b1a3237ec927f6c731033850b2 SHA512 e03cb71493c898408a0692ba7fb4cd704e48c307f5115159f3375fae879e46f5cd7536325d70e7dbd3aeca8ea282a0fb5b5ac609bc807e8b9cb6abbd3a9a2ca5
DIST pyo3-ffi-0.26.0.crate 78247 BLAKE2B 65f1c399bc763bf8afc36ccac27d28242ebcccebd08ab8d9b3165ca5c9abb10f76e76fe5a250aa1e0cdc1d1e8a613160660f07bc0dbc2812675acb9dfc8e89c2 SHA512 91c2ae828e997dee5e48d839794727e94576228e9329c358a3bc77a59f8f37fa0ae6c2579229782b3f46ab90725844ce9194b9de4d3849d824adf1d40743bf7e
DIST pyo3-macros-0.25.0.crate 8876 BLAKE2B 09c37cc5bdaec6859461a7bb4d1c28d0ddd77a448fb5097275fe7be373897900e2dcdb1c43eb4cc915e1089ac1204f4a7155c4b69478b0778e179aded1449ff0 SHA512 ee1218b6981d94a228bf55f31f0131c094728b12c19b312a77386cace2c4768ad8fc8a1a1999bf27c6a30012e20a1eb7a574d918ccacc421930c12cb1a6386ef
DIST pyo3-macros-0.26.0.crate 8906 BLAKE2B 60eef72d27b5bc922b75f71ae24bb6f380288cb3a619bf2940b0de47b27e86cce0ffdb1fbdc9c0540d3f15c9df4884497aa1e6efec0f1579ac722b414818a428 SHA512 07bcddba0926c3dff7629da3260f9a38593fbb337b6a68d55c223f5944d912885e5319cd635ae1785026fed4adea1fcc19695ae83aca5bea127c5a8868fd2c43
DIST pyo3-macros-backend-0.25.0.crate 75089 BLAKE2B ea4d87e16616782c60f46f97d87a002ea2873a2ab6f7335da68bab32d636988fa30834c946943d4c56c6e5992c78ba6dc2cf8b613c2a402218599ef3e7a6c5be SHA512 dc2e567a09e746893d7cea57aa456124df31b1e3cb25f5b1fabdc97cd2ae73eea1d57aa642268bdbef3dc1ba0e383893d1b5dfd9cf1f3e818f77b9fc0ef2c486
DIST pyo3-macros-backend-0.26.0.crate 81809 BLAKE2B 73885035855daf00b001e97e0a5ebe09412d212c8f01aa4db6638ef09990bf1bccbacf2e5a7e6ec21929bb1c2beba06587ecdb6ee954eda9e9c51c6c276cea95 SHA512 4146011a8ef18ecaa44b425eebe6e5e1370945063b98aaa83452e57b66aefbf5d483367b1d4d44aa5091303c4ba7f568c6428ecec0cfa6c90ba41631d4e99367
DIST quote-1.0.40.crate 31063 BLAKE2B 09036ff3e5ebbd775c466bb936de91d4c070481eb4b98c62a4cddcda57cd7b67d63f979b321f6ec64aabee3f5da6c28e7a3efb83f4647768ba578f1bd0bd0bdb SHA512 45a76e22a2b0bec47e4ba73c3b73cc41d821dfcce9876134c5d8eed514da214aee4ce7612e372c8709f888c0d8b9b7e5442f27adb7a59f3571f0339ed7e2ac99
DIST self_cell-1.2.0.crate 16883 BLAKE2B 56bd187fabc138c530aa23dfc69a330a7d0a8f86609801924fd1f4b0cefc43a99a8ba21d05e59272c9d32b83405b4c980df4f01e529772b760a9564dd8eb0c0a SHA512 41addc9b737d0379c0236b1821d6051d31dca6a76f463e6e56c3bac9015da4243f9fedc3d57e051f68f6f0aa610383a0b2cade07b1ea17e92173e2088a625af0
DIST shlex-1.3.0.crate 18713 BLAKE2B 18800c364d3a628f1a3125097ea82fe6286550c2997235df0bf8483a3906aacabc81308cb239887d46ba2f457cc6f8acd5aca78316707eea5098cd5666aea67d SHA512 5c8cedbe666a14b8a0874defb9208146ce64579cde52ed483e4a794cac5dde6a24bf8d684404edff582f842e1fd4fa3fbeddbe074f191e4ec4aa517aa456fe8a
DIST syn-2.0.101.crate 299250 BLAKE2B 7018cdede66dca82e7d7a7e07e52a178687957fcfd69f1a2862094497d2fb9d78ada14b94761679bbc5f6c76c808a63e948ed071e4f65c2f9580a40bf58c9426 SHA512 05e4233a51f4d229dd4c9bd23c5224c42ec5554d02fd316dad10dfdb876aa1d379c7ea30b1ace979537da91ee746ca4fdcef7690885f83fd41ec8c9dc5984101
DIST syn-2.0.106.crate 301514 BLAKE2B 6b28b30ee067c23dc4bd1b38365d14c1700245c974e785173965b0822301966d642b36bdda25210d61f17a99fc71eb81e29a56c89d1649773908bae32778fb1f SHA512 e07e1058770fa3f1039eaf335340cefb597c0dd11bb90fec9fa777ca5815d0e0bb1711bb4db52cac77e205dd68fbe2bce0e1aa9895c2a52a1ea6d7758d13424c
DIST target-lexicon-0.13.2.crate 27923 BLAKE2B 0761f0ffdc23b9c9df86b384d59611c7b8b5e29ff068f03367ad2fe84cfb6d11e1af149b9338236978e9566fedc51387db9f239d2a602db41045ac3db907faec SHA512 d25e3cc3d679cb6b6f24c03e0c24db9d6ca31b8ed42ac9531bd7637557fbba225a6c8ac4f68a8eaf3569195814d599e668a968afbc73b940a77cbc27552cc90a
DIST target-lexicon-0.13.3.crate 28498 BLAKE2B 397315667737abde41949081f8377f704c3a1105790162249a9f0c08b60f012e67d66550e9063d900ac98f5191d13c5ed23d1a8045f99373e7a673a3cfc029e7 SHA512 23422df6edb2a8cb0a9f048864faf76ccb27d6e97fbed7b208b77206941b196f155896a0381150e387142e976439a0a296dcf4cbb4df6bc0e11c65f97f979443
DIST unicode-ident-1.0.18.crate 47743 BLAKE2B 517ab42a847020515b2b871844d0571ea672340f89a762631a791eac18935ac122122fa5566e58b99ab47de179eadb5298e8ff1d05b123c4e93b7fa989c8e31f SHA512 d11f89fb696f9e2953c96a40b5478832651b268c83b9c7a700b07e768e795d6e8dc346597d1226df21219d36866768d1f640bd8edb68db8bd3d5d437b2bfd324
DIST unicode-ident-1.0.19.crate 47480 BLAKE2B d1b9d26833fcd1f3a8498abe2f4ba4202e4547315e48aa927c0f6e4a760c6c7000ff0c18d0cf45af362323c42843d745958c1b0419835f39e13dbc1559487026 SHA512 b17fcf6bffdb4745e0b1bf4983a0dcc4c84f8b4e2c2c618eefbbeae83f94ec75df87b55f9e2dede8c3b4c6e22107fcfc589475c0cbc2c58dfb8630db8d362183
DIST unindent-0.2.4.crate 7422 BLAKE2B 2e7870cd4f78240dbb1e5fb9c0f9b55c57bb40242fe668f105a0e862f1d6300e31efbffe0cdff676a5f96a8d19dfb148f88bfef1cd8a710556d777fd0f4ee37f SHA512 58bd4fd20a0b0a7200e0ea3ea70553cea135a5a8f7a2fb178520c41228f435becce4b9981019b7c73a17df87a2ee9b2a47c4cec29a3011bfe848d48b2473761b
DIST vcpkg-0.2.15.crate 228735 BLAKE2B 6b6bacd9a7fa38919241f45a97f58cae957e58d3aac99df208a26aa718e4f1644f4ccefa31b09151e5c1952288e0e5837c363918b98c7f55079a948a952c1c50 SHA512 7322a21e8811b2fe4e79e09dc321458068ecdf1953f05d36233f3278ecc0b1dfc64194db7010dd46fcf692285f42475beb090c6c6cac0c8f9fe0eb5c770e3172

View File

@ -1,134 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
CARGO_OPTIONAL=yes
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=maturin
PYTHON_COMPAT=( python3_{11..14} pypy3_11 )
PYTHON_REQ_USE="threads(+)"
CRATES="
asn1@0.21.3
asn1_derive@0.21.3
autocfg@1.4.0
base64@0.22.1
bitflags@2.9.1
cc@1.2.23
cfg-if@1.0.0
foreign-types-shared@0.1.1
foreign-types@0.3.2
heck@0.5.0
indoc@2.0.6
itoa@1.0.15
libc@0.2.172
memoffset@0.9.1
once_cell@1.21.3
openssl-macros@0.1.1
openssl-sys@0.9.108
openssl@0.10.72
pem@3.0.5
pkg-config@0.3.32
portable-atomic@1.11.0
proc-macro2@1.0.95
pyo3-build-config@0.25.0
pyo3-ffi@0.25.0
pyo3-macros-backend@0.25.0
pyo3-macros@0.25.0
pyo3@0.25.0
quote@1.0.40
self_cell@1.2.0
shlex@1.3.0
syn@2.0.101
target-lexicon@0.13.2
unicode-ident@1.0.18
unindent@0.2.4
vcpkg@0.2.15
"
inherit cargo distutils-r1 flag-o-matic multiprocessing pypi
VEC_P=cryptography_vectors-$(ver_cut 1-3)
DESCRIPTION="Library providing cryptographic recipes and primitives"
HOMEPAGE="
https://github.com/pyca/cryptography/
https://pypi.org/project/cryptography/
"
SRC_URI+="
${CARGO_CRATE_URIS}
test? (
$(pypi_sdist_url cryptography_vectors "$(ver_cut 1-3)")
)
"
LICENSE="|| ( Apache-2.0 BSD ) PSF-2"
# Dependent crate licenses
LICENSE+="
Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD MIT Unicode-3.0
"
SLOT="0"
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
RDEPEND="
>=dev-libs/openssl-1.0.2o-r6:0=
$(python_gen_cond_dep '
>=dev-python/cffi-1.8:=[${PYTHON_USEDEP}]
' 'python*')
"
DEPEND="
${RDEPEND}
"
BDEPEND="
${RUST_DEPEND}
>=dev-util/maturin-1.8.6[${PYTHON_USEDEP}]
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
dev-python/certifi[${PYTHON_USEDEP}]
>=dev-python/hypothesis-1.11.4[${PYTHON_USEDEP}]
dev-python/iso8601[${PYTHON_USEDEP}]
dev-python/pretend[${PYTHON_USEDEP}]
dev-python/pyasn1-modules[${PYTHON_USEDEP}]
dev-python/pytest-subtests[${PYTHON_USEDEP}]
dev-python/pytest-xdist[${PYTHON_USEDEP}]
dev-python/pytz[${PYTHON_USEDEP}]
)
"
# Files built without CFLAGS/LDFLAGS, acceptable for rust
QA_FLAGS_IGNORED="usr/lib.*/py.*/site-packages/cryptography/hazmat/bindings/_rust.*.so"
distutils_enable_tests pytest
src_unpack() {
cargo_src_unpack
}
src_prepare() {
distutils-r1_src_prepare
sed -i -e 's:--benchmark-disable::' pyproject.toml || die
# work around availability macros not supported in GCC (yet)
if [[ ${CHOST} == *-darwin* ]] ; then
local darwinok=0
if [[ ${CHOST##*-darwin} -ge 16 ]] ; then
darwinok=1
fi
sed -i -e 's/__builtin_available(macOS 10\.12, \*)/'"${darwinok}"'/' \
src/_cffi_src/openssl/src/osrandom_engine.c || die
fi
}
python_configure_all() {
filter-lto # bug #903908
}
python_test() {
local -x PYTHONPATH="${PYTHONPATH}:${WORKDIR}/cryptography_vectors-${PV}"
local EPYTEST_IGNORE=(
tests/bench
)
epytest -n "$(makeopts_jobs)"
}

View File

@ -10,39 +10,40 @@ PYTHON_COMPAT=( python3_{11..14} pypy3_11 )
PYTHON_REQ_USE="threads(+)"
CRATES="
asn1@0.21.3
asn1_derive@0.21.3
autocfg@1.4.0
asn1@0.22.0
asn1_derive@0.22.0
autocfg@1.5.0
base64@0.22.1
bitflags@2.9.1
cc@1.2.23
cfg-if@1.0.0
bitflags@2.9.4
cc@1.2.37
cfg-if@1.0.3
find-msvc-tools@0.1.1
foreign-types-shared@0.1.1
foreign-types@0.3.2
heck@0.5.0
indoc@2.0.6
itoa@1.0.15
libc@0.2.172
libc@0.2.175
memoffset@0.9.1
once_cell@1.21.3
openssl-macros@0.1.1
openssl-sys@0.9.108
openssl@0.10.72
openssl-sys@0.9.109
openssl@0.10.73
pem@3.0.5
pkg-config@0.3.32
portable-atomic@1.11.0
proc-macro2@1.0.95
pyo3-build-config@0.25.0
pyo3-ffi@0.25.0
pyo3-macros-backend@0.25.0
pyo3-macros@0.25.0
pyo3@0.25.0
portable-atomic@1.11.1
proc-macro2@1.0.101
pyo3-build-config@0.26.0
pyo3-ffi@0.26.0
pyo3-macros-backend@0.26.0
pyo3-macros@0.26.0
pyo3@0.26.0
quote@1.0.40
self_cell@1.2.0
shlex@1.3.0
syn@2.0.101
target-lexicon@0.13.2
unicode-ident@1.0.18
syn@2.0.106
target-lexicon@0.13.3
unicode-ident@1.0.19
unindent@0.2.4
vcpkg@0.2.15
"
@ -68,12 +69,12 @@ LICENSE+="
Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD MIT Unicode-3.0
"
SLOT="0"
KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
RDEPEND="
>=dev-libs/openssl-1.0.2o-r6:0=
$(python_gen_cond_dep '
>=dev-python/cffi-1.8:=[${PYTHON_USEDEP}]
>=dev-python/cffi-2.0.0:=[${PYTHON_USEDEP}]
' 'python*')
"
DEPEND="
@ -82,7 +83,7 @@ DEPEND="
BDEPEND="
${RUST_DEPEND}
>=dev-util/maturin-1.8.6[${PYTHON_USEDEP}]
>=dev-util/maturin-1.9.4[${PYTHON_USEDEP}]
dev-python/setuptools[${PYTHON_USEDEP}]
test? (
dev-python/certifi[${PYTHON_USEDEP}]

View File

@ -1,2 +1,3 @@
DIST cython-3.1.2.tar.gz 3184825 BLAKE2B 8be6016f3e9a5a7db71fd1cab65424db1a1cd8e9d0118f01432964eb816135021f77542aff2b1f0fd2af8f657f952ebce2f420d7610ae37c6c6956f94e54a636 SHA512 c674027dae58377ea71d8d8b15601e6e0c80435807603251e685608218805fef2e6eac4bbebd3c50c319cd7da660ff9ce1a6daeb673eb40ce70bbfe7f0069600
DIST cython-3.1.3.tar.gz 3186689 BLAKE2B 520adbaf737b2625a5b6d5802484d84dccf12867ec4c6d379816b84c4413e9a766ee3c21f0ce4209f7961b19346f5e874ab09ed7bf9dc9a259afb8e65ae2359e SHA512 dbf14b486e9dc3cf978abd80f0fcc16d9ed8077d5a44c66b669291d6cc89beeae3e901e4975cee44208dcf52f11ba331a8d73587bf55891976a9ec4818a2470b
DIST cython-3.1.4.tar.gz 3190778 BLAKE2B 7e554db21ba009dc70157ad03b414091f9bba15586c5fa842b23cc28c116dc153857e99c9981dd0f783f696b6afa3b2689424231b88ae89bcf9233fa8006b9c9 SHA512 dd524d7de59f949a8bac1cb944a7a2b4eb26b13107db4fd6f9af000d5af18dd08ac5768253721e3513f5b4c1593fdd8cf055f4ffc17d541b2b90ca461522e8f1

View File

@ -21,7 +21,7 @@ HOMEPAGE="
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="test test-full"
RESTRICT="!test? ( test )"

View File

@ -0,0 +1,128 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_FULLY_TESTED=( python3_{11..14} )
PYTHON_TESTED=( "${PYTHON_FULLY_TESTED[@]}" pypy3_11 )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_{13,14}t )
PYTHON_REQ_USE="threads(+)"
inherit distutils-r1 multiprocessing pypi toolchain-funcs
DESCRIPTION="A Python to C compiler"
HOMEPAGE="
https://cython.org/
https://github.com/cython/cython/
https://pypi.org/project/Cython/
"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="test test-full"
RESTRICT="!test? ( test )"
BDEPEND="
${RDEPEND}
test? (
test-full? (
$(python_gen_cond_dep '
dev-python/numpy[${PYTHON_USEDEP}]
' "${PYTHON_FULLY_TESTED[@]}")
)
)
"
PATCHES=(
"${FILESDIR}/${PN}-0.29.23-pythran-parallel-install.patch"
)
distutils_enable_sphinx docs \
dev-python/jinja2 \
dev-python/sphinx-issues \
dev-python/sphinx-tabs
python_compile() {
# Python gets confused when it is in sys.path before build.
local -x PYTHONPATH=
if use elibc_musl ; then
# Workaround for bug #925318
local -x LDFLAGS="${LDFLAGS} -Wl,-z,stack-size=2097152"
fi
distutils-r1_python_compile
}
python_test() {
# PYTHON_TESTED controls whether we expect the testsuite to
# pass at all, while PYTHON_FULLY_TESTED allows skipping before
# numpy is ported (and possibly other deps in future).
if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then
einfo "Skipping tests on ${EPYTHON} (xfail)"
return
fi
# Needed to avoid confusing cache tests
unset CYTHON_FORCE_REGEN
tc-export CC
local testargs=(
-vv
-j "$(makeopts_jobs)"
--work-dir "${BUILD_DIR}"/tests
--no-examples
--no-code-style
# Fails to find embedded.c
--exclude 'embedded'
# coverage_installed_pkg needs dev-python/pip and doesn't like
# 'externally-managed' (bug #927995), but we don't really
# want automagic test dependencies at all, so just skip
# unimportant-for-us coverage tests entirely.
--exclude 'run.coverage*'
--exclude 'Cython.Coverage'
# Automagic on dev-python/python-tests, could add this in future
--exclude 'run.test_exceptions'
# TODO: Unpackaged dev-python/interpreters-pep-734 (interpreters_backport)
# This only shows up as a failure with >=3.13.
--exclude 'subinterpreters_threading_stress_test'
# The fix for https://github.com/cython/cython/issues/6938
# changes these tests s.t. they break with our build layout.
--exclude 'build.depfile*'
)
if [[ ${EPYTHON} == pypy3* ]] ; then
testargs+=(
# Recursion issue
--exclude 'run.if_else_expr'
--exclude 'run.test_patma*'
# Slight output difference (missing '<')
--exclude 'run.cpp_exception_ptr_just_handler'
)
fi
# Keep test-full for numpy as it's large and doesn't pass tests itself
# on niche arches.
if ! use test-full || ! has "${EPYTHON/./_}" "${PYTHON_FULLY_TESTED[@]}"; then
testargs+=(
--exclude 'run.numpy*'
--exclude 'run.ufunc'
--exclude 'numpy*'
)
fi
"${PYTHON}" runtests.py "${testargs[@]}" || die "Tests fail with ${EPYTHON}"
}
python_install_all() {
local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt )
distutils-r1_python_install_all
}

View File

@ -1,3 +1,4 @@
DIST docutils-0.21.2.tar.gz 2204444 BLAKE2B 727c2f97fc5835a0ffa62e38ea85af366cd89ad1eaec0b8af8b1f3b12e6cddfddb65161ba34f9109952d37ba2cf8985f3c3b6905ebb2ac1c9a984cce3fb4d170 SHA512 7fafa331f5687448e80d299c20cdccc4b49819fa471b5f586bf0ab18c694ba43a70f58e7c76b0a70a16267585548389214e11a4998ad7fdc19a27f0f7644539c
DIST docutils-0.22.1rc1.tar.gz 2288693 BLAKE2B a65ec18afab62a37f254f904b6812ffdd8b67c774ebd7d39c4f661f79150ac8b1dc9077d020ced548d0dd15fdde8458771db4e1576f09b99dd7f001a1988426e SHA512 6cf2d4ce54fd3db87f09ff7a278aeefa4a47c85a7f919c4d8590e42b4583aab0a81405cf047d95238b8bae2b6e0cacad3a5397009c0b3fdb10fe8984080e911f
DIST docutils-0.22.1.tar.gz 2291655 BLAKE2B 6e3fc58813bcf4942d14d911d86536fde75a0dc02f8847ef92118c5e78b302baf1ec0635a29760b373c4cfd8946796d705774422d81e7394fb1b3562d95b167f SHA512 9cf82e12e5b63bed33dd334a9282a565d6a65edd7b8ad0b62ffe2a05ce039f7947a935de8743acc4846a6334fd894d90533dd0bf931166dcdbab56bc93c92619
DIST docutils-0.22.2.tar.gz 2289092 BLAKE2B cef7861efe59766fc4883f945d7c52d026b6dae378f95fac074698e31ef2a32bece572e09f2307a1f1ebc7b63f963b53cd5a5e09538a7fe5bcdec9864ecfd4d4 SHA512 dfa6825fe1c5f870719da054badc3af69854b64b9e1057210b7aa6ecd2eff0f809fa311d3d30b1eb4fa542f68eacc26b6be314f1897c8a7cb423ab91f8f15102
DIST docutils-0.22.tar.gz 2277984 BLAKE2B 8ad9fc3d064e39bb618f5bac7ef6b69a77e7e811ff2f7c4c1b34f4f8bc1ba793f995e653d20ba536d24af5905f68b8e3f636a0f28f1c9eef46bb6f755d988bc2 SHA512 09082eb3bdd5f9b3e977d356740efee47725a50fbaca7bf35c7fddff06003c2b2177a38d160a9956f9e96261f881c0d870c0aa9fef84f90d0cac079ccc73669d

View File

@ -17,6 +17,7 @@ HOMEPAGE="
# GPL-3+ only for emacs/rst.el
LICENSE="BSD BSD-2 GPL-3+ PSF-2.4 public-domain"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
RDEPEND="
dev-python/pillow[${PYTHON_USEDEP}]

View File

@ -0,0 +1,62 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( python3_{11..14} pypy3_11 )
inherit distutils-r1 pypi
DESCRIPTION="Python Documentation Utilities (reference reStructuredText impl.)"
HOMEPAGE="
https://docutils.sourceforge.io/
https://pypi.org/project/docutils/
"
# GPL-3+ only for emacs/rst.el
LICENSE="BSD BSD-2 GPL-3+ PSF-2.4 public-domain"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
RDEPEND="
dev-python/pillow[${PYTHON_USEDEP}]
dev-python/pygments[${PYTHON_USEDEP}]
"
BDEPEND="
${RDEPEND}
"
python_compile_all() {
# Generate html docs from reStructured text sources.
# Place html4css1.css in base directory to ensure that the generated reference to it is correct.
cp docutils/writers/html4css1/html4css1.css . || die
cd tools || die
"${EPYTHON}" buildhtml.py --input-encoding=utf-8 --no-datestamp \
--stylesheet-path=../html4css1.css, --traceback ../docs || die
}
src_test() {
cd test || die
distutils-r1_src_test
}
python_test() {
"${EPYTHON}" alltests.py -v || die "Testing failed with ${EPYTHON}"
}
python_install() {
distutils-r1_python_install
# Install tools.
python_doscript tools/buildhtml.py
}
python_install_all() {
local DOCS=( *.rst )
local HTML_DOCS=( docs tools docutils/writers/html4css1/html4css1.css )
distutils-r1_python_install_all
}

View File

@ -20,7 +20,7 @@ SRC_URI="
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
BDEPEND="
test? (

View File

@ -16,7 +16,7 @@ HOMEPAGE="
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
EPYTEST_PLUGINS=()
distutils_enable_tests pytest

View File

@ -18,7 +18,7 @@ HOMEPAGE="
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
RDEPEND="
>=dev-python/more-itertools-0.12.0-r1[${PYTHON_USEDEP}]

View File

@ -1,3 +1,4 @@
DIST lxml-5.4.0.gh.tar.gz 950906 BLAKE2B 00c47f34178df5f1b3555f5980a0c7ca9ecc5f0b54cc2756125fd6b2684e369563220c42d380f43af4e53ed2756ebfd71e9f6e1113aa192f14c76defb56c944a SHA512 a7f297b94fd88f20de9371bef207f8e95243a060b24e4006ec310c4a94f6147c8bb38fc3cff0f874f0b76282e745bb62e65a5cba2ce6e34ee54be0e3fde66724
DIST lxml-6.0.0.gh.tar.gz 987497 BLAKE2B 9d3d61c4f478014942b276d8e5bb8137d67edf05294a821461bd4304a857481cff694a2d97a8c9cbffe0fef7d755aff7c6a6f67eae832f637ff2e5bdc105a7f3 SHA512 05519e03067de5d85be76994070c0a25f35eb52c2df5fc540aa6d2661af09636021c9b6b60d102c687cd9b8f800ecffdb9f2407d7d0f5bbbc43c4c0b38a3b18e
DIST lxml-6.0.1.gh.tar.gz 988844 BLAKE2B de4a2964f3118a40a1d2638134a29683297952b00c225477ede859be1f985c821e7125e3bb0be03866d08f7dff10971a23de63cfd16aa8ea805035b28124391b SHA512 7a41325af7b2b802ed368274444fbe4f272141c93f798ea60305c67a11484c73c5686dc24a37a784be1e574ad22bb4ff06111e868ef0567156e6a143f7742554
DIST lxml-6.0.2.gh.tar.gz 990107 BLAKE2B c01a94fef56754599100b65927b40c2d786d631f02bbfe6cff3865a00531ab26fc6a0fe5cf9b02bdcf01beb45ef94fd4436ed4c06f5c8fd9e707bcae80c0f2f4 SHA512 164dc5e38e394f4396faf0b06729039f6807a227e1a2755a6991e6dce569cc64244d5edfd2cf2af0d4e845d7155a76f6e391e32f3d5aac21dff3c07cbbe06460

View File

@ -0,0 +1,120 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..14} pypy3_11 )
inherit distutils-r1 optfeature toolchain-funcs
DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries"
HOMEPAGE="
https://lxml.de/
https://pypi.org/project/lxml/
https://github.com/lxml/lxml/
"
SRC_URI="
https://github.com/lxml/lxml/archive/${P}.tar.gz
-> ${P}.gh.tar.gz
"
S=${WORKDIR}/lxml-${P}
LICENSE="BSD ElementTree GPL-2 PSF-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
IUSE="doc examples +threads test"
RESTRICT="!test? ( test )"
# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
DEPEND="
>=dev-libs/libxml2-2.10.3:=
>=dev-libs/libxslt-1.1.38
"
RDEPEND="
${DEPEND}
"
BDEPEND="
virtual/pkgconfig
>=dev-python/cython-3.1.4[${PYTHON_USEDEP}]
doc? (
$(python_gen_any_dep '
dev-python/docutils[${PYTHON_USEDEP}]
dev-python/pygments[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]
')
)
test? (
dev-python/cssselect[${PYTHON_USEDEP}]
)
"
PATCHES=(
"${FILESDIR}/${PN}-6.0.0-pypy.patch"
)
python_check_deps() {
use doc || return 0
python_has_version -b "dev-python/docutils[${PYTHON_USEDEP}]" &&
python_has_version -b "dev-python/pygments[${PYTHON_USEDEP}]" &&
python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]" &&
python_has_version -b "dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]"
}
python_prepare_all() {
# don't use some random SDK on Darwin
sed -i -e '/_ldflags =/s/=.*isysroot.*darwin.*None/= None/' \
setupinfo.py || die
distutils-r1_python_prepare_all
}
python_compile() {
local DISTUTILS_ARGS=(
# by default it adds -w to CFLAGS
--warnings
)
tc-export PKG_CONFIG
distutils-r1_python_compile
}
python_compile_all() {
# disable automagic dep on coverage
use doc && emake CYTHON_WITH_COVERAGE= html
}
python_test() {
local dir=${BUILD_DIR}/test$(python_get_sitedir)/lxml
local -x PATH=${BUILD_DIR}/test/usr/bin:${PATH}
cp -al "${BUILD_DIR}"/{install,test} || die
cp -al src/lxml/tests "${dir}/" || die
cp -al src/lxml/html/tests "${dir}/html/" || die
mkdir "${dir}"/../../doc || die
# this one needs to be copied, because upstream uses doc/../../../doc
cp -r "${S}"/doc "${dir}"/../../ || die
ln -s "${S}"/doc "${dir}"/../../../../ || die
"${EPYTHON}" test.py --no-src -vv --all-levels -p ||
die "Tests fail on ${EPYTHON}"
}
python_install_all() {
if use doc; then
local DOCS=( README.rst *.txt doc/*.txt )
local HTML_DOCS=( doc/html/. )
fi
if use examples; then
dodoc -r samples
fi
distutils-r1_python_install_all
}
pkg_postinst() {
optfeature "Support for BeautifulSoup as a parser backend" dev-python/beautifulsoup4
optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect
optfeature "Support for lxml.html.clean sanitizer" dev-python/lxml-html-clean
}

View File

@ -20,7 +20,7 @@ SRC_URI="
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
RDEPEND="
<dev-python/linkify-it-py-3[${PYTHON_USEDEP}]

View File

@ -1 +1,3 @@
DIST poetry_core-2.1.3.tar.gz 365027 BLAKE2B d3cd1536a8466f784b2cd6a835997c480cdc11d24afe4e0b757879b2acc4795e33485fc9bf6adccf5afbf475d4b1748959fb146a6c01cf8508d6c27a7abe52e0 SHA512 eb82164aef3ce00fc14d55db8065b95feca15a78e1c69ca58c8c0b1018404b173a80c61d448513f938535a03e73df99978b51b3494065bd1c99bc8a14e224ba8
DIST poetry_core-2.2.0.tar.gz 378727 BLAKE2B b3b122ed167d4160054e76842df49ad836f2f1139e5d39de461d38fd76110e1718fb912552c5d48aba2fc88eca01fa5c0c66a7aa4973d7968b000bbb61d4cfe9 SHA512 83a05d2e024e0a92a32ac8ea9a8a8b1313a6910f11e27b0a501703b0aac5c9f833a2b642403e28bb3ddffa7300c6f5e4533b604af40421033c2416e175a340c5
DIST poetry_core-2.2.1.tar.gz 378867 BLAKE2B 973ffc150b9d7942d56378756d9297b4c190322f01048421f4de34dd432ca7af880950c1adc0fcde8fbf4a7e8143e4e0027ab7faebd5789476a7431ba4d09fdc SHA512 786ccaad8cfdd5991d755f811661ce2493b335e6ad927c1a15c62b1055571180759eef63ed14b243677e0bfcedcf08e471bab9e0b261f65096984d2b7370f972

View File

@ -0,0 +1,66 @@
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=standalone
PYTHON_TESTED=( pypy3_11 python3_{11..14} )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" )
inherit distutils-r1 pypi
DESCRIPTION="Poetry PEP 517 Build Backend"
HOMEPAGE="
https://github.com/python-poetry/poetry-core/
https://pypi.org/project/poetry-core/
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos"
IUSE="test"
RESTRICT="!test? ( test )"
# check inside vendors/pyproject.toml
# (note that some are indirect deps)
RDEPEND="
>=dev-python/fastjsonschema-2.21.2[${PYTHON_USEDEP}]
>=dev-python/lark-1.2.2[${PYTHON_USEDEP}]
>=dev-python/packaging-25.0[${PYTHON_USEDEP}]
"
BDEPEND="
${RDEPEND}
test? (
$(python_gen_cond_dep '
dev-python/build[${PYTHON_USEDEP}]
dev-python/pytest-mock[${PYTHON_USEDEP}]
dev-python/tomli-w[${PYTHON_USEDEP}]
>=dev-python/trove-classifiers-2022.5.19[${PYTHON_USEDEP}]
>=dev-python/virtualenv-20.21[${PYTHON_USEDEP}]
dev-vcs/git
' "${PYTHON_TESTED[@]}")
)
"
src_prepare() {
# remove vendoring of dependencies
rm -r src/poetry/core/_vendor || die
sed -e '/__vendor_site__/d' -i src/poetry/core/__init__.py || die
distutils-r1_src_prepare
}
python_test() {
if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then
einfo "Skipping tests on ${EPYTHON} (unported deps)"
return
fi
# Poetry expects test to be run inside a git repository, otherwise
# VCS-related logic doesn't get triggered. An empty repository
# suffices, though.
git init || die
local EPYTEST_PLUGINS=( pytest-mock )
epytest
}

View File

@ -0,0 +1,66 @@
# Copyright 2022-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=standalone
PYTHON_TESTED=( pypy3_11 python3_{11..14} )
PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" )
inherit distutils-r1 pypi
DESCRIPTION="Poetry PEP 517 Build Backend"
HOMEPAGE="
https://github.com/python-poetry/poetry-core/
https://pypi.org/project/poetry-core/
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos"
IUSE="test"
RESTRICT="!test? ( test )"
# check inside vendors/pyproject.toml
# (note that some are indirect deps)
RDEPEND="
>=dev-python/fastjsonschema-2.21.2[${PYTHON_USEDEP}]
>=dev-python/lark-1.2.2[${PYTHON_USEDEP}]
>=dev-python/packaging-25.0[${PYTHON_USEDEP}]
"
BDEPEND="
${RDEPEND}
test? (
$(python_gen_cond_dep '
dev-python/build[${PYTHON_USEDEP}]
dev-python/pytest-mock[${PYTHON_USEDEP}]
dev-python/tomli-w[${PYTHON_USEDEP}]
>=dev-python/trove-classifiers-2022.5.19[${PYTHON_USEDEP}]
>=dev-python/virtualenv-20.21[${PYTHON_USEDEP}]
dev-vcs/git
' "${PYTHON_TESTED[@]}")
)
"
src_prepare() {
# remove vendoring of dependencies
rm -r src/poetry/core/_vendor || die
sed -e '/__vendor_site__/d' -i src/poetry/core/__init__.py || die
distutils-r1_src_prepare
}
python_test() {
if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then
einfo "Skipping tests on ${EPYTHON} (unported deps)"
return
fi
# Poetry expects test to be run inside a git repository, otherwise
# VCS-related logic doesn't get triggered. An empty repository
# suffices, though.
git init || die
local EPYTEST_PLUGINS=( pytest-mock )
epytest
}

View File

@ -19,7 +19,7 @@ HOMEPAGE="
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~arm64-macos ~x64-macos"
IUSE="socks5 test-rust"
RDEPEND="

View File

@ -1,8 +1,3 @@
DIST glib-2.78.6.tar.xz 5344808 BLAKE2B d16173794c4aa019459cf8c8c84d4107fb8393828f41ec6c631b9452890f34f9022ed848a543ed134fdb8a575faef6b941cea3e05de512eb1b7a99f7601a2485 SHA512 8d75f8fd77b6309215ca86a0c7648878efe11051f18b279840c137669017ea4066388f8682367e4ea3f154333d833c9dc28ccd4a66a91f0c3854a40a2838f8da
DIST glib-2.80.5.tar.xz 5538308 BLAKE2B 3f17ff85a85d20858b69c2dccc1e5d6ffd92661a8cfda8b8770dd391861999ff3381008f4fe382e90f0a7798fe218debda7f559f6e3ac8f9305e3be98b879969 SHA512 c9cc9f99e217fd950810fcfbfa7300c7850cae4dbfbabc03cdcadb6dcca2e51ea7979ceb68c09d8e9776fd1c04db73b89b81f748c8bd911e1f7ad9f704dff172
DIST glib-2.82.5.tar.xz 5554704 BLAKE2B e7853034be1137f8b793483df9e9ce1465dd10a990eb9b3cb9ac76c9f8f86ccc6fda85645b04b35963b28c33e0f6c02df4f3d03e06cc278b8515e588d6bd05f6 SHA512 a6b035c32a42b9d6f4c031a29da405848002619654b58c9205f2f78dbb9698cd5866f31ab213adc04aa214d2c48840a9592c0a1e9201e6851ebd435635f393ae
DIST glib-2.84.0.tar.xz 5613328 BLAKE2B a482076d6b0c82824179094974110dbd10d47fce93f84f4626d0d3dbea528602c41ac4a7ab8feedc3d7cc5e404ef8bef30c6c744b6f0f4f3a764644e28210e28 SHA512 72b85e30c535c5da7d8598d1cec02b1b481c467e612dbb396a0a64ad1d37cf2f1802c6fa576885c99cf8a22f4f0fc7dfdf42a3f32f7f40394f72db588fdbebb7
DIST glib-2.84.1.tar.xz 5615396 BLAKE2B d20ade482eb95873adaefc656e22c57e6712a6263a4812e448220040e30144919331cb279566a89a2ab46495b46d6a79e3821e491317587325fa3a64b40d62cc SHA512 ee7f38a4726fd72e41ddb75c4933c7b1bb30935bb2fddc84902d0627a836af512534195132cc02e3d15f168fefc816576181a8d6e436472b582191437b79a456
DIST glib-2.84.2.tar.xz 5617588 BLAKE2B 31592cbeca58f03c138a02b0cd953b6bd2cdcbfa39283241affd1bff439d6376f0420b4b715856963c64903f3646cf89890f709f514a85d93fb3bbe26b99d516 SHA512 430928d7d7a442fc3927ca943f2569035fe8768768a0ebc6720ae1ef152b56fc5f8d4215d21b4828cc2f39a8632c907ed2c52a0c8566da1c533a2e049a1a121f
DIST glib-2.84.3.tar.xz 5615704 BLAKE2B 48444b91be68530de05667e2e009dcdc63af2f95cc978a461d930b943772e52b6c9d0e797aea3a9a5713758f22ee60a190c7d601b170c6c853fce624e5c327d7 SHA512 73f2d67d2ef5b4dc8cd2f6df9ce7903853ec619924e2927adbc73d706974a7d660afea55be18e12ccb0dee1145cf4149b743278d2b128fd466e3df2bbf90ef57
DIST glib-2.84.4.tar.xz 5618200 BLAKE2B 5faee382433085cd598545a99e2e95ce430be4ac5ca10106b70f2404ddacf328f4223bc092a23025f9bf8b936619a88a9dfb220674a07e9250cf4213c6213be9 SHA512 2de9b2f7376c0e5f6ee585087090675d597c474199a10d04aad18df688b6ca77d17e93a86ec07482898663f51c82121992272496318138f77ca5ad2c340a4bd3

View File

@ -1,36 +0,0 @@
https://bugs.gentoo.org/922654
https://gitlab.gnome.org/GNOME/glib/-/issues/3134
https://gitlab.gnome.org/GNOME/glib/-/commit/6ef967a0f930ce37a8c9b5aff969693b34714291
[sam: Trimmed the CI changes.]
From 6ef967a0f930ce37a8c9b5aff969693b34714291 Mon Sep 17 00:00:00 2001
From: Jordan Williams <jordan@jwillikers.com>
Date: Fri, 1 Dec 2023 09:53:50 -0600
Subject: [PATCH] Switch from the deprecated distutils module to the packaging
module
The distutils module was removed in Python 3.12.
---
--- a/utils.py
+++ b/utils.py
@@ -19,7 +19,7 @@
#
# Author: David Zeuthen <davidz@redhat.com>
-import distutils.version
+import packaging.version
import os
import sys
@@ -166,4 +166,4 @@ def version_cmp_key(key):
v = str(key[0])
else:
v = "0"
- return (distutils.version.LooseVersion(v), key[1])
+ return (packaging.version.Version(v), key[1])
--
GitLab

View File

@ -1,80 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
GNOME_ORG_MODULE="glib"
PYTHON_COMPAT=( python3_{10..13} )
PYTHON_REQ_USE="xml(+)"
DISTUTILS_USE_PEP517=setuptools
DISTUTILS_SINGLE_IMPL=1
inherit gnome.org distutils-r1
DESCRIPTION="GDBus code and documentation generator"
HOMEPAGE="https://www.gtk.org/"
LICENSE="LGPL-2+"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
RDEPEND="
${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-python/packaging[${PYTHON_USEDEP}]
')
"
DEPEND="${RDEPEND}"
BDEPEND="
dev-libs/libxslt
app-text/docbook-xsl-stylesheets
"
S="${WORKDIR}/glib-${PV}/gio/gdbus-2.0/codegen"
python_prepare_all() {
PATCHES=(
"${FILESDIR}/${PN}-2.56.1-sitedir.patch"
"${FILESDIR}/${PN}-2.78.4-distutils.patch"
)
distutils-r1_python_prepare_all
local MAJOR_VERSION=$(ver_cut 1)
local MINOR_VERSION=$(ver_cut 2)
sed -e 's:@PYTHON@:python:' gdbus-codegen.in > gdbus-codegen || die
sed -e "s:@VERSION@:${PV}:" \
-e "s:@MAJOR_VERSION@:${MAJOR_VERSION}:" \
-e "s:@MINOR_VERSION@:${MINOR_VERSION}:" config.py.in > config.py || die
cp "${FILESDIR}/setup.py-2.32.4" setup.py || die "cp failed"
sed -e "s/@PV@/${PV}/" -i setup.py || die "sed setup.py failed"
}
do_xsltproc_command() {
# Taken from meson.build for manual manpage building - keep in sync (also copied to dev-util/glib-utils)
xsltproc \
--nonet \
--stringparam man.output.quietly 1 \
--stringparam funcsynopsis.style ansi \
--stringparam man.th.extra1.suppress 1 \
--stringparam man.authors.section.enabled 0 \
--stringparam man.copyright.section.enabled 0 \
-o "${2}" \
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
"${1}" || die "manpage generation failed"
}
src_compile() {
distutils-r1_src_compile
do_xsltproc_command \
"${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.xml" \
"${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.1"
}
src_test() {
einfo "Skipping tests. This package is tested by dev-libs/glib"
einfo "when merged with FEATURES=test"
}
python_install_all() {
distutils-r1_python_install_all # no-op, but prevents QA warning
doman "${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.1"
}

View File

@ -1,80 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
GNOME_ORG_MODULE="glib"
PYTHON_COMPAT=( python3_{10..13} )
PYTHON_REQ_USE="xml(+)"
DISTUTILS_USE_PEP517=setuptools
DISTUTILS_SINGLE_IMPL=1
inherit gnome.org distutils-r1
DESCRIPTION="GDBus code and documentation generator"
HOMEPAGE="https://www.gtk.org/"
S="${WORKDIR}/glib-${PV}/gio/gdbus-2.0/codegen"
LICENSE="LGPL-2+"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
RDEPEND="
${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-python/packaging[${PYTHON_USEDEP}]
')
"
DEPEND="${RDEPEND}"
BDEPEND="
dev-libs/libxslt
app-text/docbook-xsl-stylesheets
>=dev-python/docutils-0.21.1
"
python_prepare_all() {
PATCHES=(
"${FILESDIR}/${PN}-2.56.1-sitedir.patch"
)
distutils-r1_python_prepare_all
local MAJOR_VERSION=$(ver_cut 1)
local MINOR_VERSION=$(ver_cut 2)
sed -e 's:@PYTHON@:python:' gdbus-codegen.in > gdbus-codegen || die
sed -e "s:@VERSION@:${PV}:" \
-e "s:@MAJOR_VERSION@:${MAJOR_VERSION}:" \
-e "s:@MINOR_VERSION@:${MINOR_VERSION}:" config.py.in > config.py || die
cp "${FILESDIR}/setup.py-2.32.4" setup.py || die "cp failed"
sed -e "s/@PV@/${PV}/" -i setup.py || die "sed setup.py failed"
}
do_xsltproc_command() {
# Taken from meson.build for manual manpage building - keep in sync (also copied to dev-util/glib-utils)
xsltproc \
--nonet \
--stringparam man.output.quietly 1 \
--stringparam funcsynopsis.style ansi \
--stringparam man.th.extra1.suppress 1 \
--stringparam man.authors.section.enabled 0 \
--stringparam man.copyright.section.enabled 0 \
-o "${2}" \
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
"${1}" || die "manpage generation failed"
}
src_compile() {
distutils-r1_src_compile
rst2man \
"${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.rst" \
"${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.1"
}
src_test() {
einfo "Skipping tests. This package is tested by dev-libs/glib"
einfo "when merged with FEATURES=test"
}
python_install_all() {
distutils-r1_python_install_all # no-op, but prevents QA warning
doman "${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.1"
}

View File

@ -1,78 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
GNOME_ORG_MODULE="glib"
PYTHON_COMPAT=( python3_{10..13} )
PYTHON_REQ_USE="xml(+)"
DISTUTILS_USE_PEP517=setuptools
DISTUTILS_SINGLE_IMPL=1
inherit gnome.org distutils-r1
DESCRIPTION="GDBus code and documentation generator"
HOMEPAGE="https://www.gtk.org/"
S="${WORKDIR}/glib-${PV}/gio/gdbus-2.0/codegen"
LICENSE="LGPL-2+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
RDEPEND="
${PYTHON_DEPS}
!<dev-libs/glib-${PV}
"
DEPEND="${RDEPEND}"
BDEPEND="
dev-libs/libxslt
app-text/docbook-xsl-stylesheets
>=dev-python/docutils-0.21.1
"
python_prepare_all() {
PATCHES=(
"${FILESDIR}/${PN}-2.56.1-sitedir.patch"
)
distutils-r1_python_prepare_all
local MAJOR_VERSION=$(ver_cut 1)
local MINOR_VERSION=$(ver_cut 2)
sed -e 's:@PYTHON@:python:' gdbus-codegen.in > gdbus-codegen || die
sed -e "s:@VERSION@:${PV}:" \
-e "s:@MAJOR_VERSION@:${MAJOR_VERSION}:" \
-e "s:@MINOR_VERSION@:${MINOR_VERSION}:" config.py.in > config.py || die
cp "${FILESDIR}/setup.py-2.32.4" setup.py || die "cp failed"
sed -e "s/@PV@/${PV}/" -i setup.py || die "sed setup.py failed"
}
do_xsltproc_command() {
# Taken from meson.build for manual manpage building - keep in sync (also copied to dev-util/glib-utils)
xsltproc \
--nonet \
--stringparam man.output.quietly 1 \
--stringparam funcsynopsis.style ansi \
--stringparam man.th.extra1.suppress 1 \
--stringparam man.authors.section.enabled 0 \
--stringparam man.copyright.section.enabled 0 \
-o "${2}" \
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
"${1}" || die "manpage generation failed"
}
src_compile() {
distutils-r1_src_compile
rst2man \
"${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.rst" \
"${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.1"
}
src_test() {
einfo "Skipping tests. This package is tested by dev-libs/glib"
einfo "when merged with FEATURES=test"
}
python_install_all() {
distutils-r1_python_install_all # no-op, but prevents QA warning
doman "${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.1"
}

View File

@ -1,78 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
GNOME_ORG_MODULE="glib"
PYTHON_COMPAT=( python3_{10..13} )
PYTHON_REQ_USE="xml(+)"
DISTUTILS_USE_PEP517=setuptools
DISTUTILS_SINGLE_IMPL=1
inherit gnome.org distutils-r1
DESCRIPTION="GDBus code and documentation generator"
HOMEPAGE="https://www.gtk.org/"
S="${WORKDIR}/glib-${PV}/gio/gdbus-2.0/codegen"
LICENSE="LGPL-2+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
RDEPEND="
${PYTHON_DEPS}
>=dev-libs/glib-${PV}
"
DEPEND="${RDEPEND}"
BDEPEND="
dev-libs/libxslt
app-text/docbook-xsl-stylesheets
>=dev-python/docutils-0.21.1
"
python_prepare_all() {
PATCHES=(
"${FILESDIR}/${PN}-2.56.1-sitedir.patch"
)
distutils-r1_python_prepare_all
local MAJOR_VERSION=$(ver_cut 1)
local MINOR_VERSION=$(ver_cut 2)
sed -e 's:@PYTHON@:python:' gdbus-codegen.in > gdbus-codegen || die
sed -e "s:@VERSION@:${PV}:" \
-e "s:@MAJOR_VERSION@:${MAJOR_VERSION}:" \
-e "s:@MINOR_VERSION@:${MINOR_VERSION}:" config.py.in > config.py || die
cp "${FILESDIR}/setup.py-2.32.4" setup.py || die "cp failed"
sed -e "s/@PV@/${PV}/" -i setup.py || die "sed setup.py failed"
}
do_xsltproc_command() {
# Taken from meson.build for manual manpage building - keep in sync (also copied to dev-util/glib-utils)
xsltproc \
--nonet \
--stringparam man.output.quietly 1 \
--stringparam funcsynopsis.style ansi \
--stringparam man.th.extra1.suppress 1 \
--stringparam man.authors.section.enabled 0 \
--stringparam man.copyright.section.enabled 0 \
-o "${2}" \
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
"${1}" || die "manpage generation failed"
}
src_compile() {
distutils-r1_src_compile
rst2man \
"${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.rst" \
"${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.1"
}
src_test() {
einfo "Skipping tests. This package is tested by dev-libs/glib"
einfo "when merged with FEATURES=test"
}
python_install_all() {
distutils-r1_python_install_all # no-op, but prevents QA warning
doman "${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.1"
}

View File

@ -1,78 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
GNOME_ORG_MODULE="glib"
PYTHON_COMPAT=( python3_{10..13} )
PYTHON_REQ_USE="xml(+)"
DISTUTILS_USE_PEP517=setuptools
DISTUTILS_SINGLE_IMPL=1
inherit gnome.org distutils-r1
DESCRIPTION="GDBus code and documentation generator"
HOMEPAGE="https://www.gtk.org/"
S="${WORKDIR}/glib-${PV}/gio/gdbus-2.0/codegen"
LICENSE="LGPL-2+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
RDEPEND="
${PYTHON_DEPS}
>=dev-libs/glib-${PV}
"
DEPEND="${RDEPEND}"
BDEPEND="
dev-libs/libxslt
app-text/docbook-xsl-stylesheets
>=dev-python/docutils-0.21.1
"
python_prepare_all() {
PATCHES=(
"${FILESDIR}/${PN}-2.56.1-sitedir.patch"
)
distutils-r1_python_prepare_all
local MAJOR_VERSION=$(ver_cut 1)
local MINOR_VERSION=$(ver_cut 2)
sed -e 's:@PYTHON@:python:' gdbus-codegen.in > gdbus-codegen || die
sed -e "s:@VERSION@:${PV}:" \
-e "s:@MAJOR_VERSION@:${MAJOR_VERSION}:" \
-e "s:@MINOR_VERSION@:${MINOR_VERSION}:" config.py.in > config.py || die
cp "${FILESDIR}/setup.py-2.32.4" setup.py || die "cp failed"
sed -e "s/@PV@/${PV}/" -i setup.py || die "sed setup.py failed"
}
do_xsltproc_command() {
# Taken from meson.build for manual manpage building - keep in sync (also copied to dev-util/glib-utils)
xsltproc \
--nonet \
--stringparam man.output.quietly 1 \
--stringparam funcsynopsis.style ansi \
--stringparam man.th.extra1.suppress 1 \
--stringparam man.authors.section.enabled 0 \
--stringparam man.copyright.section.enabled 0 \
-o "${2}" \
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
"${1}" || die "manpage generation failed"
}
src_compile() {
distutils-r1_src_compile
rst2man \
"${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.rst" \
"${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.1"
}
src_test() {
einfo "Skipping tests. This package is tested by dev-libs/glib"
einfo "when merged with FEATURES=test"
}
python_install_all() {
distutils-r1_python_install_all # no-op, but prevents QA warning
doman "${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.1"
}

View File

@ -1,78 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
GNOME_ORG_MODULE="glib"
PYTHON_COMPAT=( python3_{11..14} )
PYTHON_REQ_USE="xml(+)"
DISTUTILS_USE_PEP517=setuptools
DISTUTILS_SINGLE_IMPL=1
inherit gnome.org distutils-r1
DESCRIPTION="GDBus code and documentation generator"
HOMEPAGE="https://www.gtk.org/"
S="${WORKDIR}/glib-${PV}/gio/gdbus-2.0/codegen"
LICENSE="LGPL-2+"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
RDEPEND="
${PYTHON_DEPS}
>=dev-libs/glib-${PV}
"
DEPEND="${RDEPEND}"
BDEPEND="
dev-libs/libxslt
app-text/docbook-xsl-stylesheets
>=dev-python/docutils-0.21.1
"
python_prepare_all() {
PATCHES=(
"${FILESDIR}/${PN}-2.56.1-sitedir.patch"
)
distutils-r1_python_prepare_all
local MAJOR_VERSION=$(ver_cut 1)
local MINOR_VERSION=$(ver_cut 2)
sed -e 's:@PYTHON@:python:' gdbus-codegen.in > gdbus-codegen || die
sed -e "s:@VERSION@:${PV}:" \
-e "s:@MAJOR_VERSION@:${MAJOR_VERSION}:" \
-e "s:@MINOR_VERSION@:${MINOR_VERSION}:" config.py.in > config.py || die
cp "${FILESDIR}/setup.py-2.32.4" setup.py || die "cp failed"
sed -e "s/@PV@/${PV}/" -i setup.py || die "sed setup.py failed"
}
do_xsltproc_command() {
# Taken from meson.build for manual manpage building - keep in sync (also copied to dev-util/glib-utils)
xsltproc \
--nonet \
--stringparam man.output.quietly 1 \
--stringparam funcsynopsis.style ansi \
--stringparam man.th.extra1.suppress 1 \
--stringparam man.authors.section.enabled 0 \
--stringparam man.copyright.section.enabled 0 \
-o "${2}" \
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
"${1}" || die "manpage generation failed"
}
src_compile() {
distutils-r1_src_compile
rst2man \
"${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.rst" \
"${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.1"
}
src_test() {
einfo "Skipping tests. This package is tested by dev-libs/glib"
einfo "when merged with FEATURES=test"
}
python_install_all() {
distutils-r1_python_install_all # no-op, but prevents QA warning
doman "${WORKDIR}/glib-${PV}/docs/reference/gio/gdbus-codegen.1"
}

View File

@ -1,8 +1,3 @@
DIST glib-2.78.6.tar.xz 5344808 BLAKE2B d16173794c4aa019459cf8c8c84d4107fb8393828f41ec6c631b9452890f34f9022ed848a543ed134fdb8a575faef6b941cea3e05de512eb1b7a99f7601a2485 SHA512 8d75f8fd77b6309215ca86a0c7648878efe11051f18b279840c137669017ea4066388f8682367e4ea3f154333d833c9dc28ccd4a66a91f0c3854a40a2838f8da
DIST glib-2.80.5.tar.xz 5538308 BLAKE2B 3f17ff85a85d20858b69c2dccc1e5d6ffd92661a8cfda8b8770dd391861999ff3381008f4fe382e90f0a7798fe218debda7f559f6e3ac8f9305e3be98b879969 SHA512 c9cc9f99e217fd950810fcfbfa7300c7850cae4dbfbabc03cdcadb6dcca2e51ea7979ceb68c09d8e9776fd1c04db73b89b81f748c8bd911e1f7ad9f704dff172
DIST glib-2.82.5.tar.xz 5554704 BLAKE2B e7853034be1137f8b793483df9e9ce1465dd10a990eb9b3cb9ac76c9f8f86ccc6fda85645b04b35963b28c33e0f6c02df4f3d03e06cc278b8515e588d6bd05f6 SHA512 a6b035c32a42b9d6f4c031a29da405848002619654b58c9205f2f78dbb9698cd5866f31ab213adc04aa214d2c48840a9592c0a1e9201e6851ebd435635f393ae
DIST glib-2.84.0.tar.xz 5613328 BLAKE2B a482076d6b0c82824179094974110dbd10d47fce93f84f4626d0d3dbea528602c41ac4a7ab8feedc3d7cc5e404ef8bef30c6c744b6f0f4f3a764644e28210e28 SHA512 72b85e30c535c5da7d8598d1cec02b1b481c467e612dbb396a0a64ad1d37cf2f1802c6fa576885c99cf8a22f4f0fc7dfdf42a3f32f7f40394f72db588fdbebb7
DIST glib-2.84.1.tar.xz 5615396 BLAKE2B d20ade482eb95873adaefc656e22c57e6712a6263a4812e448220040e30144919331cb279566a89a2ab46495b46d6a79e3821e491317587325fa3a64b40d62cc SHA512 ee7f38a4726fd72e41ddb75c4933c7b1bb30935bb2fddc84902d0627a836af512534195132cc02e3d15f168fefc816576181a8d6e436472b582191437b79a456
DIST glib-2.84.2.tar.xz 5617588 BLAKE2B 31592cbeca58f03c138a02b0cd953b6bd2cdcbfa39283241affd1bff439d6376f0420b4b715856963c64903f3646cf89890f709f514a85d93fb3bbe26b99d516 SHA512 430928d7d7a442fc3927ca943f2569035fe8768768a0ebc6720ae1ef152b56fc5f8d4215d21b4828cc2f39a8632c907ed2c52a0c8566da1c533a2e049a1a121f
DIST glib-2.84.3.tar.xz 5615704 BLAKE2B 48444b91be68530de05667e2e009dcdc63af2f95cc978a461d930b943772e52b6c9d0e797aea3a9a5713758f22ee60a190c7d601b170c6c853fce624e5c327d7 SHA512 73f2d67d2ef5b4dc8cd2f6df9ce7903853ec619924e2927adbc73d706974a7d660afea55be18e12ccb0dee1145cf4149b743278d2b128fd466e3df2bbf90ef57
DIST glib-2.84.4.tar.xz 5618200 BLAKE2B 5faee382433085cd598545a99e2e95ce430be4ac5ca10106b70f2404ddacf328f4223bc092a23025f9bf8b936619a88a9dfb220674a07e9250cf4213c6213be9 SHA512 2de9b2f7376c0e5f6ee585087090675d597c474199a10d04aad18df688b6ca77d17e93a86ec07482898663f51c82121992272496318138f77ca5ad2c340a4bd3

View File

@ -1,62 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..13} )
GNOME_ORG_MODULE="glib"
inherit gnome.org python-single-r1
DESCRIPTION="Build utilities for GLib using projects"
HOMEPAGE="https://www.gtk.org/"
LICENSE="LGPL-2.1+"
SLOT="0" # /usr/bin utilities that can't be parallel installed by their nature
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
RDEPEND="${PYTHON_DEPS}"
DEPEND="${RDEPEND}"
BDEPEND="
dev-libs/libxslt
app-text/docbook-xsl-stylesheets
"
src_configure() { :; }
do_xsltproc_command() {
# Taken from meson.build for manual manpage building - keep in sync (also copied to dev-util/gdbus-codegen)
xsltproc \
--nonet \
--stringparam man.output.quietly 1 \
--stringparam funcsynopsis.style ansi \
--stringparam man.th.extra1.suppress 1 \
--stringparam man.authors.section.enabled 0 \
--stringparam man.copyright.section.enabled 0 \
-o "${2}" \
http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
"${1}" || die "manpage generation failed"
}
src_compile() {
sed -e "s:@VERSION@:${PV}:g;s:@PYTHON@:python:g" gobject/glib-genmarshal.in > gobject/glib-genmarshal || die
sed -e "s:@VERSION@:${PV}:g;s:@PYTHON@:python:g" gobject/glib-mkenums.in > gobject/glib-mkenums || die
sed -e "s:@GLIB_VERSION@:${PV}:g;s:@PYTHON@:python:g" glib/gtester-report.in > glib/gtester-report || die
do_xsltproc_command docs/reference/gobject/glib-genmarshal.xml docs/reference/gobject/glib-genmarshal.1
do_xsltproc_command docs/reference/gobject/glib-mkenums.xml docs/reference/gobject/glib-mkenums.1
do_xsltproc_command docs/reference/glib/gtester-report.xml docs/reference/glib/gtester-report.1
}
src_install() {
python_fix_shebang gobject/glib-genmarshal
python_fix_shebang gobject/glib-mkenums
python_fix_shebang glib/gtester-report
exeinto /usr/bin
doexe gobject/glib-genmarshal
doexe gobject/glib-mkenums
doexe glib/gtester-report
doman docs/reference/gobject/glib-genmarshal.1
doman docs/reference/gobject/glib-mkenums.1
doman docs/reference/glib/gtester-report.1
}

View File

@ -1,53 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..13} )
GNOME_ORG_MODULE="glib"
inherit gnome.org python-single-r1
DESCRIPTION="Build utilities for GLib using projects"
HOMEPAGE="https://www.gtk.org/"
LICENSE="LGPL-2.1+"
SLOT="0" # /usr/bin utilities that can't be parallel installed by their nature
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
RDEPEND="${PYTHON_DEPS}"
DEPEND="${RDEPEND}"
BDEPEND="
>=dev-python/docutils-0.21.1
"
src_configure() { :; }
do_rst2man_command() {
rst2man \
--syntax-highlight=none \
"${1}" "${2}" || die "manpage generation failed"
}
src_compile() {
sed -e "s:@VERSION@:${PV}:g;s:@PYTHON@:python:g" gobject/glib-genmarshal.in > gobject/glib-genmarshal || die
sed -e "s:@VERSION@:${PV}:g;s:@PYTHON@:python:g" gobject/glib-mkenums.in > gobject/glib-mkenums || die
sed -e "s:@GLIB_VERSION@:${PV}:g;s:@PYTHON@:python:g" glib/gtester-report.in > glib/gtester-report || die
do_rst2man_command docs/reference/gobject/glib-genmarshal.rst docs/reference/gobject/glib-genmarshal.1
do_rst2man_command docs/reference/gobject/glib-mkenums.rst docs/reference/gobject/glib-mkenums.1
do_rst2man_command docs/reference/glib/gtester-report.rst docs/reference/glib/gtester-report.1
}
src_install() {
python_fix_shebang gobject/glib-genmarshal
python_fix_shebang gobject/glib-mkenums
python_fix_shebang glib/gtester-report
exeinto /usr/bin
doexe gobject/glib-genmarshal
doexe gobject/glib-mkenums
doexe glib/gtester-report
doman docs/reference/gobject/glib-genmarshal.1
doman docs/reference/gobject/glib-mkenums.1
doman docs/reference/glib/gtester-report.1
}

View File

@ -1,53 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..13} )
GNOME_ORG_MODULE="glib"
inherit gnome.org python-single-r1
DESCRIPTION="Build utilities for GLib using projects"
HOMEPAGE="https://www.gtk.org/"
LICENSE="LGPL-2.1+"
SLOT="0" # /usr/bin utilities that can't be parallel installed by their nature
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
RDEPEND="${PYTHON_DEPS}"
DEPEND="${RDEPEND}"
BDEPEND="
>=dev-python/docutils-0.21.1
"
src_configure() { :; }
do_rst2man_command() {
rst2man \
--syntax-highlight=none \
"${1}" "${2}" || die "manpage generation failed"
}
src_compile() {
sed -e "s:@VERSION@:${PV}:g;s:@PYTHON@:python:g" gobject/glib-genmarshal.in > gobject/glib-genmarshal || die
sed -e "s:@VERSION@:${PV}:g;s:@PYTHON@:python:g" gobject/glib-mkenums.in > gobject/glib-mkenums || die
sed -e "s:@GLIB_VERSION@:${PV}:g;s:@PYTHON@:python:g" glib/gtester-report.in > glib/gtester-report || die
do_rst2man_command docs/reference/gobject/glib-genmarshal.rst docs/reference/gobject/glib-genmarshal.1
do_rst2man_command docs/reference/gobject/glib-mkenums.rst docs/reference/gobject/glib-mkenums.1
do_rst2man_command docs/reference/glib/gtester-report.rst docs/reference/glib/gtester-report.1
}
src_install() {
python_fix_shebang gobject/glib-genmarshal
python_fix_shebang gobject/glib-mkenums
python_fix_shebang glib/gtester-report
exeinto /usr/bin
doexe gobject/glib-genmarshal
doexe gobject/glib-mkenums
doexe glib/gtester-report
doman docs/reference/gobject/glib-genmarshal.1
doman docs/reference/gobject/glib-mkenums.1
doman docs/reference/glib/gtester-report.1
}

View File

@ -1,53 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..13} )
GNOME_ORG_MODULE="glib"
inherit gnome.org python-single-r1
DESCRIPTION="Build utilities for GLib using projects"
HOMEPAGE="https://www.gtk.org/"
LICENSE="LGPL-2.1+"
SLOT="0" # /usr/bin utilities that can't be parallel installed by their nature
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
RDEPEND="${PYTHON_DEPS}"
DEPEND="${RDEPEND}"
BDEPEND="
>=dev-python/docutils-0.21.1
"
src_configure() { :; }
do_rst2man_command() {
rst2man \
--syntax-highlight=none \
"${1}" "${2}" || die "manpage generation failed"
}
src_compile() {
sed -e "s:@VERSION@:${PV}:g;s:@PYTHON@:python:g" gobject/glib-genmarshal.in > gobject/glib-genmarshal || die
sed -e "s:@VERSION@:${PV}:g;s:@PYTHON@:python:g" gobject/glib-mkenums.in > gobject/glib-mkenums || die
sed -e "s:@GLIB_VERSION@:${PV}:g;s:@PYTHON@:python:g" glib/gtester-report.in > glib/gtester-report || die
do_rst2man_command docs/reference/gobject/glib-genmarshal.rst docs/reference/gobject/glib-genmarshal.1
do_rst2man_command docs/reference/gobject/glib-mkenums.rst docs/reference/gobject/glib-mkenums.1
do_rst2man_command docs/reference/glib/gtester-report.rst docs/reference/glib/gtester-report.1
}
src_install() {
python_fix_shebang gobject/glib-genmarshal
python_fix_shebang gobject/glib-mkenums
python_fix_shebang glib/gtester-report
exeinto /usr/bin
doexe gobject/glib-genmarshal
doexe gobject/glib-mkenums
doexe glib/gtester-report
doman docs/reference/gobject/glib-genmarshal.1
doman docs/reference/gobject/glib-mkenums.1
doman docs/reference/glib/gtester-report.1
}

View File

@ -1,53 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..14} )
GNOME_ORG_MODULE="glib"
inherit gnome.org python-single-r1
DESCRIPTION="Build utilities for GLib using projects"
HOMEPAGE="https://www.gtk.org/"
LICENSE="LGPL-2.1+"
SLOT="0" # /usr/bin utilities that can't be parallel installed by their nature
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
RDEPEND="${PYTHON_DEPS}"
DEPEND="${RDEPEND}"
BDEPEND="
>=dev-python/docutils-0.21.1
"
src_configure() { :; }
do_rst2man_command() {
rst2man \
--syntax-highlight=none \
"${1}" "${2}" || die "manpage generation failed"
}
src_compile() {
sed -e "s:@VERSION@:${PV}:g;s:@PYTHON@:python:g" gobject/glib-genmarshal.in > gobject/glib-genmarshal || die
sed -e "s:@VERSION@:${PV}:g;s:@PYTHON@:python:g" gobject/glib-mkenums.in > gobject/glib-mkenums || die
sed -e "s:@GLIB_VERSION@:${PV}:g;s:@PYTHON@:python:g" glib/gtester-report.in > glib/gtester-report || die
do_rst2man_command docs/reference/gobject/glib-genmarshal.rst docs/reference/gobject/glib-genmarshal.1
do_rst2man_command docs/reference/gobject/glib-mkenums.rst docs/reference/gobject/glib-mkenums.1
do_rst2man_command docs/reference/glib/gtester-report.rst docs/reference/glib/gtester-report.1
}
src_install() {
python_fix_shebang gobject/glib-genmarshal
python_fix_shebang gobject/glib-mkenums
python_fix_shebang glib/gtester-report
exeinto /usr/bin
doexe gobject/glib-genmarshal
doexe gobject/glib-mkenums
doexe glib/gtester-report
doman docs/reference/gobject/glib-genmarshal.1
doman docs/reference/gobject/glib-mkenums.1
doman docs/reference/glib/gtester-report.1
}

View File

@ -12,7 +12,7 @@ if [[ ${PV} == *9999 ]] ; then
https://github.com/pkgcore/pkgcheck.git"
inherit git-r3
else
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-macos"
inherit pypi
fi

View File

@ -22,7 +22,7 @@ else
https://netfilter.org/projects/nftables/files/${P}.tar.xz
verify-sig? ( https://netfilter.org/projects/nftables/files/${P}.tar.xz.sig )
"
KEYWORDS="amd64 arm arm64 ~hppa ~loong ~mips ppc ~ppc64 ~riscv ~sparc x86"
KEYWORDS="amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-netfilter-20240415 )"
fi

View File

@ -1,3 +1,6 @@
DIST samba-4.20.8.tar.gz 42531989 BLAKE2B 4c8d6d4fe40c0640667089179af5a8a49e6117fcd46b735ac59ffad0334e7fddffb99d2204c30d272a1902b8bf22bc9dc10a7b58762642977f0aec25acb91a57 SHA512 1dc598cb3aa830d35985e5840f1956d48b93eef02805248ececd0eb472b514311a9f6e69798bb5f5735a845b6e1c8de84b4ecaff6dea7a61324202d6fb0b3eeb
DIST samba-4.21.7.tar.gz 42689509 BLAKE2B c7cfdab05402f0df38c1a643126072fdaf4d031e339e171180009ecaf9de7d06c490f344b2eea6ccec1021ecbf84aabe5c0d9b2718ab461f95502ce52dd1ffbc SHA512 f44a0dc880b2a5694f9c46ff11c808ae263f68c91cc9b0e32869bb44f84c1fdcc49370a396f38e0f452133c29357d8ad80a689af67bd85f648b2121e7792b555
DIST samba-4.21.8.tar.gz 42696867 BLAKE2B b86d9a5f2ae072b50555757d97241ff48d2a1155323da43c70a6f809a1fb2e303077d414b6614ca1740e06b4f613d1754860eeed043d65afc77cf1ecf2fc823f SHA512 194d89f2df2513b9e7e84b2b2554c8f553f6115ba98d3b3dee3efced33cbce74c9b4fac119625a4b772a516ab3fcb21595e1bd2e6f9bf3d162b25f6bb25b6dce
DIST samba-4.22.3.tar.gz 42869744 BLAKE2B 9ad02f617df307d6a7e0f88d030a4e3884d221ad2862f42af0cf8fb7cc595578fea9ce210b4bad2521634bd3b9752a58a077905f82ce5e9ef4eb8331a8044efc SHA512 5fe79857c9c21d13912bd4f937ec00ad885d4b53d814265428916578927615f3d4a2fe921df88960e6651cd78b202734fee58ff38f6fb7fbffdfe8f129bcf59a
DIST samba-4.22.4.tar.gz 42873748 BLAKE2B c2d239f2d62f450fbef84ceee1077201c0fca926cc97e99527d4bff07ff11a815a4167ca270afd04af4257759bcc1e003493bfcfd9e552e9410d426921341c8c SHA512 4a4ef586bc6d8fa5984d87814022a35988afaf4ee0aebaf023c4a1debfec4215525e886efe2efd4647a4374855d8cd15c6fc919de84454847206d558fcd21ea2
DIST samba-4.23.0.tar.gz 43320412 BLAKE2B e4787045dd85dce9e03b18d04d09ed1c3adae01f13545e99c2d84af8855f42f716bb256d8eee2830164f2fd59c7386f1547f4ec45504edc3c80470b27fe05ab4 SHA512 b95504c28b7773db792f9bc895644efc8027ec7724beca6435f2ba5a862eda3023551528275ec23aae9ad580d42350015d8851757b9ea54d099321fe8a31fe8c

View File

@ -0,0 +1,387 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..13} )
PYTHON_REQ_USE="threads(+),xml(+)"
inherit python-single-r1 flag-o-matic waf-utils multilib-minimal linux-info systemd pam tmpfiles
DESCRIPTION="Samba Suite Version 4"
HOMEPAGE="https://samba.org/"
MY_PV="${PV/_rc/rc}"
MY_P="${PN}-${MY_PV}"
if [[ ${PV} == *_rc* ]]; then
SRC_URI="https://download.samba.org/pub/samba/rc/${MY_P}.tar.gz"
else
SRC_URI="https://download.samba.org/pub/samba/stable/${MY_P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
S="${WORKDIR}/${MY_P}"
LICENSE="GPL-3"
SLOT="0/2.10.0"
IUSE="acl addc ads ceph client cluster cups debug fam glusterfs gpg"
IUSE+=" iprint json ldap llvm-libunwind lmdb pam profiling-data python quota"
IUSE+=" +regedit selinux snapper spotlight syslog system-heimdal +system-mitkrb5"
IUSE+=" systemd test unwind winbind zeroconf"
# ldap needs ads (bug #941578)
REQUIRED_USE="${PYTHON_REQUIRED_USE}
addc? ( json python !system-mitkrb5 winbind )
ads? ( acl ldap python winbind )
cluster? ( ads )
gpg? ( addc )
ldap? ( ads )
spotlight? ( json )
test? ( python )
!ads? ( !addc )
?? ( system-heimdal system-mitkrb5 )
"
# the test suite is messed, it uses system-installed samba
# bits instead of what was built, tests things disabled via use
# flags, and generally just fails to work in a way ebuilds could
# rely on in its current state
RESTRICT="test"
MULTILIB_WRAPPED_HEADERS=(
/usr/include/samba-4.0/policy.h
/usr/include/samba-4.0/dcerpc_server.h
/usr/include/samba-4.0/ctdb.h
/usr/include/samba-4.0/ctdb_client.h
/usr/include/samba-4.0/ctdb_protocol.h
/usr/include/samba-4.0/ctdb_private.h
/usr/include/samba-4.0/ctdb_typesafe_cb.h
/usr/include/samba-4.0/ctdb_version.h
)
TALLOC_VERSION="2.4.2"
TDB_VERSION="1.4.12"
TEVENT_VERSION="0.16.1"
COMMON_DEPEND="
>=app-arch/libarchive-3.1.2:=[${MULTILIB_USEDEP}]
dev-lang/perl:=
dev-libs/icu:=[${MULTILIB_USEDEP}]
dev-libs/libbsd[${MULTILIB_USEDEP}]
dev-libs/libtasn1:=[${MULTILIB_USEDEP}]
dev-libs/popt[${MULTILIB_USEDEP}]
dev-perl/Parse-Yapp
>=net-libs/gnutls-3.4.7:=[${MULTILIB_USEDEP}]
>=sys-fs/e2fsprogs-1.46.4-r51[${MULTILIB_USEDEP}]
!sys-libs/ldb
sys-libs/libcap[${MULTILIB_USEDEP}]
sys-libs/liburing:=[${MULTILIB_USEDEP}]
sys-libs/ncurses:=
sys-libs/readline:=
>=sys-libs/talloc-${TALLOC_VERSION}[${MULTILIB_USEDEP}]
>=sys-libs/tdb-${TDB_VERSION}[${MULTILIB_USEDEP}]
>=sys-libs/tevent-${TEVENT_VERSION}[${MULTILIB_USEDEP}]
sys-libs/zlib[${MULTILIB_USEDEP}]
virtual/libcrypt:=[${MULTILIB_USEDEP}]
virtual/libiconv
$(python_gen_cond_dep '
addc? (
dev-python/dnspython:=[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
)
ads? (
dev-python/dnspython:=[${PYTHON_USEDEP}]
net-dns/bind[gssapi]
)
')
acl? ( virtual/acl )
ceph? ( sys-cluster/ceph )
cluster? ( net-libs/rpcsvc-proto )
cups? ( net-print/cups )
debug? ( dev-util/lttng-ust )
fam? ( virtual/fam )
gpg? ( app-crypt/gpgme:= )
json? ( dev-libs/jansson:= )
ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
lmdb? ( >=dev-db/lmdb-0.9.16:=[${MULTILIB_USEDEP}] )
pam? ( sys-libs/pam )
python? (
sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}]
sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}]
sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
)
snapper? ( sys-apps/dbus )
system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl(-),${MULTILIB_USEDEP}] )
system-mitkrb5? ( >=app-crypt/mit-krb5-1.19[${MULTILIB_USEDEP}] )
!system-heimdal? ( !system-mitkrb5? ( sys-apps/keyutils[${MULTILIB_USEDEP}] ) )
systemd? ( sys-apps/systemd:= )
unwind? (
llvm-libunwind? ( llvm-runtimes/libunwind:= )
!llvm-libunwind? ( sys-libs/libunwind:= )
)
zeroconf? ( net-dns/avahi[dbus] )
"
DEPEND="${COMMON_DEPEND}
dev-perl/JSON
net-libs/libtirpc[${MULTILIB_USEDEP}]
net-libs/rpcsvc-proto
spotlight? ( dev-libs/glib )
test? (
>=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
$(python_gen_cond_dep "dev-python/python-subunit[\${PYTHON_USEDEP},${MULTILIB_USEDEP}]" )
!system-mitkrb5? (
>=net-dns/resolv_wrapper-1.1.4
>=net-libs/socket_wrapper-1.1.9
>=sys-libs/nss_wrapper-1.1.3
>=sys-libs/uid_wrapper-1.2.1
)
)"
RDEPEND="${COMMON_DEPEND}
client? ( net-fs/cifs-utils[ads?] )
python? ( ${PYTHON_DEPS} )
selinux? ( sec-policy/selinux-samba )
"
BDEPEND="${PYTHON_DEPS}
app-text/docbook-xsl-stylesheets
dev-libs/libxslt
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${PN}-4.18.4-pam.patch
"${FILESDIR}"/ldb-2.5.2-skip-wav-tevent-check.patch
)
CONFDIR="${FILESDIR}/4.4"
WAF_BINARY="${S}/buildtools/bin/waf"
SHAREDMODS=""
pkg_setup() {
# Package fails to build with distcc
export DISTCC_DISABLE=1
export PYTHONHASHSEED=1
python-single-r1_pkg_setup
SHAREDMODS="$(usev !snapper '!')vfs_snapper"
if use cluster ; then
SHAREDMODS+=",idmap_rid,idmap_tdb2,idmap_ad"
elif use ads ; then
SHAREDMODS+=",idmap_ad"
fi
}
check_samba_dep_versions() {
actual_talloc_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/talloc/wscript || die)
if [[ ${actual_talloc_version} != ${TALLOC_VERSION} ]] ; then
eerror "Source talloc version: ${TALLOC_VERSION}"
eerror "Ebuild talloc version: ${actual_talloc_version}"
die "Ebuild needs to fix TALLOC_VERSION!"
fi
actual_tdb_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tdb/wscript || die)
if [[ ${actual_tdb_version} != ${TDB_VERSION} ]] ; then
eerror "Source tdb version: ${TDB_VERSION}"
eerror "Ebuild tdb version: ${actual_tdb_version}"
die "Ebuild needs to fix TDB_VERSION!"
fi
actual_tevent_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tevent/wscript || die)
if [[ ${actual_tevent_version} != ${TEVENT_VERSION} ]] ; then
eerror "Source tevent version: ${TEVENT_VERSION}"
eerror "Ebuild tevent version: ${actual_tevent_version}"
die "Ebuild needs to fix TEVENT_VERSION!"
fi
}
src_prepare() {
default
check_samba_dep_versions
# Unbundle dnspython
sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
# Unbundle iso8601 unless tests are enabled
if ! use test ; then
sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
fi
# Ugly hackaround for bug #592502
#cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
# bug #943942
append-cflags -std=gnu17
# WAF
multilib_copy_sources
}
multilib_src_configure() {
# When specifying libs for samba build you must append NONE to the end to
# stop it automatically including things
local bundled_libs="NONE"
if ! use system-heimdal && ! use system-mitkrb5 ; then
bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
fi
# We "use" bundled cmocka when we're not running tests as we're
# not using it anyway. Means we avoid making users install it for
# no reason. bug #802531
if ! use test ; then
bundled_libs="cmocka,${bundled_libs}"
fi
# bug #874633
if use llvm-libunwind ; then
mkdir -p "${T}"/${ABI}/pkgconfig || die
local -x PKG_CONFIG_PATH="${T}/${ABI}/pkgconfig:${PKG_CONFIG_PATH}"
cat <<-EOF > "${T}"/${ABI}/pkgconfig/libunwind-generic.pc || die
exec_prefix=\${prefix}
libdir=/usr/$(get_libdir)
includedir=\${prefix}/include
Name: libunwind-generic
Description: libunwind generic library
Version: 1.70
Libs: -L\${libdir} -lunwind
Cflags: -I\${includedir}
EOF
fi
local myconf=(
--enable-fhs
--sysconfdir="${EPREFIX}/etc"
--localstatedir="${EPREFIX}/var"
--with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
--with-piddir="${EPREFIX}/run/${PN}"
--bundled-libraries="${bundled_libs}"
--builtin-libraries=NONE
--disable-rpath
--disable-rpath-install
--nopyc
--nopyo
--without-winexe
$(multilib_native_use_with acl acl-support)
$(multilib_native_usex addc '' '--without-ad-dc')
$(multilib_native_use_enable ceph cephfs)
$(multilib_native_use_with cluster cluster-support)
$(multilib_native_use_enable cups)
--without-dmapi
$(multilib_native_use_with fam)
$(multilib_native_use_enable glusterfs)
$(multilib_native_use_with gpg gpgme)
$(multilib_native_use_with json)
$(multilib_native_use_enable iprint)
$(multilib_native_use_with pam)
$(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
$(multilib_native_use_with quota quotas)
$(multilib_native_use_with regedit)
$(multilib_native_use_enable spotlight)
$(multilib_native_use_with syslog)
$(multilib_native_use_with systemd)
--systemd-install-services
--with-systemddir="$(systemd_get_systemunitdir)"
$(multilib_native_use_with unwind libunwind)
$(multilib_native_use_with winbind)
$(multilib_native_usex python '' '--disable-python')
$(multilib_native_use_enable zeroconf avahi)
$(multilib_native_usex test '--enable-selftest' '')
$(usev system-mitkrb5 "--with-system-mitkrb5 ${ESYSROOT}/usr $(multilib_native_usex addc --with-experimental-mit-ad-dc '')")
$(use_with ads)
$(use_with debug lttng)
$(use_with ldap)
$(use_with profiling-data)
--private-libraries='!ldb'
$(usex lmdb '' --without-ldb-lmdb)
# bug #683148
--jobs 1
)
if multilib_is_native_abi ; then
myconf+=( --with-shared-modules=${SHAREDMODS} )
else
myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
fi
append-cppflags "-I${ESYSROOT}/usr/include/et"
waf-utils_src_configure ${myconf[@]}
}
multilib_src_compile() {
waf-utils_src_compile
}
multilib_src_test() {
if multilib_is_native_abi ; then
"${WAF_BINARY}" test || die "Test failed"
fi
}
multilib_src_install() {
waf-utils_src_install
# Make all .so files executable
find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die
# smbspool_krb5_wrapper must only be accessible to root, bug #880739
find "${ED}" -type f -name "smbspool_krb5_wrapper" -exec chmod go-rwx {} + || die
# Remove empty runtime dirs created by build system (bug #892341)
find "${ED}"/{run,var} -type d -empty -delete || die
if multilib_is_native_abi ; then
# Install ldap schema for server (bug #491002)
if use ldap ; then
insinto /etc/openldap/schema
doins examples/LDAP/samba.schema
fi
# Create symlink for cups (bug #552310)
if use cups ; then
dosym ../../../bin/smbspool \
/usr/libexec/cups/backend/smb
fi
# Install example config file
insinto /etc/samba
doins examples/smb.conf.default
# Fix paths in example file (bug #603964)
sed \
-e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
-e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
-e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
-e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
-e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
-i "${ED}"/etc/samba/smb.conf.default || die
# Install init script and conf.d file
newinitd "${CONFDIR}/samba4.initd-r1" samba
newconfd "${CONFDIR}/samba4.confd" samba
dotmpfiles "${FILESDIR}"/samba.conf
if ! use addc ; then
rm "${D}/$(systemd_get_systemunitdir)/samba.service" \
|| die
fi
# Preserve functionality for old gentoo-specific unit names
dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service"
dosym smb.service "$(systemd_get_systemunitdir)/smbd.service"
dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service"
use python && python_optimize
fi
if use pam && use winbind ; then
newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
# bugs #376853 and #590374
insinto /etc/security
doins examples/pam_winbind/pam_winbind.conf
fi
}
pkg_postinst() {
tmpfiles_process samba.conf
}

View File

@ -16,7 +16,7 @@ if [[ ${PV} == *_rc* ]]; then
SRC_URI="https://download.samba.org/pub/samba/rc/${MY_P}.tar.gz"
else
SRC_URI="https://download.samba.org/pub/samba/stable/${MY_P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~mips ppc ppc64 ~riscv ~sparc x86"
fi
S="${WORKDIR}/${MY_P}"

View File

@ -0,0 +1,387 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..13} )
PYTHON_REQ_USE="threads(+),xml(+)"
inherit python-single-r1 flag-o-matic waf-utils multilib-minimal linux-info systemd pam tmpfiles
DESCRIPTION="Samba Suite Version 4"
HOMEPAGE="https://samba.org/"
MY_PV="${PV/_rc/rc}"
MY_P="${PN}-${MY_PV}"
if [[ ${PV} == *_rc* ]]; then
SRC_URI="https://download.samba.org/pub/samba/rc/${MY_P}.tar.gz"
else
SRC_URI="https://download.samba.org/pub/samba/stable/${MY_P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
S="${WORKDIR}/${MY_P}"
LICENSE="GPL-3"
SLOT="0/2.10.0"
IUSE="acl addc ads ceph client cluster cups debug fam glusterfs gpg"
IUSE+=" iprint json ldap llvm-libunwind lmdb pam profiling-data python quota"
IUSE+=" +regedit selinux snapper spotlight syslog system-heimdal +system-mitkrb5"
IUSE+=" systemd test unwind winbind zeroconf"
# ldap needs ads (bug #941578)
REQUIRED_USE="${PYTHON_REQUIRED_USE}
addc? ( json python !system-mitkrb5 winbind )
ads? ( acl ldap python winbind )
cluster? ( ads )
gpg? ( addc )
ldap? ( ads )
spotlight? ( json )
test? ( python )
!ads? ( !addc )
?? ( system-heimdal system-mitkrb5 )
"
# the test suite is messed, it uses system-installed samba
# bits instead of what was built, tests things disabled via use
# flags, and generally just fails to work in a way ebuilds could
# rely on in its current state
RESTRICT="test"
MULTILIB_WRAPPED_HEADERS=(
/usr/include/samba-4.0/policy.h
/usr/include/samba-4.0/dcerpc_server.h
/usr/include/samba-4.0/ctdb.h
/usr/include/samba-4.0/ctdb_client.h
/usr/include/samba-4.0/ctdb_protocol.h
/usr/include/samba-4.0/ctdb_private.h
/usr/include/samba-4.0/ctdb_typesafe_cb.h
/usr/include/samba-4.0/ctdb_version.h
)
TALLOC_VERSION="2.4.3"
TDB_VERSION="1.4.13"
TEVENT_VERSION="0.16.2"
COMMON_DEPEND="
>=app-arch/libarchive-3.1.2:=[${MULTILIB_USEDEP}]
dev-lang/perl:=
dev-libs/icu:=[${MULTILIB_USEDEP}]
dev-libs/libbsd[${MULTILIB_USEDEP}]
dev-libs/libtasn1:=[${MULTILIB_USEDEP}]
dev-libs/popt[${MULTILIB_USEDEP}]
dev-perl/Parse-Yapp
>=net-libs/gnutls-3.4.7:=[${MULTILIB_USEDEP}]
>=sys-fs/e2fsprogs-1.46.4-r51[${MULTILIB_USEDEP}]
!sys-libs/ldb
sys-libs/libcap[${MULTILIB_USEDEP}]
sys-libs/liburing:=[${MULTILIB_USEDEP}]
sys-libs/ncurses:=
sys-libs/readline:=
>=sys-libs/talloc-${TALLOC_VERSION}[${MULTILIB_USEDEP}]
>=sys-libs/tdb-${TDB_VERSION}[${MULTILIB_USEDEP}]
>=sys-libs/tevent-${TEVENT_VERSION}[${MULTILIB_USEDEP}]
sys-libs/zlib[${MULTILIB_USEDEP}]
virtual/libcrypt:=[${MULTILIB_USEDEP}]
virtual/libiconv
$(python_gen_cond_dep '
addc? (
dev-python/dnspython:=[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
)
ads? (
dev-python/dnspython:=[${PYTHON_USEDEP}]
net-dns/bind[gssapi]
)
')
acl? ( virtual/acl )
ceph? ( sys-cluster/ceph )
cluster? ( net-libs/rpcsvc-proto )
cups? ( net-print/cups )
debug? ( dev-util/lttng-ust )
fam? ( virtual/fam )
gpg? ( app-crypt/gpgme:= )
json? ( dev-libs/jansson:= )
ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
lmdb? ( >=dev-db/lmdb-0.9.16:=[${MULTILIB_USEDEP}] )
pam? ( sys-libs/pam )
python? (
sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}]
sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}]
sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
)
snapper? ( sys-apps/dbus )
system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl(-),${MULTILIB_USEDEP}] )
system-mitkrb5? ( >=app-crypt/mit-krb5-1.19[${MULTILIB_USEDEP}] )
!system-heimdal? ( !system-mitkrb5? ( sys-apps/keyutils[${MULTILIB_USEDEP}] ) )
systemd? ( sys-apps/systemd:= )
unwind? (
llvm-libunwind? ( llvm-runtimes/libunwind:= )
!llvm-libunwind? ( sys-libs/libunwind:= )
)
zeroconf? ( net-dns/avahi[dbus] )
"
DEPEND="${COMMON_DEPEND}
dev-perl/JSON
net-libs/libtirpc[${MULTILIB_USEDEP}]
net-libs/rpcsvc-proto
spotlight? ( dev-libs/glib )
test? (
>=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
$(python_gen_cond_dep "dev-python/python-subunit[\${PYTHON_USEDEP},${MULTILIB_USEDEP}]" )
!system-mitkrb5? (
>=net-dns/resolv_wrapper-1.1.4
>=net-libs/socket_wrapper-1.1.9
>=sys-libs/nss_wrapper-1.1.3
>=sys-libs/uid_wrapper-1.2.1
)
)"
RDEPEND="${COMMON_DEPEND}
client? ( net-fs/cifs-utils[ads?] )
python? ( ${PYTHON_DEPS} )
selinux? ( sec-policy/selinux-samba )
"
BDEPEND="${PYTHON_DEPS}
app-text/docbook-xsl-stylesheets
dev-libs/libxslt
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${PN}-4.18.4-pam.patch
"${FILESDIR}"/ldb-2.5.2-skip-wav-tevent-check.patch
)
CONFDIR="${FILESDIR}/4.4"
WAF_BINARY="${S}/buildtools/bin/waf"
SHAREDMODS=""
pkg_setup() {
# Package fails to build with distcc
export DISTCC_DISABLE=1
export PYTHONHASHSEED=1
python-single-r1_pkg_setup
SHAREDMODS="$(usev !snapper '!')vfs_snapper"
if use cluster ; then
SHAREDMODS+=",idmap_rid,idmap_tdb2,idmap_ad"
elif use ads ; then
SHAREDMODS+=",idmap_ad"
fi
}
check_samba_dep_versions() {
actual_talloc_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/talloc/wscript || die)
if [[ ${actual_talloc_version} != ${TALLOC_VERSION} ]] ; then
eerror "Source talloc version: ${TALLOC_VERSION}"
eerror "Ebuild talloc version: ${actual_talloc_version}"
die "Ebuild needs to fix TALLOC_VERSION!"
fi
actual_tdb_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tdb/wscript || die)
if [[ ${actual_tdb_version} != ${TDB_VERSION} ]] ; then
eerror "Source tdb version: ${TDB_VERSION}"
eerror "Ebuild tdb version: ${actual_tdb_version}"
die "Ebuild needs to fix TDB_VERSION!"
fi
actual_tevent_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tevent/wscript || die)
if [[ ${actual_tevent_version} != ${TEVENT_VERSION} ]] ; then
eerror "Source tevent version: ${TEVENT_VERSION}"
eerror "Ebuild tevent version: ${actual_tevent_version}"
die "Ebuild needs to fix TEVENT_VERSION!"
fi
}
src_prepare() {
default
check_samba_dep_versions
# Unbundle dnspython
sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
# Unbundle iso8601 unless tests are enabled
if ! use test ; then
sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
fi
# Ugly hackaround for bug #592502
#cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
# bug #943942
append-cflags -std=gnu17
# WAF
multilib_copy_sources
}
multilib_src_configure() {
# When specifying libs for samba build you must append NONE to the end to
# stop it automatically including things
local bundled_libs="NONE"
if ! use system-heimdal && ! use system-mitkrb5 ; then
bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
fi
# We "use" bundled cmocka when we're not running tests as we're
# not using it anyway. Means we avoid making users install it for
# no reason. bug #802531
if ! use test ; then
bundled_libs="cmocka,${bundled_libs}"
fi
# bug #874633
if use llvm-libunwind ; then
mkdir -p "${T}"/${ABI}/pkgconfig || die
local -x PKG_CONFIG_PATH="${T}/${ABI}/pkgconfig:${PKG_CONFIG_PATH}"
cat <<-EOF > "${T}"/${ABI}/pkgconfig/libunwind-generic.pc || die
exec_prefix=\${prefix}
libdir=/usr/$(get_libdir)
includedir=\${prefix}/include
Name: libunwind-generic
Description: libunwind generic library
Version: 1.70
Libs: -L\${libdir} -lunwind
Cflags: -I\${includedir}
EOF
fi
local myconf=(
--enable-fhs
--sysconfdir="${EPREFIX}/etc"
--localstatedir="${EPREFIX}/var"
--with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
--with-piddir="${EPREFIX}/run/${PN}"
--bundled-libraries="${bundled_libs}"
--builtin-libraries=NONE
--disable-rpath
--disable-rpath-install
--nopyc
--nopyo
--without-winexe
$(multilib_native_use_with acl acl-support)
$(multilib_native_usex addc '' '--without-ad-dc')
$(multilib_native_use_enable ceph cephfs)
$(multilib_native_use_with cluster cluster-support)
$(multilib_native_use_enable cups)
--without-dmapi
$(multilib_native_use_with fam)
$(multilib_native_use_enable glusterfs)
$(multilib_native_use_with gpg gpgme)
$(multilib_native_use_with json)
$(multilib_native_use_enable iprint)
$(multilib_native_use_with pam)
$(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
$(multilib_native_use_with quota quotas)
$(multilib_native_use_with regedit)
$(multilib_native_use_enable spotlight)
$(multilib_native_use_with syslog)
$(multilib_native_use_with systemd)
--systemd-install-services
--with-systemddir="$(systemd_get_systemunitdir)"
$(multilib_native_use_with unwind libunwind)
$(multilib_native_use_with winbind)
$(multilib_native_usex python '' '--disable-python')
$(multilib_native_use_enable zeroconf avahi)
$(multilib_native_usex test '--enable-selftest' '')
$(usev system-mitkrb5 "--with-system-mitkrb5 ${ESYSROOT}/usr $(multilib_native_usex addc --with-experimental-mit-ad-dc '')")
$(use_with ads)
$(use_with debug lttng)
$(use_with ldap)
$(use_with profiling-data)
--private-libraries='!ldb'
$(usex lmdb '' --without-ldb-lmdb)
# bug #683148
--jobs 1
)
if multilib_is_native_abi ; then
myconf+=( --with-shared-modules=${SHAREDMODS} )
else
myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
fi
append-cppflags "-I${ESYSROOT}/usr/include/et"
waf-utils_src_configure ${myconf[@]}
}
multilib_src_compile() {
waf-utils_src_compile
}
multilib_src_test() {
if multilib_is_native_abi ; then
"${WAF_BINARY}" test || die "Test failed"
fi
}
multilib_src_install() {
waf-utils_src_install
# Make all .so files executable
find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die
# smbspool_krb5_wrapper must only be accessible to root, bug #880739
find "${ED}" -type f -name "smbspool_krb5_wrapper" -exec chmod go-rwx {} + || die
# Remove empty runtime dirs created by build system (bug #892341)
find "${ED}"/{run,var} -type d -empty -delete || die
if multilib_is_native_abi ; then
# Install ldap schema for server (bug #491002)
if use ldap ; then
insinto /etc/openldap/schema
doins examples/LDAP/samba.schema
fi
# Create symlink for cups (bug #552310)
if use cups ; then
dosym ../../../bin/smbspool \
/usr/libexec/cups/backend/smb
fi
# Install example config file
insinto /etc/samba
doins examples/smb.conf.default
# Fix paths in example file (bug #603964)
sed \
-e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
-e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
-e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
-e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
-e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
-i "${ED}"/etc/samba/smb.conf.default || die
# Install init script and conf.d file
newinitd "${CONFDIR}/samba4.initd-r1" samba
newconfd "${CONFDIR}/samba4.confd" samba
dotmpfiles "${FILESDIR}"/samba.conf
if ! use addc ; then
rm "${D}/$(systemd_get_systemunitdir)/samba.service" \
|| die
fi
# Preserve functionality for old gentoo-specific unit names
dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service"
dosym smb.service "$(systemd_get_systemunitdir)/smbd.service"
dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service"
use python && python_optimize
fi
if use pam && use winbind ; then
newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
# bugs #376853 and #590374
insinto /etc/security
doins examples/pam_winbind/pam_winbind.conf
fi
}
pkg_postinst() {
tmpfiles_process samba.conf
}

View File

@ -0,0 +1,390 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..13} )
PYTHON_REQ_USE="threads(+),xml(+)"
inherit python-single-r1 flag-o-matic waf-utils multilib-minimal linux-info systemd pam tmpfiles
DESCRIPTION="Samba Suite Version 4"
HOMEPAGE="https://samba.org/"
MY_PV="${PV/_rc/rc}"
MY_P="${PN}-${MY_PV}"
if [[ ${PV} == *_rc* ]]; then
SRC_URI="https://download.samba.org/pub/samba/rc/${MY_P}.tar.gz"
else
SRC_URI="https://download.samba.org/pub/samba/stable/${MY_P}.tar.gz"
KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
fi
S="${WORKDIR}/${MY_P}"
LICENSE="GPL-3"
SLOT="0/2.11.0"
IUSE="acl addc ads ceph client cluster cups debug fam glusterfs gpg"
IUSE+=" iprint json ldap llvm-libunwind lmdb pam profiling-data python quota"
IUSE+=" +regedit selinux snapper spotlight syslog system-heimdal +system-mitkrb5"
IUSE+=" systemd test unwind winbind zeroconf"
# ldap needs ads (bug #941578)
REQUIRED_USE="${PYTHON_REQUIRED_USE}
addc? ( json python !system-mitkrb5 winbind )
ads? ( acl ldap python winbind )
cluster? ( ads )
gpg? ( addc )
ldap? ( ads )
spotlight? ( json )
test? ( python )
!ads? ( !addc )
?? ( system-heimdal system-mitkrb5 )
"
# the test suite is messed, it uses system-installed samba
# bits instead of what was built, tests things disabled via use
# flags, and generally just fails to work in a way ebuilds could
# rely on in its current state
RESTRICT="test"
MULTILIB_WRAPPED_HEADERS=(
/usr/include/samba-4.0/policy.h
/usr/include/samba-4.0/dcerpc_server.h
/usr/include/samba-4.0/ctdb.h
/usr/include/samba-4.0/ctdb_client.h
/usr/include/samba-4.0/ctdb_protocol.h
/usr/include/samba-4.0/ctdb_private.h
/usr/include/samba-4.0/ctdb_typesafe_cb.h
/usr/include/samba-4.0/ctdb_version.h
)
TALLOC_VERSION="2.4.3"
TDB_VERSION="1.4.14"
TEVENT_VERSION="0.17.1"
COMMON_DEPEND="
>=app-arch/libarchive-3.1.2:=[${MULTILIB_USEDEP}]
dev-lang/perl:=
dev-libs/icu:=[${MULTILIB_USEDEP}]
dev-libs/libbsd[${MULTILIB_USEDEP}]
dev-libs/libtasn1:=[${MULTILIB_USEDEP}]
dev-libs/popt[${MULTILIB_USEDEP}]
dev-perl/Parse-Yapp
>=net-libs/gnutls-3.4.7:=[${MULTILIB_USEDEP}]
>=net-libs/ngtcp2-1.12.0[${MULTILIB_USEDEP}]
>=sys-fs/e2fsprogs-1.46.4-r51[${MULTILIB_USEDEP}]
!sys-libs/ldb
sys-libs/libcap[${MULTILIB_USEDEP}]
sys-libs/liburing:=[${MULTILIB_USEDEP}]
sys-libs/ncurses:=
sys-libs/readline:=
>=sys-libs/talloc-${TALLOC_VERSION}[${MULTILIB_USEDEP}]
>=sys-libs/tdb-${TDB_VERSION}[${MULTILIB_USEDEP}]
>=sys-libs/tevent-${TEVENT_VERSION}[${MULTILIB_USEDEP}]
sys-libs/zlib[${MULTILIB_USEDEP}]
virtual/libcrypt:=[${MULTILIB_USEDEP}]
virtual/libiconv
$(python_gen_cond_dep '
addc? (
dev-python/dnspython:=[${PYTHON_USEDEP}]
dev-python/markdown[${PYTHON_USEDEP}]
)
ads? (
dev-python/dnspython:=[${PYTHON_USEDEP}]
net-dns/bind[gssapi]
)
')
acl? ( virtual/acl )
ceph? ( sys-cluster/ceph )
cluster? ( net-libs/rpcsvc-proto )
cups? ( net-print/cups )
debug? ( dev-util/lttng-ust )
fam? ( virtual/fam )
gpg? ( app-crypt/gpgme:= )
json? ( dev-libs/jansson:= )
ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
lmdb? ( >=dev-db/lmdb-0.9.16:=[${MULTILIB_USEDEP}] )
pam? ( sys-libs/pam )
python? (
sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}]
sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}]
sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
)
snapper? ( sys-apps/dbus )
system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl(-),${MULTILIB_USEDEP}] )
system-mitkrb5? ( >=app-crypt/mit-krb5-1.19[${MULTILIB_USEDEP}] )
!system-heimdal? ( !system-mitkrb5? ( sys-apps/keyutils[${MULTILIB_USEDEP}] ) )
systemd? ( sys-apps/systemd:= )
unwind? (
llvm-libunwind? ( llvm-runtimes/libunwind:= )
!llvm-libunwind? ( sys-libs/libunwind:= )
)
zeroconf? ( net-dns/avahi[dbus] )
"
DEPEND="${COMMON_DEPEND}
dev-perl/JSON
net-libs/libtirpc[${MULTILIB_USEDEP}]
net-libs/rpcsvc-proto
spotlight? ( dev-libs/glib )
test? (
>=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
$(python_gen_cond_dep "dev-python/python-subunit[\${PYTHON_USEDEP},${MULTILIB_USEDEP}]" )
!system-mitkrb5? (
>=net-dns/resolv_wrapper-1.1.4
>=net-libs/socket_wrapper-1.1.9
>=sys-libs/nss_wrapper-1.1.3
>=sys-libs/uid_wrapper-1.2.1
)
)"
RDEPEND="${COMMON_DEPEND}
client? ( net-fs/cifs-utils[ads?] )
python? ( ${PYTHON_DEPS} )
selinux? ( sec-policy/selinux-samba )
"
BDEPEND="${PYTHON_DEPS}
app-text/docbook-xsl-stylesheets
dev-libs/libxslt
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${PN}-4.18.4-pam.patch
"${FILESDIR}"/ldb-2.5.2-skip-wav-tevent-check.patch
)
CONFDIR="${FILESDIR}/4.4"
WAF_BINARY="${S}/buildtools/bin/waf"
SHAREDMODS=""
pkg_setup() {
# Package fails to build with distcc
export DISTCC_DISABLE=1
export PYTHONHASHSEED=1
python-single-r1_pkg_setup
SHAREDMODS="$(usev !snapper '!')vfs_snapper"
if use cluster ; then
SHAREDMODS+=",idmap_rid,idmap_tdb2,idmap_ad"
elif use ads ; then
SHAREDMODS+=",idmap_ad"
fi
}
check_samba_dep_versions() {
actual_talloc_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/talloc/wscript || die)
if [[ ${actual_talloc_version} != ${TALLOC_VERSION} ]] ; then
eerror "Source talloc version: ${TALLOC_VERSION}"
eerror "Ebuild talloc version: ${actual_talloc_version}"
die "Ebuild needs to fix TALLOC_VERSION!"
fi
actual_tdb_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tdb/wscript || die)
if [[ ${actual_tdb_version} != ${TDB_VERSION} ]] ; then
eerror "Source tdb version: ${TDB_VERSION}"
eerror "Ebuild tdb version: ${actual_tdb_version}"
die "Ebuild needs to fix TDB_VERSION!"
fi
actual_tevent_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tevent/wscript || die)
if [[ ${actual_tevent_version} != ${TEVENT_VERSION} ]] ; then
eerror "Source tevent version: ${TEVENT_VERSION}"
eerror "Ebuild tevent version: ${actual_tevent_version}"
die "Ebuild needs to fix TEVENT_VERSION!"
fi
}
src_prepare() {
default
check_samba_dep_versions
# Unbundle dnspython
sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
# Unbundle iso8601 unless tests are enabled
if ! use test ; then
sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
fi
# Ugly hackaround for bug #592502
#cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
# bug #943942
append-cflags -std=gnu17
# WAF
multilib_copy_sources
}
multilib_src_configure() {
# When specifying libs for samba build you must append NONE to the end to
# stop it automatically including things
local bundled_libs="NONE"
if ! use system-heimdal && ! use system-mitkrb5 ; then
bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
fi
# We "use" bundled cmocka when we're not running tests as we're
# not using it anyway. Means we avoid making users install it for
# no reason. bug #802531
if ! use test ; then
bundled_libs="cmocka,${bundled_libs}"
fi
# bug #874633
if use llvm-libunwind ; then
mkdir -p "${T}"/${ABI}/pkgconfig || die
local -x PKG_CONFIG_PATH="${T}/${ABI}/pkgconfig:${PKG_CONFIG_PATH}"
cat <<-EOF > "${T}"/${ABI}/pkgconfig/libunwind-generic.pc || die
exec_prefix=\${prefix}
libdir=/usr/$(get_libdir)
includedir=\${prefix}/include
Name: libunwind-generic
Description: libunwind generic library
Version: 1.70
Libs: -L\${libdir} -lunwind
Cflags: -I\${includedir}
EOF
fi
bundled_libs="libquic,${bundled_libs}"
local myconf=(
--enable-fhs
--sysconfdir="${EPREFIX}/etc"
--localstatedir="${EPREFIX}/var"
--with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
--with-piddir="${EPREFIX}/run/${PN}"
--bundled-libraries="${bundled_libs}"
--builtin-libraries=NONE
--disable-rpath
--disable-rpath-install
--nopyc
--nopyo
--without-winexe
$(multilib_native_use_with acl acl-support)
$(multilib_native_usex addc '' '--without-ad-dc')
$(multilib_native_use_enable ceph cephfs)
$(multilib_native_use_with cluster cluster-support)
$(multilib_native_use_enable cups)
--without-dmapi
$(multilib_native_use_with fam)
$(multilib_native_use_enable glusterfs)
$(multilib_native_use_with gpg gpgme)
$(multilib_native_use_with json)
$(multilib_native_use_enable iprint)
$(multilib_native_use_with pam)
$(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
$(multilib_native_use_with quota quotas)
$(multilib_native_use_with regedit)
$(multilib_native_use_enable spotlight)
$(multilib_native_use_with syslog)
$(multilib_native_use_with systemd)
--systemd-install-services
--with-systemddir="$(systemd_get_systemunitdir)"
$(multilib_native_use_with unwind libunwind)
$(multilib_native_use_with winbind)
$(multilib_native_usex python '' '--disable-python')
$(multilib_native_use_enable zeroconf avahi)
$(multilib_native_usex test '--enable-selftest' '')
$(usev system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')")
$(use_with ads)
$(use_with debug lttng)
$(use_with ldap)
$(use_with profiling-data)
--private-libraries='!ldb'
$(usex lmdb '' --without-ldb-lmdb)
# bug #683148
--jobs 1
)
if multilib_is_native_abi ; then
myconf+=( --with-shared-modules=${SHAREDMODS} )
else
myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
fi
append-cppflags "-I${ESYSROOT}/usr/include/et"
waf-utils_src_configure ${myconf[@]}
}
multilib_src_compile() {
waf-utils_src_compile
}
multilib_src_test() {
if multilib_is_native_abi ; then
"${WAF_BINARY}" test || die "Test failed"
fi
}
multilib_src_install() {
waf-utils_src_install
# Make all .so files executable
find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die
# smbspool_krb5_wrapper must only be accessible to root, bug #880739
find "${ED}" -type f -name "smbspool_krb5_wrapper" -exec chmod go-rwx {} + || die
# Remove empty runtime dirs created by build system (bug #892341)
find "${ED}"/{run,var} -type d -empty -delete || die
if multilib_is_native_abi ; then
# Install ldap schema for server (bug #491002)
if use ldap ; then
insinto /etc/openldap/schema
doins examples/LDAP/samba.schema
fi
# Create symlink for cups (bug #552310)
if use cups ; then
dosym ../../../bin/smbspool \
/usr/libexec/cups/backend/smb
fi
# Install example config file
insinto /etc/samba
doins examples/smb.conf.default
# Fix paths in example file (bug #603964)
sed \
-e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
-e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
-e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
-e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
-e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
-i "${ED}"/etc/samba/smb.conf.default || die
# Install init script and conf.d file
newinitd "${CONFDIR}/samba4.initd-r1" samba
newconfd "${CONFDIR}/samba4.confd" samba
dotmpfiles "${FILESDIR}"/samba.conf
if ! use addc ; then
rm "${D}/$(systemd_get_systemunitdir)/samba.service" \
|| die
fi
# Preserve functionality for old gentoo-specific unit names
dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service"
dosym smb.service "$(systemd_get_systemunitdir)/smbd.service"
dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service"
use python && python_optimize
fi
if use pam && use winbind ; then
newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
# bugs #376853 and #590374
insinto /etc/security
doins examples/pam_winbind/pam_winbind.conf
fi
}
pkg_postinst() {
tmpfiles_process samba.conf
}

Some files were not shown because too many files have changed in this diff Show More