diff options
| author | Baraa Al-Masri <pub@mbaraa.com> | 2026-05-10 20:40:40 +0300 |
|---|---|---|
| committer | Baraa Al-Masri <pub@mbaraa.com> | 2026-05-10 20:40:40 +0300 |
| commit | cf930f3b32791958b912022547cfc95100846691 (patch) | |
| tree | 779706f8e2f05e3d34a2b940e7e228438acd2624 | |
| parent | 2cbdb59ccf6b2f37c700eaa75b864e77229010cc (diff) | |
Add portage package use
| -rw-r--r-- | config/dependencies/gentoo | 5 | ||||
| -rw-r--r-- | include/init.sh | 17 |
2 files changed, 21 insertions, 1 deletions
diff --git a/config/dependencies/gentoo b/config/dependencies/gentoo index 4f195a21..ab0237b7 100644 --- a/config/dependencies/gentoo +++ b/config/dependencies/gentoo @@ -18,3 +18,8 @@ sys-libs/libselinux dev-python/pyelftools dev-python/pycparser dev-python/cffi \ dev-python/pycryptodome app-text/doxygen media-fonts/unifont media-libs/libsdl2 \ sys-power/acpi_call sys-devel/crossdev \ " +pkg_use_file="/etc/portage/package.use/lbmk" +pkg_use=""" +>=gnustep-base/gnustep-make-2.9.3-r2::gentoo native-exceptions +>=sys-devel/gcc-15.2.1::gentoo objc ada openmp multilib graphite sanitize pgo lto fortran cxx +""" diff --git a/include/init.sh b/include/init.sh index cde489dd..0f3c543c 100644 --- a/include/init.sh +++ b/include/init.sh @@ -87,6 +87,21 @@ xbmkpkg() err "pkg_add/pkglist not both set" "xbmkpkg" "$@" fi + if [ "$2" == "gentoo" ]; then + if [ -z "$pkg_use" ] || [ -z "$pkg_use_file" ]; then + err "pkg_use/pkg_use_file not both set" "xbmkpkg" "$@" + fi + + printf "Updating package use...\n" + printf "Writing into $pkg_use_file..." + + if [ ! -d `dirname $pkg_use_file` ]; then + mkdir `dirname $pkg_use_file` + fi + + printf "%s\n" "$pkg_use" >> $pkg_use_file + fi + x_ $pkg_add $pkglist if [ -n "$aur_notice" ]; then @@ -160,7 +175,7 @@ xbmk_set_env() # a parent instance of xbmk never processes its own # command directly; instead, it calls a child instance # of xbmk, and exits with the corresponding return status. - + xbmk_parent_set_env return 0 |
