Discussion:
[PATCH] teach ncurses-config about sysroot
Robert Schwebel
2010-06-24 12:37:31 UTC
Permalink
From: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+***@public.gmane.org>

This patch teaches ncursrs-config about sysroot

Signed-off-by: Marc Kleine-Buddde <mkl-bIcnvbaLZ9MEGnE8C9+***@public.gmane.org>
Signed-off-by: Robert Schwebel <rsc-bIcnvbaLZ9MEGnE8C9+***@public.gmane.org>

---
misc/ncurses-config.in | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Index: ncurses-5.7/misc/ncurses-config.in
===================================================================
--- ncurses-5.7.orig/misc/ncurses-config.in
+++ ncurses-5.7/misc/ncurses-config.in
@@ -75,11 +75,11 @@ while test $# -gt 0; do
# compile/link
--cflags)
INCS=
- if test "${prefix}/include" != /usr/include ; then
- INCS="-I${prefix}/include"
+ if test "${SYSROOT}${prefix}/include" != /usr/include ; then
+ INCS="-I${SYSROOT}${prefix}/include"
fi
if test "@WITH_OVERWRITE@" != no ; then
- INCS="$INCS -I${prefix}/include/${THIS}"
+ INCS="$INCS -I${SYSROOT}${prefix}/include/${THIS}"
fi
sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
$INCS
@@ -87,7 +87,7 @@ ENDECHO
;;
--libs)
sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
- -L${exec_prefix}/lib @EXTRA_LDFLAGS@ -l${THIS} @LIBS@
+ -L${SYSROOT}${exec_prefix}/lib @EXTRA_LDFLAGS@ -l${THIS} @LIBS@
ENDECHO
;;
# identification
Thomas Dickey
2010-06-24 20:56:35 UTC
Permalink
Post by Robert Schwebel
This patch teaches ncursrs-config about sysroot
googling around, for background, I don't see that this has really become
a standard feature, but rather a niche feature.

(comments expected).
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
Mike Frysinger
2010-06-25 02:06:26 UTC
Permalink
Post by Thomas Dickey
Post by Robert Schwebel
This patch teaches ncursrs-config about sysroot
googling around, for background, I don't see that this has really become
a standard feature, but rather a niche feature.
it is a niche feature. SYSROOT isnt really standard by any means.

would make more sense to create a pkg-config file for ncurses.
-mike
Marc Kleine-Budde
2010-06-25 06:55:08 UTC
Permalink
Post by Mike Frysinger
Post by Thomas Dickey
Post by Robert Schwebel
This patch teaches ncursrs-config about sysroot
googling around, for background, I don't see that this has really become
a standard feature, but rather a niche feature.
it is a niche feature. SYSROOT isnt really standard by any means.
YMMV, but it works quite good, but ncurses doesn't support ncurses yet
and even if it would, there are a lot of pacakges, which still use the
*-config method.
Post by Mike Frysinger
would make more sense to create a pkg-config file for ncurses.
ACK

cheers,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Mike Frysinger
2010-06-25 06:49:53 UTC
Permalink
Post by Marc Kleine-Budde
Post by Mike Frysinger
Post by Thomas Dickey
Post by Robert Schwebel
This patch teaches ncursrs-config about sysroot
googling around, for background, I don't see that this has really become
a standard feature, but rather a niche feature.
it is a niche feature. SYSROOT isnt really standard by any means.
YMMV, but it works quite good, but ncurses doesn't support ncurses yet
huh ? did you mean to actually say "doesnt support pkg-config" ?
Post by Marc Kleine-Budde
and even if it would, there are a lot of pacakges, which still use the
*-config method.
none of which support SYSROOT either. so this line of reasoning could be used
to support a generalized cross tool that wraps all of the *-config scripts on
the fly. that's exactly what we've been doing with Gentoo and with uClinux-
dist and havent hit a package yet where it causes problems. no need to hassle
upstream package maintainers except other than to push them to support a pkg-
config .pc file.
-mike
Thomas Dickey
2010-06-25 07:53:17 UTC
Permalink
Post by Mike Frysinger
Post by Thomas Dickey
Post by Robert Schwebel
This patch teaches ncursrs-config about sysroot
googling around, for background, I don't see that this has really become
a standard feature, but rather a niche feature.
it is a niche feature. SYSROOT isnt really standard by any means.
would make more sense to create a pkg-config file for ncurses.
That's already implemented since early 2009.
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
Mike Frysinger
2010-06-25 16:33:57 UTC
Permalink
Post by Thomas Dickey
Post by Mike Frysinger
Post by Thomas Dickey
Post by Robert Schwebel
This patch teaches ncursrs-config about sysroot
googling around, for background, I don't see that this has really become
a standard feature, but rather a niche feature.
it is a niche feature. SYSROOT isnt really standard by any means.
would make more sense to create a pkg-config file for ncurses.
That's already implemented since early 2009.
that's encouraging. i just d/led the 20100424 patch and it seems to install
files as we'd want.

the trouble is that features that arent part of a release will stay unused,
and these arent part of ncurses-5.7 ...
-mike
Thomas Dickey
2010-06-25 20:39:45 UTC
Permalink
Post by Mike Frysinger
Post by Thomas Dickey
Post by Mike Frysinger
Post by Thomas Dickey
Post by Robert Schwebel
This patch teaches ncursrs-config about sysroot
googling around, for background, I don't see that this has really become
a standard feature, but rather a niche feature.
it is a niche feature. SYSROOT isnt really standard by any means.
would make more sense to create a pkg-config file for ncurses.
That's already implemented since early 2009.
that's encouraging. i just d/led the 20100424 patch and it seems to install
files as we'd want.
the trouble is that features that arent part of a release will stay unused,
and these arent part of ncurses-5.7 ...
I'm working on 5.8, of course (the ".pc" files were just a small feature).
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
Loading...