summaryrefslogtreecommitdiff
path: root/graphics/ruby-gd/files
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/ruby-gd/files')
-rw-r--r--graphics/ruby-gd/files/patch-extconf.rb11
-rw-r--r--graphics/ruby-gd/files/patch-xpm26
2 files changed, 26 insertions, 11 deletions
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);
+ }