From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: giggle: Fix cross build
Date: Tue, 15 Dec 2020 11:03:49 +0100 [thread overview]
Message-ID: <20201215100349.tNa2zyBEc-qk9sIol9GrNDgBZ9CjyWITIGXwx8wswPQ@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-27151@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 3830 bytes --]
New comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/27151#issuecomment-745184523
Comment:
Anyway, `giggle` crashed in all of my machine :-p. So, you can try this patch and tell, I don't have time for now.
```diff
srcpkgs/giggle/patches/cross.patch | 61 ++++++++++++++++++++++++++++++++++++++
srcpkgs/giggle/template | 12 ++++++--
2 files changed, 70 insertions(+), 3 deletions(-)
diff --git a/srcpkgs/giggle/patches/cross.patch b/srcpkgs/giggle/patches/cross.patch
new file mode 100644
index 0000000000..889d750289
--- /dev/null
+++ b/srcpkgs/giggle/patches/cross.patch
@@ -0,0 +1,61 @@
+diff --git configure.ac configure.ac
+index a7011f8..1ab7a52 100644
+--- configure.ac
++++ configure.ac
+@@ -125,30 +125,6 @@ dnl ----------------------
+
+ AC_DEFINE(_GNU_SOURCE, 1, [Enable GNU Extensions])
+
+-dnl Make sure that strptime can be used (read: has gnu extensions)
+-AC_MSG_CHECKING([for GNU extensions of strptime()])
+-AC_RUN_IFELSE(
+- [AC_LANG_PROGRAM(
+- [[#include <time.h>]],
+- [[const char* date = "1168635922 +0100"; struct tm tm;
+- char const* returned = strptime(date, "%s %z", &tm);
+- return (!returned || *returned ? 1 : 0);]])],
+- [AC_MSG_RESULT(available)
+- AC_DEFINE([STRPTIME_HAS_GNU], [1],
+- [strptime() has GNU extensions %s and %z])],
+- [AC_MSG_RESULT(not available)])
+-
+-dnl Figure out which format string to use for time_t
+-AC_MSG_CHECKING([size of time_t type])
+-AC_RUN_IFELSE(
+- [AC_LANG_PROGRAM(
+- [[#include <time.h>]],
+- [[return (sizeof (time_t) == sizeof (long) ? 0 : 1);]])],
+- [AC_MSG_RESULT(long)
+- AC_DEFINE([GIGGLE_FORMAT_TIME_T], ["ld"], [format string for time_t])],
+- [AC_MSG_RESULT(int)
+- AC_DEFINE([GIGGLE_FORMAT_TIME_T], ["d"], [format string for time_t])])
+-
+ dnl ------------------
+ dnl | Language Support |---------------------------------------
+ dnl ------------------
+diff --git libgiggle-git/giggle-git-revisions.c libgiggle-git/giggle-git-revisions.c
+index d074d5c..692781d 100644
+--- libgiggle-git/giggle-git-revisions.c
++++ libgiggle-git/giggle-git-revisions.c
+@@ -130,7 +130,7 @@ git_revisions_get_command_line (GiggleJob *job,
+ static struct tm *
+ git_revisions_get_time (const gchar *date)
+ {
+-#if STRPTIME_HAS_GNU
++#ifdef __GLIBC__
+ const gchar *returned;
+ struct tm *tm;
+
+@@ -145,9 +145,11 @@ git_revisions_get_time (const gchar *date)
+ return tm;
+ #else
+ struct tm *tm = g_new0 (struct tm, 1);
++ long ltime;
+ time_t time;
+
+- sscanf (date, "%" GIGGLE_FORMAT_TIME_T, &time);
++ sscanf (date, "%ld", <ime);
++ time = ltime;
+ localtime_r (&time, tm);
+
+ return tm;
diff --git a/srcpkgs/giggle/template b/srcpkgs/giggle/template
index 9da1147375..1984fed3f6 100644
--- a/srcpkgs/giggle/template
+++ b/srcpkgs/giggle/template
@@ -1,9 +1,10 @@
# Template file for 'giggle'
pkgname=giggle
version=0.7
-revision=1
+revision=2
build_style=gnu-configure
-hostmakedepends="pkg-config itstool intltool glib-devel git"
+hostmakedepends="pkg-config itstool intltool glib-devel git
+ automake gettext-devel libtool tar yelp-tools"
makedepends="gtksourceview-devel vte290-devel"
depends="desktop-file-utils hicolor-icon-theme"
short_desc="Git repository viewer"
@@ -13,10 +14,15 @@ homepage="https://wiki.gnome.org/Apps/giggle"
distfiles="${GNOME_SITE}/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
checksum=ae2e2237fa0d0999d99d0a0ee9b7ec147e80bd2472d59a045b2b01eb02261f59
lib32disabled=yes
-nocross=yes
CFLAGS="-fcommon"
+pre_configure() {
+ autoreconf -fi
+ intltoolize --force
+ autoreconf
+}
+
libgiggle_package() {
short_desc+=" - runtime libraries"
pkg_install() {
```
next prev parent reply other threads:[~2020-12-15 10:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-14 16:36 [PR PATCH] " ndowens
2020-12-14 16:36 ` [PR PATCH] [Updated] " ndowens
2020-12-15 8:57 ` sgn
2020-12-15 10:03 ` sgn [this message]
2020-12-18 0:27 ` sgn
2020-12-18 0:27 ` [PR PATCH] [Closed]: " sgn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201215100349.tNa2zyBEc-qk9sIol9GrNDgBZ9CjyWITIGXwx8wswPQ@z \
--to=sgn@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).