-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathHDLC
89 lines (75 loc) · 2.63 KB
/
HDLC
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
77
78
79
80
81
82
83
84
85
86
87
88
89
# HDLC openroad
# Authors:
# Unai Martinez-Corral
#
# Copyright Unai Martinez-Corral
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
set -e
makedepends=(
bison
flex
liblemon-dev
libeigen3-dev
libomp-11-dev
libreadline-dev
libspdlog-dev
swig
tcl-dev
tcllib
)
makedepends_gui=(
qtbase5-dev
)
setup() {
git clone --recursive https://github.com/The-OpenROAD-Project/OpenROAD.git /tmp/openroad
cd /tmp/openroad
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//g' > /tmp/hdlc.openroad.version
mkdir build /tmp/boost /tmp/or-tools
}
build() {
DependencyInstaller='/tmp/openroad/etc/DependencyInstaller.sh'
# system package libboost-all-dev is version 1.74.0, but openroad requires at least 1.78
cd /tmp/boost
boostVersion=$(cat "$DependencyInstaller" | grep boostVersionBig= | sed 's/.*=//').$(cat "$DependencyInstaller" | grep boostVersionSmall= | sed 's/.*\.//')
curl -fsSL "https://boostorg.jfrog.io/artifactory/main/release/${boostVersion}/source/boost_${boostVersion//./_}.tar.gz" |\
tar -xz --strip 1
./bootstrap.sh --prefix='/usr/local'
./b2 install --with-iostreams --with-test --with-serialization --with-system --with-thread -j $(nproc)
# or-tools is not available as a system package
cd /tmp/or-tools
# OpenROAD's build recipes expect or-tools to be located at '/opt/or-tools'.
# See https://github.com/search?q=repo%3AThe-OpenROAD-Project%2FOpenROAD%20or-tools&type=code
orToolsPath='/opt/or-tools'
mkdir -p "$orToolsPath"
orToolsVersion=$(cat "$DependencyInstaller" | grep orToolsVersionBig= | sed 's/.*=//').$(cat "$DependencyInstaller" | grep orToolsVersionSmall= | sed 's/.*\.//')
curl -fsSL "https://github.com/google/or-tools/releases/download/v$(echo "$orToolsVersion" | sed 's/\(.*\)\..*/\1/')/or-tools_amd64_debian-11_cpp_v${orToolsVersion}.tar.gz" |\
tar -xz --strip 1 -C "$orToolsPath"
cd /tmp/openroad/build
cmake ..
make DESTDIR=/opt/openroad install
}
# -DBUILD_GUI=ON
depends=(
libomp5-11
libpython3.9
libspdlog1
tcl
)
depends_gui=(
libqt5widgets5
)