diff --git a/devel/cppunit/Makefile b/devel/cppunit/Makefile index dbfee29f0e9a..01a358d04561 100644 --- a/devel/cppunit/Makefile +++ b/devel/cppunit/Makefile @@ -2,7 +2,7 @@ PORTNAME= cppunit PORTVERSION= 1.14.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel MASTER_SITES= http://dev-www.libreoffice.org/src/ @@ -24,6 +24,12 @@ OPTIONS_SUB= yes USE_LDCONFIG= yes USES= libtool pathfix +SUB_FILES= cppunit-config +SUB_LIST+= DISTVERSION=${DISTVERSION} + +post-install: + ${INSTALL_SCRIPT} ${WRKDIR}/cppunit-config ${STAGEDIR}${PREFIX}/bin/ + post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/doc/FAQ ${STAGEDIR}${DOCSDIR} diff --git a/devel/cppunit/files/cppunit-config.in b/devel/cppunit/files/cppunit-config.in new file mode 100644 index 000000000000..b4666c182516 --- /dev/null +++ b/devel/cppunit/files/cppunit-config.in @@ -0,0 +1,98 @@ +#!/bin/sh + +prefix=%%PREFIX%% +exec_prefix=%%PREFIX%% +exec_prefix_set=no +includedir=%%PREFIX%%/include + +usage() +{ + cat <&2 +fi + +while test $# -gt 0; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case $1 in + --prefix=*) + prefix=$optarg + if test $exec_prefix_set = no ; then + exec_prefix=$optarg + fi + ;; + --prefix) + echo_prefix=yes + ;; + --exec-prefix=*) + exec_prefix=$optarg + exec_prefix_set=yes + ;; + --exec-prefix) + echo_exec_prefix=yes + ;; + --version) + echo %%DISTVERSION%% + ;; + --help) + usage 0 + ;; + --cflags) + echo_cflags=yes + ;; + --libs) + echo_libs=yes + ;; + *) + usage 1 1>&2 + ;; + esac + shift +done + +if test "$echo_prefix" = "yes"; then + echo $prefix +fi + +if test "$echo_exec_prefix" = "yes"; then + echo $exec_prefix +fi + +if test "$echo_cflags" = "yes"; then + if test "$includedir" != "/usr/include" ; then + echo -I$includedir + fi +fi + +if test "$echo_libs" = "yes"; then + if test %%PREFIX%%/lib != /usr/lib ; then + my_linker_flags="-L%%PREFIX%%/lib" + fi + echo ${my_linker_flags} -lcppunit +fi + + + + diff --git a/devel/cppunit/pkg-plist b/devel/cppunit/pkg-plist index 2a7e03201963..343864b5af50 100644 --- a/devel/cppunit/pkg-plist +++ b/devel/cppunit/pkg-plist @@ -1,3 +1,4 @@ +bin/cppunit-config bin/DllPlugInTester include/cppunit/AdditionalMessage.h include/cppunit/Asserter.h