2013-01-26 16:06:35 +00:00
|
|
|
# Created by: Akinori MUSHA aka knu <knu@idaemons.org>
|
2000-10-02 14:43:55 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2011-11-19 12:35:04 +00:00
|
|
|
PORTNAME= gd
|
|
|
|
PORTVERSION= 0.8.0
|
2013-08-09 14:05:52 +00:00
|
|
|
PORTREVISION= 2
|
2000-10-02 14:43:55 +00:00
|
|
|
CATEGORIES= graphics ruby
|
2005-12-28 15:02:14 +00:00
|
|
|
MASTER_SITES= http://www.daifukuya.com/archive/kagemai/lib/
|
2000-10-02 14:43:55 +00:00
|
|
|
PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX}
|
2001-02-12 10:48:30 +00:00
|
|
|
PKGNAMESUFFIX= ${PKGNAMESUFFIX_XPM}
|
2011-11-19 12:35:04 +00:00
|
|
|
DISTNAME= ruby-GD-0.7.4
|
2000-10-02 14:43:55 +00:00
|
|
|
DIST_SUBDIR= ruby
|
|
|
|
|
2007-07-25 11:55:37 +00:00
|
|
|
MAINTAINER= dinoex@FreeBSD.org
|
2003-02-18 05:20:09 +00:00
|
|
|
COMMENT= Ruby extension library to use Thomas Boutell's gd library
|
2000-10-02 14:43:55 +00:00
|
|
|
|
2013-12-11 21:57:31 +00:00
|
|
|
LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2 \
|
|
|
|
libgd.so:${PORTSDIR}/graphics/gd
|
2000-10-02 14:43:55 +00:00
|
|
|
|
2013-11-27 05:58:14 +00:00
|
|
|
NEED_ROOT= yes
|
2013-09-21 11:06:03 +00:00
|
|
|
|
2000-10-02 14:43:55 +00:00
|
|
|
USE_RUBY= yes
|
|
|
|
USE_RUBY_EXTCONF= yes
|
|
|
|
|
2002-10-06 21:17:31 +00:00
|
|
|
RUBY_MODNAME= ${PORTNAME:L}
|
|
|
|
|
|
|
|
CONFIGURE_ARGS= --with-gd-lib="${LOCALBASE}/lib" \
|
2001-05-22 19:51:18 +00:00
|
|
|
--with-jpeg \
|
2012-01-12 05:40:03 +00:00
|
|
|
--with-ttf \
|
2013-12-11 21:57:31 +00:00
|
|
|
--with-freetype \
|
|
|
|
--enable-gd2_0 \
|
2003-08-18 16:15:10 +00:00
|
|
|
--with-gd-include="${LOCALBASE}/include"
|
2013-12-11 21:57:31 +00:00
|
|
|
|
|
|
|
INSTALL_TARGET= site-install
|
2002-10-06 21:17:31 +00:00
|
|
|
|
2014-02-21 13:37:15 +00:00
|
|
|
OPTIONS_DEFINE= DOCS EXAMPLES
|
2014-02-10 13:54:26 +00:00
|
|
|
|
2013-11-27 05:58:14 +00:00
|
|
|
.include <bsd.port.options.mk>
|
2000-10-02 14:43:55 +00:00
|
|
|
|
|
|
|
# Hmm, GREP and TRUE seem to be defined in the bsd.port.post.mk stage.
|
2000-10-04 04:44:45 +00:00
|
|
|
.if exists(${LOCALBASE}/bin/gd2topng)
|
2013-05-24 13:30:55 +00:00
|
|
|
WITH_X11_CHECK!= ldd ${LOCALBASE}/bin/gd2topng | grep -w 'libX11\.so' || ${ECHO_CMD}
|
2000-10-04 04:44:45 +00:00
|
|
|
.else
|
2001-02-12 10:48:30 +00:00
|
|
|
WITH_X11_CHECK= # empty
|
2000-10-04 04:44:45 +00:00
|
|
|
.endif
|
2000-10-02 14:43:55 +00:00
|
|
|
|
|
|
|
.if !empty(WITH_X11_CHECK)
|
2008-03-17 18:04:30 +00:00
|
|
|
USE_XORG= xpm x11
|
2001-02-12 10:48:30 +00:00
|
|
|
PKGNAMESUFFIX_XPM= +xpm
|
2008-03-30 09:36:46 +00:00
|
|
|
CONFIGURE_ARGS+= --with-X11-dir="${LOCALBASE}" --with-xpm
|
2000-10-02 14:43:55 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
EXAMPLES_EN= example.rb \
|
|
|
|
gdtestttf.rb \
|
|
|
|
webpng.rb
|
2000-10-29 09:54:35 +00:00
|
|
|
DOCS_EN= Changes \
|
|
|
|
TODO \
|
|
|
|
readme.en \
|
2000-10-02 14:43:55 +00:00
|
|
|
doc/INSTALL.en \
|
|
|
|
doc/manual.html \
|
2000-10-29 09:54:35 +00:00
|
|
|
doc/manual.rd \
|
|
|
|
doc/manual_index.html
|
2000-10-02 14:43:55 +00:00
|
|
|
DOCS_JA= readme.ja \
|
|
|
|
doc/INSTALL.ja
|
|
|
|
|
2001-02-12 10:48:30 +00:00
|
|
|
post-patch:
|
2008-03-30 09:36:46 +00:00
|
|
|
${RUBY} -i -pe 'sub %r:/win98/windows/FONTS:, "${LOCALBASE}/lib/X11/fonts/TrueType"' ${WRKSRC}/sample/gdtestttf.rb
|
2003-08-18 16:15:10 +00:00
|
|
|
${RUBY} -i -pe 'sub %r:%%GD%%:, "gd"' ${WRKSRC}/extconf.rb
|
2001-02-12 10:48:30 +00:00
|
|
|
|
2013-12-01 15:02:43 +00:00
|
|
|
post-configure:
|
|
|
|
${REINPLACE_CMD} -e 's|^V = 0|V = 1|' \
|
|
|
|
-e 's|^libdir = .*|libdir = ${PREFIX}/lib|' \
|
|
|
|
${WRKSRC}/Makefile
|
|
|
|
|
2000-10-02 14:43:55 +00:00
|
|
|
post-install:
|
2013-11-27 05:58:14 +00:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
|
|
|
${MKDIR} ${STAGEDIR}${RUBY_MODDOCDIR}/ja
|
2000-10-02 14:43:55 +00:00
|
|
|
.for f in ${DOCS_EN}
|
2013-11-27 05:58:14 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${RUBY_MODDOCDIR}/
|
2000-10-02 14:43:55 +00:00
|
|
|
.endfor
|
|
|
|
.for f in ${DOCS_JA}
|
2013-11-27 05:58:14 +00:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${RUBY_MODDOCDIR}/ja/
|
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
.if ${PORT_OPTIONS:MEXAMPLES}
|
|
|
|
${MKDIR} ${STAGEDIR}${RUBY_MODEXAMPLESDIR}
|
|
|
|
.for f in ${EXAMPLES_EN}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/sample/${f} ${STAGEDIR}${RUBY_MODEXAMPLESDIR}/
|
2000-10-02 14:43:55 +00:00
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
|
2013-11-27 05:58:14 +00:00
|
|
|
.include <bsd.port.mk>
|