1ffe3c632Sopenharmony_ciFROM debian:jessie
2ffe3c632Sopenharmony_ci
3ffe3c632Sopenharmony_ci# Install dependencies.  We start with the basic ones require to build protoc
4ffe3c632Sopenharmony_ci# and the C++ build
5ffe3c632Sopenharmony_ciRUN apt-get update && apt-get install -y \
6ffe3c632Sopenharmony_ci  autoconf \
7ffe3c632Sopenharmony_ci  autotools-dev \
8ffe3c632Sopenharmony_ci  build-essential \
9ffe3c632Sopenharmony_ci  bzip2 \
10ffe3c632Sopenharmony_ci  ccache \
11ffe3c632Sopenharmony_ci  curl \
12ffe3c632Sopenharmony_ci  gcc \
13ffe3c632Sopenharmony_ci  git \
14ffe3c632Sopenharmony_ci  libc6 \
15ffe3c632Sopenharmony_ci  libc6-dbg \
16ffe3c632Sopenharmony_ci  libc6-dev \
17ffe3c632Sopenharmony_ci  libgtest-dev \
18ffe3c632Sopenharmony_ci  libtool \
19ffe3c632Sopenharmony_ci  make \
20ffe3c632Sopenharmony_ci  parallel \
21ffe3c632Sopenharmony_ci  time \
22ffe3c632Sopenharmony_ci  wget \
23ffe3c632Sopenharmony_ci  re2c \
24ffe3c632Sopenharmony_ci  sqlite3 \
25ffe3c632Sopenharmony_ci  vim \
26ffe3c632Sopenharmony_ci  libonig-dev \
27ffe3c632Sopenharmony_ci  libsqlite3-dev \
28ffe3c632Sopenharmony_ci  && apt-get clean
29ffe3c632Sopenharmony_ci
30ffe3c632Sopenharmony_ci# Install php dependencies
31ffe3c632Sopenharmony_ciRUN apt-get clean && apt-get update && apt-get install -y --force-yes \
32ffe3c632Sopenharmony_ci  php5 \
33ffe3c632Sopenharmony_ci  libcurl4-openssl-dev \
34ffe3c632Sopenharmony_ci  libgmp-dev \
35ffe3c632Sopenharmony_ci  libgmp3-dev \
36ffe3c632Sopenharmony_ci  libssl-dev \
37ffe3c632Sopenharmony_ci  libxml2-dev \
38ffe3c632Sopenharmony_ci  unzip \
39ffe3c632Sopenharmony_ci  zlib1g-dev \
40ffe3c632Sopenharmony_ci  pkg-config \
41ffe3c632Sopenharmony_ci  && apt-get clean
42ffe3c632Sopenharmony_ci
43ffe3c632Sopenharmony_ci# Install other dependencies
44ffe3c632Sopenharmony_ciRUN ln -sf /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
45ffe3c632Sopenharmony_ciRUN wget https://ftp.gnu.org/gnu/bison/bison-3.0.1.tar.gz -O /var/local/bison-3.0.1.tar.gz
46ffe3c632Sopenharmony_ciRUN cd /var/local \
47ffe3c632Sopenharmony_ci  && tar -zxvf bison-3.0.1.tar.gz \
48ffe3c632Sopenharmony_ci  && cd /var/local/bison-3.0.1 \
49ffe3c632Sopenharmony_ci  && ./configure \
50ffe3c632Sopenharmony_ci  && make \
51ffe3c632Sopenharmony_ci  && make install
52ffe3c632Sopenharmony_ci
53ffe3c632Sopenharmony_ci# Install composer
54ffe3c632Sopenharmony_ciRUN curl -sS https://getcomposer.org/installer | php
55ffe3c632Sopenharmony_ciRUN mv composer.phar /usr/local/bin/composer
56ffe3c632Sopenharmony_ci
57ffe3c632Sopenharmony_ci# Download php source code
58ffe3c632Sopenharmony_ciRUN git clone https://github.com/php/php-src
59ffe3c632Sopenharmony_ci
60ffe3c632Sopenharmony_ci# php 8.0
61ffe3c632Sopenharmony_ciRUN cd php-src \
62ffe3c632Sopenharmony_ci  && git checkout php-8.0.0alpha3 \
63ffe3c632Sopenharmony_ci  && ./buildconf --force
64ffe3c632Sopenharmony_ciRUN cd php-src \
65ffe3c632Sopenharmony_ci  && ./configure \
66ffe3c632Sopenharmony_ci  --enable-bcmath \
67ffe3c632Sopenharmony_ci  --enable-mbstring \
68ffe3c632Sopenharmony_ci  --with-gmp \
69ffe3c632Sopenharmony_ci  --with-openssl \
70ffe3c632Sopenharmony_ci  --with-zlib \
71ffe3c632Sopenharmony_ci  --prefix=/usr/local/php-8.0 \
72ffe3c632Sopenharmony_ci  && make \
73ffe3c632Sopenharmony_ci  && make install \
74ffe3c632Sopenharmony_ci  && make clean
75ffe3c632Sopenharmony_ciRUN cd php-src \
76ffe3c632Sopenharmony_ci  && ./configure \
77ffe3c632Sopenharmony_ci  --enable-bcmath \
78ffe3c632Sopenharmony_ci  --enable-mbstring \
79ffe3c632Sopenharmony_ci  --enable-maintainer-zts \
80ffe3c632Sopenharmony_ci  --with-gmp \
81ffe3c632Sopenharmony_ci  --with-openssl \
82ffe3c632Sopenharmony_ci  --with-zlib \
83ffe3c632Sopenharmony_ci  --prefix=/usr/local/php-8.0-zts \
84ffe3c632Sopenharmony_ci  && make \
85ffe3c632Sopenharmony_ci  && make install \
86ffe3c632Sopenharmony_ci  && make clean
87ffe3c632Sopenharmony_ci
88ffe3c632Sopenharmony_ciRUN wget -O phpunit https://phar.phpunit.de/phpunit-9.phar \
89ffe3c632Sopenharmony_ci  && chmod +x phpunit \
90ffe3c632Sopenharmony_ci  && cp phpunit /usr/local/php-8.0/bin \
91ffe3c632Sopenharmony_ci  && mv phpunit /usr/local/php-8.0-zts/bin
92ffe3c632Sopenharmony_ci
93ffe3c632Sopenharmony_ci# Install php dependencies
94ffe3c632Sopenharmony_ciRUN apt-get clean && apt-get update && apt-get install -y --force-yes \
95ffe3c632Sopenharmony_ci  valgrind \
96ffe3c632Sopenharmony_ci  && apt-get clean
97