mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
pkgconfig: add more .pc sample files. abc,xyz
=> abc xyz
in Requires:
This commit is contained in:
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:') {
|
||||||
|
25
vlib/v/pkgconfig/test_samples/gio-2.0.pc
Normal file
25
vlib/v/pkgconfig/test_samples/gio-2.0.pc
Normal file
@ -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}
|
9
vlib/v/pkgconfig/test_samples/gio-unix-2.0.pc
Normal file
9
vlib/v/pkgconfig/test_samples/gio-unix-2.0.pc
Normal file
@ -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
|
13
vlib/v/pkgconfig/test_samples/zlib.pc
Normal file
13
vlib/v/pkgconfig/test_samples/zlib.pc
Normal file
@ -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
Block a user