From ae41303dabb25b5aae47a84d35582c561058ced8 Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Sat, 28 Jul 2018 14:50:19 +0000 Subject: [PATCH] - Copy databases/mongodb34-tools -> databases/mongodb36-tools - Update to 3.6.3 PR: 227198 Sponsored by: iXsystems Inc. --- databases/Makefile | 1 + databases/mongodb36-tools/Makefile | 69 +++++++++++++++++++ databases/mongodb36-tools/distinfo | 3 + ..._github.com_spacemonkeygo_openssl_build.go | 10 +++ ...b.com_spacemonkeygo_openssl_init__posix.go | 11 +++ databases/mongodb36-tools/pkg-descr | 6 ++ databases/mongodb36-tools/pkg-plist | 11 +++ 7 files changed, 111 insertions(+) create mode 100644 databases/mongodb36-tools/Makefile create mode 100644 databases/mongodb36-tools/distinfo create mode 100644 databases/mongodb36-tools/files/patch-vendor_src_github.com_spacemonkeygo_openssl_build.go create mode 100644 databases/mongodb36-tools/files/patch-vendor_src_github.com_spacemonkeygo_openssl_init__posix.go create mode 100644 databases/mongodb36-tools/pkg-descr create mode 100644 databases/mongodb36-tools/pkg-plist diff --git a/databases/Makefile b/databases/Makefile index 23fb875b9a61..329972c58cea 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -205,6 +205,7 @@ SUBDIR += mongodb34 SUBDIR += mongodb34-tools SUBDIR += mongodb36 + SUBDIR += mongodb36-tools SUBDIR += mroonga SUBDIR += mrtg-mysql-load SUBDIR += mtools-mongodb diff --git a/databases/mongodb36-tools/Makefile b/databases/mongodb36-tools/Makefile new file mode 100644 index 000000000000..c37f5c0b6c65 --- /dev/null +++ b/databases/mongodb36-tools/Makefile @@ -0,0 +1,69 @@ +# $FreeBSD$ + +PORTNAME= mongodb36-tools +PORTVERSION= 3.6.3 +DISTVERSIONPREFIX= r +CATEGORIES= databases net + +MAINTAINER= numisemis@yahoo.com +COMMENT= Tools for MongoDB + +LICENSE= APACHE20 + +ONLY_FOR_ARCHS= amd64 i386 +ONLY_FOR_ARCHS_REASON= "not yet ported to anything other than i386 and amd64" +BROKEN_SSL= openssl-devel libressl libressl-devel +BROKEN_SSL_REASON_openssl-devel= variable has incomplete type 'BIO_METHOD' (aka 'struct bio_method_st') +BROKEN_SSL_REASON_libressl= could not determine kind of name for C.EVP_sha +BROKEN_SSL_REASON_libressl-devel= ${BROKEN_SSL_REASON_libressl} + +BUILD_DEPENDS= go>0:lang/go + +CONFLICTS_INSTALL= mongodb mongodb[32-34]-tools + +USES= localbase + +USE_GITHUB= yes +GH_ACCOUNT= mongodb +GH_PROJECT= mongo-tools + +OPTIONS_DEFINE= SSL SASL +OPTIONS_DEFAULT= SSL SASL + +SASL_USE= my_tags=sasl +SASL_LIB_DEPENDS= libsasl2.so:security/cyrus-sasl2 + +SSL_USES= ssl +SSL_USE= my_tags=ssl + +# Go is not our friend. Without below, ignores user-supplied flags. +MAKE_CMD= ${LOCALBASE}/bin/go build +MAKE_ENV= GOPATH="${WRKSRC}/.gopath:${WRKSRC}/vendor" \ + CGO_CFLAGS="${CFLAGS}" CGO_CPPFLAGS="${CPPFLAGS}" \ + CGO_CXXFLAGS="${CXXFLAGS}" CGO_LDFLAGS="-L${LOCALBASE}/lib ${LDFLAGS}" + +MY_TAGS= -tags "${USE_MY_TAGS}" + +post-patch: + @cd ${WRKSRC} ; ${MKDIR} ${WRKSRC}/.gopath/src/github.com/${GH_ACCOUNT} ; \ + ${LN} -sf ${WRKSRC} ${WRKSRC}/.gopath/src/github.com/${GH_ACCOUNT}/${GH_PROJECT} + +do-build: +.for x in bsondump mongostat mongofiles mongoexport mongoimport mongorestore mongodump mongotop + ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \ + -o ${WRKSRC}/bin/${x} ${MY_TAGS}\ + -ldflags "-X github.com/${GH_ACCOUNT}/${GH_PROJECT}/common/options.Gitspec=${GH_TAGNAME}"\ + ${WRKSRC}/${x}/main/${x}.go +.endfor + +do-install: +.for x in bsondump mongostat mongofiles mongoexport mongoimport mongorestore mongodump mongotop + ${INSTALL_PROGRAM} ${WRKSRC}/bin/${x} ${STAGEDIR}${PREFIX}/bin/ +.endfor + + ${MKDIR} ${STAGEDIR}${DOCSDIR} +.for x in LICENSE.md README.md THIRD-PARTY-NOTICES + ${INSTALL_MAN} ${WRKSRC}/${x} ${STAGEDIR}${DOCSDIR} +.endfor + +.include diff --git a/databases/mongodb36-tools/distinfo b/databases/mongodb36-tools/distinfo new file mode 100644 index 000000000000..d39a0ad05915 --- /dev/null +++ b/databases/mongodb36-tools/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1522662593 +SHA256 (mongodb-mongo-tools-r3.6.3_GH0.tar.gz) = d97461a21227a3563e3e362dfda330becff48a901ecb3309241f607c7c8900af +SIZE (mongodb-mongo-tools-r3.6.3_GH0.tar.gz) = 4693833 diff --git a/databases/mongodb36-tools/files/patch-vendor_src_github.com_spacemonkeygo_openssl_build.go b/databases/mongodb36-tools/files/patch-vendor_src_github.com_spacemonkeygo_openssl_build.go new file mode 100644 index 000000000000..84c06e3f3083 --- /dev/null +++ b/databases/mongodb36-tools/files/patch-vendor_src_github.com_spacemonkeygo_openssl_build.go @@ -0,0 +1,10 @@ +--- vendor/src/github.com/spacemonkeygo/openssl/build.go.orig 2017-07-31 19:00:22 UTC ++++ vendor/src/github.com/spacemonkeygo/openssl/build.go +@@ -19,6 +19,7 @@ package openssl + // #cgo linux pkg-config: openssl + // #cgo windows CFLAGS: -DWIN32_LEAN_AND_MEAN + // #cgo windows LDFLAGS: -lcrypt32 ++// #cgo freebsd LDFLAGS: -lssl -lcrypto + // #cgo darwin CFLAGS: -Wno-deprecated-declarations + // #cgo darwin LDFLAGS: -lssl -lcrypto -framework CoreFoundation -framework Foundation -framework Security + import "C" diff --git a/databases/mongodb36-tools/files/patch-vendor_src_github.com_spacemonkeygo_openssl_init__posix.go b/databases/mongodb36-tools/files/patch-vendor_src_github.com_spacemonkeygo_openssl_init__posix.go new file mode 100644 index 000000000000..17dc773143bf --- /dev/null +++ b/databases/mongodb36-tools/files/patch-vendor_src_github.com_spacemonkeygo_openssl_init__posix.go @@ -0,0 +1,11 @@ +--- vendor/src/github.com/spacemonkeygo/openssl/init_posix.go.orig 2016-01-03 17:52:58 UTC ++++ vendor/src/github.com/spacemonkeygo/openssl/init_posix.go +@@ -12,7 +12,7 @@ + // See the License for the specific language governing permissions and + // limitations under the License. + +-// +build linux darwin cgo ++// +build linux darwin freebsd cgo + // +build !windows + + package openssl diff --git a/databases/mongodb36-tools/pkg-descr b/databases/mongodb36-tools/pkg-descr new file mode 100644 index 000000000000..a0deecd70c72 --- /dev/null +++ b/databases/mongodb36-tools/pkg-descr @@ -0,0 +1,6 @@ +Since MongoDB 3.2, the tools bsondump, mongoimport, mongoexport, mongodump, +mongorestore, mongostat, mongofiles and mongotop have been placed +in a separate package and rewritten in Go. These are useful utilities for +managing a MongoDB instance. + +WWW: https://github.com/mongodb/mongo-tools diff --git a/databases/mongodb36-tools/pkg-plist b/databases/mongodb36-tools/pkg-plist new file mode 100644 index 000000000000..cb8a263ca9bc --- /dev/null +++ b/databases/mongodb36-tools/pkg-plist @@ -0,0 +1,11 @@ +bin/bsondump +bin/mongodump +bin/mongoexport +bin/mongofiles +bin/mongoimport +bin/mongorestore +bin/mongostat +bin/mongotop +%%PORTDOCS%%%%DOCSDIR%%/LICENSE.md +%%PORTDOCS%%%%DOCSDIR%%/README.md +%%PORTDOCS%%%%DOCSDIR%%/THIRD-PARTY-NOTICES