1 # $NetBSD: Makefile,v 1.55 2010/02/04 12:49:03 tnn Exp $
7 MASTER_SITES= ${MASTER_SITE_GNU:=groff/}
9 MAINTAINER= pkgsrc-users@NetBSD.org
10 HOMEPAGE= http://www.gnu.org/software/groff/groff.html
11 COMMENT= GNU roff text processing suite
16 PKG_DESTDIR_SUPPORT= user-destdir
17 INSTALLATION_DIRS= share/groff/site-tmac
21 CONFIGURE_ENV+= PERLPATH=${PERL5:Q}
22 USE_TOOLS+= perl:run sed:run awk:run
23 USE_FEATURES= getopt_long
27 REPLACE_AWK+= font/devlj4/generate/special.awk
29 REPLACE_INTERPRETER+= sed
30 REPLACE.sed.old= .*/sed
31 REPLACE.sed.new= ${SED}
32 REPLACE_FILES.sed+= font/devps/generate/symbol.sed
36 PLIST_SRC+= ${WRKDIR}/PLIST-local
39 .include "../../mk/bsd.prefs.mk"
41 .if ${OPSYS} == "SunOS"
42 PLIST_SUBST+= GNU_PREFIX="g"
45 PLIST_SUBST+= GNU_PREFIX=""
48 BUILD_DEFS+= PAPERSIZE
49 .if defined(PAPERSIZE)
50 CONFIGURE_ENV+= PAGE=${PAPERSIZE:Q}
53 # Usually the mdoc.local "volume-operating-system" definition is for
54 # the operating system name often displayed on top of man pages. And
55 # "operating-system" is for the default .Os value (operating system
56 # and version/release) and is usually displayed at bottom of man page.
57 # XXX Use "pkgsrc" as default .Os value.
59 ${SED} -e "s,@@VOLUME_OPERATING_SYSTEM@@,${OPSYS},g" \
60 -e "s,@@OPERATING_SYSTEM@@,pkgsrc,g" \
61 ${FILESDIR}/mdoc.local > ${WRKDIR}/mdoc.local
63 # Groff installs its own man and ms macros as mgan and mgs if the
64 # configure script thinks replacing the system ones is not safe. Since
65 # this depends heavily on exactly what the system macros are, each
66 # vendor OS is likely to be different and possibly differ by version.
68 # It also installs wrappers around the system macros for a variety of
69 # other traditional macro packages, if those macros don't have an FSF
73 ${INSTALL_DATA} ${WRKDIR}/mdoc.local \
74 ${DESTDIR}${PREFIX}/share/groff/site-tmac
75 ${FIND} ${DESTDIR}${PREFIX}/lib/groff/site-tmac -type f -print | \
76 ${SED} 's;${DESTDIR}${PREFIX}/;;g' > ${WRKDIR}/PLIST-local
77 ${RUN}set -e; for f in an.tmac m.tmac mm.tmac mmse.tmac \
80 line="share/groff/${PKGVERSION_NOREV}/tmac/$$p$$f"; \
81 if [ -e "${DESTDIR}${PREFIX}/$$line" ]; then \
85 ${ECHO} "$$line" >> ${WRKDIR}/PLIST-local; \
88 # we only want the charset.alias file, so no buildlinkery for libiconv
89 DEPENDS+= libiconv-[0-9]*:../../converters/libiconv
90 .include "../../mk/bsd.pkg.mk"