Skip to content

Commit 7806c81

Browse files
committed
Add Bazel v0.26.1 package.
1 parent 26fc3dd commit 7806c81

9 files changed

+231
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bf8e94eefa074737

package/.cm/alias-u-bf8e94eefa074737

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tool-bazel-0.26.1-linux
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"backup_data_uid": "bf8e94eefa074737",
3+
"backup_module_uid": "1dc07ee0f4742028",
4+
"backup_module_uoa": "package",
5+
"control": {
6+
"engine": "CK",
7+
"iso_datetime": "2020-04-03T08:26:57.472577",
8+
"version": [
9+
"1",
10+
"12",
11+
"2"
12+
]
13+
},
14+
"data_name": "tool-bazel-0.26.1-linux"
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"customize": {
3+
"extra_dir": "",
4+
"git_src_dir": "src",
5+
"install_env": {
6+
"BAZEL_PATCH1": "javac-max-heap-500mb.patch",
7+
"BAZEL_PATCH2": "non-64bit-unix-warning.patch",
8+
"BAZEL_URL": "https://github.com/bazelbuild/bazel/releases/download/0.26.1/bazel-0.26.1-dist.zip",
9+
"BAZEL_ZIP": "bazel-0.26.1-dist.zip"
10+
},
11+
"use_git_revision": "no",
12+
"version": "0.26.1"
13+
},
14+
"deps": {
15+
"java-compiler": {
16+
"local": "yes",
17+
"name": "Java compiler",
18+
"sort": 10,
19+
"tags": "compiler,lang-java",
20+
"version_from": [
21+
1,
22+
8,
23+
0,
24+
131
25+
],
26+
"version_to": [
27+
1,
28+
8,
29+
0,
30+
131
31+
]
32+
}
33+
},
34+
"end_full_path": {
35+
"linux": "install/bin/bazel"
36+
},
37+
"need_cpu_info": "yes",
38+
"only_for_host_os_tags": [
39+
"linux"
40+
],
41+
"only_for_target_os_tags": [
42+
"linux"
43+
],
44+
"process_script": "install",
45+
"soft_uoa": "359f7730bd23ec60",
46+
"suggested_path": "tool-bazel",
47+
"tags": [
48+
"tool",
49+
"bazel",
50+
"v0.26.1",
51+
"v0.26",
52+
"v0",
53+
"channel-stable"
54+
],
55+
"template": "yes",
56+
"template_type": "Bazel"
57+
}
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Pre-requisites:
2+
* zip (sudo apt-get install zip)
3+
* protobuf 3.6.0 or newer (pip install -U protobuf)
+127
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
#! /bin/bash
2+
3+
#
4+
# Installation script for Bazel on (AArch64) Linux platforms.
5+
#
6+
# See CK LICENSE.txt for licensing details.
7+
# See CK COPYRIGHT.txt for copyright details.
8+
#
9+
# Developer(s):
10+
# - Anton Lokhmotov, 2017.
11+
#
12+
13+
#
14+
# NB: Implicit dependencies (not yet in metadata):
15+
# - Java SDK (but detected via soft description?)
16+
# - C++ compiler
17+
#
18+
19+
# PACKAGE_DIR
20+
# INSTALL_DIR
21+
22+
export BAZEL_SRC_DIR=${INSTALL_DIR}/src
23+
export BAZEL_TMP_DIR=/tmp
24+
25+
################################################################################
26+
export BAZEL_INSTALL_LOG=${INSTALL_DIR}/ck-install.log
27+
28+
echo
29+
echo "Logging into '${BAZEL_INSTALL_LOG}' ..."
30+
31+
echo "** DATE **" >> ${BAZEL_INSTALL_LOG}
32+
date >> ${BAZEL_INSTALL_LOG}
33+
34+
echo "** SET **" >> ${BAZEL_INSTALL_LOG}
35+
set >> ${BAZEL_INSTALL_LOG}
36+
37+
################################################################################
38+
echo ""
39+
echo "Downloading Bazel from '${BAZEL_URL}' ..."
40+
41+
echo "** WGET **" >> ${BAZEL_INSTALL_LOG}
42+
cd ${BAZEL_TMP_DIR}
43+
wget ${BAZEL_URL} -O ${BAZEL_ZIP} --no-check-certificate \
44+
>> ${BAZEL_INSTALL_LOG} 2>&1
45+
46+
if [ "${?}" != "0" ] ; then
47+
echo "Error: Downloading Bazel from '${BAZEL_URL}' failed!"
48+
exit 1
49+
fi
50+
51+
################################################################################
52+
echo ""
53+
echo "Unpacking Bazel to '${BAZEL_SRC_DIR}' ..."
54+
55+
echo "** UNZIP **" >> ${BAZEL_INSTALL_LOG}
56+
rm -rf ${BAZEL_SRC_DIR}
57+
mkdir ${BAZEL_SRC_DIR}
58+
unzip ${BAZEL_ZIP} -d ${BAZEL_SRC_DIR} \
59+
>> ${BAZEL_INSTALL_LOG} 2>&1
60+
61+
if [ "${?}" != "0" ] ; then
62+
echo "Error: Unpacking Bazel to '${BAZEL_SRC_DIR}' failed!"
63+
exit 1
64+
fi
65+
66+
rm ${BAZEL_ZIP}
67+
68+
#################################################################################
69+
export MACH=$(uname -m)
70+
71+
echo
72+
echo "Patching Bazel ..."
73+
74+
echo "** PATCH **" >> ${BAZEL_INSTALL_LOG}
75+
# Apply patch for arm machine to prevent javac running out of heap memory.
76+
if [ "${HOSTTYPE}" == "arm" ] ; then
77+
echo "Applying patch '${BAZEL_PATCH1}' ..."
78+
cd ${BAZEL_SRC_DIR} && patch -p1 < ${PACKAGE_DIR}/${BAZEL_PATCH1} >> ${BAZEL_INSTALL_LOG} 2>&1
79+
fi
80+
81+
# Apply patch for 32-bit OS to convert error to warning in mapped_file.h.
82+
if [ ${CK_TARGET_CPU_BITS} == 32 ]; then
83+
echo "Applying patch '${BAZEL_PATCH2}' ..."
84+
cd ${BAZEL_SRC_DIR} && patch -p1 < ${PACKAGE_DIR}/${BAZEL_PATCH2} >> ${BAZEL_INSTALL_LOG} 2>&1
85+
fi
86+
87+
if [ "${?}" != "0" ] ; then
88+
echo "Error: Patching Bazel failed!"
89+
exit 1
90+
fi
91+
92+
################################################################################
93+
echo ""
94+
echo "Compiling Bazel ..."
95+
96+
echo "** COMPILE **" >> ${BAZEL_INSTALL_LOG}
97+
cd ${BAZEL_SRC_DIR}
98+
99+
if [ "$CK_SHOW_BAZEL_OUTPUT" == "yes" ] || [ "$CK_SHOW_BAZEL_OUTPUT" == "YES" ] ; then
100+
./compile.sh
101+
else
102+
./compile.sh >> ${BAZEL_INSTALL_LOG} 2>&1
103+
fi
104+
105+
if [ "${?}" != "0" ] ; then
106+
echo "Error: Compiling Bazel failed!"
107+
exit 1
108+
fi
109+
110+
################################################################################
111+
echo ""
112+
echo "Installing Bazel ..."
113+
114+
echo "** INSTALL **" >> ${BAZEL_INSTALL_LOG}
115+
mkdir -p ${INSTALL_DIR}/install
116+
mkdir -p ${INSTALL_DIR}/install/bin
117+
cp ${BAZEL_SRC_DIR}/output/bazel ${INSTALL_DIR}/install/bin/ >> ${BAZEL_INSTALL_LOG} 2>&1
118+
119+
if [ "${?}" != "0" ] ; then
120+
echo "Error: Installing Bazel failed!"
121+
exit 1
122+
fi
123+
124+
###############################################################################
125+
echo ""
126+
echo "Successfully installed Bazel into '${INSTALL_DIR}'."
127+
echo
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/scripts/bootstrap/compile.sh b/scripts/bootstrap/compile.sh
2+
index 494c1a1..068f62a 100755
3+
--- a/scripts/bootstrap/compile.sh
4+
+++ b/scripts/bootstrap/compile.sh
5+
@@ -121,7 +121,7 @@ function java_compilation() {
6+
7+
run "${JAVAC}" -classpath "${classpath}" -sourcepath "${sourcepath}" \
8+
-d "${output}/classes" -source "$JAVA_VERSION" -target "$JAVA_VERSION" \
9+
- -encoding UTF-8 "@${paramfile}"
10+
+ -encoding UTF-8 "@${paramfile}" -J-Xmx500M
11+
12+
log "Extracting helper classes for $name..."
13+
for f in ${library_jars} ; do
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/src/tools/singlejar/mapped_file.h b/src/tools/singlejar/mapped_file.h
2+
index b6c5e34..7c85b4d 100644
3+
--- a/src/tools/singlejar/mapped_file.h
4+
+++ b/src/tools/singlejar/mapped_file.h
5+
@@ -37,7 +37,7 @@
6+
*/
7+
#if !((defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)) && \
8+
__SIZEOF_POINTER__ == 8)
9+
-#error This code for 64 bit Unix.
10+
+#warning This code for 64 bit Unix.
11+
#endif
12+
13+
class MappedFile {

0 commit comments

Comments
 (0)