blob: 6f955aebdc032de37e6ef540d05c2c935dc4748c [file] [log] [blame]
Philipp Schrader0e19c602018-03-07 21:07:22 -08001package(default_visibility = ["//visibility:public"])
Austin Schuh55139fe2015-10-14 23:55:24 -07002
Philipp Schrader0e19c602018-03-07 21:07:22 -08003load(
4 "//debian:python.bzl",
5 python_debs = "files",
6)
Philipp Schraderaedfc5c2018-03-10 19:32:30 -08007load(
8 "//debian:clang.bzl",
9 clang_debs = "files",
10)
Brian Silverman7bda6212018-08-05 11:42:11 -070011load(
12 ":patch.bzl",
13 patch_debs = "files",
14)
Brian Silverman7297c0c2018-08-05 13:43:00 -070015load(
Austin Schuh71f6fa72019-08-31 18:23:02 -070016 ":rsync.bzl",
17 rsync_debs = "files",
18)
19load(
20 ":ssh.bzl",
21 ssh_debs = "files",
22)
23load(
Brian Silverman7297c0c2018-08-05 13:43:00 -070024 ":pandoc.bzl",
25 pandoc_debs = "files",
26)
Brian Silverman4f6ba442018-08-05 14:34:58 -070027load(
28 ":libusb.bzl",
29 libusb_debs = "files",
30)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -070031load(
32 ":mingw_compiler.bzl",
33 mingw_compiler_debs = "files",
34)
Brian Silverman6470f442018-08-05 12:08:16 -070035load(
36 ":patchelf.bzl",
37 patchelf_debs = "files",
38)
39load(
40 ":matplotlib.bzl",
41 matplotlib_debs = "files",
42)
Brian Silverman50b9ac02018-08-12 13:24:10 -070043load(
44 ":arm_frc_gnueabi_deps.bzl",
45 arm_frc_gnueabi_deps_debs = "files",
46)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -070047load(
48 ":python_gtk.bzl",
49 python_gtk_debs = "files",
50)
Brian Silvermand4260c72020-01-14 00:08:02 -080051load(
52 ":opencv_armhf.bzl",
53 opencv_armhf_debs = "files",
54)
Brian Silvermand97a47c2020-01-16 00:47:53 -080055load(
56 ":opencv_amd64.bzl",
57 opencv_amd64_debs = "files",
58)
Tyler Chatow60671d32020-02-26 19:49:30 -080059load(
60 ":gstreamer_amd64.bzl",
61 gstreamer_amd64_debs = "files",
62)
63load(
64 ":gstreamer_armhf.bzl",
65 gstreamer_armhf_debs = "files",
66)
Austin Schuh023e7f52020-08-18 21:24:37 -070067load(
Brian Silvermanf59fe3f2020-09-22 21:04:09 -070068 ":m4.bzl",
Austin Schuh023e7f52020-08-18 21:24:37 -070069 m4_debs = "files",
70)
Brian Silvermanf59fe3f2020-09-22 21:04:09 -070071load(
72 ":lzma_amd64.bzl",
73 lzma_amd64_debs = "files",
74)
75load(
76 ":lzma_arm64.bzl",
77 lzma_arm64_debs = "files",
78)
79load(":packages.bzl", "download_packages", "generate_deb_tarball")
Philipp Schrader0e19c602018-03-07 21:07:22 -080080
Brian Silverman6470f442018-08-05 12:08:16 -070081filegroup(
82 name = "matplotlib_patches",
83 srcs = [
84 "matplotlib_init.patch",
85 ],
James Kuszmaul910f92b2020-01-01 15:30:38 -080086 visibility = ["@matplotlib_repo//:__pkg__"],
Brian Silverman6470f442018-08-05 12:08:16 -070087)
88
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -070089filegroup(
90 name = "python_shapely_patches",
91 srcs = [
92 "python_shapely_init.patch",
93 ],
94 visibility = ["@python_gtk//:__pkg__"],
95)
96
97filegroup(
98 name = "python_gi_patches",
99 srcs = [
100 "python_gi_init.patch",
101 ],
102 visibility = ["@python_gtk//:__pkg__"],
103)
104
105filegroup(
106 name = "python_geos_patches",
107 srcs = [
108 "python_geos.patch",
109 ],
110 visibility = ["@python_gtk//:__pkg__"],
111)
112
Philipp Schrader0e19c602018-03-07 21:07:22 -0800113py_binary(
114 name = "download_packages",
115 srcs = [
116 "download_packages.py",
117 ],
118 default_python_version = "PY3",
119 main = "download_packages.py",
120 srcs_version = "PY2AND3",
121)
122
123download_packages(
124 name = "download_python_deps",
125 excludes = [
126 "libblas.so.3",
127 "liblapack.so.3",
128 ],
129 packages = [
130 "python-dev",
131 "python-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -0700132 "python-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -0800133 "python3-dev",
134 "python3-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -0700135 "python3-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -0800136 ],
137)
138
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800139download_packages(
140 name = "download_clang_deps",
141 excludes = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800142 "lib32stdc++6",
143 "libstdc++6",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800144 ],
145 force_includes = [
146 "libc6",
147 "libc6-dev",
148 ],
149 packages = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800150 "clang-6.0",
151 "clang-format-6.0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800152 "gcc",
153 "gfortran",
154 ],
155)
156
Brian Silverman7bda6212018-08-05 11:42:11 -0700157download_packages(
158 name = "download_patch_deps",
159 packages = [
160 "patch",
161 ],
162)
163
Brian Silverman7297c0c2018-08-05 13:43:00 -0700164download_packages(
165 name = "download_pandoc_deps",
166 packages = [
167 "pandoc",
168 ],
169)
170
Brian Silverman4f6ba442018-08-05 14:34:58 -0700171download_packages(
172 name = "download_libusb_deps",
173 packages = [
174 "libusb-0.1-4",
175 "libusb-1.0-0",
176 "libusb-1.0-0-dev",
177 "libusb-dev",
178 ],
179)
180
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700181download_packages(
182 name = "download_mingw_compiler_deps",
183 packages = [
184 "g++-mingw-w64-x86-64",
185 ],
186)
187
Brian Silverman6470f442018-08-05 12:08:16 -0700188download_packages(
189 name = "download_patchelf_deps",
190 packages = [
191 "patchelf",
192 ],
193)
194
195download_packages(
196 name = "download_matplotlib_deps",
197 excludes = [
198 "python-dev",
199 "python-numpy",
200 "python-scipy",
201 "python3-dev",
202 "python3-numpy",
203 "python3-scipy",
204 "x11-common",
205 "fonts-freefont",
206 "python",
207 "libcups2",
208 ],
209 packages = [
210 "python-matplotlib",
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700211 "python-tk",
Brian Silverman6470f442018-08-05 12:08:16 -0700212 "python3-matplotlib",
James Kuszmaul910f92b2020-01-01 15:30:38 -0800213 "python3-tk",
Brian Silverman6470f442018-08-05 12:08:16 -0700214 ],
215)
216
Brian Silverman50b9ac02018-08-12 13:24:10 -0700217# This list was obtained by manually looking at the output from:
218# find bazel-out/../../../external/arm_frc_linux_gnueabi_repo/ -executable -type f -exec ldd {} + | sed 's/=>.*//g' | sort -u
219download_packages(
220 name = "download_arm_frc_gnueabi_deps",
221 packages = [
222 "libexpat1",
223 "libgmp10",
224 "libisl10",
225 "liblzma5",
226 "libmpc3",
227 "libmpfr4",
228 "libncurses5",
229 "libtinfo5",
230 "zlib1g",
231 ],
232)
233
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700234download_packages(
235 name = "download_python_gtk_deps",
236 excludes = [
237 "fonts-freefont",
238 "gsettings-backend",
239 "libpng-dev",
240 "libz-dev",
241 "python3-dev",
242 "python3",
James Kuszmaulf89cfab2020-01-17 19:48:25 -0800243 "libblas.so.3",
244 "liblapack.so.3",
245 "libstdc++-dev",
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700246 ],
247 packages = [
248 "libgtk-3-dev",
249 "python3-cairo",
250 "python3-gi",
251 "python3-gi-cairo",
252 "python3-shapely",
253 ],
254)
255
Austin Schuh023e7f52020-08-18 21:24:37 -0700256download_packages(
257 name = "download_m4",
258 packages = [
259 "m4",
260 ],
261)
262
Philipp Schrader0e19c602018-03-07 21:07:22 -0800263generate_deb_tarball(
264 name = "python",
265 files = python_debs,
266)
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800267
268generate_deb_tarball(
James Kuszmaul3ae42262019-11-08 12:33:41 -0800269 name = "clang_6p0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800270 files = clang_debs,
271)
Brian Silverman7bda6212018-08-05 11:42:11 -0700272
273generate_deb_tarball(
274 name = "patch",
275 files = patch_debs,
276)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700277
278generate_deb_tarball(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700279 name = "rsync",
280 files = rsync_debs,
281)
282
283generate_deb_tarball(
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800284 name = "ssh_v3",
Austin Schuh71f6fa72019-08-31 18:23:02 -0700285 files = ssh_debs,
286)
287
288generate_deb_tarball(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700289 name = "pandoc",
290 files = pandoc_debs,
291)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700292
293generate_deb_tarball(
294 name = "libusb",
295 files = libusb_debs,
296)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700297
298generate_deb_tarball(
299 name = "mingw_compiler",
300 files = mingw_compiler_debs,
301)
Brian Silverman6470f442018-08-05 12:08:16 -0700302
303generate_deb_tarball(
304 name = "patchelf",
305 files = patchelf_debs,
306)
307
308generate_deb_tarball(
309 name = "matplotlib",
310 files = matplotlib_debs,
311)
Brian Silverman50b9ac02018-08-12 13:24:10 -0700312
313generate_deb_tarball(
314 name = "arm_frc_gnueabi_deps",
315 files = arm_frc_gnueabi_deps_debs,
316)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700317
318generate_deb_tarball(
319 name = "python_gtk",
320 files = python_gtk_debs,
321)
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800322
Brian Silvermand4260c72020-01-14 00:08:02 -0800323# This list was generated with download_packages.py on armhf and then
324# hand-tweaked to get everything it needs.
325generate_deb_tarball(
326 name = "opencv_armhf_v3",
327 files = opencv_armhf_debs,
328)
329
Brian Silvermand97a47c2020-01-16 00:47:53 -0800330# This was hand-written based on opencv_armhf.bzl.
331generate_deb_tarball(
332 name = "opencv_amd64",
333 files = opencv_amd64_debs,
334)
335
Tyler Chatow60671d32020-02-26 19:49:30 -0800336generate_deb_tarball(
337 name = "gstreamer_amd64",
338 files = gstreamer_amd64_debs,
339)
340
341generate_deb_tarball(
342 name = "gstreamer_armhf",
343 files = gstreamer_armhf_debs,
344)
345
Austin Schuh023e7f52020-08-18 21:24:37 -0700346generate_deb_tarball(
347 name = "m4",
348 files = m4_debs,
349)
350
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700351download_packages(
352 name = "download_lzma",
353 packages = [
354 "liblzma-dev",
355 ],
356)
357
358generate_deb_tarball(
359 name = "lzma_amd64",
360 files = lzma_amd64_debs,
361)
362
363generate_deb_tarball(
364 name = "lzma_arm64",
365 files = lzma_arm64_debs,
366)
367
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800368exports_files([
369 "ssh_wrapper.sh",
370])