summaryrefslogtreecommitdiffstats
path: root/x11-toolkits/wxgtk29/Makefile
blob: 2adff3490fe452279e7b9ac3436bb2bc6d375e46 (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
93
94
# New ports collection makefile for:	wxgtk26
# Date created:         		June 27, 2004
# Whom:					fjoe@FreeBSD.ORG
#
# $FreeBSD$
#

PORTNAME=	wx
PORTVERSION=	2.8.10
PORTREVISION?=	0
CATEGORIES=	x11-toolkits
MASTER_SITES=	SF/wxwindows
PKGNAMESUFFIX=	${WXGTK_FLAVOR}
DISTNAME=	wxGTK-${PORTVERSION:rc1=-rc1}

MAINTAINER?=	fjoe@FreeBSD.org
COMMENT?=	The wxWidgets GUI toolkit with GTK+ bindings

LIB_DEPENDS+=	png.5:${PORTSDIR}/graphics/png\
		jpeg.9:${PORTSDIR}/graphics/jpeg\
		tiff.4:${PORTSDIR}/graphics/tiff\
		expat.6:${PORTSDIR}/textproc/expat2\
		mspack.1:${PORTSDIR}/archivers/libmspack

USE_BZIP2=	yes
USE_XORG=	x11 sm xxf86vm xinerama 
USE_GL=		glu
USE_GMAKE=	yes
USE_ICONV=	yes
USE_GNOME=	gtk20 gconf2
USE_GSTREAMER=	yes
GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--with-libpng=sys\
		--with-libjpeg=sys\
		--with-libtiff=sys\
		--with-zlib=sys\
		--with-expat=sys\
		--with-opengl\
		--with-mspack\
		--with-gtk\
		--enable-mediactrl\
		--disable-backtrace\
		--enable-graphics_ctx
CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include ${PTHREAD_CFLAGS}"\
		LIBS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"\
		WXCONFIG_CPPFLAGS="${PTHREAD_CFLAGS}"\
		PTHREAD_LIBS="${PTHREAD_LIBS}"\
		X11BASE="${LOCALBASE}"
PLIST=		${.CURDIR}/pkg-plist

WXGTK_FLAVOR?=	gtk2

.if ${WXGTK_FLAVOR} != "gtk2-common"
RUN_DEPENDS=	${LOCALBASE}/include/wx-2.8/wx/wx.h:${PORTSDIR}/x11-toolkits/wxgtk28-common
.endif

.if ${WXGTK_FLAVOR:M*-common} != ""
NO_BUILD=	yes
INSTALL_TARGET=	install-common
.else
USE_LDCONFIG=	yes
.endif # *-common

.if ${WXGTK_FLAVOR:M*-contrib*} != ""
BUILD_WRKSRC=	${WRKSRC}/contrib
INSTALL_WRKSRC=	${BUILD_WRKSRC}

.if ${WXGTK_FLAVOR} != "gtk2-contrib-common"
USE_WX=		2.8
RUN_DEPENDS=	${LOCALBASE}/include/wx-2.8/wx/stc/stc.h:${PORTSDIR}/x11-toolkits/wxgtk28-contrib-common

.if ${WXGTK_FLAVOR:M*-unicode*} != ""
WX_UNICODE=	yes
.endif

pre-configure:
	@${FIND} ${BUILD_WRKSRC} -name Makefile.in -print0 | ${XARGS} -0 ${REINPLACE_CMD} \
		-e "s|@CXXFLAGS@|${CFLAGS} `${WX_CONFIG} --cxxflags`|" \
		-e "s|@CFLAGS@|${CFLAGS} `${WX_CONFIG} --cflags`|" \
		-e "s|@CPPFLAGS@||"

.endif # !gtk2-contrib-common
.endif # *-contrib*

.if ${WXGTK_FLAVOR:M*-unicode*} != ""
CONFIGURE_ARGS+=--enable-unicode
.endif

post-patch:
	@${REINPLACE_CMD} -e 's|pkg_config_args --cflags|pkg_config_args pangox --cflags|g ; \
		s|pkg_config_args --libs|pkg_config_args pangox --libs|g' \
			${WRKSRC}/configure

.include <bsd.port.mk>
OpenPOWER on IntegriCloud