aboutsummaryrefslogtreecommitdiffstats
path: root/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts')
-rw-r--r--roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/.bintray.json19
-rw-r--r--roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/.configure-custom.sh1
-rwxr-xr-xroms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/.travis.sh81
-rw-r--r--roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/appveyor.yml111
-rw-r--r--roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/README.md3
-rw-r--r--roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/step-01-download-rfc.py16
-rw-r--r--roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/step-02-rfc-to-bin.py34
-rw-r--r--roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/step-03-validate-bin.py38
-rw-r--r--roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/step-04-generate-java-literals.py79
-rw-r--r--roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/fix-win-bazel-build.py36
-rw-r--r--roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/libbrotlicommon.pc.in11
-rw-r--r--roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/libbrotlidec.pc.in12
-rw-r--r--roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/libbrotlienc.pc.in12
-rw-r--r--roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/sources.lst99
14 files changed, 552 insertions, 0 deletions
diff --git a/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/.bintray.json b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/.bintray.json
new file mode 100644
index 000000000..ef2ea9d8e
--- /dev/null
+++ b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/.bintray.json
@@ -0,0 +1,19 @@
+{
+ "package": {
+ "name": "bin",
+ "repo": "brotli",
+ "subject": "eustas"
+ },
+
+ "version": {"name": "snapshot"},
+
+ "files": [
+ {
+ "includePattern": "brotli.zip",
+ "uploadPattern": "brotli-${TRAVIS_OS_NAME}-${RELEASE_DATE}.zip",
+ "matrix_params": {"override": 1}
+ }
+ ],
+
+ "publish": true
+}
diff --git a/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/.configure-custom.sh b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/.configure-custom.sh
new file mode 100644
index 000000000..f1f641af1
--- /dev/null
+++ b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/.configure-custom.sh
@@ -0,0 +1 @@
+#!/usr/bin/env bash
diff --git a/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/.travis.sh b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/.travis.sh
new file mode 100755
index 000000000..8b7e2b314
--- /dev/null
+++ b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/.travis.sh
@@ -0,0 +1,81 @@
+#!/bin/bash
+
+case "$1" in
+ "before_install")
+ ;;
+ "install")
+ case "${TRAVIS_OS_NAME}" in
+ "osx")
+ brew update
+ brew install binutils
+
+ case "${CC}" in
+ "gcc-"*)
+ which ${CC} || brew install $(echo "${CC}" | sed 's/\-/@/') || brew link --overwrite $(echo "${CC}" | sed 's/\-/@/')
+ ;;
+ esac
+
+ case "${BUILD_SYSTEM}" in
+ "bazel")
+ brew install bazel
+ brew upgrade python
+ ;;
+ esac
+ ;;
+ "linux")
+ case "${CC}" in
+ "pgcc")
+ wget 'https://raw.githubusercontent.com/nemequ/pgi-travis/de6212d94fd0e7d07a6ef730c23548c337c436a7/install-pgi.sh'
+ echo 'acd3ef995ad93cfb87d26f65147395dcbedd4c3c844ee6ec39616f1a347c8df5 install-pgi.sh' | sha256sum -c --strict || exit 1
+ /bin/sh install-pgi.sh
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ "script")
+ case "${BUILD_SYSTEM}" in
+ "cmake")
+ mkdir builddir && cd builddir
+ CMAKE_FLAGS=
+ if [ "${CROSS_COMPILE}" = "yes" ]; then
+ CMAKE_FLAGS="-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_RC_COMPILER=${RC_COMPILER}"
+ fi
+ cmake ${CMAKE_FLAGS} -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DENABLE_SANITIZER="${SANITIZER}" -DCMAKE_C_FLAGS="${CFLAGS}" .. || exit 1
+ make VERBOSE=1 || exit 1
+ ctest -V || exit 1
+ ;;
+ "python")
+ python setup.py test
+ ;;
+ "maven")
+ cd java/org/brotli
+ mvn install && cd integration && mvn verify
+ ;;
+ "autotools")
+ ./bootstrap && ./configure && make
+ ;;
+ "fuzz")
+ ./c/fuzz/test_fuzzer.sh
+ ;;
+ "bazel")
+ bazel build -c opt ...:all &&
+ cd go && bazel test -c opt ...:all && cd .. &&
+ cd java && bazel test -c opt ...:all && cd .. &&
+ cd js && bazel test -c opt ...:all && cd .. &&
+ cd research && bazel build -c opt ...:all && cd ..
+ ;;
+ esac
+ ;;
+ "after_success")
+ ;;
+ "before_deploy")
+ case "${BUILD_SYSTEM}" in
+ "bazel")
+ export RELEASE_DATE=`date +%Y-%m-%d`
+ perl -p -i -e 's/\$\{([^}]+)\}/defined $ENV{$1} ? $ENV{$1} : $&/eg' scripts/.bintray.json
+ zip -j9 brotli.zip bazel-bin/libbrotli*.a bazel-bin/libbrotli*.so bazel-bin/brotli
+ ;;
+ esac
+ ;;
+esac
diff --git a/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/appveyor.yml b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/appveyor.yml
new file mode 100644
index 000000000..e22a8c689
--- /dev/null
+++ b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/appveyor.yml
@@ -0,0 +1,111 @@
+branches:
+ only:
+ - master
+
+environment:
+ matrix:
+ - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+ BUILD_SYSTEM: CMake
+ GENERATOR: Visual Studio 15 2017 Win64
+ CONFIG: Release
+
+ - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+ BUILD_SYSTEM: CMake
+ GENERATOR: Visual Studio 15 2017 Win64
+ CONFIG: Debug
+
+ - BUILD_SYSTEM: CMake
+ GENERATOR: Visual Studio 14 2015 Win64
+ CONFIG: Debug
+
+ - BUILD_SYSTEM: CMake
+ GENERATOR: Visual Studio 14 2015
+ CONFIG: Debug
+
+ - BUILD_SYSTEM: Python
+ PYTHON: "C:\\Python27"
+ PYTHON_VERSION: "2.7.x"
+ PYTHON_ARCH: "32"
+
+ - BUILD_SYSTEM: Python
+ PYTHON: "C:\\Python36-x64"
+ PYTHON_VERSION: "3.6.x"
+ PYTHON_ARCH: "64"
+
+ - BUILD_SYSTEM: make
+ ARCH: "i686"
+
+ - BUILD_SYSTEM: make
+ ARCH: "x86_64"
+
+ - BUILD_SYSTEM: bazel
+
+install:
+- IF "%BUILD_SYSTEM%"=="Python" (
+ SET "PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%" &&
+ python -m pip install --upgrade pip &&
+ pip install --upgrade setuptools
+ )
+- IF "%BUILD_SYSTEM%"=="make" (
+ IF "%ARCH%"=="i686" (
+ SET "TOOLCHAIN=i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32"
+ ) ELSE (
+ SET "TOOLCHAIN=x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64"
+ )
+ )
+- IF "%BUILD_SYSTEM%"=="bazel" (
+ appveyor DownloadFile https://github.com/bazelbuild/bazel/releases/download/0.18.0/bazel-0.18.0-windows-x86_64.exe -FileName bazel.exe
+ )
+
+before_build:
+- FOR /f %%i in ('C:\cygwin64\bin\date.exe +%%Y-%%m-%%d') DO SET "RELEASE_DATE=%%i"
+- IF "%BUILD_SYSTEM%"=="CMake" ( mkdir builddir && cd builddir && cmake -G "%GENERATOR%" .. )
+- IF "%BUILD_SYSTEM%"=="make" (
+ SET "CC=gcc" &&
+ SET "PATH=C:\mingw-w64\%TOOLCHAIN%\bin;%PATH%" &&
+ COPY C:\msys64\usr\bin\make.exe C:\mingw-w64\%TOOLCHAIN%\bin\make.exe
+ )
+- SET "ROOT=%APPVEYOR_BUILD_FOLDER%"
+
+build_script:
+- IF "%BUILD_SYSTEM%"=="CMake" ( cmake --build . --config %CONFIG% )
+- IF "%BUILD_SYSTEM%"=="Python" ( python setup.py build_ext )
+- IF "%BUILD_SYSTEM%"=="make" (
+ sh -c "make brotli" &&
+ cd bin && 7z a -tzip -mx9 brotli-win-%ARCH%-%RELEASE_DATE%.zip brotli.exe &&
+ appveyor PushArtifact brotli-win-%ARCH%-%RELEASE_DATE%.zip && cd ..
+ )
+- IF "%BUILD_SYSTEM%"=="bazel" (
+ cd java &&
+ %ROOT%\bazel.exe --batch build -c opt org/brotli/wrapper/...:all &&
+ python %ROOT%\scripts\fix-win-bazel-build.py &&
+ cd bazel-bin &&
+ 7z a -tzip -mx9 brotli-win-bazel-jni-%RELEASE_DATE%.zip brotli_jni.dll &&
+ appveyor PushArtifact brotli-win-bazel-jni-%RELEASE_DATE%.zip &&
+ cd .. &&
+ cd ..
+ )
+
+test_script:
+- IF "%BUILD_SYSTEM%"=="CMake" ( ctest --output-on-failure --interactive-debug-mode 0 -C %CONFIG% )
+- IF "%BUILD_SYSTEM%"=="Python" ( python setup.py test )
+- IF "%BUILD_SYSTEM%"=="make" ( sh -c "make test" )
+- IF "%BUILD_SYSTEM%"=="bazel" (
+ cd java &&
+ %ROOT%\bazel.exe --batch test -c opt --test_output streamed org/brotli/wrapper/...:all &&
+ cd ..
+ )
+
+deploy:
+- provider: BinTray
+ on:
+ branch: master
+ username: eustas
+ api_key:
+ secure: B3rM8JYeIHIw6BfOjHggAeyTmxEf8ZDYmyF9gCwqyWaxyxECD9BuN50SiV2KE/RI
+ subject: eustas
+ repo: brotli
+ package: bin
+ version: snapshot
+ publish: true
+ override: true
diff --git a/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/README.md b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/README.md
new file mode 100644
index 000000000..366a82c3f
--- /dev/null
+++ b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/README.md
@@ -0,0 +1,3 @@
+Set of tools that can be used to download brotli RFC, extract and validate
+binary dictionary, and generate dictionary derivatives
+(e.g. Java `DictionaryData` class constants).
diff --git a/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/step-01-download-rfc.py b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/step-01-download-rfc.py
new file mode 100644
index 000000000..14f65cc42
--- /dev/null
+++ b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/step-01-download-rfc.py
@@ -0,0 +1,16 @@
+# Step 01 - download RFC7932.
+#
+# RFC is the ultimate source for brotli format and constants, including
+# static dictionary.
+
+import urllib2
+
+response = urllib2.urlopen('https://tools.ietf.org/rfc/rfc7932.txt')
+
+text = response.read()
+path = "rfc7932.txt"
+
+with open(path, "w") as rfc:
+ rfc.write(text)
+
+print("Downloaded and saved " + str(len(text)) + " bytes to " + path)
diff --git a/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/step-02-rfc-to-bin.py b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/step-02-rfc-to-bin.py
new file mode 100644
index 000000000..27737c583
--- /dev/null
+++ b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/step-02-rfc-to-bin.py
@@ -0,0 +1,34 @@
+# Step 02 - parse RFC.
+#
+# Static dictionary is described in "Appendix A" section in a hexadecimal form.
+# This tool locates dictionary data in RFC and converts it to raw binary format.
+
+import re
+
+rfc_path = "rfc7932.txt"
+
+with open(rfc_path, "r") as rfc:
+ lines = rfc.readlines()
+
+re_data_line = re.compile("^ [0-9a-f]{64}$")
+
+appendix_a_found = False
+dictionary = []
+for line in lines:
+ if appendix_a_found:
+ if re_data_line.match(line) is not None:
+ data = line.strip()
+ for i in range(32):
+ dictionary.append(int(data[2 * i : 2 * i + 2], 16))
+ if len(dictionary) == 122784:
+ break
+ else:
+ if line.startswith("Appendix A."):
+ appendix_a_found = True
+
+bin_path = "dictionary.bin"
+
+with open(bin_path, "wb") as output:
+ output.write(bytearray(dictionary))
+
+print("Parsed and saved " + str(len(dictionary)) + " bytes to " + bin_path)
diff --git a/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/step-03-validate-bin.py b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/step-03-validate-bin.py
new file mode 100644
index 000000000..171cc9b8c
--- /dev/null
+++ b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/step-03-validate-bin.py
@@ -0,0 +1,38 @@
+# Step 03 - validate raw dictionary file.
+#
+# CRC32, MD5, SHA1 and SHA256 checksums for raw binary dictionary are checked.
+
+import hashlib
+import zlib
+
+bin_path = "dictionary.bin"
+
+with open(bin_path, "rb") as raw:
+ data = raw.read()
+
+def check_digest(name, expected, actual):
+ if expected == actual:
+ print("[OK] " + name)
+ else:
+ print("[ERROR] " + name + " | " + expected + " != " + actual)
+
+
+check_digest(
+ "CRC32", # This is the only checksum provided in RFC.
+ "0x5136cb04",
+ hex(zlib.crc32(data)))
+
+check_digest(
+ "MD5",
+ "96cecd2ee7a666d5aa3627d74735b32a",
+ hashlib.md5(data).hexdigest())
+
+check_digest(
+ "SHA1",
+ "72b41051cb61a9281ba3c4414c289da50d9a7640",
+ hashlib.sha1(data).hexdigest())
+
+check_digest(
+ "SHA256",
+ "20e42eb1b511c21806d4d227d07e5dd06877d8ce7b3a817f378f313653f35c70",
+ hashlib.sha256(data).hexdigest())
diff --git a/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/step-04-generate-java-literals.py b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/step-04-generate-java-literals.py
new file mode 100644
index 000000000..fd3c64e00
--- /dev/null
+++ b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/dictionary/step-04-generate-java-literals.py
@@ -0,0 +1,79 @@
+# Step 04 - generate Java literals.
+#
+# Java byte-code has ridiculous restrictions. There is no such thing as
+# "array literal" - those are implemented as series of data[x] = y;
+# as a consequence N-byte array will use 7N bytes in class, plus N bytes
+# in instantiated variable. Also no literal could be longer than 64KiB.
+#
+# To keep dictionary data compact both in source code and in compiled format
+# we use the following tricks:
+# * use String as a data container
+# * store only lowest 7 bits; i.e. all characters fit ASCII table; this allows
+# efficient conversion to byte array; also ASCII characters use only 1 byte
+#. of memory (UTF-8 encoding)
+# * RLE-compress sequence of 8-th bits
+#
+# This script generates literals used in Java code.
+
+bin_path = "dictionary.bin"
+
+with open(bin_path, "rb") as raw:
+ data = raw.read()
+
+low = []
+hi = []
+is_skip = True
+skip_flip_offset = 36
+cntr = skip_flip_offset
+for b in data:
+ value = ord(b)
+ low.append(chr(value & 0x7F))
+ if is_skip:
+ if value < 0x80:
+ cntr += 1
+ else:
+ is_skip = False
+ hi.append(unichr(cntr))
+ cntr = skip_flip_offset + 1
+ else:
+ if value >= 0x80:
+ cntr += 1
+ else:
+ is_skip = True
+ hi.append(unichr(cntr))
+ cntr = skip_flip_offset + 1
+hi.append(unichr(cntr))
+
+low0 = low[0 : len(low) // 2]
+low1 = low[len(low) // 2 : len(low)]
+
+def escape(chars):
+ result = []
+ for c in chars:
+ if "\r" == c:
+ result.append("\\r")
+ elif "\n" == c:
+ result.append("\\n")
+ elif "\t" == c:
+ result.append("\\t")
+ elif "\"" == c:
+ result.append("\\\"")
+ elif "\\" == c:
+ result.append("\\\\")
+ elif ord(c) < 32 or ord(c) >= 127:
+ result.append("\\u%04X" % ord(c))
+ else:
+ result.append(c);
+ return result
+
+
+source_code = [
+ " private static final String DATA0 = \"", "".join(escape(low0)), "\";\n",
+ " private static final String DATA1 = \"", "".join(escape(low1)), "\";\n",
+ " private static final String SKIP_FLIP = \"", "".join(escape(hi)), "\";\n"
+]
+
+src_path = "DictionaryData.inc.java"
+
+with open(src_path, "w") as source:
+ source.write("".join(source_code))
diff --git a/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/fix-win-bazel-build.py b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/fix-win-bazel-build.py
new file mode 100644
index 000000000..7a9b21198
--- /dev/null
+++ b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/fix-win-bazel-build.py
@@ -0,0 +1,36 @@
+import fnmatch
+import os
+import os.path
+from shutil import copyfile
+
+print('Searching for manifests...')
+
+matches = []
+for root, dirnames, filenames in os.walk('bazel-bin\\org\\brotli'):
+ for filename in fnmatch.filter(filenames, '*.runfiles_manifest'):
+ matches.append(os.path.join(root, filename))
+
+for match in matches:
+ print('Scanning manifest ' + match)
+ runfiles = match[:-len('_manifest')]
+ with open(match) as manifest:
+ for entry in manifest:
+ entry = entry.strip()
+ if not entry.startswith("org_brotli_java"):
+ continue
+ if entry.startswith('org_brotli_java/external'):
+ continue
+ (alias, space, link) = entry.partition(' ')
+ if alias.endswith('.jar') or alias.endswith('.exe'):
+ continue
+ link = link.replace('/', '\\')
+ alias = alias.replace('/', '\\')
+ dst = os.path.join(runfiles, alias)
+ if not os.path.exists(dst):
+ print(link + ' -> ' + dst)
+ parent = os.path.dirname(dst)
+ if not os.path.exists(parent):
+ os.makedirs(parent)
+ copyfile(link, dst)
+
+print('Finished resolving symlinks')
diff --git a/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/libbrotlicommon.pc.in b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/libbrotlicommon.pc.in
new file mode 100644
index 000000000..2a8cf7a35
--- /dev/null
+++ b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/libbrotlicommon.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libbrotlicommon
+URL: https://github.com/google/brotli
+Description: Brotli common dictionary library
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lbrotlicommon
+Cflags: -I${includedir}
diff --git a/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/libbrotlidec.pc.in b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/libbrotlidec.pc.in
new file mode 100644
index 000000000..6f8ef2e41
--- /dev/null
+++ b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/libbrotlidec.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libbrotlidec
+URL: https://github.com/google/brotli
+Description: Brotli decoder library
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lbrotlidec
+Requires.private: libbrotlicommon >= 1.0.2
+Cflags: -I${includedir}
diff --git a/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/libbrotlienc.pc.in b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/libbrotlienc.pc.in
new file mode 100644
index 000000000..2098afe2c
--- /dev/null
+++ b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/libbrotlienc.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libbrotlienc
+URL: https://github.com/google/brotli
+Description: Brotli encoder library
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lbrotlienc
+Requires.private: libbrotlicommon >= 1.0.2
+Cflags: -I${includedir}
diff --git a/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/sources.lst b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/sources.lst
new file mode 100644
index 000000000..5e8e817c9
--- /dev/null
+++ b/roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/scripts/sources.lst
@@ -0,0 +1,99 @@
+# IT WOULD BE FOOLISH TO USE COMPUTERS TO AUTOMATE REPETITIVE TASKS:
+# ENLIST EVERY USED HEADER AND SOURCE FILE MANUALLY!
+
+BROTLI_CLI_C = \
+ c/tools/brotli.c
+
+BROTLI_COMMON_C = \
+ c/common/dictionary.c \
+ c/common/transform.c
+
+BROTLI_COMMON_H = \
+ c/common/constants.h \
+ c/common/context.h \
+ c/common/dictionary.h \
+ c/common/platform.h \
+ c/common/transform.h \
+ c/common/version.h
+
+BROTLI_DEC_C = \
+ c/dec/bit_reader.c \
+ c/dec/decode.c \
+ c/dec/huffman.c \
+ c/dec/state.c
+
+BROTLI_DEC_H = \
+ c/dec/bit_reader.h \
+ c/dec/huffman.h \
+ c/dec/prefix.h \
+ c/dec/state.h
+
+BROTLI_ENC_C = \
+ c/enc/backward_references.c \
+ c/enc/backward_references_hq.c \
+ c/enc/bit_cost.c \
+ c/enc/block_splitter.c \
+ c/enc/brotli_bit_stream.c \
+ c/enc/cluster.c \
+ c/enc/compress_fragment.c \
+ c/enc/compress_fragment_two_pass.c \
+ c/enc/dictionary_hash.c \
+ c/enc/encode.c \
+ c/enc/encoder_dict.c \
+ c/enc/entropy_encode.c \
+ c/enc/histogram.c \
+ c/enc/literal_cost.c \
+ c/enc/memory.c \
+ c/enc/metablock.c \
+ c/enc/static_dict.c \
+ c/enc/utf8_util.c
+
+BROTLI_ENC_H = \
+ c/enc/backward_references.h \
+ c/enc/backward_references_hq.h \
+ c/enc/backward_references_inc.h \
+ c/enc/bit_cost.h \
+ c/enc/bit_cost_inc.h \
+ c/enc/block_encoder_inc.h \
+ c/enc/block_splitter.h \
+ c/enc/block_splitter_inc.h \
+ c/enc/brotli_bit_stream.h \
+ c/enc/cluster.h \
+ c/enc/cluster_inc.h \
+ c/enc/command.h \
+ c/enc/compress_fragment.h \
+ c/enc/compress_fragment_two_pass.h \
+ c/enc/dictionary_hash.h \
+ c/enc/encoder_dict.h \
+ c/enc/entropy_encode.h \
+ c/enc/entropy_encode_static.h \
+ c/enc/fast_log.h \
+ c/enc/find_match_length.h \
+ c/enc/hash.h \
+ c/enc/hash_composite_inc.h \
+ c/enc/hash_forgetful_chain_inc.h \
+ c/enc/hash_longest_match64_inc.h \
+ c/enc/hash_longest_match_inc.h \
+ c/enc/hash_longest_match_quickly_inc.h \
+ c/enc/hash_rolling_inc.h \
+ c/enc/hash_to_binary_tree_inc.h \
+ c/enc/histogram.h \
+ c/enc/histogram_inc.h \
+ c/enc/literal_cost.h \
+ c/enc/memory.h \
+ c/enc/metablock.h \
+ c/enc/metablock_inc.h \
+ c/enc/params.h \
+ c/enc/prefix.h \
+ c/enc/quality.h \
+ c/enc/ringbuffer.h \
+ c/enc/static_dict.h \
+ c/enc/static_dict_lut.h \
+ c/enc/utf8_util.h \
+ c/enc/write_bits.h
+
+BROTLI_INCLUDE = \
+ c/include/brotli/decode.h \
+ c/include/brotli/encode.h \
+ c/include/brotli/port.h \
+ c/include/brotli/types.h