diff --git a/tools/workspace/default.bzl b/tools/workspace/default.bzl index 6b62b162cdd2..06e245e63dad 100644 --- a/tools/workspace/default.bzl +++ b/tools/workspace/default.bzl @@ -41,7 +41,6 @@ load("@drake//tools/workspace/gz_utils_internal:repository.bzl", "gz_utils_inter load("@drake//tools/workspace/ibex:repository.bzl", "ibex_repository") load("@drake//tools/workspace/intel_realsense_ros_internal:repository.bzl", "intel_realsense_ros_internal_repository") # noqa load("@drake//tools/workspace/ipopt:repository.bzl", "ipopt_repository") -load("@drake//tools/workspace/json:repository.bzl", "json_repository") load("@drake//tools/workspace/lapack:repository.bzl", "lapack_repository") load("@drake//tools/workspace/lcm:repository.bzl", "lcm_repository") load("@drake//tools/workspace/libblas:repository.bzl", "libblas_repository") @@ -60,7 +59,6 @@ load("@drake//tools/workspace/mypy_extensions_internal:repository.bzl", "mypy_ex load("@drake//tools/workspace/mypy_internal:repository.bzl", "mypy_internal_repository") # noqa load("@drake//tools/workspace/nanoflann_internal:repository.bzl", "nanoflann_internal_repository") # noqa load("@drake//tools/workspace/net_sf_jchart2d:repository.bzl", "net_sf_jchart2d_repository") # noqa -load("@drake//tools/workspace/nlopt:repository.bzl", "nlopt_repository") load("@drake//tools/workspace/nlopt_internal:repository.bzl", "nlopt_internal_repository") # noqa load("@drake//tools/workspace/openblas:repository.bzl", "openblas_repository") load("@drake//tools/workspace/opencl:repository.bzl", "opencl_repository") @@ -200,8 +198,6 @@ def add_default_repositories(excludes = [], mirrors = DEFAULT_MIRRORS): intel_realsense_ros_internal_repository(name = "intel_realsense_ros_internal", mirrors = mirrors) # noqa if "ipopt" not in excludes: ipopt_repository(name = "ipopt") - if "json" not in excludes: - json_repository(name = "json", mirrors = mirrors) if "lapack" not in excludes: lapack_repository(name = "lapack") if "lcm" not in excludes: @@ -238,10 +234,6 @@ def add_default_repositories(excludes = [], mirrors = DEFAULT_MIRRORS): nanoflann_internal_repository(name = "nanoflann_internal", mirrors = mirrors) # noqa if "net_sf_jchart2d" not in excludes: net_sf_jchart2d_repository(name = "net_sf_jchart2d", mirrors = mirrors) - if "nlopt" not in excludes: - # The @nlopt external is being removed from Drake on 2020-09-01. - # TODO(jwnimmer-tri) When removing @nlopt, also update install_prereqs. - nlopt_repository(name = "nlopt") if "nlopt_internal" not in excludes: nlopt_internal_repository(name = "nlopt_internal", mirrors = mirrors) if "openblas" not in excludes: diff --git a/tools/workspace/json/BUILD.bazel b/tools/workspace/json/BUILD.bazel deleted file mode 100644 index 7198e3bb9b53..000000000000 --- a/tools/workspace/json/BUILD.bazel +++ /dev/null @@ -1,5 +0,0 @@ -# -*- python -*- - -load("//tools/lint:lint.bzl", "add_lint_tests") - -add_lint_tests() diff --git a/tools/workspace/json/package.BUILD.bazel b/tools/workspace/json/package.BUILD.bazel deleted file mode 100644 index dd7c1bfdaf17..000000000000 --- a/tools/workspace/json/package.BUILD.bazel +++ /dev/null @@ -1,20 +0,0 @@ -# -*- python -*- - -load( - "@drake//tools/install:install.bzl", - "install", -) - -licenses(["notice"]) # MIT - -package( - default_visibility = ["//visibility:public"], -) - -cc_library( - name = "json", - hdrs = ["single_include/nlohmann/json.hpp"], - includes = ["single_include"], - defines = ["JSON_HAS_CPP_14"], # Avoid . - deprecation = "DRAKE DEPRECATED: The @json external is being removed from Drake on or after 2020-09-01. Downstream projects should add it to their own WORKSPACE if needed.", # noqa -) diff --git a/tools/workspace/json/repository.bzl b/tools/workspace/json/repository.bzl deleted file mode 100644 index f274be4fd35f..000000000000 --- a/tools/workspace/json/repository.bzl +++ /dev/null @@ -1,15 +0,0 @@ -# -*- python -*- - -load("@drake//tools/workspace:github.bzl", "github_archive") - -def json_repository( - name, - mirrors = None): - github_archive( - name = name, - repository = "nlohmann/json", - commit = "v3.10.5", - sha256 = "5daca6ca216495edf89d167f808d1d03c4a4d929cef7da5e10f135ae1540c7e4", # noqa - build_file = ":package.BUILD.bazel", - mirrors = mirrors, - ) diff --git a/tools/workspace/nlopt/BUILD.bazel b/tools/workspace/nlopt/BUILD.bazel deleted file mode 100644 index 2e5301dc6578..000000000000 --- a/tools/workspace/nlopt/BUILD.bazel +++ /dev/null @@ -1,8 +0,0 @@ -# -*- python -*- - -# This file exists to make our directory into a Bazel package, so that our -# neighboring *.bzl file can be loaded elsewhere. - -load("//tools/lint:lint.bzl", "add_lint_tests") - -add_lint_tests() diff --git a/tools/workspace/nlopt/package-macos.BUILD.bazel b/tools/workspace/nlopt/package-macos.BUILD.bazel deleted file mode 100644 index f4106b631f09..000000000000 --- a/tools/workspace/nlopt/package-macos.BUILD.bazel +++ /dev/null @@ -1,25 +0,0 @@ -# -*- python -*- - -load( - "@drake_detected_os//:os.bzl", - "HOMEBREW_PREFIX", -) - -licenses([ - "notice", # BSD-3-Clause AND MIT - "restricted", # LGPL-2.1+ -]) - -cc_library( - name = "nlopt", - srcs = ["include/nlopt.h"], - hdrs = ["include/nlopt.hpp"], - includes = ["include"], - linkopts = [ - "-L{}/opt/nlopt/lib".format(HOMEBREW_PREFIX), - "-Wl,-rpath,{}/opt/nlopt/lib".format(HOMEBREW_PREFIX), - "-lnlopt", - ], - visibility = ["//visibility:public"], - deprecation = "DRAKE DEPRECATED: The @nlopt external is being removed from Drake on or after 2020-09-01. Downstream projects should add it to their own WORKSPACE if needed.", # noqa -) diff --git a/tools/workspace/nlopt/package-ubuntu-20.04.BUILD.bazel b/tools/workspace/nlopt/package-ubuntu-20.04.BUILD.bazel deleted file mode 100644 index ef69027ee1a8..000000000000 --- a/tools/workspace/nlopt/package-ubuntu-20.04.BUILD.bazel +++ /dev/null @@ -1,19 +0,0 @@ -# -*- python -*- - -licenses([ - "notice", # BSD-3-Clause AND MIT - "restricted", # LGPL-2.1+ -]) - -cc_library( - name = "nlopt", - srcs = ["include/nlopt.h"], - hdrs = ["include/nlopt.hpp"], - includes = ["include"], - linkopts = [ - "-L/usr/lib/x86_64-linux-gnu", - "-lnlopt_cxx", - ], - visibility = ["//visibility:public"], - deprecation = "DRAKE DEPRECATED: The @nlopt external is being removed from Drake on or after 2020-09-01. Downstream projects should add it to their own WORKSPACE if needed.", # noqa -) diff --git a/tools/workspace/nlopt/package-ubuntu-22.04.BUILD.bazel b/tools/workspace/nlopt/package-ubuntu-22.04.BUILD.bazel deleted file mode 120000 index ef683c347a00..000000000000 --- a/tools/workspace/nlopt/package-ubuntu-22.04.BUILD.bazel +++ /dev/null @@ -1 +0,0 @@ -package-ubuntu-20.04.BUILD.bazel \ No newline at end of file diff --git a/tools/workspace/nlopt/repository.bzl b/tools/workspace/nlopt/repository.bzl deleted file mode 100644 index dc8fccc2fa2f..000000000000 --- a/tools/workspace/nlopt/repository.bzl +++ /dev/null @@ -1,41 +0,0 @@ -# -*- mode: python -*- - -load("@drake//tools/workspace:os.bzl", "determine_os") - -def _impl(repository_ctx): - os_result = determine_os(repository_ctx) - - if os_result.error != None: - fail(os_result.error) - - if os_result.is_macos or os_result.is_macos_wheel: - build_flavor = "macos" - repository_ctx.symlink( - "{}/opt/nlopt/include/nlopt.h".format(os_result.homebrew_prefix), - "include/nlopt.h", - ) - repository_ctx.symlink( - "{}/opt/nlopt/include/nlopt.hpp".format(os_result.homebrew_prefix), - "include/nlopt.hpp", - ) - elif os_result.is_ubuntu or os_result.is_manylinux: - build_flavor = "ubuntu-{}".format(os_result.ubuntu_release) - repository_ctx.symlink("/usr/include/nlopt.h", "include/nlopt.h") - repository_ctx.symlink("/usr/include/nlopt.hpp", "include/nlopt.hpp") - else: - fail("Operating system is NOT supported {}".format(os_result)) - - repository_ctx.symlink( - Label( - "@drake//tools/workspace/nlopt:package-{}.BUILD.bazel".format( - build_flavor, - ), - ), - "BUILD.bazel", - ) - -nlopt_repository = repository_rule( - local = True, - configure = True, - implementation = _impl, -)