From b5134c7ca103a2c138b59ea15bd61efa74475dda Mon Sep 17 00:00:00 2001 From: Ali Ince Date: Tue, 30 Oct 2018 15:39:07 +0000 Subject: [PATCH] Add support for selective pkg-config directives based on build tags --- connection.go | 2 -- seabolt-static.go | 25 +++++++++++++++++++++++++ seabolt.go | 24 ++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 seabolt-static.go create mode 100644 seabolt.go diff --git a/connection.go b/connection.go index 706da5b..8bd85dd 100644 --- a/connection.go +++ b/connection.go @@ -20,8 +20,6 @@ package gobolt /* -#cgo pkg-config: seabolt17 - #include #include "bolt/bolt.h" diff --git a/seabolt-static.go b/seabolt-static.go new file mode 100644 index 0000000..c62b28c --- /dev/null +++ b/seabolt-static.go @@ -0,0 +1,25 @@ +// +build seabolt_static + +/* + * Copyright (c) 2002-2018 "Neo4j," + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package gobolt + +// #cgo pkg-config: seabolt17-static +import "C" diff --git a/seabolt.go b/seabolt.go new file mode 100644 index 0000000..14002ce --- /dev/null +++ b/seabolt.go @@ -0,0 +1,24 @@ +// +build !seabolt_static + +/* + * Copyright (c) 2002-2018 "Neo4j," + * Neo4j Sweden AB [http://neo4j.com] + * + * This file is part of Neo4j. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package gobolt + +// #cgo pkg-config: seabolt17 +import "C"