Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jan 2018 17:42:19 +0000 (UTC)
From:      Roman Bogorodskiy <novel@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r459198 - in head/devel/libspice-server: . files
Message-ID:  <201801161742.w0GHgJUq085272@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: novel
Date: Tue Jan 16 17:42:19 2018
New Revision: 459198
URL: https://svnweb.freebsd.org/changeset/ports/459198

Log:
  devel/libspice-server: fix pc file generation
  
  libspice-server uses autotools and utilizes PKG_CHECK_MODULES to get
  openssl CFLAGS and LDFLAGS. However, as we support various openssl flavors,
  including openssl from base that lacks pkg-config file, we explicitly pass
  OPENSSL_LIBS and OPENSSL_CFLAGS via CONFIGURE_ENV, however, libspice-server
  still adds 'openssl' package to Requires.private of its .pc file.
  
  This causes a problem for software that requires libspice-server, because
  e.g. when using openssl from base, detection will fail because .pc file
  is listing non-existent 'openssl' package.
  
  To fix that, update libspice-server's configure.ac to add 'openssl' to
  Requires.private only if OPENSSL_LIBS and OPENSSL_CFLAGS wasn't explicitly
  specified by user, otherwise omit 'openssl' and just add
  the value of OPENSSL_LIBS to Libs.private.
  
  While here, add 'amd64' to list of x86_64 cpus so it don't show a warning.
  
  Also, drop RUN_DEPENDS on spice-protocol as this is basically a set of
  headers and it's not required in runtime.
  
  Reviewed by:		maintainer
  Differential Revision:	https://reviews.freebsd.org/D13896

Added:
  head/devel/libspice-server/files/patch-configure.ac   (contents, props changed)
Modified:
  head/devel/libspice-server/Makefile

Modified: head/devel/libspice-server/Makefile
==============================================================================
--- head/devel/libspice-server/Makefile	Tue Jan 16 17:24:53 2018	(r459197)
+++ head/devel/libspice-server/Makefile	Tue Jan 16 17:42:19 2018	(r459198)
@@ -3,6 +3,7 @@
 
 PORTNAME=	libspice-server
 DISTVERSION=	0.14.0
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	https://www.spice-space.org/download/releases/
 DISTNAME=	spice-${PORTVERSION}
@@ -14,7 +15,6 @@ LICENSE=	GPLv2
 
 LIB_DEPENDS=	libopus.so:audio/opus
 BUILD_DEPENDS=	spice-protocol>=0.12.10:devel/spice-protocol
-RUN_DEPENDS=	spice-protocol>=0.12.10:devel/spice-protocol
 
 OPTIONS_DEFINE=		GSTREAMER LZ4 SASL STATISTICS
 OPTIONS_DEFAULT=	GSTREAMER LZ4 SASL
@@ -33,7 +33,7 @@ SASL_LIB_DEPENDS=	libsasl2.so:security/cyrus-sasl2
 
 STATISTICS_CONFIGURE_ENABLE=	statistics
 
-USES=		gmake jpeg libtool localbase:ldflag pkgconfig \
+USES=		autoreconf gmake jpeg libtool localbase:ldflag pkgconfig \
 		ssl tar:bzip2
 
 USE_GNOME=	glib20

Added: head/devel/libspice-server/files/patch-configure.ac
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/libspice-server/files/patch-configure.ac	Tue Jan 16 17:42:19 2018	(r459198)
@@ -0,0 +1,31 @@
+--- configure.ac.orig	2018-01-13 04:00:56 UTC
++++ configure.ac
+@@ -62,7 +62,7 @@ AC_SUBST(SPICE_LT_VERSION)
+ 
+ # Check for the CPU we are using
+ case $host_cpu in
+-  x86_64)
++  x86_64|amd64)
+         ;;
+   *)
+         SPICE_WARNING([spice-server on non-x86_64 architectures has not been extensively tested])
+@@ -186,10 +186,18 @@ if test "x$enable_celt051" = "xyes"; then
+                       AS_VAR_APPEND([SPICE_REQUIRES], [" celt051 >= $CELT051_REQUIRED"]))
+ fi
+ 
++OPENSSL_PKGCONF_USED=1
++if test -n "${OPENSSL_LIBS}" || test -n "${OPENSSL_CFLAGS}"; then
++    OPENSSL_PKGCONF_USED=0
++fi
+ PKG_CHECK_MODULES(SSL, openssl)
+ AC_SUBST(SSL_CFLAGS)
+ AC_SUBST(SSL_LIBS)
+-AS_VAR_APPEND([SPICE_REQUIRES], [" openssl"])
++if test "{OPENSSL_PKGCONF_USED}" = 1; then
++    AS_VAR_APPEND([SPICE_REQUIRES], [" openssl"])
++else
++    AS_VAR_APPEND([SPICE_NONPKGCONFIG_LIBS], [" $SSL_LIBS"])
++fi
+ 
+ AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
+     AC_MSG_CHECKING([for jpeglib.h])



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801161742.w0GHgJUq085272>