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

Collapse All | Expand All

(-)/usr/portage/eclass/eutils.eclass (-13 / +32 lines)
Lines 52-57 Link Here
52
	fi
52
	fi
53
}
53
}
54
54
55
# Define EPREFIX and friends if needed
56
if ! use prefix ; then
57
	EPREFIX=
58
	ED="${D}"
59
	EROOT="${ROOT}"
60
fi
61
55
else
62
else
56
63
57
ebeep() {
64
ebeep() {
Lines 955-965 Link Here
955
# @DESCRIPTION:
962
# @DESCRIPTION:
956
# Validate desktop entries using desktop-file-utils
963
# Validate desktop entries using desktop-file-utils
957
validate_desktop_entries() {
964
validate_desktop_entries() {
958
	if [[ -x /usr/bin/desktop-file-validate ]] ; then
965
	if [[ -x "${EPREFIX}"/usr/bin/desktop-file-validate ]] ; then
959
		einfo "Checking desktop entry validity"
966
		einfo "Checking desktop entry validity"
960
		local directories=""
967
		local directories=""
961
		for d in /usr/share/applications $@ ; do
968
		for d in /usr/share/applications $@ ; do
962
			[[ -d ${D}${d} ]] && directories="${directories} ${D}${d}"
969
			[[ -d ${ED}${d} ]] && directories="${directories} ${ED}${d}"
963
		done
970
		done
964
		if [[ -n ${directories} ]] ; then
971
		if [[ -n ${directories} ]] ; then
965
			for FILE in $(find ${directories} -name "*\.desktop" \
972
			for FILE in $(find ${directories} -name "*\.desktop" \
Lines 967-973 Link Here
967
			do
974
			do
968
				local temp=$(desktop-file-validate ${FILE} | grep -v "warning:" | \
975
				local temp=$(desktop-file-validate ${FILE} | grep -v "warning:" | \
969
								sed -e "s|error: ||" -e "s|${FILE}:|--|g" )
976
								sed -e "s|error: ||" -e "s|${FILE}:|--|g" )
970
				[[ -n $temp ]] && elog ${temp/--/${FILE/${D}/}:}
977
				[[ -n $temp ]] && elog ${temp/--/${FILE/${ED}/}:}
971
			done
978
			done
972
		fi
979
		fi
973
		echo ""
980
		echo ""
Lines 1236-1248 Link Here
1236
	# let portage worry about it
1243
	# let portage worry about it
1237
	has preserve-libs ${FEATURES} && return 0
1244
	has preserve-libs ${FEATURES} && return 0
1238
1245
1246
	# cannot preserve-libs on aix yet.
1247
	[[ ${CHOST} == *-aix* ]] && {
1248
		einfo "Not preserving libs on AIX (yet), not implemented."
1249
		return 0
1250
	}
1251
1239
	local lib dir
1252
	local lib dir
1240
	for lib in "$@" ; do
1253
	for lib in "$@" ; do
1241
		[[ -e ${ROOT}/${lib} ]] || continue
1254
		[[ -e ${EROOT}/${lib} ]] || continue
1242
		dir=${lib%/*}
1255
		dir=${lib%/*}
1243
		dodir ${dir} || die "dodir ${dir} failed"
1256
		dodir ${dir} || die "dodir ${dir} failed"
1244
		cp "${ROOT}"/${lib} "${D}"/${lib} || die "cp ${lib} failed"
1257
		cp "${EROOT}"/${lib} "${ED}"/${lib} || die "cp ${lib} failed"
1245
		touch "${D}"/${lib}
1258
		touch "${ED}"/${lib}
1246
	done
1259
	done
1247
}
1260
}
1248
1261
Lines 1261-1267 Link Here
1261
1274
1262
	local lib notice=0
1275
	local lib notice=0
1263
	for lib in "$@" ; do
1276
	for lib in "$@" ; do
1264
		[[ -e ${ROOT}/${lib} ]] || continue
1277
		[[ -e ${EROOT}/${lib} ]] || continue
1265
		if [[ ${notice} -eq 0 ]] ; then
1278
		if [[ ${notice} -eq 0 ]] ; then
1266
			notice=1
1279
			notice=1
1267
			ewarn "Old versions of installed libraries were detected on your system."
1280
			ewarn "Old versions of installed libraries were detected on your system."
Lines 1320-1327 Link Here
1320
	[[ -z ${PKG} ]] && die "Unable to resolve $1 to an installed package"
1333
	[[ -z ${PKG} ]] && die "Unable to resolve $1 to an installed package"
1321
	shift
1334
	shift
1322
1335
1323
	local USEFILE=${ROOT}/var/db/pkg/${PKG}/USE
1336
	local USEFILE="${EROOT}"/var/db/pkg/${PKG}/USE
1324
	local IUSEFILE=${ROOT}/var/db/pkg/${PKG}/IUSE
1337
	local IUSEFILE="${EROOT}"/var/db/pkg/${PKG}/IUSE
1325
1338
1326
	# if the IUSE file doesn't exist, the read will error out, we need to handle
1339
	# if the IUSE file doesn't exist, the read will error out, we need to handle
1327
	# this gracefully
1340
	# this gracefully
Lines 1410-1424 Link Here
1410
	if [[ -n ${libdir} ]] ; then
1423
	if [[ -n ${libdir} ]] ; then
1411
		cat <<-EOF
1424
		cat <<-EOF
1412
			if [ "\${LD_LIBRARY_PATH+set}" = "set" ] ; then
1425
			if [ "\${LD_LIBRARY_PATH+set}" = "set" ] ; then
1413
				export LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}:${libdir}"
1426
				export LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}:${EPREFIX}${libdir}"
1427
			else
1428
				export LD_LIBRARY_PATH="${EPREFIX}${libdir}"
1429
			fi
1430
			# ultra-dirty, just do the same for Darwin
1431
			if [ "\${DYLD_LIBRARY_PATH+set}" = "set" ] ; then
1432
				export DYLD_LIBRARY_PATH="\${DYLD_LIBRARY_PATH}:${EPERFIX}${libdir}"
1414
			else
1433
			else
1415
				export LD_LIBRARY_PATH="${libdir}"
1434
				export DYLD_LIBRARY_PATH="${EPREFIX}${libdir}"
1416
			fi
1435
			fi
1417
		EOF
1436
		EOF
1418
	fi
1437
	fi
1419
	# We don't want to quote ${bin} so that people can pass complex
1438
	# We don't want to quote ${bin} so that people can pass complex
1420
	# things as ${bin} ... "./someprog --args"
1439
	# things as ${bin} ... "./someprog --args"
1421
	printf 'exec %s "$@"\n' "${bin}"
1440
	printf 'exec %s "$@"\n' "${bin/#\//${EPREFIX}\/}"
1422
	) > "${tmpwrapper}"
1441
	) > "${tmpwrapper}"
1423
	chmod go+rx "${tmpwrapper}"
1442
	chmod go+rx "${tmpwrapper}"
1424
1443
Lines 1638-1644 Link Here
1638
			einfo "Removing unnecessary ${f#${D%/}} (${reason})"
1657
			einfo "Removing unnecessary ${f#${D%/}} (${reason})"
1639
			queue+=( "${f}" )
1658
			queue+=( "${f}" )
1640
		fi
1659
		fi
1641
	done < <(find "${D}" -xtype f -name '*.la' -print0)
1660
	done < <(find "${ED}" -xtype f -name '*.la' -print0)
1642
1661
1643
	if [[ ${queue[@]} ]]; then
1662
	if [[ ${queue[@]} ]]; then
1644
		rm -f "${queue[@]}"
1663
		rm -f "${queue[@]}"

Return to bug 485438