aboutsummaryrefslogtreecommitdiffstats
path: root/www/surf/Makefile
blob: 0efa7411059900d67855d6699c7551f8c1b28b1f (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
# Created by: Christopher Knaust <jigboe@gmx.de>
# $FreeBSD$

PORTNAME=   surf
PORTVERSION=    0.6
CATEGORIES= www
MASTER_SITES=   http://dl.suckless.org/${PORTNAME}/

MAINTAINER= ports@FreeBSD.org
COMMENT=    Simple Web browser based on WebKit/Gtk+

LICENSE=    MIT
LICENSE_FILE=   ${WRKSRC}/LICENSE

OPTIONS_DEFINE= DOCS

LIB_DEPENDS=    webkitgtk-1.0:${PORTSDIR}/www/webkit-gtk2
RUN_DEPENDS=    dmenu:${PORTSDIR}/x11/dmenu

USE_CSTD=   c99
USE_GNOME=  gtk20
USE_PKGCONFIG=  yes

MAN1=       surf.1
PORTDOCS=   README
PLIST_FILES=    bin/surf share/pixmaps/surf.png

DESKTOP_ENTRIES="Surf" "" "${PREFIX}/share/pixmaps/surf.png" "surf" "" true

CONFLICTS=  surf-1* # math/surf

# Name conflicts with the math/surf port
NO_LATEST_LINK= yes

.include <bsd.port.options.mk>

pre-everything::
    @${ECHO_MSG} "You can build surf with your own config.h using the SURF_CONF knob:"
    @${ECHO_MSG} "make SURF_CONF=/path/to/surf/config.h install clean"

post-extract:
.if defined(SURF_CONF)
    @${ECHO_MSG} "creating config.h from ${SURF_CONF}"
    @${CP} ${SURF_CONF} ${WRKSRC}/config.h
.endif

post-patch:
    @${REINPLACE_CMD} -e \
        's|^\(PREFIX\)|#\1| ; \
         s|/share/man|/man| ; \
         s|^\(CFLAGS\) =.*|\1 += -I. $${GTKINC} $${CPPFLAGS}| ; \
         s|^\(LDFLAGS\) =.*|\1 += $${GTKLIB}| ; \
         s|^\(CC\)|#\1|' ${WRKSRC}/config.mk

post-install:
    @${STRIP_CMD} ${PREFIX}/bin/surf
    (cd ${WRKSRC} && ${INSTALL_DATA} surf.png ${PREFIX}/share/pixmaps)
.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${DOCSDIR}
    (cd ${WRKSRC} && ${INSTALL_DATA} README ${DOCSDIR})
.endif

.include <bsd.port.mk>