commit:     470e5514e9841e359d1587a881e573b3fbaa88f3
Author:     Takuya Wakazono <pastalian46 <AT> gmail <DOT> com>
AuthorDate: Mon Jan  8 15:11:52 2024 +0000
Commit:     Takuya Wakazono <pastalian46 <AT> gmail <DOT> com>
CommitDate: Mon Jan  8 15:11:52 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=470e5514

dev-util/xmake: sync live

Signed-off-by: Takuya Wakazono <pastalian46 <AT> gmail.com>

 dev-util/xmake/xmake-9999.ebuild | 30 ++++++++++++++++++++++++++----
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/dev-util/xmake/xmake-9999.ebuild b/dev-util/xmake/xmake-9999.ebuild
index e02d4fa7a5..28e4782756 100644
--- a/dev-util/xmake/xmake-9999.ebuild
+++ b/dev-util/xmake/xmake-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 2021 Gentoo Authors
+# Copyright 2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-inherit optfeature
+inherit bash-completion-r1 optfeature
 
 DESCRIPTION="A cross-platform build utility based on Lua"
 HOMEPAGE="https://xmake.io";
@@ -17,7 +17,7 @@ else
 fi
 
 # tarball doesn't provide tests
-RESTRICT="test strip"
+RESTRICT="test"
 LICENSE="Apache-2.0"
 SLOT="0"
 
@@ -38,13 +38,35 @@ DOCS=(
        NOTICE.md README.md README_zh.md
 )
 
-src_configure(){
+src_prepare() {
+       default
+
+       # Don't strip binaries
+       sed -i 's/"-s"/""/' configure || die
+}
+
+src_configure() {
        econf --prefix="${EPREFIX}"/usr \
                --plat=linux
                # --plat=linux is necessary, which enables correct directory:
                # build/linux/ARCH other than build/ARCH/ARCH
 }
 
+src_install() {
+       default
+
+       doman scripts/man/*
+
+       newbashcomp xmake/scripts/completions/register-completions.bash xmake
+       bashcomp_alias xmake xrepo
+
+       insinto /usr/share/zsh/site-functions
+       newins xmake/scripts/completions/register-completions.zsh xmake.zsh
+
+       insinto /usr/share/fish/vendor_completions.d
+       newins xmake/scripts/completions/register-completions.fish xmake.fish
+}
+
 pkg_postinst() {
        optfeature "cached compilation for your xmake projects" dev-util/ccache
 }

Reply via email to