Home | History | Annotate | Download | only in skia-release
      1 # Dockerfile for building Skia in release mode, using 3rd party libs from DEPS, with SwiftShader.
      2 FROM launcher.gcr.io/google/clang-debian9 AS build
      3 RUN apt-get update && apt-get upgrade -y && apt-get install -y \
      4   git \
      5   python \
      6   curl \
      7   build-essential \
      8   libfontconfig-dev \
      9   libgl1-mesa-dev \
     10   libglu1-mesa-dev \
     11   && groupadd -g 2000 skia \
     12   && useradd -u 2000 -g 2000 skia
     13 
     14 USER skia
     15 
     16 ADD --chown=skia:skia https://storage.googleapis.com/swiftshader-binaries/OpenGL_ES/Latest/Linux/libGLESv2.so /usr/local/lib/libGLESv2.so
     17 ADD --chown=skia:skia  https://storage.googleapis.com/swiftshader-binaries/OpenGL_ES/Latest/Linux/libEGL.so /usr/local/lib/libEGL.so
     18 RUN cd /tmp \
     19   && git clone 'https://chromium.googlesource.com/chromium/tools/depot_tools.git' \
     20   && git clone https://swiftshader.googlesource.com/SwiftShader swiftshader \
     21   && mkdir -p /tmp/skia \
     22   && cd /tmp/skia \
     23   && /tmp/depot_tools/fetch skia \
     24   && cd skia
     25 
     26 RUN mkdir -p /tmp/skia/skia/out/Static
     27 RUN echo '  \n\
     28 cc = "clang"  \n\
     29 cxx = "clang++"  \n\
     30 skia_use_egl = true  \n\
     31 is_debug = false  \n\
     32 skia_use_system_freetype2 = false  \n\
     33 extra_cflags = [  \n\
     34   "-I/tmp/swiftshader/include",  \n\
     35   "-DGR_EGL_TRY_GLES3_THEN_GLES2",  \n\
     36   "-g0",  \n\
     37 ]  \n\
     38 extra_ldflags = [  \n\
     39   "-L/usr/local/lib",  \n\
     40   "-Wl,-rpath",  \n\
     41   "-Wl,/usr/local/lib"  \n\
     42 ] ' > /tmp/skia/skia/out/Static/args.gn
     43 
     44 RUN cd /tmp/skia/skia \
     45   && python tools/git-sync-deps \
     46   && ./bin/fetch-gn \
     47   && ./bin/gn gen out/Static \
     48   && git rev-parse HEAD > VERSION \
     49   && /tmp/depot_tools/ninja -C out/Static
     50 
     51 # Uncomment the lines below and update the ref to patch in a CL.
     52 #
     53 #RUN cd /tmp/skia/skia \
     54 #  && git fetch https://skia.googlesource.com/skia refs/changes/25/130325/15 \
     55 #  && git checkout FETCH_HEAD \
     56 #  && /tmp/depot_tools/ninja -C out/Static
     57