Hi,

next patch for intel-sdp.eclass

Problem:
Documentation and examples are installed on every system. Also japanese
man pages are installed.

Solution:
Use USE.

Thanks justin


@@ -93,13 +97,13 @@ LICENSE="Intel-SDP"
 # Future work, #394411
 #SLOT="${_INTEL_PV1}.${_INTEL_PV2}"
 SLOT="0"
-IUSE="multilib"
+IUSE="doc examples multilib"
 KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
 
 RESTRICT="mirror"
 
 RDEPEND=""
-DEPEND=">=app-arch/rpm2targz-9.0.0.3g"
+DEPEND="app-arch/rpm2targz"
 
 _INTEL_SDP_YEAR=${INTEL_DPV%_update*}
 _INTEL_SDP_YEAR=${INTEL_DPV%_sp*}
 
+# @ ECLASS-FUNCTION: intel-sdp_src_install
+# @DESCRIPTION:
+# Install everything
 intel-sdp_src_install() {
-	[[ -d ${INTEL_SDP_DIR}/eclipse_support ]] && \
-		has eclipse ${IUSE} && \
-		use eclipse && \
-		intel_link_eclipse_plugins
+	if ! use doc && [[ -d "${INTEL_SDP_DIR}"/Documentation ]]; then
+		ebegin "Cleaning out documentation"
+		find "${INTEL_SDP_DIR}"/Documentation -delete || die
+		eend
+	fi
+	if ! use examples && [[ -d "${INTEL_SDP_DIR}"/Samples ]]; then
+		ebegin "Cleaning out examples"
+		find "${INTEL_SDP_DIR}"/Samples -delete || die
+		eend
+	fi
+	if [[ -d "${INTEL_SDP_DIR}"/eclipse_support ]]; then
+		if has eclipse ${IUSE} && use eclipse; then
+			intel_link_eclipse_plugins
+		else
+			ebegin "Cleaning out eclipse plugin"
+			find "${INTEL_SDP_DIR}"/eclipse_support -delete || die
+			eend
+		fi
+	fi
+
+	if [[ -d "${INTEL_SDP_DIR}"/man ]]; then
+		doman "${INTEL_SDP_DIR}"/man/en_US/man1/*
+		[[ ${LINGUAS} == "*ja_JP*" ]] && \
+			doman -i18n=ja_JP "${INTEL_SDP_DIR}"/man/ja_JP/man1/*
+
+		find "${INTEL_SDP_DIR}"/man -delete || die
+	fi
+
 	einfo "Tagging ${PN}"
 	find opt -name \*sh -type f -exec sed -i \
 		-e "s:<.*DIR>:${INTEL_SDP_EDIR}:g" \
-		'{}' \;
-	mkdir -p "${ED:-${D}}"/ || die
-	mv opt "${ED:-${D}}"/ || die "moving files failed"
-}
+		'{}' + || die
 
+	[[ -d "${ED}" ]] || dodir /
+	mv opt "${ED}"/ || die "moving files failed"
 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to