sci-chemistry/avogadro: Fix BOOST_JOIN with >=dev-libs/boost-1.58.0

Gentoo-Bug: 578896
* EAPI=6

Package-Manager: portage-2.2.28
This commit is contained in:
David Seifert
2016-04-03 14:44:05 +02:00
parent 3d79fbe8c0
commit b2e1971f89
2 changed files with 86 additions and 7 deletions

View File

@@ -1,12 +1,12 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
EAPI=6
PYTHON_COMPAT=( python2_7 )
inherit cmake-utils eutils flag-o-matic python-single-r1
inherit cmake-utils flag-o-matic python-single-r1
DESCRIPTION="Advanced molecular editor that uses Qt4 and OpenGL"
HOMEPAGE="http://avogadro.openmolecules.net/"
@@ -43,6 +43,7 @@ PATCHES=(
"${FILESDIR}"/${P}-no-strip.patch
"${FILESDIR}"/${P}-pkgconfig_eigen.patch
"${FILESDIR}"/${P}-openbabel.patch
"${FILESDIR}"/${P}-boost-join-moc.patch
)
pkg_setup() {
@@ -65,10 +66,10 @@ src_configure() {
-DENABLE_UPDATE_CHECKER=OFF
-DQT_MKSPECS_DIR="${EPREFIX}/usr/share/qt4/mkspecs"
-DQT_MKSPECS_RELATIVE=share/qt4/mkspecs
$(cmake-utils_use_enable glsl)
$(cmake-utils_use_enable test TESTS)
$(cmake-utils_use_with cpu_flags_x86_sse2 SSE2)
$(cmake-utils_use_enable python)
-DENABLE_glsl="$(usex glsl)"
-DENABLE_TESTS="$(usex test)"
-DWITH_SSE2="$(usex cpu_flags_x86_sse2)"
-DENABLE_python="$(usex python)"
)
cmake-utils_src_configure

View File

@@ -0,0 +1,78 @@
Add include guards to all boost includes, as qt's moc trips
over nested BOOST_JOIN macros:
* usr/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at "BOOST_JOIN"
* libavogadro/src/CMakeFiles/avogadro.dir/build.make:217: recipe for target 'libavogadro/src/moc_pythonengine_p.cxx' failed
See also: https://bugs.gentoo.org/show_bug.cgi?id=578896
--- avogadro-1.1.1/libavogadro/src/pythonengine_p.h
+++ avogadro-1.1.1/libavogadro/src/pythonengine_p.h
@@ -27,7 +27,9 @@
#include <avogadro/global.h>
#include <avogadro/engine.h>
+#ifndef Q_MOC_RUN
#include <boost/python.hpp>
+#endif
namespace Avogadro {
--- avogadro-1.1.1/libavogadro/src/pythonextension_p.h
+++ avogadro-1.1.1/libavogadro/src/pythonextension_p.h
@@ -29,7 +29,9 @@
#include <avogadro/extension.h>
#include <avogadro/primitive.h>
#include <avogadro/glwidget.h>
+#ifndef Q_MOC_RUN
#include <boost/python.hpp>
+#endif
#include <QWidget>
#include <QList>
--- avogadro-1.1.1/libavogadro/src/pythoninterpreter.h
+++ avogadro-1.1.1/libavogadro/src/pythoninterpreter.h
@@ -26,7 +26,9 @@
#define PYTHONINTERPRETER_H
#include <avogadro/global.h>
+#ifndef Q_MOC_RUN
#include <boost/python.hpp>
+#endif
#include <avogadro/primitive.h>
#include <QString>
--- avogadro-1.1.1/libavogadro/src/pythonscript.h
+++ avogadro-1.1.1/libavogadro/src/pythonscript.h
@@ -27,7 +27,9 @@
#define PYTHONSCRIPT_H
#include <avogadro/global.h>
+#ifndef Q_MOC_RUN
#include <boost/python.hpp>
+#endif
#include "pythonerror.h"
--- avogadro-1.1.1/libavogadro/src/pythonthread_p.h
+++ avogadro-1.1.1/libavogadro/src/pythonthread_p.h
@@ -26,7 +26,9 @@
#define PYTHONTHREAD_H
#include <avogadro/global.h>
+#ifndef Q_MOC_RUN
#include <boost/python.hpp>
+#endif
namespace Avogadro {
--- avogadro-1.1.1/libavogadro/src/pythontool_p.h
+++ avogadro-1.1.1/libavogadro/src/pythontool_p.h
@@ -27,7 +27,9 @@
#include <avogadro/global.h>
#include <avogadro/tool.h>
+#ifndef Q_MOC_RUN
#include <boost/python.hpp>
+#endif
#include <QObject>
#include <QAction>