From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SAzft-0005Yl-FM for garchives@archives.gentoo.org; Fri, 23 Mar 2012 08:16:41 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3280AE094E; Fri, 23 Mar 2012 08:16:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B607FE0943 for ; Fri, 23 Mar 2012 08:15:41 +0000 (UTC) Received: from localhost (pc-85-46-101-190.cm.vtr.net [190.101.46.85]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aballier) by smtp.gentoo.org (Postfix) with ESMTPSA id BD1E81B4018 for ; Fri, 23 Mar 2012 08:15:40 +0000 (UTC) Date: Fri, 23 Mar 2012 05:15:34 -0300 From: Alexis Ballier To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] New eclass: oasis.eclass for oasis-based ocaml packages. Message-ID: <20120323051534.06ccfc4b@gentoo.org> Organization: Gentoo X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/=cKrBHbno264kH=RTxWuF45" X-Archives-Salt: 0eb8cb17-dd7d-40de-883d-ef1e50805e23 X-Archives-Hash: 3b55e604d389e48a6a2c26a3edf40837 --MP_/=cKrBHbno264kH=RTxWuF45 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 said random ebuild now. Comments welcome, Alexis. [1] http://oasis.forge.ocamlcore.org/ --MP_/=cKrBHbno264kH=RTxWuF45 Content-Type: application/octet-stream; name=oasis.eclass Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=oasis.eclass IyBDb3B5cmlnaHQgMTk5OS0yMDEyIEdlbnRvbyBGb3VuZGF0aW9uCiMgRGlzdHJpYnV0ZWQgdW5k ZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2MgojICRIZWFk ZXI6ICQKCiMgQEVDTEFTUzogb2FzaXMuZWNsYXNzCiMgQE1BSU5UQUlORVI6IAojIG1sQGdlbnRv by5vcmcKIyBAQVVUSE9SOgojIE9yaWdpbmFsIEF1dGhvcjogQWxleGlzIEJhbGxpZXIgPGFiYWxs aWVyQGdlbnRvby5vcmc+CiMgQEJMVVJCOiBQcm92aWRlcyBjb21tb24gZWJ1aWxkIHBoYXNlcyBm b3Igb2FzaXMtYmFzZWQgcGFja2FnZXMuCiMgQERFU0NSSVBUSU9OOgojIFByb3ZpZGVzIGNvbW1v biBlYnVpbGQgcGhhc2VzIGZvciBvYXNpcy1iYXNlZCBwYWNrYWdlcy4KIyBNb3N0IG9mIHRoZXNl IHBhY2thZ2VzIHdpbGwganVzdCBoYXZlIHRvIGluaGVyaXQgdGhlIGVjbGFzcywgc2V0IHRoZWly CiMgZGVwZW5kZW5jaWVzIGFuZCB0aGUgRE9DUyB2YXJpYWJsZSBmb3IgYmFzZS5lY2xhc3MgdG8g aW5zdGFsbCBpdCBhbmQgYmUgZG9uZS4KIwojIEl0IGluaGVyaXRzIG11bHRpbGliLCBmaW5kbGli IGFuZCBiYXNlIGVjbGFzc2VzLgojIEVidWlsZHMgdXNpbmcgb2FzaXMuZWNsYXNzIG11c3QgYmUg RUFQST49Mi4KIwoKaW5oZXJpdCBtd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0CiMgQERFU0NSSVBUSU9OOgojIFJ1bnMgdGhlIHRlc3RzdWl0ZSBvZiBhbiBvYXNpcy1i YXNlZCBwYWNrYWdlLgpvYXNpc19zcmNfdGVzdCgpIHsKCSBMRF9MSUJSQVJZX1BBVEg9IiR7U30v X2J1aWxkL2xpYiIgb2NhbWwgc2V0dXAubWwgLXRlc3QgfHwgZGllCn0KCiMgQEZVTkNUSU9OOiBv YXNpc19zcmNfaW5zdGFsbAojIEBERVNDUklQVElPTjoKIyBJbnN0YWxscyBhbiBvYXNpcy1iYXNl ZCBwYWNrYWdlLgojIEl0IGNhbGxzIGJhc2Vfc3JjX2luc3RhbGxfZG9jcywgc28gd2lsbCBpbnN0 YWxsIGRvY3VtZW50YXRpb24gZGVjbGFyZWQgaW4gdGhlCiMgRE9DUyB2YXJpYWJsZS4Kb2FzaXNf c3JjX2luc3RhbGwoKSB7CglmaW5kbGliX3NyY19wcmVpbnN0CglvY2FtbCBzZXR1cC5tbCAtaW5z dGFsbCB8fCBkaWUKCWJhc2Vfc3JjX2luc3RhbGxfZG9jcwp9CgpFWFBPUlRfRlVOQ1RJT05TIHNy Y19jb25maWd1cmUgc3JjX2NvbXBpbGUgc3JjX3Rlc3Qgc3JjX2luc3RhbGwK --MP_/=cKrBHbno264kH=RTxWuF45 Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=fieldslib.diff Index: fieldslib-0.1.2.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/dev-ml/fieldslib/fieldslib-0.1.2.ebuild,v retrieving revision 1.1 diff -u -B -r1.1 fieldslib-0.1.2.ebuild --- fieldslib-0.1.2.ebuild 25 Jun 2011 18:56:36 -0000 1.1 +++ fieldslib-0.1.2.ebuild 23 Mar 2012 08:13:31 -0000 @@ -3,7 +3,7 @@ # $Header: /var/cvsroot/gentoo-x86/dev-ml/fieldslib/fieldslib-0.1.2.ebuild,v 1.1 2011/06/25 18:56:36 aballier Exp $ EAPI="2" -inherit findlib multilib +inherit oasis DESCRIPTION="Folding over record fields" HOMEPAGE="http://www.janestreet.com/ocaml" @@ -12,28 +12,9 @@ LICENSE="LGPL-2.1-linking-exception" SLOT="0" KEYWORDS="~amd64" -IUSE="debug +ocamlopt" +IUSE="" -DEPEND=">=dev-lang/ocaml-3.12[ocamlopt?] - >=dev-ml/type-conv-2.3.0" +DEPEND=">=dev-ml/type-conv-2.3.0" RDEPEND="${DEPEND}" -oasis_use_enable() { - echo "--override $2 `use $1 && echo \"true\" || echo \"false\"`" -} - -src_configure() { - ./configure --prefix usr \ - --libdir /usr/$(get_libdir) \ - --destdir "${D}" \ - $(oasis_use_enable debug debug) \ - $(oasis_use_enable ocamlopt is_native) \ - || die -} - -src_install() { - findlib_src_install - - # install documentation - dodoc README || die -} +DOCS=( "README" ) --MP_/=cKrBHbno264kH=RTxWuF45 Content-Type: application/octet-stream; name=fieldslib-0.1.2.ebuild Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=fieldslib-0.1.2.ebuild IyBDb3B5cmlnaHQgMTk5OS0yMDExIEdlbnRvbyBGb3VuZGF0aW9uCiMgRGlzdHJpYnV0ZWQgdW5k ZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2MgojICRIZWFk ZXI6IC92YXIvY3Zzcm9vdC9nZW50b28teDg2L2Rldi1tbC9maWVsZHNsaWIvZmllbGRzbGliLTAu MS4yLmVidWlsZCx2IDEuMSAyMDExLzA2LzI1IDE4OjU2OjM2IGFiYWxsaWVyIEV4cCAkCgpFQVBJ PSIyIgppbmhlcml0IG9hc2lzCgpERVNDUklQVElPTj0iRm9sZGluZyBvdmVyIHJlY29yZCBmaWVs ZHMiCkhPTUVQQUdFPSJodHRwOi8vd3d3LmphbmVzdHJlZXQuY29tL29jYW1sIgpTUkNfVVJJPSJo dHRwOi8vd3d3LmphbmVzdHJlZXQuY29tL29jYW1sLyR7UH0udGFyLmd6IgoKTElDRU5TRT0iTEdQ TC0yLjEtbGlua2luZy1leGNlcHRpb24iClNMT1Q9IjAiCktFWVdPUkRTPSJ+YW1kNjQiCklVU0U9 IiIKCkRFUEVORD0iPj1kZXYtbWwvdHlwZS1jb252LTIuMy4wIgpSREVQRU5EPSIke0RFUEVORH0i CgpET0NTPSggIlJFQURNRSIgKQo= --MP_/=cKrBHbno264kH=RTxWuF45--