diff options
-rw-r--r-- | graphics/ruby-gd/Makefile | 23 | ||||
-rw-r--r-- | graphics/ruby-gd/files/patch-extconf.rb | 11 | ||||
-rw-r--r-- | graphics/ruby-gd/files/patch-xpm | 26 |
3 files changed, 37 insertions, 23 deletions
diff --git a/graphics/ruby-gd/Makefile b/graphics/ruby-gd/Makefile index 654706e7fbaa..c55ae9fb52f0 100644 --- a/graphics/ruby-gd/Makefile +++ b/graphics/ruby-gd/Makefile @@ -3,12 +3,11 @@ PORTNAME= gd PORTVERSION= 0.8.0 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= graphics ruby MASTER_SITES= ftp://ftp.jp.vim.org/pub/distfiles/ruby/ \ http://www.mmnt.net/db/0/8/ftp.jp.vim.org/pub/distfiles/ruby/ PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX} -PKGNAMESUFFIX= ${PKGNAMESUFFIX_XPM} DISTNAME= ruby-GD-0.7.4 DIST_SUBDIR= ruby @@ -16,19 +15,21 @@ MAINTAINER= dinoex@FreeBSD.org COMMENT= Ruby extension library to use Thomas Boutell's gd library LIB_DEPENDS= libfreetype.so:print/freetype2 \ - libgd.so:graphics/gd + libgd.so:graphics/gd \ + libpng.so:graphics/png +USES= jpeg USE_RUBY= yes USE_RUBY_EXTCONF= yes RUBY_MODNAME= ${PORTNAME:tl} -CONFIGURE_ARGS= --with-gd-lib="${LOCALBASE}/lib" \ - --with-jpeg \ +CONFIGURE_ARGS= --with-jpeg \ --with-ttf \ --with-freetype \ - --enable-gd2_0 \ - --with-gd-include="${LOCALBASE}/include" + --with-z \ + --with-png \ + --enable-gd2_0 INSTALL_TARGET= site-install @@ -38,15 +39,14 @@ OPTIONS_DEFINE= DOCS EXAMPLES # 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} +GD_X11_CHECK!= ldd ${LOCALBASE}/bin/gd2topng | grep -w 'libX11\.so' || ${ECHO_CMD} .else -WITH_X11_CHECK= # empty +GD_X11_CHECK= # empty .endif -.if !empty(WITH_X11_CHECK) +.if !empty(GD_X11_CHECK) USES= xorg USE_XORG= xpm x11 -PKGNAMESUFFIX_XPM= +xpm CONFIGURE_ARGS+= --with-X11-dir="${LOCALBASE}" --with-xpm .endif @@ -65,7 +65,6 @@ DOCS_JA= readme.ja \ post-patch: ${RUBY} -i -pe 'sub %r:/win98/windows/FONTS:, "${LOCALBASE}/share/fonts/TrueType"' ${WRKSRC}/sample/gdtestttf.rb - ${RUBY} -i -pe 'sub %r:%%GD%%:, "gd"' ${WRKSRC}/extconf.rb post-configure: ${REINPLACE_CMD} -e 's|^V = 0|V = 1|' \ diff --git a/graphics/ruby-gd/files/patch-extconf.rb b/graphics/ruby-gd/files/patch-extconf.rb deleted file mode 100644 index f87e00b5c9a0..000000000000 --- a/graphics/ruby-gd/files/patch-extconf.rb +++ /dev/null @@ -1,11 +0,0 @@ ---- extconf.rb.orig Wed May 30 23:14:17 2001 -+++ extconf.rb Sun Jul 6 00:14:20 2003 -@@ -48,7 +48,7 @@ - end - - if have_library('z') and have_library('png') and -- have_library('gd', 'gdImagePng') and have_library('m') -+ have_library('%%GD%%', 'gdImagePng') and have_library('m') - - if with_config('ttf') and not have_func('gdImageStringTTF') - delete_link('ttf') diff --git a/graphics/ruby-gd/files/patch-xpm b/graphics/ruby-gd/files/patch-xpm new file mode 100644 index 000000000000..1b41535769bf --- /dev/null +++ b/graphics/ruby-gd/files/patch-xpm @@ -0,0 +1,26 @@ +--- GD.c.orig 2020-04-30 23:33:14 UTC ++++ GD.c +@@ -341,9 +341,9 @@ img_from_xpm(klass, f) + rb_io_check_readable(fptr); + + /* need cast, and the argument is char* type */ +- iptr = (gdImagePtr)gdImageCreateFromXpm(fptr->path); ++ iptr = (gdImagePtr)gdImageCreateFromXpm(FPTR_PATH); + if (!iptr) +- rb_raise(rb_eArgError, "%s is not a valid XPM File", (char*)fptr->path); ++ rb_raise(rb_eArgError, "%s is not a valid XPM File", FPTR_PATH); + + return Data_Wrap_Struct(klass,0,free_img,iptr); + } +@@ -364,9 +364,9 @@ img_from_xpmfname(klass, fname) + rb_io_check_readable(fptr); + + /* need cast, and the argument is char* type */ +- iptr = (gdImagePtr)gdImageCreateFromXpm(fptr->path); ++ iptr = (gdImagePtr)gdImageCreateFromXpm(FPTR_PATH); + if (!iptr) +- rb_raise(rb_eArgError, "%s is not a valid XPM File", (char*)fptr->path); ++ rb_raise(rb_eArgError, "%s is not a valid XPM File", FPTR_PATH); + + return Data_Wrap_Struct(klass,0,free_img,iptr); + } |