1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-30 01:15:52 +00:00
freebsd-ports/devel/boost/scripts/do-install
Ying-Chieh Liao 80422f22c7 remove obsolete extra-patch file
patch html files only if NOPORTDOCS not defined

Submitted by:	maintainer
2004-02-24 05:56:25 +00:00

55 lines
1.5 KiB
Bash

#!/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.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
# 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;
# Installation
${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;