mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
pkgconfig: fix parsing mid-line comments (#14920)
This commit is contained in:
parent
4032838aba
commit
6957f940a0
@ -70,7 +70,7 @@ fn (mut pc PkgConfig) parse_list(s string) []string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn (mut pc PkgConfig) parse_line(s string) string {
|
fn (mut pc PkgConfig) parse_line(s string) string {
|
||||||
mut r := s.trim_space()
|
mut r := s.split('#')[0]
|
||||||
for r.contains('\${') {
|
for r.contains('\${') {
|
||||||
tok0 := r.index('\${') or { break }
|
tok0 := r.index('\${') or { break }
|
||||||
mut tok1 := r[tok0..].index('}') or { break }
|
mut tok1 := r[tok0..].index('}') or { break }
|
||||||
|
19
vlib/v/pkgconfig/test_samples/hogweed.pc
Normal file
19
vlib/v/pkgconfig/test_samples/hogweed.pc
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
prefix=/usr
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
libdir=${exec_prefix}/lib
|
||||||
|
includedir=${prefix}/include
|
||||||
|
|
||||||
|
# Uses Requires.private and Libs.private, under the assumption that
|
||||||
|
# when using shared libraries, the ELF dependencies from libhogweed.so
|
||||||
|
# to nettle and gmp work.
|
||||||
|
|
||||||
|
Name: Hogweed
|
||||||
|
Description: Nettle low-level cryptographic library (public-key algorithms)
|
||||||
|
URL: http://www.lysator.liu.se/~nisse/nettle
|
||||||
|
Version: 3.8
|
||||||
|
Requires: # nettle
|
||||||
|
Requires.private: nettle
|
||||||
|
Libs: -L${libdir} -lhogweed # -lgmp
|
||||||
|
Libs.private: -lgmp
|
||||||
|
Cflags: -I${includedir}
|
||||||
|
|
11
vlib/v/pkgconfig/test_samples/nettle.pc
Normal file
11
vlib/v/pkgconfig/test_samples/nettle.pc
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
prefix=/usr
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
libdir=${exec_prefix}/lib
|
||||||
|
includedir=${prefix}/include
|
||||||
|
|
||||||
|
Name: Nettle
|
||||||
|
Description: Nettle low-level cryptographic library (symmetric algorithms)
|
||||||
|
URL: http://www.lysator.liu.se/~nisse/nettle
|
||||||
|
Version: 3.8
|
||||||
|
Libs: -L${libdir} -lnettle
|
||||||
|
Cflags: -I${includedir}
|
Loading…
Reference in New Issue
Block a user