diff options
5 files changed, 139 insertions, 1 deletions
diff --git a/dev-haskell/hdbc-postgresql/ChangeLog b/dev-haskell/hdbc-postgresql/ChangeLog index c32f40ef7428..08d729e90a08 100644 --- a/dev-haskell/hdbc-postgresql/ChangeLog +++ b/dev-haskell/hdbc-postgresql/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-haskell/hdbc-postgresql # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hdbc-postgresql/ChangeLog,v 1.10 2007/10/31 13:01:03 dcoutts Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hdbc-postgresql/ChangeLog,v 1.11 2007/12/13 17:21:21 dcoutts Exp $ + +*hdbc-postgresql-1.1.3.0 (13 Dec 2007) + + 13 Dec 2007; Duncan Coutts <dcoutts@gentoo.org> + +files/hdbc-postgresql-helper.h, +files/pgtypes.h, + +hdbc-postgresql-1.1.3.0.ebuild: + New version. 31 Oct 2007; Duncan Coutts <dcoutts@gentoo.org> hdbc-postgresql-1.0.0.0.ebuild, hdbc-postgresql-1.0.1.0.ebuild: diff --git a/dev-haskell/hdbc-postgresql/files/digest-hdbc-postgresql-1.1.3.0 b/dev-haskell/hdbc-postgresql/files/digest-hdbc-postgresql-1.1.3.0 new file mode 100644 index 000000000000..8c00bfee7d5b --- /dev/null +++ b/dev-haskell/hdbc-postgresql/files/digest-hdbc-postgresql-1.1.3.0 @@ -0,0 +1,3 @@ +MD5 4ebeb46b12948a7ec4d9e380500c8380 HDBC-postgresql-1.1.3.0.tar.gz 20025 +RMD160 cfe56e6934bda74cb57ea50e5b6803c4e7b2ac4a HDBC-postgresql-1.1.3.0.tar.gz 20025 +SHA256 cb53d29cb88a99197b455942d3ca2f98bcb957978c1a9d8c24fe98b8e5f21bf4 HDBC-postgresql-1.1.3.0.tar.gz 20025 diff --git a/dev-haskell/hdbc-postgresql/files/hdbc-postgresql-helper.h b/dev-haskell/hdbc-postgresql/files/hdbc-postgresql-helper.h new file mode 100644 index 000000000000..188e73ba3657 --- /dev/null +++ b/dev-haskell/hdbc-postgresql/files/hdbc-postgresql-helper.h @@ -0,0 +1,16 @@ +#include <libpq-fe.h> + +typedef struct TAG_finalizeonce { + void *encapobj; + int refcount; + int isfinalized; + struct TAG_finalizeonce *parent; +} finalizeonce; + +extern finalizeonce *wrapobjpg(void *obj, finalizeonce *parentobj); + +extern void PQfinish_app(finalizeonce *conn); +extern void PQfinish_finalizer(finalizeonce *conn); + +extern void PQclear_app(finalizeonce *res); +extern void PQclear_finalizer(finalizeonce *res); diff --git a/dev-haskell/hdbc-postgresql/files/pgtypes.h b/dev-haskell/hdbc-postgresql/files/pgtypes.h new file mode 100644 index 000000000000..abf1dcdbbc99 --- /dev/null +++ b/dev-haskell/hdbc-postgresql/files/pgtypes.h @@ -0,0 +1,66 @@ +/* File: pgtypes.h + * + * Description: See "pgtypes.c" + * + * Comments: See "notice.txt" for copyright and license information. + * + */ + +#ifndef __PGTYPES_H__ +#define __PGTYPES_H__ + +/* the type numbers are defined by the OID's of the types' rows */ +/* in table pg_type */ + + +#if 0 +#define PG_TYPE_LO ???? /* waiting for permanent type */ +#endif + +#define PG_TYPE_BOOL 16 +#define PG_TYPE_BYTEA 17 +#define PG_TYPE_CHAR 18 +#define PG_TYPE_NAME 19 +#define PG_TYPE_INT8 20 +#define PG_TYPE_INT2 21 +#define PG_TYPE_INT2VECTOR 22 +#define PG_TYPE_INT4 23 +#define PG_TYPE_REGPROC 24 +#define PG_TYPE_TEXT 25 +#define PG_TYPE_OID 26 +#define PG_TYPE_TID 27 +#define PG_TYPE_XID 28 +#define PG_TYPE_CID 29 +#define PG_TYPE_OIDVECTOR 30 +#define PG_TYPE_SET 32 +#define PG_TYPE_CHAR2 409 +#define PG_TYPE_CHAR4 410 +#define PG_TYPE_CHAR8 411 +#define PG_TYPE_POINT 600 +#define PG_TYPE_LSEG 601 +#define PG_TYPE_PATH 602 +#define PG_TYPE_BOX 603 +#define PG_TYPE_POLYGON 604 +#define PG_TYPE_FILENAME 605 +#define PG_TYPE_FLOAT4 700 +#define PG_TYPE_FLOAT8 701 +#define PG_TYPE_ABSTIME 702 +#define PG_TYPE_RELTIME 703 +#define PG_TYPE_TINTERVAL 704 +#define PG_TYPE_UNKNOWN 705 +#define PG_TYPE_MONEY 790 +#define PG_TYPE_OIDINT2 810 +#define PG_TYPE_OIDINT4 910 +#define PG_TYPE_OIDNAME 911 +#define PG_TYPE_BPCHAR 1042 +#define PG_TYPE_VARCHAR 1043 +#define PG_TYPE_DATE 1082 +#define PG_TYPE_TIME 1083 +#define PG_TYPE_TIMESTAMP_NO_TMZONE 1114 /* since 7.2 */ +#define PG_TYPE_DATETIME 1184 +#define PG_TYPE_TIME_WITH_TMZONE 1266 /* since 7.1 */ +#define PG_TYPE_TIMESTAMP 1296 /* deprecated since 7.0 */ +#define PG_TYPE_NUMERIC 1700 +#define INTERNAL_ASIS_TYPE (-9999) + +#endif diff --git a/dev-haskell/hdbc-postgresql/hdbc-postgresql-1.1.3.0.ebuild b/dev-haskell/hdbc-postgresql/hdbc-postgresql-1.1.3.0.ebuild new file mode 100644 index 000000000000..a90a97c10e95 --- /dev/null +++ b/dev-haskell/hdbc-postgresql/hdbc-postgresql-1.1.3.0.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/hdbc-postgresql/hdbc-postgresql-1.1.3.0.ebuild,v 1.1 2007/12/13 17:21:21 dcoutts Exp $ + +CABAL_FEATURES="lib profile haddock" +inherit haskell-cabal versionator + +MY_PN=HDBC-postgresql +MY_P=${MY_PN}-${PV} + +DESCRIPTION="PostgreSQL database driver for HDBC" +HOMEPAGE="http://software.complete.org/hdbc-postgresql" +SRC_URI="http://hackage.haskell.org/packages/archive/${MY_PN}/${PV}/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="" + +hdbc_PV=$(get_version_component_range 1-3) + +DEPEND=">=dev-lang/ghc-6.4.1 + dev-haskell/mtl + =dev-haskell/hdbc-${hdbc_PV}* + >=dev-db/libpq-8" + +S="${WORKDIR}/${MY_P}" + +src_unpack() { + unpack "${A}" + + cp "${FILESDIR}/hdbc-postgresql-helper.h" "${FILESDIR}/pgtypes.h" "${S}/" + sed -i -e 's/GHC-Options: -O2 -Wall/GHC-Options: -fvia-C/' \ + -e '/include-dirs:/d' \ + -e '/^Extensions:/a \ + , ForeignFunctionInterface' \ + "${S}/${MY_PN}.cabal" + echo "include-dirs: $(pg_config --includedir)," >> "${S}/${MY_PN}.cabal" + echo " $(pg_config --includedir-server), ." >> "${S}/${MY_PN}.cabal" + + if version_is_at_least "6.8" "$(ghc-version)"; then + sed -i -e '/Build-Depends:/a \ + , old-time' \ + "${S}/${MY_PN}.cabal" + fi +} |