summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatsuu Takuto <matsuu@gentoo.org>2008-11-15 00:03:50 +0000
committerMatsuu Takuto <matsuu@gentoo.org>2008-11-15 00:03:50 +0000
commit28cbd71fcbaf9fc25408a92874a19c1a3e4113b0 (patch)
tree4c4b7f50e9f69146f82a9c051b32df7c2f7ee6f4 /dev-db/pgmecab
parentversion bump (diff)
downloadgentoo-2-28cbd71fcbaf9fc25408a92874a19c1a3e4113b0.tar.gz
gentoo-2-28cbd71fcbaf9fc25408a92874a19c1a3e4113b0.tar.bz2
gentoo-2-28cbd71fcbaf9fc25408a92874a19c1a3e4113b0.zip
Fixed to work with old versions, bug #239594.
(Portage version: 2.2_rc13/cvs/Linux 2.6.27-gentoo x86_64)
Diffstat (limited to 'dev-db/pgmecab')
-rw-r--r--dev-db/pgmecab/ChangeLog8
-rw-r--r--dev-db/pgmecab/files/pgmecab-1.1-r3-postgres83.patch20
-rw-r--r--dev-db/pgmecab/pgmecab-1.1-r3.ebuild43
3 files changed, 70 insertions, 1 deletions
diff --git a/dev-db/pgmecab/ChangeLog b/dev-db/pgmecab/ChangeLog
index f29f5b8fd123..61f76742f58e 100644
--- a/dev-db/pgmecab/ChangeLog
+++ b/dev-db/pgmecab/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-db/pgmecab
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/pgmecab/ChangeLog,v 1.4 2008/11/02 08:55:33 matsuu Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/pgmecab/ChangeLog,v 1.5 2008/11/15 00:03:50 matsuu Exp $
+
+*pgmecab-1.1-r3 (15 Nov 2008)
+
+ 15 Nov 2008; MATSUU Takuto <matsuu@gentoo.org>
+ +files/pgmecab-1.1-r3-postgres83.patch, +pgmecab-1.1-r3.ebuild:
+ Fixed to work with old versions, bug #239594.
*pgmecab-1.1-r2 (02 Nov 2008)
diff --git a/dev-db/pgmecab/files/pgmecab-1.1-r3-postgres83.patch b/dev-db/pgmecab/files/pgmecab-1.1-r3-postgres83.patch
new file mode 100644
index 000000000000..4bd4483bd18f
--- /dev/null
+++ b/dev-db/pgmecab/files/pgmecab-1.1-r3-postgres83.patch
@@ -0,0 +1,20 @@
+--- pgmecab.c.orig 2008-10-05 13:24:34.000000000 +0200
++++ pgmecab.c 2008-10-05 13:25:17.000000000 +0200
+@@ -24,7 +24,7 @@
+ static Datum returnEmptyStr()
+ {
+ text* emptyVal = (text*) palloc(VARHDRSZ);
+- VARATT_SIZEP(emptyVal) = VARHDRSZ;
++ SET_VARSIZE(emptyVal, VARHDRSZ);
+ PG_RETURN_TEXT_P(emptyVal);
+ }
+
+@@ -90,7 +90,7 @@
+
+ /* 返すためのメモリ確保 */
+ text* return_val = (text *) palloc(VARHDRSZ + mecab_result_size * sizeof(char));
+- VARATT_SIZEP(return_val) = VARHDRSZ + mecab_result_size * sizeof(char);
++ SET_VARSIZE(return_val, VARHDRSZ + mecab_result_size * sizeof(char));
+
+ /* 結果をコピー */
+ memcpy((void*)VARDATA(return_val), mecab_result, mecab_result_size);
diff --git a/dev-db/pgmecab/pgmecab-1.1-r3.ebuild b/dev-db/pgmecab/pgmecab-1.1-r3.ebuild
new file mode 100644
index 000000000000..c4ec361f7b6d
--- /dev/null
+++ b/dev-db/pgmecab/pgmecab-1.1-r3.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-db/pgmecab/pgmecab-1.1-r3.ebuild,v 1.1 2008/11/15 00:03:50 matsuu Exp $
+
+inherit eutils versionator
+
+DESCRIPTION="PostgreSQL function to Wakachigaki for Japanese words"
+HOMEPAGE="http://www.emaki.minidns.net/Programming/postgres/index.html"
+SRC_URI="http://www.emaki.minidns.net/Programming/postgres/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="app-text/mecab
+ >=virtual/postgresql-server-7.4"
+DEPEND="${RDEPEND}
+ app-admin/eselect-postgresql"
+
+src_unpack () {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-gentoo.patch"
+
+ # Bug #239594
+ PGVER=( $(get_version_components $(eselect postgresql show)) )
+ PGMAJOR="${PGVER[0]}"
+ PGMINOR="${PGVER[1]}"
+ if [ ${PGMAJOR} -eq 8 -a ${PGMINOR} -gt 2 -o ${PGMAJOR} -gt 8 ] ; then
+ epatch "${FILESDIR}/${PF}-postgres83.patch"
+ fi
+}
+
+src_compile() {
+ emake USE_PGXS=1 || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" USE_PGXS=1 install || die
+
+ dodoc README.pgmecab
+}