Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 159922 | Differences between
and this patch

Collapse All | Expand All

(-)gems.eclass (-1 / +2 lines)
Lines 37-48 Link Here
37
}
37
}
38
38
39
gems_src_unpack() {
39
gems_src_unpack() {
40
	#ruby_patch_mkmf
41
	true
40
	true
42
}
41
}
43
42
44
gems_src_install() {
43
gems_src_install() {
45
	gems_location
44
	gems_location
45
	# why placing this function in gems_src_unpack doesn't work?
46
	ruby_patch_rbconfig 
46
47
47
	if [ -z "${MY_P}" ]; then
48
	if [ -z "${MY_P}" ]; then
48
		GEM_SRC=${DISTDIR}/${P}
49
		GEM_SRC=${DISTDIR}/${P}
(-)ruby-gnome2.eclass (-12 / +3 lines)
Lines 11-16 Link Here
11
# Variables:
11
# Variables:
12
# PATCHES	Space delimited list of patch files.
12
# PATCHES	Space delimited list of patch files.
13
13
14
inherit ruby
15
14
EXPORT_FUNCTIONS src_compile src_install src_unpack
16
EXPORT_FUNCTIONS src_compile src_install src_unpack
15
17
16
IUSE=""
18
IUSE=""
Lines 31-48 Link Here
31
RDEPEND="virtual/ruby"
33
RDEPEND="virtual/ruby"
32
34
33
ruby-gnome2_src_unpack() {
35
ruby-gnome2_src_unpack() {
34
	if [ ! -x /bin/install -a -x /usr/bin/install ]; then
35
		cat <<END >${T}/mkmf.rb
36
require 'mkmf'
37
38
STDERR.puts 'patching mkmf'
39
CONFIG['INSTALL'] = '/usr/bin/install'
40
END
41
		# save it because rubygems needs it (for unsetting RUBYOPT)
42
		export GENTOO_RUBYOPT="-r${T}/mkmf.rb"
43
		export RUBYOPT="${RUBYOPT} ${GENTOO_RUBYOPT}"
44
	fi
45
46
	unpack ${A}
36
	unpack ${A}
47
	cd ${S}
37
	cd ${S}
48
	# apply bulk patches
38
	# apply bulk patches
Lines 54-59 Link Here
54
}
44
}
55
45
56
ruby-gnome2_src_compile() {
46
ruby-gnome2_src_compile() {
47
	ruby_patch_rbconfig
57
	ruby extconf.rb || die "extconf.rb failed"
48
	ruby extconf.rb || die "extconf.rb failed"
58
	emake CC=${CC:-gcc} CXX=${CXX:-g++} || die "emake failed"
49
	emake CC=${CC:-gcc} CXX=${CXX:-g++} || die "emake failed"
59
}
50
}
(-)ruby.eclass (-13 / +14 lines)
Lines 53-77 Link Here
53
53
54
[[ -z "${RUBY}" ]] && export RUBY=/usr/bin/ruby
54
[[ -z "${RUBY}" ]] && export RUBY=/usr/bin/ruby
55
55
56
ruby_patch_mkmf() {
56
ruby_patch_rbconfig() {
57
57
	local rbconfig
58
	if [ ! -x /bin/install -a -x /usr/bin/install ]; then
58
	if [ ! -x /bin/install -a -x /usr/bin/install ]; then
59
		einfo "Patching mkmf"
59
		einfo "Shadowing rbconfig.rb"
60
		cat <<END >${T}/mkmf.rb
60
		mkdir "${T}/ruby"
61
require 'mkmf'
61
		rbconfig=$(ruby -r rbconfig -e 'print Config::CONFIG["archdir"]')/rbconfig.rb
62
62
		[ -f "${rbconfig}" ] || die "File ${rbconfig} not found. Please report"
63
STDERR.puts 'Modified mkmf is used'
63
		sed 's,/bin/install,/usr/bin/install,g' "$rbconfig" > "${T}/ruby/rbconfig.rb"
64
CONFIG['INSTALL'] = '/usr/bin/install'
64
		export GENTOO_RUBYLIB="${T}/ruby"
65
END
65
		if [ -n "${RUBYLIB}" ]; then
66
		# save it because rubygems needs it (for unsetting RUBYOPT)
66
			export RUBYLIB="${GENTOO_RUBYLIB}:${RUBYLIB}"
67
		export GENTOO_RUBYOPT="-r${T}/mkmf.rb"
67
		else
68
		export RUBYOPT="${RUBYOPT} ${GENTOO_RUBYOPT}"
68
			export RUBYLIB="${GENTOO_RUBYLIB}"
69
		fi
69
	fi
70
	fi
70
71
71
}
72
}
72
73
73
ruby_src_unpack() {
74
ruby_src_unpack() {
74
	#ruby_patch_mkmf
75
	unpack ${A}
75
	unpack ${A}
76
	cd ${S}
76
	cd ${S}
77
	# apply bulk patches
77
	# apply bulk patches
Lines 83-88 Link Here
83
}
83
}
84
84
85
ruby_econf() {
85
ruby_econf() {
86
	ruby_patch_rbconfig
86
87
87
	RUBY_ECONF="${RUBY_ECONF} ${EXTRA_ECONF}"
88
	RUBY_ECONF="${RUBY_ECONF} ${EXTRA_ECONF}"
88
	if [ -f configure ] ; then
89
	if [ -f configure ] ; then

Return to bug 159922