Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 519052 - sys-libs/ncurses: please review prefix changes
Summary: sys-libs/ncurses: please review prefix changes
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: Inclusion, PATCH
Depends on:
Blocks: prefix-gx86 558800
  Show dependency tree
 
Reported: 2014-08-04 16:41 UTC by Christoph Junghans (RETIRED)
Modified: 2016-03-23 02:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch against gx86 version (ncurses-5.9-r3.ebuild.patch,5.90 KB, patch)
2014-08-04 16:41 UTC, Christoph Junghans (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Junghans (RETIRED) gentoo-dev 2014-08-04 16:41:29 UTC
Created attachment 382250 [details, diff]
patch against gx86 version

Changes:
- use host-libtool for AIX and hpux
- fix shebang of scripts
- fix D__EXTENSIONS__ on solaris
- prefix terminfo-dirs and PKG_CONFIG_LIBDIR
- use --with-shared only on system supporting it
- ${D} -> ${ED}
Comment 1 SpanKY gentoo-dev 2014-08-05 10:55:32 UTC
Comment on attachment 382250 [details, diff]
patch against gx86 version

>+need-libtool() {

obviously this part i no likey

>+	# since the system headers do strict checks on compatability of flags and

compatibility

>+	# Defining _XOPEN_SOURCE_EXTENDED together with _XOPEN_SOURCE leads to
>+	# pre-_XOPEN_SOURCE=500 stuff, so only do it for non-C++ code.
>+	# See also bug #431352

can we sort this out in the configure script itself ?  it has lots o checking for this kind of platform crap which means upstream should be receptive to merging your changes.

>+	use unicode && do_configure widec --enable-widec --includedir="${EPREFIX}"/usr/include/ncursesw

does --includedir='$(prefix)/include/ncursesw' work ?

>+		--with-terminfo-dirs="${EPREFIX}/etc/terminfo:${EPREFIX}/usr/share/terminfo"
>+		PKG_CONFIG_LIBDIR="${EPREFIX}/usr/$(get_libdir)/pkgconfig"

OK

>+			if need-libtool ; then
>+				echo with-libtool

i feel like we looked into enabling this for everyone but couldn't for some reason.  i'd have to go back through bugs and/or read the source to remind me why.

>+			elif [[ ${CHOST} == *-mint* ]] ; then
>+				echo without-shared

no.  we specifically introduced tc-is-static-only so there should never be another mint check like this again.  please do a tree wide check w/prefix and clean that up.

in fact, you already use it below ...

>+		--enable-overwrite

the comment didn't cover this addition ...

>+	if ! tc-is-static-only ; then
>+		ln -sf libncurses$(get_libname) "${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die
>+	fi

OK

>-			local termfile=$(find "${D}"/usr/share/terminfo/ -name "${x}" 2>/dev/null)
>+			local termfile=$(find "${ED}"/usr/share/terminfo/ -name "${x}" 2>/dev/null)

OK (same goes for all the other D->ED checks)
Comment 2 Christoph Junghans (RETIRED) gentoo-dev 2014-08-05 14:51:24 UTC
(In reply to SpanKY from comment #1)
> Comment on attachment 382250 [details, diff] [details, diff]
> patch against gx86 version
> 
> >+need-libtool() {
> obviously this part i no likey
And...

> >+	# Defining _XOPEN_SOURCE_EXTENDED together with _XOPEN_SOURCE leads to
> >+	# pre-_XOPEN_SOURCE=500 stuff, so only do it for non-C++ code.
> >+	# See also bug #431352
> can we sort this out in the configure script itself ?  it has lots o
> checking for this kind of platform crap which means upstream should be
> receptive to merging your changes.
@prefix: Can somebody with a solaris system figure that out.

> >+			if need-libtool ; then
> >+				echo with-libtool
> i feel like we looked into enabling this for everyone but couldn't for some
> reason.  i'd have to go back through bugs and/or read the source to remind
> me why.
So far it is only used for hpux and aix.

> >+			elif [[ ${CHOST} == *-mint* ]] ; then
> >+				echo without-shared
> no.  we specifically introduced tc-is-static-only so there should never be
> another mint check like this again.  please do a tree wide check w/prefix
> and clean that up.
Done.

> >+		--enable-overwrite
> the comment didn't cover this addition ...
Fine-Tuning Your Configuration:
  --disable-overwrite     leave out the link to -lcurses
Is the default, can be dropped.
Comment 3 Fabian Groffen gentoo-dev 2014-08-06 19:06:09 UTC
(In reply to Christoph Junghans from comment #2)
> > >+	# Defining _XOPEN_SOURCE_EXTENDED together with _XOPEN_SOURCE leads to
> > >+	# pre-_XOPEN_SOURCE=500 stuff, so only do it for non-C++ code.
> > >+	# See also bug #431352
> > can we sort this out in the configure script itself ?  it has lots o
> > checking for this kind of platform crap which means upstream should be
> > receptive to merging your changes.
> @prefix: Can somebody with a solaris system figure that out.

What I recall here is that the checks strictness became an issue on more recent versions of GCC (4.6 and 5.7 I believe) which strictly adhere to POSIX standards of setting _XOPEN_SOURCE to whatever it minimally is (c89, c++, c99) according to spec.  Therefore, a redefinition, or clash/conflict would happen.  I suspected ncurses developers/Thomas Dickey to adjust the check accordingly for the next release.  Solaris never came with any other GCC compiler than 3.4.0 iirc, OpenIndiana does have GCC 4.6/4.7 I believe.

I looked into patching this in the configure, but the combo we use is based on the use of C, not C++, since the latter already sets _XOPEN_SOURCE=600.  I think it needs more work, because it assumes both C and CXX need the same flags, which is not true here.
Comment 4 Michael Haubenwallner (RETIRED) gentoo-dev 2014-08-07 07:59:10 UTC
(In reply to SpanKY from comment #1)
> >+			if need-libtool ; then
> >+				echo with-libtool
> 
> i feel like we looked into enabling this for everyone but couldn't for some
> reason.  i'd have to go back through bugs and/or read the source to remind
> me why.

IIRC there was a problem with libdir=/lib versus /usr/lib/ldscript (only?) - which has changed since. Actually, my focus was on fixing broken platforms rather than touching working ones - so maybe just try?
Comment 5 Christoph Junghans (RETIRED) gentoo-dev 2016-03-23 02:23:55 UTC
Re-submit later!