diff options
Diffstat (limited to 'strata/core')
-rw-r--r-- | strata/core/flex.morph | 2 | ||||
-rw-r--r-- | strata/core/libexpat.morph | 7 | ||||
-rw-r--r-- | strata/core/nano.morph | 4 | ||||
-rw-r--r-- | strata/core/ncurses.morph | 38 | ||||
-rw-r--r-- | strata/core/readline.morph | 6 |
5 files changed, 52 insertions, 5 deletions
diff --git a/strata/core/flex.morph b/strata/core/flex.morph index 7ca8f538..615bf79e 100644 --- a/strata/core/flex.morph +++ b/strata/core/flex.morph @@ -1,5 +1,7 @@ name: flex kind: chunk +pre-configure-commands: +- autoreconf -ivf configure-commands: - ./configure --prefix="$PREFIX" build-commands: diff --git a/strata/core/libexpat.morph b/strata/core/libexpat.morph index 1e0fe696..b36a67aa 100644 --- a/strata/core/libexpat.morph +++ b/strata/core/libexpat.morph @@ -1,9 +1,8 @@ name: libexpat kind: chunk configure-commands: -- autoreconf -i -- ./configure --prefix="${PREFIX-/usr}" +- mkdir o && cd o && cmake -DCMAKE_INSTALL_PREFIX=/usr .. build-commands: -- make +- cd o && make install-commands: -- make DESTDIR="$DESTDIR" install +- cd o && make DESTDIR="$DESTDIR" install diff --git a/strata/core/nano.morph b/strata/core/nano.morph new file mode 100644 index 00000000..6a55dc2d --- /dev/null +++ b/strata/core/nano.morph @@ -0,0 +1,4 @@ +name: nano +kind: chunk +pre-configure-commands: +- autoreconf -ivf 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" diff --git a/strata/core/readline.morph b/strata/core/readline.morph new file mode 100644 index 00000000..511e124c --- /dev/null +++ b/strata/core/readline.morph @@ -0,0 +1,6 @@ +name: readline +kind: chunk +build-system: autotools +pre-configure-commands: +- cp /usr/share/automake*/config.guess support +- cp /usr/share/automake*/config.sub support |