mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Add rust-geom and a bunch of compile fixes
This commit is contained in:
parent
13f82a23bf
commit
c170892d54
4 changed files with 23 additions and 3 deletions
18
Makefile.in
18
Makefile.in
|
@ -20,6 +20,7 @@ RUSTFLAGS += \
|
||||||
-L src/rust-sdl \
|
-L src/rust-sdl \
|
||||||
-L src/rust-cocoa \
|
-L src/rust-cocoa \
|
||||||
-L src/rust-stb-image \
|
-L src/rust-stb-image \
|
||||||
|
-L src/rust-geom \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
RUST_SRC=$(shell find $(VPATH)/src -type f -name '*.rs')
|
RUST_SRC=$(shell find $(VPATH)/src -type f -name '*.rs')
|
||||||
|
@ -47,6 +48,7 @@ SERVO_DEPS += \
|
||||||
src/rust-azure/libazure.dummy \
|
src/rust-azure/libazure.dummy \
|
||||||
src/rust-sdl/libsdl.dummy \
|
src/rust-sdl/libsdl.dummy \
|
||||||
src/rust-stb-image/libstb-image.dummy \
|
src/rust-stb-image/libstb-image.dummy \
|
||||||
|
src/rust-geom/libgeom.dummy \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
CHECK_DEPS += \
|
CHECK_DEPS += \
|
||||||
|
@ -55,6 +57,7 @@ CHECK_DEPS += \
|
||||||
check-rust-sdl \
|
check-rust-sdl \
|
||||||
check-rust-azure \
|
check-rust-azure \
|
||||||
check-rust-stb-image \
|
check-rust-stb-image \
|
||||||
|
check-rust-geom \
|
||||||
check-servo \
|
check-servo \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
@ -66,6 +69,7 @@ CLEAN_DEPS += \
|
||||||
clean-rust-sdl \
|
clean-rust-sdl \
|
||||||
clean-rust-azure \
|
clean-rust-azure \
|
||||||
clean-rust-stb-image \
|
clean-rust-stb-image \
|
||||||
|
clean-rust-geom \
|
||||||
clean-servo \
|
clean-servo \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
@ -91,7 +95,8 @@ src/rust-harfbuzz/libharfbuzz.dummy: src/harfbuzz/src/.libs/libharfbuzz.a
|
||||||
$(MAKE) -C src/rust-harfbuzz RUSTFLAGS="-L ../harfbuzz/src/.libs/"
|
$(MAKE) -C src/rust-harfbuzz RUSTFLAGS="-L ../harfbuzz/src/.libs/"
|
||||||
|
|
||||||
src/rust-mozjs/libmozjs.dummy: src/mozjs/libjs_static.a
|
src/rust-mozjs/libmozjs.dummy: src/mozjs/libjs_static.a
|
||||||
$(MAKE) -C src/rust-mozjs RUSTFLAGS="-L ../mozjs/"
|
$(MAKE) -C src/rust-mozjs \
|
||||||
|
RUSTFLAGS="-L ../mozjs/" CFLAGS="-I../mozjs/dist/include"
|
||||||
|
|
||||||
src/rust-azure/libazure.dummy: $(AZURE_DEPS)
|
src/rust-azure/libazure.dummy: $(AZURE_DEPS)
|
||||||
RUSTFLAGS="-L ../rust-cocoa" $(MAKE) -C src/rust-azure
|
RUSTFLAGS="-L ../rust-cocoa" $(MAKE) -C src/rust-azure
|
||||||
|
@ -105,6 +110,9 @@ src/rust-cocoa/libcocoa.dummy:
|
||||||
src/rust-stb-image/libstb-image.dummy:
|
src/rust-stb-image/libstb-image.dummy:
|
||||||
$(MAKE) -C src/rust-stb-image
|
$(MAKE) -C src/rust-stb-image
|
||||||
|
|
||||||
|
src/rust-geom/libgeom.dummy:
|
||||||
|
$(MAKE) -C src/rust-geom
|
||||||
|
|
||||||
check: $(CHECK_DEPS)
|
check: $(CHECK_DEPS)
|
||||||
|
|
||||||
check-servo: servo-test
|
check-servo: servo-test
|
||||||
|
@ -134,6 +142,10 @@ check-rust-cocoa:
|
||||||
check-rust-stb-image:
|
check-rust-stb-image:
|
||||||
$(MAKE) check -C src/rust-stb-image
|
$(MAKE) check -C src/rust-stb-image
|
||||||
|
|
||||||
|
.PHONY: check-geom
|
||||||
|
check-geom:
|
||||||
|
$(MAKE) check -C src/rust-geom
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean: $(CLEAN_DEPS)
|
clean: $(CLEAN_DEPS)
|
||||||
|
|
||||||
|
@ -169,6 +181,10 @@ clean-rust-cocoa:
|
||||||
clean-rust-stb-image:
|
clean-rust-stb-image:
|
||||||
$(MAKE) clean -C src/rust-stb-image
|
$(MAKE) clean -C src/rust-stb-image
|
||||||
|
|
||||||
|
.PHONY: clean-rust-geom
|
||||||
|
clean-rust-geom:
|
||||||
|
$(MAKE) clean -C src/rust-geom
|
||||||
|
|
||||||
.PHONY: clean-servo
|
.PHONY: clean-servo
|
||||||
clean-servo:
|
clean-servo:
|
||||||
rm -f servo servo-test
|
rm -f servo servo-test
|
||||||
|
|
|
@ -12,6 +12,7 @@ mkdir -p src/rust-sdl || exit $?
|
||||||
mkdir -p src/rust-azure || exit $?
|
mkdir -p src/rust-azure || exit $?
|
||||||
mkdir -p src/rust-cocoa || exit $?
|
mkdir -p src/rust-cocoa || exit $?
|
||||||
mkdir -p src/rust-stb-image || exit $?
|
mkdir -p src/rust-stb-image || exit $?
|
||||||
|
mkdir -p src/rust-geom || exit $?
|
||||||
|
|
||||||
(cd src/ragel && sh ${SRCDIR}/src/ragel/configure) || exit $?
|
(cd src/ragel && sh ${SRCDIR}/src/ragel/configure) || exit $?
|
||||||
(cd src/harfbuzz && sh ${SRCDIR}/src/harfbuzz/configure --enable-static) || exit $?
|
(cd src/harfbuzz && sh ${SRCDIR}/src/harfbuzz/configure --enable-static) || exit $?
|
||||||
|
@ -22,3 +23,4 @@ mkdir -p src/rust-stb-image || exit $?
|
||||||
(cd src/rust-azure && sh ${SRCDIR}/src/rust-azure/configure) || exit $?
|
(cd src/rust-azure && sh ${SRCDIR}/src/rust-azure/configure) || exit $?
|
||||||
(cd src/rust-cocoa && sh ${SRCDIR}/src/rust-cocoa/configure) || exit $?
|
(cd src/rust-cocoa && sh ${SRCDIR}/src/rust-cocoa/configure) || exit $?
|
||||||
(cd src/rust-stb-image && sh ${SRCDIR}/src/rust-stb-image/configure) || exit $?
|
(cd src/rust-stb-image && sh ${SRCDIR}/src/rust-stb-image/configure) || exit $?
|
||||||
|
(cd src/rust-geom && sh ${SRCDIR}/src/rust-geom/configure) || exit $?
|
||||||
|
|
1
src/rust-geom
Submodule
1
src/rust-geom
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 5141a7ff6c225f8265eecff496988efcbe41004b
|
|
@ -13,7 +13,8 @@ import unsafe::reinterpret_cast;
|
||||||
import harfbuzz::{HB_MEMORY_MODE_READONLY,
|
import harfbuzz::{HB_MEMORY_MODE_READONLY,
|
||||||
HB_DIRECTION_LTR};
|
HB_DIRECTION_LTR};
|
||||||
import harfbuzz::{hb_blob_t, hb_face_t, hb_font_t, hb_buffer_t,
|
import harfbuzz::{hb_blob_t, hb_face_t, hb_font_t, hb_buffer_t,
|
||||||
hb_codepoint_t, hb_bool_t, hb_glyph_position_t};
|
hb_codepoint_t, hb_bool_t, hb_glyph_position_t,
|
||||||
|
hb_var_int_t};
|
||||||
import harfbuzz::bindgen::{hb_blob_create, hb_blob_destroy,
|
import harfbuzz::bindgen::{hb_blob_create, hb_blob_destroy,
|
||||||
hb_face_create, hb_face_destroy,
|
hb_face_create, hb_face_destroy,
|
||||||
hb_font_create, hb_font_destroy,
|
hb_font_create, hb_font_destroy,
|
||||||
|
@ -44,7 +45,7 @@ fn shape_text(_font: &font, text: str) -> [glyph] {
|
||||||
y_advance: 0 as int32_t,
|
y_advance: 0 as int32_t,
|
||||||
x_offset: cur_x as int32_t,
|
x_offset: cur_x as int32_t,
|
||||||
y_offset: 0 as int32_t,
|
y_offset: 0 as int32_t,
|
||||||
var: 0i32
|
var: 0 as hb_var_int_t
|
||||||
};
|
};
|
||||||
|
|
||||||
let pos = hb_glyph_pos_to_servo_glyph_pos(hb_pos);
|
let pos = hb_glyph_pos_to_servo_glyph_pos(hb_pos);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue