om4: fix cross builds
This commit is contained in:
parent
631b9634ed
commit
4fe1e5a8a7
2 changed files with 29 additions and 2 deletions
|
@ -4,18 +4,20 @@ pkgrel=1
|
||||||
deps="musl"
|
deps="musl"
|
||||||
bad=""
|
bad=""
|
||||||
ext="doc"
|
ext="doc"
|
||||||
|
auto_cross
|
||||||
|
|
||||||
fetch() {
|
fetch() {
|
||||||
curl -L "https://github.com/ibara/m4/releases/download/om4-6.7/om4-6.7.tar.gz" -o $pkgname-$pkgver.tar.xz
|
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
|
tar -xf $pkgname-$pkgver.tar.xz
|
||||||
cd $pkgname-$pkgver
|
cd $pkgname-$pkgver
|
||||||
patch -p1 < ../../m4-hand-written-lexer.patch
|
patch -p1 < ../../m4-hand-written-lexer.patch
|
||||||
|
patch -p1 < ../../configure.patch
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd $pkgname-$pkgver
|
cd $pkgname-$pkgver
|
||||||
./configure --prefix=/
|
./configure --prefix=/
|
||||||
make
|
make -j1
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
|
@ -35,3 +37,7 @@ license() {
|
||||||
cd $pkgname-$pkgver
|
cd $pkgname-$pkgver
|
||||||
echo "Source are a combination of BSD and ISC licensed files"
|
echo "Source are a combination of BSD and ISC licensed files"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
backup() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
21
base/om4/configure.patch
Normal file
21
base/om4/configure.patch
Normal 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
|
Loading…
Reference in a new issue