diff options
-rw-r--r-- | dev-ml/pgocaml/ChangeLog | 11 | ||||
-rw-r--r-- | dev-ml/pgocaml/Manifest | 16 | ||||
-rw-r--r-- | dev-ml/pgocaml/files/pgocaml-1.6-makefile.patch | 30 | ||||
-rw-r--r-- | dev-ml/pgocaml/files/pgocaml-1.6-test.patch | 27 | ||||
-rw-r--r-- | dev-ml/pgocaml/metadata.xml | 8 | ||||
-rw-r--r-- | dev-ml/pgocaml/pgocaml-1.6.ebuild | 91 |
6 files changed, 183 insertions, 0 deletions
diff --git a/dev-ml/pgocaml/ChangeLog b/dev-ml/pgocaml/ChangeLog new file mode 100644 index 000000000000..10578b141fdd --- /dev/null +++ b/dev-ml/pgocaml/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for dev-ml/pgocaml +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ml/pgocaml/ChangeLog,v 1.1 2012/10/06 21:05:20 aballier Exp $ + +*pgocaml-1.6 (07 Oct 2012) + + 07 Oct 2012; Alexis Ballier <aballier@gentoo.org> +pgocaml-1.6.ebuild, + +files/pgocaml-1.6-makefile.patch, +files/pgocaml-1.6-test.patch, + +metadata.xml: + initial import, bug #425098, by Jacques-Pascal Deplaix + diff --git a/dev-ml/pgocaml/Manifest b/dev-ml/pgocaml/Manifest new file mode 100644 index 000000000000..e9b785e7a56f --- /dev/null +++ b/dev-ml/pgocaml/Manifest @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +AUX pgocaml-1.6-makefile.patch 749 SHA256 ee19fa03e0f0816604167c15f927358694a066283042686654a33edd554872f2 SHA512 047f3f4c5e804a06c6ce048b95cbda739c3c1c7d4797133e412dd1ad0b52df4135facd1c0a014975a7bb627990a2fe980270c5506ae820478896dd99c88fdc2d WHIRLPOOL c72e552380eba63e1ab9737a54399d73876ade22a54118dd15a069fcc4e7111d08a9c09d10174ca7215de4b59e980cf367af6a7f06add2227a056cbaf91edfe8 +AUX pgocaml-1.6-test.patch 900 SHA256 ca70a5a9914b4d90cbd5b4eb8b2250443d0dc480f8be41eff1637c6927d18e95 SHA512 781ed613b95c3d1d5e7bc4f4f615787284627df11b48e2f3f5a69453ab993aed23f5b569540fb967d5a52b04553c52a306fb46704ff64fcf13ef08167e83bd09 WHIRLPOOL 7ffa6a2c343d9eabfa4a36769f122af1e4b6230aea725de32ec312521c1e30c4285bcb65be4f7cbfbd9ade01ab60a68c8d269beeca5704f7c87a5134794606a8 +DIST pgocaml-1.6.tgz 44424 SHA256 5540b863866fa85ed597717ef4aef2aec249a9669366576a2a4fcfa1c6fe29aa SHA512 1f8ef6f3f7ef726ed458ae4729b19e82de25b88220667562ec4c9f130006a35b604445b50f41eaf624fadc66b57f167561f653a0a478c95d84cc696c4f8ee80a WHIRLPOOL 22474c3d8193d575f078f339f4e1b3f5be30d19749c04e70d130aff69e7fde6e3b6319dde2cc0d7a6b22534361591fe0f76fa38821b3778133a95d88fe3642ae +EBUILD pgocaml-1.6.ebuild 2468 SHA256 14ea96dd87ab688d9ff567a60bc3c4701a685310b070cb558a5a0d8399ce1a69 SHA512 f35e02c65e416a1db48f8776221d1499d8424acdc12ceeae0abd9b6755cbbcc69f1c064aee7a5360bfffbbe64bde3a8fa15423a87752cc772367a11f43ae570f WHIRLPOOL ea1e573bba3f0707163f65638b3137822436dc4a58d91e0005f36020f0f04c36d4347f1716dece2057faf9537efc23a100eb8e184d080ab4a973f871de18c449 +MISC ChangeLog 447 SHA256 5bfdfcd406a05cb43858babd13a3321c85000f204dc18ba5616e2fc88fbbc27b SHA512 8888eb66ac81f45102545e1874d2ae28c49a4dbbdb98c4e23a2c7c2b0405f83d817bf34bae6772da75d412eb218c4db9a8d20b54d956feddf260bb5f9584e821 WHIRLPOOL d7816f6e909a89d749e585e3a2bb0a03537abaf71a372e83525e390f2adc86873f3c1a31893275cf1ca9195180dda642f3cd77917e5b2123f166b074026ad45f +MISC metadata.xml 248 SHA256 3956a9aa6a48030832f6aa3f0eff5550ec76cfd006c541d8cac7ab35ab0a314b SHA512 f9babb9dd5f2319ffb213f9a5afdb6fb1eff01c1931d3a70167f85fcc497102e503f98529b89afe54abd92e000f7ac5bec0c76e292ae56803266d5b4c9cc0e7a WHIRLPOOL ccb07024ddd76ab452a702ca69ab617928ba7c0578b10c3c5164774dda39530cf35f7f553fe0532e47e14939dc880b9a5dae707a002ef20b93ebd482c9221184 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.19 (GNU/Linux) + +iEYEAREIAAYFAlBwx0MACgkQvFcC4BYPU0q4QgCfafIuKROchiEbsHc6IZSymtXH +DDwAn0oqO9SGTrDI2Yz0Yrl40B+aLsC6 +=IhaO +-----END PGP SIGNATURE----- diff --git a/dev-ml/pgocaml/files/pgocaml-1.6-makefile.patch b/dev-ml/pgocaml/files/pgocaml-1.6-makefile.patch new file mode 100644 index 000000000000..ba691fb45955 --- /dev/null +++ b/dev-ml/pgocaml/files/pgocaml-1.6-makefile.patch @@ -0,0 +1,30 @@ +Fix depends for a test file in the Makefile + +--- a/Makefile 2012-07-04 19:53:31.000000000 +0200 ++++ b/Makefile 2012-09-10 14:24:48.502757692 +0200 +@@ -19,7 +19,7 @@ + include Makefile.config + + ifeq ($(USE_BATTERIES),yes) +-EXTLIB := batteries ++EXTLIB := camomile,batteries + else + EXTLIB := extlib + endif +@@ -44,11 +44,15 @@ + + GETLIB=-I +$(1) $(shell ocamlfind query $(1) -predicates byte -format "%d/%a") + ++COMMA = , ++ + FOR_P4 := \ + $(call GETLIB,unix) \ + $(call GETLIB,str) \ ++ $(call GETLIB,num.core) \ ++ $(call GETLIB,bigarray) \ + $(call GETLIB,pcre) \ +- $(call GETLIB,$(EXTLIB)) \ ++ $(shell ocamlfind query $(subst $(COMMA), ,$(EXTLIB)) -predicates byte -format "%d/%a") \ + $(call GETLIB,calendar) \ + $(call GETLIB,csv) \ + ./pgocaml.cma diff --git a/dev-ml/pgocaml/files/pgocaml-1.6-test.patch b/dev-ml/pgocaml/files/pgocaml-1.6-test.patch new file mode 100644 index 000000000000..d33c8dfbfdfa --- /dev/null +++ b/dev-ml/pgocaml/files/pgocaml-1.6-test.patch @@ -0,0 +1,27 @@ +Fix the lowlevel test with the batteries USE flag + +--- a/test_pgocaml_lowlevel.ml 2012-04-10 20:45:04.000000000 +0200 ++++ b/test_pgocaml_lowlevel.ml 2012-09-15 16:45:37.104790274 +0200 +@@ -22,7 +22,11 @@ + + open Printf + ++IFDEF USE_BATTERIES THEN ++module List = BatList ++ELSE + open ExtList ++ENDIF + + let print_row i row = + printf "row %d: [%s]\n" i +--- a/Makefile 2012-07-04 19:53:31.000000000 +0200 ++++ b/Makefile 2012-09-15 17:00:58.384820257 +0200 +@@ -84,7 +84,7 @@ + # + + test_pgocaml_lowlevel$(EXECUTABLE_SUFFIX): test_pgocaml_lowlevel.cmo pgocaml.cma +- ocamlfind ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) $(OCAMLCLIBS) pgocaml.cma -o $@ $< ++ ocamlfind ocamlc $(OCAMLCFLAGS) $(OCAMLSYNTAX) $(OCAMLCPACKAGES) $(OCAMLCLIBS) pgocaml.cma -o $@ $< + + test_pgocaml$(EXECUTABLE_SUFFIX): test_pgocaml.cmo pgocaml.cma + ocamlfind ocamlc $(OCAMLCFLAGS) $(OCAMLCPACKAGES) $(OCAMLCLIBS) pgocaml.cma -o $@ $< diff --git a/dev-ml/pgocaml/metadata.xml b/dev-ml/pgocaml/metadata.xml new file mode 100644 index 000000000000..2bf9f17d9357 --- /dev/null +++ b/dev-ml/pgocaml/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>ml</herd> + <use> + <flag name='batteries'>Enable Batteries support instead of extlib</flag> + </use> +</pkgmetadata> diff --git a/dev-ml/pgocaml/pgocaml-1.6.ebuild b/dev-ml/pgocaml/pgocaml-1.6.ebuild new file mode 100644 index 000000000000..7f7733471f8d --- /dev/null +++ b/dev-ml/pgocaml/pgocaml-1.6.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ml/pgocaml/pgocaml-1.6.ebuild,v 1.1 2012/10/06 21:05:20 aballier Exp $ + +EAPI=4 + +inherit eutils + +DESCRIPTION="PG'OCaml is a set of OCaml bindings for the PostgreSQL database" +HOMEPAGE="http://pgocaml.forge.ocamlcore.org/" +SRC_URI="http://forge.ocamlcore.org/frs/download.php/922/${P}.tgz" + +LICENSE="LGPL-2.1-with-linking-exception" +SLOT="0" +KEYWORDS="~amd64" +IUSE="doc batteries" + +DEPEND="dev-ml/calendar + !batteries? ( dev-ml/extlib ) + batteries? ( dev-ml/batteries ) + dev-ml/csv + dev-ml/pcre-ocaml + >=dev-lang/ocaml-3.10[ocamlopt]" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}/${P}-test.patch" + epatch "${FILESDIR}/${P}-makefile.patch" +} + +src_configure() { + echo "DESTDIR := \"${ED}/\"" >> Makefile.config + use batteries && echo "USE_BATTERIES := yes" >> Makefile.config + emake depend +} + +src_compile() { + use doc && emake doc + emake +} + +src_test() { + local default_pguser="postgres" + local default_pghost="localhost" + local default_pgport="" + + einfo "The tests need a running PostgreSQL server." + einfo "Test requires PGUSER or/and PGPORT or/and PGHOST to be set." + einfo "If there are not, defaults are:" + einfo " PGUSER=${default_pguser}" + einfo " PGHOST=${default_pghost}" + einfo " PGPORT=${default_pgport}" + einfo "Define them at the command line or in:" + einfo " ${EROOT%/}/etc/pgocaml_test_env" + + local user_defined_pguser=$PGUSER + local user_defined_pghost=$PGHOST + local user_defined_pgport=$PGPORT + + unset PGUSER + unset PGHOST + unset PGPORT + + if [[ -f ${EROOT%/}/etc/pgocaml_test_env ]]; then + source "${EROOT%/}/etc/pgocaml_test_env" + fi + [[ -n $PGUSER ]] && export PGUSER + [[ -n $PGHOST ]] && export PGHOST + [[ -n $PGPORT ]] && export PGPORT + + [[ -n $user_defined_pguser ]] && export PGUSER=$user_defined_pguser + [[ -n $user_defined_pghost ]] && export PGHOST=$user_defined_pghost + [[ -n $user_defined_pgport ]] && export PGPORT=$user_defined_pgport + + [[ -z $PGUSER ]] && export PGUSER=${default_pguser} + [[ -z $PGHOST ]] && export PGHOST=${default_pghost} + [[ -z $PGPORT ]] && export PGPORT=${default_pgport} + + einfo "PGUSER set to: ${PGUSER}" + einfo "PGHOST set to: ${PGHOST}" + einfo "PGPORT set to: ${PGPORT}" + + emake test +} + +src_install() { + emake install + dodoc BUGS.txt CONTRIBUTORS.txt HOW_IT_WORKS.txt README.txt \ + CHANGELOG.txt README.profiling + use doc && dohtml -r html +} |