From 5e5e25da5cb715d8a62348665f36cbfb3314baa6 Mon Sep 17 00:00:00 2001 From: kwm Date: Sat, 15 Jan 2011 18:52:14 +0000 Subject: When you find a old attempt to do a seed-webkitgtk3 port in devel/seed and you copy the lot over to devel/seed3 make sure you remove the CVS dirs. git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@15032 df743ca5-7f9a-e211-a948-0013205c9059 --- devel/seed/Makefile | 70 ------- devel/seed/distinfo | 3 - devel/seed/files/Seed.js | 203 --------------------- devel/seed/files/patch-libseed_seed-importer.c | 49 ----- .../files/patch-modules_gettext_seed-gettext.c | 27 --- devel/seed/files/patch-modules_os_seed-os.c | 95 ---------- devel/seed/pkg-descr | 7 - devel/seed/pkg-plist | 110 ----------- devel/seed3/Makefile | 70 +++++++ devel/seed3/distinfo | 3 + devel/seed3/files/Seed.js | 203 +++++++++++++++++++++ devel/seed3/files/patch-libseed_seed-importer.c | 49 +++++ .../files/patch-modules_gettext_seed-gettext.c | 27 +++ devel/seed3/files/patch-modules_os_seed-os.c | 95 ++++++++++ devel/seed3/pkg-descr | 7 + devel/seed3/pkg-plist | 110 +++++++++++ 16 files changed, 564 insertions(+), 564 deletions(-) delete mode 100644 devel/seed/Makefile delete mode 100644 devel/seed/distinfo delete mode 100644 devel/seed/files/Seed.js delete mode 100644 devel/seed/files/patch-libseed_seed-importer.c delete mode 100644 devel/seed/files/patch-modules_gettext_seed-gettext.c delete mode 100644 devel/seed/files/patch-modules_os_seed-os.c delete mode 100644 devel/seed/pkg-descr delete mode 100644 devel/seed/pkg-plist create mode 100644 devel/seed3/Makefile create mode 100644 devel/seed3/distinfo create mode 100644 devel/seed3/files/Seed.js create mode 100644 devel/seed3/files/patch-libseed_seed-importer.c create mode 100644 devel/seed3/files/patch-modules_gettext_seed-gettext.c create mode 100644 devel/seed3/files/patch-modules_os_seed-os.c create mode 100644 devel/seed3/pkg-descr create mode 100644 devel/seed3/pkg-plist (limited to 'devel') diff --git a/devel/seed/Makefile b/devel/seed/Makefile deleted file mode 100644 index 8cd7b979e..000000000 --- a/devel/seed/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# New ports collection makefile for: seed -# Date created: 19 July 2009 -# Whom: Alexander Logvinov -# -# $FreeBSD: ports/devel/seed/Makefile,v 1.11 2010/12/04 07:31:27 ade Exp $ -# $MCom: ports/devel/seed/Makefile,v 1.24 2010/09/19 15:06:42 kwm Exp $ -# -# NOTE: It may be necessary to update ${FILESDIR}/Seed.js on each release. -# To do that, just replace imports.searchPaths with "." and ".." elements. -# - -PORTNAME= seed -PORTVERSION= 2.31.91 -CATEGORIES= devel gnome -MASTER_SITES= GNOME -DIST_SUBDIR= gnome2 - -MAINTAINER= gnome@FreeBSD.org -COMMENT= GObject JavaScriptCore bridge - -BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/gnome-js-common.pc:${PORTSDIR}/devel/gnome-js-common -LIB_DEPENDS= ffi.5:${PORTSDIR}/devel/libffi \ - webkitgtk-3.0.0:${PORTSDIR}/www/webkit-gtk3 \ - girepository-1.0.1:${PORTSDIR}/devel/gobject-introspection \ - dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib \ - sqlite3.8:${PORTSDIR}/databases/sqlite3 \ - mpfr.4:${PORTSDIR}/math/mpfr - -USE_BZIP2= yes -GNU_CONFIGURE= yes -USE_GETTEXT= yes -USE_GNOME= gnomehack gtk20 intltool libxml2 -USE_LDCONFIG= yes -USE_AUTOTOOLS= libtool -USE_GMAKE= yes -CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ - LDFLAGS="-L${LOCALBASE}/lib" -CONFIGURE_ARGS+=--enable-gtk-doc=no --with-webkit=3.0 - -MAN1= seed.1 - -.include - -post-patch: - @${REINPLACE_CMD} -e 's|== x|= x|g' \ - ${WRKSRC}/configure - @${REINPLACE_CMD} -e 's|-ldl||g' \ - ${WRKSRC}/libseed/Makefile.in - @${REINPLACE_CMD} -e 's|reference||g' ${WRKSRC}/doc/Makefile.in -# @${FIND} ${WRKSRC}/examples -name Makefile.in -type f | ${XARGS} ${REINPLACE_CMD} -e \ -# 's|$$(datadir)/doc/seed/examples|${EXAMPLESDIR}|g' -#.if defined(NOPORTEXAMPLES) -# @${REINPLACE_CMD} -e 's|examples||g' \ -# ${WRKSRC}/Makefile.in -#.endif -.if defined(NOPORTDOCS) - @${REINPLACE_CMD} -e 's| install-seeddocDATA||g ; s|doc$$||g' \ - ${WRKSRC}/Makefile.in -.endif - -pre-build: - cd ${WRKSRC}/extensions && ${SETENV} ${MAKE_ENV} ${GMAKE} \ - ${MAKE_FLAGS} Makefile ${MAKE_ARGS} all - ${CP} ${WRKSRC}/extensions/Seed.js ${WRKSRC}/extensions/Seed.js.sav - ${CP} ${FILESDIR}/Seed.js ${WRKSRC}/extensions/Seed.js - -post-build: - ${CP} ${WRKSRC}/extensions/Seed.js.sav ${WRKSRC}/extensions/Seed.js - -.include diff --git a/devel/seed/distinfo b/devel/seed/distinfo deleted file mode 100644 index be392a77b..000000000 --- a/devel/seed/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -MD5 (gnome2/seed-2.31.91.tar.bz2) = 024aff0a69761f77bc346bbad1a2489b -SHA256 (gnome2/seed-2.31.91.tar.bz2) = 9e1da3adc6ed25b1778508ab67aecfe0923d1083f375b88137ea5f9ff57c22a3 -SIZE (gnome2/seed-2.31.91.tar.bz2) = 762875 diff --git a/devel/seed/files/Seed.js b/devel/seed/files/Seed.js deleted file mode 100644 index 9edb12c87..000000000 --- a/devel/seed/files/Seed.js +++ /dev/null @@ -1,203 +0,0 @@ -GLib = imports.gi.GLib; - -Seed.sprintf = function () -{ - if (typeof arguments == "undefined") { return null; } - if (arguments.length < 1) { return null; } - if (typeof arguments[0] != "string") { return null; } - if (typeof RegExp == "undefined") { return null; } - - var string = arguments[0]; - var exp = new RegExp(/(%([%]|(\-)?(\+|\x20)?(0)?(\d+)?(\.(\d)?)?([bcdfosxX])))/g); - var matches = new Array(); - var strings = new Array(); - var convCount = 0; - var stringPosStart = 0; - var stringPosEnd = 0; - var matchPosEnd = 0; - var newString = ''; - var match = null; - - while (match = exp.exec(string)) { - if (match[9]) { convCount += 1; } - - stringPosStart = matchPosEnd; - stringPosEnd = exp.lastIndex - match[0].length; - strings[strings.length] = string.substring(stringPosStart, stringPosEnd); - - matchPosEnd = exp.lastIndex; - matches[matches.length] = { - match: match[0], - left: match[3] ? true : false, - sign: match[4] || '', - pad: match[5] || ' ', - min: match[6] || 0, - precision: match[8], - code: match[9] || '%', - negative: parseInt(arguments[convCount]) < 0 ? true : false, - argument: String(arguments[convCount]) - }; - } - strings[strings.length] = string.substring(matchPosEnd); - - if (matches.length == 0) { return string; } - if ((arguments.length - 1) < convCount) { return null; } - - var code = null; - var match = null; - var i = null; - - for (i=0; i "); - if (item == "continue") - return false; - print(eval(item)); - } - catch (e) - { - print(e.name + " " + e.message); - } - return true; -} - - -Seed.glib_repl = function() -{ - GLib.idle_add(Seed.repl, null); -} - -Seed.thread_repl = function() -{ - GLib.thread_create_full(function() { while(Seed.repl()){} }, - null, 0, true); -} - -Seed.printf = function () { print(Seed.sprintf.apply(this, arguments)) }; - -if(!imports.searchPath || (imports.searchPath.length == 0)) -{ - imports.searchPath = [ ".", - ".." ]; - - if(Seed.argv.length > 1) - { - __script_path__ = GLib.path_get_dirname(Seed.argv[1]); - - try - { - if(!GLib.path_is_absolute(__script_path__)) - { - __script_path__ = GLib.build_filenamev([GLib.get_current_dir(), - __script_path__]); - } - - __script_path__ = imports.os.realpath(__script_path__); - - if(__script_path__ && __script_path__ != "") - imports.searchPath.push(__script_path__); - } - catch(e) - { - print(imports.JSON.stringify(e)); - } - } - - imports.searchPath.push("."); -} diff --git a/devel/seed/files/patch-libseed_seed-importer.c b/devel/seed/files/patch-libseed_seed-importer.c deleted file mode 100644 index ffce27254..000000000 --- a/devel/seed/files/patch-libseed_seed-importer.c +++ /dev/null @@ -1,49 +0,0 @@ ---- libseed/seed-importer.c.orig 2009-12-31 11:42:51.000000000 +0100 -+++ libseed/seed-importer.c 2010-01-02 02:12:09.000000000 +0100 -@@ -19,6 +19,8 @@ - - #include - #include -+#include -+#include - - #include "seed-private.h" - -@@ -636,8 +638,9 @@ seed_importer_handle_file (JSContextRef - JSValueRef js_file_dirname; - JSObjectRef global, c_global; - JSStringRef file_contents, file_name; -- gchar *contents, *walk, *file_path, *canonical, *absolute_path; -+ gchar *contents, *walk, *file_path, *canonical, *absolute_path, *normalp; - gchar *normalized_path; -+ gsize path_max; - - file_path = g_build_filename (dir, file, NULL); - canonical = seed_importer_canonicalize_path (file_path); -@@ -691,15 +694,24 @@ seed_importer_handle_file (JSContextRef - g_path_get_dirname (file_path), NULL); - } - -- normalized_path = realpath (absolute_path, NULL); -+#ifdef PATH_MAX -+ path_max = PATH_MAX; -+#else -+ path_max = pathconf (absolute_path, _PC_PATH_MAX); -+ if (path_max <= 0) -+ path_max = 4096; -+#endif -+ normalized_path = (gchar *) g_malloc (path_max); -+ normalp = realpath (absolute_path, normalized_path); - -- js_file_dirname = seed_value_from_string (ctx, normalized_path, NULL); -+ js_file_dirname = seed_value_from_string (ctx, normalp, NULL); - - seed_object_set_property (nctx, global, "__script_path__", js_file_dirname); - - g_hash_table_insert (file_imports, canonical, global); - g_free (file_path); - g_free (absolute_path); -+ g_free (normalized_path); - - JSEvaluateScript (nctx, file_contents, NULL, file_name, 0, exception); - diff --git a/devel/seed/files/patch-modules_gettext_seed-gettext.c b/devel/seed/files/patch-modules_gettext_seed-gettext.c deleted file mode 100644 index 71aa3b224..000000000 --- a/devel/seed/files/patch-modules_gettext_seed-gettext.c +++ /dev/null @@ -1,27 +0,0 @@ ---- modules/gettext/seed-gettext.c.orig 2009-12-31 05:42:51.000000000 -0500 -+++ modules/gettext/seed-gettext.c 2010-01-07 19:07:10.000000000 -0500 -@@ -312,12 +313,24 @@ seed_module_init(SeedEngine *local_eng) - DEFINE_ENUM_MEMBER(ns_ref, LC_MONETARY); - DEFINE_ENUM_MEMBER(ns_ref, LC_MESSAGES); - DEFINE_ENUM_MEMBER(ns_ref, LC_ALL); -+#ifdef LC_PAPER - DEFINE_ENUM_MEMBER(ns_ref, LC_PAPER); -+#endif -+#ifdef LC_NAME - DEFINE_ENUM_MEMBER(ns_ref, LC_NAME); -+#endif -+#ifdef LC_ADDRESS - DEFINE_ENUM_MEMBER(ns_ref, LC_ADDRESS); -+#endif -+#ifdef LC_TELEPHONE - DEFINE_ENUM_MEMBER(ns_ref, LC_TELEPHONE); -+#endif -+#ifdef LC_MEASUREMENT - DEFINE_ENUM_MEMBER(ns_ref, LC_MEASUREMENT); -+#endif -+#ifdef LC_IDENTIFICATION - DEFINE_ENUM_MEMBER(ns_ref, LC_IDENTIFICATION); -+#endif - DEFINE_ENUM_MEMBER(ns_ref, LC_CTYPE); - - return ns_ref; diff --git a/devel/seed/files/patch-modules_os_seed-os.c b/devel/seed/files/patch-modules_os_seed-os.c deleted file mode 100644 index 6d96d1478..000000000 --- a/devel/seed/files/patch-modules_os_seed-os.c +++ /dev/null @@ -1,95 +0,0 @@ ---- modules/os/seed-os.c.orig 2009-12-31 05:44:49.000000000 -0500 -+++ modules/os/seed-os.c 2010-01-07 19:01:05.000000000 -0500 -@@ -29,8 +29,15 @@ - - #include - #include -+#if defined(__FreeBSD__) -+#include -+#endif - - #include -+#include -+#include -+#include -+#include - - #include - -@@ -54,18 +61,32 @@ seed_os_realpath (SeedContext ctx, - const SeedValue arguments[], - SeedException * exception) - { -+ SeedValue sv; - gchar *arg; -+ gchar *resolved_path; - gchar *ret; -+ gsize path_max; - - if (argument_count != 1) - { - EXPECTED_EXCEPTION("os.realpath", "1 argument"); - } - arg = seed_value_to_string (ctx, arguments[0], exception); -- ret = realpath(arg, NULL); -+#ifdef PATH_MAX -+ path_max = PATH_MAX; -+#else -+ path_max = pathconf (arg, _PC_PATH_MAX); -+ if (path_max <= 0) -+ path_max = 4096; -+#endif -+ resolved_path = (gchar *) g_malloc (path_max); -+ ret = realpath(arg, resolved_path); - g_free (arg); - -- return seed_value_from_string (ctx, ret, exception); -+ sv = seed_value_from_string (ctx, ret, exception); -+ g_free (resolved_path); -+ -+ return sv; - } - - SeedValue -@@ -559,7 +580,12 @@ seed_os_unsetenv (SeedContext ctx, - } - - arg = seed_value_to_string (ctx, arguments[0], exception); -+#if __FreeBSD_version < 700000 -+ ret = 0; -+ unsetenv (arg); -+#else - ret = unsetenv (arg); -+#endif - g_free (arg); - - return seed_value_from_int (ctx, ret, exception); -@@ -702,6 +728,7 @@ seed_os_fdatasync (SeedContext ctx, - const SeedValue arguments[], - SeedException * exception) - { -+#if !defined(__FreeBSD__) - gint fd; - - if (argument_count != 1) -@@ -711,6 +738,10 @@ seed_os_fdatasync (SeedContext ctx, - fd = seed_value_to_int (ctx, arguments[0], exception); - - return seed_value_from_int (ctx, fdatasync (fd), exception); -+#else -+ errno = ENOSYS; -+ return seed_value_from_int (ctx, -1, exception); -+#endif - } - - SeedValue -@@ -1112,7 +1144,9 @@ seed_module_init(SeedEngine * eng) - #if defined (O_DIRECT) - OS_DEFINE_QUICK_ENUM (O_DIRECT); - #endif -+#if defined (O_DIRECTORY) - OS_DEFINE_QUICK_ENUM (O_DIRECTORY); -+#endif - OS_DEFINE_QUICK_ENUM (O_NOFOLLOW); - #if defined (O_NOATIME) - OS_DEFINE_QUICK_ENUM (O_NOATIME); diff --git a/devel/seed/pkg-descr b/devel/seed/pkg-descr deleted file mode 100644 index ffc081bb3..000000000 --- a/devel/seed/pkg-descr +++ /dev/null @@ -1,7 +0,0 @@ -Seed is a library and interpreter, dynamically bridging (through -GObjectIntrospection) the WebKit JavaScriptCore engine, with the GNOME -platform. Seed serves as something which enables you to write standalone -applications in JavaScript, or easily enable your application to be extensible -in JavaScript. - -WWW: http://live.gnome.org/Seed diff --git a/devel/seed/pkg-plist b/devel/seed/pkg-plist deleted file mode 100644 index db20734ff..000000000 --- a/devel/seed/pkg-plist +++ /dev/null @@ -1,110 +0,0 @@ -bin/seed -include/seed/seed-debug.h -include/seed/seed-module.h -include/seed/seed.h -lib/libseed.a -lib/libseed.la -lib/libseed.so -lib/libseed.so.0 -lib/seed/libseed_DynamicObject.a -lib/seed/libseed_DynamicObject.la -lib/seed/libseed_DynamicObject.so -lib/seed/libseed_cairo.a -lib/seed/libseed_cairo.la -lib/seed/libseed_cairo.so -lib/seed/libseed_canvas.a -lib/seed/libseed_canvas.la -lib/seed/libseed_canvas.so -lib/seed/libseed_dbusnative.a -lib/seed/libseed_dbusnative.la -lib/seed/libseed_dbusnative.so -lib/seed/libseed_example.a -lib/seed/libseed_example.la -lib/seed/libseed_example.so -lib/seed/libseed_ffi.a -lib/seed/libseed_ffi.la -lib/seed/libseed_ffi.so -lib/seed/libseed_gettext.a -lib/seed/libseed_gettext.la -lib/seed/libseed_gettext.so -lib/seed/libseed_gtkbuilder.a -lib/seed/libseed_gtkbuilder.la -lib/seed/libseed_gtkbuilder.so -lib/seed/libseed_libxml.a -lib/seed/libseed_libxml.la -lib/seed/libseed_libxml.so -lib/seed/libseed_mpfr.a -lib/seed/libseed_mpfr.la -lib/seed/libseed_mpfr.so -lib/seed/libseed_multiprocessing.a -lib/seed/libseed_multiprocessing.la -lib/seed/libseed_multiprocessing.so -lib/seed/libseed_os.a -lib/seed/libseed_os.la -lib/seed/libseed_os.so -lib/seed/libseed_readline.a -lib/seed/libseed_readline.la -lib/seed/libseed_readline.so -lib/seed/libseed_sandbox.a -lib/seed/libseed_sandbox.la -lib/seed/libseed_sandbox.so -lib/seed/libseed_sqlite.a -lib/seed/libseed_sqlite.la -lib/seed/libseed_sqlite.so -libdata/pkgconfig/seed.pc -%%DATADIR%%/dbus.js -%%DATADIR%%/extensions/Clutter.js -%%DATADIR%%/extensions/GObject.js -%%DATADIR%%/extensions/Gio.js -%%DATADIR%%/extensions/Gst.js -%%DATADIR%%/extensions/Gtk.js -%%DATADIR%%/extensions/Seed.js -%%DATADIR%%/extensions/xml.js -%%DATADIR%%/lang.js -%%DATADIR%%/repl.js -%%PORTDOCS%%%%DOCSDIR%%/AUTHORS -%%PORTDOCS%%%%DOCSDIR%%/COPYING -%%PORTDOCS%%%%DOCSDIR%%/ChangeLog -%%PORTDOCS%%%%DOCSDIR%%/INSTALL -%%PORTDOCS%%%%DOCSDIR%%/README -%%PORTDOCS%%%%DOCSDIR%%/conventions.html -%%PORTDOCS%%%%DOCSDIR%%/index.html -%%PORTDOCS%%%%DOCSDIR%%/mapping/enum-mapping.png -%%PORTDOCS%%%%DOCSDIR%%/mapping/mapping.html -%%PORTDOCS%%%%DOCSDIR%%/modules/canvas.html -%%PORTDOCS%%%%DOCSDIR%%/modules/gtkbuilder/html/gtkbuilder-funcs.xml -%%PORTDOCS%%%%DOCSDIR%%/modules/multiprocessing.html -%%PORTDOCS%%%%DOCSDIR%%/modules/readline/html/readline-funcs.xml -%%PORTDOCS%%%%DOCSDIR%%/modules/sandbox/html/sandbox-funcs.xml -%%PORTDOCS%%%%DOCSDIR%%/modules/sqlite/html/sqlite-funcs.xml -%%PORTDOCS%%%%DOCSDIR%%/runtime.html -%%PORTDOCS%%%%DOCSDIR%%/sh.css -%%PORTDOCS%%%%DOCSDIR%%/sh.js -%%PORTDOCS%%%%DOCSDIR%%/sh_js.js -%%PORTDOCS%%%%DOCSDIR%%/style.css -%%PORTDOCS%%%%DOCSDIR%%/tutorial/1.js -%%PORTDOCS%%%%DOCSDIR%%/tutorial/1.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/2.js -%%PORTDOCS%%%%DOCSDIR%%/tutorial/2.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/3.js -%%PORTDOCS%%%%DOCSDIR%%/tutorial/3.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/4.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/packing.png -%%PORTDOCS%%%%DOCSDIR%%/tutorial/packing.svg -%%PORTDOCS%%%%DOCSDIR%%/tutorial/tutorial.html -%%PORTDOCS%%@dirrm %%DOCSDIR%%/mapping -%%PORTDOCS%%@dirrm %%DOCSDIR%%/modules/gtkbuilder/html -%%PORTDOCS%%@dirrm %%DOCSDIR%%/modules/gtkbuilder -%%PORTDOCS%%@dirrm %%DOCSDIR%%/modules/readline/html -%%PORTDOCS%%@dirrm %%DOCSDIR%%/modules/readline -%%PORTDOCS%%@dirrm %%DOCSDIR%%/modules/sandbox/html -%%PORTDOCS%%@dirrm %%DOCSDIR%%/modules/sandbox -%%PORTDOCS%%@dirrm %%DOCSDIR%%/modules/sqlite/html -%%PORTDOCS%%@dirrm %%DOCSDIR%%/modules/sqlite -%%PORTDOCS%%@dirrm %%DOCSDIR%%/modules -%%PORTDOCS%%@dirrm %%DOCSDIR%%/tutorial -%%PORTDOCS%%@dirrm %%DOCSDIR%% -@dirrm include/seed -@dirrm lib/seed -@dirrm %%DATADIR%%/extensions -@dirrm %%DATADIR%% diff --git a/devel/seed3/Makefile b/devel/seed3/Makefile new file mode 100644 index 000000000..d6592f159 --- /dev/null +++ b/devel/seed3/Makefile @@ -0,0 +1,70 @@ +# New ports collection makefile for: seed +# Date created: 19 July 2009 +# Whom: Alexander Logvinov +# +# $FreeBSD: ports/devel/seed/Makefile,v 1.11 2010/12/04 07:31:27 ade Exp $ +# $MCom: ports/devel/seed/Makefile,v 1.26 2011/01/15 18:47:23 kwm Exp $ +# +# NOTE: It may be necessary to update ${FILESDIR}/Seed.js on each release. +# To do that, just replace imports.searchPaths with "." and ".." elements. +# + +PORTNAME= seed +PORTVERSION= 2.31.91 +CATEGORIES= devel gnome +MASTER_SITES= GNOME +DIST_SUBDIR= gnome2 + +MAINTAINER= gnome@FreeBSD.org +COMMENT= GObject JavaScriptCore bridge + +BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/gnome-js-common.pc:${PORTSDIR}/devel/gnome-js-common +LIB_DEPENDS= ffi.5:${PORTSDIR}/devel/libffi \ + webkitgtk-3.0.0:${PORTSDIR}/www/webkit-gtk3 \ + girepository-1.0.1:${PORTSDIR}/devel/gobject-introspection \ + dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib \ + sqlite3.8:${PORTSDIR}/databases/sqlite3 \ + mpfr.4:${PORTSDIR}/math/mpfr + +USE_BZIP2= yes +GNU_CONFIGURE= yes +USE_GETTEXT= yes +USE_GNOME= gnomehack gtk20 intltool libxml2 +USE_LDCONFIG= yes +USE_AUTOTOOLS= libtool +USE_GMAKE= yes +CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ + LDFLAGS="-L${LOCALBASE}/lib" +CONFIGURE_ARGS+=--enable-gtk-doc=no --with-webkit=3.0 + +MAN1= seed.1 + +.include + +post-patch: + @${REINPLACE_CMD} -e 's|== x|= x|g' \ + ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's|-ldl||g' \ + ${WRKSRC}/libseed/Makefile.in + @${REINPLACE_CMD} -e 's|reference||g' ${WRKSRC}/doc/Makefile.in +# @${FIND} ${WRKSRC}/examples -name Makefile.in -type f | ${XARGS} ${REINPLACE_CMD} -e \ +# 's|$$(datadir)/doc/seed/examples|${EXAMPLESDIR}|g' +#.if defined(NOPORTEXAMPLES) +# @${REINPLACE_CMD} -e 's|examples||g' \ +# ${WRKSRC}/Makefile.in +#.endif +.if defined(NOPORTDOCS) + @${REINPLACE_CMD} -e 's| install-seeddocDATA||g ; s|doc$$||g' \ + ${WRKSRC}/Makefile.in +.endif + +pre-build: + cd ${WRKSRC}/extensions && ${SETENV} ${MAKE_ENV} ${GMAKE} \ + ${MAKE_FLAGS} Makefile ${MAKE_ARGS} all + ${CP} ${WRKSRC}/extensions/Seed.js ${WRKSRC}/extensions/Seed.js.sav + ${CP} ${FILESDIR}/Seed.js ${WRKSRC}/extensions/Seed.js + +post-build: + ${CP} ${WRKSRC}/extensions/Seed.js.sav ${WRKSRC}/extensions/Seed.js + +.include diff --git a/devel/seed3/distinfo b/devel/seed3/distinfo new file mode 100644 index 000000000..be392a77b --- /dev/null +++ b/devel/seed3/distinfo @@ -0,0 +1,3 @@ +MD5 (gnome2/seed-2.31.91.tar.bz2) = 024aff0a69761f77bc346bbad1a2489b +SHA256 (gnome2/seed-2.31.91.tar.bz2) = 9e1da3adc6ed25b1778508ab67aecfe0923d1083f375b88137ea5f9ff57c22a3 +SIZE (gnome2/seed-2.31.91.tar.bz2) = 762875 diff --git a/devel/seed3/files/Seed.js b/devel/seed3/files/Seed.js new file mode 100644 index 000000000..9edb12c87 --- /dev/null +++ b/devel/seed3/files/Seed.js @@ -0,0 +1,203 @@ +GLib = imports.gi.GLib; + +Seed.sprintf = function () +{ + if (typeof arguments == "undefined") { return null; } + if (arguments.length < 1) { return null; } + if (typeof arguments[0] != "string") { return null; } + if (typeof RegExp == "undefined") { return null; } + + var string = arguments[0]; + var exp = new RegExp(/(%([%]|(\-)?(\+|\x20)?(0)?(\d+)?(\.(\d)?)?([bcdfosxX])))/g); + var matches = new Array(); + var strings = new Array(); + var convCount = 0; + var stringPosStart = 0; + var stringPosEnd = 0; + var matchPosEnd = 0; + var newString = ''; + var match = null; + + while (match = exp.exec(string)) { + if (match[9]) { convCount += 1; } + + stringPosStart = matchPosEnd; + stringPosEnd = exp.lastIndex - match[0].length; + strings[strings.length] = string.substring(stringPosStart, stringPosEnd); + + matchPosEnd = exp.lastIndex; + matches[matches.length] = { + match: match[0], + left: match[3] ? true : false, + sign: match[4] || '', + pad: match[5] || ' ', + min: match[6] || 0, + precision: match[8], + code: match[9] || '%', + negative: parseInt(arguments[convCount]) < 0 ? true : false, + argument: String(arguments[convCount]) + }; + } + strings[strings.length] = string.substring(matchPosEnd); + + if (matches.length == 0) { return string; } + if ((arguments.length - 1) < convCount) { return null; } + + var code = null; + var match = null; + var i = null; + + for (i=0; i "); + if (item == "continue") + return false; + print(eval(item)); + } + catch (e) + { + print(e.name + " " + e.message); + } + return true; +} + + +Seed.glib_repl = function() +{ + GLib.idle_add(Seed.repl, null); +} + +Seed.thread_repl = function() +{ + GLib.thread_create_full(function() { while(Seed.repl()){} }, + null, 0, true); +} + +Seed.printf = function () { print(Seed.sprintf.apply(this, arguments)) }; + +if(!imports.searchPath || (imports.searchPath.length == 0)) +{ + imports.searchPath = [ ".", + ".." ]; + + if(Seed.argv.length > 1) + { + __script_path__ = GLib.path_get_dirname(Seed.argv[1]); + + try + { + if(!GLib.path_is_absolute(__script_path__)) + { + __script_path__ = GLib.build_filenamev([GLib.get_current_dir(), + __script_path__]); + } + + __script_path__ = imports.os.realpath(__script_path__); + + if(__script_path__ && __script_path__ != "") + imports.searchPath.push(__script_path__); + } + catch(e) + { + print(imports.JSON.stringify(e)); + } + } + + imports.searchPath.push("."); +} diff --git a/devel/seed3/files/patch-libseed_seed-importer.c b/devel/seed3/files/patch-libseed_seed-importer.c new file mode 100644 index 000000000..ffce27254 --- /dev/null +++ b/devel/seed3/files/patch-libseed_seed-importer.c @@ -0,0 +1,49 @@ +--- libseed/seed-importer.c.orig 2009-12-31 11:42:51.000000000 +0100 ++++ libseed/seed-importer.c 2010-01-02 02:12:09.000000000 +0100 +@@ -19,6 +19,8 @@ + + #include + #include ++#include ++#include + + #include "seed-private.h" + +@@ -636,8 +638,9 @@ seed_importer_handle_file (JSContextRef + JSValueRef js_file_dirname; + JSObjectRef global, c_global; + JSStringRef file_contents, file_name; +- gchar *contents, *walk, *file_path, *canonical, *absolute_path; ++ gchar *contents, *walk, *file_path, *canonical, *absolute_path, *normalp; + gchar *normalized_path; ++ gsize path_max; + + file_path = g_build_filename (dir, file, NULL); + canonical = seed_importer_canonicalize_path (file_path); +@@ -691,15 +694,24 @@ seed_importer_handle_file (JSContextRef + g_path_get_dirname (file_path), NULL); + } + +- normalized_path = realpath (absolute_path, NULL); ++#ifdef PATH_MAX ++ path_max = PATH_MAX; ++#else ++ path_max = pathconf (absolute_path, _PC_PATH_MAX); ++ if (path_max <= 0) ++ path_max = 4096; ++#endif ++ normalized_path = (gchar *) g_malloc (path_max); ++ normalp = realpath (absolute_path, normalized_path); + +- js_file_dirname = seed_value_from_string (ctx, normalized_path, NULL); ++ js_file_dirname = seed_value_from_string (ctx, normalp, NULL); + + seed_object_set_property (nctx, global, "__script_path__", js_file_dirname); + + g_hash_table_insert (file_imports, canonical, global); + g_free (file_path); + g_free (absolute_path); ++ g_free (normalized_path); + + JSEvaluateScript (nctx, file_contents, NULL, file_name, 0, exception); + diff --git a/devel/seed3/files/patch-modules_gettext_seed-gettext.c b/devel/seed3/files/patch-modules_gettext_seed-gettext.c new file mode 100644 index 000000000..71aa3b224 --- /dev/null +++ b/devel/seed3/files/patch-modules_gettext_seed-gettext.c @@ -0,0 +1,27 @@ +--- modules/gettext/seed-gettext.c.orig 2009-12-31 05:42:51.000000000 -0500 ++++ modules/gettext/seed-gettext.c 2010-01-07 19:07:10.000000000 -0500 +@@ -312,12 +313,24 @@ seed_module_init(SeedEngine *local_eng) + DEFINE_ENUM_MEMBER(ns_ref, LC_MONETARY); + DEFINE_ENUM_MEMBER(ns_ref, LC_MESSAGES); + DEFINE_ENUM_MEMBER(ns_ref, LC_ALL); ++#ifdef LC_PAPER + DEFINE_ENUM_MEMBER(ns_ref, LC_PAPER); ++#endif ++#ifdef LC_NAME + DEFINE_ENUM_MEMBER(ns_ref, LC_NAME); ++#endif ++#ifdef LC_ADDRESS + DEFINE_ENUM_MEMBER(ns_ref, LC_ADDRESS); ++#endif ++#ifdef LC_TELEPHONE + DEFINE_ENUM_MEMBER(ns_ref, LC_TELEPHONE); ++#endif ++#ifdef LC_MEASUREMENT + DEFINE_ENUM_MEMBER(ns_ref, LC_MEASUREMENT); ++#endif ++#ifdef LC_IDENTIFICATION + DEFINE_ENUM_MEMBER(ns_ref, LC_IDENTIFICATION); ++#endif + DEFINE_ENUM_MEMBER(ns_ref, LC_CTYPE); + + return ns_ref; diff --git a/devel/seed3/files/patch-modules_os_seed-os.c b/devel/seed3/files/patch-modules_os_seed-os.c new file mode 100644 index 000000000..6d96d1478 --- /dev/null +++ b/devel/seed3/files/patch-modules_os_seed-os.c @@ -0,0 +1,95 @@ +--- modules/os/seed-os.c.orig 2009-12-31 05:44:49.000000000 -0500 ++++ modules/os/seed-os.c 2010-01-07 19:01:05.000000000 -0500 +@@ -29,8 +29,15 @@ + + #include + #include ++#if defined(__FreeBSD__) ++#include ++#endif + + #include ++#include ++#include ++#include ++#include + + #include + +@@ -54,18 +61,32 @@ seed_os_realpath (SeedContext ctx, + const SeedValue arguments[], + SeedException * exception) + { ++ SeedValue sv; + gchar *arg; ++ gchar *resolved_path; + gchar *ret; ++ gsize path_max; + + if (argument_count != 1) + { + EXPECTED_EXCEPTION("os.realpath", "1 argument"); + } + arg = seed_value_to_string (ctx, arguments[0], exception); +- ret = realpath(arg, NULL); ++#ifdef PATH_MAX ++ path_max = PATH_MAX; ++#else ++ path_max = pathconf (arg, _PC_PATH_MAX); ++ if (path_max <= 0) ++ path_max = 4096; ++#endif ++ resolved_path = (gchar *) g_malloc (path_max); ++ ret = realpath(arg, resolved_path); + g_free (arg); + +- return seed_value_from_string (ctx, ret, exception); ++ sv = seed_value_from_string (ctx, ret, exception); ++ g_free (resolved_path); ++ ++ return sv; + } + + SeedValue +@@ -559,7 +580,12 @@ seed_os_unsetenv (SeedContext ctx, + } + + arg = seed_value_to_string (ctx, arguments[0], exception); ++#if __FreeBSD_version < 700000 ++ ret = 0; ++ unsetenv (arg); ++#else + ret = unsetenv (arg); ++#endif + g_free (arg); + + return seed_value_from_int (ctx, ret, exception); +@@ -702,6 +728,7 @@ seed_os_fdatasync (SeedContext ctx, + const SeedValue arguments[], + SeedException * exception) + { ++#if !defined(__FreeBSD__) + gint fd; + + if (argument_count != 1) +@@ -711,6 +738,10 @@ seed_os_fdatasync (SeedContext ctx, + fd = seed_value_to_int (ctx, arguments[0], exception); + + return seed_value_from_int (ctx, fdatasync (fd), exception); ++#else ++ errno = ENOSYS; ++ return seed_value_from_int (ctx, -1, exception); ++#endif + } + + SeedValue +@@ -1112,7 +1144,9 @@ seed_module_init(SeedEngine * eng) + #if defined (O_DIRECT) + OS_DEFINE_QUICK_ENUM (O_DIRECT); + #endif ++#if defined (O_DIRECTORY) + OS_DEFINE_QUICK_ENUM (O_DIRECTORY); ++#endif + OS_DEFINE_QUICK_ENUM (O_NOFOLLOW); + #if defined (O_NOATIME) + OS_DEFINE_QUICK_ENUM (O_NOATIME); diff --git a/devel/seed3/pkg-descr b/devel/seed3/pkg-descr new file mode 100644 index 000000000..ffc081bb3 --- /dev/null +++ b/devel/seed3/pkg-descr @@ -0,0 +1,7 @@ +Seed is a library and interpreter, dynamically bridging (through +GObjectIntrospection) the WebKit JavaScriptCore engine, with the GNOME +platform. Seed serves as something which enables you to write standalone +applications in JavaScript, or easily enable your application to be extensible +in JavaScript. + +WWW: http://live.gnome.org/Seed diff --git a/devel/seed3/pkg-plist b/devel/seed3/pkg-plist new file mode 100644 index 000000000..db20734ff --- /dev/null +++ b/devel/seed3/pkg-plist @@ -0,0 +1,110 @@ +bin/seed +include/seed/seed-debug.h +include/seed/seed-module.h +include/seed/seed.h +lib/libseed.a +lib/libseed.la +lib/libseed.so +lib/libseed.so.0 +lib/seed/libseed_DynamicObject.a +lib/seed/libseed_DynamicObject.la +lib/seed/libseed_DynamicObject.so +lib/seed/libseed_cairo.a +lib/seed/libseed_cairo.la +lib/seed/libseed_cairo.so +lib/seed/libseed_canvas.a +lib/seed/libseed_canvas.la +lib/seed/libseed_canvas.so +lib/seed/libseed_dbusnative.a +lib/seed/libseed_dbusnative.la +lib/seed/libseed_dbusnative.so +lib/seed/libseed_example.a +lib/seed/libseed_example.la +lib/seed/libseed_example.so +lib/seed/libseed_ffi.a +lib/seed/libseed_ffi.la +lib/seed/libseed_ffi.so +lib/seed/libseed_gettext.a +lib/seed/libseed_gettext.la +lib/seed/libseed_gettext.so +lib/seed/libseed_gtkbuilder.a +lib/seed/libseed_gtkbuilder.la +lib/seed/libseed_gtkbuilder.so +lib/seed/libseed_libxml.a +lib/seed/libseed_libxml.la +lib/seed/libseed_libxml.so +lib/seed/libseed_mpfr.a +lib/seed/libseed_mpfr.la +lib/seed/libseed_mpfr.so +lib/seed/libseed_multiprocessing.a +lib/seed/libseed_multiprocessing.la +lib/seed/libseed_multiprocessing.so +lib/seed/libseed_os.a +lib/seed/libseed_os.la +lib/seed/libseed_os.so +lib/seed/libseed_readline.a +lib/seed/libseed_readline.la +lib/seed/libseed_readline.so +lib/seed/libseed_sandbox.a +lib/seed/libseed_sandbox.la +lib/seed/libseed_sandbox.so +lib/seed/libseed_sqlite.a +lib/seed/libseed_sqlite.la +lib/seed/libseed_sqlite.so +libdata/pkgconfig/seed.pc +%%DATADIR%%/dbus.js +%%DATADIR%%/extensions/Clutter.js +%%DATADIR%%/extensions/GObject.js +%%DATADIR%%/extensions/Gio.js +%%DATADIR%%/extensions/Gst.js +%%DATADIR%%/extensions/Gtk.js +%%DATADIR%%/extensions/Seed.js +%%DATADIR%%/extensions/xml.js +%%DATADIR%%/lang.js +%%DATADIR%%/repl.js +%%PORTDOCS%%%%DOCSDIR%%/AUTHORS +%%PORTDOCS%%%%DOCSDIR%%/COPYING +%%PORTDOCS%%%%DOCSDIR%%/ChangeLog +%%PORTDOCS%%%%DOCSDIR%%/INSTALL +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/conventions.html +%%PORTDOCS%%%%DOCSDIR%%/index.html +%%PORTDOCS%%%%DOCSDIR%%/mapping/enum-mapping.png +%%PORTDOCS%%%%DOCSDIR%%/mapping/mapping.html +%%PORTDOCS%%%%DOCSDIR%%/modules/canvas.html +%%PORTDOCS%%%%DOCSDIR%%/modules/gtkbuilder/html/gtkbuilder-funcs.xml +%%PORTDOCS%%%%DOCSDIR%%/modules/multiprocessing.html +%%PORTDOCS%%%%DOCSDIR%%/modules/readline/html/readline-funcs.xml +%%PORTDOCS%%%%DOCSDIR%%/modules/sandbox/html/sandbox-funcs.xml +%%PORTDOCS%%%%DOCSDIR%%/modules/sqlite/html/sqlite-funcs.xml +%%PORTDOCS%%%%DOCSDIR%%/runtime.html +%%PORTDOCS%%%%DOCSDIR%%/sh.css +%%PORTDOCS%%%%DOCSDIR%%/sh.js +%%PORTDOCS%%%%DOCSDIR%%/sh_js.js +%%PORTDOCS%%%%DOCSDIR%%/style.css +%%PORTDOCS%%%%DOCSDIR%%/tutorial/1.js +%%PORTDOCS%%%%DOCSDIR%%/tutorial/1.png +%%PORTDOCS%%%%DOCSDIR%%/tutorial/2.js +%%PORTDOCS%%%%DOCSDIR%%/tutorial/2.png +%%PORTDOCS%%%%DOCSDIR%%/tutorial/3.js +%%PORTDOCS%%%%DOCSDIR%%/tutorial/3.png +%%PORTDOCS%%%%DOCSDIR%%/tutorial/4.png +%%PORTDOCS%%%%DOCSDIR%%/tutorial/packing.png +%%PORTDOCS%%%%DOCSDIR%%/tutorial/packing.svg +%%PORTDOCS%%%%DOCSDIR%%/tutorial/tutorial.html +%%PORTDOCS%%@dirrm %%DOCSDIR%%/mapping +%%PORTDOCS%%@dirrm %%DOCSDIR%%/modules/gtkbuilder/html +%%PORTDOCS%%@dirrm %%DOCSDIR%%/modules/gtkbuilder +%%PORTDOCS%%@dirrm %%DOCSDIR%%/modules/readline/html +%%PORTDOCS%%@dirrm %%DOCSDIR%%/modules/readline +%%PORTDOCS%%@dirrm %%DOCSDIR%%/modules/sandbox/html +%%PORTDOCS%%@dirrm %%DOCSDIR%%/modules/sandbox +%%PORTDOCS%%@dirrm %%DOCSDIR%%/modules/sqlite/html +%%PORTDOCS%%@dirrm %%DOCSDIR%%/modules/sqlite +%%PORTDOCS%%@dirrm %%DOCSDIR%%/modules +%%PORTDOCS%%@dirrm %%DOCSDIR%%/tutorial +%%PORTDOCS%%@dirrm %%DOCSDIR%% +@dirrm include/seed +@dirrm lib/seed +@dirrm %%DATADIR%%/extensions +@dirrm %%DATADIR%% -- cgit v1.2.3