# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 # $Id: Portfile 153186 2016-09-26 16:57:23Z jeremyhu@macports.org $ # We have an umbrella radar tracking webkit-gtk issues on OS X. Please relate # any future issues with this tracker. # http://bugs.webkit.org/show_bug.cgi?id=126492 PortSystem 1.0 PortGroup conflicts_build 1.0 PortGroup muniversal 1.0 PortGroup compiler_blacklist_versions 1.0 PortGroup cxx11 1.0 name webkit-gtk epoch 2 version 2.4.11 description Apple's WebKit HTML rendering library for GTK+ long_description ${description} maintainers jeremyhu devans categories www gnome platforms darwin freebsd license LGPL-2+ BSD homepage http://webkitgtk.org/ master_sites http://webkitgtk.org/releases/ use_xz yes distname webkitgtk-${version} dist_subdir webkit-gtk checksums rmd160 e1f72498f911465f5ba152313dd9c62ae8d5eee6 \ sha256 588aea051bfbacced27fdfe0335a957dca839ebe36aa548df39c7bbafdb65bf7 depends_build port:pkgconfig \ port:gtk-doc \ port:python27 \ port:py27-simplejson depends_lib path:lib/pkgconfig/glib-2.0.pc:glib2 \ port:bison \ port:flex \ port:enchant \ port:geoclue2 \ port:gobject-introspection \ port:harfbuzz-icu \ port:icu \ port:libxslt \ port:libpng \ port:libsecret \ port:libsoup \ port:mesa \ port:sqlite3 \ port:webp \ port:xorg-libXt # case-insensitive.patch: https://bugs.webkit.org/show_bug.cgi?id=65811 # our-icu.patch: No upstream bug report, probably not wanted # ruby-1.8.patch: https://bugs.webkit.org/show_bug.cgi?id=126327 # quartz-webcore.patch: https://bugs.webkit.org/show_bug.cgi?id=126326 # gstreamer.patch: https://bugs.webkit.org/show_bug.cgi?id=126437 # libedit.patch: https://bugs.webkit.org/show_bug.cgi?id=127059 # leopard-malloc.patch: https://bugs.webkit.org/show_bug.cgi?id=140143 # leopard-platform.patch: https://bugs.webkit.org/show_bug.cgi?id=140143 # remove-cf-available.patch: https://trac.macports.org/ticket/49849 # RenderThemeGtk2-toRenderBox.patch: https://trac.macports.org/ticket/51406 patchfiles clang-assertions.patch \ case-insensitive.patch \ our-icu.patch \ ruby-1.8.patch \ quartz-webcore.patch \ gstreamer.patch \ leopard-platform.patch \ leopard-malloc.patch \ libedit.patch \ remove-cf-available.patch \ RenderThemeGtk2-toRenderBox.patch conflicts_build google-test # https://trac.macports.org/ticket/36329 configure.perl /usr/bin/perl configure.python ${prefix}/bin/python2.7 # --disable-webkit2: https://bugs.webkit.org/show_bug.cgi?id=126416 # --disable-web-audio: https://bugs.webkit.org/show_bug.cgi?id=126438 # --disable-jit: https://bugs.webkit.org/show_bug.cgi?id=133293 configure.args --disable-webkit2 \ --disable-web-audio \ --enable-x11-target=yes \ --enable-quartz-target=no \ --enable-wayland-target=no \ --enable-introspection \ --disable-video \ --enable-svg \ --enable-geolocation \ --enable-webgl \ --disable-jit subport webkit-gtk3 { conflicts webkit-gtk3-devel webkit-gtk3-2.0 depends_lib-append port:gtk3 configure.args-append --with-gtk=3.0 # # move gtk-docs to allow parallel install with webkit-gtk # if {[variant_isset universal]} { # # using diff to merge derived include files sometimes # results in a corrupted file due to nested /* */ blocks # global merger_dont_diff set merger_dont_diff "${prefix}/include/webkitgtk-3.0/webkitdom/WebKitDOMNavigator.h" merger-post-destroot { foreach arch ${universal_archs_to_use} { set docpath ${workpath}/destroot-${arch}${prefix}/share/gtk-doc/html move ${docpath}/webkitgtk ${docpath}/webkitgtk3 move ${docpath}/webkitdomgtk ${docpath}/webkitdomgtk3 move ${docpath}/webkitgtk3/webkitgtk.devhelp2 ${docpath}/webkitgtk3/webkitgtk3.devhelp2 } } } else { post-destroot { set docpath ${destroot}${prefix}/share/gtk-doc/html move ${docpath}/webkitgtk ${docpath}/webkitgtk3 move ${docpath}/webkitdomgtk ${docpath}/webkitdomgtk3 move ${docpath}/webkitgtk3/webkitgtk.devhelp2 ${docpath}/webkitgtk3/webkitgtk3.devhelp2 } } } if {${name} eq ${subport}} { conflicts webkit-gtk-devel webkit-gtk-2.0 depends_lib-append port:gtk2 configure.args-append --with-gtk=2.0 } # https://bugs.webkit.org/show_bug.cgi?id=94488 configure.universal_args-delete --disable-dependency-tracking # gobject-introspection uses g-ir-scanner, which uses $CC from env if {[variant_isset universal]} { foreach arch ${configure.universal_archs} { lappend merger_build_args(${arch}) CC='${configure.cc} -arch ${arch}' lappend merger_destroot_args(${arch}) CC='${configure.cc} -arch ${arch}' } } else { build.args-append CC="${configure.cc} ${configure.cc_archflags}" destroot.args-append CC="${configure.cc} ${configure.cc_archflags}" } # We don't want to use the headers from the installed WebKit configure.cppflags-delete -I${prefix}/include # google-test suite build fix configure.cppflags-append -DGTEST_USE_OWN_TR1_TUPLE=1 # https://trac.macports.org/ticket/41560#comment:2 configure.cflags-append -ftemplate-depth=256 configure.cxxflags-append -ftemplate-depth=256 autoreconf.env-append ACLOCAL="aclocal -I Source/autotools" use_autoreconf yes autoreconf.args -fvi lappend merger_dont_diff ${prefix}/include/webkitgtk-1.0/webkitdom/WebKitDOMNavigator.h post-patch { # https://bugs.webkit.org/show_bug.cgi?id=126433 reinplace "s/def __APPLE__/ 0/" \ ${worksrcpath}/Source/JavaScriptCore/API/WebKitAvailability.h # https://bugs.webkit.org/show_bug.cgi?id=58737 reinplace "s:OS(MAC_OS_X):PLATFORM(MAC):" \ ${worksrcpath}/Source/WTF/wtf/ThreadingPthreads.cpp # https://bugs.webkit.org/show_bug.cgi?id=126325 reinplace "s:-stdlib=libstdc\+\+::" \ ${worksrcpath}/Source/autotools/SetupCompilerFlags.m4 # https://bugs.webkit.org/show_bug.cgi?id=126329 # In file included from Source/JavaScriptCore/runtime/JSGlobalObject.cpp:83: # ./Source/JavaScriptCore/API/ObjCCallbackFunction.h:32:9: fatal error: 'JavaScriptCore/JSCallbackFunction.h' file not found # #import # ^ reinplace "/^#define JSC_OBJC_API_ENABLED/s/^.*$/#define JSC_OBJC_API_ENABLED 0/" \ ${worksrcpath}/Source/JavaScriptCore/API/JSBase.h } # TODO: fix this for muniversal # keep it for debug #post-destroot { # file copy ${worksrcpath}/Programs/.libs/GtkLauncher ${destroot}${prefix}/bin #} # Apple's gnumake (patched 3.81) gets wedged at some point during the build process depends_build-append port:gmake build.cmd ${prefix}/bin/gmake build.args-append V=1 # see bug #24622 variant quartz { configure.args-replace --enable-x11-target=yes --enable-x11-target=no configure.args-replace --enable-quartz-target=no --enable-quartz-target=yes configure.args-append --disable-accelerated-compositing # TODO: See if this will build with OpenGL.framework configure.args-delete --enable-webgl depends_lib-delete \ port:mesa \ port:xorg-libXt } variant video description {Enable HTML5 video support using gstreamer} { depends_lib-append port:gstreamer1-gst-plugins-base configure.args-delete --disable-video configure.args-append --enable-video } default_variants +video if {[string match *clang* ${configure.cxx}]} { configure.cxxflags-append -Wno-c++11-extensions } livecheck.type regex livecheck.url http://webkitgtk.org/releases/ livecheck.regex "webkitgtk-(2\\.4(?:\\.\\d+)*)"