Bug 104524

Summary: [PATCH] Workaround missing openssl.pc on FreeBSD
Product: Spice Reporter: Ting-Wei Lan <lantw44>
Component: spice-gtkAssignee: Spice Bug List <spice-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: lantw44, teuf
Version: unspecified   
Hardware: Other   
OS: FreeBSD   
Whiteboard:
i915 platform: i915 features:
Attachments: build-sys: Workaround missing openssl.pc for FreeBSD

Description Ting-Wei Lan 2018-01-07 10:00:48 UTC
FreeBSD always have OpenSSL installed, but .pc files are not available. We can still build spice-gtk by setting SSL_CFLAGS, SSL_LIBS, OPENSSL_CFLAGS, OPENSSL_LIBS variables, but openssl is still put into spice-client-glib-2.0.pc, which can cause problems for other programs because they cannot find openssl.pc.

I will upload to patch to workaround the issue.
Comment 1 Ting-Wei Lan 2018-01-07 10:18:38 UTC
Created attachment 136595 [details] [review]
build-sys: Workaround missing openssl.pc for FreeBSD

FreeBSD has OpenSSL installed in base, but .pc files are not available.
We can still successfully build spice-gtk by setting SSL_CFLAGS and
SSL_LIBS variables manually, but openssl will still be recorded to
Requires.private field of spice-client-glib-2.0.pc, causing problems for
applications using spice-gtk. To workaround the issue, we do the check
again without using SSL_CFLAGS and SSL_LIBS variables and put SSL_LIBS
into Libs.private field when openssl.pc cannot be found.
Comment 2 Christophe Fergeau 2018-01-08 11:31:01 UTC
Sent upstream
https://lists.freedesktop.org/archives/spice-devel/2018-January/041326.html
but it looks good to me, so I'll push it soon.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.