summaryrefslogtreecommitdiff
path: root/.ci/ci-configure.sh
blob: 3e398bd057fb2b00fc5f05b23ed882d6f4fdc8a8 (plain)
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#!/bin/sh

set -e

. .ci/travis.sh

if [ "$BUILDSYSTEM" = "ninja" ] ; then
  if [ "$DISTRO" != "" ] ; then
    # Normal build test of all targets
    OPTS=" -Decore-imf-loaders-disabler=scim,ibus -Davahi=false -Dmono=false -Dcxx=false"

    WAYLAND_LINUX_COPTS=" -Dwl=true -Ddrm=true -Dopengl=es-egl"

    ENABLED_LINUX_COPTS=" -Dharfbuzz=true -Dhyphen=true"

    DISABLED_LINUX_COPTS=" -Dsystemd=false"

    RELEASE_READY_LINUX_COPTS=" --buildtype=release"

    if [ "$1" = "options-enabled" ]; then
      OPTS="$OPTS $ENABLED_LINUX_COPTS $WAYLAND_LINUX_COPTS"
    fi

    if [ "$1" = "options-disabled" ]; then
      OPTS="$OPTS $DISABLED_LINUX_COPTS"
    fi

    if [ "$1" = "release-ready" ]; then
      OPTS="$OPTS $RELEASE_READY_LINUX_COPTS"
    fi
    docker exec --env MAKEFLAGS="-j5 -rR" --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \
        --env CXX="ccache g++" --env CFLAGS="-fdirectives-only" --env CXXFLAGS="-fdirectives-only" \
        --env LD="ld.gold" $(cat $HOME/cid) sh -c "mkdir build && meson build $OPTS"
  else
    # Prepare OSX env for build
    mkdir -p ~/Library/LaunchAgents
    ln -sfv /usr/local/opt/d-bus/*.plist ~/Library/LaunchAgents
    launchctl load ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist
    export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"

    export CFLAGS="-I/usr/local/opt/openssl/include -frewrite-includes $CFLAGS"
    export LDFLAGS="-L/usr/local/opt/openssl/lib $LDFLAGS"
    export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
    mkdir build && meson build -Decore-imf-loaders-disabler=scim,ibus -Dx11=false -Davahi=false -Dmono=false -Dcxx=false -Deeze=false -Dsystemd=false -Dnls=false -Dcocoa=true -Demotion-loaders-disabler=gstreamer,gstreamer1,libvlc,xine
  fi
else
  CI_BUILD_TYPE="$1"

  DEFAULT_LINUX_COPTS="--prefix=/usr/ --with-tests=regular --disable-cxx-bindings --disable-dependency-tracking -C"

  WAYLAND_LINUX_COPTS=" --enable-wayland --enable-elput --enable-drm \
  --enable-wayland-ivi-shell --enable-gl-drm --with-opengl=es --enable-egl"

  ENABLED_LINUX_COPTS=" --enable-harfbuzz --enable-liblz4 --enable-image-loader-webp --enable-xinput22 \
  --enable-multisense --enable-lua-old --enable-xpresent --enable-hyphen \
  --enable-pixman --enable-pixman-font --enable-pixman-rect --enable-pixman-line \
  --enable-pixman-poly --enable-pixman-image --enable-pixman-image-scale-sample \
  --enable-image-loader-generic --enable-libuv --enable-tile-rotate --enable-vnc-server \
  --enable-fb --enable-v4l2 --enable-cserve \
  --enable-ecore-wayland --enable-ecore-drm --enable-cancel-ok --with-crypto=gnutls \
  --enable-debug --disable-gstreamer1 --enable-gstreamer"

  # Not compatible with Open GL ES and thus the wayland options. Need to think about having different
  # jobs for the different supported GL flavours.
  #--enable-sdl

  DISABLED_LINUX_COPTS=" --disable-neon --disable-libeeze --disable-systemd --disable-magic-debug \
  --disable-valgrind --disable-gstreamer1 \
  --disable-fontconfig --disable-fribidi --disable-poppler --disable-spectre --disable-libraw \
  --disable-librsvg --disable-xcf --disable-libmount --disable-tslib --disable-audio \
  --disable-pulseaudio --disable-avahi --disable-xinput2 --disable-xim --disable-scim \
  --disable-ibus --disable-physics --disable-quick-launch --disable-elua"

  RELEASE_READY_LINUX_COPTS=" --with-profile=release"

  MINGW_COPTS=" --prefix=/root/EFL/ewpi_64 --host=x86_64-w64-mingw32 --with-eolian-gen=/usr/local/bin/eolian_gen \
  --with-edje-cc=/usr/local/bin/edje_cc --with-eet-eet=/usr/local/bin/eet \
  --with-bin-elm-prefs-cc=/usr/local/bin/elm_prefs_cc \
  --disable-static --with-tests=regular --with-crypto=openssl --disable-gstreamer1 \
  --disable-libmount --disable-valgrind --disable-avahi --disable-spectre --disable-libraw \
  --disable-librsvg --disable-pulseaudio --disable-cxx-bindings \
  --disable-physics --disable-image-loader-tiff"

  patch -p1 < .ci/efl.m4.diff
  sed -i.orig 's/AC_INIT\(.*\)efl_version-[a-zA-Z0-9]\+/AC_INIT\1efl_version/g' configure.ac

  if [ "$DISTRO" != "" ] ; then
    # Normal build test of all targets
    OPTS="$DEFAULT_LINUX_COPTS"

    if [ "$1" = "options-enabled" ]; then
      OPTS="$OPTS $ENABLED_LINUX_COPTS $WAYLAND_LINUX_COPTS"
    fi

    if [ "$1" = "options-disabled" ]; then
      OPTS="$OPTS $DISABLED_LINUX_COPTS"
    fi

    if [ "$1" = "release-ready" ]; then
      OPTS="$OPTS $RELEASE_READY_LINUX_COPTS"
    fi

    if [ "$1" = "mingw" ]; then
      OPTS="$OPTS $MINGW_COPTS"
      docker exec $(cat $HOME/cid) sh -c 'rm -f /src/config.cache'
    fi
    docker exec $(cat $HOME/cid) sh -c 'rm -f ~/.ccache/ccache.conf'
    travis_fold autoreconf autoreconf
    if [ "$1" = "mingw" ]; then
      docker exec $(cat $HOME/cid) sh -c 'rm -f /src/config.cache'
      docker exec --env MAKEFLAGS="-j5 -rR" --env EIO_MONITOR_POLL=1 --env CFLAGS="-pipe" --env CXXFLAGS="-pipe" \
        --env CPPFLAGS="-I/root/EFL/ewpi_64/include -DECORE_WIN32_WIP_POZEFLKSD" --env LDFLAGS="-L/root/EFL/ewpi_64/lib/" --env PKG_CONFIG_PATH="/root/EFL/ewpi_64/lib/pkgconfig/" \
        $(cat $HOME/cid) sh -c "autoreconf -iv"
    else
      docker exec --env MAKEFLAGS="-j5 -rR" --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \
        --env CXX="ccache g++" --env CFLAGS="-fdirectives-only" --env CXXFLAGS="-fdirectives-only" \
        --env LD="ld.gold" $(cat $HOME/cid) sh -c "LIBTOOLIZE_OPTIONS='--no-warn' autoreconf -iv"
    fi
    travis_endfold autoreconf
    travis_fold configure "configure $OPTS"
    if [ "$1" = "mingw" ]; then
      docker exec --env MAKEFLAGS="-j5 -rR" --env EIO_MONITOR_POLL=1 --env CFLAGS="-pipe" --env CXXFLAGS="-pipe" \
        --env CPPFLAGS="-I/root/EFL/ewpi_64/include -DECORE_WIN32_WIP_POZEFLKSD" --env LDFLAGS="-L/root/EFL/ewpi_64/lib/" --env PKG_CONFIG_PATH="/root/EFL/ewpi_64/lib/pkgconfig/" \
        $(cat $HOME/cid) sh -c ".ci/configure.sh $OPTS"
    else
      docker exec --env MAKEFLAGS="-j5 -rR" --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \
        --env CXX="ccache g++" --env CFLAGS="-fdirectives-only" --env CXXFLAGS="-fdirectives-only" \
        --env LD="ld.gold" $(cat $HOME/cid) sh -c ".ci/configure.sh $OPTS"
    fi
  else
    OSX_COPTS="--disable-cxx-bindings --with-tests=regular --disable-dependency-tracking -C"

    # Prepare OSX env for build
    mkdir -p ~/Library/LaunchAgents
    ln -sfv /usr/local/opt/d-bus/*.plist ~/Library/LaunchAgents
    launchctl load ~/Library/LaunchAgents/org.freedesktop.dbus-session.plist
    export PATH="/usr/local/opt/ccache/libexec:$(brew --prefix gettext)/bin:$PATH"

    export CFLAGS="-I/usr/local/opt/openssl/include -frewrite-includes $CFLAGS"
    export LDFLAGS="-L/usr/local/opt/openssl/lib $LDFLAGS"
    export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"

    # Normal build test of all targets
    rm -f ~/.ccache/ccache.conf
    travis_fold autoreconf autoreconf
    LIBTOOLIZE_OPTIONS='--no-warn' autoreconf -iv
    travis_endfold autoreconf
    travis_fold configure "configure $OSX_COPTS"
    .ci/configure.sh $OSX_COPTS
  fi
    travis_endfold configure
fi