flashrom: fix build for make 4.3, gcc 10
This commit is contained in:
parent
2c85fd1f3b
commit
5cbd3a7d76
|
@ -12,7 +12,23 @@ homepage="https://www.flashrom.org"
|
|||
distfiles=https://github.com/flashrom/flashrom/archive/v$version.tar.gz
|
||||
checksum=a5bac412cefb87bb426912fed46ccc38799d088a9b92dbe7bac38c5df016d9b2
|
||||
|
||||
pre_build() {
|
||||
vsed -i "s:sbin:bin:g" Makefile
|
||||
vsed -i 's/u_int\([0-9]*\)_t/uint\1_t/' $(find -name '*.[ch]')
|
||||
post_patch() {
|
||||
# The Makefile detection is fragile!!!
|
||||
# It doesn't defend against __attribute__("something")
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
x86_64* | i686*) _arch=x86 ;;
|
||||
aarch64* | arm*) _arch=arm ;;
|
||||
ppc*) _arch=ppc ;;
|
||||
mips*) _arch=mips ;;
|
||||
*) msg_error "Unknown arch\n" ;;
|
||||
esac
|
||||
case "$XBPS_TARGET_ENDIAN" in
|
||||
be) _endian=big ;;
|
||||
le) _endian=little ;;
|
||||
esac
|
||||
vsed -i -e 's/^override TARGET_OS :=.*/TARGET_OS := Linux/' \
|
||||
-e "s/^override ARCH :=.*/ARCH := $_arch/" \
|
||||
-e "s/^override ENDIAN :=.*/ENDIAN := $_endian/" \
|
||||
-e 's/sbin/bin/' \
|
||||
Makefile
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue