Index: textproc/pootle/Makefile =================================================================== --- textproc/pootle/Makefile +++ textproc/pootle/Makefile @@ -2,34 +2,34 @@ # $FreeBSD$ PORTNAME= pootle -PORTVERSION= 2.5.1.3 -PORTREVISION= 1 +PORTVERSION= 2.7.5 CATEGORIES= textproc -MASTER_SITES= CHEESESHOP -DISTNAME= Pootle-${PORTVERSION} MAINTAINER= rene@FreeBSD.org COMMENT= User-friendly web portal for simple translation process -LICENSE= GPLv2 +LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE -RUN_DEPENDS= translate-toolkit>=1.11.0:textproc/translate-toolkit \ - ${PYTHON_PKGNAMEPREFIX}south>=0.7.6:databases/py-south\ - ${PYTHON_PKGNAMEPREFIX}cssmin>=0.1.4:www/py-cssmin \ - ${PYTHON_PKGNAMEPREFIX}lxml>=2.1.4:devel/py-lxml \ - ${PYTHON_PKGNAMEPREFIX}argparse>=0:devel/py-argparse \ - ${PYTHON_PKGNAMEPREFIX}django-taggit>0.10:www/py-django-taggit \ - ${PYTHON_PKGNAMEPREFIX}django-assets>=0.8:www/py-django-assets \ - ${PYTHON_PKGNAMEPREFIX}south>=0.7.6:databases/py-south \ - ${PYTHON_PKGNAMEPREFIX}django-voting>=0.1:www/py-django-voting \ - ${PYTHON_PKGNAMEPREFIX}simplejson>=0:devel/py-simplejson \ - ${PYTHON_PKGNAMEPREFIX}diff-match-patch>=0:textproc/py-diff-match-patch -# actually diff-match-patch is a dependency of translate-toolkit, -# but only this port uses it. +USE_GITHUB= yes +GH_ACCOUNT= translate + +RUN_DEPENDS= translate-toolkit>=1.13.0:textproc/translate-toolkit \ + ${PYTHON_PKGNAMEPREFIX}argparse>0:devel/py-argparse \ + ${PYTHON_PKGNAMEPREFIX}cssmin>0:www/py-cssmin \ + ${PYTHON_PKGNAMEPREFIX}diff-match-patch>=0.0.0.20121119:textproc/py-diff-match-patch \ + ${PYTHON_PKGNAMEPREFIX}django-assets>=0.10:www/py-django-assets \ + ${PYTHON_PKGNAMEPREFIX}django-allauth>=0.24.1:www/py-django-allauth \ + ${PYTHON_PKGNAMEPREFIX}django-contact-form>=1.0:www/py-django-contact-form \ + ${PYTHON_PKGNAMEPREFIX}django-redis>=0:www/py-django-redis \ + ${PYTHON_PKGNAMEPREFIX}django-overextends>=0.3.2:www/py-django-overextends \ + ${PYTHON_PKGNAMEPREFIX}django-rq>0:devel/py-django-rq \ + ${PYTHON_PKGNAMEPREFIX}django-transaction-hooks>0:databases/py-django-transaction-hooks \ + ${PYTHON_PKGNAMEPREFIX}python-openid>0:security/py-python-openid \ + ${PYTHON_PKGNAMEPREFIX}requests-oauthlib>0:www/py-requests-oauthlib NO_ARCH= yes -USES= gettext python tar:bzip2 +USES= gettext python sqlite USE_PYTHON= autoplist distutils USERS= pootle @@ -41,31 +41,27 @@ USE_RC_SUBR= pootle SUB_LIST+= PYTHON_CMD="${PYTHON_CMD}" -PORTDOCS= CREDITS INSTALL LICENSE - -OPTIONS_DEFINE= DOCS LDAP MEMCACHED MYSQL PGSQL -OPTIONS_DEFAULT=MEMCACHED MYSQL - -MEMCACHED_DESC= Use memcached to improve performance - -MYSQL_USE= MYSQL=yes - -LDAP_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}ldap2>0:devel/py-ldap2 +PORTDOCS= AUTHORS CONTRIBUTING.rst INSTALL LICENSE README.rst -MEMCACHED_LIB_DEPENDS= libmemcached.so:databases/libmemcached -MEMCACHED_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}python-memcached>=1.45:databases/py-python-memcached +OPTIONS_DEFINE= DOCS SVN +OPTIONS_SINGLE= DB +OPTIONS_SINGLE_DB=MYSQL PGSQL +OPTIONS_DEFAULT=MYSQL +MYSQL_USES= mysql MYSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}MySQLdb>0:databases/py-MySQLdb PGSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}psycopg2>0:databases/py-psycopg2 -SUBVERSION_RUN_DEPENDS= svn:devel/subversion +SVN_RUN_DEPENDS= svn:devel/subversion pre-configure: - @${REINPLACE_CMD} -e "s/,<0.11.2//g" \ - -e "s/,<0.8//g" \ - -e "s/==0.1//g" \ - -e "s/,<1.5//g" \ + # remove empty test file which conflicts with py*-django-assets + @${RM} ${WRKSRC}/tests/__init__.py + @${REINPLACE_CMD} -e "s/,<1.8//g" \ + -e "s/==1.0/>=1.0/g" \ + -e "s/<=0.9.0//g" \ + -e "/elasticsearch/d" \ ${WRKSRC}/requirements/base.txt post-install-DOCS-on: Index: textproc/pootle/distinfo =================================================================== --- textproc/pootle/distinfo +++ textproc/pootle/distinfo @@ -1,2 +1,3 @@ -SHA256 (Pootle-2.5.1.3.tar.bz2) = f0303896af702f6bc6cbd7f28fae9478f3f11e804c6f0194c1fb34d2557f4243 -SIZE (Pootle-2.5.1.3.tar.bz2) = 6387947 +TIMESTAMP = 1463913080 +SHA256 (translate-pootle-2.7.5_GH0.tar.gz) = a10e61e2fc5fbb587cf611cfde380bffc5e9f115cbe3d33bd3bdf765832fe531 +SIZE (translate-pootle-2.7.5_GH0.tar.gz) = 6908107 Index: textproc/pootle/files/patch-pootle_apps_djblets_util_fields.py =================================================================== --- textproc/pootle/files/patch-pootle_apps_djblets_util_fields.py +++ textproc/pootle/files/patch-pootle_apps_djblets_util_fields.py @@ -1,11 +0,0 @@ ---- pootle/apps/djblets/util/fields.py.orig 2015-06-03 13:30:23 UTC -+++ pootle/apps/djblets/util/fields.py -@@ -30,7 +30,7 @@ from datetime import datetime - from django.conf import settings - from django.core.serializers.json import DjangoJSONEncoder - from django.db import models --from django.utils import simplejson -+import simplejson - from django.utils.encoding import smart_unicode - - Index: textproc/pootle/files/patch-pootle_apps_pootle__app_views_admin_dashboard.py =================================================================== --- textproc/pootle/files/patch-pootle_apps_pootle__app_views_admin_dashboard.py +++ textproc/pootle/files/patch-pootle_apps_pootle__app_views_admin_dashboard.py @@ -1,11 +0,0 @@ ---- pootle/apps/pootle_app/views/admin/dashboard.py.orig 2015-06-03 13:30:23 UTC -+++ pootle/apps/pootle_app/views/admin/dashboard.py -@@ -26,7 +26,7 @@ from django.core.cache import cache - from django.http import HttpResponse - from django.shortcuts import render_to_response - from django.template import RequestContext --from django.utils import simplejson -+import simplejson - from django.utils.translation import ugettext as _ - - from pootle import depcheck Index: textproc/pootle/files/patch-pootle_apps_pootle__misc_forms.py =================================================================== --- textproc/pootle/files/patch-pootle_apps_pootle__misc_forms.py +++ textproc/pootle/files/patch-pootle_apps_pootle__misc_forms.py @@ -1,11 +0,0 @@ ---- pootle/apps/pootle_misc/forms.py.orig 2015-06-03 13:30:23 UTC -+++ pootle/apps/pootle_misc/forms.py -@@ -79,7 +79,7 @@ def make_search_form(*args, **kwargs): - - if sparams_cookie: - import urllib -- from django.utils import simplejson -+ import simplejson - - initial_sparams = simplejson.loads(urllib.unquote(sparams_cookie)) - if isinstance(initial_sparams, dict): Index: textproc/pootle/files/patch-pootle_apps_pootle__misc_util.py =================================================================== --- textproc/pootle/files/patch-pootle_apps_pootle__misc_util.py +++ textproc/pootle/files/patch-pootle_apps_pootle__misc_util.py @@ -1,12 +0,0 @@ ---- pootle/apps/pootle_misc/util.py.orig 2015-06-03 13:30:23 UTC -+++ pootle/apps/pootle_misc/util.py -@@ -25,7 +25,8 @@ from django.conf import settings - from django.core.cache import cache - from django.core.paginator import Paginator - from django.http import HttpResponseBadRequest --from django.utils import simplejson, timezone -+from django.utils import timezone -+import simplejson - from django.utils.encoding import force_unicode, iri_to_uri - from django.utils.functional import Promise - Index: textproc/pootle/files/patch-pootle_apps_pootle__store_models.py =================================================================== --- textproc/pootle/files/patch-pootle_apps_pootle__store_models.py +++ textproc/pootle/files/patch-pootle_apps_pootle__store_models.py @@ -1,58 +0,0 @@ ---- pootle/apps/pootle_store/models.py.orig 2015-06-03 13:30:23 UTC -+++ pootle/apps/pootle_store/models.py -@@ -32,9 +32,8 @@ from django.conf import settings - from django.core.exceptions import ObjectDoesNotExist - from django.core.files.storage import FileSystemStorage - from django.core.urlresolvers import reverse --from django.db import models, DatabaseError, IntegrityError -+from django.db import models, transaction, DatabaseError, IntegrityError - from django.db.models.signals import post_delete, post_save, pre_delete --from django.db.transaction import commit_on_success - from django.utils import timezone, tzinfo - from django.utils.translation import ugettext_lazy as _ - -@@ -1102,7 +1101,7 @@ class Store(models.Model, base.Translati - - return False - -- @commit_on_success -+ @transaction.atomic - def parse(self, store=None): - self.clean_stale_lock() - -@@ -1154,7 +1153,7 @@ class Store(models.Model, base.Translati - if obsolete_unit: - obsolete_unit.delete() - -- @commit_on_success -+ @transaction.atomic - def update(self, update_structure=False, update_translation=False, - store=None, fuzzy=False, only_newer=False, modified_since=0): - """Update DB with units from file. -@@ -1320,7 +1319,7 @@ class Store(models.Model, base.Translati - # new qualitychecks, let's flush cache - deletefromcache(self, ["getcompletestats"]) - -- @commit_on_success -+ @transaction.atomic - def update_qualitychecks(self): - logging.debug(u"Updating quality checks for %s", self.pootle_path) - for unit in self.units.iterator(): -@@ -1583,7 +1582,7 @@ class Store(models.Model, base.Translati - """Returns a single unit based on the item number.""" - return self.units[item] - -- @commit_on_success -+ @transaction.atomic - def mergefile(self, newfile, profile, allownewstrings, suggestions, - notranslate, obsoletemissing): - """Merges :param:`newfile` with the current store. -@@ -1778,7 +1777,7 @@ class Store(models.Model, base.Translati - self.pending = pending_name - self.save() - -- @commit_on_success -+ @transaction.atomic - def import_pending(self): - """import suggestions from legacy .pending files, into database""" - self.init_pending() Index: textproc/pootle/files/patch-pootle_apps_pootle__store_views.py =================================================================== --- textproc/pootle/files/patch-pootle_apps_pootle__store_views.py +++ textproc/pootle/files/patch-pootle_apps_pootle__store_views.py @@ -1,12 +0,0 @@ ---- pootle/apps/pootle_store/views.py.orig 2015-06-03 13:30:23 UTC -+++ pootle/apps/pootle_store/views.py -@@ -35,7 +35,8 @@ from django.shortcuts import get_object_ - from django.template import loader, RequestContext - from django.utils.translation import to_locale, ugettext as _ - from django.utils.translation.trans_real import parse_accept_lang_header --from django.utils import simplejson, timezone -+from django.utils import timezone -+import simplejson - from django.utils.encoding import iri_to_uri - from django.views.decorators.cache import never_cache - from django.views.decorators.http import require_POST Index: textproc/pootle/files/patch-pootle_apps_pootle__terminology_views.py =================================================================== --- textproc/pootle/files/patch-pootle_apps_pootle__terminology_views.py +++ textproc/pootle/files/patch-pootle_apps_pootle__terminology_views.py @@ -1,20 +0,0 @@ ---- pootle/apps/pootle_terminology/views.py.orig 2015-06-03 13:30:23 UTC -+++ pootle/apps/pootle_terminology/views.py -@@ -19,7 +19,7 @@ - # Pootle; if not, see . - - from django.conf import settings --from django.db.transaction import commit_on_success -+from django.db import transaction - from django.shortcuts import render_to_response - from django.template import RequestContext - from django.utils.translation import ugettext as _ -@@ -63,7 +63,7 @@ def get_terminology_filename(translation - return 'pootle-terminology.' + translation_project.project.localfiletype - - --@commit_on_success -+@transaction.atomic - @get_path_obj - @permission_required('administrate') - def extract(request, translation_project): Index: textproc/pootle/files/patch-pootle_apps_registration_models.py =================================================================== --- textproc/pootle/files/patch-pootle_apps_registration_models.py +++ textproc/pootle/files/patch-pootle_apps_registration_models.py @@ -1,36 +0,0 @@ ---- pootle/apps/registration/models.py.orig 2015-06-03 13:30:23 UTC -+++ pootle/apps/registration/models.py -@@ -1,4 +1,5 @@ - import datetime -+import hashlib - import random - import re - -@@ -8,7 +9,6 @@ from django.contrib.sites.models import - from django.db import models - from django.db import transaction - from django.template.loader import render_to_string --from django.utils.hashcompat import sha_constructor - from django.utils.translation import ugettext_lazy as _ - - -@@ -146,7 +146,7 @@ class RegistrationManager(models.Manager - msg.send() - user_registered.send(sender=self.model, user=new_user) - return new_user -- create_inactive_user = transaction.commit_on_success(create_inactive_user) -+ create_inactive_user = transaction.atomic(create_inactive_user) - - def create_profile(self, user): - """ -@@ -158,8 +158,8 @@ class RegistrationManager(models.Manager - username and a random salt. - - """ -- salt = sha_constructor(str(random.random())).hexdigest()[:5] -- activation_key = sha_constructor(salt+user.email).hexdigest() -+ salt = hashlib.sha1(str(random.random())).hexdigest()[:5] -+ activation_key = hashlib.sha1(salt+user.email).hexdigest() - return self.create(user=user, - activation_key=activation_key) - Index: textproc/pootle/files/patch-pootle_middleware_captcha.py =================================================================== --- textproc/pootle/files/patch-pootle_middleware_captcha.py +++ textproc/pootle/files/patch-pootle_middleware_captcha.py @@ -1,11 +0,0 @@ ---- pootle/middleware/captcha.py.orig 2015-06-03 13:30:24 UTC -+++ pootle/middleware/captcha.py -@@ -29,7 +29,7 @@ from django.conf import settings - from django.http import HttpResponse - from django.shortcuts import render_to_response - from django.template import loader, RequestContext --from django.utils import simplejson -+import simplejson - from django.utils.translation import ugettext as _ - - Index: textproc/pootle/files/patch-pootle_middleware_errorpages.py =================================================================== --- textproc/pootle/files/patch-pootle_middleware_errorpages.py +++ textproc/pootle/files/patch-pootle_middleware_errorpages.py @@ -1,11 +0,0 @@ ---- pootle/middleware/errorpages.py.orig 2015-06-03 13:30:24 UTC -+++ pootle/middleware/errorpages.py -@@ -28,7 +28,7 @@ from django.http import (Http404, HttpRe - HttpResponseServerError) - from django.template import RequestContext - from django.template.loader import render_to_string --from django.utils import simplejson -+import simplejson - from django.utils.encoding import force_unicode - from django.utils.translation import ugettext as _ - Index: textproc/pootle/pkg-descr =================================================================== --- textproc/pootle/pkg-descr +++ textproc/pootle/pkg-descr @@ -5,4 +5,4 @@ You can run Pootle as an Internet server like these projects or run your own copy on an Intranet. -WWW: http://translate.sourceforge.net/wiki/pootle/index +WWW: http://docs.translatehouse.org/projects/pootle/