Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 150720 - dev-ruby/sqlite3-ruby automagic swig dependency
Summary: dev-ruby/sqlite3-ruby automagic swig dependency
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-10 02:47 UTC by Richard Brown (RETIRED)
Modified: 2007-02-23 11:52 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
sqlite3-ruby-1.1.0-r1.diff (sqlite3-ruby-r1.diff,1.15 KB, patch)
2006-10-10 02:49 UTC, Richard Brown (RETIRED)
Details | Diff
new patch (sqlite3-ruby-1.1.0-r1.patch,1.02 KB, patch)
2006-12-16 06:50 UTC, Nguyen Thai Ngoc Duy (RETIRED)
Details | Diff
sqlite3-ruby-1.1.0-no-swig.patch (sqlite3-ruby-1.1.0-no-swig.patch,593 bytes, patch)
2006-12-16 06:51 UTC, Nguyen Thai Ngoc Duy (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Brown (RETIRED) gentoo-dev 2006-10-10 02:47:22 UTC
the gem install for sqlite3-ruby checks to see if swig (USE="ruby") is installed, if it is it changes the bindings it produces.

http://code.whytheluckystiff.net/camping/wiki/BeAlertWhenOnSqlite3
Comment 1 Richard Brown (RETIRED) gentoo-dev 2006-10-10 02:49:19 UTC
Created attachment 99269 [details, diff]
sqlite3-ruby-1.1.0-r1.diff

patch sqlite3-ruby-1.1.0 to use a swig USE flag, if swig is used, it makes sure swig was compiled with USE="ruby"
Comment 2 Carsten Lohrke (RETIRED) gentoo-dev 2006-10-10 04:47:15 UTC
Simply adding the use flag doesn't suffice, as having swig installed, but using USE=-swig, would built it using swig, but not storing the dependency. 
Comment 3 Richard Brown (RETIRED) gentoo-dev 2006-10-10 04:58:36 UTC
Sorry, i didn't explain the patch properly, the patch also include this pkg_setup, does it not cover that?

+pkg_setup() {
+	if useq swig && ! built_with_use dev-lang/swig ruby ; then
+	  eerror "You must compile swig with ruby bindings. Please add"
+	  eerror "'ruby' to your USE flags and recompile swig"
+	  die "swig needs ruby bindings"
+	elif useq !swig && has_version dev-lang/swig && built_with_use dev-lang/swig ruby ; then
+	  eerror "You have not specified 'swig' in your USE flags but"
+	  eerror "swig is installed with ruby bindings. Either add"
+	  eerror "'swig' to your USE flags or recompile swig without"
+	  eerror "ruby bindings"
+	  die "USE=\"-swig\" but swig was compile with USE=\"ruby\""
+	fi
+}
Comment 4 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2006-12-16 06:10:38 UTC
Or patch it so that it won't use swig if swig use flag isn't set
Comment 5 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2006-12-16 06:50:59 UTC
Created attachment 104134 [details, diff]
new patch

You'll need new gems.eclass from bug #158286
Comment 6 Nguyen Thai Ngoc Duy (RETIRED) gentoo-dev 2006-12-16 06:51:48 UTC
Created attachment 104135 [details, diff]
sqlite3-ruby-1.1.0-no-swig.patch
Comment 7 Richard Brown (RETIRED) gentoo-dev 2007-02-23 11:52:45 UTC
This is fixed in CVS with version 1.2.1