diff --git a/srcpkgs/gnu-efi-libs/template b/srcpkgs/gnu-efi-libs/template index 0cb59b461f..a34ea49a9e 100644 --- a/srcpkgs/gnu-efi-libs/template +++ b/srcpkgs/gnu-efi-libs/template @@ -1,37 +1,50 @@ # Template file for 'gnu-efi-libs' pkgname=gnu-efi-libs reverts="3.0w_1" # Not an actual revert, xbps considers 3.0w higher than 3.0.8 -version=3.0.8 -revision=2 +version=3.0.9 +revision=1 wrksrc="gnu-efi-${version}" makedepends="pciutils-devel" -nostrip=yes short_desc="Library for building UEFI Applications using GNU toolchain" -maintainer="Juan RP " +maintainer="maxice8 " license="GPL-2.0-or-later" homepage="http://sourceforge.net/projects/gnu-efi/" distfiles="${SOURCEFORGE_SITE}/gnu-efi/gnu-efi-${version}.tar.bz2" -checksum=76006d8ea8d67bcf72f35d09d43e9ef6a69400d6d5d4bf64baf1ab7434e2b722 +checksum=6715ea7eae1c7e4fc5041034bd3f107ec2911962ed284a081e491646b12277f0 +nostrip=yes + +# If we are cross-building we need to pass the cross-compilation triplet +# to the CROSS_COMPILE environment variable so the build system uses +# the cross tooling +if [ "$CROSS_BUILD" ]; then + export CROSS_COMPILE=${XBPS_CROSS_TRIPLET}- +fi + +# Filter out arches for the host machine +# the makefile only accept specific names like ia32 for i686 +# and arm for all armv*, we also get to remove the musl specifiers +case "$XBPS_MACHINE" in + x86_64*) HOST_ARCH=x86_64 ;; + i686*) HOST_ARCH=ia32 ;; + arm*) HOST_ARCH=arm ;; + aarch64*) HOST_ARCH=aarch64 ;; +esac + +# Filter our arches for the target machines +# the same rules as above apply, we also get a chance to declare +# broken= here for unsupported configurations +case "$XBPS_TARGET_MACHINE" in + x86_64*) TARGET_ARCH=x86_64 ;; + i686*) TARGET_ARCH=ia32 ;; + arm*) TARGET_ARCH=arm ;; + aarch64*) TARGET_ARCH=aarch64 ;; + *) broken="${XBPS_TARGET_MACHINE} is untested, please add support if possible" ;; +esac do_build() { - unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS - make lib gnuefi inc apps + make ARCH=${TARGET_ARCH} HOSTARCH=${HOST_ARCH} } do_install() { - make INSTALLROOT=${DESTDIR} PREFIX=/usr LIBDIR=/usr/lib install - - case "$XBPS_TARGET_MACHINE" in - i686*) _EFI_ARCH="ia32";; - x86_64*) _EFI_ARCH="x86_64";; - esac - vmkdir usr/share/gnu-efi/apps/${_EFI_ARCH} - - if [ "${XBPS_MACHINE%-musl}" = "i686" ]; then - HOST_ARCH="ia32" - else - HOST_ARCH="${XBPS_MACHINE/-musl//}" - fi - - install -Dm644 "$HOST_ARCH"/apps/*.efi ${DESTDIR}/usr/share/gnu-efi/apps/${_EFI_ARCH} + make ARCH=${TARGET_ARCH} INSTALLROOT=${DESTDIR} PREFIX=/usr LIBDIR=/usr/lib install }