• Colin Walters's avatar
    Separate "basic" API from "embedder/module" API · 25681375
    Colin Walters authored
    Previously <gjs/gjs.h> pulled in a lot of stuff, and in particular,
    <gjs/jsapi-util.h>, which in turn required <jsapi.h>.  For a simple
    app that wants to embed GJS we should not be pulling that in.
    
    So <gjs/gjs.h> is now the "simple" API that actually just includes
    <gjs/context.h>, suitable for creating a context and calling eval().
    
    <gjs/gjs-module.h> is now equivalent to the old <gjs/gjs.h>, it
    pulls in the world.
    
    Also, create a corresponding .pc file, gjs-internals-1.0.pc.  This one
    includes mozjs as Requires, and adds the requisite Cflags.  For
    gjs-1.0.pc, change the Requires to simply be gobject-2.0.
    Conceptually, a gjs-devel RPM should not Require
    gobject-introspection-devel or xulrunner-devel, and a simple embedder
    program just using gjs_context_new()/gjs_context_eval() should not
    have DT_NEEDED on gobject-introspection-1.0.so or mozjs.so.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=632795
    25681375
native.h 3.75 KB