From avleeuwen@piwebs.com  Mon Feb 13 21:53:36 2006
Return-Path: <avleeuwen@piwebs.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 356D516A420
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 13 Feb 2006 21:53:36 +0000 (GMT)
	(envelope-from avleeuwen@piwebs.com)
Received: from gimp.piwebs.com (82-197-201-59.dsl.cambrium.nl [82.197.201.59])
	by mx1.FreeBSD.org (Postfix) with ESMTP id D9A3E43D6B
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 13 Feb 2006 21:53:30 +0000 (GMT)
	(envelope-from avleeuwen@piwebs.com)
Received: (qmail 97969 invoked from network); 13 Feb 2006 21:53:36 -0000
Received: from unknown (HELO winston.piwebs.com) (192.168.0.63)
  by gimp.piwebs.com with SMTP; 13 Feb 2006 21:53:36 -0000
Message-Id: <1139867608.5938@winston.piwebs.com>
Date: Mon, 13 Feb 2006 22:53:28 +0100
From: "Arjan van Leeuwen" <avleeuwen@piwebs.com>
To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@freebsd.org>
Cc: lawrance@freebsd.org
Subject: [PATCH] www/opera-devel: enable installation of 4.x static binaries on FreeBSD >= 5
X-Send-Pr-Version: gtk-send-pr 0.4.6 
X-GNATS-Notify:

>Number:         93312
>Category:       ports
>Synopsis:       [PATCH] www/opera-devel: enable installation of 4.x static binaries on FreeBSD >= 5
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    krion
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 13 22:00:14 GMT 2006
>Closed-Date:    Tue Feb 14 17:48:31 GMT 2006
>Last-Modified:  Tue Feb 14 17:48:31 GMT 2006
>Originator:     Arjan van Leeuwen
>Release:        FreeBSD 6.0-RELEASE i386
>Organization:
>Environment:


System: FreeBSD 6.0-RELEASE #13: Sun Nov  6 14:50:54 CET 2005
    root@winston.piwebs.com:/usr/obj/usr/src/sys/WINSTON



>Description:


This patch gives the user the option to install a version of Opera
that either uses a shared Qt library or a statically linked one.

Because there are no static builds available for FreeBSD >= 5, 
choosing a static build on these systems installs the FreeBSD 4.x
binary and depends on compatxx ports.

Requested by: Kirill Ponomarew <krion at voodoo dot bawue dot com>


>How-To-Repeat:





>Fix:


--- opera-devel.diff begins here ---
diff -urN /usr/ports/www/opera-devel/Makefile opera-devel/Makefile
--- /usr/ports/www/opera-devel/Makefile	Sat Feb 11 07:22:48 2006
+++ opera-devel/Makefile	Mon Feb 13 22:45:27 2006
@@ -31,22 +31,27 @@
 NO_BUILD=	yes
 NO_FILTER_SHLIBS=yes
 
-.ifndef(WITHOUT_ASPELL)
+OPTIONS=	SHARED	"Use a shared Qt library (instead of static)"	${QT_PRESENT} \
+		ASPELL	"Use the aspell library for spell checking"	on
+
+.ifdef(WITH_ASPELL)
 LIB_DEPENDS+=	aspell.16:${PORTSDIR}/textproc/aspell
 .endif
 
+.if exists(${X11BASE}/lib/libqt-mt.prl)
+QT_PRESENT=     on
+.else
+QT_PRESENT=     off
+.endif
+
 .include <bsd.port.pre.mk>
 
 .if ${OSVERSION} >= 600000
 OPERA_TYPE=	4
-WITH_SHARED=	yes
 .elif ${OSVERSION} >= 500000
 OPERA_TYPE=	3
-WITH_SHARED=	yes
-.elifdef WITH_SHARED
-OPERA_TYPE=	2
 .else
-OPERA_TYPE=	1
+OPERA_TYPE=	2
 .endif
 
 .if defined(WITH_SHARED)
@@ -54,6 +59,14 @@
 LIB_DEPENDS+=	qt-mt:${PORTSDIR}/x11-toolkits/qt33
 .else
 OPERA_LIB=	static
+OPERA_TYPE=	1
+.endif
+
+.if ${OPERA_TYPE} == 1 && ${OSVERSION} >= 500000
+LIB_DEPENDS+=	c_r.4:${PORTSDIR}/misc/compat4x
+.if ${OSVERSION} >= 600000
+LIB_DEPENDS+=	z.2:${PORTSDIR}/misc/compat5x
+.endif
 .endif
 
 .if ${HAVE_GNOME:Mgnomehier}!=""
@@ -66,18 +79,6 @@
 PLIST_SUB+=	KDE=""
 .else
 PLIST_SUB+=	KDE="@comment "
-.endif
-
-pre-everything::
-.if !defined(WITHOUT_ASPELL) || !defined(WITH_SHARED)
-	@${ECHO_CMD} '===> The following options are available for this port:'
-	@${ECHO_CMD} '===>'
-.if !defined(WITHOUT_ASPELL)
-	@${ECHO_CMD} '===> Define WITHOUT_ASPELL to not install aspell.'
-.endif
-.if !defined(WITH_SHARED)
-	@${ECHO_CMD} '===> Define WITH_SHARED to use a shared Qt library.'
-.endif
 .endif
 
 post-patch:
--- opera-devel.diff ends here ---



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: krion 
State-Changed-When: Tue Feb 14 17:42:38 UTC 2006 
State-Changed-Why:  
Seems fine, you need to move WITH_ASPELL after bsd.port.pre.mk though. 


Responsible-Changed-From-To: freebsd-ports-bugs->krion 
Responsible-Changed-By: krion 
Responsible-Changed-When: Tue Feb 14 17:42:38 UTC 2006 
Responsible-Changed-Why:  
Seems fine, you need to move WITH_ASPELL after bsd.port.pre.mk though. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=93312 
State-Changed-From-To: feedback->closed 
State-Changed-By: krion 
State-Changed-When: Tue Feb 14 17:48:26 UTC 2006 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=93312 
>Unformatted:
