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

(-)a/eclass/kde-functions.eclass (-11 / +12 lines)
Lines 718-728 Link Here
718
		export PREFIX="$KDEPREFIX"
718
		export PREFIX="$KDEPREFIX"
719
	else
719
	else
720
		if [[ -z "$KDEBASE" ]]; then
720
		if [[ -z "$KDEBASE" ]]; then
721
			export PREFIX="/usr"
721
			export PREFIX="${EPREFIX}/usr"
722
		else
722
		else
723
			case $KDEMAJORVER.$KDEMINORVER in
723
			case $KDEMAJORVER.$KDEMINORVER in
724
				3.5) export PREFIX="/usr/kde/3.5";;
724
				3.5) export PREFIX="${EPREFIX}/usr/kde/3.5";;
725
				5.0) export PREFIX="/usr/kde/svn";;
725
				5.0) export PREFIX="${EPREFIX}/usr/kde/svn";;
726
				*) die "failed to set PREFIX";;
726
				*) die "failed to set PREFIX";;
727
			esac
727
			esac
728
		fi
728
		fi
Lines 734-741 Link Here
734
	else
734
	else
735
		if [[ -z "$KDEBASE" ]]; then
735
		if [[ -z "$KDEBASE" ]]; then
736
			# find the latest kdelibs installed
736
			# find the latest kdelibs installed
737
			for x in /usr/kde/{svn,3.5} "${PREFIX}" \
737
			for x in ${EPREFIX}/usr/kde/{svn,3.5} "${PREFIX}" \
738
				"${KDE3LIBSDIR}" "${KDELIBSDIR}" "${KDE3DIR}" "${KDEDIR}" /usr/kde/*; do
738
				"${KDE3LIBSDIR}" "${KDELIBSDIR}" "${KDE3DIR}" "${KDEDIR}" ${EPREFIX}/usr/kde/*; do
739
				if [[ -f "${x}/include/kwin.h" ]]; then
739
				if [[ -f "${x}/include/kwin.h" ]]; then
740
					debug-print found
740
					debug-print found
741
					export KDEDIR="$x"
741
					export KDEDIR="$x"
Lines 745-752 Link Here
745
		else
745
		else
746
			# kde-base ebuilds must always use the exact version of kdelibs they came with
746
			# kde-base ebuilds must always use the exact version of kdelibs they came with
747
			case $KDEMAJORVER.$KDEMINORVER in
747
			case $KDEMAJORVER.$KDEMINORVER in
748
				3.5) export KDEDIR="/usr/kde/3.5";;
748
				3.5) export KDEDIR="${EPREFIX}/usr/kde/3.5";;
749
				5.0) export KDEDIR="/usr/kde/svn";;
749
				5.0) export KDEDIR="${EPREFIX}/usr/kde/svn";;
750
				*) die "failed to set KDEDIR";;
750
				*) die "failed to set KDEDIR";;
751
			esac
751
			esac
752
		fi
752
		fi
Lines 883-894 Link Here
883
	[[ $EBUILD_PHASE != postinst ]] && [[ $EBUILD_PHASE != postrm ]] && \
883
	[[ $EBUILD_PHASE != postinst ]] && [[ $EBUILD_PHASE != postrm ]] && \
884
		die "buildsycoca() has to be calles in pkg_postinst() and pkg_postrm()."
884
		die "buildsycoca() has to be calles in pkg_postinst() and pkg_postrm()."
885
885
886
	if [[ -x ${KDEDIR}/bin/kbuildsycoca ]] && [[ -z ${ROOT} || ${ROOT} == "/" ]] ; then
886
	if [[ -x ${KDEDIR}/bin/kbuildsycoca ]] &&
887
			[[ -z ${ROOT} || ${ROOT} == "/" || ${ROOT} == "${EPREFIX}" ]] ; then
887
		# First of all, make sure that the /usr/share/services directory exists
888
		# First of all, make sure that the /usr/share/services directory exists
888
		# and it has the right permissions
889
		# and it has the right permissions
889
		mkdir -p /usr/share/services
890
		mkdir -p ${EPREFIX}/usr/share/services
890
		chown root:0 /usr/share/services
891
		chown root:0 ${EPREFIX}/usr/share/services
891
		chmod 0755 /usr/share/services
892
		chmod 0755 ${EPREFIX}/usr/share/services
892
893
893
		ebegin "Running kbuildsycoca to build global database"
894
		ebegin "Running kbuildsycoca to build global database"
894
		# Filter all KDEDIRs not belonging to the current SLOT from XDG_DATA_DIRS
895
		# Filter all KDEDIRs not belonging to the current SLOT from XDG_DATA_DIRS

Return to bug 239077