Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] diction: add proper patch for cross-build
@ 2021-01-03 14:44 ndowens
  2021-01-04 16:57 ` [PR REVIEW] " sgn
  2021-01-04 16:58 ` [PR PATCH] [Closed]: " ndowens
  0 siblings, 2 replies; 3+ messages in thread
From: ndowens @ 2021-01-03 14:44 UTC (permalink / raw)
  To: ml

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

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

https://github.com/ndowens/void-packages diction
https://github.com/void-linux/void-packages/pull/27633

diction: add proper patch for cross-build


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

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

From 4dfb44ee55bbd43c8ad5d00063e7b50248a64fa8 Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Sun, 3 Jan 2021 08:27:04 -0600
Subject: [PATCH] diction: add proper patch for cross-build

---
 srcpkgs/diction/patches/0001-fix-cross.patch | 48 ++++++++++++++++++++
 srcpkgs/diction/template                     | 14 ++----
 2 files changed, 53 insertions(+), 9 deletions(-)
 create mode 100644 srcpkgs/diction/patches/0001-fix-cross.patch

diff --git a/srcpkgs/diction/patches/0001-fix-cross.patch b/srcpkgs/diction/patches/0001-fix-cross.patch
new file mode 100644
index 00000000000..4bcd2f95a46
--- /dev/null
+++ b/srcpkgs/diction/patches/0001-fix-cross.patch
@@ -0,0 +1,48 @@
+From 27fb43ea79be3caefd109a082f4744efb925605c Mon Sep 17 00:00:00 2001
+From: Nathan Owens <ndowens@artixlinux.org>
+Date: Sun, 3 Jan 2021 08:44:42 -0600
+Subject: [PATCH] fix cross
+
+---
+ configure.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git configure.in configure.in
+index 1e4dac4..44ee54f 100644
+--- configure.in
++++ configure.in
+@@ -34,7 +34,7 @@ AC_CHECK_FUNCS(strerror)
+ AC_SEARCH_LIBS(regcomp, [regex pcre])
+ 
+ AC_MSG_CHECKING(for broken realloc)
+-AC_TRY_RUN([#include <sys/types.h>
++AC_COMPILE_IFELSE([#include <sys/types.h>
+ #include <signal.h>
+ #include <stdlib.h>
+ 
+@@ -49,7 +49,7 @@ int main(void)
+   realloc((void*)0,1);
+   exit(0);
+ }
+-],AC_MSG_RESULT(no),AC_DEFINE(BROKEN_REALLOC) AC_MSG_RESULT(yes))
++],AC_MSG_RESULT(no),AC_DEFINE([BROKEN_REALLOC, [1], [Define broken realloc]]) AC_MSG_RESULT(yes))
+ 
+ USE_NLS=no
+ AC_CHECK_PROG(MSGFMT,msgfmt,yes,no)
+@@ -58,11 +58,11 @@ then
+   AC_CHECK_HEADERS(libintl.h,[LIBINTL=yes])
+   if test "$LIBINTL" = yes
+   then
+-    AC_SEARCH_LIBS(gettext,intl,[AC_DEFINE(HAVE_GETTEXT) USE_NLS=yes])
++    AC_SEARCH_LIBS(gettext,intl,[AC_DEFINE([HAVE_GETTEXT, [1], [Define HAVE_GETTEXT]]) USE_NLS=yes])
+   fi
+ fi
+ 
+-AC_DEFINE_UNQUOTED(VERSION,"$VERSION")
++AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Define VERSION])
+ AC_SUBST(VERSION)
+ AC_SUBST(UPDATED)
+ eval DATADIR=$datadir
+-- 
+2.30.0
+
diff --git a/srcpkgs/diction/template b/srcpkgs/diction/template
index 0a141dffb58..1ad579d15a2 100644
--- a/srcpkgs/diction/template
+++ b/srcpkgs/diction/template
@@ -3,18 +3,14 @@ pkgname=diction
 version=1.11
 revision=1
 build_style=gnu-configure
+hostmakedepends="automake"
 short_desc="Writing style checkers, diction and style"
 maintainer="Rui Abreu Ferreira <raf-ep@gmx.com>"
-license="GPL-3"
+license="GPL-3.0-only"
 homepage="https://www.gnu.org/software/diction/diction.html"
 distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.gz"
 checksum=35c2f1bf8ddf0d5fa9f737ffc8e55230736e5d850ff40b57fdf5ef1d7aa024f6
 
-if [ -n "$CROSS_BUILD" ]; then
-	pre_configure() {
-		# cannot check for broken realloc when cross compiling
-		# but we know from native build that it’s not broken
-		# so remove the check (default is not broken)
-		sed -i -e "/checking for broken realloc/,/USE_NLS=no/ {/USE_NLS=no/!d}" configure
-	}
-fi
+pre_configure() {
+	autoreconf -fi
+}

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

* Re: [PR REVIEW] diction: add proper patch for cross-build
  2021-01-03 14:44 [PR PATCH] diction: add proper patch for cross-build ndowens
@ 2021-01-04 16:57 ` sgn
  2021-01-04 16:58 ` [PR PATCH] [Closed]: " ndowens
  1 sibling, 0 replies; 3+ messages in thread
From: sgn @ 2021-01-04 16:57 UTC (permalink / raw)
  To: ml

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

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/27633#discussion_r551441603

Comment:
The brokenness of `realloc` couldn't be determined by compiling and linking.
We need to run it. Or as the old code does, specify what we know.

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

* Re: [PR PATCH] [Closed]: diction: add proper patch for cross-build
  2021-01-03 14:44 [PR PATCH] diction: add proper patch for cross-build ndowens
  2021-01-04 16:57 ` [PR REVIEW] " sgn
@ 2021-01-04 16:58 ` ndowens
  1 sibling, 0 replies; 3+ messages in thread
From: ndowens @ 2021-01-04 16:58 UTC (permalink / raw)
  To: ml

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

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

diction: add proper patch for cross-build
https://github.com/void-linux/void-packages/pull/27633

Description:


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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-03 14:44 [PR PATCH] diction: add proper patch for cross-build ndowens
2021-01-04 16:57 ` [PR REVIEW] " sgn
2021-01-04 16:58 ` [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).