[banshee] [build] make cairo/gtk work on linux and osx



commit 7a934f86123b8cbbb23e4edef32714a3ad2c6bd4
Author: Aaron Bockover <abockover novell com>
Date:   Tue Jan 5 18:34:34 2010 -0500

    [build] make cairo/gtk work on linux and osx

 build/bundle/packages/cairo.py |   18 +++++++++++++++++-
 build/bundle/packages/gtk+.py  |   22 ++++++++++++++++++----
 2 files changed, 35 insertions(+), 5 deletions(-)
---
diff --git a/build/bundle/packages/cairo.py b/build/bundle/packages/cairo.py
index 2cd836b..be59af0 100644
--- a/build/bundle/packages/cairo.py
+++ b/build/bundle/packages/cairo.py
@@ -1,3 +1,19 @@
+configure_args = [
+	'--enable-pdf'
+]
+
+if profile['name'] == 'osx':
+	configure_args.extend ([
+		'--enable-quartz',
+		'--disable-xlib=no',
+		'--without-x'
+	])
+elif profile['name'] == 'linux':
+	configure_args.extend ([
+		'--disable-quartz',
+		'--with-x'
+	])
+
 package = {
 	'name':    'cairo',
 	'version': '1.8.8',
@@ -5,7 +21,7 @@ package = {
 		'http://cairographics.org/releases/%{name}-%{version}.tar.gz'
 	],
 	'build': [
-		'%{__configure} --enable-pdf --enable-quartz --enable-xlib=no --without-x',
+		'%{__configure} ' + ' '.join (configure_args),
 		'%{__make}'
 	]
 }
diff --git a/build/bundle/packages/gtk+.py b/build/bundle/packages/gtk+.py
index 6080021..ca1cdf0 100644
--- a/build/bundle/packages/gtk+.py
+++ b/build/bundle/packages/gtk+.py
@@ -1,3 +1,10 @@
+configure_args = [
+	'--with-gdktarget=%{gdk_target}',
+	'--disable-cups',
+	'--without-libjasper',
+	'--without-libtiff'
+]
+
 package = {
 	'name':          'gtk+',
 	'version_major': '2.18',
@@ -5,15 +12,22 @@ package = {
 	'version':       '%{version_major}.%{version_minor}',
 	'sources': [
 		'http://ftp.gnome.org/pub/gnome/sources/%{name}/%{version_major}/%{name}-%{version}.tar.gz',
-		'http://github.com/jralls/gtk-osx-build/raw/master/patches/gdk-quartz-input-window.patch'
 	],
 	'prep': [
 		'tar xf @{sources:0}',
-		'cd %{name}-%{version}',
-		'patch -p1 < @{sources:1}'
+		'cd %{name}-%{version}'
 	],
 	'build': [
-		'%{__configure} --with-gdktarget=quartz --without-libjasper --without-libtiff',
+		'%{__configure} ' + ' '.join (configure_args),
 		'%{__make}'
 	]
 }
+
+if profile['name'] == 'osx':
+	package['gdk_target'] = 'quartz'
+	package['sources'].extend ([
+		'http://github.com/jralls/gtk-osx-build/raw/master/patches/gdk-quartz-input-window.patch'
+	])
+	package['prep'].append ('patch -p1 < "@{sources:1}"')
+elif profile['name'] == 'linux':
+	package['gdk_target'] = 'x11'



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]