blob: 3b8718f05631f9afb83d70c2687fe6f1a0032f9b [file] [log] [blame]
diff --git a/BUILD.orig b/BUILD
index a3bb1c1..3c70cde 100644
--- a/BUILD.orig
+++ b/BUILD
@@ -18,25 +18,42 @@ package_group(
)
package(
+ default_copts = ["-DDISABLE_GOOGLE_GLOBAL_USING_DECLARATIONS"],
default_visibility = [
"//third_party/sox:internal",
],
)
+# In order to comply with the libsox license, you cannot redistribute any
+# non-open source binary that depends on this build target (which statically
+# links libsox into your binary).
cc_inc_library(
- name = "inc",
+ name = "sox",
hdrs = ["//third_party/sox/" + sox_version_dir + ":headers"],
prefix = sox_version_dir + "/src",
+ visibility = [
+ "//visibility:public",
+ ],
+ deps = [
+ "//third_party/sox/" + sox_version_dir,
+ ],
)
-cc_library(
- name = "sox",
+# If you need to redistribute your binary, depend on 'redistributable-sox'
+# instead of the plain 'sox' target above. This dynamically links against
+# libsox in order to comply with its LGPL license, and excludes any GPL
+# dependencies, such as libmad, from the libsox build. Since it is dynamically
+# linked, you will also need to distribute libsox.so along with your binary.
+cc_inc_library(
+ name = "redistributable-sox",
+ hdrs = ["//third_party/sox/" + sox_version_dir + ":headers"],
+ prefix = sox_version_dir + "/src",
visibility = [
"//visibility:public",
],
deps = [
- ":inc",
- "//third_party/sox/" + sox_version_dir,
+ # Uses the libsox.so target to make the build redistributable.
+ "//third_party/sox/" + sox_version_dir + ":libsox.so",
],
)
@@ -53,6 +70,7 @@ genrule(
"sox_binary",
],
cmd = "cp $< $@",
+ compatible_with = ["//buildenv/target:vendor"],
executable = 1,
visibility = [
"//visibility:public",