mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Build cairo in-tree
This commit is contained in:
parent
9256b5bd47
commit
f13e6ac388
8 changed files with 80 additions and 9 deletions
|
@ -111,7 +111,13 @@ ROUGH_DEPS_$(1)=$$(call rwildcard,$$(S)src/$(1),*h *c *cpp *rs *rc)
|
||||||
DONE_DEPS_$(1)=$$(foreach dep,$$(DEPS_$(1)),$$(DONE_$$(dep)))
|
DONE_DEPS_$(1)=$$(foreach dep,$$(DEPS_$(1)),$$(DONE_$$(dep)))
|
||||||
# the main target for a submodule
|
# the main target for a submodule
|
||||||
# --
|
# --
|
||||||
$$(DONE_$(1)) : $$(DONE_DEPS_$(1)) $$(ROUGH_DEPS_$(1)) $$(CFG_RUSTC)
|
|
||||||
|
# Native builds do not depend on the rust compiler, so we can build them in parallel with rustc
|
||||||
|
ifneq "$$(filter $(1),$$(NATIVE_BUILDS))" "$(1)"
|
||||||
|
RUSTC_DEP_$(1)=$$(CFG_RUSTC)
|
||||||
|
endif
|
||||||
|
|
||||||
|
$$(DONE_$(1)) : $$(DONE_DEPS_$(1)) $$(ROUGH_DEPS_$(1)) $$(RUSTC_DEP_$(1))
|
||||||
# @$$(call E, make: $(1))
|
# @$$(call E, make: $(1))
|
||||||
# @$$(call E, $(1) deps= $$(DEPS_$(1)))
|
# @$$(call E, $(1) deps= $$(DEPS_$(1)))
|
||||||
# @$$(call E, $(1) done_deps= $$(DONE_DEPS_$(1)))
|
# @$$(call E, $(1) done_deps= $$(DONE_DEPS_$(1)))
|
||||||
|
|
|
@ -16,7 +16,7 @@ On OS X (MacPorts):
|
||||||
|
|
||||||
On Debian-based Linuxes:
|
On Debian-based Linuxes:
|
||||||
|
|
||||||
sudo apt-get install libcairo2-dev libpango1.0-dev autoconf2.13 freeglut3-dev
|
sudo apt-get install libcairo2-dev libpango1.0-dev autoconf2.13 freeglut3-dev libtool
|
||||||
|
|
||||||
Servo builds its own copy of Rust, so there is no need to provide a Rust
|
Servo builds its own copy of Rust, so there is no need to provide a Rust
|
||||||
compiler.
|
compiler.
|
||||||
|
|
45
configure
vendored
45
configure
vendored
|
@ -381,9 +381,26 @@ fi
|
||||||
|
|
||||||
step_msg "running submodule autoconf scripts"
|
step_msg "running submodule autoconf scripts"
|
||||||
|
|
||||||
(cd ${CFG_SRC_DIR}src/mozjs/js/src && "${CFG_AUTOCONF213}") || exit $?
|
if [ $CFG_OSTYPE = "apple-darwin" ]
|
||||||
|
then
|
||||||
|
LIBTOOLIZE=glibtoolize
|
||||||
|
else
|
||||||
|
LIBTOOLIZE=libtoolize
|
||||||
|
fi
|
||||||
|
|
||||||
CFG_SUBMODULES="libwapcaplet rust-wapcaplet rust-harfbuzz rust-opengles skia rust-azure rust-cairo rust-stb-image rust-geom rust-glut rust-layers rust-http-client libparserutils libhubbub libcss rust-netsurfcss rust-css rust-hubbub sharegl rust-mozjs mozjs"
|
OSX_PKG_CONFIG_M4_MACROS="/usr/local/share/aclocal"
|
||||||
|
PIXMAN_ACLOCALCMD="aclocal -I${OSX_PKG_CONFIG_M4_MACROS} --install"
|
||||||
|
CAIRO_ACLOCALCMD="aclocal -I${OSX_PKG_CONFIG_M4_MACROS} -Ibuild --install"
|
||||||
|
AUTOCMD="${LIBTOOLIZE} && autoconf && autoheader && automake --add-missing --copy --no-force"
|
||||||
|
CAIRO_BOILERPLATE="touch boilerplate/Makefile.am.features && touch src/Makefile.am.features"
|
||||||
|
PIXMAN_AUTOCMD="${PIXMAN_ACLOCALCMD} && ${AUTOCMD}"
|
||||||
|
CAIRO_AUTOCMD="${CAIRO_BOILERPLATE} && ${CAIRO_ACLOCALCMD} && ${AUTOCMD}"
|
||||||
|
|
||||||
|
(cd ${CFG_SRC_DIR}src/mozjs/js/src && "${CFG_AUTOCONF213}") || exit $?
|
||||||
|
(cd ${CFG_SRC_DIR}src/pixman && eval ${PIXMAN_AUTOCMD}) || exit $?
|
||||||
|
(cd ${CFG_SRC_DIR}src/cairo && eval ${CAIRO_AUTOCMD}) || exit $?
|
||||||
|
|
||||||
|
CFG_SUBMODULES="libwapcaplet rust-wapcaplet rust-harfbuzz rust-opengles skia rust-azure rust-cairo rust-stb-image rust-geom rust-glut rust-layers rust-http-client libparserutils libhubbub libcss rust-netsurfcss rust-css rust-hubbub sharegl rust-mozjs mozjs pixman cairo"
|
||||||
|
|
||||||
if [ $CFG_OSTYPE = "apple-darwin" ]
|
if [ $CFG_OSTYPE = "apple-darwin" ]
|
||||||
then
|
then
|
||||||
|
@ -433,6 +450,15 @@ then
|
||||||
cd ${CFG_BUILD_DIR}
|
cd ${CFG_BUILD_DIR}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Cairo expects to use an installed pixman, but we want to override that
|
||||||
|
# behavior to use our version
|
||||||
|
export pixman_CFLAGS="-I${CFG_SRC_DIR}src/pixman/pixman -I${CFG_BUILD_DIR}src/pixman/pixman"
|
||||||
|
export pixman_LDFLAGS="-I${CFG_BUILD_DIR}src/pixman/pixman/.libs"
|
||||||
|
|
||||||
|
# PIC all the things
|
||||||
|
export CFLAGS="${CFLAGS} -fPIC"
|
||||||
|
export LDFLAGS="${CFLAGS} -fPIC"
|
||||||
|
|
||||||
for i in ${CFG_SUBMODULES}
|
for i in ${CFG_SUBMODULES}
|
||||||
do
|
do
|
||||||
if [ -d ${CFG_BUILD_DIR}src/${i} ]
|
if [ -d ${CFG_BUILD_DIR}src/${i} ]
|
||||||
|
@ -447,13 +473,26 @@ do
|
||||||
|
|
||||||
# needed because Azure's configure wants "--enable-cairo --enable-skia"
|
# needed because Azure's configure wants "--enable-cairo --enable-skia"
|
||||||
CONFIGURE_ARGS=""
|
CONFIGURE_ARGS=""
|
||||||
|
ENV_VARS=""
|
||||||
if [ $i = "rust-azure" ]; then
|
if [ $i = "rust-azure" ]; then
|
||||||
CONFIGURE_ARGS="--enable-cairo --enable-skia"
|
CONFIGURE_ARGS="--enable-cairo --enable-skia"
|
||||||
fi
|
fi
|
||||||
|
# libpng isn't available by default on OS X so don't make it required for cairo
|
||||||
|
# png is in turn required for the svg backend
|
||||||
|
if [ $i = "cairo" -a ${CFG_OSTYPE} == "apple-darwin" ]; then
|
||||||
|
CONFIGURE_ARGS="--enable-png=no --enable-svg=no --enable-ft=no --enable-xlib=no"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Tell pkg-config where pixman is
|
||||||
|
if [ $i = "cairo" ]; then
|
||||||
|
export PKG_CONFIG_PATH=../pixman
|
||||||
|
else
|
||||||
|
export PKG_CONFIG_PATH=
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f ${CONFIGURE_SCRIPT} ]
|
if [ -f ${CONFIGURE_SCRIPT} ]
|
||||||
then
|
then
|
||||||
sh ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
|
(sh ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}) || exit $?
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
26
mk/sub.mk
26
mk/sub.mk
|
@ -11,6 +11,20 @@ SLOW_BUILDS += \
|
||||||
mozjs \
|
mozjs \
|
||||||
sharegl \
|
sharegl \
|
||||||
skia \
|
skia \
|
||||||
|
pixman \
|
||||||
|
cairo \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
# Builds that do not require rustc
|
||||||
|
NATIVE_BUILDS += \
|
||||||
|
libcss \
|
||||||
|
libhubbub \
|
||||||
|
libparserutils \
|
||||||
|
libwapcaplet \
|
||||||
|
mozjs \
|
||||||
|
skia \
|
||||||
|
pixman \
|
||||||
|
cairo \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
# NOTE: the make magic can only compute transitive build dependencies,
|
# NOTE: the make magic can only compute transitive build dependencies,
|
||||||
|
@ -19,6 +33,10 @@ SLOW_BUILDS += \
|
||||||
|
|
||||||
# NB. This should not be a problem once a real package system exists.
|
# NB. This should not be a problem once a real package system exists.
|
||||||
|
|
||||||
|
DEPS_rust-cairo += \
|
||||||
|
cairo \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
DEPS_rust-azure += \
|
DEPS_rust-azure += \
|
||||||
rust-geom \
|
rust-geom \
|
||||||
rust-cairo \
|
rust-cairo \
|
||||||
|
@ -81,6 +99,14 @@ DEPS_libcss += \
|
||||||
libparserutils \
|
libparserutils \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
DONE_pixman = "$(B)src/pixman/pixman/.libs/libpixman-1.a"
|
||||||
|
|
||||||
|
DONE_cairo = "$(B)src/cairo/src/.libs/libcairo.a"
|
||||||
|
|
||||||
|
DEPS_cairo += \
|
||||||
|
pixman \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
# Platform-specific dependencies
|
# Platform-specific dependencies
|
||||||
ifeq ($(CFG_OSTYPE),apple-darwin)
|
ifeq ($(CFG_OSTYPE),apple-darwin)
|
||||||
DEPS_rust-azure += \
|
DEPS_rust-azure += \
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit f228769dfe5a8b5d73c49a41e95e31ed73a77fb3
|
Subproject commit 95b4bd335549b74c4d50f34ecb074122572291ea
|
|
@ -1 +1 @@
|
||||||
Subproject commit b2b53908ca67f7c74c067ec0d601776c180db09f
|
Subproject commit 535e779370b7d94cdd46403f1d883fbc1b04af05
|
|
@ -1 +1 @@
|
||||||
Subproject commit fda83465dfb30e4724eac1f560e0e4b2d82a6783
|
Subproject commit 05542dff66725cbf0620d7cbf26367a08e7dceaf
|
|
@ -1 +1 @@
|
||||||
Subproject commit c9f172bd01bdbc0efe117a8cd60bd088c49d63c3
|
Subproject commit ea2221e1ffcce397a0b742159a7f3def05ece039
|
Loading…
Add table
Add a link
Reference in a new issue