Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] bonnie++: use better cross-build patch
@ 2020-12-30 23:00 ndowens
  2021-01-04 17:03 ` [PR PATCH] [Closed]: " ndowens
  0 siblings, 1 reply; 2+ messages in thread
From: ndowens @ 2020-12-30 23:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 322 bytes --]

There is a new pull request by ndowens against master on the void-packages repository

https://github.com/ndowens/void-packages bonnie
https://github.com/void-linux/void-packages/pull/27561

bonnie++: use better cross-build patch


A patch file from https://github.com/void-linux/void-packages/pull/27561.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-bonnie-27561.patch --]
[-- Type: text/x-diff, Size: 3575 bytes --]

From 0947852a6c1280152470a2fda05410909421c449 Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 30 Dec 2020 17:01:43 -0600
Subject: [PATCH] bonnie++: use better cross-build patch

---
 .../patches/0001-fix-cross-build.patch        | 24 +++++++++++++++++++
 srcpkgs/bonnie++/patches/configure.patch      | 22 -----------------
 srcpkgs/bonnie++/template                     |  8 +++++--
 3 files changed, 30 insertions(+), 24 deletions(-)
 create mode 100644 srcpkgs/bonnie++/patches/0001-fix-cross-build.patch
 delete mode 100644 srcpkgs/bonnie++/patches/configure.patch

diff --git a/srcpkgs/bonnie++/patches/0001-fix-cross-build.patch b/srcpkgs/bonnie++/patches/0001-fix-cross-build.patch
new file mode 100644
index 00000000000..4ecbafbd9b2
--- /dev/null
+++ b/srcpkgs/bonnie++/patches/0001-fix-cross-build.patch
@@ -0,0 +1,24 @@
+From b73c6b09c0c8d3d9162848a88fbe003d477ad0e2 Mon Sep 17 00:00:00 2001
+From: Nathan Owens <ndowens@artixlinux.org>
+Date: Wed, 30 Dec 2020 16:57:45 -0600
+Subject: [PATCH] fix cross build
+
+AC_TRY_RUN fails with cross-building
+use AC_COMPILE_IFLESE instead
+---
+diff --git configure.in configure.in
+index 4e75dd2..27c053c 100644
+--- configure.in
++++ configure.in
+@@ -83,7 +83,7 @@ void * thread_func(void * param) { return NULL; }
+   , thread_ldflags="-pthread")
+ 
+ AC_SUBST(large_file)
+-AC_TRY_RUN([#ifndef _LARGEFILE64_SOURCE
++AC_COMPILE_IFELSE([#ifndef _LARGEFILE64_SOURCE
+ #define _LARGEFILE64_SOURCE
+ #endif
+ #include <stdio.h>
+-- 
+2.30.0
+
diff --git a/srcpkgs/bonnie++/patches/configure.patch b/srcpkgs/bonnie++/patches/configure.patch
deleted file mode 100644
index 91bb9c1bb61..00000000000
--- a/srcpkgs/bonnie++/patches/configure.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git configure configure
-index 4495abe..951dd7e 100755
---- configure
-+++ configure
-@@ -2664,7 +2664,7 @@ $as_echo "$ac_try_echo"; } >&5
-     else
- 	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
- $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "cannot run C compiled programs.
-+$as_echo  "cannot run C compiled programs.
- If you meant to cross compile, use \`--host'.
- See \`config.log' for more details" "$LINENO" 5 ; }
-     fi
-@@ -3953,7 +3953,7 @@ rm -f core conftest.err conftest.$ac_objext \
-     conftest$ac_exeext conftest.$ac_ext
- 
- 
--if test "$cross_compiling" = yes; then :
-+if test "$cross_compiling" = xxx; then :
-   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
- $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- as_fn_error $? "cannot run test program while cross compiling
diff --git a/srcpkgs/bonnie++/template b/srcpkgs/bonnie++/template
index 8fa4be8c3d6..7074eca54fd 100644
--- a/srcpkgs/bonnie++/template
+++ b/srcpkgs/bonnie++/template
@@ -3,6 +3,7 @@ pkgname=bonnie++
 version=1.98
 revision=1
 build_style=gnu-configure
+hostmakedepends="automake"
 short_desc="Hard Drive and Filesystem benchmark utility"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-only"
@@ -11,15 +12,18 @@ distfiles="http://www.coker.com.au/bonnie++/bonnie++-${version}.tgz"
 checksum=6e0bcbc08b78856fd998dd7bcb352d4615a99c26c2dc83d5b8345b102bad0b04
 
 post_extract() {
-	sed -i  -e 's/sbin/bin/g' \
+	vsed -i  -e 's/sbin/bin/g' \
 		-e '/-o getc_putc_helper/s/CXX/LINK/' \
 		-e '/$(LINK)/s/$/ $(LDFLAGS)/' \
 		-e 's#@mandir@#$(eprefix)/share/man#g' \
 		Makefile.in
 }
-pre_build() {
+
+pre_configure() {
+	autoreconf -fi
 	export MORECFLAGS="$CFLAGS"
 }
+
 do_install() {
 	make prefix=${DESTDIR}/usr install
 }

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PR PATCH] [Closed]: bonnie++: use better cross-build patch
  2020-12-30 23:00 [PR PATCH] bonnie++: use better cross-build patch ndowens
@ 2021-01-04 17:03 ` ndowens
  0 siblings, 0 replies; 2+ messages in thread
From: ndowens @ 2021-01-04 17:03 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 172 bytes --]

There's a closed pull request on the void-packages repository

bonnie++: use better cross-build patch
https://github.com/void-linux/void-packages/pull/27561

Description:


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-04 17:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-30 23:00 [PR PATCH] bonnie++: use better cross-build patch ndowens
2021-01-04 17:03 ` [PR PATCH] [Closed]: " ndowens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).