From ab6c622e801c15627beac5cdc0e0f6d9270316aa Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Thu, 1 Feb 2018 11:43:22 +0100 Subject: added package patch support building up to libtirpc --- packages-i486-stage1/cracklib | 11 +++++++++++ packages-i486-stage1/libtirpc | 19 +++++++++++++++++++ packages-i486-stage1/openssl | 12 ++++++++++++ packages-i486-stage1/pambase | 2 ++ packages-i486-stage1/zlib | 6 ++++++ 5 files changed, 50 insertions(+) create mode 100644 packages-i486-stage1/cracklib create mode 100644 packages-i486-stage1/libtirpc create mode 100644 packages-i486-stage1/openssl create mode 100644 packages-i486-stage1/pambase create mode 100644 packages-i486-stage1/zlib (limited to 'packages-i486-stage1') diff --git a/packages-i486-stage1/cracklib b/packages-i486-stage1/cracklib new file mode 100644 index 0000000..318e22a --- /dev/null +++ b/packages-i486-stage1/cracklib @@ -0,0 +1,11 @@ +# cracklib is needed by pam +SYSROOT_INSTALL=1 + +# prepare configure for cross-compilation +sed -i "s@./configure@./configure --host=$TARGET_ARCH --build=$BUILD_ARCH@" PKGBUILD + +# the dictionary cannot be created while packaging by calling the cross-compiled tool! +# we are not interested in an actually running cracklib doing some security checks, just in the library +#./util/cracklib-packer: line 117: /home/cross/build/cracklib/src/cracklib-2.9.6/util/.libs/lt-cracklib-packer: No such file or directory +sed -i 's/\( \+sh\)/#\1/g' PKGBUILD +sed -i 's/\( \+ | sh\)/#\1/g' PKGBUILD diff --git a/packages-i486-stage1/libtirpc b/packages-i486-stage1/libtirpc new file mode 100644 index 0000000..58b2b4f --- /dev/null +++ b/packages-i486-stage1/libtirpc @@ -0,0 +1,19 @@ +# libtirpc is needed by pam +SYSROOT_INSTALL=1 + +# prepare configure for cross-compilation +sed -i "s@./configure@./configure --host=$TARGET_ARCH --build=$BUILD_ARCH@" PKGBUILD + +# disable Kerberos +sed -i "/depends=/s/'krb5'//" PKGBUILD + +# gssapi seems also to be a dependency, not in PKBUILD, disable it +sed -i 's@./configure@./configure --disable-gssapi@g' PKGBUILD + +# doens't really like to be cross-compiled.. +# xdr_sizeof.c:93:13: error: 'uintptr_t' undeclared (first use in this function); did you mean '__intptr_t'? +# => https://bugzilla.redhat.com/show_bug.cgi?id=1482063 +# => libtirpc-1.0.2-stdint.patch +sed -i 's@source=(@source=(libtirpc-1.0.2-stdint.patch @' PKGBUILD +sed -i "s@sha1sums=(@sha1sums=('0322752c231884c5434b4e56a3c376d7bfedf9d9' @" PKGBUILD +sed -i '/build()/ i \ prepare() { \n\ cd ${pkgname}-${pkgver}\n\ patch -Np1 < ${srcdir}/libtirpc-1.0.2-stdint.patch \n }' PKGBUILD diff --git a/packages-i486-stage1/openssl b/packages-i486-stage1/openssl new file mode 100644 index 0000000..6e67468 --- /dev/null +++ b/packages-i486-stage1/openssl @@ -0,0 +1,12 @@ +# openssl is needed for a lot of packages, most prominently for 'coreutils' +SYSROOT_INSTALL=1 + +# prepare configure for cross-compilation +# see https://how-to-build-for-arm.wikispaces.com/openssl +sed -i "s@'i686'@'$TARGET_CPU'@g" PKGBUILD +sed -i "s@'linux-elf'@'linux-generic32'@g" PKGBUILD +sed -i 's@shared no-ssl3-method ${optflags}@shared ${optflags}@' PKGBUILD +sed -i "s@make@make TARGETMACH=$TARGET_ARCH BUILDMACH=$BUILD_ARCH CROSS=$TARGET_ARCH CC=$TARGET_ARCH-cc LD=$TARGET_ARCH-ld AS=$TARGET_ARCH-as@g" PKGBUILD + +# TODO: bc is needed in the chroot to rebuild bc later, either build bc +# inside chroot or cross-compile here diff --git a/packages-i486-stage1/pambase b/packages-i486-stage1/pambase new file mode 100644 index 0000000..5cdb578 --- /dev/null +++ b/packages-i486-stage1/pambase @@ -0,0 +1,2 @@ +# pambase is needed by pam +SYSROOT_INSTALL=1 diff --git a/packages-i486-stage1/zlib b/packages-i486-stage1/zlib new file mode 100644 index 0000000..32df420 --- /dev/null +++ b/packages-i486-stage1/zlib @@ -0,0 +1,6 @@ +# zlib is needed by cracklib, binutils, curl, file, libarchive, ... +SYSROOT_INSTALL=1 + +# prepare configure for cross-compilation +sed -i "1!N; /autoreconf.*\n/ s@./configure@./configure --host=$TARGET_ARCH --build=$BUILD_ARCH@" PKGBUILD +sed -i "s@make@make TARGETMACH=$TARGET_ARCH BUILDMACH=$BUILD_ARCH CROSS=$TARGET_ARCH CC=$TARGET_ARCH-cc LD=$TARGET_ARCH-ld AS=$TARGET_ARCH-as@g" PKGBUILD -- cgit v1.2.3-70-g09d2