Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Mar 2011 16:06:25 GMT
From:      David Naylor <naylor.b.david@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/156001: [patch] emulators/wine: add support for gecko (download)
Message-ID:  <201103281606.p2SG6P3t088286@red.freebsd.org>
Resent-Message-ID: <201103281610.p2SGACJD003445@freefall.freebsd.org>

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

>Number:         156001
>Category:       ports
>Synopsis:       [patch] emulators/wine: add support for gecko (download)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 28 16:10:12 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     David Naylor
>Release:        FreeBSD-current
>Organization:
Private
>Environment:
>Description:
Every time wine is upgraded, or a new wine prefix is created, it tried to install and update gecko, which it uses for HTML support.  

Gecko is ~12MB and can be a delay in starting wine applications and since wine recommends installing each program in its own prefix this download and install of gecko could happen quite often (for each user of the computer).  

>How-To-Repeat:
# env PREFIX=/tmp/deleteme winecfg
>Fix:
Download the gecko installer and place it in a known location for wine to find.  Wine will then install gecko automatically and not require user intervention or any downloading.  

The attached patch adds this support to the wine port (with an option to disable the download of gecko installer if undesired by user).  

Patch attached with submission follows:

diff --git a/Makefile b/Makefile
index c01d1f3..9f39ec7 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,8 @@ DISTVERSION=	1.3.16
 PORTEPOCH=	1
 CATEGORIES=	emulators
 MASTER_SITES=	SF/${PORTNAME}/Source \
-		http://ibiblio.org/pub/linux/system/emulators/wine/
+		http://ibiblio.org/pub/linux/system/emulators/wine/ \
+		SF/${PORTNAME}/Wine%20Gecko/${GECKO_VERSION}:gecko
 
 MAINTAINER=	gerald@FreeBSD.org
 COMMENT=	Microsoft Windows compatibility layer for Unix-like systems
@@ -59,6 +60,7 @@ SUB_FILES=	pkg-message
 PKGMESSAGE=	${WRKDIR}/pkg-message
 
 OPTIONS=	CUPS	"Use CUPS (Common UNIX Printing System)"	Off \
+		GECKO	"Install win32 Gecko for HTML support"		On  \
 		GNUTLS	"Use GnuTLS"					Off \
 		HAL	"Use HAL (Hardware Abstraction Layer)"		Off \
 		LDAP	"Use LDAP"					Off \
@@ -75,6 +77,16 @@ CONFIGURE_ARGS+=	--with-cups
 LIB_DEPENDS+=	cups.2:${PORTSDIR}/print/cups-base
 .endif
 
+GECKO_VERSION=	1.2.0
+PLIST_SUB+=	GECKO_VERSION="${GECKO_VERSION}"
+.ifdef WITH_GECKO
+DISTFILES=	wine-${PORTVERSION}.tar.bz2 wine_gecko-${GECKO_VERSION}-x86.msi:gecko
+EXTRACT_ONLY=	wine-${PORTVERSION}.tar.bz2
+PLIST_SUB+=	GECKO=""
+.else
+PLIST_SUB+=     GECKO="@comment "
+.endif
+
 .ifdef WITH_GNUTLS
 CONFIGURE_ARGS+=	--with-gnutls
 LIB_DEPENDS+=	gnutls.40:${PORTSDIR}/security/gnutls
@@ -138,6 +150,10 @@ post-install:
 	              ${MAN1PREFIX}/man/fr.UTF-8/man1
 	${MV} -f ${WINELIBDIR}/libwine.so.1.0 ${WINELIBDIR}/libwine.so.1
 	${LN} -sf libwine.so.1 ${WINELIBDIR}/libwine.so
+.ifdef WITH_GECKO
+	${MKDIR} ${DATADIR}/wine/gecko
+	${INSTALL_DATA} ${DISTDIR}/wine_gecko-${GECKO_VERSION}-x86.msi ${DATADIR}/wine/gecko
+.endif
 .if !defined(NOPORTDOCS)
 	-@${MKDIR} ${DOCSDIR}
 .for i in README ANNOUNCE AUTHORS
diff --git a/distinfo b/distinfo
index 645c60a..48c247d 100644
--- a/distinfo
+++ b/distinfo
@@ -1,2 +1,4 @@
 SHA256 (wine-1.3.16.tar.bz2) = 37a0bf1825081a72b480ef8f4600f512f51546b1d0309f90083b7bd4bfeb6735
 SIZE (wine-1.3.16.tar.bz2) = 19129120
+SHA256 (wine_gecko-1.2.0-x86.msi) = d6ccdb32b5867df207c7cd89513297ceb89cfa93696bece470467845c6c4d3ee
+SIZE (wine_gecko-1.2.0-x86.msi) = 12604928
diff --git a/pkg-plist b/pkg-plist
index 794fb3b..9689fa7 100644
--- a/pkg-plist
+++ b/pkg-plist
@@ -1747,6 +1747,7 @@ lib/wine/xinput1_3.dll.so
 lib/wine/xinput9_1_0.dll.so
 lib/wine/xmllite.dll.so
 share/applications/wine.desktop
+%%GECKO%%%%DATADIR%%/wine/gecko/wine_gecko-%%GECKO_VERSION%%-x86.msi
 %%DATADIR%%/wine/generic.ppd
 %%DATADIR%%/wine/l_intl.nls
 %%DATADIR%%/wine/wine.inf


>Release-Note:
>Audit-Trail:
>Unformatted:



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