aboutsummaryrefslogtreecommitdiff
path: root/lang/neko
diff options
context:
space:
mode:
authorDaichi GOTO <daichi@FreeBSD.org>2007-08-21 06:13:33 +0000
committerDaichi GOTO <daichi@FreeBSD.org>2007-08-21 06:13:33 +0000
commite12c080bf5eba78e896ccf9b1746d00949cd7d43 (patch)
tree794a0a54de18b0f13b3c36238485fca123f6f43b /lang/neko
parent8f4ced1aa071736e98d428dd4ea5af8d05e4b73f (diff)
downloadports-e12c080bf5eba78e896ccf9b1746d00949cd7d43.tar.gz
ports-e12c080bf5eba78e896ccf9b1746d00949cd7d43.zip
The Neko Programming Language
Neko is a high-level dynamically typed programming language which can also be used as an embedded scripting language. It has been designed to provide a common runtime for several different languages. Neko is not only very easy to learn and use, but also has the flexibility of being able to extend the language with C libraries. You can even write generators from your own language to Neko and then use the Neko Runtime to compile, run, and access existing libraries. WWW: http://nekovm.org/ Submitted by: Masanori OZAWA <ozawa@ongs.co.jp>
Notes
Notes: svn path=/head/; revision=198007
Diffstat (limited to 'lang/neko')
-rw-r--r--lang/neko/Makefile163
-rw-r--r--lang/neko/distinfo3
-rw-r--r--lang/neko/pkg-descr12
-rw-r--r--lang/neko/pkg-plist17
4 files changed, 195 insertions, 0 deletions
diff --git a/lang/neko/Makefile b/lang/neko/Makefile
new file mode 100644
index 000000000000..a0b9ec42e84c
--- /dev/null
+++ b/lang/neko/Makefile
@@ -0,0 +1,163 @@
+# New ports collection makefile for: The Neko Programming Language
+# Date created: 08 August 2007
+# Whom: Masanori OZAWA (ozawa@ongs.co.jp)
+#
+# $FreeBSD$
+#
+
+PORTNAME= neko
+PORTVERSION= 1.6.0
+CATEGORIES= lang
+MASTER_SITES= http://nekovm.org/_media/
+
+MAINTAINER= ozawa@ongs.co.jp
+COMMENT= The Neko Programming Language
+
+ONLY_FOR_ARCHS= i386 amd64
+
+USE_GMAKE= yes
+
+OPTIONS= APACHE13 "Build with mod_neko for Apache 1.3.x" off \
+ APACHE22 "Build with mod_neko for Apache 2.2.x" off \
+ MYSQL4 "Build with MySQL 4.x library" off \
+ SQLITE3 "Build with Sqlite 3.x SQL library" off \
+ PCRE "Build with PCRE library" on \
+ GTK2 "Build with Gtk 2.x UI library" on
+
+.include <bsd.port.pre.mk>
+
+# Neko needs boehm-gc with POSIX thread support.
+BC_DIR!= cd ${PORTSDIR}/devel/boehm-gc && ${MAKE} -V WRKSRC
+
+CFLAGS= -I${WRKSRC} -I${PREFIX}/include
+LDFLAGS= -L${BC_DIR}/.libs -L${PREFIX}/lib
+LIBKEYNAME=
+
+.if defined(WITH_APACHE13)
+BUILD_DEPENDS+= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache13
+RUN_DEPENDS+= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache13
+CFLAGS+= -I${LOCALBASE}/include/apache
+PLIST_SUB+= APACHE13=
+.else
+LIBKEYNAME+= mod_neko
+PLIST_SUB+= APACHE13="@comment "
+.endif
+
+.if defined(WITH_APACHE22)
+BUILD_DEPENDS+= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache22
+RUN_DEPENDS+= ${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache22
+CFLAGS+= -I${LOCALBASE}/include/apache22
+PLIST_SUB+= APACHE22=
+.else
+LIBKEYNAME+= mod_neko2
+PLIST_SUB+= APACHE22="@comment "
+.endif
+
+.if defined(WITH_MYSQL4)
+BUILD_DEPENDS+= mysql:${PORTSDIR}/databases/mysql41-client
+RUN_DEPENDS+= mysql:${PORTSDIR}/databases/mysql41-client
+CFLAGS+= -I${PREFIX}/include/mysql
+PLIST_SUB+= MYSQL4=
+.else
+LIBKEYNAME+= mysql
+PLIST_SUB+= MYSQL4="@comment "
+.endif
+
+.if defined(WITH_SQLITE3)
+BUILD_DEPENDS+= sqlite3:${PORTSDIR}/databases/sqlite3
+RUN_DEPENDS+= sqlite3:${PORTSDIR}/databases/sqlite3
+PLIST_SUB+= SQLITE3=
+.else
+LIBKEYNAME+= sqlite
+PLIST_SUB+= SQLITE3="@comment "
+.endif
+
+.if defined(WITH_PCRE)
+BUILD_DEPENDS+= ${PREFIX}/include/pcre.h:${PORTSDIR}/devel/pcre
+RUN_DEPENDS+= ${PREFIX}/include/pcre.h:${PORTSDIR}/devel/pcre
+PLIST_SUB+= PCRE=
+.else
+LIBKEYNAME+= regexp
+PLIST_SUB+= PCRE="@comment "
+.endif
+
+.if defined(WITH_GTK2)
+BUILD_DEPENDS+= ${PREFIX}/include/gtk-2.0:${PORTSDIR}/x11-toolkits/gtk20
+RUN_DEPENDS+= ${PREFIX}/include/gtk-2.0:${PORTSDIR}/x11-toolkits/gtk20
+PLIST_SUB+= GTK2=
+.else
+LIBKEYNAME+= ui
+PLIST_SUB+= GTK2="@comment "
+.endif
+
+.if ${ARCH} == "amd64"
+CFLAGS+= -D_64BITS -fPIC
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} \
+ -e '/INSTALL_PREFIX/s,/usr/local,${PREFIX},' \
+ -e '/^CFLAGS =/s,.$$, ${CFLAGS},' \
+ -e '/LIBNEKO_LIBS =/s,[-]ldl,${LDFLAGS},' \
+ -e '/LIBNEKO_LIBS =/s,[-]lgc,-lnekogc,' \
+ -e '/mkdir/s,\(INSTALL_PREFIX[}]/include\),\1/neko,' \
+ -e '/cp vm[/]neko[*][.]h/s,\(INSTALL_PREFIX[}]/include\),\1/neko,' \
+ ${WRKSRC}/Makefile
+ @${REINPLACE_CMD} \
+ -e '/^[#] include/s,wait.h,sys/wait.h,' \
+ ${WRKSRC}/libs/std/process.c
+ @${REINPLACE_CMD} \
+ -e '/^linkcmd =/s,"ld",cc,' \
+ -e 's/= readline[(][)];/= "s";/' \
+ ${WRKSRC}/src/tools/install.neko
+.if !empty(LIBKEYNAME)
+.for LKN in ${LIBKEYNAME}
+ @${REINPLACE_CMD} \
+ -e '/^ ${LKN} =[>]/,/^ [}][,]\{0,1\}.$$/d' \
+ ${WRKSRC}/src/tools/install.neko
+.endfor
+.endif
+.if defined(WITH_APACHE13)
+ @${REINPLACE_CMD} \
+ -e 's,"/usr/include/apache-1.3","${PREFIX}/include/apache",' \
+ ${WRKSRC}/src/tools/install.neko
+.endif
+.if defined(WITH_APACHE22)
+ @${REINPLACE_CMD} \
+ -e 's,"/usr/include/apache2","${PREFIX}/include/apache22",' \
+ ${WRKSRC}/src/tools/install.neko
+.endif
+.if defined(WITH_GTK2)
+ @${REINPLACE_CMD} \
+ -e 's,"/usr/include/gtk-2.0","${PREFIX}/include/gtk-2.0",' \
+ ${WRKSRC}/src/tools/install.neko
+ @${REINPLACE_CMD} \
+ -e 's,NEKO_LINUX,NEKO_BSD,' ${WRKSRC}/libs/ui/ui.c
+.endif
+
+pre-build:
+ @(cd ${PORTSDIR}/devel/boehm-gc/ && \
+ ${MAKE} BATCH=yes WITH_THREADING=true clean all)
+ @${RM} -f ${BC_DIR}/.libs/*.so*
+ @for BLIB in `${LS} ${BC_DIR}/.libs/libgc.*`; do \
+ ${MV} $${BLIB} `echo $${BLIB} | ${SED} -e 's/libgc/libnekogc/'`; \
+ done
+ @${LN} -sf ${BC_DIR}/include ${WRKSRC}/gc
+
+post-install:
+.if defined(WITH_APACHE13) || defined(WITH_APACHE22)
+ @${ECHO_CMD}
+ @${ECHO_CMD} "======================================================="
+ @${ECHO_CMD}
+ @${ECHO_CMD} " If you want to use Apache with mod_neko, you need "
+ @${ECHO_CMD} " edit the Apache configuration files."
+ @${ECHO_CMD} " Please see 'http://nekovm.org/doc/mod_neko' for details."
+ @${ECHO_CMD}
+ @${ECHO_CMD} "======================================================="
+ @${ECHO_CMD}
+.endif
+
+pre-clean:
+ @(cd ${PORTSDIR}/devel/boehm-gc/ && ${MAKE} clean)
+
+.include <bsd.port.post.mk>
diff --git a/lang/neko/distinfo b/lang/neko/distinfo
new file mode 100644
index 000000000000..8a983c9c04e3
--- /dev/null
+++ b/lang/neko/distinfo
@@ -0,0 +1,3 @@
+MD5 (neko-1.6.0.tar.gz) = ea3c16e6d396b0840a9d5bb1ef57c7dd
+SHA256 (neko-1.6.0.tar.gz) = 75edb9b7f8ee13bf2e576dbdc03aee92adab8f2213b336c4058770826e7a47c8
+SIZE (neko-1.6.0.tar.gz) = 375528
diff --git a/lang/neko/pkg-descr b/lang/neko/pkg-descr
new file mode 100644
index 000000000000..d28330e19b53
--- /dev/null
+++ b/lang/neko/pkg-descr
@@ -0,0 +1,12 @@
+The Neko Programming Language
+
+Neko is a high-level dynamically typed programming language which can
+also be used as an embedded scripting language. It has been designed to
+provide a common runtime for several different languages.
+
+Neko is not only very easy to learn and use, but also has the flexibility
+of being able to extend the language with C libraries. You can even write
+generators from your own language to Neko and then use the Neko Runtime to
+compile, run, and access existing libraries.
+
+WWW: http://nekovm.org/
diff --git a/lang/neko/pkg-plist b/lang/neko/pkg-plist
new file mode 100644
index 000000000000..b44006fb69d2
--- /dev/null
+++ b/lang/neko/pkg-plist
@@ -0,0 +1,17 @@
+bin/neko
+bin/nekoc
+bin/nekotools
+lib/libneko.so
+lib/neko/std.ndll
+lib/neko/zlib.ndll
+%%APACHE13%%lib/neko/mod_neko.ndll
+%%APACHE22%%lib/neko/mod_neko2.ndll
+%%MYSQL4%%lib/neko/mysql.ndll
+%%SQLITE3%%lib/neko/sqlite.ndll
+%%PCRE%%lib/neko/regexp.ndll
+%%GTK2%%lib/neko/ui.ndll
+include/neko/neko.h
+include/neko/neko_mod.h
+include/neko/neko_vm.h
+@dirrm lib/neko
+@dirrm include/neko