summaryrefslogtreecommitdiff
path: root/strata/core
diff options
context:
space:
mode:
Diffstat (limited to 'strata/core')
-rw-r--r--strata/core/autoconf-tarball.morph (renamed from strata/core/libtool.morph)3
-rw-r--r--strata/core/flex.morph2
-rw-r--r--strata/core/gettext-tarball.morph (renamed from strata/core/autoconf.morph)2
-rw-r--r--strata/core/gettext.morph9
-rw-r--r--strata/core/libexpat.morph7
-rw-r--r--strata/core/libtool-tarball.morph5
-rw-r--r--strata/core/nano.morph4
-rw-r--r--strata/core/ncurses.morph38
-rw-r--r--strata/core/pkg-config.morph2
-rw-r--r--strata/core/readline.morph6
-rw-r--r--strata/core/xz.morph3
11 files changed, 60 insertions, 21 deletions
diff --git a/strata/core/libtool.morph b/strata/core/autoconf-tarball.morph
index f311281d..fbdc5768 100644
--- a/strata/core/libtool.morph
+++ b/strata/core/autoconf-tarball.morph
@@ -1,6 +1,5 @@
-name: libtool
+name: autoconf-tarball
kind: chunk
-max-jobs: 1
build-system: autotools
configure-commands:
- ./configure --prefix="$PREFIX"
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/autoconf.morph b/strata/core/gettext-tarball.morph
index 046bfc40..4983b484 100644
--- a/strata/core/autoconf.morph
+++ b/strata/core/gettext-tarball.morph
@@ -1,4 +1,4 @@
-name: autoconf
+name: gettext-tarball
kind: chunk
build-system: autotools
configure-commands:
diff --git a/strata/core/gettext.morph b/strata/core/gettext.morph
deleted file mode 100644
index 3e2c56b5..00000000
--- a/strata/core/gettext.morph
+++ /dev/null
@@ -1,9 +0,0 @@
-name: gettext
-kind: chunk
-max-jobs: 1
-configure-commands:
-- ./configure --prefix=/usr
-build-commands:
-- make EXAMPLESPOFILES=
-install-commands:
-- make EXAMPLESPOFILES= DESTDIR="$DESTDIR" install
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/libtool-tarball.morph b/strata/core/libtool-tarball.morph
new file mode 100644
index 00000000..65a3edbc
--- /dev/null
+++ b/strata/core/libtool-tarball.morph
@@ -0,0 +1,5 @@
+name: libtool-tarball
+kind: chunk
+build-system: autotools
+configure-commands:
+- ./configure --prefix="$PREFIX"
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/pkg-config.morph b/strata/core/pkg-config.morph
index 090a65e5..ed35a2ac 100644
--- a/strata/core/pkg-config.morph
+++ b/strata/core/pkg-config.morph
@@ -2,4 +2,4 @@ name: pkg-config
kind: chunk
build-system: autotools
configure-commands:
-- ./configure --prefix="$PREFIX" --with-internal-glib
+- ./autogen.sh --prefix="$PREFIX" --with-internal-glib
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
diff --git a/strata/core/xz.morph b/strata/core/xz.morph
deleted file mode 100644
index 8165abdc..00000000
--- a/strata/core/xz.morph
+++ /dev/null
@@ -1,3 +0,0 @@
-name: xz
-kind: chunk
-build-system: autotools