servo-fontconfig-sys-5.1.0/.cargo_vcs_info.json0000644000000001121370137226100152350ustar00{ "git": { "sha1": "b65a31704b1bedc9670a4b5ce6d9d16d6a4d491e" } } servo-fontconfig-sys-5.1.0/.gitignore010064400007650000024000000003011317112426500160240ustar0000000000000000Makefile config.h config.log config.status autom4te.cache config.h.in~ .deps doc/version.sgml *.bz2 *.gz fontconfig-zip fontconfig.pc libtool stamp-h1 src/fcstdint.h /Cargo.lock /target *~ #*# servo-fontconfig-sys-5.1.0/.travis.yml010064400007650000024000000000741357231402000161470ustar0000000000000000language: rust sudo: false branches: except: - master servo-fontconfig-sys-5.1.0/Cargo.toml0000644000000021151370137226100132400ustar00# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies # # If you believe there's an error in this file please file an # issue against the rust-lang/cargo repository. If you're # editing this file be aware that the upstream Cargo.toml # will likely look very different (and much more reasonable) [package] name = "servo-fontconfig-sys" version = "5.1.0" authors = ["Keith Packard ", "Patrick Lam "] build = "build.rs" links = "fontconfig" description = "Font configuration and customization library" homepage = "http://fontconfig.org" license = "MIT" repository = "https://github.com/servo/libfontconfig/" [lib] name = "fontconfig_sys" path = "lib.rs" [dependencies.expat-sys] version = "2.1.0" [dependencies.freetype-sys] version = "0.13.0" [build-dependencies.pkg-config] version = "0.3" [features] default = [] force_system_lib = [] servo-fontconfig-sys-5.1.0/Cargo.toml.orig0000644000000010321370137226100141740ustar00[package] name = "servo-fontconfig-sys" version = "5.1.0" authors = ["Keith Packard ", "Patrick Lam "] license = "MIT" description = "Font configuration and customization library" homepage = "http://fontconfig.org" repository = "https://github.com/servo/libfontconfig/" links = "fontconfig" build = "build.rs" [lib] name = "fontconfig_sys" path = "lib.rs" [dependencies] expat-sys = "2.1.0" freetype-sys = "0.13.0" [build-dependencies] pkg-config = "0.3" [features] default = [] force_system_lib = [] servo-fontconfig-sys-5.1.0/Cargo.toml.orig010064400007650000024000000010321370137225500167300ustar0000000000000000[package] name = "servo-fontconfig-sys" version = "5.1.0" authors = ["Keith Packard ", "Patrick Lam "] license = "MIT" description = "Font configuration and customization library" homepage = "http://fontconfig.org" repository = "https://github.com/servo/libfontconfig/" links = "fontconfig" build = "build.rs" [lib] name = "fontconfig_sys" path = "lib.rs" [dependencies] expat-sys = "2.1.0" freetype-sys = "0.13.0" [build-dependencies] pkg-config = "0.3" [features] default = [] force_system_lib = [] servo-fontconfig-sys-5.1.0/build.rs010064400007650000024000000032601370137225500155130ustar0000000000000000/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ extern crate pkg_config; use std::env; use std::process::Command; fn main() { let target = env::var("TARGET").unwrap(); if !target.contains("android") { // If the system version of fontconfig is at least 2.11.1, use it. #[allow(clippy::single_match)] match pkg_config::Config::new() .atleast_version("2.11.1") .find("fontconfig") { Ok(lib) => { println!( "cargo:incdir={}", lib.include_paths[0] .clone() .into_os_string() .into_string() .unwrap() ); return; } #[cfg(feature = "force_system_lib")] Err(error) => { panic!("{}", error); } #[cfg(not(feature = "force_system_lib"))] _ => (), } } assert!(Command::new("make") .env("MAKEFLAGS", env::var("CARGO_MAKEFLAGS").unwrap_or_default()) .args(&["-R", "-f", "makefile.cargo"]) .status() .unwrap() .success()); println!( "cargo:rustc-link-search=native={}", env::var("OUT_DIR").unwrap() ); println!("cargo:rustc-link-lib=static=fontconfig"); println!( "cargo:incdir={}", env::current_dir() .unwrap() .into_os_string() .into_string() .unwrap() ); } servo-fontconfig-sys-5.1.0/lib.rs010064400007650000024000000000631317112426600151560ustar0000000000000000extern crate expat_sys; extern crate freetype_sys; servo-fontconfig-sys-5.1.0/makefile.cargo010064400007650000024000000040071357307402700166430ustar0000000000000000FLAGS := "" # On MSVC, no -FPIC ifeq (,$(findstring windows-msvc,$(TARGET))) FLAGS += -fPIC endif ifeq (armv7-linux-androideabi,$(TARGET)) # Reset TARGET variable because armv7 target name used by Rust is not # the same as the target name needed for the CXX toolchain. TARGET = arm-linux-androideabi FLAGS += -march=armv7-a -mfpu=neon --target=$(TARGET) endif ifneq ($(HOST),$(TARGET)) CXX ?= $(TARGET)-g++ CC ?= $(TARGET)-gcc AR ?= $(TARGET)-ar else CXX ?= g++ CC ?= gcc AR ?= ar endif CONFIGURE_FLAGS := \ --host=$(TARGET) ifeq (android,$(findstring android,$(TARGET))) CONFIGURE_FLAGS += \ --with-default-fonts=/system/fonts \ --with-cache-dir=/sdcard/servo/.fccache \ $(NULL) endif # Fix up OUT_DIR paths on Windows ifeq (windows,$(findstring windows,$(TARGET))) OUT_DIR := $(shell cygpath "$(OUT_DIR)") endif CFLAGS += $(FLAGS) CXXFLAGS += $(FLAGS) ifneq (android,$(findstring android,$(TARGET))) CONFIGURE_FLAGS += \ --sysconfdir=/etc \ --localstatedir=/var \ $(NULL) endif ifneq (darwin,$(findstring darwin,$(TARGET))) SRC_DIR = $(shell pwd) all: $(OUT_DIR)/libfontconfig.a $(OUT_DIR)/libfontconfig.a: $(OUT_DIR)/Makefile cd $(OUT_DIR) && make -j$(NUM_JOBS) cp $(OUT_DIR)/src/.libs/libfontconfig.a $(OUT_DIR) EXPAT_INCLUDE_DIR ?= $(DEP_EXPAT_OUTDIR)/include EXPAT_LIB_DIR ?= $(DEP_EXPAT_OUTDIR)/lib ifneq ($(HOST),$(TARGET)) EXPAT_FLAGS = --with-expat-includes="$(EXPAT_INCLUDE_DIR)" \ --with-expat-lib="$(EXPAT_LIB_DIR)" FREETYPE_CFLAGS ?= -I$(DEP_FREETYPE_OUTDIR)/include/freetype2 FREETYPE_LIBS ?= -L$(DEP_FREETYPE_OUTDIR)/lib -lfreetype else EXPAT_FLAGS = FREETYPE_CFLAGS = FREETYPE_LIBS = endif $(OUT_DIR)/Makefile: cd $(OUT_DIR) && \ CC="$(CC)" \ AR="$(AR)" \ FREETYPE_CFLAGS="$(FREETYPE_CFLAGS)" \ FREETYPE_LIBS="$(FREETYPE_LIBS)" \ CFLAGS="$(CFLAGS)" \ $(SRC_DIR)/configure \ --disable-docs \ --disable-shared \ $(EXPAT_FLAGS) \ $(strip $(CONFIGURE_FLAGS)) && \ touch $(SRC_DIR)/src/fcobjshash.h else all: endif