mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-22 18:49:14 -05:00
gnu: boost: Fix ICU support.
* gnu/packages/patches/boost-fix-icu-build.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/boost.scm (boost)[source]: Add the patch. [arguments]: In the custom configure phase, pass --with-icu=[...] to ./bootstrap.sh
This commit is contained in:
parent
df17d50805
commit
713c975ac0
3 changed files with 63 additions and 4 deletions
|
@ -578,6 +578,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/bcftools-regidx-unsigned-char.patch \
|
%D%/packages/patches/bcftools-regidx-unsigned-char.patch \
|
||||||
%D%/packages/patches/binutils-loongson-workaround.patch \
|
%D%/packages/patches/binutils-loongson-workaround.patch \
|
||||||
%D%/packages/patches/blast+-fix-makefile.patch \
|
%D%/packages/patches/blast+-fix-makefile.patch \
|
||||||
|
%D%/packages/patches/boost-fix-icu-build.patch \
|
||||||
%D%/packages/patches/byobu-writable-status.patch \
|
%D%/packages/patches/byobu-writable-status.patch \
|
||||||
%D%/packages/patches/cairo-CVE-2016-9082.patch \
|
%D%/packages/patches/cairo-CVE-2016-9082.patch \
|
||||||
%D%/packages/patches/calibre-no-updates-dialog.patch \
|
%D%/packages/patches/calibre-no-updates-dialog.patch \
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2014 John Darrington <jmd@gnu.org>
|
;;; Copyright © 2014 John Darrington <jmd@gnu.org>
|
||||||
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
|
;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
|
||||||
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
|
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
|
||||||
;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
|
;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
|
||||||
;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
|
||||||
|
@ -52,7 +52,8 @@ (define-public boost
|
||||||
".tar.bz2"))
|
".tar.bz2"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1aaw48cmimsskzgiclwn0iifp62a5iw9cbqrhfari876af1828ap"))))
|
"1aaw48cmimsskzgiclwn0iifp62a5iw9cbqrhfari876af1828ap"))
|
||||||
|
(patches (search-patches "boost-fix-icu-build.patch"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(inputs `(("icu4c" ,icu4c)
|
(inputs `(("icu4c" ,icu4c)
|
||||||
("zlib" ,zlib)))
|
("zlib" ,zlib)))
|
||||||
|
@ -81,8 +82,9 @@ (define-public boost
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(delete 'bootstrap)
|
(delete 'bootstrap)
|
||||||
(replace 'configure
|
(replace 'configure
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(let ((icu (assoc-ref inputs "icu4c"))
|
||||||
|
(out (assoc-ref outputs "out")))
|
||||||
(substitute* '("libs/config/configure"
|
(substitute* '("libs/config/configure"
|
||||||
"libs/spirit/classic/phoenix/test/runtest.sh"
|
"libs/spirit/classic/phoenix/test/runtest.sh"
|
||||||
"tools/build/doc/bjam.qbk"
|
"tools/build/doc/bjam.qbk"
|
||||||
|
@ -96,6 +98,9 @@ (define-public boost
|
||||||
|
|
||||||
(invoke "./bootstrap.sh"
|
(invoke "./bootstrap.sh"
|
||||||
(string-append "--prefix=" out)
|
(string-append "--prefix=" out)
|
||||||
|
;; Auto-detection looks for ICU only in traditional
|
||||||
|
;; install locations.
|
||||||
|
(string-append "--with-icu=" icu)
|
||||||
"--with-toolset=gcc"))))
|
"--with-toolset=gcc"))))
|
||||||
(replace 'build
|
(replace 'build
|
||||||
(lambda* (#:key make-flags #:allow-other-keys)
|
(lambda* (#:key make-flags #:allow-other-keys)
|
||||||
|
|
53
gnu/packages/patches/boost-fix-icu-build.patch
Normal file
53
gnu/packages/patches/boost-fix-icu-build.patch
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
Pass -std=c++11 when compiling files that include the ICU headers. Without
|
||||||
|
this flag, compilation fails and causes Boost's build system to remove ICU
|
||||||
|
support. Note that $(pkg-config --variable=CXXFLAGS icu-uc) includes
|
||||||
|
"-std=c++11", but Boost's build system does not use 'pkg-config'.
|
||||||
|
|
||||||
|
--- boost_1_66_0/libs/locale/build/Jamfile.v2.orig 2017-12-13 18:56:44.000000000 -0500
|
||||||
|
+++ boost_1_66_0/libs/locale/build/Jamfile.v2 2018-04-08 15:18:58.673025760 -0400
|
||||||
|
@@ -65,8 +65,8 @@
|
||||||
|
|
||||||
|
if $(ICU_LINK)
|
||||||
|
{
|
||||||
|
- ICU_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin <runtime-link>shared ;
|
||||||
|
- ICU64_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin64 <runtime-link>shared ;
|
||||||
|
+ ICU_OPTS = <include>$(ICU_PATH)/include <cxxflags>-std=c++11 <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin <runtime-link>shared ;
|
||||||
|
+ ICU64_OPTS = <include>$(ICU_PATH)/include <cxxflags>-std=c++11 <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin64 <runtime-link>shared ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@@ -121,6 +121,7 @@
|
||||||
|
explicit icuuc icudt icuin ;
|
||||||
|
|
||||||
|
ICU_OPTS = <include>$(ICU_PATH)/include
|
||||||
|
+ <cxxflags>-std=c++11
|
||||||
|
<library>icuuc/<link>shared/<runtime-link>shared
|
||||||
|
<library>icudt/<link>shared/<runtime-link>shared
|
||||||
|
<library>icuin/<link>shared/<runtime-link>shared
|
||||||
|
@@ -180,6 +181,7 @@
|
||||||
|
explicit icuuc_64 icudt_64 icuin_64 ;
|
||||||
|
|
||||||
|
ICU64_OPTS = <include>$(ICU_PATH)/include
|
||||||
|
+ <cxxflags>-std=c++11
|
||||||
|
<library>icuuc_64/<link>shared/<runtime-link>shared
|
||||||
|
<library>icudt_64/<link>shared/<runtime-link>shared
|
||||||
|
<library>icuin_64/<link>shared/<runtime-link>shared
|
||||||
|
--- boost_1_66_0/libs/regex/build/Jamfile.v2.orig 2017-12-13 18:56:48.000000000 -0500
|
||||||
|
+++ boost_1_66_0/libs/regex/build/Jamfile.v2 2018-04-08 15:20:40.865532505 -0400
|
||||||
|
@@ -44,7 +44,7 @@
|
||||||
|
|
||||||
|
if $(ICU_LINK)
|
||||||
|
{
|
||||||
|
- ICU_OPTS = <include>$(ICU_PATH)/include <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin <define>BOOST_HAS_ICU=1 <runtime-link>shared ;
|
||||||
|
+ ICU_OPTS = <include>$(ICU_PATH)/include <cxxflags>-std=c++11 <linkflags>$(ICU_LINK) <dll-path>$(ICU_PATH)/bin <define>BOOST_HAS_ICU=1 <runtime-link>shared ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@@ -78,6 +78,7 @@
|
||||||
|
|
||||||
|
ICU_OPTS =
|
||||||
|
<include>$(ICU_PATH)/include
|
||||||
|
+ <cxxflags>-std=c++11
|
||||||
|
<runtime-link>shared:<library>icuuc/<link>shared
|
||||||
|
<runtime-link>shared:<library>icudt/<link>shared
|
||||||
|
<runtime-link>shared:<library>icuin/<link>shared
|
Loading…
Reference in a new issue