diff options
Diffstat (limited to 'devel/boost/scripts')
-rw-r--r-- | devel/boost/scripts/do-install | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/devel/boost/scripts/do-install b/devel/boost/scripts/do-install new file mode 100644 index 000000000000..1e9cf6dc4126 --- /dev/null +++ b/devel/boost/scripts/do-install @@ -0,0 +1,53 @@ +#!/bin/sh + +# Fix links to example files +cd ${WRKSRC}/libs && for dir in *; do + if [ -d $dir/doc ]; then + for file in $dir/doc/*; do + ${GREP} -s -q '\.\./example/' $file && \ + ${REINPLACE_CMD} -e\ + "s|../example/|${PREFIX}/share/examples/boost/$dir/|g" $file + done; + fi; +done; + +# 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.1"\ + -exec ${BSD_INSTALL_DATA} \{\} ${PREFIX}/lib \; + +# Create symlinks for shared libraries +cd ${PREFIX}/lib; +for i in libboost*.so.1; do + ${LN} -s $i ${i%%.1}; +done; + +# Install headers +cd ${WRKSRC} && ${FIND} boost -type d\ + -exec ${MKDIR} ${PREFIX}/include/\{\} \; +cd ${WRKSRC} && ${FIND} boost -type f\ + -exec ${BSD_INSTALL_DATA} \{\} ${PREFIX}/include/\{\} \; + +# Documentation & examples +if [ -n ${NOPORTDOCS+xyz} ]; then + ${MKDIR} ${DOCSDIR} ${EXAMPLESDIR} + + ${FIND} ${WRKSRC} -type f -exec chmod 0444 {} \; + 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 && for dir in *; do + if [ -d ${WRKSRC}/libs/${dir}/example ]; then + ${MKDIR} ${EXAMPLESDIR}/${dir}; + cd ${WRKSRC}/libs/${dir}/example && ${TAR} cf - * \ + | ${TAR} xUCf ${EXAMPLESDIR}/${dir} -; + fi; + done; +fi; |