Rod Hynes 7 лет назад
Родитель
Сommit
6b130fa5ea

+ 4 - 0
vendor/github.com/redjack/marionette/README.md

@@ -15,6 +15,10 @@ Marionette requires several dependencies to be installed first. Two of them
 are in the `third_party` directory and the third one can be downloaded from
 the web.
 
+You can use the `./build_third_party.sh` script in the root of this repository
+to build the third party libraries or follow the instructions below to manually
+build them or install them system wide.
+
 ### Installing on CentOS
 
 Ensure you have a C/C++ compiler installed:

+ 25 - 0
vendor/github.com/redjack/marionette/build_third_party.sh

@@ -0,0 +1,25 @@
+#!/bin/sh
+set -ex
+
+# This script will build the third party libraries and put in the correct file
+# paths to make it possible to build the binary without installing the
+# dependencies system wide.
+PKG_TOPDIR=$(cd $(dirname $0) && pwd -P)
+
+cd $PKG_TOPDIR/third_party/openfst && ./configure --enable-static=yes && make
+cd $PKG_TOPDIR/third_party/re2 && make
+
+cd $PKG_TOPDIR/third_party
+curl -LsO https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2
+PKG_CHECKSUM="5275bb04f4863a13516b2f39392ac5e272f5e1bb8057b18aec1c9b79d73d8fb2"
+REAL_CHECKSUM=$(shasum -a 256 gmp-6.1.2.tar.bz2 | awk '{print $1}')
+[ $PKG_CHECKSUM = "$REAL_CHECKSUM" ]
+tar -xvjf $PKG_TOPDIR/third_party/gmp-6.1.2.tar.bz2
+cd $PKG_TOPDIR/third_party/gmp-6.1.2 && ./configure --enable-cxx && make
+
+mkdir -p $PKG_TOPDIR/third_party/libs/
+
+cp $PKG_TOPDIR/third_party/gmp-6.1.2/.libs/libgmp.a $PKG_TOPDIR/third_party/libs/
+cp $PKG_TOPDIR/third_party/re2/obj/libre2.a $PKG_TOPDIR/third_party/libs/
+cp $PKG_TOPDIR/third_party/openfst/src/lib/.libs/libfst.a $PKG_TOPDIR/third_party/libs/
+cp $PKG_TOPDIR/third_party/openfst/src/script/.libs/libfstscript.a $PKG_TOPDIR/third_party/libs/

+ 1 - 1
vendor/github.com/redjack/marionette/fte/dfa.go

@@ -1,7 +1,7 @@
 package fte
 
 // #cgo CXXFLAGS: -std=c++11
-// #cgo LDFLAGS: -ldl /usr/local/lib/libgmp.a
+// #cgo LDFLAGS: -ldl ${SRCDIR}/../third_party/libs/libgmp.a
 // #include <stdlib.h>
 // #include <stdint.h>
 // void* _dfa_new(char *tbl, const uint32_t max_len);

+ 2 - 2
vendor/github.com/redjack/marionette/regex2dfa/regex2dfa.go

@@ -1,7 +1,7 @@
 package regex2dfa
 
-// #cgo CXXFLAGS: -std=c++11 -DMARIONETTE -I${SRCDIR}/../third_party/re2
-// #cgo LDFLAGS: -ldl /usr/local/lib/libfst.a /usr/local/lib/libfstscript.a /usr/local/lib/libre2.a
+// #cgo CXXFLAGS: -std=c++11 -DMARIONETTE -I${SRCDIR}/../third_party/re2/ -I${SRCDIR}/../third_party/openfst/src/include/
+// #cgo LDFLAGS: -ldl ${SRCDIR}/../third_party/libs/libfst.a ${SRCDIR}/../third_party/libs/libfstscript.a ${SRCDIR}/../third_party/libs/libre2.a
 // #include <stdlib.h>
 // #include <stdint.h>
 // int _regex2dfa(const char* input_regex, uint32_t input_regex_len, char **out, size_t *sz);

+ 27 - 31
vendor/vendor.json

@@ -321,76 +321,76 @@
 			"revisionTime": "2016-01-10T10:55:54Z"
 		},
 		{
-			"checksumSHA1": "D7BDYZLm/3QveVPYrSAbjGqPaFs=",
+			"checksumSHA1": "ZTKDOsru9qSNGg4GJiZvjRoCen4=",
 			"path": "github.com/redjack/marionette",
-			"revision": "12be546b5d166033e7ca3b2a6a3379122b71b8ce",
-			"revisionTime": "2018-07-31T21:31:38Z"
+			"revision": "360dd8f58226f85f483c7cbf582cb1447f9c802f",
+			"revisionTime": "2018-08-18T17:28:07Z"
 		},
 		{
 			"checksumSHA1": "Pl6hb/q9cfWWaDpYpYobcSXEekU=",
 			"path": "github.com/redjack/marionette/ecb",
-			"revision": "12be546b5d166033e7ca3b2a6a3379122b71b8ce",
-			"revisionTime": "2018-07-31T21:31:38Z"
+			"revision": "360dd8f58226f85f483c7cbf582cb1447f9c802f",
+			"revisionTime": "2018-08-18T17:28:07Z"
 		},
 		{
-			"checksumSHA1": "lHTSYordV+o2PyN+YOKi88uHwLA=",
+			"checksumSHA1": "dA8Ey/jEkeYk+63dE6feATe7IW4=",
 			"path": "github.com/redjack/marionette/fte",
-			"revision": "12be546b5d166033e7ca3b2a6a3379122b71b8ce",
-			"revisionTime": "2018-07-31T21:31:38Z"
+			"revision": "360dd8f58226f85f483c7cbf582cb1447f9c802f",
+			"revisionTime": "2018-08-18T17:28:07Z"
 		},
 		{
 			"checksumSHA1": "SaZjD7CIUgc7wQpVDFgHcLjjokI=",
 			"path": "github.com/redjack/marionette/mar",
-			"revision": "12be546b5d166033e7ca3b2a6a3379122b71b8ce",
-			"revisionTime": "2018-07-31T21:31:38Z"
+			"revision": "360dd8f58226f85f483c7cbf582cb1447f9c802f",
+			"revisionTime": "2018-08-18T17:28:07Z"
 		},
 		{
 			"checksumSHA1": "w71OqyYa6rIFUdOWafSztlM5n1I=",
 			"path": "github.com/redjack/marionette/plugins",
-			"revision": "12be546b5d166033e7ca3b2a6a3379122b71b8ce",
-			"revisionTime": "2018-07-31T21:31:38Z"
+			"revision": "360dd8f58226f85f483c7cbf582cb1447f9c802f",
+			"revisionTime": "2018-08-18T17:28:07Z"
 		},
 		{
 			"checksumSHA1": "mmmpoWtP8OofLHW51gcunsmJ31E=",
 			"path": "github.com/redjack/marionette/plugins/channel",
-			"revision": "12be546b5d166033e7ca3b2a6a3379122b71b8ce",
-			"revisionTime": "2018-07-31T21:31:38Z"
+			"revision": "360dd8f58226f85f483c7cbf582cb1447f9c802f",
+			"revisionTime": "2018-08-18T17:28:07Z"
 		},
 		{
 			"checksumSHA1": "+SkyWSZPDV9zdCJjOEH6XnegXJY=",
 			"path": "github.com/redjack/marionette/plugins/fte",
-			"revision": "12be546b5d166033e7ca3b2a6a3379122b71b8ce",
-			"revisionTime": "2018-07-31T21:31:38Z"
+			"revision": "360dd8f58226f85f483c7cbf582cb1447f9c802f",
+			"revisionTime": "2018-08-18T17:28:07Z"
 		},
 		{
 			"checksumSHA1": "JZXZE5h7jkv7eyD5EnjFYzdPVD8=",
 			"path": "github.com/redjack/marionette/plugins/io",
-			"revision": "12be546b5d166033e7ca3b2a6a3379122b71b8ce",
-			"revisionTime": "2018-07-31T21:31:38Z"
+			"revision": "360dd8f58226f85f483c7cbf582cb1447f9c802f",
+			"revisionTime": "2018-08-18T17:28:07Z"
 		},
 		{
 			"checksumSHA1": "dywFGW0gMUi++YRtIzKtdhxxWAc=",
 			"path": "github.com/redjack/marionette/plugins/model",
-			"revision": "12be546b5d166033e7ca3b2a6a3379122b71b8ce",
-			"revisionTime": "2018-07-31T21:31:38Z"
+			"revision": "360dd8f58226f85f483c7cbf582cb1447f9c802f",
+			"revisionTime": "2018-08-18T17:28:07Z"
 		},
 		{
 			"checksumSHA1": "jQduJg5I7te3Jk21W1OgPfVvqB0=",
 			"path": "github.com/redjack/marionette/plugins/tg",
-			"revision": "12be546b5d166033e7ca3b2a6a3379122b71b8ce",
-			"revisionTime": "2018-07-31T21:31:38Z"
+			"revision": "360dd8f58226f85f483c7cbf582cb1447f9c802f",
+			"revisionTime": "2018-08-18T17:28:07Z"
 		},
 		{
-			"checksumSHA1": "+pHDcrszNlyR/ZRPDKEp0wkQdso=",
+			"checksumSHA1": "07JG4eBhhOsGv4dTBKcEWN4qIwI=",
 			"path": "github.com/redjack/marionette/regex2dfa",
-			"revision": "12be546b5d166033e7ca3b2a6a3379122b71b8ce",
-			"revisionTime": "2018-07-31T21:31:38Z"
+			"revision": "360dd8f58226f85f483c7cbf582cb1447f9c802f",
+			"revisionTime": "2018-08-18T17:28:07Z"
 		},
 		{
 			"checksumSHA1": "Nms95Z1BggDZ02bMzbdNT27FxgQ=",
 			"path": "github.com/redjack/marionette/third_party",
-			"revision": "12be546b5d166033e7ca3b2a6a3379122b71b8ce",
-			"revisionTime": "2018-07-31T21:31:38Z",
+			"revision": "360dd8f58226f85f483c7cbf582cb1447f9c802f",
+			"revisionTime": "2018-08-18T17:28:07Z",
 			"tree": true
 		},
 		{
@@ -519,10 +519,6 @@
 			"revision": "b0697eccbea9adec5b7ba8008f4c33d98d733388",
 			"revisionTime": "2018-04-23T13:30:03Z"
 		},
-		{
-			"path": "golang.org/x/crypto/chacha20poly1305/internal/chacha20",
-			"revision": ""
-		},
 		{
 			"checksumSHA1": "IQkUIOnvlf0tYloFx9mLaXSvXWQ=",
 			"path": "golang.org/x/crypto/curve25519",