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" | ||||
| 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() { | ||||
|  | @ -26,7 +28,7 @@ package() { | |||
| } | ||||
| 
 | ||||
| package_doc() { | ||||
|     	cd $pkgname-$pkgver | ||||
| 	cd $pkgname-$pkgver | ||||
| 	install -d $pkgdir/usr/share/man/man1 | ||||
| 	install -Dm644 m4.1 $pkgdir/usr/share/man/man1 | ||||
| } | ||||
|  | @ -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
									
								
							
							
						
						
									
										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…
	
	Add table
		Add a link
		
	
		Reference in a new issue