From 66fbe20b021b23ce2c1c7b9d967a3a862a5f0c04 Mon Sep 17 00:00:00 2001
From: Per Andersson <avtobiff@gmail.com>
Date: Thu, 21 Jun 2012 17:40:15 +0200
Subject: [PATCH] Build for only ruby1.8

* Build depend on ruby1.8 instead of ruby.
* Add patch for using ruby1.8 in Makefile.
---
 debian/control                                  |    2 +-
 debian/patches/03_use_ruby1.8_in_makefile.patch |   40 +++++++++++++++++++++++
 debian/patches/series                           |    1 +
 3 files changed, 42 insertions(+), 1 deletions(-)
 create mode 100644 debian/patches/03_use_ruby1.8_in_makefile.patch

diff --git a/debian/control b/debian/control
index adcc500..00cc362 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: interpreters
 Priority: extra
 Maintainer: Bram Senders <bram@luon.net>
 Uploaders: Paul van Tilburg <paulvt@debian.org>
-Build-Depends: debhelper (>= 9), pkg-config, libgtk2.0-dev, libcairo2-dev, libpango1.0-dev, libgif-dev, libjpeg-dev, ruby, ruby1.8-dev
+Build-Depends: debhelper (>= 9), pkg-config, libgtk2.0-dev, libcairo2-dev, libpango1.0-dev, libgif-dev, libjpeg-dev, ruby1.8, ruby1.8-dev
 Standards-Version: 3.9.3.1
 Homepage: http://code.whytheluckystiff.net/shoes/
 
diff --git a/debian/patches/03_use_ruby1.8_in_makefile.patch b/debian/patches/03_use_ruby1.8_in_makefile.patch
new file mode 100644
index 0000000..204a858
--- /dev/null
+++ b/debian/patches/03_use_ruby1.8_in_makefile.patch
@@ -0,0 +1,40 @@
+From 625c5f2f0146d8d695e8920238c8d54c9a8277b9 Mon Sep 17 00:00:00 2001
+From: Per Andersson <avtobiff@gmail.com>
+Date: Thu, 21 Jun 2012 17:30:57 +0200
+Subject: [PATCH] Use ruby1.8 in Makefile instead of default ruby
+
+---
+ Makefile |   10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index ad47c26..2e39ecc 100644
+--- a/Makefile
++++ b/Makefile
+@@ -9,10 +9,10 @@ INCS = -I. -I/usr/include
+ LIBS = -L/usr/lib -lcairo -lpangocairo-1.0 -lgif -ljpeg
+ 
+ SVN_VERSION = 396
+-RUBY_INCS = `ruby -rrbconfig -e 'puts Config::CONFIG["archdir"]'`
+-RUBY_LIBS = `ruby -rrbconfig -e 'puts Config::CONFIG["LIBRUBYARG_SHARED"]'`
+-RUBY_PREFIX = `ruby -rrbconfig -e 'puts Config::CONFIG["prefix"]'`
+-RUBY_SO = `ruby -rrbconfig -e 'puts Config::CONFIG["RUBY_SO_NAME"]'`
++RUBY_INCS = `ruby1.8 -rrbconfig -e 'puts Config::CONFIG["archdir"]'`
++RUBY_LIBS = `ruby1.8 -rrbconfig -e 'puts Config::CONFIG["LIBRUBYARG_SHARED"]'`
++RUBY_PREFIX = `ruby1.8 -rrbconfig -e 'puts Config::CONFIG["prefix"]'`
++RUBY_SO = `ruby1.8 -rrbconfig -e 'puts Config::CONFIG["RUBY_SO_NAME"]'`
+ CAIRO_CFLAGS = `pkg-config --cflags cairo`
+ CAIRO_LIB = `pkg-config --libs cairo`
+ PANGO_CFLAGS = `pkg-config --cflags pango`
+@@ -43,7 +43,7 @@ options:
+ 	@echo "CC       = ${CC}"
+ 	@echo "RUBY     = ${RUBY_PREFIX}"
+ 	@echo "OPTIONS  =${OPTIONS}"
+-	@ruby -v
++	@ruby1.8 -v
+ 
+ .c.o:
+ 	@echo CC $<
+-- 
+1.7.7.3
+
diff --git a/debian/patches/series b/debian/patches/series
index c8fa480..1679e2b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 01_absolute_paths.patch
 02_remove_rubygems_open-uri.patch
+03_use_ruby1.8_in_makefile.patch
-- 
1.7.7.3

