import seed 3.0.0

Seed is a library and interpreter, dynamically bridging (through
gobject-introspection) the WebKit JavaScriptCore engine with the GObject
type system. In a more concrete sense, Seed enables you to immediately
write applications around a significant portion of the GNOME platform,
and easily embed JavaScript as a scripting language in your GObject
library.

ok aja@
This commit is contained in:
jasper 2011-05-13 09:59:35 +00:00
parent 82a1ce94a8
commit 195cecc142
12 changed files with 462 additions and 0 deletions

58
x11/gnome/seed/Makefile Normal file
View File

@ -0,0 +1,58 @@
# $OpenBSD: Makefile,v 1.1.1.1 2011/05/13 09:59:35 jasper Exp $
COMMENT= GObject JavaScriptCore bridge
GNOME_PROJECT= seed
GNOME_VERSION= 3.0.0
SHARED_LIBS += seed-gtk3 0.0 # 0.0
CATEGORIES= devel www
# Seed: LGPLv3
# Examples: BSD
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
HOMEPAGE= http://live.gnome.org/Seed
MODULES= devel/gettext \
x11/gnome
WANTLIB += GL ICE SM X11 Xau Xcomposite Xcursor Xdamage Xdmcp
WANTLIB += Xext Xfixes Xi Xinerama Xrandr Xrender Xt Xxf86vm atk-1.0
WANTLIB += c cairo cairo-gobject dbus-1 dbus-glib-1 drm enchant
WANTLIB += expat ffi fontconfig freetype gailutil-3 gdk-3 gdk_pixbuf-2.0
WANTLIB += gio-2.0 girepository-1.0 glib-2.0 gmodule-2.0 gmp gobject-2.0
WANTLIB += gstapp-0.10 gstbase-0.10 gstinterfaces-0.10 gstpbutils-0.10
WANTLIB += gstreamer-0.10 gstvideo-0.10 gthread-2.0 gtk-3 icudata
WANTLIB += icui18n icuuc jpeg m mpfr pango-1.0 pangocairo-1.0
WANTLIB += pangoft2-1.0 pcre pixman-1 png pthread pthread-stubs
WANTLIB += readline soup-2.4 sqlite3 stdc++ util webkitgtk-3.0
WANTLIB += xcb xcb-render xcb-shm xml2 xslt z
LIB_DEPENDS= devel/gobject-introspection \
devel/mpfr \
www/webkit,gtk3
CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
--enable-readline-module \
--enable-multiprocessing-module \
--enable-sqlite-module \
--enable-example-module \
--enable-dbus-module \
--enable-os-module \
--enable-ffi-module \
--enable-libxml-module \
--enable-gtkbuilder-module \
--enable-cairo-module \
--enable-gettext-module \
--enable-mpfr-module
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
REGRESS_IS_INTERACTIVE= x11
REGRESS_DEPENDS= ${BASE_PKGPATH}
.include <bsd.port.mk>

5
x11/gnome/seed/distinfo Normal file
View File

@ -0,0 +1,5 @@
MD5 (gnome/seed-3.0.0.tar.bz2) = zYHTPNuXvQr6KNvm6XM1XQ==
RMD160 (gnome/seed-3.0.0.tar.bz2) = zNYhvctPVfrbI+XBPKzIKljXWHg=
SHA1 (gnome/seed-3.0.0.tar.bz2) = A+d9j4Fqr6Gsp8UH7GvqO4llPAg=
SHA256 (gnome/seed-3.0.0.tar.bz2) = x++ODHz+Yzxr+b/BOrVkWPBT37EreEx1zFDfp8+Ci+Y=
SIZE (gnome/seed-3.0.0.tar.bz2) = 772779

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-configure,v 1.1.1.1 2011/05/13 09:59:35 jasper Exp $
--- configure.orig Fri May 13 10:56:00 2011
+++ configure Fri May 13 10:56:45 2011
@@ -14172,8 +14172,8 @@ for ac_lib in '' mpfr; do
if test -z "$ac_lib"; then
ac_res="none required"
else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $other_LIBS $ac_func_search_save_LIBS"
+ ac_res="-l$ac_lib -lgmp"
+ LIBS="-l$ac_lib -lgmp $other_LIBS $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_search_mpfr_init2=$ac_res

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-libseed_Makefile_in,v 1.1.1.1 2011/05/13 09:59:35 jasper Exp $
--- libseed/Makefile.in.orig Fri May 13 10:05:55 2011
+++ libseed/Makefile.in Fri May 13 10:06:05 2011
@@ -368,7 +368,7 @@ libseed@SEED_GTK_VERSION@_la_LIBADD = \
$(WEBKIT_LIBS) \
$(SEED_PROFILE_LIBS) \
$(SEED_OSX_LIBS) \
- $(FFI_LIBS) -ldl
+ $(FFI_LIBS)
seedheaders_HEADERS = seed.h seed-debug.h seed-module.h
seedheadersdir = $(pkgincludedir)@SEED_GTK_VERSION@

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-libseed_seed-closure_c,v 1.1.1.1 2011/05/13 09:59:35 jasper Exp $
--- libseed/seed-closure.c.orig Fri May 13 10:02:01 2011
+++ libseed/seed-closure.c Fri May 13 10:02:13 2011
@@ -18,6 +18,7 @@
*/
#include "seed-private.h"
+#include <sys/types.h>
#include <sys/mman.h>
JSClassRef seed_native_callback_class;

View File

@ -0,0 +1,54 @@
$OpenBSD: patch-libseed_seed-importer_c,v 1.1.1.1 2011/05/13 09:59:35 jasper Exp $
Fix importing .js files
From FreeBSD's patch-libseed_seed-importer.c
--- libseed/seed-importer.c.orig Sat Apr 2 04:46:08 2011
+++ libseed/seed-importer.c Fri May 13 11:27:20 2011
@@ -19,6 +19,8 @@
#include <gio/gio.h>
#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
#include "seed-private.h"
@@ -656,8 +658,9 @@ seed_importer_handle_file (JSContextRef ctx,
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);
@@ -711,15 +714,24 @@ seed_importer_handle_file (JSContextRef ctx,
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);

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-libseed_seed-private_h,v 1.1.1.1 2011/05/13 09:59:35 jasper Exp $
--- libseed/seed-private.h.orig Fri May 13 10:03:20 2011
+++ libseed/seed-private.h Fri May 13 10:05:11 2011
@@ -20,8 +20,10 @@
#ifndef _SEED_PRIVATE_H
#define _SEED_PRIVATE_H
-#include <stdlib.h>
#include <sys/types.h>
+#include <pthread.h>
+
+#include <stdlib.h>
#include <JavaScriptCore/JavaScript.h>
#include <glib.h>
#include <glib-object.h>

View File

@ -0,0 +1,31 @@
$OpenBSD: patch-modules_gettext_seed-gettext_c,v 1.1.1.1 2011/05/13 09:59:35 jasper Exp $
Fix build if various locale defines are missing.
--- modules/gettext/seed-gettext.c.orig Tue Feb 22 23:44:01 2011
+++ modules/gettext/seed-gettext.c Fri May 13 10:37:48 2011
@@ -313,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;

View File

@ -0,0 +1,104 @@
$OpenBSD: patch-modules_os_seed-os_c,v 1.1.1.1 2011/05/13 09:59:35 jasper Exp $
Port to FreeBSD and OpenBSD.
Based on FreeBSD's patch-modules_os_seed-os.c
--- modules/os/seed-os.c.orig Tue Feb 22 23:44:01 2011
+++ modules/os/seed-os.c Fri May 13 10:36:23 2011
@@ -29,8 +29,19 @@
#include <sys/stat.h>
#include <sys/utsname.h>
+#if defined(__FreeBSD__) || defined(__OpenBSD__)
+#include <sys/param.h>
+#endif
#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <termios.h>
+#if defined(__OpenBSD__)
+#include <util.h>
+#else
+#include <libutil.h>
+#endif
+#include <unistd.h>
#include <fcntl.h>
@@ -54,18 +65,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 +584,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 +732,7 @@ seed_os_fdatasync (SeedContext ctx,
const SeedValue arguments[],
SeedException * exception)
{
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
gint fd;
if (argument_count != 1)
@@ -711,6 +742,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
@@ -1113,7 +1148,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);

6
x11/gnome/seed/pkg/DESCR Normal file
View File

@ -0,0 +1,6 @@
Seed is a library and interpreter, dynamically bridging (through
gobject-introspection) the WebKit JavaScriptCore engine with the GObject
type system. In a more concrete sense, Seed enables you to immediately
write applications around a significant portion of the GNOME platform,
and easily embed JavaScript as a scripting language in your GObject
library.

View File

@ -0,0 +1,17 @@
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2011/05/13 09:59:35 jasper Exp $
@lib lib/libseed-gtk3.so.${LIBseed-gtk3_VERSION}
lib/seed-gtk3/libseed_DynamicObject.so
lib/seed-gtk3/libseed_cairo.so
lib/seed-gtk3/libseed_canvas.so
lib/seed-gtk3/libseed_dbusnative.so
lib/seed-gtk3/libseed_example.so
lib/seed-gtk3/libseed_ffi.so
lib/seed-gtk3/libseed_gettext.so
lib/seed-gtk3/libseed_gtkbuilder.so
lib/seed-gtk3/libseed_libxml.so
lib/seed-gtk3/libseed_mpfr.so
lib/seed-gtk3/libseed_multiprocessing.so
lib/seed-gtk3/libseed_os.so
lib/seed-gtk3/libseed_readline.so
lib/seed-gtk3/libseed_sandbox.so
lib/seed-gtk3/libseed_sqlite.so

135
x11/gnome/seed/pkg/PLIST Normal file
View File

@ -0,0 +1,135 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2011/05/13 09:59:35 jasper Exp $
%%SHARED%%
@bin bin/seed
include/seed-gtk3/
include/seed-gtk3/seed-debug.h
include/seed-gtk3/seed-module.h
include/seed-gtk3/seed.h
lib/libseed-gtk3.a
lib/libseed-gtk3.la
lib/pkgconfig/
lib/pkgconfig/seed.pc
lib/seed-gtk3/
lib/seed-gtk3/libseed_DynamicObject.a
lib/seed-gtk3/libseed_DynamicObject.la
lib/seed-gtk3/libseed_cairo.a
lib/seed-gtk3/libseed_cairo.la
lib/seed-gtk3/libseed_canvas.a
lib/seed-gtk3/libseed_canvas.la
lib/seed-gtk3/libseed_dbusnative.a
lib/seed-gtk3/libseed_dbusnative.la
lib/seed-gtk3/libseed_example.a
lib/seed-gtk3/libseed_example.la
lib/seed-gtk3/libseed_ffi.a
lib/seed-gtk3/libseed_ffi.la
lib/seed-gtk3/libseed_gettext.a
lib/seed-gtk3/libseed_gettext.la
lib/seed-gtk3/libseed_gtkbuilder.a
lib/seed-gtk3/libseed_gtkbuilder.la
lib/seed-gtk3/libseed_libxml.a
lib/seed-gtk3/libseed_libxml.la
lib/seed-gtk3/libseed_mpfr.a
lib/seed-gtk3/libseed_mpfr.la
lib/seed-gtk3/libseed_multiprocessing.a
lib/seed-gtk3/libseed_multiprocessing.la
lib/seed-gtk3/libseed_os.a
lib/seed-gtk3/libseed_os.la
lib/seed-gtk3/libseed_readline.a
lib/seed-gtk3/libseed_readline.la
lib/seed-gtk3/libseed_sandbox.a
lib/seed-gtk3/libseed_sandbox.la
lib/seed-gtk3/libseed_sqlite.a
lib/seed-gtk3/libseed_sqlite.la
@man man/man1/seed.1
share/doc/seed/
share/doc/seed/AUTHORS
share/doc/seed/COPYING
share/doc/seed/ChangeLog
share/doc/seed/INSTALL
share/doc/seed/README
share/doc/seed/conventions.html
share/doc/seed/index.html
share/doc/seed/mapping/
share/doc/seed/mapping/enum-mapping.png
share/doc/seed/mapping/mapping.html
share/doc/seed/modules/
share/doc/seed/modules/canvas.html
share/doc/seed/modules/gtkbuilder/
share/doc/seed/modules/gtkbuilder/html/
share/doc/seed/modules/gtkbuilder/html/gtkbuilder-funcs.xml
share/doc/seed/modules/multiprocessing.html
share/doc/seed/modules/readline/
share/doc/seed/modules/readline/html/
share/doc/seed/modules/readline/html/readline-funcs.xml
share/doc/seed/modules/sandbox/
share/doc/seed/modules/sandbox/html/
share/doc/seed/modules/sandbox/html/sandbox-funcs.xml
share/doc/seed/modules/sqlite/
share/doc/seed/modules/sqlite/html/
share/doc/seed/modules/sqlite/html/sqlite-funcs.xml
share/doc/seed/runtime.html
share/doc/seed/sh.css
share/doc/seed/sh.js
share/doc/seed/sh_js.js
share/doc/seed/style.css
share/doc/seed/tutorial/
share/doc/seed/tutorial/1.js
share/doc/seed/tutorial/1.png
share/doc/seed/tutorial/2.js
share/doc/seed/tutorial/2.png
share/doc/seed/tutorial/3.js
share/doc/seed/tutorial/3.png
share/doc/seed/tutorial/4.png
share/doc/seed/tutorial/packing.png
share/doc/seed/tutorial/packing.svg
share/doc/seed/tutorial/tutorial.html
share/gtk-doc/
share/gtk-doc/html/
share/gtk-doc/html/seed/
share/gtk-doc/html/seed/GtkBuilder-module.html
share/gtk-doc/html/seed/Sandbox-module.html
share/gtk-doc/html/seed/api.html
share/gtk-doc/html/seed/home.png
share/gtk-doc/html/seed/index.html
share/gtk-doc/html/seed/index.sgml
share/gtk-doc/html/seed/ix01.html
share/gtk-doc/html/seed/js.html
share/gtk-doc/html/seed/left.png
share/gtk-doc/html/seed/modules.html
share/gtk-doc/html/seed/readline-module.html
share/gtk-doc/html/seed/right.png
share/gtk-doc/html/seed/seed-Contexts.html
share/gtk-doc/html/seed/seed-Evaluation.html
share/gtk-doc/html/seed/seed-Exceptions.html
share/gtk-doc/html/seed/seed-Initialization.html
share/gtk-doc/html/seed/seed-JS-Objects.html
share/gtk-doc/html/seed/seed-JavaScript-Classes.html
share/gtk-doc/html/seed/seed-Modules.html
share/gtk-doc/html/seed/seed-Native-Functions.html
share/gtk-doc/html/seed/seed-Native-Type-Conversion.html
share/gtk-doc/html/seed/seed-Operating-on-Native-Types.html
share/gtk-doc/html/seed/seed-SeedClosure.html
share/gtk-doc/html/seed/seed-Signals.html
share/gtk-doc/html/seed/seed-building.html
share/gtk-doc/html/seed/seed-contact.html
share/gtk-doc/html/seed/seed-importer.html
share/gtk-doc/html/seed/seed-introduction.html
share/gtk-doc/html/seed/seed.devhelp
share/gtk-doc/html/seed/seed.devhelp2
share/gtk-doc/html/seed/seed.html
share/gtk-doc/html/seed/sqlite-module.html
share/gtk-doc/html/seed/style.css
share/gtk-doc/html/seed/types.html
share/gtk-doc/html/seed/up.png
share/seed-gtk3/
share/seed-gtk3/dbus.js
share/seed-gtk3/extensions/
share/seed-gtk3/extensions/Clutter.js
share/seed-gtk3/extensions/GObject.js
share/seed-gtk3/extensions/Gio.js
share/seed-gtk3/extensions/Gst.js
share/seed-gtk3/extensions/Gtk.js
share/seed-gtk3/extensions/Seed.js
share/seed-gtk3/extensions/xml.js
share/seed-gtk3/lang.js
share/seed-gtk3/repl.js