summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/defaults/CC/TARGETS.bzip26
-rw-r--r--etc/defaults/shell/test/TARGETS.bzip21
-rw-r--r--etc/dev/TARGETS1
-rw-r--r--etc/import/TARGETS.bzip2110
-rw-r--r--etc/repos.json22
5 files changed, 140 insertions, 0 deletions
diff --git a/etc/defaults/CC/TARGETS.bzip2 b/etc/defaults/CC/TARGETS.bzip2
new file mode 100644
index 00000000..d1e34a63
--- /dev/null
+++ b/etc/defaults/CC/TARGETS.bzip2
@@ -0,0 +1,6 @@
+{ "defaults":
+ { "type": ["CC", "defaults"]
+ , "base": [["@", "base", "CC", "defaults"]]
+ , "ADD_CFLAGS": ["-Wall", "-D_FILE_OFFSET_BITS=64"]
+ }
+}
diff --git a/etc/defaults/shell/test/TARGETS.bzip2 b/etc/defaults/shell/test/TARGETS.bzip2
new file mode 100644
index 00000000..0967ef42
--- /dev/null
+++ b/etc/defaults/shell/test/TARGETS.bzip2
@@ -0,0 +1 @@
+{}
diff --git a/etc/dev/TARGETS b/etc/dev/TARGETS
index d3a68088..a3ade6cc 100644
--- a/etc/dev/TARGETS
+++ b/etc/dev/TARGETS
@@ -10,6 +10,7 @@
, ["@", "catch2", "", "catch2"]
, ["", "libgit2"]
, ["", "libcurl"]
+ , ["@", "bzip2", "", "libbz2"]
]
, "proto":
[ ["@", "bazel_remote_apis", "", "remote_execution_proto"]
diff --git a/etc/import/TARGETS.bzip2 b/etc/import/TARGETS.bzip2
new file mode 100644
index 00000000..0da3c9f7
--- /dev/null
+++ b/etc/import/TARGETS.bzip2
@@ -0,0 +1,110 @@
+{ "libbz2":
+ { "type": "export"
+ , "target": "libbz2internal"
+ , "doc": ["The BZip2 linkable library"]
+ , "flexible_config":
+ [ "OS"
+ , "ARCH"
+ , "TARGET_ARCH"
+ , "COMPILER_FAMILY"
+ , "DEBUG"
+ , "CC"
+ , "CFLAGS"
+ , "ADD_CFLAGS"
+ , "AR"
+ , "ENV"
+ ]
+ }
+, "bzip2":
+ { "type": "export"
+ , "target": "bzip2internal"
+ , "flexible_config":
+ [ "OS"
+ , "ARCH"
+ , "TARGET_ARCH"
+ , "COMPILER_FAMILY"
+ , "DEBUG"
+ , "CC"
+ , "CFLAGS"
+ , "ADD_CFLAGS"
+ , "AR"
+ , "ENV"
+ ]
+ }
+, "bunzip2": {"type": "install", "files": {"bunzip2": "bzip2"}}
+, "bzcat": {"type": "install", "files": {"bzcat": "bzip2"}}
+, "bzip2recover":
+ { "type": "export"
+ , "target": "bzip2recoverinternal"
+ , "flexible_config":
+ [ "OS"
+ , "ARCH"
+ , "TARGET_ARCH"
+ , "COMPILER_FAMILY"
+ , "DEBUG"
+ , "CC"
+ , "CFLAGS"
+ , "ADD_CFLAGS"
+ , "AR"
+ , "ENV"
+ ]
+ }
+, "test":
+ { "type": ["@", "rules", "shell/test", "script"]
+ , "name": ["test"]
+ , "test": ["test_script"]
+ , "deps": ["bzip2", ["GLOB", null, "sample*"]]
+ }
+, "test_script":
+ { "type": "file_gen"
+ , "name": "test.sh"
+ , "data":
+ { "type": "join"
+ , "separator": "\n"
+ , "$1":
+ [ "set -e"
+ , "./bzip2 -1 < sample1.ref > sample1.rb2"
+ , "./bzip2 -2 < sample2.ref > sample2.rb2"
+ , "./bzip2 -3 < sample3.ref > sample3.rb2"
+ , "./bzip2 -d < sample1.bz2 > sample1.tst"
+ , "./bzip2 -d < sample2.bz2 > sample2.tst"
+ , "./bzip2 -ds < sample3.bz2 > sample3.tst"
+ , "cmp sample1.bz2 sample1.rb2"
+ , "cmp sample2.bz2 sample2.rb2"
+ , "cmp sample3.bz2 sample3.rb2"
+ , "cmp sample1.tst sample1.ref"
+ , "cmp sample2.tst sample2.ref"
+ , "cmp sample3.tst sample3.ref"
+ ]
+ }
+ }
+, "libbz2internal":
+ { "type": ["@", "rules", "CC", "library"]
+ , "name": ["libbz2"]
+ , "pure C": ["YES"]
+ , "srcs":
+ [ "blocksort.c"
+ , "huffman.c"
+ , "crctable.c"
+ , "randtable.c"
+ , "compress.c"
+ , "decompress.c"
+ , "bzlib.c"
+ ]
+ , "hdrs": ["bzlib.h"]
+ , "private-hdrs": ["bzlib_private.h"]
+ }
+, "bzip2internal":
+ { "type": ["@", "rules", "CC", "binary"]
+ , "name": ["bzip2"]
+ , "pure C": ["YES"]
+ , "srcs": ["bzip2.c"]
+ , "deps": ["libbz2"]
+ }
+, "bzip2recoverinternal":
+ { "type": ["@", "rules", "CC", "binary"]
+ , "name": ["bzip2recover"]
+ , "pure C": ["YES"]
+ , "srcs": ["bzip2recover.c"]
+ }
+}
diff --git a/etc/repos.json b/etc/repos.json
index 8da23473..86dbee0c 100644
--- a/etc/repos.json
+++ b/etc/repos.json
@@ -17,6 +17,7 @@
, "catch2": "catch2"
, "protoc": "protobuf"
, "libcurl": "com_github_curl_curl"
+ , "bzip2": "bzip2"
}
, "bootstrap": {"link": ["-lpthread"]}
, "bootstrap_local": {"link": ["-lpthread"]}
@@ -42,6 +43,7 @@
, "com_github_libgit2_libgit2"
, "catch2"
, "com_github_curl_curl"
+ , "bzip2"
]
}
, "target_root": "import targets"
@@ -119,6 +121,13 @@
, "target_file_name": "TARGETS.curl"
, "bindings": {"base": "rules"}
}
+ , "rules-bzip2":
+ { "repository": "rules"
+ , "target_root": "defaults"
+ , "rule_root": "rules"
+ , "target_file_name": "TARGETS.bzip2"
+ , "bindings": {"base": "rules"}
+ }
, "import targets":
{ "repository":
{"type": "file", "path": "etc/import", "pragma": {"to_git": true}}
@@ -298,6 +307,19 @@
, "target_file_name": "TARGETS.zlib"
, "bindings": {"rules": "rules"}
}
+ , "bzip2":
+ { "repository":
+ { "type": "archive"
+ , "content": "f9d91f2012aedeedcfd3bd918124ca11f0160373"
+ , "fetch": "https://github.com/libarchive/bzip2/archive/refs/tags/bzip2-1.0.8.tar.gz"
+ , "sha256": "db106b740252669664fd8f3a1c69fe7f689d5cd4b132f82ba82b9afba27627df"
+ , "sha512": "596d1b304f1f2d64b020d04845db10a2330c7f614a9fd0b5344afff65877d2141b3fcaa43d9e2dbc2f6a7929a1dab07df54d3d4bd69678b53906472958c7b80c"
+ , "subdir": "bzip2-bzip2-1.0.8"
+ }
+ , "target_root": "import targets"
+ , "target_file_name": "TARGETS.bzip2"
+ , "bindings": {"rules": "rules-bzip2"}
+ }
, "re2":
{ "repository":
{ "type": "archive"