$OpenBSD: patch-devede_py,v 1.15 2011/06/20 13:24:28 ajacoutot Exp $
--- devede.py.orig	Sat Jul  3 00:09:18 2010
+++ devede.py	Mon Jun 20 15:19:37 2011
@@ -19,6 +19,13 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+try:
+  import psyco
+  import re
+  psyco.cannotcompile(re.compile)
+  psyco.profile()
+except ImportError:
+  pass
 
 import sys
 import os
@@ -35,7 +42,7 @@ import pickle
 import cairo
 
 print "DeVeDe 3.16.9"
-if (sys.platform!="win32") and (sys.platform!="win64"):
+if (sys.platform!="win32") and (sys.platform!="win64") and not sys.platform.startswith('openbsd'):
 	try:
 		print "Locale: "+str(os.environ["LANG"])
 	except:
@@ -44,7 +51,7 @@ if (sys.platform!="win32") and (sys.platform!="win64")
 # append the directories where we install the devede's own modules
 tipo=-1
 try:
-	fichero=open("/usr/share/devede/wmain.ui","r")
+	fichero=open("${PREFIX}/share/devede/wmain.ui","r")
 	fichero.close()
 	tipo=0
 	found=True
@@ -78,13 +85,13 @@ if tipo==0:
 	#arbol=gtk.Builder("/usr/share/devede/devede.glade",domain="devede")
 	# append the directories where we install the devede's own modules
 
-	share_locale="/usr/share/locale"
-	glade="/usr/share/devede"
-	sys.path.append("/usr/lib/devede")
-	font_path="/usr/share/devede"
-	pic_path="/usr/share/devede"
-	other_path="/usr/share/devede"
-	help_path="/usr/share/doc/devede"
+	share_locale="${PREFIX}/share/locale"
+	glade="${PREFIX}/share/devede"
+	sys.path.append("${MODPY_SITEPKG}/devede")
+	font_path="${PREFIX}/share/devede"
+	pic_path="${PREFIX}/share/devede"
+	other_path="${PREFIX}/share/devede"
+	help_path="${PREFIX}/share/doc/devede"
 	print "Using package-installed files"
 	
 elif tipo==1:
