2001-06-28 10:52:19 +02:00
|
|
|
# New ports collection makefile for: PL/Ruby
|
|
|
|
# Date created: 28 June 2001
|
|
|
|
# Whom: Akinori MUSHA aka knu <knu@idaemons.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= plruby
|
2004-12-25 21:34:30 +01:00
|
|
|
PORTVERSION= 0.4.3
|
2005-01-31 01:35:55 +01:00
|
|
|
PORTREVISION= 1
|
2001-06-28 10:52:19 +02:00
|
|
|
CATEGORIES= databases ruby
|
|
|
|
MASTER_SITES= ftp://moulon.inra.fr/pub/ruby/
|
|
|
|
PKGNAMEPREFIX= postgresql-
|
|
|
|
DIST_SUBDIR= ruby
|
|
|
|
|
|
|
|
MAINTAINER= knu@FreeBSD.org
|
2003-02-18 05:37:40 +01:00
|
|
|
COMMENT= PL/Ruby procedural language for the PostgreSQL database system
|
2001-06-28 10:52:19 +02:00
|
|
|
|
2004-03-02 08:28:41 +01:00
|
|
|
BUILD_DEPENDS= postgres:${PORTSDIR}/${POSTGRESQL_PORT}
|
2003-01-04 04:51:40 +01:00
|
|
|
RUN_DEPENDS= postgres:${PORTSDIR}/${POSTGRESQL_PORT}
|
2001-06-28 10:52:19 +02:00
|
|
|
|
2005-01-31 01:35:55 +01:00
|
|
|
USE_PGSQL= yes
|
2001-06-28 10:52:19 +02:00
|
|
|
USE_RUBY= yes
|
|
|
|
USE_RUBY_EXTCONF= yes
|
2004-03-02 08:28:41 +01:00
|
|
|
USE_RUBY_RDOC= yes
|
2001-06-28 10:52:19 +02:00
|
|
|
|
2005-01-31 01:35:55 +01:00
|
|
|
POSTGRESQL_PORT?= databases/postgresql${PGSQL_VER}-server
|
2003-01-04 04:51:40 +01:00
|
|
|
PGSQL_PORTDIR?= ${PORTSDIR}/${POSTGRESQL_PORT}
|
2001-06-28 10:52:19 +02:00
|
|
|
PGSQL_WRKSRC_CMD= cd ${PGSQL_PORTDIR} && ${MAKE} -V WRKSRC
|
|
|
|
|
2005-01-31 01:35:55 +01:00
|
|
|
CONFIGURE_ARGS= --with-pgsql-version="${PGSQL_VER}" \
|
2003-10-15 00:31:23 +02:00
|
|
|
--with-pgsql-srcinc="`${PGSQL_WRKSRC_CMD}`/src/include" \
|
2004-03-02 08:28:41 +01:00
|
|
|
--with-pgsql-include="${LOCALBASE}/include" \
|
2001-06-28 10:52:19 +02:00
|
|
|
--with-pgsql-lib="${LOCALBASE}/lib"
|
2003-01-30 17:58:06 +01:00
|
|
|
#CONFIGURE_ARGS+= --with-safe-level=0
|
|
|
|
#CONFIGURE_ARGS+= --with-main-safe-level=0
|
|
|
|
#CONFIGURE_ARGS+= --with-timeout=30
|
2001-06-28 10:52:19 +02:00
|
|
|
INSTALL_TARGET= site-install
|
|
|
|
|
2004-03-02 08:28:41 +01:00
|
|
|
DOCS= Changes README.en plruby.html plruby.rd docs/doc
|
2001-06-28 10:52:19 +02:00
|
|
|
|
|
|
|
PKGMESSAGE= ${WRKDIR}/createlang.sql
|
|
|
|
|
2003-02-09 09:03:59 +01:00
|
|
|
post-extract:
|
|
|
|
${FIND} ${WRKSRC} -name '*~' -delete
|
|
|
|
|
2001-06-28 10:52:19 +02:00
|
|
|
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
|
2004-03-02 08:28:41 +01:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} rdoc
|
|
|
|
.endif
|
2001-06-28 10:52:19 +02:00
|
|
|
|
2005-01-31 01:35:55 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
# Setting/finding PostgreSQL version we want.
|
|
|
|
.if exists(${LOCALBASE}/bin/postmaster)
|
|
|
|
PGSQL_VER!= ${LOCALBASE}/bin/postmaster -V | \
|
|
|
|
${SED} -n 's/postmaster.*PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\2/p'
|
|
|
|
.elif exists(${LOCALBASE}/bin/pg_config)
|
|
|
|
PGSQL_VER!= ${LOCALBASE}/bin/pg_config --version | ${SED} -n 's/PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\2/p'
|
|
|
|
.else
|
|
|
|
PGSQL_VER= ${DEFAULT_PGSQL_VER}
|
|
|
|
.endif
|
|
|
|
|
2001-06-28 10:52:19 +02:00
|
|
|
post-install:
|
|
|
|
.if !defined(NOPORTDOCS)
|
2002-10-06 23:08:30 +02:00
|
|
|
${MKDIR} ${RUBY_MODEXAMPLESDIR}/
|
|
|
|
${CP} -R ${WRKSRC}/test/* ${RUBY_MODEXAMPLESDIR}/
|
|
|
|
${INSTALL_DATA} ${WRKDIR}/createlang.sql ${RUBY_MODEXAMPLESDIR}/
|
|
|
|
${MKDIR} ${RUBY_MODDOCDIR}
|
2001-06-28 10:52:19 +02:00
|
|
|
.for f in ${DOCS}
|
2004-03-02 08:28:41 +01:00
|
|
|
${CP} -R ${WRKSRC}/${f} ${RUBY_MODDOCDIR}/
|
2001-06-28 10:52:19 +02:00
|
|
|
.endfor
|
|
|
|
.endif
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
|
2005-01-31 01:35:55 +01:00
|
|
|
.include <bsd.port.post.mk>
|