# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           gobject_introspection 1.0

name                seed
set git_name        ${name}
set git_commit      e8026f7f9f026cf389d2772fa5b72c7851401e59
set git_date        20201009
version             4.0.0-${git_date}
revision            2

description         GObject JavaScriptCore bridge
long_description    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.

maintainers         nomaintainer
categories          gnome
platforms           darwin
license             LGPL-2
homepage            https://wiki.gnome.org/Projects/Seed
master_sites        https://gitlab.gnome.org/GNOME/${git_name}/-/archive/${git_commit}/

distname            ${git_name}-${git_commit}

use_bzip2           yes

checksums           rmd160  a5e8bb9b8f68a61d9bb3b9219c9e72a8678c8967 \
                    sha256  2e809e3760137ca0d06f28963e889a9001d7db1dc2af7e910c36e3a4b26d1d78 \
                    size    363300

depends_build       port:pkgconfig \
                    port:gawk \
                    port:intltool \
                    port:gtk-doc \
                    port:gnome-common \
                    port:autoconf \
                    port:automake \
                    port:libtool

depends_lib         port:gettext \
                    port:readline \
                    port:gnome-js-common \
                    path:lib/pkgconfig/cairo.pc:cairo \
                    path:lib/pkgconfig/javascriptcoregtk-4.0.pc:webkit2-gtk \
                    port:dbus-glib \
                    port:libffi \
                    port:mpfr \
                    port:libxml2 \
                    port:sqlite3

gobject_introspection yes

patchfiles-append   patch-use_AC_PROG_CPP.diff

# reconfigure using upstream autogen.sh for intltool 0.51 compatibility

post-patch {
    xinstall -m 755 ${filespath}/autogen.sh ${worksrcpath}
}

configure.cmd       ./autogen.sh

configure.args      --with-webkit=4.0 \
                    --disable-silent-rules

# https://trac.macports.org/ticket/61246
configure.cppflags-append \
                   -DBUILDING_GTK__

livecheck.type      none
