GNU bug report logs -
#61994
[PATCH 0/2] fix m17n libs cross-compile.
Previous Next
Reported by: Z572 <873216071 <at> qq.com>
Date: Mon, 6 Mar 2023 05:56:01 UTC
Severity: normal
Tags: patch
Done: 宋文武 <iyzsong <at> envs.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 61994 in the body.
You can then email your comments to 61994 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#61994
; Package
guix-patches
.
(Mon, 06 Mar 2023 05:56:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Z572 <873216071 <at> qq.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Mon, 06 Mar 2023 05:56:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This patchset allow m17n-db and m17n-lib cross-compile, and add a
backport patch make sure m17n-lib cross-compile success.
Zheng Junjie (2):
gnu: m17n-db: fix cross-compile.
gnu: m17n-lib: fix cross-compile.
gnu/local.mk | 2 +
gnu/packages/emacs.scm | 28 +++-
...ib-1.8.0-use-pkg-config-for-freetype.patch | 125 ++++++++++++++++++
3 files changed, 152 insertions(+), 3 deletions(-)
create mode 100644 gnu/packages/patches/m17n-lib-1.8.0-use-pkg-config-for-freetype.patch
--
2.39.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#61994
; Package
guix-patches
.
(Mon, 06 Mar 2023 05:58:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 61994 <at> debbugs.gnu.org (full text, mbox):
* gnu/local.mk: add m17n-lib-1.8.0-use-pkg-config-for-freetype.patch.
* gnu/packages/emacs.scm(m17n-lib):
[source]: add m17n-lib-1.8.0-use-pkg-config-for-freetype.patch.
[native-inputs]: when cross-compile add pkg-config, libtool, gettext-minimal,
autoconf, automake.
[arguments]: when cross-compile, add phase to fix rpl_malloc undefined references.
* gnu/packages/patches/m17n-lib-1.8.0-use-pkg-config-for-freetype.patch: new file.
---
gnu/local.mk | 2 +
gnu/packages/emacs.scm | 25 +++-
...ib-1.8.0-use-pkg-config-for-freetype.patch | 125 ++++++++++++++++++
3 files changed, 150 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/m17n-lib-1.8.0-use-pkg-config-for-freetype.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 07a7a0f527..1e98792f54 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -56,6 +56,7 @@
# Copyright © 2022 Alex Griffin <a <at> ajgrf.com>
# Copyright © 2022 ( <paren <at> disroot.org>
# Copyright © 2022 jgart <jgart <at> dismail.de>
+# Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
#
# This file is part of GNU Guix.
#
@@ -1560,6 +1561,7 @@ dist_patch_DATA = \
%D%/packages/patches/musl-cross-locale.patch \
%D%/packages/patches/mutt-store-references.patch \
%D%/packages/patches/m4-gnulib-libio.patch \
+ %D%/packages/patches/m17n-lib-1.8.0-use-pkg-config-for-freetype.patch \
%D%/packages/patches/nautilus-extension-search-path.patch \
%D%/packages/patches/ncompress-fix-softlinks.patch \
%D%/packages/patches/ncftp-reproducible.patch \
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 3754b79ef0..194c77fea4 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -621,8 +621,16 @@ (define-public m17n-lib
version ".tar.gz"))
(sha256
(base32
- "0jp61y09xqj10mclpip48qlfhniw8gwy8b28cbzxy8hq8pkwmfkq"))))
+ "0jp61y09xqj10mclpip48qlfhniw8gwy8b28cbzxy8hq8pkwmfkq"))
+ (patches (search-patches "m17n-lib-1.8.0-use-pkg-config-for-freetype.patch"))))
(build-system gnu-build-system)
+ (native-inputs
+ (if (%current-target-system)
+ (list pkg-config
+ libtool
+ gettext-minimal
+ autoconf automake)
+ '()))
(inputs
(list fribidi
gd
@@ -631,7 +639,20 @@ (define-public m17n-lib
libxml2
m17n-db))
(arguments
- `(#:parallel-build? #f))
+ `(#:parallel-build? #f
+ ,@(if (%current-target-system)
+ '(#:phases
+ (modify-phases %standard-phases
+ ;; AC_FUNC_MALLOC and AC_FUNC_REALLOC usually unneeded
+ ;; see https://lists.gnu.org/archive/html/autoconf/2003-02/msg00017.html
+ (add-after 'unpack 'fix-rpl_malloc
+ (lambda _
+ (substitute* "configure.ac"
+ (("AC_FUNC_MALLOC") "")
+ (("AC_FUNC_REALLOC") ""))
+ ;; let bootstrap phase run.
+ (delete-file "./configure")))))
+ '())))
;; With `guix lint' the home-page URI returns a small page saying
;; that your browser does not handle frames. This triggers the "URI
;; returns suspiciously small file" warning.
diff --git a/gnu/packages/patches/m17n-lib-1.8.0-use-pkg-config-for-freetype.patch b/gnu/packages/patches/m17n-lib-1.8.0-use-pkg-config-for-freetype.patch
new file mode 100644
index 0000000000..38c311bee5
--- /dev/null
+++ b/gnu/packages/patches/m17n-lib-1.8.0-use-pkg-config-for-freetype.patch
@@ -0,0 +1,125 @@
+backport from upstream.
+
+From b468fc95150b7ca0e766e7c385a60879e65322d4 Mon Sep 17 00:00:00 2001
+From: "K. Handa" <handa <at> gnu.org>
+Date: Tue, 23 Oct 2018 00:05:46 +0900
+Subject: Use pkg-config for freetype, use %p to print a pointer
+
+---
+ ChangeLog | 5 +++++
+ configure.ac | 48 +++++++++++++++++++-----------------------------
+ src/ChangeLog | 5 +++++
+ src/chartab.c | 4 ++--
+ 4 files changed, 31 insertions(+), 31 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+index b069d89..9dfc0b0 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,8 @@
++2018-10-22 K. Handa <handa <at> gnu.org>
++
++ * configure.ac: Do not use the program freetype-config, use
++ PKG_CHECK_MODULES for checking freetype2.
++
+ 2018-02-08 K. Handa <handa <at> gnu.org>
+
+ Version 1.8.0 released.
+diff --git a/configure.ac b/configure.ac
+index 7f8b08e..3516bad 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -204,36 +204,26 @@ fi
+ AC_SUBST(OTF_LD_FLAGS)
+
+ dnl Check for Freetype2 usability.
+-AC_CHECK_PROG(HAVE_FREETYPE_CONFIG, freetype-config, yes)
+-if test "x$HAVE_FREETYPE_CONFIG" = "xyes"; then
+- FREETYPE_INC=`freetype-config --cflags`
+- save_CPPFLAGS="$CPPFLAGS"
+- CPPFLAGS="$CPPFLAGS $FREETYPE_INC"
+- AC_CHECK_HEADER(ft2build.h, HAVE_FREETYPE=yes,
+- HAVE_FREETYPE=no CPPFLAGS="$save_CPPFLAGS")
+- if test "x$HAVE_FREETYPE" = "xyes" ; then
+- save_LIBS="$LIBS"
+- LIBS="$LIBS `freetype-config --libs`"
+- AC_CHECK_LIB(freetype, FT_Init_FreeType, HAVE_FREETYPE=yes,
+- HAVE_FREETYPE=no)
+- LIBS="$save_LIBS"
+- if test "x$HAVE_FREETYPE" = "xyes"; then
+- FREETYPE_LD_FLAGS=`freetype-config --libs`
+- AC_DEFINE(HAVE_FREETYPE, 1,
+- [Define to 1 if you have FreeType library and header file.])
+- M17N_EXT_LIBS="$M17N_EXT_LIBS freetype"
+- AC_CHECK_HEADER(freetype/ftbdf.h, HAVE_FTBDF_H=yes, HAVE_FTBDF_H=no,
+- [#include <ft2build.h>
++PKG_CHECK_MODULES([FREETYPE], [freetype2], [HAVE_FREETYPE=yes],
++ [HAVE_FREETYPE=no])
++AS_IF([test "x$HAVE_FREETYPE" = "xyes"],
++ [CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS";
++ FREETYPE_LD_FLAGS=FREETYPE_LIBS;
++ AC_DEFINE([HAVE_FREETYPE], [1],
++ [Define to 1 if you have FreeType library and header file.])
++ M17N_EXT_LIBS="$M17N_EXT_LIBS freetype";
++ AC_CHECK_HEADER([freetype/ftbdf.h], [HAVE_FTBDF_H=yes], [HAVE_FTBDF_H=no],
++ [#include <ft2build.h>
+ #include FT_FREETYPE_H])
+- if test "x$HAVE_FTBDF_H" = "xyes"; then
+- AC_DEFINE(HAVE_FTBDF_H, 1,
+- [Define to 1 if you have freetype/ftbdf.h.])
+- fi
+- CONFIG_FLAGS="$CONFIG_FLAGS -DHAVE_FREETYPE"
+- fi
+- fi
+-fi
+-AC_SUBST(FREETYPE_LD_FLAGS)
++ AS_IF([test "x$HAVE_FTBDF_H" = "xyes"],
++ [AC_DEFINE([HAVE_FTBDF_H], [1],
++ [Define to 1 if you have freetype/ftbdf.h.])],
++ [])
++ CONFIG_FLAGS="$CONFIG_FLAGS -DHAVE_FREETYPE"
++ ],
++ []
++ )
++AC_SUBST([FREETYPE_LD_FLAGS])
+
+ dnl Check for Xft2 usability.
+ save_CPPFLAGS="$CPPFLAGS"
+diff --git a/src/ChangeLog b/src/ChangeLog
+index ee28ea6..8cb91c1 100644
+--- a/src/ChangeLog
++++ b/src/ChangeLog
+@@ -1,3 +1,8 @@
++2018-10-22 K. Handa <handa <at> gnu.org>
++
++ * chartab.c (dump_sub_chartab): Use %p directive to print a
++ pointer value.
++
+ 2018-02-08 K. Handa <handa <at> gnu.org>
+
+ Version 1.8.0 released.
+diff --git a/src/chartab.c b/src/chartab.c
+index d58aa65..8aeb6d7 100644
+--- a/src/chartab.c
++++ b/src/chartab.c
+@@ -558,7 +558,7 @@ dump_sub_chartab (MSubCharTable *table, void *default_value,
+ fprintf (mdebug__output, "(default nil)");
+ }
+ else
+- fprintf (mdebug__output, "(default #x%X)", (unsigned) table->default_value);
++ fprintf (mdebug__output, "(default #x%p)", table->default_value);
+
+ default_value = table->default_value;
+ if (table->contents.tables)
+@@ -589,7 +589,7 @@ dump_sub_chartab (MSubCharTable *table, void *default_value,
+ fprintf (mdebug__output, "nil)");
+ }
+ else
+- fprintf (mdebug__output, " #xx%X)", (unsigned) default_value);
++ fprintf (mdebug__output, " #x%p)", default_value);
+ }
+ }
+ fprintf (mdebug__output, ")");
+--
+cgit v1.1
+
--
2.39.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#61994
; Package
guix-patches
.
(Mon, 06 Mar 2023 05:58:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 61994 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/emacs.scm(m17n-db): fix cross-compile.
[inputs]: move gettext-minimal to ...
[native-inputs]: ... here
---
gnu/packages/emacs.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 953aad961c..3754b79ef0 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -24,6 +24,7 @@
;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith <at> outlook.com>
;;; Copyright © 2022 Zhu Zihao <all_but_last <at> 163.com>
;;; Copyright © 2023 Declan Tsien <declantsien <at> riseup.net>
+;;; Copyright © 2023 Zheng Junjie <873216071 <at> qq.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -587,7 +588,7 @@ (define-public m17n-db
(base32
"0vfw7z9i2s9np6nmx1d4dlsywm044rkaqarn7akffmb6bf1j6zv5"))))
(build-system gnu-build-system)
- (inputs
+ (native-inputs
`(("gettext" ,gettext-minimal)))
(arguments
`(#:configure-flags
--
2.39.1
Reply sent
to
宋文武 <iyzsong <at> envs.net>
:
You have taken responsibility.
(Fri, 17 Mar 2023 10:35:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Z572 <873216071 <at> qq.com>
:
bug acknowledged by developer.
(Fri, 17 Mar 2023 10:35:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 61994-done <at> debbugs.gnu.org (full text, mbox):
Z572 <873216071 <at> qq.com> writes:
> This patchset allow m17n-db and m17n-lib cross-compile, and add a
> backport patch make sure m17n-lib cross-compile success.
>
> Zheng Junjie (2):
> gnu: m17n-db: fix cross-compile.
> gnu: m17n-lib: fix cross-compile.
Pushed with small adjust for commit messages, thank you!
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 14 Apr 2023 11:24:12 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 29 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.