public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc"
@ 2012-11-27 12:32 justin
  2012-11-27 15:18 ` Ulrich Mueller
  2012-11-27 15:38 ` Diego Elio Pettenò
  0 siblings, 2 replies; 9+ messages in thread
From: justin @ 2012-11-27 12:32 UTC (permalink / raw
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 195 bytes --]

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



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: man.patch --]
[-- Type: text/x-patch; name="man.patch", Size: 1838 bytes --]

@@ -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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc"
  2012-11-27 12:32 [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc" justin
@ 2012-11-27 15:18 ` Ulrich Mueller
  2012-11-27 15:58   ` justin
  2012-11-27 15:38 ` Diego Elio Pettenò
  1 sibling, 1 reply; 9+ messages in thread
From: Ulrich Mueller @ 2012-11-27 15:18 UTC (permalink / raw
  To: gentoo-dev

>>>>> On Tue, 27 Nov 2012, justin  wrote:

> next patch for intel-sdp.eclass

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

> Solution:
> Use USE.

> +		[[ ${LINGUAS} == "*ja_JP*" ]] && \
> +			doman -i18n=ja_JP "${INTEL_SDP_DIR}"/man/ja_JP/man1/*

Since LINGUAS is USE-expanded, shouldn't you rather test for
"use linguas_ja"?

Ulrich


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc"
  2012-11-27 12:32 [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc" justin
  2012-11-27 15:18 ` Ulrich Mueller
@ 2012-11-27 15:38 ` Diego Elio Pettenò
  2012-11-27 16:01   ` justin
  1 sibling, 1 reply; 9+ messages in thread
From: Diego Elio Pettenò @ 2012-11-27 15:38 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

On 27/11/2012 04:32, justin wrote:
> Documentation and examples are installed on every system. Also japanese
> man pages are installed.

Does the documentation take time to build, or is it an external
download? If no, don't use a doc USE flag.

Do the example require to be built? If no, don't use an examples USE flag.

Japanese man pages are installed by a number of packages, and so are
Italian and others — you could make them optional with linguas_ja, but
my suggestion would rather be to keep them and tell people who want to
have a minimal install to either use localepurge or installmask.

-- 
Diego Elio Pettenò — Flameeyes
flameeyes@flameeyes.eu — http://blog.flameeyes.eu/


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 553 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc"
  2012-11-27 15:18 ` Ulrich Mueller
@ 2012-11-27 15:58   ` justin
  0 siblings, 0 replies; 9+ messages in thread
From: justin @ 2012-11-27 15:58 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 574 bytes --]

On 11/27/12 4:18 PM, Ulrich Mueller wrote:
>>>>>> On Tue, 27 Nov 2012, justin  wrote:
> 
>> next patch for intel-sdp.eclass
> 
>> Problem:
>> Documentation and examples are installed on every system. Also japanese
>> man pages are installed.
> 
>> Solution:
>> Use USE.
> 
>> +		[[ ${LINGUAS} == "*ja_JP*" ]] && \
>> +			doman -i18n=ja_JP "${INTEL_SDP_DIR}"/man/ja_JP/man1/*
> 
> Since LINGUAS is USE-expanded, shouldn't you rather test for
> "use linguas_ja"?
> 
> Ulrich
> 

You are right, I will check for that.

Thanks for the comment,
Justin


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 266 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc"
  2012-11-27 15:38 ` Diego Elio Pettenò
@ 2012-11-27 16:01   ` justin
  2012-11-27 16:49     ` Diego Elio Pettenò
  0 siblings, 1 reply; 9+ messages in thread
From: justin @ 2012-11-27 16:01 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1116 bytes --]

On 11/27/12 4:38 PM, Diego Elio Pettenò wrote:
> On 27/11/2012 04:32, justin wrote:
>> Documentation and examples are installed on every system. Also japanese
>> man pages are installed.
> 
> Does the documentation take time to build, or is it an external
> download? If no, don't use a doc USE flag.
> 
> Do the example require to be built? If no, don't use an examples USE flag.

Everything is bundled and doesn't need to be built.
I know your are against USE for installation only purposes, so my
question is why?
The reason I introduced the USE here and in general to use it in similar
locations is that those packages install tons of documentation and
examples, which I personally don't like to waste my diskspace with. What
is wrong to give the user this install only option?

justin

> 
> Japanese man pages are installed by a number of packages, and so are
> Italian and others — you could make them optional with linguas_ja, but
> my suggestion would rather be to keep them and tell people who want to
> have a minimal install to either use localepurge or installmask.
> 




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 266 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc"
  2012-11-27 16:01   ` justin
@ 2012-11-27 16:49     ` Diego Elio Pettenò
  2012-11-27 17:01       ` justin
  2012-11-27 23:06       ` Mike Frysinger
  0 siblings, 2 replies; 9+ messages in thread
From: Diego Elio Pettenò @ 2012-11-27 16:49 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 812 bytes --]

On 27/11/2012 08:01, justin wrote:
> The reason I introduced the USE here and in general to use it in similar
> locations is that those packages install tons of documentation and
> examples, which I personally don't like to waste my diskspace with. What
> is wrong to give the user this install only option?

You could go with "minimal" in that case. How big said documentation
would be? Over 100M? Because boost's libraries are 100M without debug
information.

In general I prefer having everything available by default if it doesn't
require impossible amount of space, add dependency, or take time to build.

We have INSTALL_MASK and FEATURES=nodoc if you don't want the
documentation, after all.

-- 
Diego Elio Pettenò — Flameeyes
flameeyes@flameeyes.eu — http://blog.flameeyes.eu/


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 553 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc"
  2012-11-27 16:49     ` Diego Elio Pettenò
@ 2012-11-27 17:01       ` justin
  2012-11-27 23:06       ` Mike Frysinger
  1 sibling, 0 replies; 9+ messages in thread
From: justin @ 2012-11-27 17:01 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 979 bytes --]

On 11/27/12 5:49 PM, Diego Elio Pettenò wrote:
> On 27/11/2012 08:01, justin wrote:
>> The reason I introduced the USE here and in general to use it in similar
>> locations is that those packages install tons of documentation and
>> examples, which I personally don't like to waste my diskspace with. What
>> is wrong to give the user this install only option?
> 
> You could go with "minimal" in that case. How big said documentation
> would be? Over 100M? Because boost's libraries are 100M without debug
> information.
> 
> In general I prefer having everything available by default if it doesn't
> require impossible amount of space, add dependency, or take time to build.
> 
> We have INSTALL_MASK and FEATURES=nodoc if you don't want the
> documentation, after all.
> 

Probably you are right. It's around 25% (60-80MB) which we would save.
As long we make sure things are in places where noman, nodoc and friends
work, it should be fine.

justin


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 266 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc"
  2012-11-27 16:49     ` Diego Elio Pettenò
  2012-11-27 17:01       ` justin
@ 2012-11-27 23:06       ` Mike Frysinger
  2012-11-28  7:56         ` justin
  1 sibling, 1 reply; 9+ messages in thread
From: Mike Frysinger @ 2012-11-27 23:06 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: Text/Plain, Size: 983 bytes --]

On Tuesday 27 November 2012 11:49:52 Diego Elio Pettenò wrote:
> On 27/11/2012 08:01, justin wrote:
> > The reason I introduced the USE here and in general to use it in similar
> > locations is that those packages install tons of documentation and
> > examples, which I personally don't like to waste my diskspace with. What
> > is wrong to give the user this install only option?
> 
> You could go with "minimal" in that case. How big said documentation
> would be? Over 100M? Because boost's libraries are 100M without debug
> information.
> 
> In general I prefer having everything available by default if it doesn't
> require impossible amount of space, add dependency, or take time to build.
> 
> We have INSTALL_MASK and FEATURES=nodoc if you don't want the
> documentation, after all.

documentation is not the same thing as examples.  if the examples are large 
(or even if they aren't), then USE=examples is an acceptable approach to 
filtering.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc"
  2012-11-27 23:06       ` Mike Frysinger
@ 2012-11-28  7:56         ` justin
  0 siblings, 0 replies; 9+ messages in thread
From: justin @ 2012-11-28  7:56 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1148 bytes --]

On 28/11/12 00:06, Mike Frysinger wrote:
> On Tuesday 27 November 2012 11:49:52 Diego Elio Pettenò wrote:
>> On 27/11/2012 08:01, justin wrote:
>>> The reason I introduced the USE here and in general to use it in similar
>>> locations is that those packages install tons of documentation and
>>> examples, which I personally don't like to waste my diskspace with. What
>>> is wrong to give the user this install only option?
>>
>> You could go with "minimal" in that case. How big said documentation
>> would be? Over 100M? Because boost's libraries are 100M without debug
>> information.
>>
>> In general I prefer having everything available by default if it doesn't
>> require impossible amount of space, add dependency, or take time to build.
>>
>> We have INSTALL_MASK and FEATURES=nodoc if you don't want the
>> documentation, after all.
> 
> documentation is not the same thing as examples.  if the examples are large 
> (or even if they aren't), then USE=examples is an acceptable approach to 
> filtering.
> -mike
> 

That's exactly my opinion, therefore doc was dropped and examples is
still living.

justin


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-11-28  7:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-27 12:32 [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc" justin
2012-11-27 15:18 ` Ulrich Mueller
2012-11-27 15:58   ` justin
2012-11-27 15:38 ` Diego Elio Pettenò
2012-11-27 16:01   ` justin
2012-11-27 16:49     ` Diego Elio Pettenò
2012-11-27 17:01       ` justin
2012-11-27 23:06       ` Mike Frysinger
2012-11-28  7:56         ` justin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox