commit 537c2e56befc161b99992b8799a51dc0eb66188b Author: Siina Mashek Date: Fri May 17 20:16:26 2024 +0300 minimal working environment diff --git a/README.adoc b/README.adoc new file mode 100644 index 0000000..3d681d3 --- /dev/null +++ b/README.adoc @@ -0,0 +1,3 @@ += My `/etc/portage` for WSl2 + +Includes the necessary bits to have things like VSCode's WSL extension to work as expected diff --git a/binrepos.conf/gentoobinhost.conf b/binrepos.conf/gentoobinhost.conf new file mode 100644 index 0000000..1d3b735 --- /dev/null +++ b/binrepos.conf/gentoobinhost.conf @@ -0,0 +1,7 @@ +# These settings were set by the catalyst build script that automatically +# built this stage. +# Please consider using a local mirror. + +[gentoobinhost] +priority = 1 +sync-uri = https://distfiles.gentoo.org/releases/amd64/binpackages/23.0/x86-64 diff --git a/env/no-lto.conf b/env/no-lto.conf new file mode 100644 index 0000000..ae036ed --- /dev/null +++ b/env/no-lto.conf @@ -0,0 +1,6 @@ +# Env setup to disable LTO and related warnings for problematic builds +DISABLE_LTO="-Wno-error=odr -Wno-error=lto-type-mismatch -Wno-error=strict-aliasing -fno-lto" +CFLAGS="${CFLAGS} ${DISABLE_LTO}" +CXXFLAGS="${CXXFLAGS} ${DISABLE_LTO}" +FCFLAGS="${FCFLAGS} ${DISABLE_LTO}" +FFLAGS="${FFLAGS} ${DISABLE_LTO}" diff --git a/make.conf b/make.conf new file mode 100644 index 0000000..7214287 --- /dev/null +++ b/make.conf @@ -0,0 +1,47 @@ +# These warnings indicate likely runtime problems with LTO, so promote them +# to errors. If a package fails to build with these, LTO should not be used there. +WARNING_FLAGS="-Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing" + +COMMON_FLAGS="-march=znver4 -O2 -pipe -fomit-frame-pointer -flto=7 ${WARNING_FLAGS}" +CFLAGS="${COMMON_FLAGS}" +CXXFLAGS="${COMMON_FLAGS}" +FCFLAGS="${COMMON_FLAGS}" +FFLAGS="${COMMON_FLAGS}" + +ACCEPT_LICENSE="@BINARY-REDISTRIBUTABLE" + +FEATURES="userfetch parallel-fetch parallel-install -ebuild-locks" +MAKEOPTS="-j8 --load-average 7.95" +EMERGE_DEFAULT_OPTS="--jobs 1024 --load-average 7.90" + +VIDEO_CARDS="amdgpu radeonsi" +INPUT_DEVICES="libinput wacom" + +AUD="-pipewire -alsa -gstreamer" +BLD="lto" +GFX="-branding" +KIT="-gnome -gtk -gtk2 -gtk3 -gtk-doc -qt4 -qt5" +MSC="minizip sqlite -handbook -man -mysql" +NET="-cups -ldap -wifi" +VID="-vlc" + +USE="${AUD} ${BLD} ${GFX} ${KIT} ${MSC} ${NET} ${VID}" + +GRUB_PLATFORMS="efi-64" +GOPROXY="" +L10N="" + +DOTNET_TARGETS="net70" +PYTHON_TARGETS="python3_11" +PYTHON_SINGLE_TARGET=$PYTHON_TARGETS +LUA_TARGETS="lua5_4 luajit" +LUA_SINGLE_TARGET="luajit" + +# NOTE: This stage was built with the bindist Use flag enabled +PORTDIR="/var/db/repos/gentoo" +DISTDIR="/var/cache/distfiles" +PKGDIR="/var/cache/binpkgs" + +# This sets the language of build output to English. +# Please keep this setting intact when reporting bugs. +LC_MESSAGES=C diff --git a/make.profile b/make.profile new file mode 120000 index 0000000..f36c13f --- /dev/null +++ b/make.profile @@ -0,0 +1 @@ +../../../../var/db/repos/gentoo/profiles/default/linux/amd64/23.0 \ No newline at end of file diff --git a/package.env/no-lto-build b/package.env/no-lto-build new file mode 100644 index 0000000..0fa4b99 --- /dev/null +++ b/package.env/no-lto-build @@ -0,0 +1 @@ +dev-build/cmake no-lto.conf diff --git a/package.use/git b/package.use/git new file mode 100644 index 0000000..abfe50d --- /dev/null +++ b/package.use/git @@ -0,0 +1 @@ +dev-vcs/git -perl -webdav diff --git a/patches/sys-apps/baselayout/baselayout-honor-WSL-PATH.patch b/patches/sys-apps/baselayout/baselayout-honor-WSL-PATH.patch new file mode 100644 index 0000000..253b66a --- /dev/null +++ b/patches/sys-apps/baselayout/baselayout-honor-WSL-PATH.patch @@ -0,0 +1,35 @@ +From 3ef3b5bf3c4911502beb2a35121699e5f08ebfc8 Mon Sep 17 00:00:00 2001 +From: Siina Mashek +Date: Fri, 18 May 2024 20:14:12 +0200 +Subject: [PATCH] Honor PATH elements set by WSL + +--- + etc/profile | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/etc/profile b/etc/profile +index 2afd51d..46026b4 100644 +--- a/etc/profile ++++ b/etc/profile +@@ -4,12 +4,18 @@ + # environment for login shells. + # + ++# Back up PATH set by WSL because it might be overwritten by profile.env ++WSLPATH="${PATH}" ++ + # Load environment settings from profile.env, which is created by + # env-update from the files in /etc/env.d + if [ -e /etc/profile.env ] ; then + . /etc/profile.env + fi + ++export PATH="${PATH}:${WSLPATH}" ++unset WSLPATH ++ + # You should override these in your ~/.bashrc (or equivalent) for per-user + # settings. For system defaults, you can add a new file in /etc/profile.d/. + export EDITOR=${EDITOR:-/bin/nano} +-- +2.31.1 + diff --git a/repos.conf/gentoo.conf b/repos.conf/gentoo.conf new file mode 100644 index 0000000..f080e56 --- /dev/null +++ b/repos.conf/gentoo.conf @@ -0,0 +1,8 @@ +[DEFAULT] +main-repo = gentoo + +[gentoo] +location = /var/db/repos/gentoo +sync-type = git +sync-uri = https://anongit.gentoo.org/git/repo/gentoo.git +auto-sync = yes