1
0
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:
Dialga 2022-07-02 20:31:52 +12:00 committed by GitHub
parent 4032838aba
commit 6957f940a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 1 deletions

View File

@ -70,7 +70,7 @@ fn (mut pc PkgConfig) parse_list(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('\${') {
tok0 := r.index('\${') or { break }
mut tok1 := r[tok0..].index('}') or { break }

View 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}

View 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}