diff options
-rw-r--r-- | .SRCINFO | 34 | ||||
-rw-r--r-- | .gitignore | 17 | ||||
-rw-r--r-- | 0001-Replace-use-of-uint32-by-standard-complient-way.patch | 39 | ||||
-rw-r--r-- | 0001-external-ocamlzip-zip.ml-remove-duplicate-exception.patch | 27 | ||||
-rw-r--r-- | 0001-lang_php-matcher-Makefile-remove-warn-error.patch | 26 | ||||
-rw-r--r-- | PKGBUILD | 55 | ||||
-rw-r--r-- | lang_js-analyze-module_js.ml-Fix-invalid-documentati.patch | 80 | ||||
-rw-r--r-- | lang_js-analyze-utils_js.mli.patch | 30 | ||||
-rw-r--r-- | unused-module.patch | 12 |
9 files changed, 320 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e0d0b7dd3630 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,34 @@ +# Generated by mksrcinfo v8 +# Fri Jun 29 15:34:13 UTC 2018 +pkgbase = pfff + pkgdesc = Tools and APIs for code analysis, visualization and transformation + pkgver = 0.29 + pkgrel = 9 + url = https://github.com/facebook/pfff + arch = x86_64 + license = LGPL2.1 + makedepends = ocaml + makedepends = ocaml-findlib + makedepends = camlp4 + depends = zlib + optdepends = gtk2: required by codegraph and codemap + options = !makeflags + options = staticlibs + options = !strip + source = 0.29.tar.gz::https://github.com/facebook/pfff/archive/v0.29.tar.gz + source = lang_js-analyze-module_js.ml-Fix-invalid-documentati.patch + source = lang_js-analyze-utils_js.mli.patch + source = 0001-Replace-use-of-uint32-by-standard-complient-way.patch + source = 0001-external-ocamlzip-zip.ml-remove-duplicate-exception.patch + source = 0001-lang_php-matcher-Makefile-remove-warn-error.patch + source = unused-module.patch + sha256sums = d31c68f1ebb1770297eb26441d21d83728c0fbdb9c7bb3be27625db45fae72d1 + sha256sums = 28b220807087b9378e0fcab1187163cdeb8d3da80f53f00ec9af434467ace57f + sha256sums = bb10f6b25afe0cd0df5084d9e3624f43cbf7489b148c67d99479d11cf90999b7 + sha256sums = 1110287c8f402d57628c17e68b7881af0da895ffe4860933586070ab7a779d60 + sha256sums = e41743e0d29a4be5c2481fb969d43c4ca64633fcb9657716fdb3fd0635333d18 + sha256sums = a2170d5c4ef76395837a00eec2500d6ec4654fc26df5997f7d30e88176dfa854 + sha256sums = b52f393ac31a2b2a9567cd3af428aa68ed9ae16ea995b41c46245d46c38d4982 + +pkgname = pfff + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..9b97681014e9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +*.zip +*.jar +*.tar +*.tgz +*.tbz2 +*.gz +*.bz2 +*.xz +*.gem +*.run +*.deb +*.rpm +*.sig +*.log +/src +/pkg +*.kate-swp diff --git a/0001-Replace-use-of-uint32-by-standard-complient-way.patch b/0001-Replace-use-of-uint32-by-standard-complient-way.patch new file mode 100644 index 000000000000..de7d639785c9 --- /dev/null +++ b/0001-Replace-use-of-uint32-by-standard-complient-way.patch @@ -0,0 +1,39 @@ +From 2c3dfc748e84fbfd99cf64bdedfa150a1b30286f Mon Sep 17 00:00:00 2001 +From: tychota <tychota@users.noreply.github.com> +Date: Sun, 17 Jul 2016 10:52:08 +0200 +Subject: [PATCH] Replace use of uint32 by standard/ complient way + +This closes #142. + +Uint32 semms to be platform specific : +- http://stackoverflow.com/questions/13362084/difference-between-uint32-and-uint32-t + +This I'm importing stdint and using the standard uint32_t type. +--- + external/ocamlzip/zlibstubs.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/external/ocamlzip/zlibstubs.c b/external/ocamlzip/zlibstubs.c +index a627df9..62e5ed7 100644 +--- a/external/ocamlzip/zlibstubs.c ++++ b/external/ocamlzip/zlibstubs.c +@@ -16,6 +16,7 @@ + /* Stub code to interface with Zlib */ + + #include <zlib.h> ++#include <stdint.h> + + #include <caml/mlvalues.h> + #include <caml/alloc.h> +@@ -168,7 +169,7 @@ value camlzip_inflateEnd(value vzs) + + value camlzip_update_crc32(value crc, value buf, value pos, value len) + { +- return caml_copy_int32(crc32((uint32) Int32_val(crc), ++ return caml_copy_int32(crc32((uint32_t) Int32_val(crc), + &Byte_u(buf, Long_val(pos)), + Long_val(len))); + } +-- +2.9.2 + diff --git a/0001-external-ocamlzip-zip.ml-remove-duplicate-exception.patch b/0001-external-ocamlzip-zip.ml-remove-duplicate-exception.patch new file mode 100644 index 000000000000..86a8bfac36f2 --- /dev/null +++ b/0001-external-ocamlzip-zip.ml-remove-duplicate-exception.patch @@ -0,0 +1,27 @@ +From a74aa84d1c8307a298567d73d2785354e7175c18 Mon Sep 17 00:00:00 2001 +From: pad <yoann.padioleau@gmail.com> +Date: Thu, 11 Aug 2016 11:48:14 -0700 +Subject: [PATCH] * external/ocamlzip/zip.ml: remove duplicate exception. It is + causing compilation error with ocaml 4.02.3 apparently. Should fix issue #133 + and issue #145 + +--- + external/ocamlzip/zip.ml | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/external/ocamlzip/zip.ml b/external/ocamlzip/zip.ml +index f49b91a..b6ad634 100644 +--- a/external/ocamlzip/zip.ml ++++ b/external/ocamlzip/zip.ml +@@ -73,8 +73,6 @@ type out_file = + mutable of_entries: entry list; + of_comment: string } + +-exception Error of string * string * string +- + (* Return the position of the last occurrence of s1 in s2, or -1 if not + found. *) + +-- +2.9.2 + diff --git a/0001-lang_php-matcher-Makefile-remove-warn-error.patch b/0001-lang_php-matcher-Makefile-remove-warn-error.patch new file mode 100644 index 000000000000..b22230b36a37 --- /dev/null +++ b/0001-lang_php-matcher-Makefile-remove-warn-error.patch @@ -0,0 +1,26 @@ +From ba77d861f2ec15ba74f5bdeaf2d0941995653454 Mon Sep 17 00:00:00 2001 +From: pad <yoann.padioleau@gmail.com> +Date: Thu, 11 Aug 2016 13:01:33 -0700 +Subject: [PATCH] * lang_php/matcher/Makefile: remove -warn-error should fix + issue #147 + +--- + lang_php/matcher/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lang_php/matcher/Makefile b/lang_php/matcher/Makefile +index 056b4fb..1b1375e 100644 +--- a/lang_php/matcher/Makefile ++++ b/lang_php/matcher/Makefile +@@ -31,7 +31,7 @@ INCLUDEDIRS= $(TOP)/commons $(TOP)/commons/ocollection \ + # Generic variables + ############################################################################## + #BUG in ocamlc, false positive on unused value +-WARNING_FLAGS=-w +A-4-29-6-45-32 -warn-error +a ++#WARNING_FLAGS=-w +A-4-29-6-45-32 + -include $(TOP)/Makefile.common + + ############################################################################## +-- +2.9.2 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..44ad62e46f0b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,55 @@ +# $Id: PKGBUILD 266875 2017-11-15 14:29:11Z foutrelis $ +# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com> +# Contributor: David Stelter <david.stelter@gmail.com> +# Contributor: Francisco Lopes <chico.lopes@gmail.com> + +pkgname='pfff' +pkgver=0.29 +pkgrel=9 + +pkgdesc='Tools and APIs for code analysis, visualization and transformation' +arch=('x86_64') +url='https://github.com/facebook/pfff' +license=('LGPL2.1') +depends=('zlib') +optdepends=('gtk2: required by codegraph and codemap') +makedepends=('ocaml' 'ocaml-findlib' 'camlp4') +options=(!makeflags staticlibs !strip) # parallel build fails, need *.a files +source=("$pkgver.tar.gz::https://github.com/facebook/pfff/archive/v$pkgver.tar.gz" +"lang_js-analyze-module_js.ml-Fix-invalid-documentati.patch" +"lang_js-analyze-utils_js.mli.patch" +"0001-Replace-use-of-uint32-by-standard-complient-way.patch" +"0001-external-ocamlzip-zip.ml-remove-duplicate-exception.patch" +"0001-lang_php-matcher-Makefile-remove-warn-error.patch" +"unused-module.patch") +sha256sums=('d31c68f1ebb1770297eb26441d21d83728c0fbdb9c7bb3be27625db45fae72d1' + '28b220807087b9378e0fcab1187163cdeb8d3da80f53f00ec9af434467ace57f' + 'bb10f6b25afe0cd0df5084d9e3624f43cbf7489b148c67d99479d11cf90999b7' + '1110287c8f402d57628c17e68b7881af0da895ffe4860933586070ab7a779d60' + 'e41743e0d29a4be5c2481fb969d43c4ca64633fcb9657716fdb3fd0635333d18' + 'a2170d5c4ef76395837a00eec2500d6ec4654fc26df5997f7d30e88176dfa854' + 'b52f393ac31a2b2a9567cd3af428aa68ed9ae16ea995b41c46245d46c38d4982') + +prepare() { + cd "$srcdir"/$pkgname-$pkgver + patch -Np1 -i ../0001-Replace-use-of-uint32-by-standard-complient-way.patch + patch -Np1 -i ../0001-external-ocamlzip-zip.ml-remove-duplicate-exception.patch + patch -Np1 -i ../0001-lang_php-matcher-Makefile-remove-warn-error.patch + patch -Np1 -i ../lang_js-analyze-utils_js.mli.patch + patch -Np1 -i ../lang_js-analyze-module_js.ml-Fix-invalid-documentati.patch + patch -Np1 -i ../unused-module.patch + sed 's|/usr/local/|/usr/|g' -i external/ocamlzip/Makefile +} + +build() { + cd "$srcdir"/$pkgname-$pkgver + ./configure --prefix=/usr + WARNING_FLAGS="-w +A-4-29-6-45-41-44-48" make clean depend all opt +} + +package() { + cd "$srcdir"/$pkgname-$pkgver + make DESTDIR=$pkgdir install + install -dm755 "$pkgdir"/usr/lib/ocaml + make OCAMLFIND_LDCONF="$pkgdir"/tmp/ld.conf OCAMLFIND_DESTDIR="$pkgdir"/usr/lib/ocaml install-findlib +} diff --git a/lang_js-analyze-module_js.ml-Fix-invalid-documentati.patch b/lang_js-analyze-module_js.ml-Fix-invalid-documentati.patch new file mode 100644 index 000000000000..d11860fcbec2 --- /dev/null +++ b/lang_js-analyze-module_js.ml-Fix-invalid-documentati.patch @@ -0,0 +1,80 @@ +From 90424f6a206b32c0995e043fe404e694c884b5d3 Mon Sep 17 00:00:00 2001 +From: Juergen Hoetzel <juergen@archlinux.org> +Date: Mon, 24 Aug 2015 13:55:44 +0200 +Subject: [PATCH] * lang_js/analyze/module_js.ml: Fix invalid documentation + comments. Refs #130 + +See: http://caml.inria.fr/mantis/view.php?id=6916 +--- + lang_js/analyze/module_js.ml | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/lang_js/analyze/module_js.ml b/lang_js/analyze/module_js.ml +index 1433bf0..3bf63b3 100644 +--- a/lang_js/analyze/module_js.ml ++++ b/lang_js/analyze/module_js.ml +@@ -48,50 +48,50 @@ type shape = + | LiteralShape + | ArrayShape + +- (** _((id,container,maps) ref) **) ++ (* _((id,container,maps) ref) *) + (* this is a ref to allow extensible representations *) + (* id is unique, and is used to prune infinite recursion *) + (* maps is an ObjectShape list *) + | ObjectShape of (int * shape smap * shape list) ref + +- (** _(block,constructor) **) ++ (* _(block,constructor) *) + (* block is an ObjectShape *) + (* constructor is a ClassShape *) + | FunctionShape of shape Common.smap ref * shape + +- (** _(module) **) ++ (* _(module) *) + | RequireShape of module_ + +- (** _(reason) **) ++ (* _(reason) *) + | UnknownShape of string + +- (** _(instance, static) **) ++ (* _(instance, static) *) + (* instance is a ObjectShape *) + (* static is a ObjectShape where static.prototype is a ObjectShape *) + | ClassShape of shape * shape + +- (** _(class) **) ++ (* _(class) *) + (* class is a ClassShape *) + (* returns an ObjectShape *) + | NewShape of shape + +- (** _(maps) **) ++ (* _(maps) *) + (* maps is an ObjectShape *) + (* returns a ClassShape *) + | MixinShape of shape + +- (** _(class,mixin) **) ++ (* _(class,mixin) *) + (* class is a ClassShape, mixin is a ClassShape *) + (* returns a ClassShape *) + | ClassWithMixinShape of shape * shape + +- (** _(object,prop) **) ++ (* _(object,prop) *) + | PropertyShape of shape * string + +- (** _(function) **) ++ (* _(function) *) + | ApplyShape of shape + +- (** _(array) **) ++ (* _(array) *) + | ElementShape of shape + + let fresh_id = +-- +2.5.0 + diff --git a/lang_js-analyze-utils_js.mli.patch b/lang_js-analyze-utils_js.mli.patch new file mode 100644 index 000000000000..c84ddcd32066 --- /dev/null +++ b/lang_js-analyze-utils_js.mli.patch @@ -0,0 +1,30 @@ +From 1658a7f55af6884644909901523a28d2df7416d7 Mon Sep 17 00:00:00 2001 +From: pad <yoann.padioleau@gmail.com> +Date: Thu, 20 Aug 2015 09:58:29 -0700 +Subject: [PATCH 68/72] * lang_js/analyze/utils_js.mli: fix issue #130 + +--- + lang_js/analyze/utils_js.mli | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/lang_js/analyze/utils_js.mli b/lang_js/analyze/utils_js.mli +index 637b832..19a8cbb 100644 +--- a/lang_js/analyze/utils_js.mli ++++ b/lang_js/analyze/utils_js.mli +@@ -1,8 +1,9 @@ + +-(** print utils **) ++(* print utils *) + val string_of_any : Ast_js.any -> string + +-(** Example: load file task **) +-(** if file exists, unmarshal data in the file and return it **) +-(** otherwise, run task to generate data, store it in the file, and return it **) ++(* Example: load file task ++ * if file exists, unmarshal data in the file and return it ++ * otherwise, run task to generate data, store it in the file, and return it ++ *) + val load : Common.filename -> (unit -> 'a) -> 'a +-- +2.5.0 + diff --git a/unused-module.patch b/unused-module.patch new file mode 100644 index 000000000000..7723e783b0b7 --- /dev/null +++ b/unused-module.patch @@ -0,0 +1,12 @@ +diff -urb pfff-0.29.sic/lang_bytecode/parsing/test_parsing_bytecode.ml pfff-0.29/lang_bytecode/parsing/test_parsing_bytecode.ml +--- pfff-0.29.sic/lang_bytecode/parsing/test_parsing_bytecode.ml 2015-03-03 19:52:16.000000000 +0100 ++++ pfff-0.29/lang_bytecode/parsing/test_parsing_bytecode.ml 2016-11-15 17:20:37.833563042 +0100 +@@ -11,8 +11,6 @@ + *) + open Common + +-module PI = Parse_info +- + (*****************************************************************************) + (* Subsystem testing *) + (*****************************************************************************) |