Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 221941

Summary: sys-apps/util-linux-2.13.1.1 - forced on ncurses dependency - request for USE flag
Product: Gentoo Linux Reporter: Mart Raudsepp <leio>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: jkukunas, mart.raudsepp
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Adds ncurses USE flag to sys-apps/util-linux
Adds ncurses USE flag to sys-apps/util-linux

Description Mart Raudsepp gentoo-dev 2008-05-13 13:18:04 UTC
sys-apps/util-linux configure.ac has automagic dependency on ncurses and the ebuild currently forces it to be available and always on. Please consider making it a ncurses USE flag, so ncurses can be avoided on an embedded system if it is so desired. I personally am fine with ncurses (for now, that might change), but as I don't think that I need setterm, pg and more tools, I could have easily worked around bug 221939 while getting a smaller image as a bonus. Others might desire to avoid ncurses for really tiny images.
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2008-05-13 13:53:08 UTC
Do you have a patch?
Comment 2 Mart Raudsepp gentoo-dev 2008-05-13 13:59:09 UTC
No, not right now. I can't spend work time on creating a patch right now. I worked around it and could work on a patch for util-linux from free time, but that would be low priority work and I have a lot of high priority stuff for packages I actually maintain. There is already everything guarded with HAVE_NCURSES and HAVE_NCURSES_NCURSES_H, so just would need to make sure these are undefined if something like --disable-ncurses is passed to configure
Comment 3 Jim Kukunas 2011-03-31 04:26:43 UTC
Created attachment 267931 [details, diff]
Adds ncurses USE flag to sys-apps/util-linux

This patch adds the ncurses USE flag to the sys-apps/util-linux ebuild.

Tested on stable x86 with util-linux-2.18-r1.
Comment 4 SpanKY gentoo-dev 2011-03-31 04:45:08 UTC
Comment on attachment 267931 [details, diff]
Adds ncurses USE flag to sys-apps/util-linux

not entirely correct.  your patch orphans USE=unicode usage, and let's ncurses vs ncursesw be auto-detected.

the logic probably needs to be:
--with-ncurses=$(use ncurses && { use unicode && echo auto || echo yes; } || echo no)
Comment 5 Jim Kukunas 2011-03-31 07:30:39 UTC
Created attachment 267943 [details, diff]
Adds ncurses USE flag to sys-apps/util-linux

Thanks for reviewing my previous patch. Ah, you are absolutely correct.

This patch uses the logic you suggested.

Once again, tested on x86 stable with util-linux-2.18-r1. 

Just to make sure it's working:
USE: ncurses unicode
ldd /usr/bin/pg | grep curses 
        libncursesw.so.5 => /lib/libncursesw.so.5 (0xb76fb000)
USE: ncurses -unicode
ldd /usr/bin/pg | grep curses 
        libncurses.so.5 => /lib/libncurses.so.5 (0xb76ca000)
USE: -ncurses -unicode
ldd /usr/bin/pg | grep curses
        ldd: /usr/bin/pg: No such file or directory
Comment 6 SpanKY gentoo-dev 2011-04-07 05:18:46 UTC
well, that patch breaks things too since it missed a \ after the new logic.  but i just cleaned that up and committed something that should work.

http://sources.gentoo.org/sys-apps/util-linux/util-linux-2.19.ebuild?r1=1.3&r2=1.4
http://sources.gentoo.org/sys-apps/util-linux/util-linux-9999.ebuild?r1=1.18&r2=1.19