aboutsummaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2001-06-28 08:52:19 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2001-06-28 08:52:19 +0000
commit7d38e9af5b95ee000ee761bfdfc9883158706d63 (patch)
tree3d76d45f6c1309fc3f598e5e5031f1f65df95ae7 /databases
parentf76ae5c8f64cd000e6b758bafd4d7b0579c0262a (diff)
downloadports-7d38e9af5b95ee000ee761bfdfc9883158706d63.tar.gz
ports-7d38e9af5b95ee000ee761bfdfc9883158706d63.zip
Notes
Diffstat (limited to 'databases')
-rw-r--r--databases/Makefile1
-rw-r--r--databases/postgresql-plruby/Makefile66
-rw-r--r--databases/postgresql-plruby/distinfo1
-rw-r--r--databases/postgresql-plruby/files/createlang.sql15
-rw-r--r--databases/postgresql-plruby/pkg-comment1
-rw-r--r--databases/postgresql-plruby/pkg-descr6
-rw-r--r--databases/postgresql-plruby/pkg-plist29
7 files changed, 119 insertions, 0 deletions
diff --git a/databases/Makefile b/databases/Makefile
index 460722c63328..a685856f72d1 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -64,6 +64,7 @@
SUBDIR += p5-hp200lx-db
SUBDIR += phpmyadmin
SUBDIR += phppgadmin
+ SUBDIR += postgresql-plruby
SUBDIR += postgresql7
SUBDIR += pxtools
SUBDIR += py-MySQL
diff --git a/databases/postgresql-plruby/Makefile b/databases/postgresql-plruby/Makefile
new file mode 100644
index 000000000000..fbb96dfc5c2f
--- /dev/null
+++ b/databases/postgresql-plruby/Makefile
@@ -0,0 +1,66 @@
+# New ports collection makefile for: PL/Ruby
+# Date created: 28 June 2001
+# Whom: Akinori MUSHA aka knu <knu@idaemons.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= plruby
+PORTVERSION= 0.2.3
+CATEGORIES= databases ruby
+MASTER_SITES= ftp://moulon.inra.fr/pub/ruby/
+PKGNAMEPREFIX= postgresql-
+DIST_SUBDIR= ruby
+
+MAINTAINER= knu@FreeBSD.org
+
+LIB_DEPENDS= pq.2:${PGSQL_PORTDIR}
+
+USE_RUBY= yes
+USE_RUBY_EXTCONF= yes
+
+PGSQL_VERSION?= 71
+PGSQL_PORTDIR?= ${PORTSDIR}/databases/postgresql7
+PGSQL_WRKSRC_CMD= cd ${PGSQL_PORTDIR} && ${MAKE} -V WRKSRC
+
+CONFIGURE_ARGS= --with-pgsql-version="${PGSQL_VERSION}" \
+ --with-pgsql-srcinc-dir="`${PGSQL_WRKSRC_CMD}`/src/include"
+.if defined(WITH_OLD_LAYOUT)
+CONFIGURE_ARGS+=
+ --with-pgsql-include-dir="${LOCALBASE}/pgsql/include" \
+ --with-pgsql-lib-dir="${LOCALBASE}/pgsql/lib"
+.else
+CONFIGURE_ARGS+= --with-pgsql-include-dir="${LOCALBASE}/include/pgsql" \
+ --with-pgsql-lib="${LOCALBASE}/lib"
+.endif
+
+INSTALL_TARGET= site-install
+
+DOCS= README.en plruby.html plruby.rd
+
+PKGMESSAGE= ${WRKDIR}/createlang.sql
+
+post-patch:
+ ${RUBY} -i -pe 'gsub /test_mklang\.sql/, "../createlang.sql"' \
+ ${WRKSRC}/test/*/runtest
+
+pre-configure:
+ cd ${PGSQL_PORTDIR} && ${MAKE} -DBATCH patch
+
+post-build:
+ ${SED} 's,!!PLRUBY_SO!!,${RUBY_SITEARCHLIBDIR}/plruby.so,' \
+ ${FILESDIR}/createlang.sql > ${WRKDIR}/createlang.sql
+
+post-install:
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${RUBY_EXAMPLESDIR}/${PORTNAME}/
+ ${CP} -R ${WRKSRC}/test/* ${RUBY_EXAMPLESDIR}/${PORTNAME}/
+ ${INSTALL_DATA} ${WRKDIR}/createlang.sql ${RUBY_EXAMPLESDIR}/${PORTNAME}/
+ ${MKDIR} ${RUBY_DOCDIR}/${PORTNAME}
+.for f in ${DOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_DOCDIR}/${PORTNAME}/
+.endfor
+.endif
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/databases/postgresql-plruby/distinfo b/databases/postgresql-plruby/distinfo
new file mode 100644
index 000000000000..f273dd98f3d6
--- /dev/null
+++ b/databases/postgresql-plruby/distinfo
@@ -0,0 +1 @@
+MD5 (ruby/plruby-0.2.3.tar.gz) = f958ecde8de88bb083d04c38d4084b46
diff --git a/databases/postgresql-plruby/files/createlang.sql b/databases/postgresql-plruby/files/createlang.sql
new file mode 100644
index 000000000000..0641d1c1e378
--- /dev/null
+++ b/databases/postgresql-plruby/files/createlang.sql
@@ -0,0 +1,15 @@
+--
+-- Execute the following SQL statements to enable PL/Ruby.
+--
+-- $FreeBSD$
+--
+
+CREATE FUNCTION plruby_call_handler() RETURNS OPAQUE
+ AS '!!PLRUBY_SO!!'
+ LANGUAGE 'C';
+
+CREATE TRUSTED PROCEDURAL LANGUAGE 'plruby'
+ HANDLER plruby_call_handler
+ LANCOMPILER 'PL/Ruby';
+
+--
diff --git a/databases/postgresql-plruby/pkg-comment b/databases/postgresql-plruby/pkg-comment
new file mode 100644
index 000000000000..5eadeddf67ae
--- /dev/null
+++ b/databases/postgresql-plruby/pkg-comment
@@ -0,0 +1 @@
+PL/Ruby procedural language for the PostgreSQL database system
diff --git a/databases/postgresql-plruby/pkg-descr b/databases/postgresql-plruby/pkg-descr
new file mode 100644
index 000000000000..4396c3ecacf5
--- /dev/null
+++ b/databases/postgresql-plruby/pkg-descr
@@ -0,0 +1,6 @@
+PL/Ruby is a loadable procedural language for the PostgreSQL database
+system (7.0 or later) that enables to write functions and trigger
+procedures in Ruby.
+
+Author: Guy Decoux <ts@moulon.inra.fr>
+WWW: http://moulon.inra.fr/ruby/plruby.html
diff --git a/databases/postgresql-plruby/pkg-plist b/databases/postgresql-plruby/pkg-plist
new file mode 100644
index 000000000000..612b063ae0d6
--- /dev/null
+++ b/databases/postgresql-plruby/pkg-plist
@@ -0,0 +1,29 @@
+%%RUBY_SITEARCHLIBDIR%%/plruby.so
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/createlang.sql
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plp/b.rb
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plp/runtest
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plp/test.expected.65
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plp/test.expected.70
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plp/test.expected.71
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plp/test.out
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plp/test_mklang.sql
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plp/test_queries.sql
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plp/test_setup.sql
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plt/b.rb
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plt/runtest
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plt/test.expected.65
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plt/test.expected.70
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plt/test.expected.71
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plt/test.out
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plt/test_mklang.sql
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plt/test_queries.sql
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plt/test_setup.sql
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plt/test_setup_new.sql
+%%PORTDOCS%%%%RUBY_EXAMPLESDIR%%/plruby/plt/test_setup_old.sql
+%%PORTDOCS%%@dirrm %%RUBY_EXAMPLESDIR%%/plruby/plp
+%%PORTDOCS%%@dirrm %%RUBY_EXAMPLESDIR%%/plruby/plt
+%%PORTDOCS%%@dirrm %%RUBY_EXAMPLESDIR%%/plruby
+%%PORTDOCS%%%%RUBY_DOCDIR%%/plruby/README.en
+%%PORTDOCS%%%%RUBY_DOCDIR%%/plruby/plruby.html
+%%PORTDOCS%%%%RUBY_DOCDIR%%/plruby/plruby.rd
+%%PORTDOCS%%@dirrm %%RUBY_DOCDIR%%/plruby