The following commit has been merged in the master branch:
commit 15bd1dee305b4293666071dc66f1670ed77ea9a8
Author: Jonas Smedegaard <d...@jones.dk>
Date:   Sat Jan 19 11:22:38 2013 +0100

    Add patch 2002 to revive pre-0.5 use of Uglifyjs 1.x.

diff --git a/debian/patches/2002_use_old_uglifyjs.patch 
b/debian/patches/2002_use_old_uglifyjs.patch
new file mode 100644
index 0000000..34c60b2
--- /dev/null
+++ b/debian/patches/2002_use_old_uglifyjs.patch
@@ -0,0 +1,37 @@
+Description: Revive pre-0.5 use of Uglifyjs 1.x.
+Author: Jonas Smedegaard <d...@jones.dk>
+Forwarded: not-needed
+Last-Update: 2013-01-19
+
+--- a/build/build.js
++++ b/build/build.js
+@@ -63,6 +63,17 @@
+       return files;
+ }
+ 
++function uglify(code) {
++      var pro = UglifyJS.uglify;
++
++      var ast = UglifyJS.parser.parse(code);
++      ast = pro.ast_mangle(ast, {mangle: true});
++      ast = pro.ast_squeeze(ast);
++      ast = pro.ast_squeeze_more(ast);
++
++      return pro.gen_code(ast) + ';';
++};
++
+ exports.lint = function () {
+ 
+       var files = getFiles();
+@@ -137,10 +148,7 @@
+ 
+       var path = pathPart + '.js',
+           oldCompressed = loadSilently(path),
+-          newCompressed = copy + UglifyJS.minify(newSrc, {
+-              warnings: true,
+-              fromString: true
+-          }).code,
++          newCompressed = copy + uglify(newSrc),
+           delta = getSizeDelta(newCompressed, oldCompressed);
+ 
+       console.log('\tCompressed size: ' + newCompressed.length + ' bytes (' + 
delta + ')');
diff --git a/debian/patches/series b/debian/patches/series
index cb10c03..fa8edf4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 2001-dont_test_during_build.patch
+2002_use_old_uglifyjs.patch

-- 
JavaScript library for displaying map data in web browsers

_______________________________________________
Pkg-osm-commits mailing list
Pkg-osm-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-osm-commits

Reply via email to