| # syntax = docker/dockerfile:1.0-experimental |
| FROM centos:centos6 as build |
| |
| # Common development tools and libraries (kitchen sink approach) |
| RUN yum groupinstall -y "Development Tools" "Development Libraries" |
| RUN yum -y install centos-release-scl && \ |
| yum -y install devtoolset-8 devtoolset-8-libatomic-devel |
| |
| ENV CC=/opt/rh/devtoolset-8/root/usr/bin/gcc \ |
| CPP=/opt/rh/devtoolset-8/root/usr/bin/cpp \ |
| CXX="/opt/rh/devtoolset-8/root/usr/bin/g++" \ |
| PATH=/opt/rh/devtoolset-8/root/usr/bin:$PATH \ |
| LD_LIBRARY_PATH=/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:$LD_LIBRARY_PATH |
| # |
| |
| # magic dependencies |
| RUN yum install -y csh wget tcl-devel tk-devel libX11-devel cairo-devel ncurses-devel |
| |
| # git clone magic components |
| RUN git clone https://github.com/RTimothyEdwards/magic.git |
| #RUN git clone https://github.com/The-OpenROAD-Project/magic.git |
| |
| WORKDIR "magic" |
| |
| RUN git checkout bebd603296d4afa4ff413669cef3b058e9fccf39 |
| |
| # build |
| RUN ./configure --prefix=/build && \ |
| make -j4 && \ |
| make install |
| |
| RUN mkdir -p /build/version/ |
| |
| RUN date +"Build Timestamp: %Y-%m-%d_%H-%M-%S" > /build/version/magic.version |
| RUN git rev-parse HEAD >> /build/version/magic.version |
| RUN tar -czf /build.tar.gz /build |
| |