From 92a5a1b1a9ad1fdeb83ed6dda6392b85588e94dd Mon Sep 17 00:00:00 2001 From: knu Date: Sat, 3 Mar 2001 08:58:18 +0000 Subject: Add pruby, a glue interface between PHP and Ruby. --- www/pruby/Makefile | 63 +++++++++++++++++++++++ www/pruby/distinfo | 1 + www/pruby/files/patch-Makefile | 34 ++++++++++++ www/pruby/files/patch-extconf.sh | 108 +++++++++++++++++++++++++++++++++++++++ www/pruby/pkg-comment | 1 + www/pruby/pkg-descr | 12 +++++ www/pruby/pkg-plist | 7 +++ 7 files changed, 226 insertions(+) create mode 100644 www/pruby/Makefile create mode 100644 www/pruby/distinfo create mode 100644 www/pruby/files/patch-Makefile create mode 100644 www/pruby/files/patch-extconf.sh create mode 100644 www/pruby/pkg-comment create mode 100644 www/pruby/pkg-descr create mode 100644 www/pruby/pkg-plist (limited to 'www/pruby') diff --git a/www/pruby/Makefile b/www/pruby/Makefile new file mode 100644 index 0000000..295f953 --- /dev/null +++ b/www/pruby/Makefile @@ -0,0 +1,63 @@ +# New ports collection makefile for: pRuby +# Date created: 24 February 2001 +# Whom: Akinori MUSHA aka knu +# +# $FreeBSD$ +# + +PORTNAME= pruby +PORTVERSION= 0.20 +CATEGORIES= www lang ruby +MASTER_SITES= http://www.inf.bme.hu/~pts/ +DIST_SUBDIR= ruby + +MAINTAINER= knu@FreeBSD.org + +BUILD_DEPENDS= php:${PHP4_PORTDIR} \ + ${NONEXISTENT}:${MOD_PHP4_PORTDIR}:configure +RUN_DEPENDS= ${LOCALBASE}/libexec/apache/libphp4.so:${MOD_PHP4_PORTDIR} + +USE_GMAKE= yes +USE_RUBY= yes + +.include + +PHP4_PORTDIR= ${.CURDIR}/../../lang/php4 +MOD_PHP4_PORTDIR= ${.CURDIR}/../mod_php4 +MOD_PHP4_WRKSRC!= cd ${MOD_PHP4_PORTDIR} && ${MAKE} -V WRKSRC + +DOCS_EN= README contrib/_htaccess + +pre-everything: + ${MKDIR} ${MOD_PHP4_WRKSRC} + ${TOUCH} ${MOD_PHP4_WRKSRC}/../../Makefile.inc + +do-configure: + cd ${WRKSRC} && ( \ + php contrib/phpinfo.php > phpinfo.out; \ + ( \ + ${ECHO} "PHP4_SRC=${MOD_PHP4_WRKSRC}"; \ + ${ECHO} "PHP4_CONFIGURED=yes"; \ + ${ECHO} "RUBY_SRC="; \ + ${ECHO} "RUBY=${RUBY}"; \ + ${ECHO} "PHPINFO_OUT=phpinfo.out"; \ + ${ECHO} "LIBRUBYS_SO=${LOCALBASE}/lib/libruby.so"; \ + ) > Configuration; \ + ) + +pre-install: + dir=`. ${WRKSRC}/phpinfo.sd; ${ECHO} $${PI_EXTENSION_DIR}`; \ + ${MKDIR} $${dir} + +post-install: + dir=`. ${WRKSRC}/phpinfo.sd; ${ECHO} $${PI_EXTENSION_DIR}`; \ + ${INSTALL_DATA} ${WRKSRC}/ext_pruby_src/pruby_*.rb $${dir}/; \ + ${PERL} -i -pe "s,%%EXTENSION_DIR%%,$${dir#${PREFIX}/},g" ${TMPPLIST} +.if !defined(NOPORTDOCS) + ${MKDIR} ${RUBY_DOCDIR}/${PORTNAME} +.for f in ${DOCS_EN} + ${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_DOCDIR}/${PORTNAME}/ +.endfor +.endif + +.include diff --git a/www/pruby/distinfo b/www/pruby/distinfo new file mode 100644 index 0000000..67006c4 --- /dev/null +++ b/www/pruby/distinfo @@ -0,0 +1 @@ +MD5 (ruby/pruby-0.20.tar.gz) = dd51a6316550efe701a3364d34b47e9b diff --git a/www/pruby/files/patch-Makefile b/www/pruby/files/patch-Makefile new file mode 100644 index 0000000..c57343f --- /dev/null +++ b/www/pruby/files/patch-Makefile @@ -0,0 +1,34 @@ +--- Makefile.orig Thu Feb 22 07:07:58 2001 ++++ Makefile Fri Mar 2 22:01:20 2001 +@@ -16,7 +16,7 @@ + all: pruby.so + + clean: +- -[ -f rbwhere.mk ] && make -C ext_pruby_src clean ++ -[ -f rbwhere.mk ] && gmake -C ext_pruby_src clean + rm -f $(CLEAN) + + confclean: clean +@@ -27,18 +27,18 @@ + conf: configed.now + + ext_pruby_src/libs.mk ext_pruby_src/Makefile phpinfo.sd rbwhere.mk rbwhere.sd configed.now: extconf.sh phpinfo.out Configuration ext_pruby_src/Makefile.inpts ext_pruby_src/libs.mk.inpts +- bash ./extconf.sh ++ sh ./extconf.sh + + pruby.so: ext_pruby_src/.libs/pruby.so + cp -f $< $@ + + ext_pruby_src/.libs/pruby.so: rbwhere.mk ext_pruby_src/php_pruby.c +- make -C ext_pruby_src ++ gmake -C ext_pruby_src + + php_ini_which: phpinfo.sd +- bash -c 'source phpinfo.sd; echo "$$PI_CONFIGURATION_FILE__PHP_INI__PATH"/php.ini' ++ sh -c '. phpinfo.sd; echo "$$PI_CONFIGURATION_FILE__PHP_INI__PATH"/php.ini' + + install: pruby.so phpinfo.sd +- bash -c 'source phpinfo.sd; cp -f pruby.so "$$PI_EXTENSION_DIR"/pruby.so' ++ sh -c '. phpinfo.sd; cp -f pruby.so "$$PI_EXTENSION_DIR"/pruby.so' + + # end of Makefile diff --git a/www/pruby/files/patch-extconf.sh b/www/pruby/files/patch-extconf.sh new file mode 100644 index 0000000..7117c45 --- /dev/null +++ b/www/pruby/files/patch-extconf.sh @@ -0,0 +1,108 @@ +--- extconf.sh.orig Thu Feb 22 06:01:54 2001 ++++ extconf.sh Sat Mar 3 17:27:35 2001 +@@ -1,4 +1,4 @@ +-#!/bin/bash -- ++#!/bin/sh -- + # extconf.sh + # configuring pRuby before compilation + # by pts@fazekas.hu at Wed Feb 21 16:18:26 CET 2001 +@@ -25,7 +25,7 @@ + + show() { + echo "$@" >&2 +- command "$@" ++ "$@" + } + + [ -f Configuration ] || fatal "file ./Configuration does not exist" +@@ -36,17 +36,17 @@ + exit 3 + fi + rm -f configed.now +-make confclean ++gmake confclean + +-type -p make 2>&1 >/dev/null || fatal "not on \$PATH: make" +-type -p bash 2>&1 >/dev/null || fatal "not on \$PATH: bash" +-type -p gcc 2>&1 >/dev/null || fatal "not on \$PATH: gcc" +-type -p rm 2>&1 >/dev/null || fatal "not on \$PATH: rm" +-type -p cp 2>&1 >/dev/null || fatal "not on \$PATH: cp" +-type -p mv 2>&1 >/dev/null || fatal "not on \$PATH: mv" +-type -p cat 2>&1 >/dev/null || fatal "not on \$PATH: cat" +-type -p mkdir 2>&1 >/dev/null || fatal "not on \$PATH: mkdir" +-type -p rmdir 2>&1 >/dev/null || fatal "not on \$PATH: rmdir" ++which -s gmake 2>&1 >/dev/null || fatal "not on \$PATH: gmake" ++which -s sh 2>&1 >/dev/null || fatal "not on \$PATH: sh" ++which -s gcc 2>&1 >/dev/null || fatal "not on \$PATH: gcc" ++which -s rm 2>&1 >/dev/null || fatal "not on \$PATH: rm" ++which -s cp 2>&1 >/dev/null || fatal "not on \$PATH: cp" ++which -s mv 2>&1 >/dev/null || fatal "not on \$PATH: mv" ++which -s cat 2>&1 >/dev/null || fatal "not on \$PATH: cat" ++which -s mkdir 2>&1 >/dev/null || fatal "not on \$PATH: mkdir" ++which -s rmdir 2>&1 >/dev/null || fatal "not on \$PATH: rmdir" + [ -n "$RUBY" ] || fatal "please set RUBY= in ./Configuration" + [ -n "$PHP4_SRC" ] || fatal "set PHP4_SRC= in ./Configuration" + [ -f "$PHP4_SRC/README.CVS-RULES" ] || fatal "PHP4_SRC= does not contain PHP4??" +@@ -84,8 +84,8 @@ + # RB_DLDFLAGS='\''$(DLDFLAGS)'\'' + ' + unset MAKELEVEL +-make -f rtmp/Makefile getflags | $RUBY -pe '$_.sub!(/^#\s*/,"")' >rbwhere.mk || fexit "$?" +-make -f rtmp/Makefile getflagsh| $RUBY -pe '$_.sub!(/^#\s*/,"")' >rbwhere.sd || fexit "$?" ++gmake -f rtmp/Makefile getflags | $RUBY -pe '$_.sub!(/^#\s*/,"")' >rbwhere.mk || fexit "$?" ++gmake -f rtmp/Makefile getflagsh| $RUBY -pe '$_.sub!(/^#\s*/,"")' >rbwhere.sd || fexit "$?" + # less rtmp/Makefile + rm -f rtmp/Makefile + rmdir rtmp +@@ -135,13 +135,13 @@ + # No we examine output of phpinfo.out + # + [ -f phpinfo.out ] || fatal "You should have created phpinfo.out. See docs for details." +-/tmp/ruby/bin/ruby -wne'print "PI_#{$1.upcase.tr %q[ -().],%q[_____]}=\x27#{$2}\x27\n" if $_=~/\A(?:<[^>]+>)+(configuration file .php.ini. path|extension_dir|thread safety|ZEND_DEBUG)(?:<[^>]+>)+([^<]*)/i' phpinfo.sd || fatal "phpinfo.out bad??" +-/tmp/ruby/bin/ruby -wne'print "PI_#{$1.upcase.tr %q[ -().],%q[_____]}=#{$2}\n" if $_=~/\A(?:<[^>]+>)+(configuration file .php.ini. path|extension_dir|thread safety|ZEND_DEBUG)(?:<[^>]+>)+([^<]*)/i' >rbwhere.mk || fatal "phpinfo.out bad??" ++$RUBY -wne'print "PI_#{$1.upcase.tr %q[ -().],%q[_____]}=\x27#{$2}\x27\n" if $_=~/\A(?:<[^>]+>)+(configuration file .php.ini. path|extension_dir|thread safety|ZEND_DEBUG)(?:<[^>]+>)+([^<]*)/i' phpinfo.sd || fatal "phpinfo.out bad??" ++$RUBY -wne'print "PI_#{$1.upcase.tr %q[ -().],%q[_____]}=#{$2}\n" if $_=~/\A(?:<[^>]+>)+(configuration file .php.ini. path|extension_dir|thread safety|ZEND_DEBUG)(?:<[^>]+>)+([^<]*)/i' >rbwhere.mk || fatal "phpinfo.out bad??" + . phpinfo.sd + [ -n "$PI_EXTENSION_DIR" ] || fatal "cannot get \`extension_dir' from phpinfo.out" + [ -n "$PI_CONFIGURATION_FILE__PHP_INI__PATH" ] || fatal "cannot get path for php.ini from phpinfo.out" +-[ -f "$PI_CONFIGURATION_FILE__PHP_INI__PATH/php.ini" ] || fatal "php.ini isn't there" +-[ -d "$PI_EXTENSION_DIR" ] || fatal "PHP extension_dir ($PI_EXTENSION_DIR) not exists" ++#[ -f "$PI_CONFIGURATION_FILE__PHP_INI__PATH/php.ini" ] || fatal "php.ini isn't there" ++#[ -d "$PI_EXTENSION_DIR" ] || fatal "PHP extension_dir ($PI_EXTENSION_DIR) not exists" + + rm -rf phpfake # dangerous?? + echo "Creating phpfake/*" +@@ -149,7 +149,7 @@ + for N in `cd "$PHP4_SRC"; ls *.h */*.h ext/standard/*.h build/*.mk`; do + if [ ! -f "$PHP4_SRC/$N.in" ]; then + [ "${N%/*}" != "$N" ] && mkdir -p "phpfake/${N%/*}" +- cp -fa "$PHP4_SRC/$N" "phpfake/$N" || fexit "$?" ++ cp -fRPp "$PHP4_SRC/$N" "phpfake/$N" || fexit "$?" + fi + done + rm -f phpfake/php_config.h +@@ -161,7 +161,7 @@ + php_config.h.in build/fastgen.sh main/internal_functions.c.in Zend/Makefile.in' + for N in $FILES; do + [ "${N%/*}" != "$N" ] && mkdir -p "phpfake/${N%/*}" +- cp -fa "$PHP4_SRC/$N" "phpfake/$N" || fexit "$?" ++ cp -fRPp "$PHP4_SRC/$N" "phpfake/$N" || fexit "$?" + done + COFLAGS= + if [ "PI_THREAD_SAFETY" != "enabled" ]; then +@@ -186,12 +186,12 @@ + else + echo "PHP4 already configured." + FILES='README.CVS-RULES install-sh +- build/shtool build/fastgen.sh build-defs.h ++ build/shtool build/fastgen.sh main/build-defs.h + pear/phpize pear/php-config libtool +- php_config.h php_version.h config_vars.mk' ++ main/php_config.h main/php_version.h config_vars.mk' + for N in $FILES; do + [ "${N%/*}" != "$N" ] && mkdir -p "phpfake/${N%/*}" +- cp -fa "$PHP4_SRC/$N" "phpfake/$N" || fexit "$?" ++ cp -fRPp "$PHP4_SRC/$N" "phpfake/$N" || fexit "$?" + done + fi + diff --git a/www/pruby/pkg-comment b/www/pruby/pkg-comment new file mode 100644 index 0000000..df2568d --- /dev/null +++ b/www/pruby/pkg-comment @@ -0,0 +1 @@ +Glue interface between PHP and Ruby diff --git a/www/pruby/pkg-descr b/www/pruby/pkg-descr new file mode 100644 index 0000000..7ae9d21 --- /dev/null +++ b/www/pruby/pkg-descr @@ -0,0 +1,12 @@ +pRuby is a glue code between PHP and Ruby which lets you use Ruby as a +HTML-embedded, server side scripting language. With pRuby, you can +intermix PHP and Ruby to create dynamic web content. For example, you +can call PHP's database and image drawing functions from Ruby and vice +versa. pRuby is often compared to PHP, mod_ruby, eRuby, Erb, mod_perl +and ASP. Key features: better startup speed than CGI and PHP, better +execution speed than PHP, more powerful and less messier to program +than PHP, cross-language function calls and cross-language error +handling. + +Author: Szabo Peter +WWW: http://www.ruby-lang.org/en/raa-list.rhtml?name=pRuby diff --git a/www/pruby/pkg-plist b/www/pruby/pkg-plist new file mode 100644 index 0000000..1c223c7 --- /dev/null +++ b/www/pruby/pkg-plist @@ -0,0 +1,7 @@ +%%EXTENSION_DIR%%/pruby.so +%%EXTENSION_DIR%%/pruby_ervi.rb +%%EXTENSION_DIR%%/pruby_tops.rb +@unexec rmdir -p %D/%%EXTENSION_DIR%% 2>/dev/null || true +%%PORTDOCS%%%%RUBY_DOCDIR%%/pruby/README +%%PORTDOCS%%%%RUBY_DOCDIR%%/pruby/_htaccess +%%PORTDOCS%%@dirrm %%RUBY_DOCDIR%%/pruby -- cgit v1.1