ebuild

来自百合仙子's Wiki
跳转到导航 跳转到搜索

修改

mlocate 添加静态链接支持:

diff --git a/sys-apps/mlocate/mlocate-0.26.ebuild b/sys-apps/mlocate/mlocate-0.26.ebuild
index 96fc9c1..0ba3df7 100644
--- a/sys-apps/mlocate/mlocate-0.26.ebuild
+++ b/sys-apps/mlocate/mlocate-0.26.ebuild
@@ -12,7 +12,7 @@ SRC_URI="https://fedorahosted.org/releases/m/l/mlocate/${P}.tar.xz"
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86"
-IUSE="nls selinux"
+IUSE="nls selinux static"
 
 RDEPEND="!sys-apps/slocate
 	!sys-apps/rlocate
@@ -26,7 +26,12 @@ pkg_setup() {
 }
 
 src_configure() {
-	econf $(use_enable nls)
+	if use static ; then
+		LDFLAGS=-static econf $(use_enable nls)
+		append-ldflags -static
+	else
+		econf $(use_enable nls)
+	fi
 }
 
 src_compile() {

参见