blob: 60bcb92b5ba5ed2bf58cc8132e76de0a23bfbe8f (
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
|
# Created by: Akinori MUSHA aka knu <knu@idaemons.org>
# $FreeBSD$
PORTNAME= gd
PORTVERSION= 0.8.0
PORTREVISION= 1
CATEGORIES= graphics ruby
MASTER_SITES= http://www.daifukuya.com/archive/kagemai/lib/
PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX}
PKGNAMESUFFIX= ${PKGNAMESUFFIX_XPM}
DISTNAME= ruby-GD-0.7.4
DIST_SUBDIR= ruby
MAINTAINER= dinoex@FreeBSD.org
COMMENT= Ruby extension library to use Thomas Boutell's gd library
LIB_DEPENDS= freetype:${PORTSDIR}/print/freetype2
USE_RUBY= yes
USE_RUBY_EXTCONF= yes
RUBY_MODNAME= ${PORTNAME:L}
CONFIGURE_ARGS= --with-gd-lib="${LOCALBASE}/lib" \
--with-jpeg \
--with-ttf \
--with-freetype
INSTALL_TARGET= site-install
CONFIGURE_ARGS+= --enable-gd2_0 \
--with-gd-include="${LOCALBASE}/include"
LIB_DEPENDS+= gd:${PORTSDIR}/graphics/gd
.include <bsd.port.pre.mk>
# Hmm, GREP and TRUE seem to be defined in the bsd.port.post.mk stage.
.if exists(${LOCALBASE}/bin/gd2topng)
WITH_X11_CHECK!= ldd ${LOCALBASE}/bin/gd2topng | grep -w 'libX11\.so' || ${ECHO_CMD}
.else
WITH_X11_CHECK= # empty
.endif
.if !empty(WITH_X11_CHECK)
USE_XORG= xpm x11
PKGNAMESUFFIX_XPM= +xpm
CONFIGURE_ARGS+= --with-X11-dir="${LOCALBASE}" --with-xpm
.endif
EXAMPLES_EN= example.rb \
gdtestttf.rb \
webpng.rb
DOCS_EN= Changes \
TODO \
readme.en \
doc/INSTALL.en \
doc/manual.html \
doc/manual.rd \
doc/manual_index.html
DOCS_JA= readme.ja \
doc/INSTALL.ja
post-patch:
${RUBY} -i -pe 'sub %r:/win98/windows/FONTS:, "${LOCALBASE}/lib/X11/fonts/TrueType"' ${WRKSRC}/sample/gdtestttf.rb
${RUBY} -i -pe 'sub %r:%%GD%%:, "gd"' ${WRKSRC}/extconf.rb
post-install:
.if !defined(NOPORTEXAMPLES)
${MKDIR} ${RUBY_MODEXAMPLESDIR}
.for f in ${EXAMPLES_EN}
${INSTALL_DATA} ${WRKSRC}/sample/${f} ${RUBY_MODEXAMPLESDIR}/
.endfor
.endif
.if !defined(NOPORTDOCS)
${MKDIR} ${RUBY_MODDOCDIR}/ja
.for f in ${DOCS_EN}
${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_MODDOCDIR}/
.endfor
.for f in ${DOCS_JA}
${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_MODDOCDIR}/ja/
.endfor
.endif
.include <bsd.port.post.mk>
|