1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-19 08:13:21 +00:00
freebsd-ports/graphics/ruby-gd/Makefile

93 lines
2.2 KiB
Makefile
Raw Normal View History

# Created by: Akinori MUSHA aka knu <knu@idaemons.org>
# $FreeBSD$
PORTNAME= gd
PORTVERSION= 0.8.0
2013-08-09 14:05:52 +00:00
PORTREVISION= 2
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
2003-02-18 05:20:09 +00:00
COMMENT= Ruby extension library to use Thomas Boutell's gd library
2013-12-11 21:57:31 +00:00
LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2 \
libgd.so:${PORTSDIR}/graphics/gd
2013-11-27 05:58:14 +00:00
NEED_ROOT= yes
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 \
--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
OPTIONS_DEFINE= DOCS EXAMPLES
2013-11-27 05:58:14 +00:00
.include <bsd.port.options.mk>
# Hmm, GREP and TRUE seem to be defined in the bsd.port.post.mk stage.
.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}
.else
WITH_X11_CHECK= # empty
.endif
.if !empty(WITH_X11_CHECK)
2008-03-17 18:04:30 +00:00
USE_XORG= xpm x11
PKGNAMESUFFIX_XPM= +xpm
2008-03-30 09:36:46 +00:00
CONFIGURE_ARGS+= --with-X11-dir="${LOCALBASE}" --with-xpm
.endif
EXAMPLES_EN= example.rb \
gdtestttf.rb \
webpng.rb
2000-10-29 09:54:35 +00:00
DOCS_EN= Changes \
TODO \
readme.en \
doc/INSTALL.en \
doc/manual.html \
2000-10-29 09:54:35 +00:00
doc/manual.rd \
doc/manual_index.html
DOCS_JA= readme.ja \
doc/INSTALL.ja
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
${RUBY} -i -pe 'sub %r:%%GD%%:, "gd"' ${WRKSRC}/extconf.rb
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
post-install:
2013-11-27 05:58:14 +00:00
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${STAGEDIR}${RUBY_MODDOCDIR}/ja
.for f in ${DOCS_EN}
2013-11-27 05:58:14 +00:00
${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${RUBY_MODDOCDIR}/
.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}/
.endfor
.endif
2013-11-27 05:58:14 +00:00
.include <bsd.port.mk>