summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2015-02-09 11:53:33 +0000
committerTiago Gomes <tiago.gomes@codethink.co.uk>2015-02-12 11:35:23 +0000
commitdf1f993888c60aeb376c386edb5f2207728b3ed5 (patch)
tree84f6ea50007c9dc5230fd4a72be0c7388374ccdd
parent6326dbb8ed8533d216398f384bce8d9e6fc1a7ee (diff)
downloaddefinitions-df1f993888c60aeb376c386edb5f2207728b3ed5.tar.gz
Update to ncurses 5.9-20150131
The new ref points to a tarball import which contains the machinery to build on aarch64. This commit also moves the contents of the ncurses-morph-postinstall.sh script to the chunk morph to avoid having a delta.
-rw-r--r--strata/core.morph4
-rw-r--r--strata/core/ncurses.morph38
2 files changed, 39 insertions, 3 deletions
diff --git a/strata/core.morph b/strata/core.morph
index 143975e6..9d60c250 100644
--- a/strata/core.morph
+++ b/strata/core.morph
@@ -37,8 +37,8 @@ chunks:
- name: ncurses
morph: strata/core/ncurses.morph
repo: upstream:ncurses
- ref: 0fe89dc66ec061b839bea3ab451207e2dee757b9
- unpetrify-ref: baserock/morph
+ ref: f67398afa6a76fbc902cc0cea963d5151fa2a953
+ unpetrify-ref: ncurses-5.9-20150131
build-depends: []
- name: perl
morph: strata/core/perl.morph
diff --git a/strata/core/ncurses.morph b/strata/core/ncurses.morph
index c75495bc..42acb481 100644
--- a/strata/core/ncurses.morph
+++ b/strata/core/ncurses.morph
@@ -6,4 +6,40 @@ build-commands:
- make
install-commands:
- make DESTDIR="$DESTDIR" install
-- sh ncurses-morph-postinstall.sh
+post-install-commands:
+- |
+ # lfs recommends some alterations for software that looks for
+ # libcurses instead of libncurses
+ # it's more convenient to have this in a separate file than the
+ # morph as less strings have to be escaped and comments are possible
+
+ # some software expects to find libcurses in /lib
+ mkdir -p "$DESTDIR/lib"
+ mv "$DESTDIR"/"$PREFIX"/lib/libncursesw.so.5* "$DESTDIR"/lib
+ ln -sf ../../lib/libncursesw.so.5 "$DESTDIR"/"$PREFIX"/lib/libncursesw.so
+
+ # some linker tricks for libraries that look for non-wide character
+ # versions of ncurses
+ for lib in ncurses form panel menu; do
+ # remove non-wide shared object
+ rm -f "$DESTDIR/${PREFIX}/lib/lib${lib}.so"
+ # use a linker script to find the wide character variant
+ echo "INPUT(-l${lib}w)" >"$DESTDIR/${PREFIX}/lib/lib${lib}.so"
+ # symlink the non-shared library
+ ln -sf "lib${lib}w.a" "$DESTDIR/${PREFIX}/lib/lib${lib}.a"
+ done
+ ln -sf libncurses++w.a "$DESTDIR/${PREFIX}/lib/libncurses++.a"
+
+ # redirect software that looks for libcurses
+ rm -f "$DESTDIR/${PREFIX}/lib/libcursesw.so"
+ echo "INPUT(-lncursesw)" >"$DESTDIR/${PREFIX}/lib/libcursesw.so"
+ ln -sf libncurses.so "$DESTDIR/${PREFIX}/lib/libcurses.so"
+ ln -sf libncursesw.a "$DESTDIR/${PREFIX}/lib/libcursesw.a"
+ ln -sf libncurses.a "$DESTDIR/${PREFIX}/lib/libcurses.a"
+
+ # install documentation
+ mkdir -p "$DESTDIR/${PREFIX}/share/doc/ncurses"
+ cp -R doc/* "$DESTDIR/${PREFIX}/share/doc/ncurses"
+
+ # remove 'clear' and 'reset' executables, busybox provides them
+ rm -f "$DESTDIR/${PREFIX}/bin/clear" "$DESTDIR/${PREFIX}/bin/reset"