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

Collapse All | Expand All

(-)/usr/portage/dev-lang/tcl/tcl-8.4.6.ebuild.orig (-10 / +72 lines)
Lines 2-8 Link Here
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/dev-lang/tcl/tcl-8.4.6.ebuild,v 1.17 2005/01/19 23:35:00 vapier Exp $
3
# $Header: /var/cvsroot/gentoo-x86/dev-lang/tcl/tcl-8.4.6.ebuild,v 1.17 2005/01/19 23:35:00 vapier Exp $
4
4
5
inherit eutils
5
inherit eutils multilib
6
6
7
DESCRIPTION="Tool Command Language"
7
DESCRIPTION="Tool Command Language"
8
HOMEPAGE="http://dev.scriptics.com/software/tcltk/"
8
HOMEPAGE="http://dev.scriptics.com/software/tcltk/"
Lines 13-19 Link Here
13
KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sh sparc x86"
13
KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sh sparc x86"
14
IUSE="threads"
14
IUSE="threads"
15
15
16
DEPEND="virtual/libc"
16
DEPEND="virtual/libc
17
		!app-emulation/emul-linux-x86-baselibs"
17
18
18
S=${WORKDIR}/${PN}${PV}
19
S=${WORKDIR}/${PN}${PV}
19
20
Lines 31-37 Link Here
31
	fi
32
	fi
32
}
33
}
33
34
35
src_unpack() {
36
	unpack ${A}
37
	if use amd64 && has_multilib_profile; then
38
		cp -ar ${S} ${S}-x86
39
		mv ${S} ${S}-amd64
40
	fi
41
}
42
34
src_compile() {
43
src_compile() {
44
	if use amd64 && has_multilib_profile; then
45
		local OABI=${ABI}
46
		local OPWD=$PWD
47
		ABI="x86"
48
		cd ${S}-x86
49
		src_compile-multilib -x86
50
		ABI="amd64"
51
		cd ${S}-amd64
52
		src_compile-multilib -amd64
53
		ABI=${OABI}
54
		cd ${OPWD}
55
		unset OABI
56
		unset OPWD
57
	else
58
		src_compile-multilib
59
	fi
60
}
61
62
src_compile-multilib() {
35
	local local_config_use=""
63
	local local_config_use=""
36
64
37
	if use threads
65
	if use threads
Lines 39-45 Link Here
39
		local_config_use="--enable-threads"
67
		local_config_use="--enable-threads"
40
	fi
68
	fi
41
69
42
	cd ${S}/unix
70
	cd ${S}${1}/unix
43
	./configure \
71
	./configure \
44
		--host=${CHOST} \
72
		--host=${CHOST} \
45
		--prefix=/usr \
73
		--prefix=/usr \
Lines 51-77 Link Here
51
}
79
}
52
80
53
src_install() {
81
src_install() {
82
	if use amd64 && has_multilib_profile; then
83
		local OABI=${ABI}
84
		local OPWD=$PWD
85
		ABI="x86"
86
		cd ${S}-x86
87
		src_install-multilib -x86 lib32
88
		# additional fix for /usr/lib to /usr/lib32
89
		sed -e "s,^TCL_LIB_SPEC='-L/usr/lib,TCL_LIB_SPEC='-L/usr/lib32," \
90
			-e "s,^TCL_PACKAGE_PATH='/usr/lib',TCL_PACKAGE_PATH='/usr/lib32'," \
91
			-e "s,^TCL_STUB_LIB_SPEC='-L/usr/lib,TCL_STUB_LIB_SPEC='-L/usr/lib32," \
92
			-e "s,^TCL_STUB_LIB_PATH='/usr/lib/,TCL_STUB_LIB_PATH='/usr/lib32/," \
93
			${D}/usr/lib/tclConfig.sh > ${D}/usr/lib/tclConfig.sh.new
94
		mv ${D}/usr/lib/tclConfig.sh.new ${D}/usr/lib/tclConfig.sh
95
		# move x86 libraries
96
		mv ${D}/usr/lib{,32}
97
		# delete tcl${v1} directory and make a symlink
98
		local v1
99
		v1=${PV%.*}
100
		rm -rf ${D}/usr/lib32/tcl${v1}
101
		ln -sf ../lib/tcl${v1} ${D}/usr/lib32/tcl${v1}
102
		unset v1
103
		ABI="amd64"
104
		cd ${S}-amd64
105
		src_install-multilib -amd64 lib
106
		ABI=${OABI}
107
		cd ${OPWD}
108
		unset OABI
109
		unset OPWD
110
	else
111
		src_install-multilib "" lib
112
	fi
113
}
114
115
src_install-multilib() {
54
	#short version number
116
	#short version number
55
	local v1
117
	local v1
56
	v1=${PV%.*}
118
	v1=${PV%.*}
57
119
58
	cd ${S}/unix
120
	cd ${S}${1}/unix
59
	S= make INSTALL_ROOT=${D} MAN_INSTALL_DIR=${D}/usr/share/man install || die
121
	S= make INSTALL_ROOT=${D} MAN_INSTALL_DIR=${D}/usr/share/man install || die
60
122
61
	# fix the tclConfig.sh to eliminate refs to the build directory
123
	# fix the tclConfig.sh to eliminate refs to the build directory
62
	sed -e "s,^TCL_BUILD_LIB_SPEC='-L${S}/unix,TCL_BUILD_LIB_SPEC='-L/usr/lib," \
124
	sed -e "s,^TCL_BUILD_LIB_SPEC='-L${S}${1}/unix,TCL_BUILD_LIB_SPEC='-L/usr/${2}," \
63
		-e "s,^TCL_SRC_DIR='${S}',TCL_SRC_DIR='/usr/lib/tcl${v1}/include'," \
125
		-e "s,^TCL_SRC_DIR='${S}${1}',TCL_SRC_DIR='/usr/${2}/tcl${v1}/include'," \
64
		-e "s,^TCL_BUILD_STUB_LIB_SPEC='-L${S}/unix,TCL_BUILD_STUB_LIB_SPEC='-L/usr/lib," \
126
		-e "s,^TCL_BUILD_STUB_LIB_SPEC='-L${S}${1}/unix,TCL_BUILD_STUB_LIB_SPEC='-L/usr/${2}," \
65
		-e "s,^TCL_BUILD_STUB_LIB_PATH='${S}/unix,TCL_BUILD_STUB_LIB_PATH='/usr/lib," \
127
		-e "s,^TCL_BUILD_STUB_LIB_PATH='${S}${1}/unix,TCL_BUILD_STUB_LIB_PATH='/usr/${2}," \
66
		-e "s,^TCL_LIB_FILE='libtcl8.4..TCL_DBGX..so',TCL_LIB_FILE=\"libtcl8.4\$\{TCL_DBGX\}.so\"," \
128
		-e "s,^TCL_LIB_FILE='libtcl8.4..TCL_DBGX..so',TCL_LIB_FILE=\"libtcl8.4\$\{TCL_DBGX\}.so\"," \
67
		${D}/usr/lib/tclConfig.sh > ${D}/usr/lib/tclConfig.sh.new
129
		${D}/usr/lib/tclConfig.sh > ${D}/usr/lib/tclConfig.sh.new
68
	mv ${D}/usr/lib/tclConfig.sh.new ${D}/usr/lib/tclConfig.sh
130
	mv ${D}/usr/lib/tclConfig.sh.new ${D}/usr/lib/tclConfig.sh
69
131
70
	# install private headers
132
	# install private headers
71
	dodir /usr/lib/tcl${v1}/include/unix
133
	dodir /usr/lib/tcl${v1}/include/unix
72
	install -c -m0644 ${S}/unix/*.h ${D}/usr/lib/tcl${v1}/include/unix
134
	install -c -m0644 ${S}${1}/unix/*.h ${D}/usr/lib/tcl${v1}/include/unix
73
	dodir /usr/lib/tcl${v1}/include/generic
135
	dodir /usr/lib/tcl${v1}/include/generic
74
	install -c -m0644 ${S}/generic/*.h ${D}/usr/lib/tcl${v1}/include/generic
136
	install -c -m0644 ${S}${1}/generic/*.h ${D}/usr/lib/tcl${v1}/include/generic
75
	rm -f ${D}/usr/lib/tcl${v1}/include/generic/tcl.h
137
	rm -f ${D}/usr/lib/tcl${v1}/include/generic/tcl.h
76
	rm -f ${D}/usr/lib/tcl${v1}/include/generic/tclDecls.h
138
	rm -f ${D}/usr/lib/tcl${v1}/include/generic/tclDecls.h
77
	rm -f ${D}/usr/lib/tcl${v1}/include/generic/tclPlatDecls.h
139
	rm -f ${D}/usr/lib/tcl${v1}/include/generic/tclPlatDecls.h

Return to bug 83811