MantisBT - CMake
View Issue Details
0005531CMakeModulespublic2007-08-18 05:212012-01-05 16:21
Arvin Schnell 
Alex Neundorf 
normalfeaturealways
closedwon't fix 
 
 
0005531: Special handling for ruby vendor directories
I was in need of the vendorlibdir and vendorarchdir config and added
them to FindRuby.cmake.

Do so I recognized that currently 'puts' is used and later the newline
is removed from the strings. This can be done simply by using 'print'
instead of 'puts'.
No tags attached.
related to 0012172closed Alex Neundorf [PATCH] FindRuby does not find ruby-1.9.1 shipped with (k)ubuntu 
diff FindRuby.diff (1,672) 2007-08-18 05:21
https://public.kitware.com/Bug/file/1111/FindRuby.diff
patch cmake-2.4.7_ruby_finder.patch (5,070) 2007-08-21 17:50
https://public.kitware.com/Bug/file/1118/cmake-2.4.7_ruby_finder.patch
Issue History
2007-08-18 05:21Arvin SchnellNew Issue
2007-08-18 05:21Arvin SchnellFile Added: FindRuby.diff
2007-08-21 17:50darixNote Added: 0008572
2007-08-21 17:50darixFile Added: cmake-2.4.7_ruby_finder.patch
2007-12-17 21:25Bill HoffmanStatusnew => assigned
2007-12-17 21:25Bill HoffmanAssigned To => Alex Neundorf
2008-01-02 11:50Alex NeundorfNote Added: 0010042
2008-01-02 12:36Alex NeundorfNote Added: 0010044
2008-01-02 12:36Alex NeundorfCategory => CCMake
2008-01-02 12:39Alex NeundorfCategoryCCMake => Modules
2008-01-02 17:19darixNote Added: 0010051
2008-01-10 16:21Alex NeundorfNote Added: 0010117
2009-09-26 05:11Alex NeundorfNote Added: 0017767
2009-09-26 05:11Alex NeundorfSummaryadd more ruby config paths => Special handling for ruby vendir directories
2009-11-22 05:21Alex NeundorfSummarySpecial handling for ruby vendir directories => Special handling for ruby vendor directories
2012-01-04 16:13Alex NeundorfRelationship addedrelated to 0012172
2012-01-05 16:21Alex NeundorfNote Added: 0028205
2012-01-05 16:21Alex NeundorfStatusassigned => closed
2012-01-05 16:21Alex NeundorfResolutionopen => won't fix

Notes
(0008572)
darix   
2007-08-21 17:50   
This is another approach to this bug.
It adds 2 new variables which i propose to use from now on. And it adds a new option to the finder.

The 2 new variables are RUBY_EXTENSION_ARCH_DIR and RUBY_EXTENSION_LIB_DIR.
I added those to have an abstraction for the potential target paths. By
default those will point to the site_ruby paths.
(RUBY_SITEARCH_DIR and RUBY_SITELIB_DIR).

site_ruby should be the default path for ruby extensions. RUBY_ARCH_DIR
and RUBY_RUBY_LIB_PATH are usually reserved for the ruby stdlib. There is a
patch around that adds a new subdir for extensions called vendor_ruby. That
gives distributors/packagers a namespace so they dont collide with user
installed extensions. So i added a new option called WANT_VENDOR_RUBY. I am
not sure whether it should be prefixed with RUBY_ or if the current name is
ok. If this option is set the 2 new variables will use vendor_ruby instead.

Additionally the patch exports 2 new variables RUBY_VENDORARCH_DIR and
RUBY_VENDORLIB_DIR to be consistent with the site_ruby paths.

In the longterm i would really obsoletes all the RUBY_*ARCH_DIR AND
RUBY_*LIB_DIR variables and only export RUBY_EXTENSION_*DIR from the finder.

comments/critics?
(0010042)
Alex Neundorf   
2008-01-02 11:50   
Regarding the 2.4.7 finder patch:

+SET(RUBY_EXTENSION_ARCH_DIR RUBY_SITEARCH_DIR)
+SET(RUBY_EXTENSION_LIB_DIR RUBY_SITELIB_DIR)
+
+IF(WANT_VENDOR_RUBY)
+ IF(RUBY_HAS_VENDOR_RUBY)
+ SET(RUBY_EXTENSION_ARCH_DIR RUBY_VENDORARCH_DIR)
+ SET(RUBY_EXTENSION_LIB_DIR RUBY_VENDORLIB_DIR)

Are you sure you want that and not the following ?

+SET(RUBY_EXTENSION_ARCH_DIR ${RUBY_SITEARCH_DIR})
+SET(RUBY_EXTENSION_LIB_DIR ${RUBY_SITELIB_DIR})
+
+IF(WANT_VENDOR_RUBY)
+ IF(RUBY_HAS_VENDOR_RUBY)
+ SET(RUBY_EXTENSION_ARCH_DIR ${RUBY_VENDORARCH_DIR})
+ SET(RUBY_EXTENSION_LIB_DIR ${RUBY_VENDORLIB_DIR})
(0010044)
Alex Neundorf   
2008-01-02 12:36   
Committed to cvs, except the OPTION() and the logic related to it.
You say it is a patch, will it be included in some official ruby release ?

Alex
(0010051)
darix   
2008-01-02 17:19   
to answer comment 42:

yes the variable value should be used there. sorry for the typo.
can we include the option with the typos fixed? i am not sure everybody wants to use vendor_ruby just because the ruby supports it. the default should really point to site_ruby.
(0010117)
Alex Neundorf   
2008-01-10 16:21   
Can you please have a look at the current FindRuby.cmake and create a patch of what you'd like to have ?

Thanks
Alex
(0017767)
Alex Neundorf   
2009-09-26 05:11   
Please have a look at current FindRuby.cmake and provide a patch which does what you would like to have.

Alex
(0028205)
Alex Neundorf   
2012-01-05 16:21   
Everything except the switchable RUBY_EXTENSION_[ARCH|LIB]_DIR is already in FindRuby.cmake.
If I understand correctly, the purpose of this variable is to provide a variable where to install stuff.
I'm not convinced this belongs into a Find-module, so I'm closing this one.