Skip to content

Commit

Permalink
Merge pull request RobotLocomotion#7969 from jamiesnape/homebrew-pkg-…
Browse files Browse the repository at this point in the history
…config

Add Homebrew opt prefix paths to PKG_CONFIG_PATH
  • Loading branch information
jamiesnape authored Feb 7, 2018
2 parents e01d17a + fbb99bc commit 62d5838
Show file tree
Hide file tree
Showing 13 changed files with 127 additions and 33 deletions.
35 changes: 22 additions & 13 deletions tools/workspace/dreal/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,25 @@ load(
"pkg_config_repository",
)

def dreal_repository(name, modname = "dreal", **kwargs):
pkg_config_repository(name = name,
modname = modname,
# Since dReal and its dependency IBEX are installed
# under `/opt/<package_name>/<version_number>/`, it
# is necessary to keep the following versions in
# sync with the ones in
# `setup/ubuntu/16.04/install_prereqs.sh` script.
pkg_config_paths = [
"/opt/dreal/4.18.01.3/lib/pkgconfig",
"/opt/libibex/2.6.5/share/pkgconfig",
],
**kwargs)
def dreal_repository(
name,
modname = "dreal",
# Since dReal and its dependency IBEX are installed under
# `/opt/<package_name>/<version_number>/`, it is necessary to keep the
# following versions in sync with the ones in
# `setup/ubuntu/16.04/install_prereqs.sh` script.
pkg_config_paths = [
"/opt/dreal/4.18.01.3/lib/pkgconfig",
"/opt/libibex/2.6.5/share/pkgconfig",
"/usr/local/opt/clp/lib/pkgconfig",
"/usr/local/opt/coinutils/lib/pkgconfig",
"/usr/local/opt/dreal/lib/pkgconfig",
"/usr/local/opt/[email protected]/share/pkgconfig",
"/usr/local/opt/nlopt/lib/pkgconfig",
],
**kwargs):
pkg_config_repository(
name = name,
modname = modname,
pkg_config_paths = pkg_config_paths,
**kwargs)
3 changes: 3 additions & 0 deletions tools/workspace/gflags/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ cc_library(
gflags_repository = repository_rule(
attrs = {
"modname": attr.string(default = "gflags"),
"pkg_config_paths": attr.string_list(
default = ["/usr/local/opt/gflags/lib/pkgconfig"],
),
},
local = True,
implementation = _impl,
Expand Down
12 changes: 10 additions & 2 deletions tools/workspace/glew/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,13 @@ load(
"pkg_config_repository",
)

def glew_repository(name, modname = "glew", **kwargs):
pkg_config_repository(name = name, modname = modname, **kwargs)
def glew_repository(
name,
modname = "glew",
pkg_config_paths = ["/usr/local/opt/glew/lib/pkgconfig"],
**kwargs):
pkg_config_repository(
name = name,
modname = modname,
pkg_config_paths = pkg_config_paths,
**kwargs)
12 changes: 10 additions & 2 deletions tools/workspace/glib/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,13 @@ load(
"pkg_config_repository",
)

def glib_repository(name, modname = "glib-2.0", **kwargs):
pkg_config_repository(name = name, modname = modname, **kwargs)
def glib_repository(
name,
modname = "glib-2.0",
pkg_config_paths = ["/usr/local/opt/glib/lib/pkgconfig"],
**kwargs):
pkg_config_repository(
name = name,
modname = modname,
pkg_config_paths = pkg_config_paths,
**kwargs)
12 changes: 10 additions & 2 deletions tools/workspace/gthread/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,13 @@ load(
"pkg_config_repository",
)

def gthread_repository(name, modname = "gthread-2.0", **kwargs):
pkg_config_repository(name = name, modname = modname, **kwargs)
def gthread_repository(
name,
modname = "gthread-2.0",
pkg_config_paths = ["/usr/local/opt/glib/lib/pkgconfig"],
**kwargs):
pkg_config_repository(
name = name,
modname = modname,
pkg_config_paths = pkg_config_paths,
**kwargs)
12 changes: 10 additions & 2 deletions tools/workspace/ipopt/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,13 @@ load(
"pkg_config_repository",
)

def ipopt_repository(name, modname = "ipopt", **kwargs):
pkg_config_repository(name = name, modname = modname, **kwargs)
def ipopt_repository(
name,
modname = "ipopt",
pkg_config_paths = ["/usr/local/opt/ipopt/lib/pkgconfig"],
**kwargs):
pkg_config_repository(
name = name,
modname = modname,
pkg_config_paths = pkg_config_paths,
**kwargs)
12 changes: 10 additions & 2 deletions tools/workspace/liblz4/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,13 @@ load(
"pkg_config_repository",
)

def liblz4_repository(name, modname = "liblz4", **kwargs):
pkg_config_repository(name = name, modname = modname, **kwargs)
def liblz4_repository(
name,
modname = "liblz4",
pkg_config_paths = ["/usr/local/opt/lz4/lib/pkgconfig"],
**kwargs):
pkg_config_repository(
name = name,
modname = modname,
pkg_config_paths = pkg_config_paths,
**kwargs)
12 changes: 10 additions & 2 deletions tools/workspace/libpng/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,13 @@ load(
"pkg_config_repository",
)

def libpng_repository(name, modname = "libpng", **kwargs):
pkg_config_repository(name = name, modname = modname, **kwargs)
def libpng_repository(
name,
modname = "libpng",
pkg_config_paths = ["/usr/local/opt/libpng/lib/pkgconfig"],
**kwargs):
pkg_config_repository(
name = name,
modname = modname,
pkg_config_paths = pkg_config_paths,
**kwargs)
12 changes: 10 additions & 2 deletions tools/workspace/libprotobuf/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,13 @@ load(
# Load in the paths and flags to the system version of the protobuf runtime;
# in contrast, the Bazel build rules are loaded as @com_google_protobuf.

def libprotobuf_repository(name, modname = "protobuf", **kwargs):
pkg_config_repository(name = name, modname = modname, **kwargs)
def libprotobuf_repository(
name,
modname = "protobuf",
pkg_config_paths = ["/usr/local/opt/protobuf/lib/pkgconfig"],
**kwargs):
pkg_config_repository(
name = name,
modname = modname,
pkg_config_paths = pkg_config_paths,
**kwargs)
12 changes: 10 additions & 2 deletions tools/workspace/nlopt/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,13 @@ load(
"pkg_config_repository",
)

def nlopt_repository(name, modname = "nlopt", **kwargs):
pkg_config_repository(name = name, modname = modname, **kwargs)
def nlopt_repository(
name,
modname = "nlopt",
pkg_config_paths = ["/usr/local/opt/nlopt/lib/pkgconfig"],
**kwargs):
pkg_config_repository(
name = name,
modname = modname,
pkg_config_paths = pkg_config_paths,
**kwargs)
12 changes: 10 additions & 2 deletions tools/workspace/tinyxml/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,13 @@ load(
"pkg_config_repository",
)

def tinyxml_repository(name, modname = "tinyxml", **kwargs):
pkg_config_repository(name = name, modname = modname, **kwargs)
def tinyxml_repository(
name,
modname = "tinyxml",
pkg_config_paths = ["/usr/local/opt/tinyxml/lib/pkgconfig"],
**kwargs):
pkg_config_repository(
name = name,
modname = modname,
pkg_config_paths = pkg_config_paths,
**kwargs)
12 changes: 10 additions & 2 deletions tools/workspace/tinyxml2/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,13 @@ load(
"pkg_config_repository",
)

def tinyxml2_repository(name, modname = "tinyxml2", **kwargs):
pkg_config_repository(name = name, modname = modname, **kwargs)
def tinyxml2_repository(
name,
modname = "tinyxml2",
pkg_config_paths = ["/usr/local/opt/tinyxml2/lib/pkgconfig"],
**kwargs):
pkg_config_repository(
name = name,
modname = modname,
pkg_config_paths = pkg_config_paths,
**kwargs)
2 changes: 2 additions & 0 deletions tools/workspace/yaml_cpp/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ def yaml_cpp_repository(
modname = "yaml-cpp",
atleast_version = "0.5.2",
extra_deps = ["@boost//:boost_headers"],
pkg_config_paths = ["/usr/local/opt/yaml-cpp/lib/pkgconfig"],
**kwargs):
pkg_config_repository(
name = name,
modname = modname,
atleast_version = atleast_version,
extra_deps = extra_deps,
pkg_config_paths = pkg_config_paths,
**kwargs)

0 comments on commit 62d5838

Please sign in to comment.