diff --git a/net-proxy/daed/daed-0.3.3_p1.ebuild b/net-proxy/daed/daed-0.3.3_p1.ebuild index 3305b17cfcc..229014fc36b 100644 --- a/net-proxy/daed/daed-0.3.3_p1.ebuild +++ b/net-proxy/daed/daed-0.3.3_p1.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit systemd +inherit flag-o-matic systemd DESCRIPTION="A Modern Dashboard For dae" HOMEPAGE="https://github.com/daeuniverse/daed" @@ -33,13 +33,27 @@ S="${WORKDIR}" IUSE="+webui" +src_prepare() { + # Prevent conflicting with the user's flags + # https://devmanual.gentoo.org/ebuild-writing/common-mistakes/#-werror-compiler-flag-not-removed + sed -i -e 's/-Werror//' wing/dae-core/Makefile || die 'Failed to remove -Werror via sed' + + default +} + src_compile(){ # sed -i '/git submodule update/d' wing/Makefile || die # sed -i 's/git rev-parse --short HEAD/echo/' vite.config.ts || die if ! use webui; then cd wing || die fi - GO_ROOT="${S}" emake CC=clang CFLAGS="$CFLAGS -fno-stack-protector" APPNAME="${PN}" VERSION="${PV}" + + # for dae's ebpf target + # gentoo-zh#3720 + filter-flags "-march=*" "-mtune=*" + append-cflags "-fno-stack-protector" + + GO_ROOT="${S}" emake APPNAME="${PN}" VERSION="${PV}" } src_install(){ diff --git a/net-proxy/daed/daed-9999.ebuild b/net-proxy/daed/daed-9999.ebuild index 8f236dc13a1..d7b1f81224c 100644 --- a/net-proxy/daed/daed-9999.ebuild +++ b/net-proxy/daed/daed-9999.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit git-r3 go-module systemd +inherit flag-o-matic git-r3 go-module systemd DESCRIPTION="A Modern Dashboard For dae" HOMEPAGE="https://github.com/daeuniverse/daed" @@ -39,11 +39,25 @@ src_unpack(){ ego mod download -modcacherw } +src_prepare() { + # Prevent conflicting with the user's flags + # https://devmanual.gentoo.org/ebuild-writing/common-mistakes/#-werror-compiler-flag-not-removed + sed -i -e 's/-Werror//' wing/dae-core/Makefile || die 'Failed to remove -Werror via sed' + + default +} + src_compile(){ if ! use webui; then cd wing || die fi - GO_ROOT="${S}" emake CC=clang CFLAGS="$CFLAGS -fno-stack-protector" APPNAME="${PN}" VERSION="${PV}" + + # for dae's ebpf target + # gentoo-zh#3720 + filter-flags "-march=*" "-mtune=*" + append-cflags "-fno-stack-protector" + + GO_ROOT="${S}" emake APPNAME="${PN}" VERSION="${PV}" } src_install(){