ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/mports/trunk/graphics/gd/Makefile
Revision: 23690
Committed: Wed Jul 25 23:19:33 2018 UTC (5 years, 9 months ago) by laffer1
File size: 2718 byte(s)
Log Message:
update gd

File Contents

# Content
1 # $MidnightBSD$
2
3 PORTNAME= libgd
4 PORTVERSION= 2.2.4
5 PORTREVISION?= 0
6 PORTEPOCH= 1
7 CATEGORIES+= graphics
8 MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/releases/download/gd-${PORTVERSION}/
9
10 MAINTAINER?= ports@MidnightBSD.org
11 COMMENT?= Graphics library for fast creation of images
12
13 LICENSE= mit
14 LICENSE_FILE= ${WRKSRC}/COPYING
15
16 LIB_DEPENDS= libtiff.so:graphics/tiff \
17 libpng.so:graphics/png \
18 libfreetype.so:print/freetype2
19
20 CONFLICTS= bazaar-1.*
21
22 USES= tar:xz pkgconfig pathfix libtool:keepla shebangfix jpeg
23 SHEBANG_FILES= ${WRKSRC}/src/bdftogd
24 GNU_CONFIGURE= yes
25 USE_LDCONFIG= yes
26 FAKE_OPTS= trueprefix
27 WANT_PERL= yes
28
29 OPTIONS_DEFINE= FONTCONFIG ICONV XPM WEBP
30 OPTIONS_DEFAULT=FONTCONFIG WEBP
31 NO_OPTIONS_SORT=yes
32 FONTCONFIG_LIB_DEPENDS+= libfontconfig.so:x11-fonts/fontconfig
33 FONTCONFIG_CONFIGURE_OFF= --with-fontconfig=no
34 ICONV_USES= iconv
35 ICONV_CONFIGURE_ON= ${ICONV_CONFIGURE_ARG}
36 XPM_USE= xorg=xpm,x11
37 XPM_CONFIGURE_ON= --with-x
38 XPM_CONFIGURE_OFF= --with-xpm=no
39 WEBP_LIB_DEPENDS= libwebp.so:graphics/webp
40 WEBP_CONFIGURE_OFF= --without-webp
41
42 .include <bsd.mport.options.mk>
43
44 # force gdlib-config --ldflags
45 LDFLAGS+= -L${LOCALBASE}/lib
46
47 # The GD_FONTS environment variable can be set to specify the gzipped
48 # tar-ball containing the fonts in bdf format and the bdf file names.
49 # The tarball is the first argument, the tiny, small, medium-bold,
50 # large, and giant fonts follow.
51 #
52 # For example:
53 # GD_FONTS="/usr/ports/distfiles/x-koi8u.tgz koi6x10.bdf koi8x13.bdf \
54 # koi9x15.bdf koi12x24.bdf koi10x20.bdf"
55 #
56 .if defined(GD_FONTS)
57 USES+= perl5
58 USE_PERL5= build
59 WRKFONTS= ${WRKSRC}/src
60 .endif
61
62 pre-extract::
63 @${ECHO_MSG} ""
64 @${ECHO_MSG} "GD_FONTS can be set to specify an alternative list of .bdf files"
65 @${ECHO_MSG} ""
66
67 post-extract:
68 .if defined(GD_FONTS)
69 cd ${WRKFONTS} && ${SH} ${FILESDIR}/makefonts extract ${GD_FONTS}
70 .endif
71
72 pre-configure:
73 .if defined(GD_FONTS)
74 cd ${WRKFONTS} && ${SH} ${FILESDIR}/makefonts configure ${GD_FONTS}
75 .endif
76 # bump shlib version
77 ${REINPLACE_CMD} \
78 -e 's|^GDLIB_LT_CURRENT=3|GDLIB_LT_CURRENT=6|' \
79 ${WRKSRC}/configure
80 # workaround for broken configure
81 .if ! ${PORT_OPTIONS:MICONV}
82 ${REINPLACE_CMD} \
83 -e 's|iconv|noiconv|' \
84 ${WRKSRC}/configure
85 .endif
86 .if ! ${PORT_OPTIONS:MXPM}
87 ${REINPLACE_CMD} \
88 -e 's|xpm|noxpm|' \
89 ${WRKSRC}/configure
90 .endif
91 .if ! ${PORT_OPTIONS:MFONTCONFIG}
92 ${REINPLACE_CMD} \
93 -e 's|fontconfig|nofontconfig|' \
94 ${WRKSRC}/configure
95 .endif
96
97 .if defined(GD_FONTS)
98 pre-build:
99 cd ${WRKFONTS} && ${SH} ${FILESDIR}/makefonts build ${GD_FONTS}
100 .endif
101
102 post-install:
103 ${INSTALL_DATA} ${WRKSRC}/src/gdhelpers.h \
104 ${STAGEDIR}${PREFIX}/include/
105 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libgd.so.6.0.4
106
107 .include <bsd.port.mk>

Properties

Name Value
svn:keywords MidnightBSD=%H