aboutsummaryrefslogtreecommitdiffstats
path: root/databases/postgresql-plruby
diff options
context:
space:
mode:
authorknu <knu@FreeBSD.org>2001-06-28 16:52:19 +0800
committerknu <knu@FreeBSD.org>2001-06-28 16:52:19 +0800
commitfff538b2c08786423fe442a8c97e8c428a4f4931 (patch)
treee3cf0f6a71ce7b5207b8acc01a88e2b3e6af9601 /databases/postgresql-plruby
parentc79234ccff40e4357f9d4c1852edc1878dd5f609 (diff)
downloadfreebsd-ports-gnome-fff538b2c08786423fe442a8c97e8c428a4f4931.tar.gz
freebsd-ports-gnome-fff538b2c08786423fe442a8c97e8c428a4f4931.tar.zst
freebsd-ports-gnome-fff538b2c08786423fe442a8c97e8c428a4f4931.zip
Add postgresql-plruby, PL/Ruby procedural language for the PostgreSQL
database system.
Diffstat (limited to 'databases/postgresql-plruby')
-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
6 files changed, 118 insertions, 0 deletions
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