Date: Sun, 19 Jan 2014 22:55:59 +0400 (MSK) From: Dmitry Marakasov <amdmi3@amdmi3.ru> To: FreeBSD-gnats-submit@freebsd.org Cc: wg@FreeBSD.org Subject: ports/185892: [PATCH] devel/libgit2: fix pkgconfig file, fix hidden dependency on libssh2 Message-ID: <20140119185559.EA77514FF8@hades.panopticon> Resent-Message-ID: <201401191900.s0JJ004R066488@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 185892 >Category: ports >Synopsis: [PATCH] devel/libgit2: fix pkgconfig file, fix hidden dependency on libssh2 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Jan 19 19:00:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Dmitry Marakasov >Release: FreeBSD 10.0-RELEASE amd64 >Organization: >Environment: System: FreeBSD hades.panopticon 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260807: Fri Jan 17 13:14:28 MSK >Description: libgit2 pkgconfig file is broken: % pkg-config --cflags libgit2 Package openssl was not found in the pkg-config search path. Perhaps you should add the directory containing `openssl.pc' to the PKG_CONFIG_PATH environment variable Package 'openssl', required by 'libgit2', not found Package 'zlib', required by 'libgit2', not found This happens because libgit2.pc lists dependencies on libssl and libzlib. The first is in base system and doesn't have pkgconfig file, the second one only has pkgconfig file when built from ports. To fix this: - Depend on openssl explicitely - Remove pkgconfig dependency on zlib unconditionally - Remove pkgconfig dependency on libssl only if OpenSSL from base system is used Also, libgit2 has hidden dependency on libssh2. To fix this: - Depend on libssh2 explicitely - Optionalize this dependency Port maintainer (wg@FreeBSD.org) is cc'd. Similar PR for libssh2 (this one doesn't depend on it): ports/185891 Generated with FreeBSD Port Tools 0.99_11 (mode: change, diff: SVN) >How-To-Repeat: >Fix: --- libgit2-0.20.0_1.patch begins here --- Index: Makefile =================================================================== --- Makefile (revision 340336) +++ Makefile (working copy) @@ -2,6 +2,7 @@ PORTNAME= libgit2 PORTVERSION= 0.20.0 +PORTREVISION= 1 CATEGORIES= devel MAINTAINER= wg@FreeBSD.org @@ -17,9 +18,18 @@ USES= cmake USE_LDCONFIG= yes USE_PYTHON_BUILD= yes +USE_OPENSSL= yes PLIST_SUB= SHLIB_VER=${PORTVERSION} +OPTIONS_DEFINE= SSH +OPTIONS_DEFAULT=SSH +SSH_DESC= Enable SSH support through libssh2 + +SSH_LIB_DEPENDS= libssh2.so:${PORTSDIR}/security/libssh2 +SSH_CMAKE_ON= -DUSE_SSH=ON +SSH_CMAKE_OFF= -DUSE_SSH=OFF + .include <bsd.port.pre.mk> .if ${ARCH} == "sparc64" @@ -27,6 +37,11 @@ .endif post-patch: - @${REINPLACE_CMD} -e "s|/pkgconfig|/../libdata/pkgconfig|" ${WRKSRC}/CMakeLists.txt + @${REINPLACE_CMD} -e "s|/pkgconfig|/../libdata/pkgconfig|; \ + /LIBGIT2_PC_REQUIRES.*zlib/ d" ${WRKSRC}/CMakeLists.txt +.if defined(WITH_OPENSSL_BASE) + @${REINPLACE_CMD} -e "/LIBGIT2_PC_REQUIRES.*openssl/ d" \ + ${WRKSRC}/CMakeLists.txt +.endif .include <bsd.port.post.mk> --- libgit2-0.20.0_1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140119185559.EA77514FF8>