[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / print / xdvik

File: [cvs.NetBSD.org] / pkgsrc / print / xdvik / Makefile (download)

Revision 1.2, Sun Mar 1 17:45:19 2009 UTC (10 years, 8 months ago) by minskim
Branch: MAIN
Changes since 1.1: +9 -4 lines

Fix build problems of xdvi, noted by seb@.

- Add a build-time dependency on texlive-tetex to use texconfig.
- Make sure that generating a conf file does not depend on files that are
  already installed.

Bump PKGREVISION.

# $NetBSD: Makefile,v 1.2 2009/03/01 17:45:19 minskim Exp $

DISTNAME=	xdvik-22.84.14
PKGREVISION=	1
CATEGORIES=	print
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=xdvi/}

MAINTAINER=	minskim@NetBSD.org
HOMEPAGE=	http://xdvi.sourceforge.net/
COMMENT=	Previewer for DVI files

CONFLICTS+=	teTeX-bin<3.0nb25
BUILD_DEPENDS+=	texlive-tetex-[0-9]*:../../print/texlive-tetex
BUILD_DEPENDS+=	tex-bin-xdvi-[0-9]*:../../print/tex-bin-xdvi

PKG_DESTDIR_SUPPORT=	user-destdir

GNU_CONFIGURE=	yes
USE_LIBTOOL=	yes
WRKSRC=		${WRKDIR}/${DISTNAME}/texk/xdvik

FIND_PREFIX:=	TETEX_PREFIX=texlive-tetex BIN_XDVI_PREFIX=tex-bin-xdvi
.include "../../mk/find-prefix.mk"

CONFIGURE_ARGS+=	--with-system-kpathsea --with-system-t1lib \
			--with-xdvi-x-toolkit=xaw

MAKE_FLAGS+=	LIBTOOL=${LIBTOOL:Q} \
		kpathsea_parent=${BUILDLINK_PREFIX.kpathsea}/include

INSTALL_MAKE_FLAGS+=	prefix=${DESTDIR}${PREFIX} \
			mandir=${DESTDIR}${PREFIX}/${PKGMANDIR}

PKG_SYSCONFSUBDIR=	texmf

MAKE_DIRS+=	${PKG_SYSCONFDIR}/xdvi
CONF_FILES=	${PREFIX}/share/texmf-dist/xdvi/XDvi \
		${PKG_SYSCONFDIR}/xdvi/XDvi

BUILD_DEFS+=	PAPERSIZE

INSTALLATION_DIRS+=	share/texmf-dist/xdvi

TEX_TEXMF_DIRS+=	${PKG_SYSCONFDIR}
TEX_TEXMF_DIRS+=	${PREFIX}/share/texmf
TEX_TEXMF_DIRS+=	${PREFIX}/share/texmf-dist

.include "../../mk/bsd.prefs.mk"

.if ${PAPERSIZE} == "Letter"
XDVI_PAPERSIZE=	us
.else
XDVI_PAPERSIZE=	a4
.endif

.include "../../converters/libiconv/buildlink3.mk"
.include "../../fonts/t1lib/buildlink3.mk"
.include "../../print/kpathsea/buildlink3.mk"
.include "../../print/kpathsea/texmf.mk"
.include "../../x11/libXp/buildlink3.mk"
.include "../../x11/libXpm/buildlink3.mk"
.include "../../mk/xaw.buildlink3.mk"

post-build:
	${MKDIR} -p ${WRKSRC}/texmf/xdvi
	${CP} ${BIN_XDVI_PREFIX}/share/texmf/xdvi/XDvi \
		${WRKSRC}/texmf/xdvi
	env TEXMFSYSCONFIG=${WRKSRC}/texmf TFC_TEXMFCONFIG=${WRKSRC}/texmf \
		${TETEX_PREFIX}/bin/texconfig xdvi paper ${XDVI_PAPERSIZE}

post-install:
	${INSTALL_DATA} ${WRKSRC}/texmf/xdvi/XDvi \
		${DESTDIR}${PREFIX}/share/texmf-dist/xdvi

.include "../../mk/bsd.pkg.mk"