Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 490396
Collapse All | Expand All

(-)files/eblits/pkg_setup-v50160001.eblit (+1 lines)
Lines 10-15 Link Here
10
		*-openbsd*)   osname="openbsd" ;;
10
		*-openbsd*)   osname="openbsd" ;;
11
		*-darwin*)    osname="darwin" ;;
11
		*-darwin*)    osname="darwin" ;;
12
		*-interix*)   osname="interix" ;;
12
		*-interix*)   osname="interix" ;;
13
		*-aix*)       osname="aix" ;;
13
		*)            osname="linux" ;;
14
		*)            osname="linux" ;;
14
	esac
15
	esac
15
16
(-)files/eblits/src_configure-v50160001.eblit (-15 / +21 lines)
Lines 80-100 Link Here
80
	if use prefix ; then
80
	if use prefix ; then
81
		local ldir
81
		local ldir
82
		local paths=""
82
		local paths=""
83
		echo "int main() {}" > "${T}"/t.c
83
		local scantool=""
84
		# need to ensure dirs contain compatible libs,
84
		case ${CHOST} in
85
		# bugs #358875, #400839, use scanelf for #425538
85
		*-aix*)    paths="/lib /usr/lib" ;;
86
		$(tc-getCC) -o "${T}"/t "${T}"/t.c > /dev/null || die
86
		*-darwin*) scantool=scanmacho ;;
87
		local scantool=scanelf
87
		*)         scantool=scanelf   ;;
88
		[[ ${CHOST} == *-darwin* ]] && scantool=scanmacho
88
		esac
89
		local mtype=$(${scantool} -BF "%M%D#f" "${T}"/t)
89
		if [[ -n ${scantool} ]]; then
90
		einfo "searching libdirs for ${mtype}"
90
			echo "int main() {}" > "${T}"/t.c
91
		for ldir in /lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib ; do
91
			# need to ensure dirs contain compatible libs,
92
			[[ -e ${ldir} ]] || continue
92
			# bugs #358875, #400839, use scanelf for #425538
93
			if ${scantool} -BF "%M%D#f" ${ldir}/ | grep -q ${mtype} ; then
93
			$(tc-getCC) -o "${T}"/t "${T}"/t.c > /dev/null || die
94
				paths="${paths} ${ldir}"
94
			local mtype=$(${scantool} -BF "%M%D#f" "${T}"/t)
95
				einfo "found ${ldir}"
95
			einfo "searching libdirs for ${mtype}"
96
			fi
96
			for ldir in /lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib ; do
97
		done
97
				[[ -e ${ldir} ]] || continue
98
				if ${scantool} -BF "%M%D#f" ${ldir}/ | grep -q ${mtype} ; then
99
					paths="${paths} ${ldir}"
100
					einfo "found ${ldir}"
101
				fi
102
			done
103
		fi
98
		myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
104
		myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
99
	elif [[ $(get_libdir) != "lib" ]] ; then
105
	elif [[ $(get_libdir) != "lib" ]] ; then
100
		# We need to use " and not ', as the written config.sh use ' ...
106
		# We need to use " and not ', as the written config.sh use ' ...

Return to bug 490396