diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2006-11-26 11:59:57 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2006-11-26 11:59:57 +0000 |
commit | f8dc60b0ec17f86efbef9cff2a943dbdbb15a7b3 (patch) | |
tree | ffd36314fd42682543931a42c47263b9e69c0cc1 /devel/cdk | |
parent | Make it xorg-7 compliant. (diff) |
- fix build on FreeBSD5 and FreeBSD4
PR: 105149
Approved by: (maintainer timeout)
Notes
Notes:
svn path=/head/; revision=178056
Diffstat (limited to 'devel/cdk')
-rw-r--r-- | devel/cdk/Makefile | 2 | ||||
-rw-r--r-- | devel/cdk/mancompress.mk | 25 |
2 files changed, 27 insertions, 0 deletions
diff --git a/devel/cdk/Makefile b/devel/cdk/Makefile index c5b2459c24ae..c841037c6222 100644 --- a/devel/cdk/Makefile +++ b/devel/cdk/Makefile @@ -58,4 +58,6 @@ post-install: cd ${WRKSRC}/examples; \ ${FIND} . | ${CPIO} -pdm -R ${LIBOWN}:${LIBGRP} ${EXAMPLESDIR}/examples +.include "${.CURDIR}/mancompress.mk" + .include <bsd.port.post.mk> diff --git a/devel/cdk/mancompress.mk b/devel/cdk/mancompress.mk new file mode 100644 index 000000000000..f6f197a2e4f9 --- /dev/null +++ b/devel/cdk/mancompress.mk @@ -0,0 +1,25 @@ +# +# $FreeBSD$ +# +# this files is a workaround for the target in bsd.port.mk +# which breaks when the list of MLINKS gets > 32k +# + +# Compress (or uncompress) and symlink manpages. +compress-man:: + @${ECHO_MSG} "===> Compressing manual pages for ${PKGNAME}" + @_manpages='${_MANPAGES:S/'/'\''/g}' && [ "$${_manpages}" != "" ] && ( eval ${GZIP_CMD} $${_manpages} ) || ${TRUE} + ${ECHO_CMD} '${MLINKS}' | \ + ${AWK} -v MAN="${MANPREFIX}/man/man3/" \ + '{ for (i=1; i<=NF; i+=2) \ + { print MAN $$i ".gz " MAN $$(i+1) ".gz" } }' | \ + while read regular link; do \ + ${ECHO_CMD} $${regular} $${link}; \ + ${RM} -f $${link%.gz}; ${RM} -f $${link%.gz}.gz; \ + ${LN} -fs `${ECHO_CMD} $${regular} $${link} | ${AWK} '{ \ + z=split($$1, a, /\//); x=split($$2, b, /\//); \ + while (a[i] == b[i]) i++; \ + for (q=i; q<x; q++) printf "../"; \ + for (; i<z; i++) printf a[i] "/"; printf a[z]; }'` $${link}; \ + done + |