mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-03 01:23:49 +00:00
- Fix build with boost 1.60
- Switch to options helpers - Add LICENSE_FILE PR: 199601
This commit is contained in:
parent
d70f722e32
commit
dc7660ef9c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=408502
@ -11,14 +11,11 @@ MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Advanced molecular editor and viewer
|
||||
|
||||
LICENSE= GPLv2+
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
BUILD_DEPENDS= eigen2>2:${PORTSDIR}/math/eigen2
|
||||
LIB_DEPENDS= libopenbabel.so:${PORTSDIR}/science/openbabel
|
||||
|
||||
OPTIONS_DEFINE= PYTHON
|
||||
OPTIONS_DEFAULT=PYTHON
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
USES= cmake desktop-file-utils pkgconfig tar:bzip2
|
||||
USE_GL= glu gl
|
||||
USE_QT4= gui network opengl \
|
||||
@ -32,20 +29,19 @@ CFLAGS+= -idirafter ${LOCALBASE}/include/eigen2 \
|
||||
-I${LOCALBASE}/include
|
||||
LDFLAGS+= -L${LOCALBASE}/lib
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
OPTIONS_DEFINE= PYTHON
|
||||
OPTIONS_DEFAULT=PYTHON
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
.if ${PORT_OPTIONS:MPYTHON}
|
||||
USES+= python:2
|
||||
BUILD_DEPENDS+= ${PYNUMPY} \
|
||||
${PYTHON_PKGNAMEPREFIX}sip>0:${PORTSDIR}/devel/py-sip
|
||||
LIB_DEPENDS+= libboost_python.so:${PORTSDIR}/devel/boost-python-libs
|
||||
RUN_DEPENDS+= ${PYNUMPY} \
|
||||
${PYTHON_PKGNAMEPREFIX}sip>0:${PORTSDIR}/devel/py-sip
|
||||
CMAKE_ARGS+= -DENABLE_PYTHON=ON \
|
||||
-DPYTHON_INCLUDE_DIR:PATH=${WRKDIR}/include/${PYTHON_VERSION}
|
||||
.else
|
||||
CMAKE_ARGS+= -DENABLE_PYTHON=OFF
|
||||
.endif
|
||||
PYTHON_USES= python:2
|
||||
PYTHON_BUILD_DEPENDS= ${PYNUMPY} \
|
||||
${PYTHON_PKGNAMEPREFIX}sip>0:${PORTSDIR}/devel/py-sip
|
||||
PYTHON_LIB_DEPENDS= libboost_python.so:${PORTSDIR}/devel/boost-python-libs
|
||||
PYTHON_RUN_DEPENDS= ${PYNUMPY} \
|
||||
${PYTHON_PKGNAMEPREFIX}sip>0:${PORTSDIR}/devel/py-sip
|
||||
PYTHON_CMAKE_ON= -DENABLE_PYTHON=ON \
|
||||
-DPYTHON_INCLUDE_DIR:PATH=${WRKDIR}/include/${PYTHON_VERSION}
|
||||
PYTHON_CMAKE_OFF= -DENABLE_PYTHON=OFF
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e \
|
||||
@ -54,8 +50,7 @@ post-patch:
|
||||
@${REINPLACE_CMD} -e \
|
||||
's|share/man|man|' ${WRKSRC}/doc/CMakeLists.txt
|
||||
|
||||
pre-configure:
|
||||
.if ${PORT_OPTIONS:MPYTHON}
|
||||
pre-configure-PYTHON-on:
|
||||
@${MKDIR} ${WRKDIR}/include/${PYTHON_VERSION}
|
||||
@${FIND} ${PYTHON_INCLUDEDIR} ! -name "pyport.h" -type f \
|
||||
-maxdepth 1 | ${XARGS} -J % ${LN} -sf % \
|
||||
@ -63,6 +58,5 @@ pre-configure:
|
||||
@${SED} -e 's|^#ifdef _PY_PORT_CTYPE_UTF8_ISSUE|#if 0|' \
|
||||
${PYTHON_INCLUDEDIR}/pyport.h > \
|
||||
${WRKDIR}/include/${PYTHON_VERSION}/pyport.h
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -0,0 +1,12 @@
|
||||
--- libavogadro/src/pythonengine_p.h.orig 2013-12-06 15:50:04 UTC
|
||||
+++ 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 {
|
||||
|
@ -0,0 +1,12 @@
|
||||
--- libavogadro/src/pythonextension_p.h.orig 2013-12-06 15:50:04 UTC
|
||||
+++ 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>
|
@ -0,0 +1,12 @@
|
||||
--- libavogadro/src/pythoninterpreter.h.orig 2013-12-06 15:50:04 UTC
|
||||
+++ 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>
|
||||
|
12
science/avogadro/files/patch-libavogadro_src_pythonscript.h
Normal file
12
science/avogadro/files/patch-libavogadro_src_pythonscript.h
Normal file
@ -0,0 +1,12 @@
|
||||
--- libavogadro/src/pythonscript.h.orig 2013-12-06 15:50:04 UTC
|
||||
+++ 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"
|
||||
|
12
science/avogadro/files/patch-libavogadro_src_pythontool__p.h
Normal file
12
science/avogadro/files/patch-libavogadro_src_pythontool__p.h
Normal file
@ -0,0 +1,12 @@
|
||||
--- libavogadro/src/pythontool_p.h.orig 2013-12-06 15:50:04 UTC
|
||||
+++ 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>
|
Loading…
Reference in New Issue
Block a user