1 --- rpm-5.4.7/lib/rpmfc.c.rubyabi_prov~ 2012-03-10 21:50:02.143073469 +0100
2 +++ rpm-5.4.7/lib/rpmfc.c 2012-03-10 21:57:13.898394232 +0100
3 @@ -1204,9 +1204,13 @@ assert(fc->fn != NULL);
5 else if (!strncmp(fn, "/ruby", sizeof("/ruby")-1)) {
6 fc->fcolor->vals[fc->ix] |= RPMFC_RUBY;
7 - if ((fn = strstr(fn, "/specifications/")) &&
8 - (fn = strrchr(fn, '.')) && !strcmp(fn, ".gemspec"))
9 - fc->fcolor->vals[fc->ix] |= RPMFC_MODULE;
10 + if ((strstr(fn, ".gemspec") || strstr(fn, "rbconfig.rb"))) {
11 + miRE mire = mireNew(RPMMIRE_REGEX, RPMTAG_FILEPATHS);
12 + if (!mireRegcomp(mire, ".*/(specifications/.*\\.gemspec|rbconfig\\.rb)$"))
13 + if (mireRegexec(mire, fc->fn[fc->ix], (size_t) 0) >= 0)
14 + fc->fcolor->vals[fc->ix] |= RPMFC_MODULE;
15 + mire = mireFree(mire);
18 /* XXX: lacking better, more generic classifier... */
19 else if (!strncmp(fn, "/gstreamer", sizeof("/gstreamer")-1) &&
20 --- rpm-5.4.7/scripts/rubygems.rb.rubyabi_prov~ 2012-03-10 21:50:15.637085059 +0100
21 +++ rpm-5.4.7/scripts/rubygems.rb 2012-03-10 21:50:23.928092180 +0100
22 @@ -36,7 +36,12 @@ ruby_versioned = false
25 for path in $stdin.readlines
26 - if path.match(specpatt)
27 + # way fugly, but we make the assumption that if the package has
28 + # this file, the package is the current ruby version, and should
29 + # therefore provide ruby(abi) = version
30 + if provides and path.match(RbConfig::CONFIG["archdir"] + "/rbconfig.rb")
32 + elsif path.match(specpatt)
35 # this is quite ugly and lame, but the assumption made is that if any files
36 @@ -46,12 +51,6 @@ for path in $stdin.readlines
37 elsif not ruby_versioned
38 if path.match(RbConfig::CONFIG["rubylibdir"])
40 - # even more fugly, but we make the assumption that if the package has
41 - # this file, the package is the current ruby version, and should
42 - # therefore provide ruby(abi) = version
43 - if provides and path.match(RbConfig::CONFIG["rubylibdir"] + "/Env.rb")
46 elsif path.match(RbConfig::CONFIG["sitelibdir"])
48 elsif path.match(RbConfig::CONFIG["vendorlibdir"])