summaryrefslogtreecommitdiff
path: root/x11-toolkits/ntk/Makefile
blob: bb5f7a89ac208ecc457cace695aad1a1ed6fb9ed (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
PORTNAME=	ntk
DISTVERSIONPREFIX=	v
DISTVERSION=	1.3.1001
PORTREVISION=	1
MASTER_SITES=	https://git.kx.studio/non/ntk/archive/${DISTVERSIONFULL}${EXTRACT_SUFX}?dummy=/ # was at GH_ACCOUNT=original-male
CATEGORIES=	x11-toolkits

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Fork of FLTK 1.3.0 which adds graphics rendering via Cairo, etc
WWW=		https://github.com/original-male/ntk

LICENSE=	LGPL20
LICENSE_FILE=	${WRKSRC}/COPYING

LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
		libfreetype.so:print/freetype2 \
		libpng.so:graphics/png

USES=		gnome jpeg localbase:ldflags pkgconfig waf xorg
USE_CXXSTD=	c++14
USE_GNOME=	cairo
USE_XORG=	x11 xft
USE_LDCONFIG=	yes

WRKSRC=		${WRKDIR}/${PORTNAME}

PLIST_SUB=	SHLIB_VER=${PORTVERSION:R}

post-patch:
	@${REINPLACE_CMD} -e " \
		s|conf\.env\['LIB_DL'\] = \['dl'\]|conf.env['LIB_DL'] = []|; \
		s|bld.add_post_fun( run_ldconfig )|#bld.add_post_fun( run_ldconfig )|" \
		${WRKSRC}/wscript

post-install:
	# Removing items that are there by mistake: https://github.com/original-male/ntk/issues/13
	@${REINPLACE_CMD} -e ' \
		/^Requires.*/d; \
		s| -lglu||; \
		s| -lgl||; \
		s| -D_LARGEFILE64_SOURCE||; \
		s| -D_FILE_OFFSET_BITS=64||' \
		${STAGEDIR}${PREFIX}/libdata/pkgconfig/ntk*.pc
	@${RM} ${STAGEDIR}${PREFIX}/lib/libntk*.a* # https://github.com/original-male/ntk/issues/12
	@${STRIP_CMD} \
		${STAGEDIR}${PREFIX}/bin/ntk-chtheme \
		${STAGEDIR}${PREFIX}/bin/ntk-fluid \
		${STAGEDIR}${PREFIX}/lib/libntk.so.${PORTVERSION} \
		${STAGEDIR}${PREFIX}/lib/libntk_images.so.${PORTVERSION}

.include <bsd.port.mk>