om4: fix cross builds

This commit is contained in:
Ella Stanforth 2022-04-21 10:04:29 +00:00
parent 631b9634ed
commit 4fe1e5a8a7
2 changed files with 29 additions and 2 deletions

View file

@ -4,18 +4,20 @@ pkgrel=1
deps="musl"
bad=""
ext="doc"
auto_cross
fetch() {
curl -L "https://github.com/ibara/m4/releases/download/om4-6.7/om4-6.7.tar.gz" -o $pkgname-$pkgver.tar.xz
tar -xf $pkgname-$pkgver.tar.xz
cd $pkgname-$pkgver
patch -p1 < ../../m4-hand-written-lexer.patch
patch -p1 < ../../configure.patch
}
build() {
cd $pkgname-$pkgver
./configure --prefix=/
make
make -j1
}
package() {
@ -35,3 +37,7 @@ license() {
cd $pkgname-$pkgver
echo "Source are a combination of BSD and ISC licensed files"
}
backup() {
return
}

21
base/om4/configure.patch Normal file
View file

@ -0,0 +1,21 @@
--- a/configure
+++ b/configure
@@ -10,16 +10,8 @@
EOF
$CC -o conftest conftest.c > /dev/null 2>&1
if [ $? -eq 0 ] ; then
+ cc="$CC"
+ return 0
- ./conftest
- if [ $? -eq 0 ] ; then
- rm -f conftest conftest.c
- cc="$CC"
- return 0
- else
- echo "could not build working executables"
- echo "Please ensure your C compiler is a native compiler"
- exit 1
- fi
else
rm -f conftest conftest.c
fi