From b1622c74b9e455cc69bea772c4f20b83c71363d7 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 8 Dec 2021 10:50:24 +0200 Subject: [PATCH] net.openssl: fix compilation of vpm.v on FreeBSD --- vlib/net/openssl/c.v | 10 +++++++--- vlib/v/pkgconfig/pkgconfig.v | 5 +++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/vlib/net/openssl/c.v b/vlib/net/openssl/c.v index 1e12643463..be2f7eeecc 100644 --- a/vlib/net/openssl/c.v +++ b/vlib/net/openssl/c.v @@ -3,10 +3,14 @@ module openssl // On Linux, prefer a localy built openssl, because it is // much more likely for it to be newer, than the system // openssl from libssl-dev. If there is no local openssl, -// the next flag is harmless, since it will still use the -// (older) system openssl. -#pkgconfig openssl +// the next #pkgconfig flag is harmless, since it will still +// use the (older) system openssl. +#flag linux -I/usr/local/include/openssl #flag linux -L/usr/local/lib +$if $pkgconfig('openssl') { + #pkgconfig openssl +} + #flag windows -l libssl -l libcrypto #flag -lssl -lcrypto #flag linux -ldl -lpthread diff --git a/vlib/v/pkgconfig/pkgconfig.v b/vlib/v/pkgconfig/pkgconfig.v index 4b5b2470c3..8c60b84b09 100644 --- a/vlib/v/pkgconfig/pkgconfig.v +++ b/vlib/v/pkgconfig/pkgconfig.v @@ -13,9 +13,10 @@ const ( '/usr/lib64/pkgconfig', '/usr/lib/pkgconfig', '/usr/share/pkgconfig', - '/opt/homebrew/lib/pkgconfig', + '/opt/homebrew/lib/pkgconfig', // Brew on macOS + '/usr/local/libdata/pkgconfig', // FreeBSD ] - version = '0.3.1' + version = '0.3.2' ) pub struct Options {