Update x11-toolkits/wxgtk28 to version 2.8.12_3
[dports.git] / x11-toolkits / wxgtk28 / Makefile
1 # Created by: fjoe@FreeBSD.org
2 # $FreeBSD$
3
4 PORTNAME=       wx
5 PORTVERSION=    2.8.12
6 PORTREVISION?=  3
7 CATEGORIES=     x11-toolkits
8 MASTER_SITES=   SF/wxwindows/${PORTVERSION}
9 PKGNAMESUFFIX=  28-${WXGTK_FLAVOR}
10 DISTNAME=       wxGTK-${PORTVERSION}
11
12 MAINTAINER?=    fjoe@FreeBSD.org
13 COMMENT?=       The wxWidgets GUI toolkit with GTK+ bindings
14
15 LIB_DEPENDS+=   libpng15.so:${PORTSDIR}/graphics/png\
16                 libjpeg.so:${PORTSDIR}/graphics/jpeg\
17                 libtiff.so:${PORTSDIR}/graphics/tiff\
18                 libexpat.so:${PORTSDIR}/textproc/expat2
19
20 USES=           iconv gmake pkgconfig tar:bzip2
21 USE_XORG=       x11 sm xxf86vm xinerama
22 USE_GL=         glu
23 USE_GNOME=      gtk20 pangox-compat
24 GNU_CONFIGURE=  yes
25 CONFIGURE_ARGS= --with-libpng=sys\
26                 --with-libjpeg=sys\
27                 --with-libtiff=sys\
28                 --with-zlib=sys\
29                 --with-expat=sys\
30                 --with-opengl\
31                 --with-mspack\
32                 --with-gtk\
33                 --enable-mediactrl\
34                 --disable-backtrace\
35                 --enable-graphics_ctx
36 CONFIGURE_ENV=  PTHREAD_LIBS="${PTHREAD_LIBS}"\
37                 X11BASE="${LOCALBASE}"
38 CPPFLAGS+=      -I${LOCALBASE}/include
39 LIBS+=          -L${LOCALBASE}/lib
40 PLIST=          ${.CURDIR}/pkg-plist
41
42 WXGTK_FLAVOR?=  gtk2
43
44 OPTIONS_DEFINE= GSTREAMER MSPACK
45 OPTIONS_DEFAULT=        GSTREAMER MSPACK
46 MSPACK_DESC=    MS archives support
47
48 .include <bsd.port.options.mk>
49
50 .if ${PORT_OPTIONS:MGSTREAMER}
51 CONFIGURE_ARGS+=--enable-mediactrl
52 USE_GNOME+=     gconf2
53 USE_GSTREAMER=  yes
54 PLIST_SUB+=     GSTREAMER=""
55 .else
56 CONFIGURE_ARGS+=--disable-mediactrl
57 PLIST_SUB+=     GSTREAMER="@comment "
58 .endif
59
60 .if ${PORT_OPTIONS:MMSPACK}
61 CONFIGURE_ARGS+=--with-libmspack
62 LIB_DEPENDS+=   libmspack.so:${PORTSDIR}/archivers/libmspack
63 .else
64 CONFIGURE_ARGS+=--without-libmspack
65 .endif
66
67 .if ${WXGTK_FLAVOR} != "gtk2-common"
68 RUN_DEPENDS=    ${LOCALBASE}/include/wx-2.8/wx/wx.h:${PORTSDIR}/x11-toolkits/wxgtk28-common
69 .endif
70
71 .if ${WXGTK_FLAVOR:M*-common} != ""
72 NO_BUILD=       yes
73 INSTALL_TARGET= install-common
74 .else
75 USE_LDCONFIG=   yes
76 .endif # *-common
77
78 .if ${WXGTK_FLAVOR:M*-contrib*} != ""
79 BUILD_WRKSRC=   ${WRKSRC}/contrib
80 INSTALL_WRKSRC= ${BUILD_WRKSRC}
81
82 .if ${WXGTK_FLAVOR} != "gtk2-contrib-common"
83 USE_WX=         2.8
84 RUN_DEPENDS=    ${LOCALBASE}/include/wx-2.8/wx/stc/stc.h:${PORTSDIR}/x11-toolkits/wxgtk28-contrib-common
85
86 .if ${WXGTK_FLAVOR:M*-unicode*} != ""
87 WX_UNICODE=     yes
88 .endif
89
90 pre-configure:
91         @${FIND} ${BUILD_WRKSRC} -name Makefile.in -print0 | ${XARGS} -0 ${REINPLACE_CMD} \
92                 -e "s|@CXXFLAGS@|${CFLAGS} `${WX_CONFIG} --cxxflags`|" \
93                 -e "s|@CFLAGS@|${CFLAGS} `${WX_CONFIG} --cflags`|" \
94                 -e "s|@CPPFLAGS@||"
95
96 .endif # !gtk2-contrib-common
97 .endif # *-contrib*
98
99 .if ${WXGTK_FLAVOR:M*-unicode*} != ""
100 CONFIGURE_ARGS+=--enable-unicode
101 .endif
102
103 post-patch:
104         @${REINPLACE_CMD} -e 's|pkg_config_args --cflags|pkg_config_args pangox --cflags|g ; \
105                 s|pkg_config_args --libs|pkg_config_args pangox --libs|g' \
106                 -e 's|png_check_sig|png_sig_cmp|g' \
107                         ${WRKSRC}/configure
108
109 .include <bsd.port.mk>