View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005531CMakeModulespublic2007-08-18 05:212012-01-05 16:21
ReporterArvin Schnell 
Assigned ToAlex Neundorf 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0005531: Special handling for ruby vendor directories
DescriptionI 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'.
TagsNo tags attached.
Attached Filesdiff file icon FindRuby.diff [^] (1,672 bytes) 2007-08-18 05:21 [Show Content]
patch file icon cmake-2.4.7_ruby_finder.patch [^] (5,070 bytes) 2007-08-21 17:50 [Show Content]

 Relationships
related to 0012172closedAlex Neundorf [PATCH] FindRuby does not find ruby-1.9.1 shipped with (k)ubuntu 

  Notes
(0008572)
darix (reporter)
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 (developer)
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 (developer)
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 (reporter)
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 (developer)
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 (developer)
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 (developer)
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.

 Issue History
Date Modified Username Field Change
2007-08-18 05:21 Arvin Schnell New Issue
2007-08-18 05:21 Arvin Schnell File Added: FindRuby.diff
2007-08-21 17:50 darix Note Added: 0008572
2007-08-21 17:50 darix File Added: cmake-2.4.7_ruby_finder.patch
2007-12-17 21:25 Bill Hoffman Status new => assigned
2007-12-17 21:25 Bill Hoffman Assigned To => Alex Neundorf
2008-01-02 11:50 Alex Neundorf Note Added: 0010042
2008-01-02 12:36 Alex Neundorf Note Added: 0010044
2008-01-02 12:36 Alex Neundorf Category => CCMake
2008-01-02 12:39 Alex Neundorf Category CCMake => Modules
2008-01-02 17:19 darix Note Added: 0010051
2008-01-10 16:21 Alex Neundorf Note Added: 0010117
2009-09-26 05:11 Alex Neundorf Note Added: 0017767
2009-09-26 05:11 Alex Neundorf Summary add more ruby config paths => Special handling for ruby vendir directories
2009-11-22 05:21 Alex Neundorf Summary Special handling for ruby vendir directories => Special handling for ruby vendor directories
2012-01-04 16:13 Alex Neundorf Relationship added related to 0012172
2012-01-05 16:21 Alex Neundorf Note Added: 0028205
2012-01-05 16:21 Alex Neundorf Status assigned => closed
2012-01-05 16:21 Alex Neundorf Resolution open => won't fix


Copyright © 2000 - 2018 MantisBT Team