From df1f993888c60aeb376c386edb5f2207728b3ed5 Mon Sep 17 00:00:00 2001 From: Tiago Gomes Date: Mon, 9 Feb 2015 11:53:33 +0000 Subject: 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. --- strata/core.morph | 4 ++-- strata/core/ncurses.morph | 38 +++++++++++++++++++++++++++++++++++++- 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" -- cgit v1.2.1