summaryrefslogtreecommitdiff
path: root/www/netsurf/Makefile
blob: 512b0db1481f0cf17b60b3f41d9e0c1225f5d737 (plain)
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
90
91
92
PORTNAME=	netsurf
PORTVERSION=	3.10
PORTREVISION=	8
CATEGORIES=	www
MASTER_SITES=	http://download.netsurf-browser.org/netsurf/releases/source/
DISTNAME=	${PORTNAME}-${PORTVERSION}-src

MAINTAINER=	nc@FreeBSD.org
COMMENT=	Lightweight web browser
WWW=		https://www.netsurf-browser.org/

LICENSE=	GPLv2 MIT
LICENSE_COMB=	multi

BUILD_DEPENDS=	duk:lang/duktape \
		nsgenbind:devel/nsgenbind \
		p5-HTML-Parser>=3.72:www/p5-HTML-Parser \
		xxd:editors/vim
LIB_DEPENDS=	libcss.so:textproc/libcss \
		libcurl.so:ftp/curl \
		libdom.so:www/libdom \
		libexpat.so:textproc/expat2 \
		libhubbub.so:www/libhubbub \
		libnsbmp.so:graphics/libnsbmp \
		libnsgif.so:graphics/libnsgif \
		libnspsl.so:dns/libnspsl \
		libnsutils.so:devel/libnsutils \
		libparserutils.so:devel/libparserutils \
		libpng.so:graphics/png \
		libutf8proc.so:textproc/utf8proc \
		libwapcaplet.so:textproc/libwapcaplet \
		libwebp.so:graphics/webp
RUN_DEPENDS=	${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss \
		duk:lang/duktape

USES=		bison cpe desktop-file-utils gmake gnome iconv:translit jpeg \
		localbase pkgconfig shebangfix ssl
CPE_VENDOR=	${PORTNAME}-browser
USE_GNOME=	cairo glib20 gtk30 librsvg2

SHEBANG_FILES=	utils/split-messages.pl
perl_CMD=	${PERL}

MAKE_ARGS=	CC="${CC}" \
		CCOPT="" \
		HOST="${OPSYS}" \
		HOST_CC="${CC}" \
		OPTCFLAGS="${CFLAGS}" \
		Q="" \
		TARGET="gtk3" \
		WARNFLAGS=""
.if defined(WITH_DEBUG)
MAKE_ARGS+=	STRIP="true"
.endif
MAKE_ENV+=	COMPONENT_TYPE="lib-shared" \
		FLEX="${LOCALBASE}/bin/flex"

ALL_TARGET=	#empty
CFLAGS+=	-I${OPENSSLINC}
LDFLAGS+=	-L${OPENSSLLIB} -lssl -lcrypto
WRKSRC=		${WRKDIR}/${DISTNAME:S/-src//}

post-patch:
	@${REINPLACE_CMD} '/CFLAGS/d' \
		${WRKSRC}//Makefile.defaults
	@${CP} ${FILESDIR}/buildui.pl ${WRKSRC}/utils/

do-configure:
	@${CP} ${FILESDIR}/Makefile.config  ${WRKSRC}

post-install:
	cd ${STAGEDIR}${PREFIX}/bin && ${LN} -sf netsurf-gtk3 \
		netsurf-gtk
.for d in applications pixmaps
	${MKDIR} ${STAGEDIR}${PREFIX}/share/${d}
.endfor
	${INSTALL_DATA} ${WRKSRC}/frontends/gtk/res/deoptions.gtk3.ui \
		${STAGEDIR}${PREFIX}/share/netsurf
	${INSTALL_DATA} ${WRKSRC}/frontends/gtk/res/enoptions.gtk3.ui \
		${STAGEDIR}${PREFIX}/share/netsurf
	${INSTALL_DATA} ${WRKSRC}/frontends/gtk/res/froptions.gtk3.ui \
		${STAGEDIR}${PREFIX}/share/netsurf
	${INSTALL_DATA} ${WRKSRC}/frontends/gtk/res/itoptions.gtk3.ui \
		${STAGEDIR}${PREFIX}/share/netsurf
	${INSTALL_DATA} ${WRKSRC}/frontends/gtk/res/nloptions.gtk3.ui \
		${STAGEDIR}${PREFIX}/share/netsurf
	${INSTALL_DATA} ${WRKSRC}/frontends/gtk/res/netsurf-gtk.desktop \
		${STAGEDIR}${PREFIX}/share/applications
	${INSTALL_DATA} ${WRKSRC}/frontends/gtk/res/netsurf.xpm \
		${STAGEDIR}${PREFIX}/share/pixmaps

.include <bsd.port.mk>