summaryrefslogtreecommitdiffstats
path: root/x11/yelp/Makefile
blob: b750344472274dc34ecf68289bcb4312202b81cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# New ports collection makefile for:    yelp
# Date created:             18 May 2002
# Whom:                 Maxim Sobolev <sobomax@FreeBSD.org>
#
# $FreeBSD: ports/x11/yelp/Makefile,v 1.33 2004/11/07 22:24:25 marcus Exp $
#

PORTNAME=   yelp
PORTVERSION=    2.9.2
CATEGORIES= x11 gnome
MASTER_SITES=   ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME}/2.9
DIST_SUBDIR=    gnome2

MAINTAINER= gnome@FreeBSD.org
COMMENT=    A help browser for the GNOME 2 desktop

BUILD_DEPENDS=  ${X11BASE}/libdata/pkgconfig/gnome-doc-utils.pc:${PORTSDIR}/textproc/gnomedocutils \
        ${X11BASE}/lib/${MOZILLA}/components/libwidget_gtk2.so:${PORTSDIR}/www/${MOZILLA}
RUN_DEPENDS=    ${X11BASE}/libdata/pkgconfig/gnome-doc-utils.pc:${PORTSDIR}/textproc/gnomedocutils \
        ${X11BASE}/lib/${MOZILLA}/components/libwidget_gtk2.so:${PORTSDIR}/www/${MOZILLA}

MOZILLA=    mozilla
HEADERS_SUFX=

.if !defined(WITH_MOZILLA)
MOZILLA=    mozilla
HEADERS_SUFX=
.else
.if ${WITH_MOZILLA}=="firefox"
MOZILLA=    firefox
.else
.if ${WITH_MOZILLA}=="mozilla-devel" || ${WITH_MOZILLA}=="mozilla-devel-gtk2"
MOZILLA=    mozilla-devel
HEADERS_SUFX=   -devel
.else
MOZILLA=    mozilla
HEADERS_SUFX=
.endif
.endif
.endif

USE_BZIP2=  yes
USE_X_PREFIX=   yes
USE_GMAKE=  yes
USE_REINPLACE=  yes
USE_GNOME=  gnomeprefix gnomehack intlhack libgnomeui
USE_LIBTOOL_VER=15
CONFIGURE_ENV=  CPPFLAGS="-I${LOCALBASE}/include" \
        LDFLAGS="-L${LOCALBASE}/lib"
MAKE_ENV=   G_CHARSET_ALIAS="${LOCALBASE}/libdata/charset.alias"

GCONF_SCHEMAS=  yelp.schemas

pre-everything::
    @${ECHO_MSG} ""
    @${ECHO_MSG} " By default epiphany uses www/mozilla for html rendering, but you can"
    @${ECHO_MSG} " change this by defining WITH_MOZILLA to one of the following values:"
    @${ECHO_MSG}
    @${ECHO_MSG} "  mozilla-devel "
    @${ECHO_MSG} "  firefox "
    @${ECHO_MSG} ""

post-patch:
.if defined(WITH_MOZILLA) && ${WITH_MOZILLA}=="firefox"
    @${REINPLACE_CMD} -e 's|mozilla-gtkmozembed|firefox-gtkmozembed|g' \
        ${WRKSRC}/configure
.else
    @${REINPLACE_CMD} -e 's|mozilla-gtkmozembed|mozilla-gtkmozembed${HEADERS_SUFX}|g' \
        ${WRKSRC}/configure
.endif

post-configure:
    @${SED} -e 's|%%PREFIX%%|${PREFIX}|g ; \
        s|%%X11BASE%%|${X11BASE}|g ; \
        s|%%MOZILLA%%|${MOZILLA}|g' <${FILESDIR}/yelp.sh \
        > ${WRKDIR}/yelp.sh
    @${SED} -e 's|%%PREFIX%%|${PREFIX}|g ; \
        s|%%X11BASE%%|${X11BASE}|g ; \
        s|%%MOZILLA%%|${MOZILLA}|g' <${FILESDIR}/gnome-help.sh \
        > ${WRKDIR}/gnome-help.sh

post-install:
    ${MV} -f ${PREFIX}/bin/yelp ${PREFIX}/bin/yelp-bin
    ${MV} -f ${PREFIX}/bin/gnome-help ${PREFIX}/bin/gnome-help-bin
    ${INSTALL_SCRIPT} ${WRKDIR}/yelp.sh ${PREFIX}/bin/yelp
    ${INSTALL_SCRIPT} ${WRKDIR}/gnome-help.sh ${PREFIX}/bin/gnome-help

.include <bsd.port.mk>