Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Mar 2007 15:14:40 -0700 (PDT)
From:      eps+pcmt0703@ana.com (Eric P. Scott)
To:        ports@FreeBSD.org
Subject:   Re: optional dependencies
Message-ID:  <200703272214.l2RMEePr003310@anna.ana.com>
In-Reply-To: <7179262C99DD344EBE01B432F636147740DC7B@SRV602.tudelft.net>

next in thread | previous in thread | raw e-mail | index | archive | help
The only reason editors/texmaker has a dependency on xpdf is it's
"hardwired" into the upstream source.  You could try something
like:

[remove xpdf:${PORTSDIR}/graphics/xpdf from RUN_DEPENDS]

OPTIONS=	ACROREAD "Use acroread" off \
		KPDF "Use kpdf" off \
		XPDF "Use xpdf" on

[...]

.include <bsd.port.pre.mk>

.if defined(WITH_ACROREAD)
.if defined(WITH_KPDF) || !defined(WITHOUT_XPDF)
IGNORE=	exactly one PDF viewer must be chosen
.endif
RUN_DEPENDS+= acroread:${PORTSDIR}/print/acroread7
.endif

.if defined(WITH_KPDF)
.if defined(WITH_ACROREAD) || !defined(WITHOUT_XPDF)
IGNORE=	exactly one PDF viewer must be chosen
.endif
RUN_DEPENDS+= kpdf:${PORTSDIR}/graphics/kdegraphics3
.endif

.if !defined(WITHOUT_XPDF)
.if defined(WITH_ACROREAD) || defined(WITH_KPDF)
IGNORE=	exactly one PDF viewer must be chosen
.endif
RUN_DEPENDS+= xpdf:${PORTSDIR}/graphics/xpdf
.endif

post-patch:
.if defined(WITH_ACROREAD)
	@${REINPLACE_CMD} -e "s/xpdf/acroread/" ${WRKSRC}/texmaker.cpp
.elif defined(WITH_KPDF)
	@${REINPLACE_CMD} -e "s/xpdf/kpdf/" ${WRKSRC}/texmaker.cpp
.endif

[...]

.include <bsd.port.post.mk>


This points up a limitation in the current bsd.ports.mk: the
options dialog is always created as a --checklist, and there's no
easy way to request a --menu be used instead.

					-=EPS=-



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703272214.l2RMEePr003310>