-
Notifications
You must be signed in to change notification settings - Fork 0
/
pkgconfig.tcl.in
64 lines (55 loc) · 1.98 KB
/
pkgconfig.tcl.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
namespace eval cookfs {}
proc cookfs::pkgconfig {{command ""} {value ""} {newValue ""}} {
variable pkgconfig
variable pkgconfigInitialized
if {![info exists pkgconfigInitialized]} {
array set pkgconfig {
package-version "@PACKAGE_VERSION@"
c-vfs "@COOKFS_PKGCONFIG_USECVFS@"
c-pages "@COOKFS_PKGCONFIG_USECPAGES@"
c-fsindex "@COOKFS_PKGCONFIG_USECFSINDEX@"
c-readerchannel "@COOKFS_PKGCONFIG_USECREADERCHAN@"
c-writerchannel "@COOKFS_PKGCONFIG_USECWRITERCHAN@"
c-writer "@COOKFS_PKGCONFIG_USECWRITER@"
c-crypto "@COOKFS_PKGCONFIG_USECCRYPTO@"
tcl-commands "@COOKFS_PKGCONFIG_USETCLCMDS@"
tcl-callbacks "@COOKFS_PKGCONFIG_USECALLBACKS@"
feature-aside "@COOKFS_PKGCONFIG_FEATURE_ASIDE@"
feature-bzip2 "@COOKFS_PKGCONFIG_USEBZ2@"
feature-lzma "@COOKFS_PKGCONFIG_USELZMA@"
feature-zstd "@COOKFS_PKGCONFIG_USEZSTD@"
feature-brotli "@COOKFS_PKGCONFIG_USEBROTLI@"
feature-metadata "@COOKFS_PKGCONFIG_FEATURE_METADATA@"
feature-crypto "@COOKFS_PKGCONFIG_FEATURE_CRYPTO@"
platform "unknown"
}
set pkgconfigInitialized 1
}
if {$command == "set"} {
if {[info exists pkgconfig($value)]} {
set pkgconfig($value) $newValue
return $pkgconfig($value)
} elseif {$value != ""} {
set an [lsort [array names pkgconfig]]
error "Unknown field \"$value\"; should be one of: [join [lrange $an 0 end-1] {, }] or [lindex $an end]."
}
} elseif {$newValue == ""} {
switch -- $command {
get {
if {[info exists pkgconfig($value)]} {
return $pkgconfig($value)
} elseif {$value != ""} {
set an [lsort [array names pkgconfig]]
error "Unknown field \"$value\"; should be one of: [join [lrange $an 0 end-1] {, }] or [lindex $an end]."
}
}
list {
if {$value == ""} {
return [lsort [array names pkgconfig]]
}
}
}
}
error "Usage: ::cookfs::pkgconfig list|get paramName"
}
package provide cookfs::tcl::pkgconfig 1.9.0