View | Details | Raw Unified | Return to bug 161138
Collapse All | Expand All

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

Return to bug 161138