[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#36477] [PATCH v2 42/61] gnu: guile-sqlite3: Fix cross-compilation.
From: |
Mathieu Othacehe |
Subject: |
[bug#36477] [PATCH v2 42/61] gnu: guile-sqlite3: Fix cross-compilation. |
Date: |
Wed, 21 Aug 2019 10:54:36 +0200 |
* gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/guile.scm (guile-sqlite3)[source]: Apply previous patch,
[native-inputs]: add guile.
---
gnu/local.mk | 1 +
gnu/packages/guile.scm | 7 ++-
.../guile-sqlite3-fix-cross-compilation.patch | 55 +++++++++++++++++++
3 files changed, 61 insertions(+), 2 deletions(-)
create mode 100644
gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index a45a1a0802..1bb871a04b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -923,6 +923,7 @@ dist_patch_DATA =
\
%D%/packages/patches/guile-relocatable.patch \
%D%/packages/patches/guile-rsvg-pkgconfig.patch \
%D%/packages/patches/guile-emacs-fix-configure.patch \
+ %D%/packages/patches/guile-sqlite3-fix-cross-compilation.patch \
%D%/packages/patches/gstreamer-buffer-reset-offset.patch \
%D%/packages/patches/gtk2-respect-GUIX_GTK2_PATH.patch \
%D%/packages/patches/gtk2-respect-GUIX_GTK2_IM_MODULE_FILE.patch \
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index b07a570654..713390ada1 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -9,7 +9,7 @@
;;; Copyright © 2016, 2019 Ricardo Wurmus <address@hidden>
;;; Copyright © 2017 Andy Wingo <address@hidden>
;;; Copyright © 2017 Marius Bakke <address@hidden>
-;;; Copyright © 2017 Mathieu Othacehe <address@hidden>
+;;; Copyright © 2017, 2019 Mathieu Othacehe <address@hidden>
;;; Copyright © 2017 Tobias Geerinckx-Rice <address@hidden>
;;; Copyright © 2017, 2018 Amirouche <address@hidden>
;;; Copyright © 2018 Danny Milosavljevic <address@hidden>
@@ -521,11 +521,14 @@ Guile's foreign function interface.")
(sha256
(base32
"1nv8j7wk6b5n4p22szyi8lv8fs31rrzxhzz16gyj8r38c1fyp9qp"))
- (file-name (string-append name "-" version "-checkout"))))
+ (file-name (string-append name "-" version "-checkout"))
+ (patches
+ (search-patches "guile-sqlite3-fix-cross-compilation.patch"))))
(build-system gnu-build-system)
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
+ ("guile" ,guile-2.2)
("pkg-config" ,pkg-config)))
(inputs
`(("guile" ,guile-2.2)
diff --git a/gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch
b/gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch
new file mode 100644
index 0000000000..9ea9a47677
--- /dev/null
+++ b/gnu/packages/patches/guile-sqlite3-fix-cross-compilation.patch
@@ -0,0 +1,55 @@
+From a6e9e62a77ecc5012929613e20da23b2636450a5 Mon Sep 17 00:00:00 2001
+From: Mathieu Othacehe <address@hidden>
+Date: Mon, 25 Mar 2019 11:00:38 +0100
+Subject: [PATCH] cross compile
+
+---
+ build-aux/guile.am | 2 +-
+ configure.ac | 19 ++++++++++++-------
+ 2 files changed, 13 insertions(+), 8 deletions(-)
+
+diff --git a/build-aux/guile.am b/build-aux/guile.am
+index dc1e63f..3126372 100644
+--- a/build-aux/guile.am
++++ b/build-aux/guile.am
+@@ -16,4 +16,4 @@ EXTRA_DIST = $(SOURCES) $(NOCOMP_SOURCES)
+ GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
+ SUFFIXES = .scm .go
+ .scm.go:
+- $(AM_V_GEN)$(top_builddir)/env $(GUILE_TOOLS) compile $(GUILE_WARNINGS)
-o "$@" "$<"
++ $(AM_V_GEN)$(top_builddir)/env $(GUILE_TOOLS) compile $(GUILE_TARGET)
$(GUILE_WARNINGS) -o "$@" "$<"
+diff --git a/configure.ac b/configure.ac
+index f648fcb..2d34d0a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -21,15 +21,20 @@ PKG_CHECK_MODULES([SQLITE], [sqlite3])
+ SQLITE_LIBDIR="`"$PKG_CONFIG" sqlite3 --variable libdir`"
+ AC_SUBST([SQLITE_LIBDIR])
+
+-AC_MSG_CHECKING([whether '$SQLITE_LIBDIR/libsqlite3' is usable])
+-GUILE_CHECK([retval],
+- [(dynamic-func \"sqlite3_open_v2\"
++if test "$cross_compiling" = "no"; then
++ AC_MSG_CHECKING([whether '$SQLITE_LIBDIR/libsqlite3' is usable])
++ GUILE_CHECK([retval],
++ [(dynamic-func \"sqlite3_open_v2\"
+ (dynamic-link \"$SQLITE_LIBDIR/libsqlite3\"))])
+-if test "$retval" != 0; then
+- AC_MSG_RESULT([no])
+- AC_MSG_ERROR([failed to load '$SQLITE_LIBDIR/libsqlite3'])
++ if test "$retval" != 0; then
++ AC_MSG_RESULT([no])
++ AC_MSG_ERROR([failed to load '$SQLITE_LIBDIR/libsqlite3'])
++ else
++ AC_MSG_RESULT([yes])
++ fi
+ else
+- AC_MSG_RESULT([yes])
++ GUILE_TARGET="--target=$host_alias"
++ AC_SUBST([GUILE_TARGET])
+ fi
+
+ AC_CONFIG_FILES([Makefile sqlite3.scm])
+--
+2.17.1
+
--
2.17.1
- [bug#36477] [PATCH v2 31/61] gnu: glibc-utf8-locales: Fix cross-compilation., (continued)
- [bug#36477] [PATCH v2 31/61] gnu: glibc-utf8-locales: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 33/61] gnu: eudev: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 34/61] gnu: lvm2: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 29/61] gnu: alsa-utils: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 37/61] gnu: swig: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 36/61] gnu: openldap: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 38/61] gnu: git: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 32/61] gnu: boost: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 41/61] gnu: doxygen: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 39/61] gnu: make-linux-libre: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 42/61] gnu: guile-sqlite3: Fix cross-compilation.,
Mathieu Othacehe <=
- [bug#36477] [PATCH v2 48/61] gnu: guile-xcb: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 40/61] gnu: procps: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 49/61] gnu: guile-wm: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 43/61] gnu: guile-gcrypt: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 44/61] gnu: libtool: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 50/61] gnu: cmake: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 52/61] gnu: mdadm: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 54/61] linux-initrd: Use native gzip., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 46/61] gnu: libnl: Fix cross-compilation., Mathieu Othacehe, 2019/08/21
- [bug#36477] [PATCH v2 45/61] gnu: texinfo-4: Fix cross compilation, Mathieu Othacehe, 2019/08/21