From 6e11b5eae6da6f09e21bf0a16a02d635c501f575 Mon Sep 17 00:00:00 2001 From: Herve Quiroz Date: Thu, 8 Jun 2006 08:02:53 +0000 Subject: [PATCH] ObfuscateJS compress your Javascript files. The obfuscator currently removes whitespace and comments. It renames variable names with a local scope to a shorter version, and as an advanced option it renames all variables with a certain prefix to a shorter name WWW: http://tools.2vi.nl/ PR: 98376 Submitted by: Nicola Vitale --- devel/Makefile | 1 + devel/obfuscatejs/Makefile | 39 ++++++++++++++++++++++++++ devel/obfuscatejs/distinfo | 3 ++ devel/obfuscatejs/files/obfuscatejs.in | 4 +++ devel/obfuscatejs/pkg-descr | 9 ++++++ devel/obfuscatejs/pkg-plist | 4 +++ 6 files changed, 60 insertions(+) create mode 100644 devel/obfuscatejs/Makefile create mode 100644 devel/obfuscatejs/distinfo create mode 100644 devel/obfuscatejs/files/obfuscatejs.in create mode 100644 devel/obfuscatejs/pkg-descr create mode 100644 devel/obfuscatejs/pkg-plist diff --git a/devel/Makefile b/devel/Makefile index 9b986f554251..320b64676bd1 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -666,6 +666,7 @@ SUBDIR += nx SUBDIR += oaf SUBDIR += obby + SUBDIR += obfuscatejs SUBDIR += ocaml-camomile SUBDIR += ocaml-classes SUBDIR += ocaml-equeue diff --git a/devel/obfuscatejs/Makefile b/devel/obfuscatejs/Makefile new file mode 100644 index 000000000000..0ea969e8cd2f --- /dev/null +++ b/devel/obfuscatejs/Makefile @@ -0,0 +1,39 @@ +# New ports collection makefile for: obfuscatejs +# Date created: 2006-04-21 +# Whom: Nicola Vitale +# +# $FreeBSD$ +# + +PORTNAME= obfuscatejs +PORTVERSION= 0.3.1 +CATEGORIES= devel java +MASTER_SITES= http://tools.2vi.nl/ \ + http://nivi.interfree.it/distfiles/${DIST_SUBDIR}/ +DISTNAME= consyntools +EXTRACT_SUFX= .jar +DIST_SUBDIR= ${PORTNAME}/${PORTVERSION} +EXTRACT_ONLY= + +MAINTAINER= nivit@email.it +COMMENT= A JavaScript code obfuscator + +RUN_DEPENDS= java:${PORTSDIR}/java/javavmwrapper + +NO_BUILD= yes +USE_JAVA= yes +JAVA_VERSION= 1.4+ + +SUB_FILES= ${PORTNAME} +SUB_LIST= OBFUSCATEJSJAR=${DATADIR}/${OBFUSCATEJSJAR} + +DATADIR= ${JAVASHAREDIR}/${PORTNAME} + +OBFUSCATEJSJAR= ${DISTNAME}${EXTRACT_SUFX} + +do-install: + ${MKDIR} ${DATADIR} + ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/${OBFUSCATEJSJAR} ${DATADIR} + ${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME} ${PREFIX}/bin/${PORTNAME} + +.include diff --git a/devel/obfuscatejs/distinfo b/devel/obfuscatejs/distinfo new file mode 100644 index 000000000000..16e1e21629e3 --- /dev/null +++ b/devel/obfuscatejs/distinfo @@ -0,0 +1,3 @@ +MD5 (obfuscatejs/0.3.1/consyntools.jar) = 4f8f78e0ec6c84dffaccf32b36b02784 +SHA256 (obfuscatejs/0.3.1/consyntools.jar) = 3fc9ca1e67006ce9271449f977e90ae269e1199e7e402bd29cc4a47df70bbada +SIZE (obfuscatejs/0.3.1/consyntools.jar) = 13550 diff --git a/devel/obfuscatejs/files/obfuscatejs.in b/devel/obfuscatejs/files/obfuscatejs.in new file mode 100644 index 000000000000..13cdfae36141 --- /dev/null +++ b/devel/obfuscatejs/files/obfuscatejs.in @@ -0,0 +1,4 @@ +#!/bin/sh +# $FreeBSD$ +JAVA_VERSION="%%JAVA_VERSION%%" \ + exec "%%LOCALBASE%%/bin/java" -jar "%%OBFUSCATEJSJAR%%" Obfuscator "$@" diff --git a/devel/obfuscatejs/pkg-descr b/devel/obfuscatejs/pkg-descr new file mode 100644 index 000000000000..bbb220009ea2 --- /dev/null +++ b/devel/obfuscatejs/pkg-descr @@ -0,0 +1,9 @@ +ObfuscateJS compress your Javascript files. +The obfuscator currently removes whitespace and comments. +It renames variable names with a local scope to a shorter version, +and as an advanced option it renames all variables with a certain +prefix to a shorter name + +usage: obfuscatejs {src} {dst} {prefix} + +WWW: http://tools.2vi.nl/ diff --git a/devel/obfuscatejs/pkg-plist b/devel/obfuscatejs/pkg-plist new file mode 100644 index 000000000000..42fefe11f49a --- /dev/null +++ b/devel/obfuscatejs/pkg-plist @@ -0,0 +1,4 @@ +@comment $FreeBSD$ +bin/obfuscatejs +%%DATADIR%%/consyntools.jar +@dirrm %%DATADIR%%