ports/187133: www/trac: fix rc script; backport fix for upstream #11345
Andrew Childs
lorne at cons.org.nz
Fri Feb 28 09:50:03 UTC 2014
>Number: 187133
>Category: ports
>Synopsis: www/trac: fix rc script; backport fix for upstream #11345
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Feb 28 09:50:02 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Andrew Childs
>Release: FreeBSD 10.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD northind.cons.org.nz 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 16 22:34:59 UTC 2014 root at snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
1. Add PYTHON_CMD to SUB_LIST to fix the following in the rc script:
command="%%PYTHON_CMD%%"
2. Backport a fix from upstream #11345 [1]. Not a FreeBSD or ports
specific problem, but prevents some functionality from working by
default. If this is an inappropriate change for ports please
cherry-pick the SUB_LIST fix.
[1] http://trac.edgewall.org/ticket/11345
>How-To-Repeat:
>Fix:
--- trac.patch begins here ---
diff --git a/www/trac/Makefile b/www/trac/Makefile
index 24527ee..289fbd6 100644
--- a/www/trac/Makefile
+++ b/www/trac/Makefile
@@ -51,6 +51,7 @@ USE_PYTHON= 2
USE_PYDISTUTILS= yes
PYDISTUTILS_AUTOPLIST= yes
USE_RC_SUBR= tracd
+SUB_LIST= PYTHON_CMD=${PYTHON_CMD}
post-install:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/sample-plugins
diff --git a/www/trac/files/patch-trac_util_translation.py b/www/trac/files/patch-trac_util_translation.py
new file mode 100644
index 0000000..4f68fe0
--- /dev/null
+++ b/www/trac/files/patch-trac_util_translation.py
@@ -0,0 +1,32 @@
+Backported from fixes contained in http://trac.edgewall.org/ticket/11345
+
+--- trac/util/translation.py.orig
++++ trac/util/translation.py
+@@ -150,6 +150,6 @@
+ t = self._null_translations
+ else:
+- t.add(Translations.load(locale_dir, locale or 'en_US',
+- 'tracini'))
++ self._add(t, Translations.load(locale_dir, locale or 'en_US',
++ 'tracini'))
+ if env_path:
+ with self._plugin_domains_lock:
+@@ -157,5 +157,6 @@
+ domains = domains.items()
+ for domain, dirname in domains:
+- t.add(Translations.load(dirname, locale, domain))
++ self._add(t, Translations.load(dirname, locale,
++ domain))
+ self._current.translations = t
+ self._activate_failed = False
+@@ -184,4 +185,10 @@
+ return self._current.translations is not None \
+ or self._activate_failed
++
++ # Internal methods
++
++ def _add(self, t, translations):
++ if isinstance(translations, Translations):
++ t.add(translations)
+
+ # Delegated methods
--- trac.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list