diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 209399d3cf0062669a4ba7b179426ba759e6f7b1..9bdad56f1f35b4bb1ef478844d1ff9b5a963d8a3 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "00390aeeedf892461667b33a9bd3575653a07c95" + "sha1": "71c39f594ae05dd1d99656fcf3ac480f87b6be38" }, "path_in_vcs": "fontconfig-sys" } \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 29091742e4a52b02068e4141909a0ec3ad444e4b..1eb687ddcebf8fc3f6acb53889b3165f9f713365 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,29 +11,41 @@ [package] edition = "2018" -rust-version = "1.46" +rust-version = "1.64" name = "yeslogic-fontconfig-sys" -version = "3.0.1" -authors = ["Austin Bonander <austin.bonander@gmail.com>", "The Servo Project Developers", "YesLogic Pty. Ltd. <info@yeslogic.com>"] +version = "5.0.0" +authors = [ + "Austin Bonander <austin.bonander@gmail.com>", + "The Servo Project Developers", + "YesLogic Pty. Ltd. <info@yeslogic.com>", +] links = "fontconfig" description = "Raw bindings to Fontconfig without a vendored C library" homepage = "https://github.com/yeslogic/fontconfig-rs" documentation = "https://docs.rs/crate/yeslogic-fontconfig-sys" -keywords = ["font", "bindings", "fontconfig", "sys"] +readme = "README.md" +keywords = [ + "font", + "bindings", + "fontconfig", + "sys", +] categories = ["text-processing"] license = "MIT" repository = "https://github.com/yeslogic/fontconfig-rs" [lib] name = "fontconfig_sys" -[dependencies.const-cstr] -version = "0.3" + +[dependencies.cstr] +version = "0.2.11" [dependencies.dlib] version = "0.5.0" [dependencies.once_cell] version = "1.9.0" + [build-dependencies.pkg-config] version = "0.3" diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 92ee7ce20ed9e8c94de712a485b7e01c9eb570bf..9af3cac62f474cb61d07740fff4f2d2dc4437402 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,8 +1,8 @@ [package] name = "yeslogic-fontconfig-sys" -version = "3.0.1" +version = "5.0.0" edition = "2018" -rust-version = "1.46" +rust-version = "1.64" authors = [ "Austin Bonander <austin.bonander@gmail.com>", "The Servo Project Developers", @@ -24,7 +24,7 @@ links = "fontconfig" name = "fontconfig_sys" [dependencies] -const-cstr = "0.3" +cstr = "0.2.11" dlib = "0.5.0" # This can't be optional because build.rs can't conditionally enable an # optional dependency: diff --git a/debian/cargo-checksum.json b/debian/cargo-checksum.json index 6c0d713a5ef28b12b9493710542dec99b5f1834b..373a429f9abf7625aea8ca5996e283c0c599b92e 100644 --- a/debian/cargo-checksum.json +++ b/debian/cargo-checksum.json @@ -1 +1 @@ -{"package":"cb3f5a91c31bef6650d3a1b69192b4217fd88e4cfedc8101813e4dc3394ecbb8","files":{}} +{"package":"ffb6b23999a8b1a997bf47c7bb4d19ad4029c3327bb3386ebe0a5ff584b33c7a","files":{}} diff --git a/debian/changelog b/debian/changelog index fb7c205d2050382879c1332f455633251cd8c1a1..327a49e0b35014ca2e05fa52c29c52506dee6615 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +rust-yeslogic-fontconfig-sys (5.0.0-1) unstable; urgency=medium + + * Team upload. + * Package yeslogic-fontconfig-sys 5.0.0 from crates.io using debcargo 2.6.1 + + -- Matthias Geiger <werdahias@riseup.net> Wed, 01 Jan 2025 11:08:54 -0500 + rust-yeslogic-fontconfig-sys (3.0.1-1+apertis1) apertis; urgency=medium * Switch component from development to target to comply with Apertis diff --git a/debian/compat b/debian/compat deleted file mode 100644 index 48082f72f087ce7e6fa75b9c41d7387daecd447b..0000000000000000000000000000000000000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -12 diff --git a/debian/control b/debian/control index 4899bd62b241d61a00c5932a7fd307aa5c6e5672..3a53e23b6261398f05b1c2498cd353ef6cc8ac06 100644 --- a/debian/control +++ b/debian/control @@ -1,12 +1,12 @@ Source: rust-yeslogic-fontconfig-sys Section: rust Priority: optional -Build-Depends: debhelper (>= 12), - dh-cargo (>= 25), +Build-Depends: debhelper-compat (= 13), + dh-sequence-cargo, cargo:native <!nocheck>, - rustc:native <!nocheck>, + rustc:native (>= 1.64) <!nocheck>, libstd-rust-dev <!nocheck>, - librust-const-cstr-0.3+default-dev <!nocheck>, + librust-cstr-0.2+default-dev (>= 0.2.11-~~) <!nocheck>, librust-dlib-0.5+default-dev <!nocheck>, librust-once-cell-1+default-dev (>= 1.9.0-~~) <!nocheck>, librust-pkg-config-0.3+default-dev <!nocheck>, @@ -15,10 +15,11 @@ Build-Depends: debhelper (>= 12), Maintainer: Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> Uploaders: Alexander Kjäll <alexander.kjall@gmail.com> -Standards-Version: 4.5.1 +Standards-Version: 4.7.0 Vcs-Git: https://salsa.debian.org/rust-team/debcargo-conf.git [src/yeslogic-fontconfig-sys] Vcs-Browser: https://salsa.debian.org/rust-team/debcargo-conf/tree/master/src/yeslogic-fontconfig-sys Homepage: https://github.com/yeslogic/fontconfig-rs +X-Cargo-Crate: yeslogic-fontconfig-sys Rules-Requires-Root: no Package: librust-yeslogic-fontconfig-sys-dev @@ -26,7 +27,7 @@ Architecture: any Multi-Arch: same Depends: ${misc:Depends}, - librust-const-cstr-0.3+default-dev, + librust-cstr-0.2+default-dev (>= 0.2.11-~~), librust-dlib-0.5+default-dev, librust-once-cell-1+default-dev (>= 1.9.0-~~), librust-pkg-config-0.3+default-dev, @@ -34,15 +35,14 @@ Depends: Provides: librust-yeslogic-fontconfig-sys+default-dev (= ${binary:Version}), librust-yeslogic-fontconfig-sys+dlopen-dev (= ${binary:Version}), - librust-yeslogic-fontconfig-sys-3-dev (= ${binary:Version}), - librust-yeslogic-fontconfig-sys-3+default-dev (= ${binary:Version}), - librust-yeslogic-fontconfig-sys-3+dlopen-dev (= ${binary:Version}), - librust-yeslogic-fontconfig-sys-3.0-dev (= ${binary:Version}), - librust-yeslogic-fontconfig-sys-3.0+default-dev (= ${binary:Version}), - librust-yeslogic-fontconfig-sys-3.0+dlopen-dev (= ${binary:Version}), - librust-yeslogic-fontconfig-sys-3.0.1-dev (= ${binary:Version}), - librust-yeslogic-fontconfig-sys-3.0.1+default-dev (= ${binary:Version}), - librust-yeslogic-fontconfig-sys-3.0.1+dlopen-dev (= ${binary:Version}) + librust-yeslogic-fontconfig-sys-5-dev (= ${binary:Version}), + librust-yeslogic-fontconfig-sys-5+default-dev (= ${binary:Version}), + librust-yeslogic-fontconfig-sys-5+dlopen-dev (= ${binary:Version}), + librust-yeslogic-fontconfig-sys-5.0-dev (= ${binary:Version}), + librust-yeslogic-fontconfig-sys-5.0+default-dev (= ${binary:Version}), + librust-yeslogic-fontconfig-sys-5.0+dlopen-dev (= ${binary:Version}), + librust-yeslogic-fontconfig-sys-5.0.0-dev (= ${binary:Version}), + librust-yeslogic-fontconfig-sys-5.0.0+default-dev (= ${binary:Version}), + librust-yeslogic-fontconfig-sys-5.0.0+dlopen-dev (= ${binary:Version}) Description: Raw bindings to Fontconfig without a vendored C library - Rust source code - This package contains the source for the Rust yeslogic-fontconfig-sys crate, - packaged by debcargo for use with cargo and dh-cargo. + Source code for Debianized Rust crate "yeslogic-fontconfig-sys" diff --git a/debian/copyright b/debian/copyright index cb858e52fc2c62c4e61b64930b2cafae0a5c1482..311674d83664dbd94147b0be28d2d83ef3bfabc0 100644 --- a/debian/copyright +++ b/debian/copyright @@ -16,7 +16,7 @@ License: MIT Files: debian/* Copyright: - 2022 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> + 2022-2025 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> 2022 Alexander Kjäll <alexander.kjall@gmail.com> License: MIT diff --git a/debian/copyright.debcargo.hint b/debian/copyright.debcargo.hint index dec78a88412c87e79a0f172b85f5fbaa347c1a6f..e2bdde5ca8a951d36145418ca9726fe9269b8b5b 100644 --- a/debian/copyright.debcargo.hint +++ b/debian/copyright.debcargo.hint @@ -18,7 +18,7 @@ Comment: be correct information so you should review and fix this before uploading to the archive. -Files: ./LICENSE +Files: LICENSE Copyright: 2019 YesLogic Pty. Ltd. 2016 Manuel Reinhardt @@ -29,7 +29,7 @@ Comment: FIXME (overlay): These notices are extracted from files. Please review them before uploading to the archive. -Files: ./src/lib.rs +Files: src/lib.rs Copyright: 2013 The Servo Project Developers. See the LICENSE License: UNKNOWN-LICENSE; FIXME (overlay) Comment: @@ -38,8 +38,8 @@ Comment: Files: debian/* Copyright: - 2022 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> - 2022 Alexander Kjäll <alexander.kjall@gmail.com> + 2022-2025 Debian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net> + 2022-2025 Alexander Kjäll <alexander.kjall@gmail.com> License: MIT License: MIT diff --git a/debian/tests/control b/debian/tests/control index 53f464dd59abab5e1208c57a9c63d1924b5a359c..7653396594764dfa650162aac97f6fe33d09ae57 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,19 +1,19 @@ -Test-Command: /usr/share/cargo/bin/cargo-auto-test yeslogic-fontconfig-sys 3.0.1 --all-targets --all-features +Test-Command: /usr/share/cargo/bin/cargo-auto-test yeslogic-fontconfig-sys 5.0.0 --all-targets --all-features Features: test-name=rust-yeslogic-fontconfig-sys:@ -Depends: dh-cargo (>= 18), @ +Depends: dh-cargo (>= 31), rustc (>= 1.64), @ Restrictions: allow-stderr, skip-not-installable -Test-Command: /usr/share/cargo/bin/cargo-auto-test yeslogic-fontconfig-sys 3.0.1 --all-targets +Test-Command: /usr/share/cargo/bin/cargo-auto-test yeslogic-fontconfig-sys 5.0.0 --all-targets Features: test-name=librust-yeslogic-fontconfig-sys-dev:default -Depends: dh-cargo (>= 18), @ +Depends: dh-cargo (>= 31), rustc (>= 1.64), @ Restrictions: allow-stderr, skip-not-installable -Test-Command: /usr/share/cargo/bin/cargo-auto-test yeslogic-fontconfig-sys 3.0.1 --all-targets --no-default-features --features dlopen +Test-Command: /usr/share/cargo/bin/cargo-auto-test yeslogic-fontconfig-sys 5.0.0 --all-targets --no-default-features --features dlopen Features: test-name=librust-yeslogic-fontconfig-sys-dev:dlopen -Depends: dh-cargo (>= 18), @ +Depends: dh-cargo (>= 31), rustc (>= 1.64), @ Restrictions: allow-stderr, skip-not-installable -Test-Command: /usr/share/cargo/bin/cargo-auto-test yeslogic-fontconfig-sys 3.0.1 --all-targets --no-default-features +Test-Command: /usr/share/cargo/bin/cargo-auto-test yeslogic-fontconfig-sys 5.0.0 --all-targets --no-default-features Features: test-name=librust-yeslogic-fontconfig-sys-dev: -Depends: dh-cargo (>= 18), @ +Depends: dh-cargo (>= 31), rustc (>= 1.64), @ Restrictions: allow-stderr, skip-not-installable diff --git a/debian/watch b/debian/watch index 676df741e0e9ddf92076fbfb54cbbc7151cba366..8d57a49c55ab62e0169ed44a804347e8f88f50ef 100644 --- a/debian/watch +++ b/debian/watch @@ -1,4 +1,4 @@ version=4 opts=filenamemangle=s/.*\/(.*)\/download/yeslogic-fontconfig-sys-$1\.tar\.gz/g,\ -uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\d*)$/$1~$2/ \ +uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha)\.?\d*)$/$1~$2/ \ https://qa.debian.org/cgi-bin/fakeupstream.cgi?upstream=crates.io/yeslogic-fontconfig-sys .*/crates/yeslogic-fontconfig-sys/@ANY_VERSION@/download diff --git a/src/lib.rs b/src/lib.rs index 555f5eceaa951866b4dcf75ed5d85970e03984e4..07408257bdca319702c7f1024f0cd17492edc990 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,19 +1,13 @@ // Copyright 2013 The Servo Project Developers. See the LICENSE // file at the top-level directory of this distribution. // -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. +// Licensed under the the MIT license. This file may not be +// copied, modified, or distributed except according to those terms. #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] -#[macro_use] -extern crate const_cstr; - use std::os::raw::{c_char, c_double, c_int, c_uchar, c_uint, c_ushort, c_void}; pub use dlib::ffi_dispatch; @@ -56,6 +50,10 @@ pub const FcTypeLangSet: u32 = 8_u32; pub type FcType = enum__FcType; pub mod constants { + use std::ffi::CStr; + + use cstr::cstr; + use super::c_int; pub const FC_WEIGHT_THIN: c_int = 0; @@ -113,67 +111,67 @@ pub mod constants { pub const FC_LCD_LEGACY: c_int = 3; pub const FC_CHARSET_MAP_SIZE: c_int = 8; + pub const FC_CHARSET_DONE: u32 = u32::MAX; pub const FC_UTF8_MAX_LEN: c_int = 6; - const_cstr! { - pub FC_FAMILY = "family"; - pub FC_STYLE = "style"; - pub FC_SLANT = "slant"; - pub FC_WEIGHT = "weight"; - pub FC_SIZE = "size"; - pub FC_ASPECT = "aspect"; - pub FC_PIXEL_SIZE = "pixelsize"; - pub FC_SPACING = "spacing"; - pub FC_FOUNDRY = "foundry"; - pub FC_ANTIALIAS = "antialias"; - pub FC_HINTING = "hinting"; - pub FC_HINT_STYLE = "hintstyle"; - pub FC_VERTICAL_LAYOUT = "verticallayout"; - pub FC_AUTOHINT = "autohint"; - pub FC_GLOBAL_ADVANCE = "globaladvance"; - pub FC_WIDTH = "width"; - pub FC_FILE = "file"; - pub FC_INDEX = "index"; - pub FC_FT_FACE = "ftface"; - pub FC_RASTERIZER = "rasterizer"; - pub FC_OUTLINE = "outline"; - pub FC_SCALABLE = "scalable"; - pub FC_COLOR = "color"; - pub FC_VARIABLE = "variable"; - pub FC_SCALE = "scale"; - pub FC_SYMBOL = "symbol"; - pub FC_DPI = "dpi"; - pub FC_RGBA = "rgba"; - pub FC_MINSPACE = "minspace"; - pub FC_SOURCE = "source"; - pub FC_CHARSET = "charset"; - pub FC_LANG = "lang"; - pub FC_FONTVERSION = "fontversion"; - pub FC_FULLNAME = "fullname"; - pub FC_FAMILYLANG = "familylang"; - pub FC_STYLELANG = "stylelang"; - pub FC_FULLNAMELANG = "fullnamelang"; - pub FC_CAPABILITY = "capability"; - pub FC_FONTFORMAT = "fontformat"; - pub FC_EMBOLDEN = "embolden"; - pub FC_EMBEDDED_BITMAP = "embeddedbitmap"; - pub FC_DECORATIVE = "decorative"; - pub FC_LCD_FILTER = "lcdfilter"; - pub FC_FONT_FEATURES = "fontfeatures"; - pub FC_FONT_VARIATIONS = "fontvariations"; - pub FC_NAMELANG = "namelang"; - pub FC_PRGNAME = "prgname"; - pub FC_HASH = "hash"; - pub FC_POSTSCRIPT_NAME = "postscriptname"; - pub FC_FONT_HAS_HINT = "fonthashint"; - pub FC_CACHE_SUFFIX = ".cache-"; - pub FC_DIR_CACHE_FILE = "fonts.cache-"; - pub FC_USER_CACHE_FILE = ".fonts.cache-"; - pub FC_CHARWIDTH = "charwidth"; - pub FC_CHAR_WIDTH = "charwidth"; - pub FC_CHAR_HEIGHT = "charheight"; - pub FC_MATRIX = "matrix"; - } + pub const FC_FAMILY: &CStr = cstr!("family"); + pub const FC_STYLE: &CStr = cstr!("style"); + pub const FC_SLANT: &CStr = cstr!("slant"); + pub const FC_WEIGHT: &CStr = cstr!("weight"); + pub const FC_SIZE: &CStr = cstr!("size"); + pub const FC_ASPECT: &CStr = cstr!("aspect"); + pub const FC_PIXEL_SIZE: &CStr = cstr!("pixelsize"); + pub const FC_SPACING: &CStr = cstr!("spacing"); + pub const FC_FOUNDRY: &CStr = cstr!("foundry"); + pub const FC_ANTIALIAS: &CStr = cstr!("antialias"); + pub const FC_HINTING: &CStr = cstr!("hinting"); + pub const FC_HINT_STYLE: &CStr = cstr!("hintstyle"); + pub const FC_VERTICAL_LAYOUT: &CStr = cstr!("verticallayout"); + pub const FC_AUTOHINT: &CStr = cstr!("autohint"); + pub const FC_GLOBAL_ADVANCE: &CStr = cstr!("globaladvance"); + pub const FC_WIDTH: &CStr = cstr!("width"); + pub const FC_FILE: &CStr = cstr!("file"); + pub const FC_INDEX: &CStr = cstr!("index"); + pub const FC_FT_FACE: &CStr = cstr!("ftface"); + pub const FC_RASTERIZER: &CStr = cstr!("rasterizer"); + pub const FC_OUTLINE: &CStr = cstr!("outline"); + pub const FC_SCALABLE: &CStr = cstr!("scalable"); + pub const FC_COLOR: &CStr = cstr!("color"); + pub const FC_VARIABLE: &CStr = cstr!("variable"); + pub const FC_SCALE: &CStr = cstr!("scale"); + pub const FC_SYMBOL: &CStr = cstr!("symbol"); + pub const FC_DPI: &CStr = cstr!("dpi"); + pub const FC_RGBA: &CStr = cstr!("rgba"); + pub const FC_MINSPACE: &CStr = cstr!("minspace"); + pub const FC_SOURCE: &CStr = cstr!("source"); + pub const FC_CHARSET: &CStr = cstr!("charset"); + pub const FC_LANG: &CStr = cstr!("lang"); + pub const FC_FONTVERSION: &CStr = cstr!("fontversion"); + pub const FC_FULLNAME: &CStr = cstr!("fullname"); + pub const FC_FAMILYLANG: &CStr = cstr!("familylang"); + pub const FC_STYLELANG: &CStr = cstr!("stylelang"); + pub const FC_FULLNAMELANG: &CStr = cstr!("fullnamelang"); + pub const FC_CAPABILITY: &CStr = cstr!("capability"); + pub const FC_FONTFORMAT: &CStr = cstr!("fontformat"); + pub const FC_EMBOLDEN: &CStr = cstr!("embolden"); + pub const FC_EMBEDDED_BITMAP: &CStr = cstr!("embeddedbitmap"); + pub const FC_DECORATIVE: &CStr = cstr!("decorative"); + pub const FC_LCD_FILTER: &CStr = cstr!("lcdfilter"); + pub const FC_FONT_FEATURES: &CStr = cstr!("fontfeatures"); + pub const FC_FONT_VARIATIONS: &CStr = cstr!("fontvariations"); + pub const FC_NAMELANG: &CStr = cstr!("namelang"); + pub const FC_PRGNAME: &CStr = cstr!("prgname"); + pub const FC_HASH: &CStr = cstr!("hash"); + pub const FC_POSTSCRIPT_NAME: &CStr = cstr!("postscriptname"); + pub const FC_FONT_HAS_HINT: &CStr = cstr!("fonthashint"); + pub const FC_CACHE_SUFFIX: &CStr = cstr!(".cache-"); + pub const FC_DIR_CACHE_FILE: &CStr = cstr!("fonts.cache-"); + pub const FC_USER_CACHE_FILE: &CStr = cstr!(".fonts.cache-"); + pub const FC_CHARWIDTH: &CStr = cstr!("charwidth"); + pub const FC_CHAR_WIDTH: &CStr = cstr!("charwidth"); + pub const FC_CHAR_HEIGHT: &CStr = cstr!("charheight"); + pub const FC_MATRIX: &CStr = cstr!("matrix"); + pub const FC_ORDER: &CStr = cstr!("order"); } #[repr(C)] @@ -400,6 +398,8 @@ dlib::external_library!(Fc, "fontconfig", fn FcCharSetAddChar(*mut FcCharSet, FcChar32) -> FcBool, + fn FcCharSetDelChar(*mut FcCharSet, FcChar32) -> FcBool, + fn FcCharSetCopy(*mut FcCharSet) -> *mut FcCharSet, fn FcCharSetEqual(*const FcCharSet, *const FcCharSet) -> FcBool, @@ -775,6 +775,11 @@ dlib::external_library!(Fc, "fontconfig", *mut *mut FcLangSet ) -> FcResult, + // The last argument is a pointer to a FreeType Face object (`FT_Face *`) + // + // <https://freetype.org/freetype2/docs/reference/ft2-base_interface.html#ft_face> + fn FcPatternGetFTFace(*mut FcPattern, *const c_char, c_int, *mut *mut c_void) -> FcResult, + // fn FcPatternVaBuild(*mut FcPattern, *mut __va_list_tag) -> *mut FcPattern, fn FcPatternFormat(*mut FcPattern, *const FcChar8) -> *mut FcChar8,