aboutsummaryrefslogtreecommitdiff
path: root/x11-toolkits/wxgtk2-devel/Makefile
blob: beac69d10bff8a74ad9d53f0ccd7ac0d27b83639 (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
# New ports collection makefile for:	wxgtk2-devel
# Date created:         		June 27, 2004
# Whom:					fjoe@FreeBSD.ORG
#
# $FreeBSD$
#

PORTNAME=	wx
PORTVERSION=	2.5.3
CATEGORIES=	x11-toolkits
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	wxwindows
PKGNAMESUFFIX=	${WXGTK_FLAVOR}-devel
DISTNAME=	wxGTK-${PORTVERSION}

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

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

USE_BZIP2=	yes
USE_X_PREFIX=	yes
USE_GL=		yes
USE_GMAKE=	yes
USE_ICONV=	yes
USE_GNOME=	gtk20
USE_REINPLACE=	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\
		--enable-gtk2
CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include \
			  -I${X11BASE}/include" \
		LDFLAGS="-L${LOCALBASE}/lib -liconv \
			 -L${X11BASE}/lib" \
		PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
		PTHREAD_LIBS="${PTHREAD_LIBS}"
PLIST=		${.CURDIR}/pkg-plist
NO_LATEST_LINK=	yes

WXGTK_FLAVOR?=	gtk2

.if ${WXGTK_FLAVOR} == "gtk2"
PORTREVISION=	2
CONFLICTS=	wxgtk2-contrib-devel-2.5.2*
.endif

.if ${WXGTK_FLAVOR} != "gtk2-common"
RUN_DEPENDS=	${X11BASE}/include/wx-2.5/wx/wx.h:${PORTSDIR}/x11-toolkits/wxgtk2-common-devel
.endif

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

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

.if ${WXGTK_FLAVOR} != "gtk2-contrib-common"
RUN_DEPENDS=	${X11BASE}/include/wx-2.5/wx/stc/stc.h:${PORTSDIR}/x11-toolkits/wxgtk2-contrib-common-devel

.if ${WXGTK_FLAVOR:M*-unicode*} != ""
LIB_DEPENDS+=	wx_baseu-2.5.3:${PORTSDIR}/x11-toolkits/wxgtk2-unicode-devel
.else
LIB_DEPENDS+=	wx_base-2.5.3:${PORTSDIR}/x11-toolkits/wxgtk2-devel
.endif

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

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

.include <bsd.port.pre.mk>

.if ${WXGTK_FLAVOR:M*-unicode*} != ""
.if ${OSVERSION} < 500000
IGNORE=		Systems prior to FreeBSD 5.0 currently out of support
.else
CONFIGURE_ARGS+=--enable-unicode
.endif

WXGTK_CONFIG=	${X11BASE}/bin/wxgtk2u-2.5-config
.else
WXGTK_CONFIG=	${X11BASE}/bin/wxgtk2-2.5-config
.endif # *-unicode*

.include <bsd.port.post.mk>