aboutsummaryrefslogtreecommitdiff
path: root/x11-toolkits/wxgtk32/Makefile
blob: 95847f4c6358fb9edca97ce6c2442457e762175b (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
PORTNAME=	wx
DISTVERSIONPREFIX=	v
DISTVERSION=	3.2.4
PORTREVISION=	2
CATEGORIES=	x11-toolkits
MASTER_SITES=	https://github.com/wxWidgets/wxWidgets/releases/download/v${DISTVERSION}/
PKGNAMESUFFIX=	${_SHORT_WX_VER}-${FLAVOR}
DISTNAME=	wxWidgets-${DISTVERSION}

PATCH_SITES=	https://github.com/vadz/wxWidgets/commit/
PATCHFILES=	b8dc0eeb2fb6c49ae0ac9cbc86bd20c0bf3bdee7.patch:-p1 # https://github.com/wxWidgets/wxWidgets/issues/24076

MAINTAINER=	desktop@FreeBSD.org
COMMENT=	GUI toolkit (wxWidgets) with ${FLAVOR:S/k/&+/:tu} bindings
WWW=		https://www.wxwidgets.org/

LICENSE=	GPLv2+
LICENSE_FILE=	${WRKSRC}/docs/gpl.txt

LIB_DEPENDS=	libcurl.so:ftp/curl \
		libexpat.so:textproc/expat2 \
		libfontconfig.so:x11-fonts/fontconfig \
		libfreetype.so:print/freetype2 \
		libharfbuzz.so:print/harfbuzz \
		libjbig.so:graphics/jbigkit \
		libnotify.so:devel/libnotify \
		libpcre2-32.so:devel/pcre2 \
		libpng16.so:graphics/png \
		libsecret-1.so:security/libsecret \
		libsoup-2.4.so:devel/libsoup \
		libtiff.so:graphics/tiff \
		libwayland-egl.so:graphics/wayland \
		libxkbcommon.so:x11/libxkbcommon

FLAVORS=	gtk3 gtk2
FLAVOR?=	${FLAVORS:[1]}
gtk3_CONFLICTS_INSTALL=	${PORTNAME}${_SHORT_WX_VER}-gtk2
gtk2_CONFLICTS_INSTALL=	${PORTNAME}${_SHORT_WX_VER}-gtk3

USES=		compiler:c++11-lib gl gmake gnome iconv jpeg localbase \
		pkgconfig tar:bz2 xorg
USE_CXXSTD=	c++11
USE_GL=		gl glu
USE_GNOME=	cairo gdkpixbuf2
USE_LDCONFIG=	yes
USE_XORG=	sm x11 xtst xxf86vm

GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--disable-epollloop \
		--disable-joystick \
		--enable-backtrace \
		--enable-compat28 \
		--enable-compat30 \
		--enable-graphics_ctx \
		--enable-ipv6 \
		--enable-optimise \
		--enable-std_string \
		--enable-unicode \
		--with-expat=sys \
		--with-libjpeg=sys \
		--with-liblzma \
		--with-libpng=sys \
		--with-libtiff=sys \
		--with-nanosvg \
		--with-opengl \
		--with-zlib=sys \
		--without-gnomevfs
CONFIGURE_ENV=	ac_cv_header_sys_inotify_h=no \
		X11BASE="${LOCALBASE}"

PLIST_SUB+=	GTKVER=${FLAVOR}

OPTIONS_DEFINE=		GSTREAMER MSPACK NLS
OPTIONS_DEFAULT=	GSTREAMER MSPACK
OPTIONS_SUB=		yes

MSPACK_DESC=	Microsoft archives support

GSTREAMER_USES=			gstreamer
GSTREAMER_USE=			GSTREAMER=bad
GSTREAMER_CONFIGURE_ENABLE=	mediactrl

MSPACK_LIB_DEPENDS=	libmspack.so:archivers/libmspack
MSPACK_CONFIGURE_WITH=	libmspack

NLS_USES=	gettext

WEBKIT_LIB_DEPENDS=		libwebkit2gtk-4.0.so:www/webkit2-gtk3
WEBKIT_CONFIGURE_ENABLE=	webview

.if ${FLAVOR} == gtk3
USE_GNOME+=		gtk30
CONFIGURE_ARGS+=	--with-gtk=3
OPTIONS_DEFINE+=	WEBKIT
OPTIONS_DEFAULT+=	WEBKIT
PLIST_SUB+=		GTK2="@comment " \
			GTK3=""
.else
USE_GNOME+=		gtk20
CONFIGURE_ARGS+=	--with-gtk
PLIST_SUB+=		GTK2="" \
			GTK3="@comment " \
			WEBKIT="@comment "
.endif

_SHORT_WX_VER=	${PORTVERSION:S/./ /g:[1..2]:ts}

.include <bsd.port.pre.mk>

# TLS is broken on armv6/7, PR 229396
.if ${ARCH} == armv6 || ${ARCH} == armv7
CONFIGURE_ARGS+=	--disable-tls
.endif

# PR 196703, 197031
.if ${CHOSEN_COMPILER_TYPE} == gcc
CONFIGURE_ARGS+=	--disable-precomp-headers
.endif

# wxWidgets uses the same linker version script for all its shared libraries, so
# some symbols are expectedly undefined. Suppress errors with lld >= 17 due to
# these undefined symbols.
LDFLAGS+=	-Wl,--undefined-version

post-build-NLS-on:
	@${DO_MAKE_BUILD} allmo -C ${BUILD_WRKSRC}/locale

post-install:
	@${RM} ${STAGEDIR}${PREFIX}/bin/wxrc

.include <bsd.port.post.mk>