Merge updates from master

This commit is contained in:
Repository mirror & CI
2024-08-13 01:03:49 +00:00
18 changed files with 474 additions and 24 deletions

View File

@@ -1,3 +1,4 @@
DIST FORD-6.2.5.tar.gz 6140012 BLAKE2B 261ddf8901c53732feb46e5ec9adefd689e10db0e1a674b45c9757f49658d57f1c6d3d0a5ba12bbc9d1d7d0a48031b29c772f438aea2069a5451d7e3b4aaa82b SHA512 1f47ddd45804af3c9d99576e542795f91a1833d816ceccb5e81f8f71710e0c79a4ba769b95b85771365d8c4392d1c812e247a5b82cfee6cc023f61eeedd86d75
DIST FORD-7.0.5.tar.gz 6091408 BLAKE2B 29e2ac05d69c023afa3134e278cb7832caeffa39381a8bbf9412a2aa6ec813d76fbc9d3fde23860337088075ccf467e320a4c9789139c73c63eabe67829b7299 SHA512 b3f9cf8df34fdea5430a4123d7d40cbd07e4d0c9b528c9a5fc509df456651b0576fbae97469ebdc4f1aa8347434622b5c0abcffd1b55ec5f5e7d2fe8e860b35d
DIST FORD-7.0.6.tar.gz 6092467 BLAKE2B c9d2b1b5d70ce42c2374812e22ebbf2ccdd460287c1307728d70973ed8171b49acd742fed404f1a43b526499471d833a2a0bef24dac78a35477f9c3ccea59213 SHA512 adb46e6a0cd1d995052ffbc9e8a4f4a4dfc919322a7a19829132f22bff7fbfde0fa930343325aa8d4239c58153b59a35f65ffefa79586bb43f887fc62cce6b94
DIST ford-7.0.8.tar.gz 6092686 BLAKE2B e4ba8de4b944b30481739a95db4a8f57c6d87e91a8a94daee24714d49125584954af41d5079f681e2d56073bbe3d83ab2f9827cb22b87cd4d72c7107fe954761 SHA512 71050871f9c80fdf32b9e1a6ed3cda8f4a3f8892f8320af14ed72c5687e1e66ee5a739cce817604a1b76ebae26aa5b11c46bca27fc16cd2d8c368f5d1b0ae1db

View File

@@ -0,0 +1,44 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..12} )
inherit distutils-r1 pypi toolchain-funcs
MY_PN="FORD"
DESCRIPTION="FORD, automatic documentation generator for modern Fortran programs"
HOMEPAGE="https://github.com/Fortran-FOSS-Programmers/ford"
SRC_URI="$(pypi_sdist_url "${PN^}" "${PV}")"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
>=dev-python/graphviz-0.20[${PYTHON_USEDEP}]
dev-python/jinja[${PYTHON_USEDEP}]
>=dev-python/markdown-3.4[${PYTHON_USEDEP}]
>=dev-python/markdown-include-0.8.1[${PYTHON_USEDEP}]
>=dev-python/pygments-2.12.0[${PYTHON_USEDEP}]
dev-python/python-markdown-math[${PYTHON_USEDEP}]
>=dev-python/rich-12.0.0
>=dev-python/toposort-1.7[${PYTHON_USEDEP}]
>=dev-python/tqdm-4.64.0[${PYTHON_USEDEP}]
>=dev-util/pcpp-1.30
test? ( dev-python/tomli-w )
"
DEPEND="${RDEPEND}"
DOCS=( CHANGELOG.md README.md )
distutils_enable_tests pytest
src_prepare() {
default
sed -i -e 's/"cpp /"'"$(tc-getCPP)"' /' ford/__init__.py || die # bug: 839300
}

View File

@@ -3,3 +3,4 @@ DIST fortran-stdlib-0.3.0.tar.gz 387442 BLAKE2B 8e1dae71a7de763452ac149a21eff0bb
DIST fortran-stdlib-0.4.0.tar.gz 397196 BLAKE2B 966d791216cf8df9ba388d1fee80acfceb42914617bd16e4da5a4d7de252089175bcc7e4b4369e6d6f9827dda6c3850936ae941d0be85f0bf76df04d21270bb4 SHA512 bab8f462b73dd69f639359751fae89baf6676cf071cd68d53245c5ddc287402237686413b6f772555413437899b6d87453547b9ef32c7deca30abfae09ef0459
DIST fortran-stdlib-0.5.0.tar.gz 3618660 BLAKE2B bdba8344ee3daf2e5eb5e055497b394abc9bd9322b2a09ea2d7aef477266f24c48a419c517f21b6c0cd2e8cb4c7360b2216dd9663c150ada74934978c003f6ba SHA512 e89f6c2018541354cc97b911e0af86b16384b5e121a0e1c3460c5eefc685780d1159762a4820418cefce69987f787a4e77e9965d347d5f0d9b2441f135baabd2
DIST fortran-stdlib-0.6.1.tar.gz 3634792 BLAKE2B 935100ddc124a2ace1a37ae3083b715ed0b603e9b1fe234b566d38dd44a8e9fa2098f51c0b3a28056a9e3f10e7c2aa5d3a126512e3fba3dcefe885ffbc27729e SHA512 5b32b0881e714e9f184827a977f2a9e204be9de06c086896fdcdc4f4a912fd5c102e6ee269cca1b0aaeca59b0a4dfa43f4d5901f0fda2f2556b4bf8d94999995
DIST fortran-stdlib-0.7.0.tar.gz 3669255 BLAKE2B 7a93d6d1f46f76c40c3325855e191fff6a1e3a2736ccb68866c1091160e3abeb4c5d272ac97220efc66d2dcb829c355fb7c3798e076ee6c06842fc1e912731bb SHA512 b8865c617b63e0eb38cf1eb83b05c5edd7f376100e654d7adc04097ea920f7d08aaf0825a789e0bc9c6056d19fdd096872146d20c7152c43d3ed9d9aae6df74b

View File

@@ -0,0 +1,80 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
FORTRAN_STANDARD="2003"
PYTHON_COMPAT=( python3_{10..12} )
inherit cmake fortran-2 python-any-r1
MY_PN="stdlib"
DESCRIPTION="A community driven standard library for (modern) Fortran"
HOMEPAGE="https://stdlib.fortran-lang.org/"
SRC_URI="https://github.com/fortran-lang/${MY_PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${MY_PN}-${PV}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE="doc test"
RESTRICT="mirror !test? ( test )"
DEPEND="
${PYTHON_DEPS}
$(python_gen_any_dep '
dev-build/fypp[${PYTHON_USEDEP}]
')
doc? (
$(python_gen_any_dep '
app-text/ford[${PYTHON_USEDEP}]
')
)
test? ( dev-util/fortran-test-drive )
"
pkg_setup() {
fortran-2_pkg_setup
}
src_prepare() {
default
# Remove Fortran compiler version from paths
sed -i -e "s:/\${CMAKE_Fortran_COMPILER_ID}-\${CMAKE_Fortran_COMPILER_VERSION}::" config/CMakeLists.txt || die
# Use favicon.png instead remote icon
sed -i -e 's#https://fortran-lang.org/assets/img/fortran_logo_512x512.png#favicon.png#' API-doc-FORD-file.md || die
cmake_src_prepare
}
src_configure() {
local mycmakeargs+=(
-DBUILD_SHARED_LIBS=on
-DBUILD_TESTING=$(usex test)
)
cmake_src_configure
}
src_compile() {
cmake_src_compile
if use doc ; then
einfo "Build API documentation:"
ford API-doc-FORD-file.md || die
fi
}
src_test() {
LD_LIBRARY_PATH="${BUILD_DIR}/src:${BUILD_DIR}/src/tests/hash_functions" cmake_src_test
}
src_install() {
cmake_src_install
use doc && HTML_DOCS=( "${WORKDIR}/${MY_PN}-${PV}"/API-doc/. )
einstalldocs
}

View File

@@ -3,16 +3,12 @@
EAPI=8
# sphinx-theme-builder is completely unusable, as it requires pinning
# to a very-specific nodejs version number, and ofc loves fetching
# everything from the Internet
DISTUTILS_USE_PEP517=standalone
PYTHON_COMPAT=( pypy3 python3_{10..13} )
inherit distutils-r1 pypi
DESCRIPTION="Clean customisable Sphinx documentation theme"
DESCRIPTION="Read/Write project management files (MPP, MSPDI, MPX, PMXML, etc)"
HOMEPAGE="
https://pypi.org/project/mpxj/
https://github.com/joniles/mpxj/

View File

@@ -0,0 +1,22 @@
Gentoo issue: https://bugs.gentoo.org/934950
Switch to use tomli instead of toml
diff '--color=auto' -Naur a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -3,13 +3,14 @@
import os
import subprocess
-import toml
+import tomli
import sphinxcontrib.katex as katex
# -- GENERAL -------------------------------------------------------------
-config = toml.load(os.path.join("..", "pyproject.toml"))
+with open("../pyproject.toml", "rb") as f:
+ config = tomli.load(f)
project = config["project"]["name"]
author = ", ".join(author["name"] for author in config["project"]["authors"])

View File

@@ -21,7 +21,10 @@ RDEPEND=">=dev-python/sphinx-4.5.0-r1[${PYTHON_USEDEP}]"
DOCS=()
PATCHES="${FILESDIR}/${P}_fix_install.patch"
PATCHES="
${FILESDIR}/${P}_fix_install.patch
${FILESDIR}/${P}_fix_use_tomli.patch
"
distutils_enable_sphinx docs \
dev-python/insipid-sphinx-theme \

View File

@@ -1,2 +1,2 @@
DIST niri-0.1.7-vendored-dependencies.tar.xz 55986496 BLAKE2B 86d7a3ddce3884831874cfac0540d6e5e8dccb9fe503f3d9b061af22f4a29e4f4742e150081fffff139b69961b19f3d8bcb4b2dd4bba5fb0ef955dca0a165df7 SHA512 bc58c234760c42034628c273c428d2200affdd4076cdd2e2a6961fa07aa256832e0a20c3cbc6116f4af29c452a1a82f29a871ccf718a8bbb121a3b544c09d320
DIST niri-0.1.7.tar.gz 354660 BLAKE2B 5d547424248d547587f0ec1e647f1265f334e49b8a1dc3d133b43707c7789ce12c5e18e9e42de87fa897e71332353a313af791574ac2e002d39b6c5c6b2441f8 SHA512 cd1067dc0a2a11920b33af8e13823147d7a0e7a206cf9ff94a0c410c8414c6c70db0c21d1a08d0e0935edf04e12e3fba5e748ac8f430c7bc63e6d6b84c2141dd
DIST niri-0.1.8-vendored-dependencies.tar.xz 52394124 BLAKE2B 67f706016335bd79641c188006bda75e8b7ca9203b1bb4d37b6f771f877c734da6fead95304655e428b2ab2c17342377af8e41258b036ed68eb58f094c79a186 SHA512 f29f17504da45d406c7411a17bcce8c3a8e056f16f46044ffe5ed6af79b8daee9cbdbd84257b480f4311fc3efe49814c6bbe45dfd1e32325fdcc75c99dd27607
DIST niri-0.1.8.tar.gz 379816 BLAKE2B 3558f2664148bd255b592c5809ee26db459f2f70d58686b62c96ca4bcb4d7ea7651e737fda1bcc27fe095269db235aa8ed2fc719aef62ed4ce69c7883a04e054 SHA512 191e9a781a1d193cc49e3609bfb00a4915e74526ba9d4db8e091e49b515b8b7fc9292706b0cb0bb23321629a92f9ba624a0b13b80827e126ed487ffb780ad963

View File

@@ -5,7 +5,7 @@ EAPI=8
LLVM_COMPAT=( {16..18} )
inherit cargo llvm-r1
inherit cargo llvm-r1 systemd
DESCRIPTION="Scrollable-tiling Wayland compositor"
HOMEPAGE="https://github.com/YaLTeR/niri"
@@ -46,7 +46,7 @@ DEPEND="
RDEPEND="${DEPEND}"
# Clang is required for bindgen
BDEPEND="
>=virtual/rust-1.72.0
>=virtual/rust-1.77.0
screencast? ( $(llvm_gen_dep 'sys-devel/clang:${LLVM_SLOT}') )
"
@@ -55,7 +55,7 @@ ECARGO_VENDOR="${WORKDIR}/vendor"
QA_FLAGS_IGNORED="usr/bin/niri"
src_prepare() {
sed -i 's/^git =.*/version = "*"/' Cargo.toml || die
sed -i 's/git = "[^ ]*"/version = "*"/' Cargo.toml || die
default
}
@@ -72,9 +72,7 @@ src_install() {
cargo_src_install
dobin resources/niri-session
insinto /usr/lib/systemd/user
doins resources/niri{.service,-shutdown.target}
systemd_douserunit resources/niri{.service,-shutdown.target}
insinto /usr/share/wayland-sessions
doins resources/niri.desktop

View File

@@ -14,11 +14,13 @@ KEYWORDS="~amd64"
src_compile() {
tc-export CC
export CFLAGS
sed -i 's/ -O.\b/ /' Makefile
export CFLAGS LDFLAGS
sed -i 's/ -O.\b/ /' Makefile || die
# respect LDFLAGS
sed -i 's/$(CFLAGS) /$(CFLAGS) $(LDFLAGS) /' Makefile || die
# workaround for compiling without -O2
# https://github.com/hufrea/byedpi/commit/3fee8d5aed122f34ec13637f5f4b1502d13cc923
sed -i 's/inline bool check_port/static inline bool check_port/' extend.c
sed -i 's/inline bool check_port/static inline bool check_port/' extend.c || die
default
}

View File

@@ -14,7 +14,7 @@ SLOT="0"
src_compile() {
tc-export CC
export CFLAGS LDFLAGS
sed -i 's/ -O.\b/ /' Makefile
sed -i 's/ -O.\b/ /' Makefile || die
default
}

View File

@@ -62,11 +62,6 @@ acct-group/wikijs
acct-user/wikijs
www-apps/wiki-js-bin
# David Roman <davidroman96@gmail.com> (2024-07-15)
# No maintainer. Can not be emerged due to dependency problems.
# Removal on 2024-08-15
dev-lang/swift
# Remigiusz Micielski <rmicielski@purelymail.com> (2024-07-12)
# Upstream lost interest in this package and it doesn't compile.
# Removal on 2024-08-12

View File

@@ -171,7 +171,7 @@ src_install() {
# Documentation housekeeping & QA
mv "${ED}"/usr/share/doc/omc "${ED}"/usr/share/doc/"${PF}" || die
rm -fr "${ED}"/usr/doc || die
rm -fr "${ED}"/usr/doc "${ED}"/usr/share/zmq "${ED}"/usr/share/cmake || die
ewarn "Upstream has deprecated OMTLMSimuulator and, therefore, it has not been installed. Use OMSimulator/SSP instead."
}

View File

@@ -1,2 +1,3 @@
DIST mullvad-browser-linux-x86_64-13.5.1.tar.xz 103318368 BLAKE2B c9f4c1cfa951561d16368c4728ec95456076519b4270f4645b16156830963e374e9e2997909b18b6366877d8898bbe5de15b61119a1c6a993fdb0e16a02f20f5 SHA512 088465811c25639c507a023b4c1abf04ac5ae63ea066a6fc8f6504057ed9b7643895e0e376a8ff076a319b0e295e90dd2004267cc5388f85f094ecb08890ab45
DIST mullvad-browser-linux-x86_64-13.5.2.tar.xz 103405692 BLAKE2B cac35a9b6ce8cb4a75e19722edda45c021f8b96fc15176964d4fdc7c814cc3a26a53ad5445cca33e9ffe0c55370dc3b8e9ae676e4b493fe208dae899b670c77a SHA512 bbec8268d0bd287bd52ef988ee1c89c6f5a634b90b2fd613dfc42f0ca74cef51f2d080c831e34bf8a2d2c2819a7863c8710f2e77336de9f4899664ae9e535ae0
DIST mullvad-browser-linux-x86_64-13.5.tar.xz 103263340 BLAKE2B a66e20e75152e6d03b4eff8b5580418fb11587700bb5e16036f9bcb2c094cb0fe531653ef1daf64b1bf5841b25c3bf2378b85aae9b4ccb88287896cd054842ee SHA512 8dfd65460852f1be2906d8e87e3b45589534e79213477ae5ae51b16e170fa24b1ea0ba1866771b625fbd3fc80311310b56abd493e5e3799bbaa9031654574401

View File

@@ -84,6 +84,7 @@ src_install() {
newicon -s ${x} "${S}"/mullvad-browser/Browser/browser/chrome/icons/default/default${x}.png mullvad-browser.png
done
fperms 755 "/opt/mullvad-browser/Browser/abicheck"
fperms +x "/opt/mullvad-browser/Browser/start-mullvad-browser"
fperms +x "/opt/mullvad-browser/Browser/mullvadbrowser"
fperms +x "/opt/mullvad-browser/Browser/mullvadbrowser.real"

View File

@@ -0,0 +1,91 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop xdg
DESCRIPTION="The Mullvad Browser is developed to minimize tracking and fingerprinting."
HOMEPAGE="https://github.com/mullvad/mullvad-browser https://mullvad.net/"
SRC_URI="https://github.com/mullvad/mullvad-browser/releases/download/${PV}/mullvad-browser-linux-x86_64-${PV}.tar.xz"
S="${WORKDIR}"
LICENSE="MPL-2.0"
SLOT="0"
KEYWORDS="-* ~amd64"
IUSE="wayland +X"
RESTRICT="bindist mirror test strip"
RDEPEND="
app-accessibility/at-spi2-core
app-misc/mime-types
app-shells/bash
dev-libs/dbus-glib
dev-libs/glib
dev-libs/nspr
dev-libs/nss
gui-libs/gtk
media-libs/alsa-lib
media-libs/fontconfig
media-libs/freetype
media-video/ffmpeg
sys-apps/dbus
x11-libs/cairo
x11-themes/hicolor-icon-theme
x11-libs/libX11
x11-libs/libxcb
x11-libs/libXcomposite
x11-libs/libXcursor
x11-libs/libXdamage
x11-libs/libXfixes
x11-libs/libXi
x11-libs/libXrandr
x11-libs/libXrender
x11-libs/libXt
x11-libs/libXtst
wayland? (
sys-apps/xdg-desktop-portal
)"
QA_PREBUILT="*"
src_install() {
# Install profiles to home dir
touch "${S}"/mullvad-browser/Browser/is-packaged-app
# Fix desktop file vars
sed -i "s|Name=.*|Name=Mullvad Browser|g" "${S}"/mullvad-browser/start-mullvad-browser.desktop
sed -i "s|Exec=.*|Exec=/opt/mullvad-browser/Browser/start-mullvad-browser --detach|g" "${S}"/mullvad-browser/start-mullvad-browser.desktop
sed -i "s|Icon=.*|Icon=mullvad-browser|g" "${S}"/mullvad-browser/start-mullvad-browser.desktop
# Install shim for X11. Browser doesn't seem to launch without it, see upstream issue:
# https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/issues/40565
#
# The X11 shim below does not affect the browser's fingerprint or functionality.
if use X ; then
echo "#include <stdlib.h>
void gdk_wayland_display_get_wl_compositor() { abort(); }
void gdk_wayland_device_get_wl_pointer() { abort(); }
void gdk_wayland_window_get_wl_surface() { abort(); }
void gdk_wayland_display_get_wl_display() { abort(); }" > "${S}"/X11shim.c
cc -shared -o "${S}"/mullvad-browser/X11shim.so "${S}"/X11shim.c
sed -i '1iexport LD_PRELOAD=/opt/mullvad-browser/X11shim.so' "${S}"/mullvad-browser/Browser/start-mullvad-browser
fi
insinto /opt/
doins -r "${S}"/mullvad-browser
dosym "../../opt/mullvad-browser/Browser/start-mullvad-browser" /usr/bin/${PN}
domenu "${S}"/mullvad-browser/start-mullvad-browser.desktop
local x
for x in 16 32 48 64 128; do
newicon -s ${x} "${S}"/mullvad-browser/Browser/browser/chrome/icons/default/default${x}.png mullvad-browser.png
done
fperms 755 "/opt/mullvad-browser/Browser/abicheck"
fperms +x "/opt/mullvad-browser/Browser/start-mullvad-browser"
fperms +x "/opt/mullvad-browser/Browser/mullvadbrowser"
fperms +x "/opt/mullvad-browser/Browser/mullvadbrowser.real"
}

View File

@@ -84,6 +84,7 @@ src_install() {
newicon -s ${x} "${S}"/mullvad-browser/Browser/browser/chrome/icons/default/default${x}.png mullvad-browser.png
done
fperms 755 "/opt/mullvad-browser/Browser/abicheck"
fperms +x "/opt/mullvad-browser/Browser/start-mullvad-browser"
fperms +x "/opt/mullvad-browser/Browser/mullvadbrowser"
fperms +x "/opt/mullvad-browser/Browser/mullvadbrowser.real"

214
x11-misc/ly/ly-9999.ebuild Normal file
View File

@@ -0,0 +1,214 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit edo pam systemd git-r3
DESCRIPTION="Ly - a TUI display manager (live ebuild)"
HOMEPAGE="https://github.com/fairyglade/ly"
EGIT_REPO_URI="https://github.com/fairyglade/ly.git"
LICENSE="WTFPL-2"
SLOT="0"
# KEYWORDS is omitted for live ebuilds
# Specify the required Zig version range
EZIG_MIN="0.12"
EZIG_MAX_EXCLUSIVE="0.13"
DEPEND="
|| ( dev-lang/zig-bin:${EZIG_MIN} dev-lang/zig:${EZIG_MIN} )
sys-libs/pam
x11-libs/libxcb
"
RDEPEND="
x11-base/xorg-server
x11-apps/xauth
sys-libs/ncurses
"
# Ignore QA warnings about missing build-id for Zig binaries
# https://github.com/ziglang/zig/issues/3382
QA_FLAGS_IGNORED="usr/bin/ly"
RES="${S}/res"
# Function to dynamically fetch dependency versions from build.zig.zon
fetch_deps_dynamically() {
local build_zig_zon="${S}/build.zig.zon"
local content
if [[ ! -f "${build_zig_zon}" ]]; then
eerror "build.zig.zon not found at ${build_zig_zon}"
return 1
fi
content=$(<"${build_zig_zon}")
# Extract CLAP version
if [[ "${content}" =~ clap.*?refs/tags/([0-9]+\.[0-9]+\.[0-9]+) ]]; then
CLAP="refs/tags/${BASH_REMATCH[1]}"
else
eerror "Failed to extract CLAP version"
return 1
fi
# Extract ZIGINI commit hash
if [[ "${content}" =~ zigini.*?/([a-f0-9]{40})\.tar\.gz ]]; then
ZIGINI="${BASH_REMATCH[1]}"
else
eerror "Failed to extract ZIGINI commit hash"
return 1
fi
einfo "Extracted CLAP version: ${CLAP}"
einfo "Extracted ZIGINI commit: ${ZIGINI}"
}
# Function to fetch nested dependency versions
fetch_nested_deps_dynamically() {
local root_build_zig_zon="${S}/build.zig.zon"
local root_content
local zigini_hash
local nested_build_zig_zon
local nested_content
# Read the root build.zig.zon
root_content=$(<"${root_build_zig_zon}")
# Extract the hash for the zigini dependency
if [[ "${root_content}" =~ zigini.*hash[[:space:]]*=[[:space:]]*\"([a-f0-9]+)\" ]]; then
zigini_hash="${BASH_REMATCH[1]}"
else
eerror "Failed to extract zigini hash from root build.zig.zon"
return 1
fi
# Construct the path to the nested build.zig.zon
nested_build_zig_zon="${WORKDIR}/deps/p/${zigini_hash}/build.zig.zon"
if [[ ! -f "${nested_build_zig_zon}" ]]; then
eerror "Nested build.zig.zon not found at ${nested_build_zig_zon}"
return 1
fi
# Read the nested build.zig.zon
nested_content=$(<"${nested_build_zig_zon}")
# Extract the ZIGLIBINI value
if [[ "${nested_content}" =~ ini.*?/([a-f0-9]{40})\.tar\.gz ]]; then
ZIGLIBINI="${BASH_REMATCH[1]}"
else
eerror "Failed to extract ZIGLIBINI commit hash"
return 1
fi
einfo "Extracted ZIGLIBINI commit: ${ZIGLIBINI}"
}
# Function to set the EZIG environment variable
zig-set_EZIG() {
[[ -n ${EZIG} ]] && return
if [[ -n ${EZIG_OVERWRITE} ]]; then
export EZIG="${EZIG_OVERWRITE}"
return
fi
local candidate selected selected_ver ver
for candidate in "${BROOT}"/usr/bin/zig-*; do
if [[ ! -L ${candidate} || ${candidate} != */zig?(-bin)-+([0-9.]) ]]; then
continue
fi
ver=${candidate##*-}
if [[ -n ${EZIG_EXACT_VER} ]]; then
ver_test "${ver}" -ne "${EZIG_EXACT_VER}" && continue
selected="${candidate}"
selected_ver="${ver}"
break
fi
if [[ -n ${EZIG_MIN} ]] \
&& ver_test "${ver}" -lt "${EZIG_MIN}"; then
# Candidate does not satisfy EZIG_MIN condition.
continue
fi
if [[ -n ${EZIG_MAX_EXCLUSIVE} ]] \
&& ver_test "${ver}" -ge "${EZIG_MAX_EXCLUSIVE}"; then
# Candidate does not satisfy EZIG_MAX_EXCLUSIVE condition.
continue
fi
if [[ -n ${selected_ver} ]] \
&& ver_test "${selected_ver}" -gt "${ver}"; then
# Candidate is older than the currently selected candidate.
continue
fi
selected="${candidate}"
selected_ver="${ver}"
done
if [[ -z ${selected} ]]; then
die "Could not find (suitable) zig installation in ${BROOT}/usr/bin"
fi
export EZIG="${selected}"
export EZIG_VER="${selected_ver}"
}
# Wrapper function for zig command
ezig() {
zig-set_EZIG
edo "${EZIG}" "${@}"
}
# Check if git is installed
pkg_setup() {
if ! type -P git >/dev/null; then
eerror "git not found. Please install dev-vcs/git."
die "git not found"
fi
}
# Unpack source and fetch dependencies
src_unpack() {
git-r3_src_unpack
# Fetch CLAP and ZIGINI
fetch_deps_dynamically
mkdir "${WORKDIR}/deps" || die
ezig fetch --global-cache-dir "${WORKDIR}/deps" "https://github.com/Hejsil/zig-clap/archive/${CLAP}.tar.gz"
ezig fetch --global-cache-dir "${WORKDIR}/deps" "https://github.com/Kawaii-Ash/zigini/archive/${ZIGINI}.tar.gz"
# Fetch ZIGLIBINI
fetch_nested_deps_dynamically
ezig fetch --global-cache-dir "${WORKDIR}/deps" "https://github.com/ziglibs/ini/archive/${ZIGLIBINI}.tar.gz"
}
# Compile the project
src_compile() {
ezig build --system "${WORKDIR}/deps/p" -Doptimize=ReleaseSafe
}
# Install the binary and configuration files
src_install() {
dobin "${S}/zig-out/bin/${PN}"
newinitd "${RES}/${PN}-openrc" ly
systemd_dounit "${RES}/${PN}.service"
insinto /etc/ly
doins "${RES}/config.ini" "${RES}/setup.sh"
insinto /etc/ly/lang
doins "${RES}"/lang/*.ini
newpamd "${RES}/pam.d/ly" ly
fperms +x /etc/${PN}/setup.sh
}
# Post-installation messages and warnings
pkg_postinst() {
systemd_reenable "${PN}.service"
ewarn
ewarn "The init scripts are installed only for systemd/openrc"
ewarn "If you are using something else like runit etc."
ewarn "Please check upstream for get some help"
ewarn "You may need to take a look at /etc/ly/config.ini"
ewarn "If you are using a window manager as DWM"
ewarn "Please make sure there is a .desktop file in /usr/share/xsessions for it"
ewarn
ewarn "This is a live ebuild, which means it will always install the latest commit."
ewarn "If you encounter any issues, please report them to the upstream project."
}