Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jul 2014 10:47:34 +0000
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        gnome@FreeBSD.org
Subject:   [patch] improvements to www/webkit-gtk2 port
Message-ID:  <20140721104734.GA36923@FreeBSD.org>

next in thread | raw e-mail | index | archive | help

--M9NhX3UHpAaciwkO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

hi there,

please consider attached patch (this is the first draft; ideally i want to
fix both webkit-gtk{2,3} ports at once since they are very similar; maybe
even turning them into master/slave pair).

  - Dependency on devel/gperf from ports seems a leftover from the old days;
    today both base and ports offer version 3.0.3 (the latest GPLv2 one)
  - Dependency on textproc/gtk-doc looks bogus; removing and passing option
    --disable-gtk-doc (just in case) makes no observable changes in the
    resulting package (no pkg-plist changes unless I'm missing something),
    so I propose we just remove it (at it pulls some not very nice shit)
  - Use some convenient option helpers (and CFLAGS_powerpc64)
  - Remove WEBGL_DESC, it's in the default descriptions pool now
  - Allow it to be built without GStreamer (but enable it by default)
  - Correctly detect Clang via USE=compiler and adjust COMMENT while here

tinderbuilds went OK, but of course more review/testing is welcome!

./danfe

--M9NhX3UHpAaciwkO
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="wk-gtk2.diff"

Index: Makefile
===================================================================
--- Makefile	(revision 361160)
+++ Makefile	(working copy)
@@ -4,28 +4,24 @@
 
 PORTNAME=	webkit
 PORTVERSION=	1.8.3
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	www
 MASTER_SITES=	http://webkitgtk.org/releases/
 PKGNAMESUFFIX=	-gtk2
 
 MAINTAINER=	gnome@FreeBSD.org
-COMMENT=	An opensource browser engine
+COMMENT=	Open source browser engine
 
-BUILD_DEPENDS=	${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex \
-		${LOCALBASE}/bin/gperf:${PORTSDIR}/devel/gperf \
-		gtkdoc-rebase:${PORTSDIR}/textproc/gtk-doc
+BUILD_DEPENDS=	${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex
 LIB_DEPENDS=	libenchant.so:${PORTSDIR}/textproc/enchant \
 		libicutu.so:${PORTSDIR}/devel/icu \
 		libcurl.so:${PORTSDIR}/ftp/curl \
 		libsoup-2.4.so:${PORTSDIR}/devel/libsoup
 
-USE_XZ=		yes
+USES=		bison compiler gettext gmake perl5 pkgconfig tar:xz
+USE_AUTOTOOLS=	libtool
 USE_PYTHON_BUILD=	2
-USE_GSTREAMER=	yes
 USE_XORG=	xt
-USES=		bison gmake pkgconfig gettext perl5
-USE_AUTOTOOLS=	libtool
 USE_GNOME=	gtk20 introspection:build libxslt ltverhack
 USE_SQLITE=	yes
 USE_LDCONFIG=	yes
@@ -34,48 +30,37 @@
 		ZLIB_CFLAGS="-I/usr/include" \
 		ZLIB_LIBS="-L/usr/lib -lz" \
 		ac_cv_path_DOLT_BASH=""
-CPPFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib
-CONFIGURE_ARGS=	--with-gtk=2.0 \
+CONFIGURE_ARGS=	--with-gtk=2.0 --disable-gtk-doc \
 		--enable-svg-fonts \
 		--disable-geolocation \
 		--enable-introspection
 MAKEFILE=	GNUmakefile
 
+CPPFLAGS+=	-I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib
+CFLAGS_powerpc64=	-mminimal-toc
+
 BROWSER_PLUGINS_DIR?=	${LOCALBASE}/lib/browser_plugins/symlinks/webkit-gtk2
 #_BROWSER_PLUGINS_DIR=	${BROWSER_PLUGINS_DIR:S|^/|"|:S|/|", "|g}",
 
-OPTIONS_DEFINE=	WEBGL DEBUG
-OPTIONS_DEFAULT=WEBGL
-WEBGL_DESC=	Enable Web GL support
+OPTIONS_DEFINE=	WEBGL GSTREAMER DEBUG
+OPTIONS_DEFAULT=WEBGL GSTREAMER
+OPTIONS_SUB=	yes
 
-.include <bsd.port.options.mk>
+WEBGL_USE=	GL=gl
+WEBGL_CONFIGURE_OFF=	--disable-webgl
 
-.if ${PORT_OPTIONS:MWEBGL}
-USE_GL=		gl
-CONFIGURE_ARGS+=--enable-webgl
-.else
-CONFIGURE_ARGS+=--disable-webgl
-.endif
+GSTREAMER_USE=	GSTREAMER=yes
+GSTREAMER_CONFIGURE_OFF=	--disable-video
 
-.if ${PORT_OPTIONS:MDEBUG}
-CONFIGURE_ARGS+=--enable-debug
-.else
-CONFIGURE_ARGS+=--disable-debug
-.endif
+DEBUG_CONFIGURE_ON=	--enable-debug
 
-CCISCLANG!=     ${CC} --version
+.include <bsd.port.pre.mk>
 
-.if !empty(CCISCLANG:M*clang*)
+.if ${COMPILER_TYPE} == clang
 CPPFLAGS+=	-Wno-c++11-extensions
 .endif
 
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == powerpc64
-CFLAGS+=	-mminimal-toc
-.endif
-
 .if ${PERL_LEVEL} >= 501400
 BUILD_DEPENDS+=	p5-Switch>0:${PORTSDIR}/lang/p5-Switch
 .endif
@@ -92,9 +77,5 @@
 		${WRKSRC}/Source/WebCore/dom/make_names.pl \
 		${WRKSRC}/Source/WebCore/css/make-css-file-arrays.pl \
 		${WRKSRC}/Source/WebCore/bindings/scripts/IDLParser.pm
-	@${REINPLACE_CMD} -e 's|"gperf|"${LOCALBASE}/bin/gperf|g' \
-		${WRKSRC}/Source/WebCore/css/makevalues.pl \
-		${WRKSRC}/Source/WebCore/css/makeprop.pl \
-		${WRKSRC}/Source/WebCore/make-hash-tools.pl
 
 .include <bsd.port.post.mk>
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 361160)
+++ pkg-plist	(working copy)
@@ -48,7 +48,7 @@
 include/webkitgtk-1.0/webkit/WebKitDOMHTMLAnchorElement.h
 include/webkitgtk-1.0/webkit/WebKitDOMHTMLAppletElement.h
 include/webkitgtk-1.0/webkit/WebKitDOMHTMLAreaElement.h
-include/webkitgtk-1.0/webkit/WebKitDOMHTMLAudioElement.h
+%%GSTREAMER%%include/webkitgtk-1.0/webkit/WebKitDOMHTMLAudioElement.h
 include/webkitgtk-1.0/webkit/WebKitDOMHTMLBRElement.h
 include/webkitgtk-1.0/webkit/WebKitDOMHTMLBaseElement.h
 include/webkitgtk-1.0/webkit/WebKitDOMHTMLBaseFontElement.h
@@ -107,7 +107,7 @@
 include/webkitgtk-1.0/webkit/WebKitDOMHTMLTextAreaElement.h
 include/webkitgtk-1.0/webkit/WebKitDOMHTMLTitleElement.h
 include/webkitgtk-1.0/webkit/WebKitDOMHTMLUListElement.h
-include/webkitgtk-1.0/webkit/WebKitDOMHTMLVideoElement.h
+%%GSTREAMER%%include/webkitgtk-1.0/webkit/WebKitDOMHTMLVideoElement.h
 include/webkitgtk-1.0/webkit/WebKitDOMHistory.h
 include/webkitgtk-1.0/webkit/WebKitDOMLocation.h
 include/webkitgtk-1.0/webkit/WebKitDOMMediaError.h

--M9NhX3UHpAaciwkO--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140721104734.GA36923>