blob: aa11f86d3e6d304a4d61845a6241f29f4e3e5cf5 [file] [log] [blame]
agorararmard790b9522020-10-21 19:39:39 +02001# Copyright 2020 Efabless Corporation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# syntax = docker/dockerfile:1.0-experimental
16FROM centos:centos6 as build
17
18# Common development tools and libraries (kitchen sink approach)
19RUN yum groupinstall -y "Development Tools" "Development Libraries"
20RUN yum -y install centos-release-scl && \
21 yum -y install devtoolset-8 devtoolset-8-libatomic-devel
22
23# python 3.6
24RUN yum install -y https://repo.ius.io/ius-release-el6.rpm
25RUN yum install -y python36u python36u-libs python36u-devel python36u-pip python36u-tkinter
26RUN alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 60
27
28# magic dependencies
29RUN yum install -y csh wget tcl-devel tk-devel libX11-devel cairo-devel ncurses-devel
30
31#General utils
32RUN yum install -y tcllib
33RUN yum install -y git tcl tk libjpeg libgomp libXext libSM libXft libffi cairo gettext Xvfb
34
35RUN git clone git://opencircuitdesign.com/magic magic_15102020
36
37WORKDIR magic_15102020
38
39RUN git checkout 4bbe4ef74e5eac98c503bf6483ee7a40dbb0547a
40
41# build
42RUN ./configure --prefix=/build && \
43 make -j4 && \
44 make install
45
46
47ENV MAGIC_ROOT=/magic_root
48ENV BUILD_PATH=/build/
49
50ENV PATH=$MAGIC_ROOT:$MAGIC_ROOT/scripts:$BUILD_PATH/bin:$BUILD_PATH/bin/Linux-x86_64:$BUILD_PATH/pdn/scripts:$PATH
51ENV LD_LIBRARY_PATH=$BUILD_PATH/lib:$BUILD_PATH/lib/Linux-x86_64:$LD_LIBRARY_PATH
52ENV MANPATH=$BUILD_PATH/share/man:$MANPATH
53
54
55RUN mkdir -p /build/version/
56
57RUN date +"Build Timestamp: %Y-%m-%d_%H-%M-%S" > /build/version/magic.version
58RUN git rev-parse HEAD >> /build/version/magic.version
59RUN tar -czf /build.tar.gz /build
60
61WORKDIR /magic_root