File: unbundle

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (76 lines) | stat: -rwxr-xr-x 2,496 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/python3 -B

import os
import sys
import shutil

sys.path.append("build/linux/unbundle")

import replace_gn_files

keepers = (
    'ffmpeg',
    'icu',          # previously bundled due to bullseye. TODO: test w/ bookworm.
    'libvpx',       # currently broken with no easy fix; https://crbug.com/1307941
    'absl_algorithm',
    'absl_base',    # all absl bundled due to bullseye. TODO: test w/ bookworm.
    'absl_cleanup',
    'absl_crc',
    'absl_container',
    'absl_debugging',
    'absl_flags',
    'absl_functional',
    'absl_hash',
    'absl_log',
    'absl_log_internal',
    'absl_memory',
    'absl_meta',
    'absl_numeric',
    'absl_random',
    'absl_status',
    'absl_strings',
    'absl_synchronization',
    'absl_time',
    'absl_types',
    'absl_utility',
    'brotli',       # requires brotli >= 1.1 (trixie)
    'crc32c',
    'flatbuffers',  # "So third_party/tflite uses a specific version of flatbuffers
                    # (currently only available in experimental; not even in sid).
                    # I'm not comfortable changing the version check and potentially
                    # having different schemas specifically for a serialization library"
                    # from Dec 2023

    'highway',      # now requires >= 1.2 for new functions

    'libaom',       # broken - media/gpu/vaapi/BUILD.gn depends on libaomrc, but the
                    # shim doesn't provide it. Needs an upstream bug.

    'libdrm',       # requires DRM_IOCTL_SYNCOBJ_EVENTFD which is only in 2.4.123+
    'libyuv' ,
    'libwebp',      # libavif depends on libsharpyuv-dev; only in libwebp 1.3 (trixie)
    're2',          # experienced crashes Aug 2023 w/ 20230301-3; try >= 20240401.
    'simdutf',      # not packaged in debian
    'snappy',
    'jsoncpp',
    'woff2',
    'swiftshader-SPIRV-Headers' ,
    'swiftshader-SPIRV-Tools' ,
    'vulkan-SPIRV-Headers' ,
    'vulkan-SPIRV-Tools' ,
    'vulkan_memory_allocator',
    )

for lib,rule in replace_gn_files.REPLACEMENTS.items():
    if lib not in keepers:
        # create a symlink to the unbundle gn file
        symlink = "ln -sf "
        path = os.path.split(rule)
        if not os.path.exists(path[0]):
            os.mkdir(path[0])
        while path[0] != '':
            path = os.path.split(path[0])
            symlink += '../'
        symlink += "build/linux/unbundle/%s.gn %s"%(lib,rule)
        if os.system(symlink):
            raise RuntimeError("error creating symlink",symlink)