pkgconfig: add more .pc sample files. `abc,xyz` => `abc xyz` in `Requires:`
parent
5c3ef588c3
commit
d258733752
|
@ -42,6 +42,10 @@ pub mut:
|
||||||
conflicts []string
|
conflicts []string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn (mut pc PkgConfig) parse_list_no_comma(s string) []string {
|
||||||
|
return pc.parse_list( s.replace(',', ' ') )
|
||||||
|
}
|
||||||
|
|
||||||
fn (mut pc PkgConfig) parse_list(s string) []string {
|
fn (mut pc PkgConfig) parse_list(s string) []string {
|
||||||
operators := ['=', '<', '>', '>=', '<=']
|
operators := ['=', '<', '>', '>=', '<=']
|
||||||
r := pc.parse_line(s.replace(' ', ' ').replace(', ', ' ')).split(' ')
|
r := pc.parse_line(s.replace(' ', ' ').replace(', ', ' ')).split(' ')
|
||||||
|
@ -110,11 +114,11 @@ fn (mut pc PkgConfig) parse(file string) bool {
|
||||||
} else if line.starts_with('Version:') {
|
} else if line.starts_with('Version:') {
|
||||||
pc.version = pc.parse_line(line[8..])
|
pc.version = pc.parse_line(line[8..])
|
||||||
} else if line.starts_with('Requires:') {
|
} else if line.starts_with('Requires:') {
|
||||||
pc.requires = pc.parse_list(line[9..])
|
pc.requires = pc.parse_list_no_comma(line[9..])
|
||||||
} else if line.starts_with('Requires.private:') {
|
} else if line.starts_with('Requires.private:') {
|
||||||
pc.requires_private = pc.parse_list(line[17..])
|
pc.requires_private = pc.parse_list_no_comma(line[17..])
|
||||||
} else if line.starts_with('Conflicts:') {
|
} else if line.starts_with('Conflicts:') {
|
||||||
pc.conflicts = pc.parse_list(line[10..])
|
pc.conflicts = pc.parse_list_no_comma(line[10..])
|
||||||
} else if line.starts_with('Cflags:') {
|
} else if line.starts_with('Cflags:') {
|
||||||
pc.cflags = pc.parse_list(line[7..])
|
pc.cflags = pc.parse_list(line[7..])
|
||||||
} else if line.starts_with('Libs:') {
|
} else if line.starts_with('Libs:') {
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
prefix=/usr
|
||||||
|
libdir=${prefix}/lib/x86_64-linux-gnu
|
||||||
|
includedir=${prefix}/include
|
||||||
|
|
||||||
|
datadir=${prefix}/share
|
||||||
|
schemasdir=${datadir}/glib-2.0/schemas
|
||||||
|
bindir=${prefix}/bin
|
||||||
|
giomoduledir=${libdir}/gio/modules
|
||||||
|
gio=${bindir}/gio
|
||||||
|
gio_querymodules=${bindir}/gio-querymodules
|
||||||
|
glib_compile_schemas=${libdir}/glib-2.0/glib-compile-schemas
|
||||||
|
glib_compile_resources=${bindir}/glib-compile-resources
|
||||||
|
gdbus=${bindir}/gdbus
|
||||||
|
gdbus_codegen=${bindir}/gdbus-codegen
|
||||||
|
gresource=${bindir}/gresource
|
||||||
|
gsettings=${bindir}/gsettings
|
||||||
|
|
||||||
|
Name: GIO
|
||||||
|
Description: glib I/O library
|
||||||
|
Version: 2.64.3
|
||||||
|
Requires: glib-2.0,gobject-2.0
|
||||||
|
Requires.private: gmodule-no-export-2.0, zlib
|
||||||
|
Libs: -L${libdir} -lgio-2.0
|
||||||
|
Libs.private: -ldl -pthread -lresolv
|
||||||
|
Cflags: -I${includedir}
|
|
@ -0,0 +1,9 @@
|
||||||
|
prefix=/usr
|
||||||
|
libdir=${prefix}/lib/x86_64-linux-gnu
|
||||||
|
includedir=${prefix}/include
|
||||||
|
|
||||||
|
Name: GIO unix specific APIs
|
||||||
|
Description: unix specific headers for glib I/O library
|
||||||
|
Version: 2.64.3
|
||||||
|
Requires: gobject-2.0, gio-2.0
|
||||||
|
Cflags: -I${includedir}/gio-unix-2.0
|
|
@ -0,0 +1,13 @@
|
||||||
|
prefix=/usr
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
libdir=${prefix}/lib/x86_64-linux-gnu
|
||||||
|
sharedlibdir=${libdir}
|
||||||
|
includedir=${prefix}/include
|
||||||
|
|
||||||
|
Name: zlib
|
||||||
|
Description: zlib compression library
|
||||||
|
Version: 1.2.11
|
||||||
|
|
||||||
|
Requires:
|
||||||
|
Libs: -L${libdir} -L${sharedlibdir} -lz
|
||||||
|
Cflags: -I${includedir}
|
Loading…
Reference in New Issue