Add libxml2 and xz recipe.toml

This commit is contained in:
Jeremy Soller 2020-05-20 21:16:30 -06:00
parent 21a4106dc7
commit a555a6d865
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1
2 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,33 @@
[source]
tar = "ftp://xmlsoft.org/libxml2/libxml2-2.9.9.tar.gz"
[build]
template = "custom"
dependencies = [
"xz",
"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 \
--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
"""

34
recipes/xz/recipe.toml Normal file
View File

@ -0,0 +1,34 @@
[source]
tar = "https://codeload.github.com/xz-mirror/xz/tar.gz/v5.2.3"
patches = [
"01-no-poll.patch",
"02-o_noctty.patch",
"03-no-signals.patch"
]
[build]
template = "custom"
script = """
#TODO: simpler recipe
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
./autogen.sh
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 \
--with-pic=no
make -j "$(nproc)"
make install DESTDIR="${COOKBOOK_STAGE}"
"""