diff options
author | Simon Barner <barner@FreeBSD.org> | 2005-03-07 10:29:37 +0000 |
---|---|---|
committer | Simon Barner <barner@FreeBSD.org> | 2005-03-07 10:29:37 +0000 |
commit | b29a5a553e862f01a440e67347b02812434f7286 (patch) | |
tree | b8c24a1a567e4b1a955dfc436982dba8dcbf6db0 /devel/boost | |
parent | - Fix WWW: site (diff) |
- Install pyste, a interface generator for Boost.Python
This adds two run time dependecies in the WITH_PYTHON case:
* devel/gccxml
* devel/py-elementtree
This was requested in [1].
- Add pkg-message to help developers getting started with boost:
Give suggestions for CFLAGS and LDFLAGS for the following build
options:
* BOOST_THREADS: pkg-message.threads
* WITH_PYTHON: pkg-message.python
* stlport (4.x): pkg-message.stlport
- remove pkg-install script and perform installation in Makefile
PR: ports/77640 [1]
Approved by: arved (mentor)
Notes
Notes:
svn path=/head/; revision=130523
Diffstat (limited to 'devel/boost')
-rw-r--r-- | devel/boost/Makefile | 128 | ||||
-rw-r--r-- | devel/boost/pkg-message.python | 8 | ||||
-rw-r--r-- | devel/boost/pkg-message.stlport | 16 | ||||
-rw-r--r-- | devel/boost/pkg-message.threads | 4 | ||||
-rw-r--r-- | devel/boost/pkg-plist | 65 | ||||
-rw-r--r-- | devel/boost/scripts/do-install | 43 |
6 files changed, 201 insertions, 63 deletions
diff --git a/devel/boost/Makefile b/devel/boost/Makefile index f28659930bf7..685a5255d61c 100644 --- a/devel/boost/Makefile +++ b/devel/boost/Makefile @@ -7,7 +7,7 @@ PORTNAME= boost PORTVERSION= 1.32.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S/$/:boost_site,spirit_site/} MASTER_SITE_SUBDIR=boost/:boost_site @@ -30,6 +30,14 @@ OPTIONS= VERBOSE_BUILD "Show compiler messages" off \ THREADS "Thread support" on \ OPTIMIZED_CFLAGS "Enable -O3 optimization" off +UNIQ= /usr/bin/uniq +BOOST_LIBS= date_time filesystem prg_exec_monitor program_options \ + python regex signals test_exec_monitor thread \ + unit_test_framework +BOOST_SHARED_LIB_VER= 2 + +PKGMESSAGE= ${WRKDIR}/pkg-message + # # Unfortunately, it is not possible to use OPTIONS to control the # optional Python support @@ -46,6 +54,9 @@ MAKE_ENV+= PYTHON_ROOT="${LOCALBASE}"\ PYTHON_VERSION="${PYTHON_VERSION}"\ PYTHON_INCLUDES="${PYTHON_INCLUDEDIR}"\ PYTHON_LIB_PATH="${PYTHON_LIBDIR}" +RUN_DEPENDS+= gccxml:${PORTSDIR}/devel/gccxml \ + ${PYTHON_SITELIBDIR}/elementtree/ElementTree.py:${PORTSDIR}/devel/py-elementtree +BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/elementtree/ElementTree.py:${PORTSDIR}/devel/py-elementtree .else PLIST_SUB+= BOOST_PYTHON="@comment " .endif @@ -74,7 +85,7 @@ PLIST_SUB+= BOOST_WCHAR="@comment "\ BOOST_STL_OPTS= "-sSTLPORT_INCLUDE_DIRECTORY=${LOCALBASE}/include/stlport"\ "-sSTLPORT_LIB_DIRECTORY=${LOCALBASE}/lib" -RUN_DEPENDS= ${LOCALBASE}/lib/libstlport_gcc.so:${PORTSDIR}/devel/stlport +RUN_DEPENDS+= ${LOCALBASE}/lib/libstlport_gcc.so:${PORTSDIR}/devel/stlport BUILD_DEPENDS+= ${RUN_DEPENDS} # FreeBSD 5 @@ -130,22 +141,6 @@ BJAM= ${WRKSRC}/tools/build/jam_src/bin.freebsdia64/bjam BJAM= ${WRKSRC}/tools/build/jam_src/bin.freebsd/bjam .endif -SCRIPTS_ENV+= BJAM="${BJAM}"\ - NOPORTDOCS="${NOPORTDOCS}"\ - FIND="${FIND}"\ - GREP="${GREP}"\ - REINPLACE_CMD="${REINPLACE_CMD}"\ - LN="${LN}"\ - MKDIR="${MKDIR}"\ - TAR="${TAR}" \ - RM="${RM}" \ - UNIQ="/usr/bin/uniq" - -.if !defined(NOPORTDOCS) -SCRIPTS_ENV+= PORTDOCS="true"\ - DOCSDIR="${DOCSDIR}" -.endif - pre-everything:: .if !defined(WITH_PYTHON) @${ECHO_CMD} @@ -193,17 +188,110 @@ post-patch: ${WRKSRC}/tools/build/v1/gcc-tools.jam \ ${WRKSRC}/tools/build/v1/gcc-stlport-tools.jam +post-configure: +# Configure pyste, the Boost.Python code generator +.if defined(WITH_PYTHON) + @cd ${BUILD_WRKSRC}/libs/python/pyste/install && \ + ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} \ + config ${PYDISTUTILS_CONFIGUREARGS} +.endif + do-build: # build the bjam project build tool cd ${WRKSRC}/tools/build/jam_src && ./build.sh gcc # build the library - @cd ${WRKSRC}; \ + cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} ${BJAM} ${BJAM_OPTIONS} --prefix=${PREFIX}\ "-sTOOLS=${BOOST_TOOLS}" "-sBUILD=${BJAM_BUILD}"\ ${BOOST_STL_OPTS} +# Build pyste, the Boost.Python code generator +.if defined(WITH_PYTHON) + cd ${BUILD_WRKSRC}/libs/python/pyste/install && \ + ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} \ + build ${PYDISTUTILS_BUILDARGS} +.endif + do-install: - @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/do-install + ${INSTALL_PROGRAM} ${BJAM} ${PREFIX}/bin/ + +# Install libraries + ${FIND} ${WRKSRC}/bin/boost/libs -type f -name "*.a"\ + -exec ${INSTALL_DATA} \{\} ${PREFIX}/lib \; + + ${FIND} ${WRKSRC}/bin/boost/libs -type f \ + -name "*.so.${BOOST_SHARED_LIB_VER}" \ + -exec ${INSTALL_DATA} \{\} ${PREFIX}/lib \; + +# Create symlinks for shared libraries +.for lib in ${BOOST_LIBS} + cd ${PREFIX}/lib && ${RM} -f "libboost_${lib}.so" && \ + ${LN} -s "libboost_${lib}.so.${BOOST_SHARED_LIB_VER}" "libboost_${lib}.so" +.endfor + +# Install headers + cd ${WRKSRC} && \ + ${FIND} boost -type d -a \! -name "*.orig"\ + -exec ${MKDIR} ${PREFIX}/include/\{\} \; + + cd ${WRKSRC} && \ + ${FIND} boost -type f -a \! -name "*.orig"\ + -exec ${INSTALL_DATA} \{\} ${PREFIX}/include/\{\} \; + +# Install pyste, the Boost.Python code generator +.if defined(WITH_PYTHON) + cd ${WRKSRC}/libs/python/pyste/install && \ + ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} \ + install ${PYDISTUTILS_INSTALLARGS} + +.endif + +# Documentation & examples +.if !defined(NOPORTDOCS) +# Installation + ${MKDIR} ${DOCSDIR} + + ${FIND} ${WRKSRC} -type f -exec ${CHMOD} 0444 {} \; + ${FIND} ${WRKSRC} -type d -exec ${CHMOD} 0555 {} \; + cd ${WRKSRC} &&\ + ${FIND} . -name "*.htm" -o -name "*.html" -o -name "*.css"\ + -o -name "*.jp*g" -o -name "*.png" -o -name "*.gif"\ + | ${TAR} cTf - - | ${TAR} xUCf ${DOCSDIR} - + + cd ${WRKSRC}/libs &&\ + ${FIND} . -name "example" -o -name "examples" -o -name "*example*.cpp"\ + -o -name "*example*.c" -o -name "*example*.hpp" | ${UNIQ} |\ + ${GREP} -v "assign/test" | ${GREP} -v "iterator/test" | \ + ${GREP} -v "range/test" |\ + ${TAR} cTf - - | ${TAR} xUCf ${DOCSDIR}/libs - +.endif + +# display pkg-message +post-install: + @${TOUCH} ${PKGMESSAGE} + +.if ${OSVERSION} < 500000 + @${CAT} ${.CURDIR}/../boost/pkg-message.stlport >> ${PKGMESSAGE} + @${ECHO_CMD} >> ${PKGMESSAGE} +.endif + +.if defined (WITH_THREADS) + @${CAT} ${.CURDIR}/../boost/pkg-message.threads >> ${PKGMESSAGE} + @${ECHO_CMD} >> ${PKGMESSAGE} +.endif + +.if defined (WITH_PYTHON) + @${CAT} ${.CURDIR}/../boost/pkg-message.python >> ${PKGMESSAGE} + @${ECHO_CMD} >> ${PKGMESSAGE} +.endif + + @${REINPLACE_CMD} \ + -e "s|%%LOCALBASE%%|${LOCALBASE}|g" \ + -e "s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g" \ + -e "s|%%PYTHON_INCLUDEDIR%%|${PYTHON_INCLUDEDIR}|g" \ + -e "s|%%PYTHON_LIBDIR%%|${PYTHON_LIBDIR}|g" \ + -e "s|%%PYTHON_VERSION%%|${PYTHON_VERSION}|g" ${PKGMESSAGE} + @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> diff --git a/devel/boost/pkg-message.python b/devel/boost/pkg-message.python new file mode 100644 index 000000000000..8e065b92275c --- /dev/null +++ b/devel/boost/pkg-message.python @@ -0,0 +1,8 @@ +You have built the Boost.Python library. You have to add the following +options when building your own code: + +Compiler options: + -I%%PYTHON_INCLUDEDIR%% -I%%LOCALBASE%%/include + +Linker options: + -L%%PYTHON_LIBDIR%% -L%%LOCALBASE%%/lib -lboost_python -l%%PYTHON_VERSION%% diff --git a/devel/boost/pkg-message.stlport b/devel/boost/pkg-message.stlport new file mode 100644 index 000000000000..6555a7ab7fa1 --- /dev/null +++ b/devel/boost/pkg-message.stlport @@ -0,0 +1,16 @@ +You have built Boost on FreeBSD 4, which comes with the GCC 2.95.4 +compiler suite. + +Since the standard template library of g++ 2.95.4 is not compatible +with this version of Boost, the library has been built against the +STLport library (devel/stlport). + +In order for your own code to link properly, you have to built it +with STLport also. You are advised to use the following compiler +and linker options: + +Compiler options (be sure to append any additional options after these!) + -nostdinc -I%%LOCALBASE%%/include/stlport -I/usr/include + +Linker options: + -L%%LOCALBASE%%/lib -lstlport_gcc diff --git a/devel/boost/pkg-message.threads b/devel/boost/pkg-message.threads new file mode 100644 index 000000000000..b020ce2b5ae0 --- /dev/null +++ b/devel/boost/pkg-message.threads @@ -0,0 +1,4 @@ +You have built the Boost library with thread support. + +Don't forget to add %%PTHREAD_LIBS%% to your linker options when +linking your code. diff --git a/devel/boost/pkg-plist b/devel/boost/pkg-plist index 729a5173565a..438b02e442dc 100644 --- a/devel/boost/pkg-plist +++ b/devel/boost/pkg-plist @@ -1,4 +1,5 @@ bin/bjam +%%BOOST_PYTHON%%bin/pyste.py include/boost/algorithm/minmax.hpp include/boost/algorithm/minmax_element.hpp include/boost/algorithm/string.hpp @@ -2987,6 +2988,69 @@ lib/libboost_test_exec_monitor.so.2 lib/libboost_unit_test_framework.a lib/libboost_unit_test_framework.so lib/libboost_unit_test_framework.so.2 +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/ClassExporter.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/CodeExporter.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/CppParser.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/declarations.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/EnumExporter.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/Exporter.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/exporters.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/exporterutils.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/FunctionExporter.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/GCCXMLParser.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/HeaderExporter.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/infos.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/MultipleCodeUnit.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/policies.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/pyste.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/settings.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/SingleCodeUnit.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/SmartFile.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/utils.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/VarExporter.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/__init__.py +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/ClassExporter.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/CodeExporter.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/CppParser.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/declarations.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/EnumExporter.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/Exporter.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/exporters.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/exporterutils.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/FunctionExporter.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/GCCXMLParser.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/HeaderExporter.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/infos.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/MultipleCodeUnit.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/policies.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/pyste.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/settings.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/SingleCodeUnit.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/SmartFile.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/utils.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/VarExporter.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/__init__.pyc +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/ClassExporter.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/CodeExporter.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/CppParser.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/declarations.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/EnumExporter.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/Exporter.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/exporters.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/exporterutils.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/FunctionExporter.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/GCCXMLParser.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/HeaderExporter.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/infos.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/MultipleCodeUnit.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/policies.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/pyste.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/settings.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/SingleCodeUnit.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/SmartFile.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/utils.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/VarExporter.pyo +%%BOOST_PYTHON%%%%PYTHON_SITELIBDIR%%/Pyste/__init__.pyo %%PORTDOCS%%%%DOCSDIR%%/boost.css %%PORTDOCS%%%%DOCSDIR%%/boost.png %%PORTDOCS%%%%DOCSDIR%%/doc/html/Assignable.html @@ -6451,6 +6515,7 @@ lib/libboost_unit_test_framework.so.2 @dirrm include/boost/variant/detail @dirrm include/boost/variant @dirrm include/boost +%%BOOST_PYTHON%%@dirrm %%PYTHON_SITELIBDIR%%/Pyste %%PORTDOCS%%@dirrm %%DOCSDIR%%/doc/html/array/more %%PORTDOCS%%@dirrm %%DOCSDIR%%/doc/html/array %%PORTDOCS%%@dirrm %%DOCSDIR%%/doc/html/any diff --git a/devel/boost/scripts/do-install b/devel/boost/scripts/do-install deleted file mode 100644 index 86ae7f81f191..000000000000 --- a/devel/boost/scripts/do-install +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -# Install bjam tool -${BSD_INSTALL_PROGRAM} ${BJAM} ${PREFIX}/bin/ - -# Install libraries -${FIND} ${WRKSRC}/bin/boost/libs -type f -name "*.a"\ - -exec ${BSD_INSTALL_DATA} \{\} ${PREFIX}/lib \; - -${FIND} ${WRKSRC}/bin/boost/libs -type f -name "*.so.2"\ - -exec ${BSD_INSTALL_DATA} \{\} ${PREFIX}/lib \; - -# Create symlinks for shared libraries -cd ${PREFIX}/lib; -for i in libboost*.so.2; do - ${LN} -s $i ${i%%.2}; -done; - -# Install headers -cd ${WRKSRC} && ${FIND} boost -type d -a \! -name "*.orig"\ - -exec ${MKDIR} ${PREFIX}/include/\{\} \; -cd ${WRKSRC} && ${FIND} boost -type f -a \! -name "*.orig"\ - -exec ${BSD_INSTALL_DATA} \{\} ${PREFIX}/include/\{\} \; - -# Documentation & examples -if [ "${NOPORTDOCS}xyz" = "xyz" ]; then - # Installation - ${MKDIR} ${DOCSDIR} - - ${FIND} ${WRKSRC} -type f -exec chmod 0444 {} \; - ${FIND} ${WRKSRC} -type d -exec chmod 0555 {} \; - cd ${WRKSRC} &&\ - ${FIND} . -name "*.htm" -o -name "*.html" -o -name "*.css"\ - -o -name "*.jp*g" -o -name "*.png" -o -name "*.gif"\ - | ${TAR} cTf - - | ${TAR} xUCf ${DOCSDIR} - - - cd ${WRKSRC}/libs &&\ - ${FIND} . -name "example" -o -name "examples" -o -name "*example*.cpp"\ - -o -name "*example*.c" -o -name "*example*.hpp" | ${UNIQ} |\ - ${GREP} -v "assign/test" | ${GREP} -v "iterator/test" | \ - ${GREP} -v "range/test" |\ - ${TAR} cTf - - | ${TAR} xUCf ${DOCSDIR}/libs - -fi; |