1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-31 10:46:16 +00:00
freebsd-ports/graphics/ruby-gd/Makefile

95 lines
2.2 KiB
Makefile
Raw Normal View History

# New ports collection makefile for: Ruby/gd
# Date created: 27 Sep 2000
# Whom: Akinori MUSHA aka knu <knu@idaemons.org>
#
# $FreeBSD$
#
PORTNAME= GD
2001-05-30 15:32:52 +00:00
PORTVERSION= 0.7.4
PORTREVISION= 3
CATEGORIES= graphics ruby
2001-05-30 15:32:52 +00:00
MASTER_SITES= http://www.acc.ne.jp/~tam/GD/
PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX}
PKGNAMESUFFIX= ${PKGNAMESUFFIX_XPM}
DISTNAME= ruby-${PORTNAME}-${PORTVERSION}
DIST_SUBDIR= ruby
MAINTAINER= knu@FreeBSD.org
2003-02-18 05:20:09 +00:00
COMMENT= Ruby extension library to use Thomas Boutell's gd library
2002-10-06 21:17:31 +00:00
LIB_DEPENDS= freetype.9:${PORTSDIR}/print/freetype2
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 \
--with-freetype
INSTALL_TARGET= site-install
2002-10-06 21:17:31 +00:00
.if defined(WITH_GD2)
CONFIGURE_ARGS+= ----enable-gd2_0 \
--with-gd-include="${LOCALBASE}/include"
LIB_DEPENDS+= gd.4:${PORTSDIR}/graphics/gd
.else
CONFIGURE_ARGS+= --with-gd-include="${LOCALBASE}/include/gd"
LIB_DEPENDS+= gd1.2:${PORTSDIR}/graphics/gd
2002-10-06 21:17:31 +00:00
.endif
.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' || true
.else
WITH_X11_CHECK= # empty
.endif
.if !empty(WITH_X11_CHECK)
USE_XLIB= yes
USE_XPM= yes
PKGNAMESUFFIX_XPM= +xpm
2001-05-22 19:51:18 +00:00
CONFIGURE_ARGS+= --with-X11-dir="${X11BASE}" --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:
${RUBY} -i -pe 'sub %r:/win98/windows/FONTS:, "${X11BASE}/lib/X11/fonts/TrueType"' ${WRKSRC}/sample/gdtestttf.rb
.if defined(WITH_GD2)
${RUBY} -i -pe 'sub %r:%%GD%%:, "gd"' ${WRKSRC}/extconf.rb
.else
${RUBY} -i -pe 'sub %r:%%GD%%:, "gd1"' ${WRKSRC}/extconf.rb
.endif
post-install:
.if !defined(NOPORTDOCS)
2002-10-06 21:17:31 +00:00
${MKDIR} ${RUBY_MODEXAMPLESDIR}
.for f in ${EXAMPLES_EN}
2002-10-06 21:17:31 +00:00
${INSTALL_DATA} ${WRKSRC}/sample/${f} ${RUBY_MODEXAMPLESDIR}/
.endfor
2002-10-06 21:17:31 +00:00
${MKDIR} ${RUBY_MODDOCDIR}/ja
.for f in ${DOCS_EN}
2002-10-06 21:17:31 +00:00
${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_MODDOCDIR}/
.endfor
.for f in ${DOCS_JA}
2002-10-06 21:17:31 +00:00
${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_MODDOCDIR}/ja/
.endfor
.endif
.include <bsd.port.post.mk>