Hi.
This diff remove the lock file under ~/.opera/ when starting a new
instance.
I find it very usefull because since Opera tends to crash/hangs more and
more often lately, recovering from it means manually removing this file
most of the time so having it automatically removed means you can just
restart opera without doing anything else.
It also happened to me several times that when closing Opera, it did not
close correctly (without notifying) and the lock file would stay lying
around...
The purpose of this lock file is to prevent several intances of Opera
running, but we don't care because if it is already running, it will
open in a new tab and not create a new instance.
Comments / ok?
Index: Makefile
===================================================================
RCS file: /cvs/ports/www/opera/Makefile,v
retrieving revision 1.64
diff -u -r1.64 Makefile
--- Makefile 20 Mar 2010 16:51:42 -0000 1.64
+++ Makefile 9 Jun 2010 17:35:02 -0000
@@ -8,7 +8,7 @@
V= 10.10
OPERA_BUILD= 4742
DISTNAME= opera-${V}.gcc4-shared-qt3.i386
-PKGNAME= opera-${V}p1
+PKGNAME= opera-${V}p2
CATEGORIES= www
HOMEPAGE= http://www.opera.com/
Index: patches/patch-install_sh
===================================================================
RCS file: /cvs/ports/www/opera/patches/patch-install_sh,v
retrieving revision 1.23
diff -u -r1.23 patch-install_sh
--- patches/patch-install_sh 3 Nov 2009 05:50:21 -0000 1.23
+++ patches/patch-install_sh 9 Jun 2010 17:35:02 -0000
@@ -1,6 +1,6 @@
$OpenBSD: patch-install_sh,v 1.23 2009/11/03 05:50:21 sturm Exp $
---- install.sh.orig Mon Oct 19 17:55:07 2009
-+++ install.sh Mon Nov 2 14:11:30 2009
+--- install.sh.orig Fri Nov 20 20:11:15 2009
++++ install.sh Wed Jun 9 19:33:20 2010
@@ -870,7 +870,7 @@ generate_wrapper()
wrapper_contain="#!/bin/sh
@@ -30,3 +30,16 @@
# To disable the first workaround, comment the next line.
JAVA_WORKAROUND=\`\${OPERA_BINARYDIR}/works 2>/dev/null\`
+@@ -1125,6 +1119,12 @@ test -d /usr/sfw/lib/ && LD_LIBRARY_PATH=\"\${LD_LIBRA
+ esac
+
+ wrapper_contain="${wrapper_contain}
++
++# lock file is not needed as Opera will open a new tab if already
++# running ; this helps recovering from a crash/hang with compat_linux(8)
++if [ -f \${HOME}/.opera/lock ]; then
++ rm -f \${HOME}/.opera/lock
++fi
+
+ # Running Opera
+ exec \"\${OPERA_BINARYDIR}opera\" \"\...@\"
--
Antoine