build: Do away with older and newer deps
We copy the 'newer' variant to the canonical locations. No need to implement manual branching, we have git since decades. Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/620>
This commit is contained in:
		
							
								
								
									
										42
									
								
								Cargo.deps
									
									
									
									
									
								
							
							
						
						
									
										42
									
								
								Cargo.deps
									
									
									
									
									
								
							@ -1,37 +1,39 @@
 | 
				
			|||||||
# Dependencies which change based on build flags
 | 
					# Dependencies and tools which change based on build flags
 | 
				
			||||||
bitflags = "1.2.*"
 | 
					# For the newer-than-Byzantium config
 | 
				
			||||||
clap = { version = "2.33.*", default-features = false }
 | 
					
 | 
				
			||||||
zbus = "1.0.*"
 | 
					bitflags = "1.3.*"
 | 
				
			||||||
zvariant = "2.0.*"
 | 
					clap = { version = "4.*", features=["std"], default-features = false }
 | 
				
			||||||
 | 
					zbus = "1.9.*"
 | 
				
			||||||
 | 
					zvariant = "2.10.*"
 | 
				
			||||||
# Newer versions seem to confuse the version of Cargo on Debian Bullseye
 | 
					# Newer versions seem to confuse the version of Cargo on Debian Bullseye
 | 
				
			||||||
zvariant_derive = "2.0.*"
 | 
					zvariant_derive = "2.10.*"
 | 
				
			||||||
xkbcommon = { version = "0.4.*", features = ["wayland"] }
 | 
					xkbcommon = { version = "0.5.*", features = ["wayland"] }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[dependencies.cairo-rs]
 | 
					[dependencies.cairo-rs]
 | 
				
			||||||
version = "0.7.*"
 | 
					version = "0.18.*"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[dependencies.cairo-sys-rs]
 | 
					[dependencies.cairo-sys-rs]
 | 
				
			||||||
version = "0.9"
 | 
					version = "0.18.*"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[dependencies.gdk]
 | 
					[dependencies.gdk]
 | 
				
			||||||
version = "0.11.*"
 | 
					version = "0.18.*"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[dependencies.gio]
 | 
					[dependencies.gio]
 | 
				
			||||||
version = "0.7.*"
 | 
					version = "0.18.*"
 | 
				
			||||||
features = ["v2_44"]
 | 
					features = ["v2_58"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[dependencies.glib]
 | 
					[dependencies.glib]
 | 
				
			||||||
version = "0.8.*"
 | 
					version = "0.18.*"
 | 
				
			||||||
features = ["v2_44"]
 | 
					features = ["v2_58"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[dependencies.glib-sys]
 | 
					[dependencies.glib-sys]
 | 
				
			||||||
version = "*"
 | 
					version = "0.18.*"
 | 
				
			||||||
features = ["v2_44"]
 | 
					features = ["v2_58"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[dependencies.gtk]
 | 
					[dependencies.gtk]
 | 
				
			||||||
version = "0.7.*"
 | 
					version = "0.18.*"
 | 
				
			||||||
features = ["v3_22"]
 | 
					features = ["v3_24"]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[dependencies.gtk-sys]
 | 
					[dependencies.gtk-sys]
 | 
				
			||||||
version = "0.9"
 | 
					version = "0.18.*"
 | 
				
			||||||
features = ["v3_22"]
 | 
					features = ["v3_24"]
 | 
				
			||||||
 | 
				
			|||||||
@ -1,39 +0,0 @@
 | 
				
			|||||||
# Dependencies and tools which change based on build flags
 | 
					 | 
				
			||||||
# For the newer-than-Byzantium config
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
bitflags = "1.3.*"
 | 
					 | 
				
			||||||
clap = { version = "4.*", features=["std"], default-features = false }
 | 
					 | 
				
			||||||
zbus = "1.9.*"
 | 
					 | 
				
			||||||
zvariant = "2.10.*"
 | 
					 | 
				
			||||||
# Newer versions seem to confuse the version of Cargo on Debian Bullseye
 | 
					 | 
				
			||||||
zvariant_derive = "2.10.*"
 | 
					 | 
				
			||||||
xkbcommon = { version = "0.5.*", features = ["wayland"] }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
[dependencies.cairo-rs]
 | 
					 | 
				
			||||||
version = "0.18.*"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
[dependencies.cairo-sys-rs]
 | 
					 | 
				
			||||||
version = "0.18.*"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
[dependencies.gdk]
 | 
					 | 
				
			||||||
version = "0.18.*"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
[dependencies.gio]
 | 
					 | 
				
			||||||
version = "0.18.*"
 | 
					 | 
				
			||||||
features = ["v2_58"]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
[dependencies.glib]
 | 
					 | 
				
			||||||
version = "0.18.*"
 | 
					 | 
				
			||||||
features = ["v2_58"]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
[dependencies.glib-sys]
 | 
					 | 
				
			||||||
version = "0.18.*"
 | 
					 | 
				
			||||||
features = ["v2_58"]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
[dependencies.gtk]
 | 
					 | 
				
			||||||
version = "0.18.*"
 | 
					 | 
				
			||||||
features = ["v3_24"]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
[dependencies.gtk-sys]
 | 
					 | 
				
			||||||
version = "0.18.*"
 | 
					 | 
				
			||||||
features = ["v3_24"]
 | 
					 | 
				
			||||||
							
								
								
									
										875
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										875
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										1235
									
								
								Cargo.lock.newer
									
									
									
									
									
								
							
							
						
						
									
										1235
									
								
								Cargo.lock.newer
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										9
									
								
								debian/rules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								debian/rules
									
									
									
									
										vendored
									
									
								
							@ -24,13 +24,6 @@ endif
 | 
				
			|||||||
export RUSTFLAGS = --remap-path-prefix=$(CURDIR)=/remap-pwd $(xgot)
 | 
					export RUSTFLAGS = --remap-path-prefix=$(CURDIR)=/remap-pwd $(xgot)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
distrel := $(shell lsb_release --codename --short)
 | 
					 | 
				
			||||||
ifneq (,$(filter $(distrel),bookworm))
 | 
					 | 
				
			||||||
	newer = true
 | 
					 | 
				
			||||||
else
 | 
					 | 
				
			||||||
	newer = false
 | 
					 | 
				
			||||||
endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
%:
 | 
					%:
 | 
				
			||||||
	dh $@ --builddirectory=_build --buildsystem=meson
 | 
						dh $@ --builddirectory=_build --buildsystem=meson
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -38,6 +31,6 @@ endif
 | 
				
			|||||||
# causing Cargo to refuse to build with a crates.io copy
 | 
					# causing Cargo to refuse to build with a crates.io copy
 | 
				
			||||||
override_dh_auto_configure:
 | 
					override_dh_auto_configure:
 | 
				
			||||||
	[ ! -f Cargo.lock ] || rm Cargo.lock
 | 
						[ ! -f Cargo.lock ] || rm Cargo.lock
 | 
				
			||||||
	dh_auto_configure -- -Dnewer=$(newer) -Donline=false
 | 
						dh_auto_configure -- -Donline=false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
override_dh_autoreconf:
 | 
					override_dh_autoreconf:
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										17
									
								
								meson.build
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								meson.build
									
									
									
									
									
								
							@ -98,19 +98,12 @@ cargo_toml_base = configure_file(
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
cargo_patch = []
 | 
					cargo_patch = []
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if get_option('newer') == true
 | 
					cargo_build_flags += ['--features', 'glib_v0_14,zbus_v1_5,clap_v4']
 | 
				
			||||||
    cargo_build_flags += ['--features', 'glib_v0_14,zbus_v1_5,clap_v4']
 | 
					cargo_deps = files('Cargo.deps')
 | 
				
			||||||
    cargo_deps = files('Cargo.deps.newer')
 | 
					cargo_lock = files('Cargo.lock')
 | 
				
			||||||
    cargo_lock = files('Cargo.lock.newer')
 | 
					
 | 
				
			||||||
else
 | 
					if get_option('online') == true
 | 
				
			||||||
    cargo_deps = files('Cargo.deps')
 | 
					 | 
				
			||||||
    cargo_lock = []
 | 
					 | 
				
			||||||
    if get_option('online') == true
 | 
					 | 
				
			||||||
  cargo_patch = [files('Cargo.deps.online')]
 | 
					  cargo_patch = [files('Cargo.deps.online')]
 | 
				
			||||||
        if get_option('reset_lock') == true
 | 
					 | 
				
			||||||
            cargo_lock = files('Cargo.lock')
 | 
					 | 
				
			||||||
        endif
 | 
					 | 
				
			||||||
    endif
 | 
					 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cat = find_program('cat')
 | 
					cat = find_program('cat')
 | 
				
			||||||
 | 
				
			|||||||
@ -11,10 +11,6 @@ option('find_orphans',
 | 
				
			|||||||
       type: 'boolean', value: false,
 | 
					       type: 'boolean', value: false,
 | 
				
			||||||
       description: 'Check if all present layout files are included in resources.')
 | 
					       description: 'Check if all present layout files are included in resources.')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
option('newer',
 | 
					 | 
				
			||||||
       type: 'boolean', value: false,
 | 
					 | 
				
			||||||
       description: 'Build with dependencies newer than those of Byzantium')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
option('online',
 | 
					option('online',
 | 
				
			||||||
       type: 'boolean', value: true,
 | 
					       type: 'boolean', value: true,
 | 
				
			||||||
       description: 'Pull packages from the internet while building, as opposed to a local registry.')
 | 
					       description: 'Pull packages from the internet while building, as opposed to a local registry.')
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user