aboutsummaryrefslogtreecommitdiff
path: root/misc/diary-hercules
diff options
context:
space:
mode:
authorGreg Larkin <glarkin@FreeBSD.org>2011-09-30 17:36:53 +0000
committerGreg Larkin <glarkin@FreeBSD.org>2011-09-30 17:36:53 +0000
commit3d48f0ec20d101d91c11272d71172194786dae88 (patch)
treed70fa03f577f51a0f320188b3c8b3d57b5cf3a3b /misc/diary-hercules
parent68fa29e30c4ed01360b7a791dcbd29d9f9b4b24a (diff)
downloadports-3d48f0ec20d101d91c11272d71172194786dae88.tar.gz
ports-3d48f0ec20d101d91c11272d71172194786dae88.zip
Notes
Diffstat (limited to 'misc/diary-hercules')
-rw-r--r--misc/diary-hercules/Makefile20
-rw-r--r--misc/diary-hercules/distinfo4
-rw-r--r--misc/diary-hercules/files/patch-Hercules-gui_calculators.py35
-rw-r--r--misc/diary-hercules/files/patch-Hercules-gui_exercisewizard.py20
-rw-r--r--misc/diary-hercules/files/patch-Hercules_globals.py11
-rw-r--r--misc/diary-hercules/files/patch-setup.py26
-rw-r--r--misc/diary-hercules/pkg-descr4
-rw-r--r--misc/diary-hercules/pkg-plist28
8 files changed, 137 insertions, 11 deletions
diff --git a/misc/diary-hercules/Makefile b/misc/diary-hercules/Makefile
index 728468bcc3e6..3e2d17504e52 100644
--- a/misc/diary-hercules/Makefile
+++ b/misc/diary-hercules/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@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/misc/diary-hercules/distinfo b/misc/diary-hercules/distinfo
index c151f7191f29..97edcc684c67 100644
--- a/misc/diary-hercules/distinfo
+++ b/misc/diary-hercules/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/misc/diary-hercules/files/patch-Hercules-gui_calculators.py b/misc/diary-hercules/files/patch-Hercules-gui_calculators.py
new file mode 100644
index 000000000000..90c3de7873b4
--- /dev/null
+++ b/misc/diary-hercules/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/misc/diary-hercules/files/patch-Hercules-gui_exercisewizard.py b/misc/diary-hercules/files/patch-Hercules-gui_exercisewizard.py
new file mode 100644
index 000000000000..09a4803d6ec7
--- /dev/null
+++ b/misc/diary-hercules/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/misc/diary-hercules/files/patch-Hercules_globals.py b/misc/diary-hercules/files/patch-Hercules_globals.py
new file mode 100644
index 000000000000..01b1e9fa495c
--- /dev/null
+++ b/misc/diary-hercules/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/misc/diary-hercules/files/patch-setup.py b/misc/diary-hercules/files/patch-setup.py
new file mode 100644
index 000000000000..d0366a92e659
--- /dev/null
+++ b/misc/diary-hercules/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@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/misc/diary-hercules/pkg-descr b/misc/diary-hercules/pkg-descr
index b4413a59ad3a..77779ce27021 100644
--- a/misc/diary-hercules/pkg-descr
+++ b/misc/diary-hercules/pkg-descr
@@ -1,5 +1,5 @@
Hercules is a personal workout diary program for bodybuilders.
-Hercules written on Python with wxPython GUI library. To store
-data its use SQLite.
+It is written in Python with the wxPython GUI library and uses
+SQLite to store its data.
WWW: http://sourceforge.net/projects/hercules/
diff --git a/misc/diary-hercules/pkg-plist b/misc/diary-hercules/pkg-plist
index 8ed815251a71..3c55a810af4f 100644
--- a/misc/diary-hercules/pkg-plist
+++ b/misc/diary-hercules/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
+@dirrm share/hercules/xrc
+@dirrm share/hercules
+@dirrm %%PYTHON_SITELIBDIR%%/Hercules/plugins
@dirrm %%PYTHON_SITELIBDIR%%/Hercules/gui
@dirrm %%PYTHON_SITELIBDIR%%/Hercules