Bug 185891 - [PATCH] security/libssh2: fix pkgconfig file, add staging
Summary: [PATCH] security/libssh2: fix pkgconfig file, add staging
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Sofian Brabez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-19 18:50 UTC by Dmitry Marakasov
Modified: 2014-03-07 13:00 UTC (History)
1 user (show)

See Also:


Attachments
libssh2-1.4.3_1,2.patch (13.46 KB, patch)
2014-01-19 18:50 UTC, Dmitry Marakasov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Marakasov 2014-01-19 18:50:00 UTC
Unless OpenSSL from ports is installed, libssh2 pkgconfig file is broken:

% pkg-config --cflags libssh2
Package libssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libssl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libssl', required by 'libssh2', not found
Package 'libcrypto', required by 'libssh2', not found
 
This happens because libssl.pc lists dependencies on libssl and
libcrypto, but with OpenSSL from base system, there are no such
pkgconfig files.

- Fix this, by removing unneeded dependencies in case of base system OpenSSL used

While here, also:
- Support staging; manpages go into pkg-plist, and x-generate-man3 is no longer needed
- Use new OPTIONS features

Port maintainer (sbz@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.99_11 (mode: change, diff: SVN)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-01-19 18:50:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sbz

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2014-03-07 12:53:48 UTC
Author: amdmi3
Date: Fri Mar  7 12:53:40 2014
New Revision: 347380
URL: http://svnweb.freebsd.org/changeset/ports/347380
QAT: https://qat.redports.org/buildarchive/r347380/

Log:
  - Use new OPTIONS features
  - Remove useless (with staging support) maintainer target
  - Fix pkgconfig file
  
  PR:		185891
  Submitted by:	amdmi3
  Approved by:	maintainer timeout

Modified:
  head/security/libssh2/Makefile

Modified: head/security/libssh2/Makefile
==============================================================================
--- head/security/libssh2/Makefile	Fri Mar  7 12:08:08 2014	(r347379)
+++ head/security/libssh2/Makefile	Fri Mar  7 12:53:40 2014	(r347380)
@@ -3,7 +3,7 @@
 
 PORTNAME=	libssh2
 PORTVERSION=	1.4.3
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	2
 CATEGORIES=	security devel
 MASTER_SITES=	http://www.libssh2.org/download/ \
@@ -22,37 +22,22 @@ USE_LDCONFIG=	yes
 OPTIONS_DEFINE=	GCRYPT TRACE ZLIB
 OPTIONS_DEFAULT=	ZLIB
 
-.include <bsd.port.options.mk>
-
 TRACE_DESC=	Enable debug packet traces
 
-.include <bsd.port.pre.mk>
-
-.if ${PORT_OPTIONS:MTRACE}
-CONFIGURE_ARGS+=	--enable-debug
-.else
-CONFIGURE_ARGS+=	--disable-debug
-.endif
-
-.if ${PORT_OPTIONS:MGCRYPT}
-LIB_DEPENDS+=	gcrypt:${PORTSDIR}/security/libgcrypt
-CONFIGURE_ARGS+=	--with-libgcrypt -with-libgcrypt-prefix=${LOCALBASE} --without-openssl
-CFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-L${LOCALBASE}/lib
-.endif
-
-.if ${PORT_OPTIONS:MZLIB}
-CONFIGURE_ARGS+=	--with-libz
-.else
-CONFIGURE_ARGS+=	--without-libz
-.endif
+TRACE_CONFIGURE_ENABLE=	debug
+GCRYPT_LIB_DEPENDS=	libgcrypt.so:${PORTSDIR}/security/libgcrypt
+GCRYPT_CONFIGURE_ON=	--with-libgcrypt -with-libgcrypt-prefix=${LOCALBASE} --without-openssl
+GCRYPT_CFLAGS=		-I${LOCALBASE}/include
+GCRYPT_LDFLAGS=		-L${LOCALBASE}/lib
+ZLIB_CONFIGURE_WITH=	libz
 
-# allow maintainer to generate MAN3 manpages list (make extract is required before)
-x-generate-man3: extract
-	@(cd ${WRKSRC}/docs && ${LS} -1F *.3 | ${SORT} | ${CUT} -d '/' -f4 \
-		| ${GREP} -v template)
+.include <bsd.port.pre.mk>
 
 post-patch:
+.if defined(WITH_OPENSSL_BASE)
+	@${REINPLACE_CMD} -e '/LIBSREQUIRED=/ s|libssl,libcrypto||' \
+		${WRKSRC}/configure.ac ${WRKSRC}/configure
+.endif
 	@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|' \
 		${WRKSRC}/Makefile.in
 
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Dmitry Marakasov freebsd_committer freebsd_triage 2014-03-07 12:54:06 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!