Re: [gentoo-dev] New eclass cuda.eclass

2012-11-27 Thread justin
On 28/11/12 00:11, Mike Frysinger wrote:
> On Sunday 25 November 2012 11:47:42 Justin wrote:
>> # Copyright 1999-20012 Gentoo Foundation
> 
> it is not yet 20012
> 
> also, this file too has whitespace damage (indenting with spaces)
> 
>> [[ "${CUDA_VERBOSE}" == true ]] && NVCCFLAGS+=" -v"
> 
> wouldn't this be better done in cuda_sanitize ?
> 
>> local _gcc_bindir _ver _args="" _flag _ret
> 
> they're local vars, so you don't need to use _ prefixes
> 
>> if [[ ! $(type -P cuda-config) ]]; then
> 
> it's more common to do something like:
>   if cuda-config --help >/dev/null ; then
> 
> or, you could even inline it with the existing code:
> 
>   if ! args=$(cuda-config -s); then
>   ... eerror/die ...
>   else
>   args=$(version_sort ${args})
>   ...
> 
>>if [[ ! -n ${_args} ]]; then
> 
> use "-z", not "! -n"
> -mike
> 

Thanks for your comments, those are now integrated,

Justin



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc"

2012-11-27 Thread justin
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



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] Packages up for grabs due apache herd removal

2012-11-27 Thread Patrick Lauer
On 11/28/12 15:25, Michael Orlitzky wrote:
> On 11/27/2012 02:43 PM, Pacho Ramos wrote:
>> After discussing it at: 
>> http://www.gossamer-threads.com/lists/gentoo/dev/262834
> 
>> ...
> 
> 
> Apache itself is in need of some attention these days. The ChangeLog
> shows only Patrick committing in the last six months, which -- correct
> me if I'm wrong -- is just part of his "if there's a bug I'm gonna fix
> it" plan (thanks).
Aye, I just brought it back to a state where it's marginally useful for
users. Still lots of issues with it :(

> 
> Plenty of issues, especially with the 2.4 series, have gone unaddressed.
> 
Blame upstream for breaking 2/3rds of all external modules - that's not
the best way to handle upgrades. Most likely fixable without too much
effort, if anyone feels bored...




Re: [gentoo-dev] RFC: intel-sdp.eclass check user license

2012-11-27 Thread justin
On 28/11/12 00:04, Mike Frysinger wrote:
> On Tuesday 27 November 2012 07:26:50 justin wrote:
>> next patch for intel-sdp.eclass
> 
> your code has a lot of whitespace damage (leading spaces instead of tabs).  
> you should fix that up.

I am sorry for that and we fix it up. Did some writing on mac where the
editor did magic tab -> whitespace conversion.

> 
>> +# @ECLASS-FUNCTION: big-warning
>> +# @INTERNAL
>> +# warn user that we really require a license
> 
> there should be @DESCRIPTION line before the description
> 

I have overlooked that. Fixed now.

> you can run 
> /usr/portage/app-portage/eclass-manpages/files/eclass-to-manpage.sh 
> against the eclass to check for errors.

Didn't know, that you can run it on single files. Nice to know, Thanks.

> 
> also, just because they're @INTERNAL doesn't mean short names like "big-
> warning" and "run-test" are OK.  your eclass is putting funcs into global 
> scope which can collide with other eclasses/ebuilds and possibly things in 
> $PATH (dejagnu provides a standard program called `runtest`).  best to give 
> them a unique prefix like _isdp_big_warning().

You are right. I will prefix and name them correctly.

> 
>> +_version_test() {
>> +local _comp _comp_full _arch _file _warn
> 
> you've declared the vars all local.  there's no need for the _ prefix.
> 
>> +   for ((i = 0; i < ${#_dirs[@]}; i++)); do
> 
> for dir in "${dirs[@]}" ; do

I can't remember what was my problem, but somehow I didn't manage to
iterate properly over the array. So I looked that up and found this syntax.
But maybe something else was wrong too.


> 
> that avoids indexing dirs constantly
> -mike
> 

thanks for your comments mike,

Jusitn



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] Packages up for grabs due apache herd removal

2012-11-27 Thread Michael Orlitzky
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 11/27/2012 02:43 PM, Pacho Ramos wrote:
> After discussing it at: 
> http://www.gossamer-threads.com/lists/gentoo/dev/262834
> 
> ...
> 

Apache itself is in need of some attention these days. The ChangeLog
shows only Patrick committing in the last six months, which -- correct
me if I'm wrong -- is just part of his "if there's a bug I'm gonna fix
it" plan (thanks).

Plenty of issues, especially with the 2.4 series, have gone unaddressed.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (GNU/Linux)

iQIcBAEBAgAGBQJQtbyFAAoJEBxJck0inpOieE0QAIQGStXs0M05a9QaG8goJup7
0/ybh865zKMwMeevTxwpoS4ITqiaPEW+Fcw4bKcIFY58YutcGwAq0J1/uFWpapbG
2/RvTXM7klm+7ACqTmDdo3P9K1woBJOq3jk/duPno1nmT3rT3c0JoeKXrGvPuOFs
VM/U4x4l6ofIxq/SfYy2Wq5//soyzUM4/xiqNBsiHIYLKAHDoQ2mD49zV7lgR9cJ
R5PouJ4E13NbNzICoJsex4G/R5sIywqs5ILfeQEmsZ34O+VPqJMxf+wfjd/c0gwh
KVF9DyVtOJ+nmKeZD5zSxcgRrZW01TWumzlB1qlMpSTw1/9+X0yeZUn6gnwQSdlr
YYPRXDLecD1VZtsDYkJri8XiQb2+ahWZNsYhPgSGNedHvcOSOvadtWZ65sTHaqaT
CsmaUgxbF1JpAq0R4KAuukonVODqk3XiKPY/ViFC3pW7AtDvjYFG6C8en0Yvxwdl
YfHASCFqmi6Of8iX8IM9jmvXkzPB0y1RBIHAMpYZtl++gT9iXs2Ea5U/2jkCg2rT
Sk13CDB2eghIFkdrNhG67fNlKDQm+Wx9H71iqJliJOxeTjhq58EmmyaLrOrGpAIK
2bKKeIq6CfmQp74yWZkQ+a0fjCTy1RaGDAK+nW1OK2d9zK229rwM3b7Q/zu4xFJO
Y0LMWEbSK1ww+RzUzGR5
=vTQU
-END PGP SIGNATURE-



Re: [gentoo-dev] Ohloh Organizations - Gentoo Linux

2012-11-27 Thread Matt Turner
On Mon, Nov 26, 2012 at 12:58 PM, Dirkjan Ochtman  wrote:
> On Fri, Nov 23, 2012 at 12:18 PM, Dirkjan Ochtman  wrote:
>> I haven't heard back from them, maybe you can ask them what's up.
>
> This has been setup (with Donnie's help):
>
> https://www.ohloh.net/orgs/gentoo
>
> I've claimed 15 of the projects on there that I could easily find,
> analysis on those should complete shortly. If you're on Ohloh, please
> nominate further projects. You can also add the organization as a tag
> to your project contributions (which I've done for my gentoo-x86
> commits).
>
> Also, if you're an active Ohloh user, let me know if you want to be a
> manager for the Gentoo organization.
>
> Cheers,
>
> Dirkjan
>

Sure, I would like to be a manager.

I'd like to add these as well:
https://www.ohloh.net/p/gentoo_loongson_overlay
https://www.ohloh.net/p/gentoo_catalyst



Re: [gentoo-dev] Lastrites: net-proxy/paros, net-misc/ups-monitor, app-emulation/mol, net-wireless/fsam7400, net-wireless/acx, net-wireless/acx-firmware, net-wireless/linux-wlan-ng-modules, net-wirele

2012-11-27 Thread Walter Dnes
On Wed, Nov 28, 2012 at 04:28:20AM +0100, Ch??-Thanh Christopher Nguy???n wrote
> Pacho Ramos schrieb:> # Pacho Ramos  (24 Nov 2012)
> > # Doesn't build with current kernels (#344889). People needs to
> > # migrate to x11-drivers/xf86-video-fbdev and be sure they have
> > # CONFIG_STUB_POULSBO enabled in their kernels.
> > # Removal in a month.
> > x11-drivers/psb-kmod
> > x11-drivers/xf86-video-psb
> 
> Telling people to use xf86-video-fbdev for Poulsbo would be bad
> advice, they should use xf86-video-modesetting.

  Pacho+Christopher, I actually have an early 32-bit-only Poulsbo/Atom
ASUS netbook working.  I think I can speak with a little authority
because of that.  See message that I posted in Gentoo-Users...
http://gentoo.2317880.n4.nabble.com/Intel-GMA500-Poulsbo-works-with-recent-kernels-td158517.html
a few notes...

1) The instructions at
http://blog.bodhizazen.net/linux/linux-gma500-poulsbo-driver-moved-out-of-staging/
list the "make menuconfig" steps necessary for the Poulsbo GPU.  Since
the "Intel GMA5/600 KMS Framebuffer" option is selected, xf86-video-fbdev
*MUST* be used as the video driver.  I did try xf86-video-modesetting, a
few minutes ago and it does not support X Windows on my machine.  I also
suggest that those instructions be copied into the mask message, at
least the following...

* Kernel setup (make menuconfig)
Device Drivers ->
  Graphics support ->
DRM (Direct Rendering Manager) -> Intel GMA5/600 KMS Framebuffer

* X video driver x11-drivers/xf86-video-fbdev


2) CONFIG_STUB_POULSBO is not absolutely necessary, but may be helpful.
It is related to specialized stuff like controlling brightness and other
low-level video control stuff

3) See also
http://blog.bodhizazen.net/linux/ubuntu-12-04-gma500-poulsbo-boot-options/
for more Poulsbo-specific tweaking.

-- 
Walter Dnes 



Re: [gentoo-dev] Lastrites: net-proxy/paros, net-misc/ups-monitor, app-emulation/mol, net-wireless/fsam7400, net-wireless/acx, net-wireless/acx-firmware, net-wireless/linux-wlan-ng-modules, net-wirele

2012-11-27 Thread Chí-Thanh Christopher Nguyễn
Pacho Ramos schrieb:> # Pacho Ramos  (24 Nov 2012)
> # Doesn't build with current kernels (#344889). People needs to
> # migrate to x11-drivers/xf86-video-fbdev and be sure they have
> # CONFIG_STUB_POULSBO enabled in their kernels.
> # Removal in a month.
> x11-drivers/psb-kmod
> x11-drivers/xf86-video-psb

Telling people to use xf86-video-fbdev for Poulsbo would be bad advice, they
should use xf86-video-modesetting.


Best regards,
Chí-Thanh Christopher Nguyễn



Re: [gentoo-dev] New global use-flag [pax_kernel]

2012-11-27 Thread Mike Frysinger
On Sunday 25 November 2012 18:57:12 Matthew Thode wrote:
> pax_kernel is used by 21 packages.  The description would generally be
> 'make changes to the package so it works under a pax enabled kernel'.
> Currently it is used to either patch or (inclusive) to pax mark.
> 
> What think you?

`paxctl` should be run if it exists, and a hardened profile should list that in 
its @system imo.  that cuts out quite a number of users.

as for patches applied to the source, i can't say w/out reading the actual 
patches if there's a better way (keying off defines, or runtime detection based 
on errno which we've done in glibc).
-mike


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] New eclass cuda.eclass

2012-11-27 Thread Mike Frysinger
On Sunday 25 November 2012 11:47:42 Justin wrote:
> # Copyright 1999-20012 Gentoo Foundation

it is not yet 20012

also, this file too has whitespace damage (indenting with spaces)

> [[ "${CUDA_VERBOSE}" == true ]] && NVCCFLAGS+=" -v"

wouldn't this be better done in cuda_sanitize ?

> local _gcc_bindir _ver _args="" _flag _ret

they're local vars, so you don't need to use _ prefixes

> if [[ ! $(type -P cuda-config) ]]; then

it's more common to do something like:
if cuda-config --help >/dev/null ; then

or, you could even inline it with the existing code:

if ! args=$(cuda-config -s); then
... eerror/die ...
else
args=$(version_sort ${args})
...

>if [[ ! -n ${_args} ]]; then

use "-z", not "! -n"
-mike


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc"

2012-11-27 Thread Mike Frysinger
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


signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] Last rites: app-admin/profiler

2012-11-27 Thread Sebastian Pipping
# Sebastian Pipping  (27 Nov 2012)
# Masked for removal in 30 days.
# Licensing issues, turned out not distributable (bug #444332)
app-admin/profiler



Re: [gentoo-dev] RFC: intel-sdp.eclass check user license

2012-11-27 Thread Mike Frysinger
On Tuesday 27 November 2012 07:26:50 justin wrote:
> next patch for intel-sdp.eclass

your code has a lot of whitespace damage (leading spaces instead of tabs).  
you should fix that up.

> +# @ECLASS-FUNCTION: big-warning
> +# @INTERNAL
> +# warn user that we really require a license

there should be @DESCRIPTION line before the description

you can run /usr/portage/app-portage/eclass-manpages/files/eclass-to-manpage.sh 
against the eclass to check for errors.

also, just because they're @INTERNAL doesn't mean short names like "big-
warning" and "run-test" are OK.  your eclass is putting funcs into global 
scope which can collide with other eclasses/ebuilds and possibly things in 
$PATH (dejagnu provides a standard program called `runtest`).  best to give 
them a unique prefix like _isdp_big_warning().

> +_version_test() {
> +local _comp _comp_full _arch _file _warn

you've declared the vars all local.  there's no need for the _ prefix.

> +   for ((i = 0; i < ${#_dirs[@]}; i++)); do

for dir in "${dirs[@]}" ; do

that avoids indexing dirs constantly
-mike


signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] Last rites: app-admin/smolt

2012-11-27 Thread Sebastian Pipping
# Sebastian Pipping  (27 Nov 2012)
# Masked for removal in 30 days.
# Server and software development discontinued upstream (bug #438082)
app-admin/smolt




Re: [gentoo-dev] [PATCH 1/2] Set default EGIT_SOURCEDIR to point to standard ${WORKDIR}/${P}. It allows "${S}" overriding in user's code as other eclasses do:

2012-11-27 Thread Sergei Trofimovich
On Tue, 27 Nov 2012 12:18:51 -0800
Davide Pesavento  wrote:

> On Tue, Nov 27, 2012 at 11:22 AM, Sergei Trofimovich  
> wrote:
> > Before the patch I had to move subdir(not very reliable):
> > EGIT_REPO_URI="git://github.com/UU-ComputerScience/uhc.git"
> > src_prepare() {
> > mv EHC/* ./ || die
> > }
> >
> > After the patch i can define it the usual way:
> > EGIT_REPO_URI="git://github.com/UU-ComputerScience/uhc.git"
> > S="${WORKDIR}/${P}/EHC
> >
> > Original ebuild: 
> > https://github.com/gentoo-haskell/gentoo-haskell/blob/master/dev-lang/uhc/uhc-.ebuild#L27
> >
> > Signed-off-by: Sergei Trofimovich 
> > ---
> >  git-2.eclass | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/git-2.eclass b/git-2.eclass
> > index 1ecc633..1a96978 100644
> > --- a/git-2.eclass
> > +++ b/git-2.eclass
> > @@ -21,7 +21,7 @@ DEPEND="dev-vcs/git"
> >  # This variable specifies destination where the cloned
> >  # data are copied to.
> >  #
> > -# EGIT_SOURCEDIR="${S}"
> > +# EGIT_SOURCEDIR="${WORKDIR}/${P}"
> >
> >  # @ECLASS-VARIABLE: EGIT_STORE_DIR
> >  # @DESCRIPTION:
> > @@ -132,7 +132,7 @@ git-2_init_variables() {
> > local esc_pn liverepo livebranch livecommit
> > esc_pn=${PN//[-+]/_}
> >
> > -   : ${EGIT_SOURCEDIR="${S}"}
> > +   : ${EGIT_SOURCEDIR="${WORKDIR}/${P}"}
> >
> > : ${EGIT_STORE_DIR:="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/egit-src"}
> >
> > --
> > 1.8.0
> >
> >
> 
> While in theory this makes sense, it also has the potential to break
> ebuilds setting S="${WORKDIR}/foo" and then expecting the sources to
> be inside "foo". IOW it's not backward compatible, is it?

Right, it's not. I thought that default makes no sense as it relocates
git repo, but not the tarballs (if yet in SRC_URI). It does make sense
for submodules though, but you need to override EGIT_SOURCEDIR
for them anyway.

EGIT_SOURCEDIR users in tree are quite fun: [attached]

All try to set it to ${WORKDIR}/${P} in one form or another.

I didn't check actual users before. Seems there is a possibility of breakage.

Please ignore both patches. We'll keep local modifications in haskell overlay.

Sorry for the noise.

-- 

  Sergei
./app-office/libreoffice/libreoffice-3.5.7.2.ebuild:
EGIT_SOURCEDIR="${WORKDIR}/${PN}-${mod}-${PV}"
./app-office/libreoffice/libreoffice-3.5.7.2.ebuild:unset 
EGIT_PROJECT EGIT_SOURCEDIR EGIT_REPO_URI EGIT_BRANCH
./app-office/libreoffice/libreoffice-3.6.3.2.ebuild:
EGIT_SOURCEDIR="${WORKDIR}/${PN}-${mod}-${PV}"
./app-office/libreoffice/libreoffice-3.6.3.2.ebuild:unset 
EGIT_PROJECT EGIT_SOURCEDIR EGIT_REPO_URI EGIT_BRANCH
./app-office/libreoffice/libreoffice-3.6..ebuild:   
EGIT_SOURCEDIR="${WORKDIR}/${PN}-${mod}-${PV}"
./app-office/libreoffice/libreoffice-3.6..ebuild:   unset 
EGIT_PROJECT EGIT_SOURCEDIR EGIT_REPO_URI EGIT_BRANCH
./app-office/libreoffice/libreoffice--r2.ebuild:
EGIT_SOURCEDIR="${WORKDIR}/${PN}-${mod}-${PV}"
./app-office/libreoffice/libreoffice--r2.ebuild:unset 
EGIT_PROJECT EGIT_SOURCEDIR EGIT_REPO_URI EGIT_BRANCH
./dev-embedded/urjtag/urjtag-.ebuild:   EGIT_SOURCEDIR=${WORKDIR}
./dev-perl/Lab-Measurement/Lab-Measurement-3.00.ebuild: EGIT_SOURCEDIR=${S}
./dev-perl/Lab-Measurement/Lab-Measurement-3.10.ebuild: EGIT_SOURCEDIR=${S}
./dev-perl/Lab-Measurement/Lab-Measurement-.ebuild: EGIT_SOURCEDIR=${S}
./dev-scheme/racket/racket-5.1.2.ebuild:EGIT_SOURCEDIR="${WORKDIR}/${P}"
./dev-scheme/racket/racket-5.2.1.ebuild:EGIT_SOURCEDIR="${WORKDIR}/${P}"
./dev-scheme/racket/racket-5.3.1.ebuild:EGIT_SOURCEDIR="${WORKDIR}/${P}"
./eclass/selinux-policy-2.eclass:   
EGIT_SOURCEDIR="${WORKDIR}/refpolicy";;
./eclass/git-2.eclass:# @ECLASS-VARIABLE: EGIT_SOURCEDIR
./eclass/git-2.eclass:# EGIT_SOURCEDIR="${S}"
./eclass/git-2.eclass:  : ${EGIT_SOURCEDIR="${S}"}
./eclass/git-2.eclass:  debug-print "${FUNCNAME}: working in 
\"${EGIT_SOURCEDIR}\""
./eclass/git-2.eclass:  pushd "${EGIT_SOURCEDIR}" > /dev/null
./eclass/git-2.eclass:# Internal function moving sources from the EGIT_DIR to 
EGIT_SOURCEDIR dir.
./eclass/git-2.eclass:  debug-print "${FUNCNAME}: ${MOVE_COMMAND} 
\"${EGIT_DIR}\" \"${EGIT_SOURCEDIR}\""
./eclass/git-2.eclass:  mkdir -p "${EGIT_SOURCEDIR}" \
./eclass/git-2.eclass:  || die "${FUNCNAME}: failed to create 
${EGIT_SOURCEDIR}"
./eclass/git-2.eclass:  ${MOVE_COMMAND} "${EGIT_SOURCEDIR}" \
./eclass/git-2.eclass:  || die "${FUNCNAME}: sync to 
\"${EGIT_SOURCEDIR}\" failed"
./eclass/git-2.eclass:  pushd "${EGIT_SOURCEDIR}" > /dev/null
./eclass/git-2.eclass:  echo ">>> Unpacked to ${EGIT_SOURCEDIR}"
./net-analyzer/gsm-receiver/gsm-receiver-.ebuild:EGIT_SOURCEDIR="${S}"
./net-im/psi/psi-.ebuild:   
EGIT_SOURCEDIR="${WORKDIR}/psi-l10n/${x}" git-2_src_unpack
./net-im/psi/psi-.ebuild:   EGIT_SOURCED

Re: [gentoo-dev] [PATCH 2/2] Allow user mangle distfiles' "${EGIT_DIR}" after actual git fetch.

2012-11-27 Thread Sergei Trofimovich
On Tue, 27 Nov 2012 21:46:06 +0100
Tomáš Chvátal  wrote:

> This is bad idea. It breaks live rebuild and other stuff. You should just
> clone each repo yourself, see how i did in libreoffice ebuild

How does it break live rebuild? I'm not sure I understand what exactly
you mean.

Does libreoffice export all the info for each submodule the way
smart-live-rebuild can pick it?

> Dne 27.11.2012 20:28 "Sergei Trofimovich"  napsal(a):
> 
> > EGIT_REPO_URI="https://github.com/ghc/ghc.git";
> > requires user to run './sync-all fetch / ./sync-all pull'
> > after actual 'git pull', which fetches 20 more repos for code changes.
> > Upstream does not use submodules.
> >
> > The patch injects user's callback right before 'git-2_move_source'.
> > Currently I abuse 'git-2_gc':
> >
> > Original ebuild:
> > https://github.com/gentoo-haskell/gentoo-haskell/blob/master/dev-lang/ghc/ghc-.ebuild#L180

-- 

  Sergei


signature.asc
Description: PGP signature


Re: [gentoo-dev] [PATCH 2/2] Allow user mangle distfiles' "${EGIT_DIR}" after actual git fetch.

2012-11-27 Thread Tomáš Chvátal
This is bad idea. It breaks live rebuild and other stuff. You should just
clone each repo yourself, see how i did in libreoffice ebuild
Dne 27.11.2012 20:28 "Sergei Trofimovich"  napsal(a):

> EGIT_REPO_URI="https://github.com/ghc/ghc.git";
> requires user to run './sync-all fetch / ./sync-all pull'
> after actual 'git pull', which fetches 20 more repos for code changes.
> Upstream does not use submodules.
>
> The patch injects user's callback right before 'git-2_move_source'.
> Currently I abuse 'git-2_gc':
>
> Original ebuild:
> https://github.com/gentoo-haskell/gentoo-haskell/blob/master/dev-lang/ghc/ghc-.ebuild#L180
>
> Signed-off-by: Sergei Trofimovich 
> ---
>  git-2.eclass | 24 
>  1 file changed, 24 insertions(+)
>
> diff --git a/git-2.eclass b/git-2.eclass
> index 1a96978..1bacef5 100644
> --- a/git-2.eclass
> +++ b/git-2.eclass
> @@ -569,6 +569,29 @@ git-2_cleanup() {
> unset EGIT_LOCAL_NONBARE
>  }
>
> +
> +# @FUNCTION: git-2_fetch_user
> +# @DESCRIPTION:
> +# User-overridable callback allow user to update
> +# sources in "${EGIT_DIR}" (current location).
> +# Does nothing by default
> +git-2_fetch_user() {
> +   :
> +}
> +
> +# @FUNCTION: git-2_post_fetch
> +# @INTERNAL
> +# Internal function calling user's callback
> +# when "${EGIT_DIR}" needs more actions, than
> +# simple fetch.
> +git-2_post_fetch() {
> +   debug-print-function ${FUNCNAME} "$@"
> +
> +   pushd "${EGIT_DIR}" > /dev/null
> +   git-2_fetch_user
> +   popd > /dev/null
> +}
> +
>  # @FUNCTION: git-2_src_unpack
>  # @DESCRIPTION:
>  # Default git src_unpack function.
> @@ -581,6 +604,7 @@ git-2_src_unpack() {
> git-2_fetch "$@"
> git-2_gc
> git-2_submodules
> +   git-2_post_fetch
> git-2_move_source
> git-2_branch
> git-2_bootstrap
> --
> 1.8.0
>
>
>


Re: [gentoo-dev] [PATCH 1/2] Set default EGIT_SOURCEDIR to point to standard ${WORKDIR}/${P}. It allows "${S}" overriding in user's code as other eclasses do:

2012-11-27 Thread Tomáš Chvátal
Why not use tools already in the eclass? The egit_sourcedir is exactly for
this... also you can just define s after the inherit...
Dne 27.11.2012 20:27 "Sergei Trofimovich"  napsal(a):

> Before the patch I had to move subdir(not very reliable):
> EGIT_REPO_URI="git://github.com/UU-ComputerScience/uhc.git"
> src_prepare() {
> mv EHC/* ./ || die
> }
>
> After the patch i can define it the usual way:
> EGIT_REPO_URI="git://github.com/UU-ComputerScience/uhc.git"
> S="${WORKDIR}/${P}/EHC
>
> Original ebuild:
> https://github.com/gentoo-haskell/gentoo-haskell/blob/master/dev-lang/uhc/uhc-.ebuild#L27
>
> Signed-off-by: Sergei Trofimovich 
> ---
>  git-2.eclass | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/git-2.eclass b/git-2.eclass
> index 1ecc633..1a96978 100644
> --- a/git-2.eclass
> +++ b/git-2.eclass
> @@ -21,7 +21,7 @@ DEPEND="dev-vcs/git"
>  # This variable specifies destination where the cloned
>  # data are copied to.
>  #
> -# EGIT_SOURCEDIR="${S}"
> +# EGIT_SOURCEDIR="${WORKDIR}/${P}"
>
>  # @ECLASS-VARIABLE: EGIT_STORE_DIR
>  # @DESCRIPTION:
> @@ -132,7 +132,7 @@ git-2_init_variables() {
> local esc_pn liverepo livebranch livecommit
> esc_pn=${PN//[-+]/_}
>
> -   : ${EGIT_SOURCEDIR="${S}"}
> +   : ${EGIT_SOURCEDIR="${WORKDIR}/${P}"}
>
> :
> ${EGIT_STORE_DIR:="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/egit-src"}
>
> --
> 1.8.0
>
>
>


Re: [gentoo-dev] Packages up for grabs due apache herd removal

2012-11-27 Thread Jesus Rivero (Neurogeek)
On Tue, Nov 27, 2012 at 2:43 PM, Pacho Ramos  wrote:
> www-apache/mod_fastcgi
> www-apache/mod_fastcgi_handler
app-admin/apachetop

Took these 3.

Cheers,



-- 
Jesus Rivero (Neurogeek)
Gentoo Developer



Re: [gentoo-dev] [PATCH 1/2] Set default EGIT_SOURCEDIR to point to standard ${WORKDIR}/${P}. It allows "${S}" overriding in user's code as other eclasses do:

2012-11-27 Thread Davide Pesavento
On Tue, Nov 27, 2012 at 11:22 AM, Sergei Trofimovich  wrote:
> Before the patch I had to move subdir(not very reliable):
> EGIT_REPO_URI="git://github.com/UU-ComputerScience/uhc.git"
> src_prepare() {
> mv EHC/* ./ || die
> }
>
> After the patch i can define it the usual way:
> EGIT_REPO_URI="git://github.com/UU-ComputerScience/uhc.git"
> S="${WORKDIR}/${P}/EHC
>
> Original ebuild: 
> https://github.com/gentoo-haskell/gentoo-haskell/blob/master/dev-lang/uhc/uhc-.ebuild#L27
>
> Signed-off-by: Sergei Trofimovich 
> ---
>  git-2.eclass | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/git-2.eclass b/git-2.eclass
> index 1ecc633..1a96978 100644
> --- a/git-2.eclass
> +++ b/git-2.eclass
> @@ -21,7 +21,7 @@ DEPEND="dev-vcs/git"
>  # This variable specifies destination where the cloned
>  # data are copied to.
>  #
> -# EGIT_SOURCEDIR="${S}"
> +# EGIT_SOURCEDIR="${WORKDIR}/${P}"
>
>  # @ECLASS-VARIABLE: EGIT_STORE_DIR
>  # @DESCRIPTION:
> @@ -132,7 +132,7 @@ git-2_init_variables() {
> local esc_pn liverepo livebranch livecommit
> esc_pn=${PN//[-+]/_}
>
> -   : ${EGIT_SOURCEDIR="${S}"}
> +   : ${EGIT_SOURCEDIR="${WORKDIR}/${P}"}
>
> : ${EGIT_STORE_DIR:="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/egit-src"}
>
> --
> 1.8.0
>
>

While in theory this makes sense, it also has the potential to break
ebuilds setting S="${WORKDIR}/foo" and then expecting the sources to
be inside "foo". IOW it's not backward compatible, is it?

Thanks,

Davide Pesavento (pesa)



Re: [gentoo-dev] Re: Apache team is inactive

2012-11-27 Thread Pacho Ramos
El dom, 18-11-2012 a las 11:45 +, Markos Chandras escribió:
> On Sun, Nov 18, 2012 at 10:28 AM, Pacho Ramos  wrote:
> > apache team is currently composed by nelchael (that is inactive since
> > May 2012) and trapni (that is not taking care of that packages)
> >
> > If you are interested please join. If it's still inactive in next week,
> > I will assign apache bugs to maintainer-needed (I am still unsure about
> > if, in that case, apache herd should be kept in CC for an hypothetical
> > future resurrection or the herd should be dropped entirely)
> >
> 
> I'd say drop the herd. Like we dropped www-servers. Individual
> maintainers can take over the packages.
> 

Done


signature.asc
Description: This is a digitally signed message part


Re: [gentoo-dev] [PATCH 2/2] Allow user mangle distfiles' "${EGIT_DIR}" after actual git fetch.

2012-11-27 Thread Michał Górny
On Tue, 27 Nov 2012 22:22:20 +0300
Sergei Trofimovich  wrote:

> EGIT_REPO_URI="https://github.com/ghc/ghc.git";
> requires user to run './sync-all fetch / ./sync-all pull'
> after actual 'git pull', which fetches 20 more repos for code changes.
> Upstream does not use submodules.
> 
> The patch injects user's callback right before 'git-2_move_source'.
> Currently I abuse 'git-2_gc':
> 
> Original ebuild: 
> https://github.com/gentoo-haskell/gentoo-haskell/blob/master/dev-lang/ghc/ghc-.ebuild#L180
> 
> Signed-off-by: Sergei Trofimovich 
> ---
>  git-2.eclass | 24 
>  1 file changed, 24 insertions(+)
> 
> diff --git a/git-2.eclass b/git-2.eclass
> index 1a96978..1bacef5 100644
> --- a/git-2.eclass
> +++ b/git-2.eclass
> @@ -569,6 +569,29 @@ git-2_cleanup() {
>   unset EGIT_LOCAL_NONBARE
>  }
>  
> +
> +# @FUNCTION: git-2_fetch_user
> +# @DESCRIPTION:
> +# User-overridable callback allow user to update
> +# sources in "${EGIT_DIR}" (current location).
> +# Does nothing by default
> +git-2_fetch_user() {
> + :
> +}
> +
> +# @FUNCTION: git-2_post_fetch
> +# @INTERNAL
> +# Internal function calling user's callback
> +# when "${EGIT_DIR}" needs more actions, than
> +# simple fetch.
> +git-2_post_fetch() {
> + debug-print-function ${FUNCNAME} "$@"
> +
> + pushd "${EGIT_DIR}" > /dev/null
> + git-2_fetch_user
> + popd > /dev/null
> +}
> +
>  # @FUNCTION: git-2_src_unpack
>  # @DESCRIPTION:
>  # Default git src_unpack function.
> @@ -581,6 +604,7 @@ git-2_src_unpack() {
>   git-2_fetch "$@"
>   git-2_gc
>   git-2_submodules
> + git-2_post_fetch
>   git-2_move_source
>   git-2_branch
>   git-2_bootstrap

That's not something that can or should be supported. This will confuse
at least smart-live-rebuild.

-- 
Best regards,
Michał Górny


signature.asc
Description: PGP signature


[gentoo-dev] Packages up for grabs due apache herd removal

2012-11-27 Thread Pacho Ramos
After discussing it at:
http://www.gossamer-threads.com/lists/gentoo/dev/262834

dev-libs/apr-util
dev-libs/apr
www-apache/mod_auth_cookie_mysql2
www-apache/mod_xml2enc
www-misc/multisort
app-admin/apachetop
dev-libs/libhome
net-libs/libopkele 
www-apache/libapreq2
www-apache/mod_access_dnsbl
www-apache/mod_anonymize_ip
www-apache/mod_auth_imap2
www-apache/mod_auth_kerb
www-apache/mod_auth_openid 
www-apache/mod_auth_tkt
www-apache/mod_authn_sasl
www-apache/mod_authn_pam
www-apache/mod_authnz_external
www-apache/mod_backtrace
www-apache/mod_bw
www-apache/mod_chroot
www-apache/mod_common_redirect
www-apache/mod_cplusplus
www-apache/mod_depends
www-apache/mod_diagnostics
www-apache/mod_dnsbl_lookup
www-apache/mod_dnssd 
www-apache/mod_evasive
www-apache/mod_extract_forwarded
www-apache/mod_fastcgi
www-apache/mod_fastcgi_handler
www-apache/mod_flvx
www-apache/mod_ftpd
www-apache/mod_geoip2
www-apache/mod_gnutls
www-apache/mod_layout 
www-apache/mod_ldap_userdir
www-apache/mod_loadavg
www-apache/mod_log_rotate
www-apache/mod_log_sql 
www-apache/mod_loopback 
www-apache/mod_macro
www-apache/mod_musicindex
www-apache/mod_pcgi2
www-apache/mod_proxy_fcgi
www-apache/mod_proxy_html
www-apache/mod_qos 
www-apache/mod_roaming
www-apache/mod_rpaf 
www-apache/mod_scgi
www-apache/mod_spin 
www-apache/mod_suphp
www-apache/mod_tcl
www-apache/mod_tidy
www-apache/mod_transform
www-apache/mod_umask
www-apache/mod_vdbh
www-apache/mod_vhost_ldap
www-apache/mod_vhs 
www-apache/mod_watch
www-apache/mod_whatkilledus
www-apache/pwauth
www-apps/scgi
www-misc/log-toolkit 
www-misc/mergelog

If you want to take one of them, feel free to add yourself to
metadata.xml
Thanks


signature.asc
Description: This is a digitally signed message part


[gentoo-dev] [PATCH 1/2] Set default EGIT_SOURCEDIR to point to standard ${WORKDIR}/${P}. It allows "${S}" overriding in user's code as other eclasses do:

2012-11-27 Thread Sergei Trofimovich
Before the patch I had to move subdir(not very reliable):
EGIT_REPO_URI="git://github.com/UU-ComputerScience/uhc.git"
src_prepare() {
mv EHC/* ./ || die
}

After the patch i can define it the usual way:
EGIT_REPO_URI="git://github.com/UU-ComputerScience/uhc.git"
S="${WORKDIR}/${P}/EHC

Original ebuild: 
https://github.com/gentoo-haskell/gentoo-haskell/blob/master/dev-lang/uhc/uhc-.ebuild#L27

Signed-off-by: Sergei Trofimovich 
---
 git-2.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-2.eclass b/git-2.eclass
index 1ecc633..1a96978 100644
--- a/git-2.eclass
+++ b/git-2.eclass
@@ -21,7 +21,7 @@ DEPEND="dev-vcs/git"
 # This variable specifies destination where the cloned
 # data are copied to.
 #
-# EGIT_SOURCEDIR="${S}"
+# EGIT_SOURCEDIR="${WORKDIR}/${P}"
 
 # @ECLASS-VARIABLE: EGIT_STORE_DIR
 # @DESCRIPTION:
@@ -132,7 +132,7 @@ git-2_init_variables() {
local esc_pn liverepo livebranch livecommit
esc_pn=${PN//[-+]/_}
 
-   : ${EGIT_SOURCEDIR="${S}"}
+   : ${EGIT_SOURCEDIR="${WORKDIR}/${P}"}
 
: ${EGIT_STORE_DIR:="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/egit-src"}
 
-- 
1.8.0




[gentoo-dev] [PATCH 2/2] Allow user mangle distfiles' "${EGIT_DIR}" after actual git fetch.

2012-11-27 Thread Sergei Trofimovich
EGIT_REPO_URI="https://github.com/ghc/ghc.git";
requires user to run './sync-all fetch / ./sync-all pull'
after actual 'git pull', which fetches 20 more repos for code changes.
Upstream does not use submodules.

The patch injects user's callback right before 'git-2_move_source'.
Currently I abuse 'git-2_gc':

Original ebuild: 
https://github.com/gentoo-haskell/gentoo-haskell/blob/master/dev-lang/ghc/ghc-.ebuild#L180

Signed-off-by: Sergei Trofimovich 
---
 git-2.eclass | 24 
 1 file changed, 24 insertions(+)

diff --git a/git-2.eclass b/git-2.eclass
index 1a96978..1bacef5 100644
--- a/git-2.eclass
+++ b/git-2.eclass
@@ -569,6 +569,29 @@ git-2_cleanup() {
unset EGIT_LOCAL_NONBARE
 }
 
+
+# @FUNCTION: git-2_fetch_user
+# @DESCRIPTION:
+# User-overridable callback allow user to update
+# sources in "${EGIT_DIR}" (current location).
+# Does nothing by default
+git-2_fetch_user() {
+   :
+}
+
+# @FUNCTION: git-2_post_fetch
+# @INTERNAL
+# Internal function calling user's callback
+# when "${EGIT_DIR}" needs more actions, than
+# simple fetch.
+git-2_post_fetch() {
+   debug-print-function ${FUNCNAME} "$@"
+
+   pushd "${EGIT_DIR}" > /dev/null
+   git-2_fetch_user
+   popd > /dev/null
+}
+
 # @FUNCTION: git-2_src_unpack
 # @DESCRIPTION:
 # Default git src_unpack function.
@@ -581,6 +604,7 @@ git-2_src_unpack() {
git-2_fetch "$@"
git-2_gc
git-2_submodules
+   git-2_post_fetch
git-2_move_source
git-2_branch
git-2_bootstrap
-- 
1.8.0




Re: [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc"

2012-11-27 Thread justin
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



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc"

2012-11-27 Thread Diego Elio Pettenò
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
flamee...@flameeyes.eu — http://blog.flameeyes.eu/



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc"

2012-11-27 Thread justin
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.
> 





signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc"

2012-11-27 Thread justin
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



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc"

2012-11-27 Thread Diego Elio Pettenò
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
flamee...@flameeyes.eu — http://blog.flameeyes.eu/



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc"

2012-11-27 Thread Ulrich Mueller
> 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



[gentoo-dev] intel-sdp.eclass new version

2012-11-27 Thread justin
Hi,

here the complete eclass, as requested on irc.

Several minor changes are present:
* Drop numerous blank lines
* Drop Sebastien as maintainer
* Shuffle/Resort variables and functions (without changes)
* Write manpage jingle for everything
* and probably more.

justin
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/intel-sdp.eclass,v 1.4 2012/09/20 
13:54:56 jlec Exp $

# @ECLASS: intel-sdp.eclass
# @MAINTAINER:
# Justin Lecher 
# Sci Team 
# @BLURB: Handling of Intel's Software Development Products package management

# @ECLASS-VARIABLE: INTEL_DID
# @DEFAULT_UNSET
# @DESCRIPTION:
# The package download ID from Intel.
# To find out its value, see the links to download in
# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
#
# e.g. 2504
#
# Must be defined before inheriting the eclass

# @ECLASS-VARIABLE: INTEL_DPN
# @DEFAULT_UNSET
# @DESCRIPTION:
# The package name to download from Intel.
# To find out its value, see the links to download in
# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
#
# e.g. parallel_studio_xe
#
# Must be defined before inheriting the eclass

# @ECLASS-VARIABLE: INTEL_DPV
# @DEFAULT_UNSET
# @DESCRIPTION:
# The package download version from Intel.
# To find out its value, see the links to download in
# https://registrationcenter.intel.com/RegCenter/MyProducts.aspx
#
# e.g. 2011_sp1_update2
#
# Must be defined before inheriting the eclass

# @ECLASS-VARIABLE: INTEL_SUBDIR
# @DEFAULT_UNSET
# @DESCRIPTION:
# The package sub-directory where it will end-up in /opt/intel
# To find out its value, you have to do a raw install from the Intel tar ball

# @ECLASS-VARIABLE: INTEL_RPMS_DIRS
# @DESCRIPTION:
# List of subdirectories in the main archive which contains the
# rpms to extract.
: ${INTEL_RPMS_DIRS:=rpm}

# @ECLASS-VARIABLE: INTEL_X86
# @DESCRIPTION:
# 32bit arch in rpm names
#
# e.g. i484
: ${INTEL_X86:=i486}

# @ECLASS-VARIABLE: INTEL_BIN_RPMS
# @DEFAULT_UNSET
# @DESCRIPTION:
# Functional name of rpm without any version/arch tag
#
# e.g. compilerprof

# @ECLASS-VARIABLE: INTEL_DAT_RPMS
# @DEFAULT_UNSET
# @DESCRIPTION:
# Functional name of rpm of common data which are arch free
# without any version tag
#
# e.g. openmp

# @ECLASS-VARIABLE: INTEL_SDP_DB
# @DESCRIPTION:
# Full path to intel registry db
INTEL_SDP_DB="${EROOT%/}"/opt/intel/intel-sdp-products.db

inherit check-reqs multilib versionator

_INTEL_PV1=$(get_version_component_range 1)
_INTEL_PV2=$(get_version_component_range 2)
_INTEL_PV3=$(get_version_component_range 3)
_INTEL_PV4=$(get_version_component_range 4)
_INTEL_URI="http://registrationcenter-download.intel.com/irc_nas/${INTEL_DID}/${INTEL_DPN}";

SRC_URI="
amd64? ( multilib? ( ${_INTEL_URI}_${INTEL_DPV}.tgz ) )
amd64? ( !multilib? ( ${_INTEL_URI}_${INTEL_DPV}_intel64.tgz ) )
x86?  ( ${_INTEL_URI}_${INTEL_DPV}_ia32.tgz )"

LICENSE="Intel-SDP"
# Future work, #394411
#SLOT="${_INTEL_PV1}.${_INTEL_PV2}"
SLOT="0"
IUSE="doc examples multilib"
KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"

RESTRICT="mirror"

RDEPEND=""
DEPEND="app-arch/rpm2targz"

_INTEL_SDP_YEAR=${INTEL_DPV%_update*}
_INTEL_SDP_YEAR=${INTEL_DPV%_sp*}

# @ECLASS-VARIABLE: INTEL_SDP_DIR
# @DEFAULT_UNSET
# @DESCRIPTION:
# Full rootless path to installation dir
INTEL_SDP_DIR="opt/intel/${INTEL_SUBDIR}-${_INTEL_SDP_YEAR:-${_INTEL_PV1}}.${_INTEL_PV3}.${_INTEL_PV4}"

# @ECLASS-VARIABLE: INTEL_SDP_EDIR
# @DEFAULT_UNSET
# @DESCRIPTION:
# Full rooted path to installation dir
INTEL_SDP_EDIR="${EROOT%/}/${INTEL_SDP_DIR}"

S="${WORKDIR}"

QA_PREBUILT="${INTEL_SDP_DIR}/*"

# @ECLASS-VARIABLE: INTEL_ARCH
# @DEFAULT_UNSET
# @DESCRIPTION:
# Intels internal names of the arches; will be set at runtime accordingly
#
# e.g. amd64-multilib -> INTEL_ARCH="intel64 ia32"

# @ECLASS-FUNCTION: intel_link_eclipse_plugins
# @DESCRIPTION:
# Creating necessary links to use intel compiler with eclipse
intel_link_eclipse_plugins() {
local c f
pushd ${INTEL_SDP_DIR}/eclipse_support > /dev/null
for c in cdt*; do
local cv=${c#cdt} ev=3.$(( ${cv:0:1} - 1))
if has_version "dev-util/eclipse-sdk:${ev}"; then
einfo "Linking eclipse (v${ev}) plugin cdt (v${cv})"
for f in cdt${cv}/eclipse/features/*; do
dodir /usr/$(get_libdir)/eclipse-${ev}/features
dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
/usr/$(get_libdir)/eclipse-${ev}/features/ || die
done
for f in cdt${cv}/eclipse/plugins/*; do
dodir /usr/$(get_libdir)/eclipse-${ev}/plugins
dosym "${INTEL_SDP_EDIR}"/eclipse_support/${f} \
/usr/$(get_libdir)/eclipse-${ev}/plugins/ || die
done
fi
done
popd > /dev/null
}

# @ECLASS-FUNCTION: big-warning
# @INTERNAL
# warn user that

[gentoo-dev] RFC: intel-sdp.eclass add USE="examples doc"

2012-11-27 Thread justin
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"
 


signature.asc
Description: OpenPGP digital signature


[gentoo-dev] RFC: intel-sdp.eclass check user license

2012-11-27 Thread justin
Hi,

next patch for intel-sdp.eclass

Problem:
If the intel compiler are installed but no valid license is present,
several buildsystem including cmake generate sandbox violations.

Solution:
Do not let the user install the package without valid license. Its
useless anyway without.
Realized in two checks, first in pkg_pretend check for simple existence
of a license file; second check in pkg_postinst calls for version
informations from compiler (runtime test).
First test is deadly; Second not, because user already intervened
manually to bypass first check and we consider this as
he-knows-what-he-is-doing.

Thanks justin

+# @ECLASS-FUNCTION: big-warning
+# @INTERNAL
+# warn user that we really require a license
+big-warning() {
+case ${1} in
+			pre-check )
+echo ""
+ewarn "License file not found!"
+;;
+test-failed )
+echo
+ewarn "Function test failed. Most probably due to an invalid license."
+ewarn "This means you already tried to bypass the license check once."
+;;
+esac
+
+echo ""
+ewarn "Make sure you have recieved the an Intel license."
+ewarn "To receive a non-commercial license, you need to register at:"
+ewarn "http://software.intel.com/en-us/articles/non-commercial-software-development/";
+ewarn "Install the license file into ${INTEL_SDP_EDIR}/licenses/"
+
+case ${1} in
+pre-check )
+ewarn "before proceeding with installation of ${P}"
+echo ""
+;;
+* )
+echo ""
+;;
+esac
+}
+
+# @ECLASS-FUNCTION: _version_test
+# @INTERNAL
+# Testing for valid license by asking for version information of the compiler
+_version_test() {
+local _comp _comp_full _arch _file _warn
+case ${PN} in
+ifc )
+debug-print "Testing ifort"
+_comp=ifort
+;;
+icc )
+debug-print "Testing icc"
+_comp=icc
+;;
+*)
+die "${PN} is not supported for testing"
+;;
+esac
+
+for _arch in ${INTEL_ARCH}; do
+case ${EBUILD_PHASE} in
+install )
+_comp_full="${ED}/${INTEL_SDP_DIR}/bin/${_arch}/${_comp}"
+;;
+postinst )
+_comp_full="${INTEL_SDP_EDIR}/bin/${_arch}/${_comp}"
+;;
+* )
+ewarn "Compile test not supported in ${EBUILD_PHASE}"
+continue
+;;
+esac
+
+debug-print "LD_LIBRARY_PATH=\"${INTEL_SDP_EDIR}/bin/${_arch}/\" \"${_comp_full}\" -V"
+
+LD_LIBRARY_PATH="${INTEL_SDP_EDIR}/bin/${_arch}/" "${_comp_full}" -V &>/dev/null
+[[ $? -ne 0 ]] && _warn=yes
+done
+[[ "${_warn}" == "yes" ]] && big-warning test-failed
+}
+
+# @ECLASS-FUNCTION: run-test
+# @INTERNAL
+# Test if installed compiler is working
+run-test() {
+case ${PN} in
+ifc | icc )
+_version_test ;;
+* )
+debug-print "No test available for ${PN}"
+;;
+esac
+}
+
+# @ECLASS-FUNCTION: intel-sdp_pkg_pretend
+# @DESCRIPTION:
+# * Check that the user has a (valid) license file before going on.
+#
+# * Check for space requirements being fullfilled
+intel-sdp_pkg_pretend() {
+	local _warn=1 _dirs i _ret arch a p
+
+	: ${CHECKREQS_DISK_BUILD:=256M}
+	check-reqs_pkg_pretend
+
+	_dirs=(
+		"${INTEL_SDP_EDIR}/licenses"
+		"${INTEL_SDP_EDIR}/Licenses"
+		"${EPREFIX}/opt/intel/licenses"
+		)
+	for ((i = 0; i < ${#_dirs[@]}; i++)); do
+		ebegin "Checking for a license in: ${_dirs[$i]}"
+		[[ $( ls "${_dirs[$i]}"/*lic 2>/dev/null ) ]]; _ret=$?
+		eend ${_ret}
+		if [[ ${_ret} == "0" ]]; then
+			_warn=${_ret}
+			break
+		fi
+	done
+	if [[ ${_warn} == "1" ]]; then
+		big-warning pre-check
+		die "Could not find license file"
+	fi
+}

@@ -238,8 +390,12 @@ intel-sdp_pkg_postinst() {
 		echo >> ${INTEL_SDP_DB} \
 			"<:${r%-${_INTEL_PV4}*}-${_INTEL_PV4}:${r}:${INTEL_SDP_EDIR}:${l}:>"
 	done
+	run-test
 }


signature.asc
Description: OpenPGP digital signature