ports/185892: [PATCH] devel/libgit2: fix pkgconfig file, fix hidden dependency on libssh2
Dmitry Marakasov
amdmi3 at amdmi3.ru
Sun Jan 19 19:00:01 UTC 2014
>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 at 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 at 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:
More information about the freebsd-ports-bugs
mailing list