ports/161138: [UPDATE] misc/diary-hercules: update to 0.1.1

Ruslan Mahmatkhanov cvs-src at yandex.ru
Fri Sep 30 05:20:11 UTC 2011


>Number:         161138
>Category:       ports
>Synopsis:       [UPDATE] misc/diary-hercules: update to 0.1.1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 30 05:20:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Ruslan Mahmatkhanov
>Release:        9.0-BETA2
>Organization:
>Environment:
9.0-BETA2 i386
>Description:
- update to 0.1.1
- add license
- drop dependency on py-PySQLite11, since this version now using py-sqlobject and 
  capable of using py-sqlite3
- do not hardcore USE_WX to 2.6, it works fine to me with wxPython28
- this port is requires unicode version of wxPython
- make it actually work. all the local runtime patches also sent to updstream
  maintainer
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff --git a/Makefile b/Makefile
index 2f113fb..307c833 100644
--- a/Makefile
+++ b/Makefile
@@ -6,21 +6,31 @@
 #
 
 PORTNAME=	hercules
-PORTVERSION=	0.0.3.2
-PORTREVISION=	6
+PORTVERSION=	0.1.1
 CATEGORIES=	misc
-MASTER_SITES=	SF/${PORTNAME}/stable%20branch/${PORTVERSION}
+MASTER_SITES=	SF/${PORTNAME}/development%20branch/${PORTVERSION}
 PKGNAMEPREFIX=	diary-
+DISTNAME=	${PKGNAMEPREFIX}${PORTNAME}-${PORTVERSION}
 
 MAINTAINER=	ports at FreeBSD.org
 COMMENT=	A personal workout diary program for bodybuilders
 
-RUN_DEPENDS=	${PYTHON_SITELIBDIR}/sqlite/__init__.py:${PORTSDIR}/databases/py-PySQLite11
+LICENSE=	GPLv2
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sqlobject>=0.7:${PORTSDIR}/databases/py-sqlobject \
+		${PYTHON_PKGNAMEPREFIX}sqlite3>=0:${PORTSDIR}/databases/py-sqlite3
 
 USE_GETTEXT=	yes
 USE_PYTHON=	2.5+
 USE_PYDISTUTILS=	yes
-USE_WX=		2.6
+USE_WX=		2.6+
+WX_UNICODE=	yes
 WX_COMPS=	python
 
+post-patch:
+	@${REINPLACE_CMD} -e 's#%%PREFIX%%#${PREFIX}#g' \
+		${WRKSRC}/Hercules/globals.py
+post-install:
+	@${CHMOD} +r ${PREFIX}/share/${PORTNAME}/xrc/*.xrc
+
 .include <bsd.port.mk>
diff --git a/distinfo b/distinfo
index c151f71..97edcc6 100644
--- a/distinfo
+++ b/distinfo
@@ -1,2 +1,2 @@
-SHA256 (hercules-0.0.3.2.tar.gz) = b2c476ffd2e83643b95c048b0bd8c783aaf1175595353c464acb6c4b2aa83458
-SIZE (hercules-0.0.3.2.tar.gz) = 25646
+SHA256 (diary-hercules-0.1.1.tar.gz) = 7f7e32458edc373a6a4e97a78261745a2d8ff88217b1b1a4ec82b8bfea358678
+SIZE (diary-hercules-0.1.1.tar.gz) = 44454
diff --git a/files/patch-Hercules-gui_calculators.py b/files/patch-Hercules-gui_calculators.py
new file mode 100644
index 0000000..90c3de7
--- /dev/null
+++ b/files/patch-Hercules-gui_calculators.py
@@ -0,0 +1,35 @@
+--- Hercules/gui/calculators.py.orig	2006-08-12 17:04:23.000000000 +0400
++++ Hercules/gui/calculators.py	2011-09-29 12:56:43.000000000 +0400
+@@ -4,12 +4,12 @@
+ 
+ import wx
+ import wx.xrc as xrc
+-
++from Hercules.globals import sharedir
+ 
+ class IdealBody:
+     """Ideal Body Measurements Calculator"""
+     def __init__(self, parent):
+-        self.resource = xrc.XmlResource('xrc/calculators.xrc')
++        self.resource = xrc.XmlResource(sharedir + 'xrc/calculators.xrc')
+         self.dlg = self.resource.LoadDialog(parent, 'Calc01Dialog')
+ 
+         self.wristBox = xrc.XRCCTRL(self.dlg, 'wristBox')
+@@ -96,7 +96,7 @@
+ class BMICalc:
+     """Body Mass Index calculator for average people only"""
+     def __init__(self, parent):
+-        self.resource = xrc.XmlResource('xrc/calculators.xrc')
++        self.resource = xrc.XmlResource(sharedir + 'xrc/calculators.xrc')
+         self.dlg = self.resource.LoadDialog(parent, 'CalcBMIDialog')
+ 
+         self.maleRadio = xrc.XRCCTRL(self.dlg, 'maleRadio')
+@@ -236,7 +236,7 @@
+ class Cal2KJ:
+     """Calorie KiloJoule Conversion"""
+     def __init__(self, parent):
+-        self.resource = xrc.XmlResource('xrc/calculators.xrc')
++        self.resource = xrc.XmlResource(sharedir + 'xrc/calculators.xrc')
+         self.dlg = self.resource.LoadDialog(parent, 'CalcCal2KJDialog')
+ 
+         self.caloriesBox = xrc.XRCCTRL(self.dlg, 'caloriesBox')
diff --git a/files/patch-Hercules-gui_exercisewizard.py b/files/patch-Hercules-gui_exercisewizard.py
new file mode 100644
index 0000000..09a4803
--- /dev/null
+++ b/files/patch-Hercules-gui_exercisewizard.py
@@ -0,0 +1,20 @@
+--- Hercules/gui/exercisewizard.py.orig	2006-08-27 08:55:00.000000000 +0400
++++ Hercules/gui/exercisewizard.py	2011-09-29 13:00:00.000000000 +0400
+@@ -6,7 +6,7 @@
+ import wx.xrc as xrc
+ import wx.wizard as wiz
+ from Hercules.plugins.net_exrx import *
+-
++from Hercules.globals import sharedir
+ 
+ class WizardPageStart:
+     def __init__(self, parent, page):
+@@ -187,7 +187,7 @@
+         self.exerciseInfo = []
+         
+         # Load resource file with wizard pages
+-        self.resource = xrc.XmlResource('xrc/exercisewizard.xrc')
++        self.resource = xrc.XmlResource(sharedir + 'xrc/exercisewizard.xrc')
+ 
+         # Create the wizard and the pages
+         self.wizard = self.resource.LoadObject(self.parent,
diff --git a/files/patch-Hercules_globals.py b/files/patch-Hercules_globals.py
new file mode 100644
index 0000000..01b1e9f
--- /dev/null
+++ b/files/patch-Hercules_globals.py
@@ -0,0 +1,11 @@
+--- Hercules/globals.py.orig	2006-09-03 11:40:34.000000000 +0400
++++ Hercules/globals.py	2011-09-29 11:54:03.000000000 +0400
+@@ -63,7 +63,7 @@
+         dir = os.path.abspath(os.path.dirname(sys.argv[0]))
+         sharedir = '%s' % dir
+     elif os.name == 'posix':
+-        sharedir = '/usr/share/hercules'
++        sharedir = '%%PREFIX%%/share/hercules/'
+ else:
+     sharedir = ''
+ debug("Using share directory: %s" % sharedir)
diff --git a/files/patch-setup.py b/files/patch-setup.py
new file mode 100644
index 0000000..d0366a9
--- /dev/null
+++ b/files/patch-setup.py
@@ -0,0 +1,26 @@
+--- setup.py.orig	2006-08-19 11:36:16.000000000 +0400
++++ setup.py	2011-09-29 12:09:15.000000000 +0400
+@@ -9,10 +9,14 @@
+     lang = lang[3:-3]
+     i18n.append(('share/locale/%s/LC_MESSAGES' % lang,
+                  ['i18n/%s/LC_MESSAGES/hercules.mo' % lang]))
++i18n.append(('share/hercules/xrc', \
++            ['xrc/calculators.xrc',
++             'xrc/exercisewizard.xrc',
++             'xrc/hercules.xrc']))
+ 
+ setup (name = "hercules",
+        fullname = "The Diary Of Hercules",
+-       version = "0.0.4",
++       version = "0.1.1",
+        description = "Personal workout diary",
+        author = "Basil Shubin",
+        author_email = "bashu at users.sourceforge.net",
+@@ -21,6 +25,6 @@
+        keywords = ["Workout software", "Bodybuilding", "Fitness", "wxPython"],
+ 
+        scripts = ["hercules.py"],
+-       packages = ["Hercules", "Hercules/gui"],
++       packages = ["Hercules", "Hercules/gui", "Hercules/plugins"],
+        data_files = i18n
+        )
diff --git a/pkg-plist b/pkg-plist
index 8ed8152..3c55a81 100644
--- a/pkg-plist
+++ b/pkg-plist
@@ -1,12 +1,13 @@
 bin/hercules.py
-share/locale/cs/LC_MESSAGES/hercules.mo
-share/locale/ru/LC_MESSAGES/hercules.mo
 %%PYTHON_SITELIBDIR%%/Hercules/__init__.py
 %%PYTHON_SITELIBDIR%%/Hercules/__init__.pyc
 %%PYTHON_SITELIBDIR%%/Hercules/__init__.pyo
 %%PYTHON_SITELIBDIR%%/Hercules/debug.py
 %%PYTHON_SITELIBDIR%%/Hercules/debug.pyc
 %%PYTHON_SITELIBDIR%%/Hercules/debug.pyo
+%%PYTHON_SITELIBDIR%%/Hercules/exercises.py
+%%PYTHON_SITELIBDIR%%/Hercules/exercises.pyc
+%%PYTHON_SITELIBDIR%%/Hercules/exercises.pyo
 %%PYTHON_SITELIBDIR%%/Hercules/exercisesql.py
 %%PYTHON_SITELIBDIR%%/Hercules/exercisesql.pyc
 %%PYTHON_SITELIBDIR%%/Hercules/exercisesql.pyo
@@ -19,9 +20,15 @@ share/locale/ru/LC_MESSAGES/hercules.mo
 %%PYTHON_SITELIBDIR%%/Hercules/gui/calculators.py
 %%PYTHON_SITELIBDIR%%/Hercules/gui/calculators.pyc
 %%PYTHON_SITELIBDIR%%/Hercules/gui/calculators.pyo
+%%PYTHON_SITELIBDIR%%/Hercules/gui/exercisedialog.py
+%%PYTHON_SITELIBDIR%%/Hercules/gui/exercisedialog.pyc
+%%PYTHON_SITELIBDIR%%/Hercules/gui/exercisedialog.pyo
 %%PYTHON_SITELIBDIR%%/Hercules/gui/exercisestab.py
 %%PYTHON_SITELIBDIR%%/Hercules/gui/exercisestab.pyc
 %%PYTHON_SITELIBDIR%%/Hercules/gui/exercisestab.pyo
+%%PYTHON_SITELIBDIR%%/Hercules/gui/exercisewizard.py
+%%PYTHON_SITELIBDIR%%/Hercules/gui/exercisewizard.pyc
+%%PYTHON_SITELIBDIR%%/Hercules/gui/exercisewizard.pyo
 %%PYTHON_SITELIBDIR%%/Hercules/gui/mainframe.py
 %%PYTHON_SITELIBDIR%%/Hercules/gui/mainframe.pyc
 %%PYTHON_SITELIBDIR%%/Hercules/gui/mainframe.pyo
@@ -37,8 +44,25 @@ share/locale/ru/LC_MESSAGES/hercules.mo
 %%PYTHON_SITELIBDIR%%/Hercules/main.py
 %%PYTHON_SITELIBDIR%%/Hercules/main.pyc
 %%PYTHON_SITELIBDIR%%/Hercules/main.pyo
+%%PYTHON_SITELIBDIR%%/Hercules/plugins/__init__.py
+%%PYTHON_SITELIBDIR%%/Hercules/plugins/__init__.pyc
+%%PYTHON_SITELIBDIR%%/Hercules/plugins/__init__.pyo
+%%PYTHON_SITELIBDIR%%/Hercules/plugins/net_exrx.py
+%%PYTHON_SITELIBDIR%%/Hercules/plugins/net_exrx.pyc
+%%PYTHON_SITELIBDIR%%/Hercules/plugins/net_exrx.pyo
+%%PYTHON_SITELIBDIR%%/Hercules/workouts.py
+%%PYTHON_SITELIBDIR%%/Hercules/workouts.pyc
+%%PYTHON_SITELIBDIR%%/Hercules/workouts.pyo
 %%PYTHON_SITELIBDIR%%/Hercules/workoutsql.py
 %%PYTHON_SITELIBDIR%%/Hercules/workoutsql.pyc
 %%PYTHON_SITELIBDIR%%/Hercules/workoutsql.pyo
+share/hercules/xrc/calculators.xrc
+share/hercules/xrc/exercisewizard.xrc
+share/hercules/xrc/hercules.xrc
+share/locale/cs/LC_MESSAGES/hercules.mo
+share/locale/ru/LC_MESSAGES/hercules.mo
+ at dirrm share/hercules/xrc
+ at dirrm share/hercules
+ at dirrm %%PYTHON_SITELIBDIR%%/Hercules/plugins
 @dirrm %%PYTHON_SITELIBDIR%%/Hercules/gui
 @dirrm %%PYTHON_SITELIBDIR%%/Hercules


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



More information about the freebsd-ports-bugs mailing list