Changeset View
Standalone View
www/webkit2-gtk3/Makefile
# Created by: Michael Johnson <ahze@FreeBSD.org> | # Created by: Michael Johnson <ahze@FreeBSD.org> | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= webkit | PORTNAME= webkit | ||||
PORTVERSION= 2.16.6 | PORTVERSION= 2.20.0 | ||||
PORTREVISION= 3 | |||||
CATEGORIES= www | CATEGORIES= www | ||||
MASTER_SITES= http://webkitgtk.org/releases/ | MASTER_SITES= http://webkitgtk.org/releases/ | ||||
PKGNAMESUFFIX= 2-gtk3 | PKGNAMESUFFIX= 2-gtk3 | ||||
DISTNAME= ${PORTNAME}gtk-${PORTVERSION} | DISTNAME= ${PORTNAME}gtk-${PORTVERSION} | ||||
MAINTAINER= gnome@FreeBSD.org | MAINTAINER= gnome@FreeBSD.org | ||||
COMMENT= Opensource browser engine using the GTK+ 3 toolkit | COMMENT= Opensource browser engine using the GTK+ 3 toolkit | ||||
LICENSE= GPLv2 BSD2CLAUSE | LICENSE= GPLv2 BSD2CLAUSE | ||||
LICENSE_COMB= dual | LICENSE_COMB= dual | ||||
LIB_DEPENDS= libenchant.so:textproc/enchant \ | LIB_DEPENDS= libenchant.so:textproc/enchant \ | ||||
libfontconfig.so:x11-fonts/fontconfig \ | libfontconfig.so:x11-fonts/fontconfig \ | ||||
libfreetype.so:print/freetype2 \ | libfreetype.so:print/freetype2 \ | ||||
libwebp.so:graphics/webp \ | libwebp.so:graphics/webp \ | ||||
libpng.so:graphics/png \ | libpng.so:graphics/png \ | ||||
libsecret-1.so:security/libsecret \ | libsecret-1.so:security/libsecret \ | ||||
libnotify.so:devel/libnotify \ | libnotify.so:devel/libnotify \ | ||||
libhyphen.so:textproc/hyphen \ | libhyphen.so:textproc/hyphen \ | ||||
libicutu.so:devel/icu \ | libicutu.so:devel/icu \ | ||||
libharfbuzz.so:print/harfbuzz \ | libharfbuzz.so:print/harfbuzz \ | ||||
libharfbuzz-icu.so:print/harfbuzz-icu \ | libharfbuzz-icu.so:print/harfbuzz-icu \ | ||||
libsoup-2.4.so:devel/libsoup \ | libsoup-2.4.so:devel/libsoup \ | ||||
libgcrypt.so:security/libgcrypt \ | libgcrypt.so:security/libgcrypt \ | ||||
libgnutls.so:security/gnutls | libgnutls.so:security/gnutls \ | ||||
libtasn1.so:security/libtasn1 \ | |||||
libwoff2dec.so:devel/woff2 | |||||
PORTSCOUT= limitw:1,even | PORTSCOUT= limitw:1,even | ||||
USE_GSTREAMER1= bad gl | |||||
USE_XORG= x11 xcomposite xdamage xext xrender xt ice | |||||
USES= bison cmake compiler:c++14-lang gettext gnome gperf \ | USES= bison cmake compiler:c++14-lang gettext gnome gperf \ | ||||
jpeg perl5 pkgconfig python:2.7,build sqlite tar:xz | jpeg localbase:ldflags perl5 pkgconfig python:2.7,build \ | ||||
USE_RUBY= yes | sqlite tar:xz | ||||
RUBY_NO_RUN_DEPENDS=yes | |||||
USE_GNOME= cairo gdkpixbuf2 gtk30 introspection:build libxml2 libxslt | USE_GNOME= cairo gdkpixbuf2 gtk30 introspection:build libxml2 libxslt | ||||
USE_GL= gl egl | USE_GL= gl egl glesv2 | ||||
USE_PERL5= build | USE_GSTREAMER1= bad gl | ||||
USE_LDCONFIG= yes | USE_LDCONFIG= yes | ||||
CPPFLAGS+= -I${LOCALBASE}/include | USE_PERL5= build | ||||
LDFLAGS+= -L${LOCALBASE}/lib | USE_RUBY= yes | ||||
RUBY_NO_RUN_DEPENDS= yes | |||||
USE_XORG= x11 xcomposite xdamage xext xrender xt ice | |||||
BINARY_ALIAS= python=${PYTHON_CMD} | |||||
CFLAGS+= -DFIXED_EXECUTABLE_MEMORY_POOL_SIZE_IN_MB=32 | |||||
CFLAGS_powerpc= -DENABLE_YARR_JIT=0 | |||||
CFLAGS_powerpc64= -DENABLE_YARR_JIT=0 \ | |||||
-mminimal-toc | |||||
lantw44_gmail.com: Since WebKit is written in C++, do you think it is better to set these macros in `CXXFLAGS` as… | |||||
CMAKE_ARGS= -DPORT=GTK | |||||
CMAKE_OFF= USE_LD_GOLD ${CMAKE_OFF_${ARCH}:U} | |||||
CMAKE_ON= ENABLE_GLES2 | |||||
CMAKE_OFF_armv6= ENABLE_JIT | |||||
CMAKE_OFF_armv7= ENABLE_JIT | |||||
CMAKE_OFF_powerpc= ENABLE_JIT | |||||
CMAKE_OFF_powerpc64= ENABLE_JIT | |||||
CONFIGURE_ENV= XDG_CACHE_HOME=${WRKDIR} | |||||
INSTALL_TARGET= install | INSTALL_TARGET= install | ||||
CMAKE_ARGS+= -DPORT=GTK \ | |||||
-DENABLE_WAYLAND_TARGET:BOOL=OFF \ | |||||
-DENABLE_MINIBROWSER:BOOL=ON \ | |||||
lantw44_gmail.comUnsubmitted Done Inline ActionsCan we keep MiniBrowser enabled and installed by default? It is very useful for debugging. lantw44_gmail.com: Can we keep `MiniBrowser` enabled and installed by default? It is very useful for debugging. | |||||
-DENABLE_GLES2:BOOL=OFF \ | |||||
-DENABLE_ACCELERATED_2D_CANVAS=ON \ | |||||
-DUSE_LD_GOLD:BOOL=OFF \ | |||||
-DENABLE_WEBKIT:BOOL=OFF | |||||
CONFIGURE_ENV+= XDG_CACHE_HOME=${WRKDIR} | |||||
BROWSER_PLUGINS_DIR?= ${LOCALBASE}/lib/browser_plugins/symlinks/webkit-gtk3 | BROWSER_PLUGINS_DIR?= ${LOCALBASE}/lib/browser_plugins/symlinks/webkit-gtk3 | ||||
#_BROWSER_PLUGINS_DIR= ${BROWSER_PLUGINS_DIR:S|^/|"|:S|/|", "|g}", | |||||
OPTIONS_SUB= yes | OPTIONS_DEFINE= DEBUG GEOIP NPAPI WAYLAND | ||||
OPTIONS_DEFINE= DEBUG GEOIP NPAPI | |||||
OPTIONS_DEFAULT=GEOIP | OPTIONS_DEFAULT= GEOIP | ||||
OPTIONS_DEFAULT_i386= NPAPI | OPTIONS_DEFAULT_i386= NPAPI | ||||
OPTIONS_DEFAULT_amd64= NPAPI | OPTIONS_DEFAULT_amd64= NPAPI | ||||
OPTIONS_SUB= yes | |||||
NPAPI_DESC= Support gtk2 (NPAPI) based plugins (like flash) | |||||
DEBUG_BUILD_DEPENDS= binutils>=0:devel/binutils | DEBUG_BUILD_DEPENDS= binutils>=0:devel/binutils | ||||
DEBUG_CMAKE_ON= -DCMAKE_BUILD_TYPE:STRING=Debug \ | DEBUG_CMAKE_ON= -DCMAKE_BUILD_TYPE:STRING=Debug \ | ||||
Done Inline ActionsIt is nice to see the comment here. Do you want to put this WebKit bug report link here as well? lantw44_gmail.com: It is nice to see the comment here. Do you want to put this WebKit bug report link here as well? | |||||
-DCMAKE_AR=${LOCALBASE}/bin/ar \ | -DCMAKE_AR=${LOCALBASE}/bin/ar \ | ||||
-DCMAKE_RANLIB=${LOCALBASE}/bin/ranlib \ | -DCMAKE_RANLIB=${LOCALBASE}/bin/ranlib \ | ||||
-DCMAKE_LINKER=${LOCALBASE}/bin/ld | -DCMAKE_LINKER=${LOCALBASE}/bin/ld | ||||
DEBUG_CXXFLAGS= -B${LOCALBASE}/bin | DEBUG_CXXFLAGS= -B${LOCALBASE}/bin | ||||
DEBUG_CMAKE_OFF= -DCMAKE_BUILD_TYPE:STRING=Release \ | DEBUG_CMAKE_OFF= -DCMAKE_BUILD_TYPE:STRING=Release \ | ||||
-DCMAKE_AR=/usr/bin/ar \ | -DCMAKE_AR=/usr/bin/ar \ | ||||
-DCMAKE_RANLIB=/usr/bin/ranlib \ | -DCMAKE_RANLIB=/usr/bin/ranlib \ | ||||
-DCMAKE_LINKER=/usr/bin/ld | -DCMAKE_LINKER=/usr/bin/ld | ||||
DEBUG_CXXFLAGS_OFF= -B/usr/bin | DEBUG_CXXFLAGS_OFF= -B/usr/bin | ||||
Done Inline ActionsI am not sure why this DEBUG_*_OFF variables were added. Building WebKit with debug symbols enabled does require ar and ld supporting thin archives, so pulling binutils from ports is correct. But I don't know there are any reasons to force the use of ar and ld from base when debug symbols are disabled. Do you think we can remove these two DEBUG_*_OFF variables? lantw44_gmail.com: I am not sure why this `DEBUG_*_OFF` variables were added. Building WebKit with debug symbols… | |||||
Done Inline ActionsIt was added in rP441828. I think this still applies now. tobik: It was added in rP441828. I think this still applies now. | |||||
Done Inline ActionsYes, you are correct. It is still needed but I forgot it. Personally I prefer binutils from ports to elftoolchain included in base because having an ar supporting thin archives greatly reduces the disk space required to build WebKit. I know it is probably not worth to add a check here, and I just mentioned it for reference. It doesn't mean that non-debug build requires programs from base. It is just a simple solution to avoid mixing tools from base and ports by (correctly) assuming things in base are always available. lantw44_gmail.com: Yes, you are correct. It is still needed but I forgot it. Personally I prefer binutils from… | |||||
Done Inline ActionsSorry, I don't know how to mark these comments as done. Can you tell me how to do it? lantw44_gmail.com: Sorry, I don't know how to mark these comments as done. Can you tell me how to do it? | |||||
Done Inline ActionsThere should be a checkbox labeled "Done" in the top-right corner of inline comments. AFAIK only the review author can do this. tobik: There should be a checkbox labeled "Done" in the top-right corner of inline comments.
AFAIK… | |||||
DEBUG_CFLAGS_OFF= -DNDEBUG | DEBUG_CFLAGS_OFF= -DNDEBUG | ||||
GEOIP_CMAKE_BOOL= ENABLE_GEOLOCATION | GEOIP_CMAKE_BOOL= ENABLE_GEOLOCATION | ||||
GEOIP_BUILD_DEPENDS+= geoclue>=2.4.3:net/geoclue | GEOIP_BUILD_DEPENDS= geoclue>=2.4.3:net/geoclue | ||||
GEOIP_RUN_DEPENDS+= geoclue>=2.4.3:net/geoclue | GEOIP_RUN_DEPENDS= geoclue>=2.4.3:net/geoclue | ||||
NPAPI_DESC= Support gtk2 (NPAPI) based plugins (like flash) | |||||
NPAPI_CMAKE_BOOL= ENABLE_PLUGIN_PROCESS_GTK2 | NPAPI_CMAKE_BOOL= ENABLE_PLUGIN_PROCESS_GTK2 | ||||
NPAPI_USE= GNOME=gtk20 | NPAPI_USE= GNOME=gtk20 | ||||
.include <bsd.port.options.mk> | WAYLAND_CMAKE_BOOL= ENABLE_WAYLAND_TARGET | ||||
WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland \ | |||||
libwayland-egl.so:graphics/mesa-libs | |||||
.if ${ARCH} == armv6 || ${ARCH} == armv7 | |||||
CMAKE_ARGS+= -DENABLE_JIT:BOOL=OFF | |||||
.endif | |||||
.if ${ARCH} == powerpc || ${ARCH} == powerpc64 | |||||
CMAKE_ARGS+= -DENABLE_JIT:BOOL=OFF | |||||
CFLAGS+= -DENABLE_YARR_JIT=0 | |||||
.endif | |||||
.if ${ARCH} == powerpc64 | |||||
CFLAGS+= -mminimal-toc | |||||
.endif | |||||
post-patch: | post-patch: | ||||
@${REINPLACE_CMD} -e 's|%%BROWSER_PLUGINS_DIR%%|${BROWSER_PLUGINS_DIR}|' \ | @${REINPLACE_CMD} -e 's|/usr/lib/browser/plugins|${BROWSER_PLUGINS_DIR}|' \ | ||||
${WRKSRC}/Source/WebKit2/Shared/Plugins/unix/PluginSearchPath.cpp | ${WRKSRC}/Source/WebKit/Shared/Plugins/unix/PluginSearchPath.cpp | ||||
pre-configure: | pre-configure: | ||||
# .if !exists() evaluates too early before cairo has a chance to be installed | # .if !exists() evaluates too early before cairo has a chance to be installed | ||||
@if ! pkg-config --exists cairo-egl; then \ | @if ! pkg-config --exists cairo-egl; then \ | ||||
${ECHO_MSG} "${PKGNAME}: Needs cairo with OPENGL support enabled."; \ | ${ECHO_MSG} "${PKGNAME}: Needs cairo with OPENGL support enabled."; \ | ||||
${FALSE}; \ | ${FALSE}; \ | ||||
fi | fi | ||||
post-install: | post-install: | ||||
@${LN} -sf ../libexec/webkit2gtk-4.0/jsc ${STAGEDIR}${PREFIX}/bin/jsc-4 | @${LN} -sf ../libexec/webkit2gtk-4.0/jsc ${STAGEDIR}${PREFIX}/bin/jsc-4 | ||||
@${LN} -sf ../libexec/webkit2gtk-4.0/MiniBrowser ${STAGEDIR}${PREFIX}/bin/MiniBrowser-4 | |||||
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so.*.* | @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so.*.* | ||||
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/webkit2gtk-4.0/injected-bundle/*.so | @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/webkit2gtk-4.0/injected-bundle/*.so | ||||
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/webkit2gtk-4.0/* | @${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/webkit2gtk-4.0/* | ||||
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/WebKitWebDriver | |||||
.include <bsd.port.mk> | .include <bsd.port.mk> |
Since WebKit is written in C++, do you think it is better to set these macros in CXXFLAGS as well? I know CPPFLAGS is a better place for preprocessor macros, but cmake doesn't seem to support CPPFLAGS.