File: gen_qt_shim_moc.sh

package info (click to toggle)
chromium 138.0.7204.183-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,071,908 kB
  • sloc: cpp: 34,937,088; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (43 lines) | stat: -rwxr-xr-x 1,446 bytes parent folder | download | duplicates (9)
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
#!/usr/bin/env bash
# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

set -o nounset
set -o errexit

URL5="http://archive.debian.org/debian/pool/main/q/qtbase-opensource-src"
PACKAGE5="qtbase5-dev-tools_5.3.2+dfsg-4+deb8u2_amd64.deb"
SHA256_5="7703754f2c230ce6b8b6030b6c1e7e030899aa9f45a415498df04bd5ec061a76"

URL6="http://archive.ubuntu.com/ubuntu/pool/universe/q/qt6-base"
PACKAGE6="qt6-base-dev-tools_6.2.4+dfsg-2ubuntu1_amd64.deb"
SHA256_6="8dddfc79e7743185b07c478ca0f96a4ccc13d48ecccc42f44d2578c33c7d9b8b"

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TMP_DIR=$(mktemp -d -p "$SCRIPT_DIR")
function cleanup {
    rm -rf "$TMP_DIR"
}
trap cleanup EXIT

cd "$TMP_DIR"
wget "$URL5/$PACKAGE5"
echo "$SHA256_5  $PACKAGE5" | shasum -a 256 -c
dpkg -x "$PACKAGE5" .
wget "$URL6/$PACKAGE6"
echo "$SHA256_6  $PACKAGE6" | shasum -a 256 -c
dpkg -x "$PACKAGE6" .
cat > ../qt5_shim_moc.cc <<EOF
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

EOF
cd "$SCRIPT_DIR/../.."
cp ui/qt/qt5_shim_moc.cc ui/qt/qt6_shim_moc.cc
"$TMP_DIR/usr/lib/x86_64-linux-gnu/qt5/bin/moc" ui/qt/qt_shim.h \
    >> ui/qt/qt5_shim_moc.cc
"$TMP_DIR//usr/lib/qt6/libexec/moc" ui/qt/qt_shim.h \
    >> ui/qt/qt6_shim_moc.cc
git cl format ui/qt/qt5_shim_moc.cc ui/qt/qt6_shim_moc.cc