Simplify recipes

This commit is contained in:
Jeremy Soller 2020-05-21 11:14:24 -06:00
parent 69ef10f035
commit b2a6066871
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1
5 changed files with 19 additions and 38 deletions

View File

@ -1,6 +1,5 @@
[source]
git = "https://gitlab.redox-os.org/redox-os/acid.git"
branch = "master"
[build]
template = "cargo"

View File

@ -1,6 +1,5 @@
[source]
git = "https://gitlab.redox-os.org/redox-os/ion.git"
branch = "master"
[build]
template = "cargo"

View File

@ -8,26 +8,8 @@ dependencies = [
"zlib"
]
script = """
export CFLAGS="-I'${COOKBOOK_SYSROOT}/include'"
export LDFLAGS="-L'${COOKBOOK_SYSROOT}/lib' --static"
"${COOKBOOK_SOURCE}/configure" \
--host="${TARGET}" \
--prefix="" \
--disable-shared \
--enable-static \
COOKBOOK_CONFIGURE_FLAGS+=(
--without-python
make -j "$(nproc)"
make install DESTDIR="${COOKBOOK_STAGE}"
# Strip binaries
if [ -d "${COOKBOOK_STAGE}/bin" ]
then
find "${COOKBOOK_STAGE}/bin" -type f -exec "${TARGET}-strip" -v {} ';'
fi
# Remove libtool files
if [ -d "${COOKBOOK_STAGE}/lib" ]
then
find "${COOKBOOK_STAGE}/lib" -type f -name '*.la' -exec rm -fv {} ';'
fi
)
cookbook_configure
"""

View File

@ -18,17 +18,18 @@ chmod +w build-aux/config.sub
wget -O build-aux/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub
export CFLAGS="-static"
"./configure" \
--host="${TARGET}" \
--prefix="" \
--disable-lzmadec \
--disable-lzmainfo \
--disable-xz \
--disable-xzdec \
--enable-shared=no \
--enable-static=yes \
--enable-threads=no \
COOKBOOK_CONFIGURE="./configure"
COOKBOOK_CONFIGURE_FLAGS=(
--host="${TARGET}"
--prefix=""
--disable-lzmadec
--disable-lzmainfo
--disable-xz
--disable-xzdec
--enable-shared=no
--enable-static=yes
--enable-threads=no
--with-pic=no
make -j "$(nproc)"
make install DESTDIR="${COOKBOOK_STAGE}"
)
cookbook_configure
"""

View File

@ -6,9 +6,9 @@ template = "custom"
script = """
export LDFLAGS="--static"
# See https://stackoverflow.com/questions/21396988/zlib-build-not-configuring-properly-with-cross-compiler-ignores-ar.
CHOST="${TARGET}" "${COOKBOOK_SOURCE}/configure" \
CHOST="${TARGET}" "${COOKBOOK_CONFIGURE}" \
--prefix="" \
--static
make -j "$(nproc)"
make install DESTDIR="${COOKBOOK_STAGE}"
"${COOKBOOK_MAKE}" -j "$(nproc)"
"${COOKBOOK_MAKE}" install DESTDIR="${COOKBOOK_STAGE}"
"""