From 97bb6e437920fcd4d923947e1910cdd0cb05726d Mon Sep 17 00:00:00 2001 From: koobs Date: Thu, 14 Aug 2014 08:55:28 +0000 Subject: www/py-slimit: JavaScript minifier written in Python SlimIt is a JavaScript minifier written in Python. It compiles JavaScript into more compact code so that it downloads and runs faster. SlimIt also provides a library that includes a JavaScript parser, lexer, pretty printer and a tree visitor. WWW: http://slimit.readthedocs.org PR: 191386 (with minor changes) Submitted by: Melvyn Sopacua --- www/Makefile | 1 + www/py-slimit/Makefile | 34 ++++++++++++++++++++++++++++++++++ www/py-slimit/distinfo | 2 ++ www/py-slimit/files/patch-setup.py | 11 +++++++++++ www/py-slimit/pkg-descr | 7 +++++++ 5 files changed, 55 insertions(+) create mode 100644 www/py-slimit/Makefile create mode 100644 www/py-slimit/distinfo create mode 100644 www/py-slimit/files/patch-setup.py create mode 100644 www/py-slimit/pkg-descr diff --git a/www/Makefile b/www/Makefile index a31036e144fe..144bf76d488f 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1684,6 +1684,7 @@ SUBDIR += py-selector SUBDIR += py-selenium SUBDIR += py-slimmer + SUBDIR += py-slimit SUBDIR += py-slumber SUBDIR += py-splinter SUBDIR += py-surl diff --git a/www/py-slimit/Makefile b/www/py-slimit/Makefile new file mode 100644 index 000000000000..25361b55f6ea --- /dev/null +++ b/www/py-slimit/Makefile @@ -0,0 +1,34 @@ +# $FreeBSD$ + +PORTNAME= slimit +PORTVERSION= 0.8.1 +CATEGORIES= www python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= melvyn@magemana.nl +COMMENT= JavaScript minifier written in Python + +LICENSE= BSD3CLAUSE + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}ply>=3.4:${PORTSDIR}/devel/py-ply +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}ply>=3.4:${PORTSDIR}/devel/py-ply + +USES= zip +USE_PYTHON= 2 +USE_PYDISTUTILS= yes +PYDISTUTILS_AUTOPLIST= yes + +# Maintainer: Reminder to keep testing python 3.x compatibility. +.include + +.if ${PYTHON_REL} >= 300 +BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}six>0:${PORTSDIR}/devel/py-six +pre-build: + @cd ${WRKSRC} && 2to3-${PYTHON_VER} -w src +.endif + +regression-test: build + @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test + +.include diff --git a/www/py-slimit/distinfo b/www/py-slimit/distinfo new file mode 100644 index 000000000000..e4801d500f1d --- /dev/null +++ b/www/py-slimit/distinfo @@ -0,0 +1,2 @@ +SHA256 (slimit-0.8.1.zip) = f433dcef899f166b207b67d91d3f7344659cb33b8259818f084167244e17720b +SIZE (slimit-0.8.1.zip) = 88217 diff --git a/www/py-slimit/files/patch-setup.py b/www/py-slimit/files/patch-setup.py new file mode 100644 index 000000000000..1eb407127cba --- /dev/null +++ b/www/py-slimit/files/patch-setup.py @@ -0,0 +1,11 @@ +--- setup.py.orig 2013-03-26 09:09:32.000000000 +0100 ++++ setup.py 2014-08-01 21:18:22.838964037 +0200 +@@ -52,6 +52,7 @@ + """, + classifiers=filter(None, classifiers.split('\n')), + long_description=read('README.rst') + '\n\n' + read('CHANGES'), +- extras_require={'test': []} ++ extras_require={'test': []}, ++ test_suite='slimit.tests', + ) + diff --git a/www/py-slimit/pkg-descr b/www/py-slimit/pkg-descr new file mode 100644 index 000000000000..43ee729fd919 --- /dev/null +++ b/www/py-slimit/pkg-descr @@ -0,0 +1,7 @@ +SlimIt is a JavaScript minifier written in Python. It compiles +JavaScript into more compact code so that it downloads and runs faster. + +SlimIt also provides a library that includes a JavaScript parser, lexer, +pretty printer and a tree visitor. + +WWW: http://slimit.readthedocs.org -- cgit