Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request #168 from EPashkin/split_build_rs
Browse files Browse the repository at this point in the history
Use options.split_build_rs
  • Loading branch information
GuillaumeGomez committed May 5, 2020
2 parents 7e9df7b + be34517 commit b92940c
Show file tree
Hide file tree
Showing 20 changed files with 44 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
@@ -1,10 +1,10 @@
dist: xenial
language: rust
rust:
- stable
- nightly
- beta
- 1.40.0
- stable
env:
- GTK=3.14
- GTK=3.24
Expand Down
2 changes: 1 addition & 1 deletion atk-sys/versions.txt
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 494f124)
Generated by gir (https://github.com/gtk-rs/gir @ 8ee816a)
from gir-files (https://github.com/gtk-rs/gir-files @ c31e734)
1 change: 1 addition & 0 deletions conf/gir-gdk.toml
Expand Up @@ -4,6 +4,7 @@ library = "Gdk"
version = "3.0"
min_cfg_version = "3.14"
single_version_file = "."
split_build_rs = true

external_libraries = [
"GLib",
Expand Down
2 changes: 1 addition & 1 deletion gdk-pixbuf-sys/versions.txt
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 494f124)
Generated by gir (https://github.com/gtk-rs/gir @ 8ee816a)
from gir-files (https://github.com/gtk-rs/gir-files @ c31e734)
20 changes: 3 additions & 17 deletions gdk-sys/build.rs
@@ -1,7 +1,3 @@
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

#[cfg(not(feature = "dox"))]
extern crate pkg_config;

Expand All @@ -16,6 +12,8 @@ use std::io::prelude::*;
#[cfg(not(feature = "dox"))]
use std::process;

mod build_version;

#[cfg(feature = "dox")]
fn main() {} // prevent linking libraries to avoid documentation failure

Expand All @@ -31,19 +29,7 @@ fn main() {
fn find() -> Result<(), Error> {
let package_name = "gdk-3.0";
let shared_libs = ["gdk-3"];
let version = if cfg!(feature = "v3_24") {
"3.24"
} else if cfg!(feature = "v3_22") {
"3.22"
} else if cfg!(feature = "v3_20") {
"3.20"
} else if cfg!(feature = "v3_18") {
"3.18"
} else if cfg!(feature = "v3_16") {
"3.16"
} else {
"3.14"
};
let version = build_version::version();

if let Ok(inc_dir) = env::var("GTK_INCLUDE_DIR") {
println!("cargo:include={}", inc_dir);
Expand Down
19 changes: 19 additions & 0 deletions gdk-sys/build_version.rs
@@ -0,0 +1,19 @@
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

pub fn version() -> &str {
if cfg!(feature = "v3_24") {
"3.24"
} else if cfg!(feature = "v3_22") {
"3.22"
} else if cfg!(feature = "v3_20") {
"3.20"
} else if cfg!(feature = "v3_18") {
"3.18"
} else if cfg!(feature = "v3_16") {
"3.16"
} else {
"3.14"
};
}
2 changes: 1 addition & 1 deletion gdk-sys/versions.txt
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 494f124)
Generated by gir (https://github.com/gtk-rs/gir @ 8ee816a)
from gir-files (https://github.com/gtk-rs/gir-files @ c31e734)
2 changes: 1 addition & 1 deletion gdk4-sys/versions.txt
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 494f124)
Generated by gir (https://github.com/gtk-rs/gir @ 8ee816a)
from gir-files (https://github.com/gtk-rs/gir-files @ c31e734)
2 changes: 1 addition & 1 deletion gdkx11-sys/versions.txt
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 494f124)
Generated by gir (https://github.com/gtk-rs/gir @ 8ee816a)
from gir-files (https://github.com/gtk-rs/gir-files @ c31e734)
1 change: 1 addition & 0 deletions gio-sys/src/lib.rs
Expand Up @@ -227,6 +227,7 @@ pub const G_IO_ERROR_PROXY_AUTH_FAILED: GIOErrorEnum = 41;
pub const G_IO_ERROR_PROXY_NEED_AUTH: GIOErrorEnum = 42;
pub const G_IO_ERROR_PROXY_NOT_ALLOWED: GIOErrorEnum = 43;
pub const G_IO_ERROR_BROKEN_PIPE: GIOErrorEnum = 44;
pub const G_IO_ERROR_CONNECTION_CLOSED: GIOErrorEnum = 44;
pub const G_IO_ERROR_NOT_CONNECTED: GIOErrorEnum = 45;
pub const G_IO_ERROR_MESSAGE_TOO_LARGE: GIOErrorEnum = 46;

Expand Down
2 changes: 1 addition & 1 deletion gio-sys/versions.txt
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 494f124)
Generated by gir (https://github.com/gtk-rs/gir @ 8ee816a)
from gir-files (https://github.com/gtk-rs/gir-files @ c31e734)
5 changes: 5 additions & 0 deletions glib-sys/src/lib.rs
Expand Up @@ -183,9 +183,13 @@ pub const G_MARKUP_ERROR_MISSING_ATTRIBUTE: GMarkupError = 6;

pub type GNormalizeMode = c_int;
pub const G_NORMALIZE_DEFAULT: GNormalizeMode = 0;
pub const G_NORMALIZE_NFD: GNormalizeMode = 0;
pub const G_NORMALIZE_DEFAULT_COMPOSE: GNormalizeMode = 1;
pub const G_NORMALIZE_NFC: GNormalizeMode = 1;
pub const G_NORMALIZE_ALL: GNormalizeMode = 2;
pub const G_NORMALIZE_NFKD: GNormalizeMode = 2;
pub const G_NORMALIZE_ALL_COMPOSE: GNormalizeMode = 3;
pub const G_NORMALIZE_NFKC: GNormalizeMode = 3;

pub type GNumberParserError = c_int;
pub const G_NUMBER_PARSER_ERROR_INVALID: GNumberParserError = 0;
Expand Down Expand Up @@ -296,6 +300,7 @@ pub const G_SPAWN_ERROR_CHDIR: GSpawnError = 2;
pub const G_SPAWN_ERROR_ACCES: GSpawnError = 3;
pub const G_SPAWN_ERROR_PERM: GSpawnError = 4;
pub const G_SPAWN_ERROR_TOO_BIG: GSpawnError = 5;
pub const G_SPAWN_ERROR_2BIG: GSpawnError = 5;
pub const G_SPAWN_ERROR_NOEXEC: GSpawnError = 6;
pub const G_SPAWN_ERROR_NAMETOOLONG: GSpawnError = 7;
pub const G_SPAWN_ERROR_NOENT: GSpawnError = 8;
Expand Down
2 changes: 1 addition & 1 deletion glib-sys/versions.txt
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 494f124)
Generated by gir (https://github.com/gtk-rs/gir @ 8ee816a)
from gir-files (https://github.com/gtk-rs/gir-files @ c31e734)
2 changes: 1 addition & 1 deletion gobject-sys/versions.txt
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 494f124)
Generated by gir (https://github.com/gtk-rs/gir @ 8ee816a)
from gir-files (https://github.com/gtk-rs/gir-files @ c31e734)
2 changes: 1 addition & 1 deletion gsk4-sys/versions.txt
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 494f124)
Generated by gir (https://github.com/gtk-rs/gir @ 8ee816a)
from gir-files (https://github.com/gtk-rs/gir-files @ c31e734)
2 changes: 1 addition & 1 deletion gtk-sys/versions.txt
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 494f124)
Generated by gir (https://github.com/gtk-rs/gir @ 8ee816a)
from gir-files (https://github.com/gtk-rs/gir-files @ c31e734)
2 changes: 1 addition & 1 deletion gtk4-sys/versions.txt
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 494f124)
Generated by gir (https://github.com/gtk-rs/gir @ 8ee816a)
from gir-files (https://github.com/gtk-rs/gir-files @ c31e734)
2 changes: 1 addition & 1 deletion pango-sys/versions.txt
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 494f124)
Generated by gir (https://github.com/gtk-rs/gir @ 8ee816a)
from gir-files (https://github.com/gtk-rs/gir-files @ c31e734)
2 changes: 1 addition & 1 deletion pangocairo-sys/versions.txt
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 494f124)
Generated by gir (https://github.com/gtk-rs/gir @ 8ee816a)
from gir-files (https://github.com/gtk-rs/gir-files @ c31e734)

0 comments on commit b92940c

Please sign in to comment.