diff options
author | Ryan Hill <rhill@gentoo.org> | 2015-07-19 09:57:36 +0000 |
---|---|---|
committer | Ryan Hill <rhill@gentoo.org> | 2015-07-19 09:57:36 +0000 |
commit | 01f05b69f1fcedbce4e28c015f4d95b31e0e262e (patch) | |
tree | 6f4fe83d42df4ddd75dd0bfabb2d1bbda6ed3f6f /sys-devel | |
parent | Bump (diff) | |
download | gentoo-2-01f05b69f1fcedbce4e28c015f4d95b31e0e262e.tar.gz gentoo-2-01f05b69f1fcedbce4e28c015f4d95b31e0e262e.tar.bz2 gentoo-2-01f05b69f1fcedbce4e28c015f4d95b31e0e262e.zip |
Deal with gcc-5 preprocessor output changes (bug #549618).
Signed-off-by: Ryan Hill <rhill@gentoo.org>
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 957A8463)
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/boost-m4/ChangeLog | 10 | ||||
-rw-r--r-- | sys-devel/boost-m4/boost-m4-0.4-r1.ebuild | 35 | ||||
-rw-r--r-- | sys-devel/boost-m4/files/boost-m4-0.4-gcc5.patch | 91 |
3 files changed, 134 insertions, 2 deletions
diff --git a/sys-devel/boost-m4/ChangeLog b/sys-devel/boost-m4/ChangeLog index acd5ac06e39d..d554694caf07 100644 --- a/sys-devel/boost-m4/ChangeLog +++ b/sys-devel/boost-m4/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-devel/boost-m4 -# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/boost-m4/ChangeLog,v 1.22 2014/01/27 07:23:54 jlec Exp $ +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/boost-m4/ChangeLog,v 1.23 2015/07/19 09:57:35 rhill Exp $ + +*boost-m4-0.4-r1 (19 Jul 2015) + + 19 Jul 2015; Ryan Hill <rhill@gentoo.org> +boost-m4-0.4-r1.ebuild, + +files/boost-m4-0.4-gcc5.patch: + Deal with gcc-5 preprocessor output changes (bug #549618). 27 Jan 2014; Justin Lecher <jlec@gentoo.org> -boost-m4-0.3_pre121130.ebuild, metadata.xml: diff --git a/sys-devel/boost-m4/boost-m4-0.4-r1.ebuild b/sys-devel/boost-m4/boost-m4-0.4-r1.ebuild new file mode 100644 index 000000000000..708da6349cc3 --- /dev/null +++ b/sys-devel/boost-m4/boost-m4-0.4-r1.ebuild @@ -0,0 +1,35 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/boost-m4/boost-m4-0.4-r1.ebuild,v 1.1 2015/07/19 09:57:35 rhill Exp $ + +EAPI=4 + +inherit eutils vcs-snapshot + +DESCRIPTION="Another set of autoconf macros for compiling against boost" +HOMEPAGE="http://github.com/tsuna/boost.m4" +SRC_URI="${HOMEPAGE}/tarball/v${PV} -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="" + +src_prepare() { + epatch "${FILESDIR}"/${P}-gcc5.patch +} + +# boost.m4 has a buildsystem, but the distributer didn't use make dist +# so we'd have to eautoreconf to use it. Also, its ./configure script +# DEPENDs on boost. For installing one file, bootstrapping the +# buildsystem isn't worth it. +src_configure() { :; } + +src_compile() { :; } + +src_install() { + insinto /usr/share/aclocal + doins build-aux/boost.m4 + + dodoc AUTHORS NEWS README THANKS +} diff --git a/sys-devel/boost-m4/files/boost-m4-0.4-gcc5.patch b/sys-devel/boost-m4/files/boost-m4-0.4-gcc5.patch new file mode 100644 index 000000000000..a929957e8aa6 --- /dev/null +++ b/sys-devel/boost-m4/files/boost-m4-0.4-gcc5.patch @@ -0,0 +1,91 @@ +https://bugs.gentoo.org/549618 +Note: I dropped the last hunk from the upstream patch. It doesn't apply and +is unnecessary since we build boost with --layout=system. + +From 32553aaf4d5090da19aa0ec33b936982c685009f Mon Sep 17 00:00:00 2001 +From: Akim Demaille <akim@lrde.epita.fr> +Date: Wed, 26 Nov 2014 16:56:28 +0100 +Subject: [PATCH] boost.m4: cope with GCC 5 + +Serial 24. + +There are two needed adjustments. + +One due to the output format which has changed: + + $ cat conftest.cc + #include <boost/version.hpp> + boost-lib-version = BOOST_LIB_VERSION + $ g++-mp-4.9 -E conftest.cc $ g++-mp-5 -E conftest.cc + # 1 "conftest.cc" # 1 "conftest.cc" + # 1 "<built-in>" # 1 "<built-in>" + # 1 "<command-line>" # 1 "<command-line>" + # 1 "conftest.cc" # 1 "conftest.cc" + # 1 "/include/boost/version.hpp" 1 3 # 1 "/include/boost/version.hpp" 1 3 + # 2 "conftest.cc" 2 # 2 "conftest.cc" 2 + boost-lib-version = "1_56" ! boost-lib-version = + ! # 2 "conftest.cc" 3 + ! "1_56" + +Since I fear that -P is not portable, let's play with tr and grep to +get rid of all the # lines and glue the remaining lines together. + +The other one is that, finally, gcc 4.10 will actually be named gcc 5, +so recognize this name. + +* build-aux/m4/boost.m4 (_BOOST_SED_CPP): Clean the preprocessor output +before handing it to the sed command. +(_BOOST_FIND_COMPILER_TAG): Support GCC 5. +Improve accuracy of error messages by adding delimiters to bad strings. + +Signed-off-by: Benoit Sigoure <tsunanet@gmail.com> +--- + build-aux/boost.m4 | 25 ++++++++++++++++++++++--- + 1 file changed, 22 insertions(+), 3 deletions(-) + +--- a/build-aux/boost.m4 ++++ b/build-aux/boost.m4 +@@ -72,8 +72,25 @@ dnl strip `\n' with backquotes, not the `\r'. This results in + dnl boost_cv_lib_version='1_37\r' for instance, which breaks + dnl everything else. + dnl Cannot use 'dnl' after [$4] because a trailing dnl may break AC_CACHE_CHECK ++dnl ++dnl Beware that GCC 5, when expanding macros, may embed # line directives ++dnl a within single line: ++dnl ++dnl # 1 "conftest.cc" ++dnl # 1 "<built-in>" ++dnl # 1 "<command-line>" ++dnl # 1 "conftest.cc" ++dnl # 1 "/opt/local/include/boost/version.hpp" 1 3 ++dnl # 2 "conftest.cc" 2 ++dnl boost-lib-version = ++dnl # 2 "conftest.cc" 3 ++dnl "1_56" ++dnl ++dnl So get rid of the # lines, and glue the remaining ones together. + (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | ++ grep -v '#' | + tr -d '\r' | ++ tr -s '\n' ' ' | + $SED -n -e "$1" >conftest.i 2>&1], + [$3], + [$4]) +@@ -208,7 +225,7 @@ AC_LANG_POP([C++])dnl + AC_CACHE_CHECK([for Boost's header version], + [boost_cv_lib_version], + [m4_pattern_allow([^BOOST_LIB_VERSION$])dnl +- _BOOST_SED_CPP([/^boost-lib-version = /{s///;s/\"//g;p;q;}], ++ _BOOST_SED_CPP([[/^boost-lib-version = /{s///;s/[\" ]//g;p;q;}]], + [#include <boost/version.hpp> + boost-lib-version = BOOST_LIB_VERSION], + [boost_cv_lib_version=`cat conftest.i`])]) +@@ -216,7 +233,7 @@ boost-lib-version = BOOST_LIB_VERSION], + boost_major_version=`echo "$boost_cv_lib_version" | sed 's/_//;s/_.*//'` + case $boost_major_version in #( + '' | *[[!0-9]]*) +- AC_MSG_ERROR([invalid value: boost_major_version=$boost_major_version]) ++ AC_MSG_ERROR([invalid value: boost_major_version='$boost_major_version']) + ;; + esac + fi |