Bug 119178 - sys-fs/jfsutils-1.1.10-r1.ebuild with possibility to build jfsutils staticaly
Bug#: 119178 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: kernel@gentoo.org Reported By: dushistov@mail.ru
Component: Ebuilds
URL: 
Summary: sys-fs/jfsutils-1.1.10-r1.ebuild with possibility to build jfsutils staticaly
Keywords:  
Status Whiteboard: 
Opened: 2006-01-16 02:57 0000
Description:   Opened: 2006-01-16 02:57 0000
I need possibility to build jfsutils statically, 
may be include this possibility to official portage tree?

ebuild in attachment, here is patch to show what I changed:

--- /usr/portage/sys-fs/jfsutils/jfsutils-1.1.10.ebuild 2005-10-30
00:37:06.000000000 +0400
+++ jfsutils-1.1.10-r1.ebuild   2006-01-16 13:30:01.584890750 +0300
@@ -9,13 +9,16 @@
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
-IUSE=""
+IUSE="static"

 DEPEND="virtual/libc"

 src_compile() {
-       econf \
-               --sbindir=/sbin || die "econf failed"
+       if use static; then
+               CFLAGS="${CFLAGS} -static"
+       fi
+       CFLAGS="${CFLAGS}" econf \
+       --sbindir=/sbin || die "econf failed"
        emake || die
 }

------- Comment #1 From Evgeniy Dushistov 2006-01-16 02:57:48 0000 -------
Created an attachment (id=77242) [details]
jfsutils-1.1.10-r1.ebuild

------- Comment #2 From Daniel Drake 2006-01-20 15:54:48 0000 -------
We aren't supposed to modify CFLAGS directly in ebuilds. Any chance you could
rewrite it using the flag-o-matic eclass?

------- Comment #3 From Evgeniy Dushistov 2006-01-21 11:14:47 0000 -------
Created an attachment (id=77740) [details]
jfsutils-1.1.10-r1.ebuild

> Any chance you could
> rewrite it using the flag-o-matic eclass?

You mean something like this?

------- Comment #4 From Daniel Drake 2006-01-22 10:15:40 0000 -------
I looked at some ebuilds under app-shells which have a static USE flag and they
use append-ldflags instead of append-flags. Can you try making that change and
confirm that it still links statically?

------- Comment #5 From Evgeniy Dushistov 2006-01-23 09:41:25 0000 -------
>Can you try making that change and
>confirm that it still links statically?

with append-ldflags all work fine.

------- Comment #6 From Daniel Drake 2006-01-23 10:07:03 0000 -------
Thanks, in portage.