desktop/subtle: Patched for ruby-2.2.3.

Signed-off-by: David Spencer <baildon.research@googlemail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
David Spencer 2015-09-12 14:11:35 +01:00 committed by Willy Sudiarto Raharjo
parent cad35e4230
commit d1049a9ef4
4 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,21 @@
diff -r 6670ea4caf96 -r 5d8d64f95c49 Rakefile
--- a/Rakefile
+++ b/Rakefile
@@ -65,7 +65,7 @@
"revision" => "3224", #< Latest stable
"cflags" => "-Wall -Werror -Wpointer-arith -Wstrict-prototypes -Wunused -Wshadow -std=gnu99",
"cpppath" => "-I. -I$(builddir) -Isrc -Isrc/shared -Isrc/subtle -idirafter$(hdrdir) -idirafter$(archdir)",
- "ldflags" => "-L$(libdir) $(rpath) $(LIBS) -l$(RUBY_SO_NAME)",
+ "ldflags" => "$(rpath) -L$(libdir) $(LIBS) -l$(RUBY_SO_NAME)",
"extflags" => "$(LDFLAGS) $(rpath) $(LIBS) -l$(RUBY_SO_NAME)",
"rpath" => "-L$(libdir) -Wl,-rpath=$(libdir)",
"checksums" => []
@@ -258,7 +258,7 @@
make_config unless checksums
else
# Check version
- if 1 != RbConfig::CONFIG["MAJOR"].to_i or 9 != RbConfig::CONFIG["MINOR"].to_i
+ if 1 == RbConfig::CONFIG["MAJOR"].to_i and 9 > RbConfig::CONFIG["MINOR"].to_i
fail("Ruby 1.9.0 or higher required")
end

View File

@ -0,0 +1,11 @@
diff -r 71c757f2a3c4 -r c39a45123787 src/shared/shared.h
--- a/src/shared/shared.h
+++ b/src/shared/shared.h
@@ -28,6 +28,7 @@
#include <X11/Xutil.h>
#include <X11/Xmd.h>
#include <X11/cursorfont.h>
+#include <ruby.h>
#include <ruby/oniguruma.h>
#include "config.h"

View File

@ -0,0 +1,16 @@
diff -r 43d1d0478c46 -r 31e0a9716e58 Rakefile
--- a/Rakefile
+++ b/Rakefile
@@ -397,6 +397,12 @@
ret = false
cflags, ldflags, libs = pkg_config("xft")
+
+ # Fix a bug in ruby 2.2.0 (https://bugs.ruby-lang.org/issues/10651)
+ if cflags.empty?
+ cflags << `#{$PKGCONFIG} --cflags xft`.chomp
+ end
+
unless libs.nil?
# Update flags
@options["cpppath"] << " %s" % [ cflags ]

View File

@ -58,6 +58,11 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \; -exec chmod 644 {} \;
# Fixes to build against ruby2:
patch -p1 < $CWD/changeset_r3240.diff
patch -p1 < $CWD/changeset_r3242.diff
patch -p1 < $CWD/changeset_r3244.diff
rake install manprefix=/usr/man destdir=$PKG rake install manprefix=/usr/man destdir=$PKG
mv $PKG/etc/xdg/subtle/subtle.rb $PKG/etc/xdg/subtle/subtle.rb.new mv $PKG/etc/xdg/subtle/subtle.rb $PKG/etc/xdg/subtle/subtle.rb.new