Tweak x11-toolkits/fltk version 1.3.2
[dports.git] / x11-toolkits / fltk / Makefile
1 # Created by: Dima Sivachenko <dima@Chg.RU>
2 # $FreeBSD$
3
4 PORTNAME=       fltk
5 PORTVERSION=    1.3.2
6 CATEGORIES=     x11-toolkits
7 MASTER_SITES=   http://fltk.org/pub/${PORTNAME}/${PORTVERSION}/
8 DISTNAME=       ${PORTNAME}-${PORTVERSION}-source
9
10 MAINTAINER=     gahr@FreeBSD.org
11 COMMENT=        Cross-platform C++ graphical user interface toolkit
12
13 LICENSE=        LGPL20
14
15 OPTIONS_DEFINE= DOCS
16
17 LIB_DEPENDS=    libpng15.so:${PORTSDIR}/graphics/png \
18                 libjpeg.so:${PORTSDIR}/graphics/jpeg
19
20 USE_LDCONFIG=   yes
21 USE_XORG=       xft
22 USE_GL=         glu
23 USES=           pkgconfig
24 GNU_CONFIGURE=  yes
25 CONFIGURE_ARGS+=--enable-threads \
26                 --enable-shared \
27                 --enable-xft
28
29 CPPFLAGS+=      -I${LOCALBASE}/include
30 LDFLAGS+=       -L${WRKSRC}/src -L${LOCALBASE}/lib
31
32 WRKSRC=         ${WRKDIR}/${PORTNAME}-${PORTVERSION}
33
34 PORTDOCS=       *
35
36 .include <bsd.port.options.mk>
37
38 post-patch:
39         prefix="${PREFIX}" ; plength=$$(($${#prefix}+10)) ; \
40         ${REINPLACE_CMD} -e "\|/etc/fltk|{s||${PREFIX}&|;s|10|$${plength}|;}" \
41         ${WRKSRC}/src/Fl_Preferences.cxx
42
43 .if ${PORT_OPTIONS:MDOCS}
44 post-install:
45         cd ${WRKSRC}/documentation && ${MAKE} ${MAKE_ARGS} docinstall
46         cd ${WRKSRC}/test && ${MAKE} ${MAKE_ARGS} install
47 .endif
48
49 .include <bsd.port.mk>