Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-27 Thread Alexis Ballier
On Sat, 24 Mar 2012 10:44:03 -0300 Alexis Ballier wrote: > eclass version 2.0, i hope i haven't forgotten any comment > > I improved some comments/description after a second read also. since there were no more comments: eclass committed, thanks all

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-24 Thread Alexis Ballier
eclass version 2.0, i hope i haven't forgotten any comment I improved some comments/description after a second read also. oasis.eclass Description: Binary data

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-24 Thread Alexis Ballier
On Fri, 23 Mar 2012 16:41:35 -0400 Alexandre Rostovtsev wrote: > On Fri, Mar 23, 2012 at 4:24 PM, Alexis Ballier > wrote: > > On Fri, 23 Mar 2012 23:11:46 +0300 > > Sergei Trofimovich wrote: > >> > oasis_src_configure() { > >> >     ocaml setup.ml -configure \ > >> >             --prefix usr \

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-24 Thread Alexis Ballier
On Sat, 24 Mar 2012 00:02:15 +0300 Sergei Trofimovich wrote: > > > > oasis_use_enable() { > > > > echo "--override $2 `use $1 && echo \"true\" || echo > > > > \"false\"`" } > > > > > > Mike added 'usex' to 'eutils.eclass' recently, so you might like > > > to use it: (UNTESTED) > > >

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Sergei Trofimovich
> > > oasis_use_enable() { > > > echo "--override $2 `use $1 && echo \"true\" || echo > > > \"false\"`" } > > > > Mike added 'usex' to 'eutils.eclass' recently, so you might like to > > use it: (UNTESTED) > > echo "--override $2 $(usex $1 true false)" > > it needs to print the quotes to

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Alexandre Rostovtsev
On Fri, Mar 23, 2012 at 4:24 PM, Alexis Ballier wrote: > On Fri, 23 Mar 2012 23:11:46 +0300 > Sergei Trofimovich wrote: >> > oasis_src_configure() { >> >     ocaml setup.ml -configure \ >> >             --prefix usr \ >> >             --libdir /usr/$(get_libdir) \ >> >             --docdir /usr/s

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Alexis Ballier
On Fri, 23 Mar 2012 23:11:46 +0300 Sergei Trofimovich wrote: > > oasis_use_enable() { > > echo "--override $2 `use $1 && echo \"true\" || echo > > \"false\"`" } > > Mike added 'usex' to 'eutils.eclass' recently, so you might like to > use it: (UNTESTED) > echo "--override $2 $(usex $

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Alec Warner
On Fri, Mar 23, 2012 at 12:37 PM, Ciaran McCreesh wrote: > On Fri, 23 Mar 2012 11:17:56 -0700 > Alec Warner wrote: >> In general if you are going to say 'this usage is wrong' then you need >> some kind of tool to detect and report on it; otherwise a subset of >> developers will get it wrong. Don'

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Sergei Trofimovich
> oasis_use_enable() { > echo "--override $2 `use $1 && echo \"true\" || echo \"false\"`" > } Mike added 'usex' to 'eutils.eclass' recently, so you might like to use it: (UNTESTED) echo "--override $2 $(usex $1 true false)" > oasis_src_configure() { > ocaml setup.ml -configure

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Ciaran McCreesh
On Fri, 23 Mar 2012 11:17:56 -0700 Alec Warner wrote: > In general if you are going to say 'this usage is wrong' then you need > some kind of tool to detect and report on it; otherwise a subset of > developers will get it wrong. Don't make it easy to do the wrong > thing, make it easy to do the ri

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Alec Warner
On Fri, Mar 23, 2012 at 10:09 AM, Alexandre Rostovtsev wrote: > On Fri, 2012-03-23 at 12:50 -0400, Mike Gilbert wrote: >> On Fri, Mar 23, 2012 at 12:02 PM, Ciaran McCreesh >> wrote: >> > On Fri, 23 Mar 2012 11:58:47 -0400 >> > Mike Gilbert wrote: >> >> > oasis_src_compile() { >> >> >     oasis_s

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Alexis Ballier
On Fri, 23 Mar 2012 11:58:47 -0400 Mike Gilbert wrote: > On Fri, Mar 23, 2012 at 4:15 AM, Alexis Ballier > wrote: > > > DEPEND=">=dev-lang/ocaml-3.12[ocamlopt?]" > > DEPEND="${RDEPEND}" > > That looks like a typo. yes, thanks for spotting > > > oasis_src_compile() { > > oasis_src_compil

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Alexandre Rostovtsev
On Fri, 2012-03-23 at 12:50 -0400, Mike Gilbert wrote: > On Fri, Mar 23, 2012 at 12:02 PM, Ciaran McCreesh > wrote: > > On Fri, 23 Mar 2012 11:58:47 -0400 > > Mike Gilbert wrote: > >> > oasis_src_compile() { > >> > oasis_src_compile_no_doc > >> > if has doc ${IUSE} && use doc; then > >> >

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Mike Gilbert
On Fri, Mar 23, 2012 at 12:52 PM, Ciaran McCreesh wrote: > On Fri, 23 Mar 2012 12:50:51 -0400 > Mike Gilbert wrote: >> use_if_iuse is called from functions in several eclasses already in >> the tree. See chromium, kde4-base, qt4-build, and toolchain. >> >> Are all of these usages incorrect? Do yo

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Ciaran McCreesh
On Fri, 23 Mar 2012 12:50:51 -0400 Mike Gilbert wrote: > use_if_iuse is called from functions in several eclasses already in > the tree. See chromium, kde4-base, qt4-build, and toolchain. > > Are all of these usages incorrect? Do you have an alternate solution? We had this discussion when the fu

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Mike Gilbert
On Fri, Mar 23, 2012 at 12:02 PM, Ciaran McCreesh wrote: > On Fri, 23 Mar 2012 11:58:47 -0400 > Mike Gilbert wrote: >> > oasis_src_compile() { >> >     oasis_src_compile_no_doc >> >     if has doc ${IUSE} && use doc; then >> >             ocaml setup.ml -doc || die >> >     fi >> > } >> >> This s

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Ciaran McCreesh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 23 Mar 2012 12:32:05 -0400 Ian Stakenvicius wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > On 23/03/12 12:19 PM, Ciaran McCreesh wrote: > > On Fri, 23 Mar 2012 12:14:39 -0400 Ian Stakenvicius > > wrote: > >> I don't know if

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Ian Stakenvicius
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 23/03/12 12:32 PM, Ian Stakenvicius wrote: > On 23/03/12 12:19 PM, Ciaran McCreesh wrote: >> On Fri, 23 Mar 2012 12:14:39 -0400 Ian Stakenvicius >> wrote: >>> I don't know if I follow this one or not. When inheriting an >>> eclass, all entitie

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Ian Stakenvicius
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 23/03/12 12:19 PM, Ciaran McCreesh wrote: > On Fri, 23 Mar 2012 12:14:39 -0400 Ian Stakenvicius > wrote: >> I don't know if I follow this one or not. When inheriting an >> eclass, all entities within the eclass get merged into the >> ebuild. As

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Ciaran McCreesh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 23 Mar 2012 12:14:39 -0400 Ian Stakenvicius wrote: > I don't know if I follow this one or not. When inheriting an eclass, > all entities within the eclass get merged into the ebuild. As long as > there aren't any special conditional tricks b

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Ian Stakenvicius
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 23/03/12 12:02 PM, Ciaran McCreesh wrote: > On Fri, 23 Mar 2012 11:58:47 -0400 Mike Gilbert > wrote: >>> oasis_src_compile() { oasis_src_compile_no_doc if has doc >>> ${IUSE} && use doc; then ocaml setup.ml -doc || die fi } >> >> This should pro

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Ciaran McCreesh
On Fri, 23 Mar 2012 11:58:47 -0400 Mike Gilbert wrote: > > oasis_src_compile() { > > oasis_src_compile_no_doc > > if has doc ${IUSE} && use doc; then > > ocaml setup.ml -doc || die > > fi > > } > > This should probably call use_if_iuse from eutils.eclass, which > handles I

Re: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Mike Gilbert
On Fri, Mar 23, 2012 at 4:15 AM, Alexis Ballier wrote: > DEPEND=">=dev-lang/ocaml-3.12[ocamlopt?]" > DEPEND="${RDEPEND}" That looks like a typo. > oasis_src_compile() { > oasis_src_compile_no_doc > if has doc ${IUSE} && use doc; then > ocaml setup.ml -doc || die >

[gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages.

2012-03-23 Thread Alexis Ballier
Hi, Oasis [1] is becoming the de factor standard for ocaml packages. I've been bored of copy/pasting always the same code from ebuilds to ebuilds and thus decided to write an eclass simplifying everything. Attached: said eclass, a diff of a random dev-ml package I've converted to illustrate and s