Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Dec 2017 11:38:48 +0000 (UTC)
From:      Torsten Zuehlsdorff <tz@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r456119 - head/security/libargon2
Message-ID:  <201712121138.vBCBcmiD022541@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tz
Date: Tue Dec 12 11:38:48 2017
New Revision: 456119
URL: https://svnweb.freebsd.org/changeset/ports/456119

Log:
  security/libargon2: Add SONAME to shared library
  
  Also add pkg-config file
  
  PR:           224190 222344
  Submitted by: Christopher Hall (maintainer)
  Reported by:  xxjack12xx@gmail.com
  Approved by:  maintainer

Modified:
  head/security/libargon2/Makefile
  head/security/libargon2/pkg-plist

Modified: head/security/libargon2/Makefile
==============================================================================
--- head/security/libargon2/Makefile	Tue Dec 12 11:28:43 2017	(r456118)
+++ head/security/libargon2/Makefile	Tue Dec 12 11:38:48 2017	(r456119)
@@ -3,6 +3,7 @@
 
 PORTNAME=	libargon2
 PORTVERSION=	20161029
+PORTREVISION=	1
 CATEGORIES=	security devel
 
 MAINTAINER=	hsw@bitmark.com
@@ -11,20 +12,31 @@ COMMENT=	Memory hard password hashing program and libr
 LICENSE=	CC0-1.0
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+USES=		gmake
+USE_LDCONFIG=	yes
+
 USE_GITHUB=	yes
 GH_ACCOUNT=	P-H-C
 GH_PROJECT=	phc-winner-argon2
 
-USES=		gmake
-USE_LDCONFIG=	yes
-
 MAKE_JOBS_UNSAFE=	yes
+LIBARGON2=	libargon2.so.0
+MAKE_ARGS+=	SO_LDFLAGS="-shared -Wl,-soname=${LIBARGON2}"
 
+# remove multiarch as this is only for Linux
+SUBST=		s/@HOST_MULTIARCH@//g;
+SUBST+=		s/@UPSTREAM_VER@/${PORTVERSION}/g;
+SUBST+=		s@/usr@${PREFIX}@g;
+SUBST+=		s/-lrt//g;s/-ldl//g;
+SUBST+=		s@Cflags:@Cflags: -I$${includedir}/@;
+
 do-install:
 	${INSTALL_DATA} ${WRKSRC}/include/argon2.h ${STAGEDIR}${PREFIX}/include
 	${INSTALL_DATA} ${WRKSRC}/libargon2.a ${STAGEDIR}${PREFIX}/lib
-	${INSTALL_LIB} ${WRKSRC}/libargon2.so ${STAGEDIR}${PREFIX}/lib
+	${INSTALL_LIB} ${WRKSRC}/libargon2.so ${STAGEDIR}${PREFIX}/lib/libargon2.so.0
+	${RLN} ${STAGEDIR}${PREFIX}/lib/${LIBARGON2} ${STAGEDIR}${PREFIX}/lib/libargon2.so
 	${INSTALL_PROGRAM} ${WRKSRC}/argon2 ${STAGEDIR}${PREFIX}/bin
 	${INSTALL_MAN} ${WRKSRC}/man/argon2.1  ${STAGEDIR}${PREFIX}/man/man1
+	${SED} '${SUBST}' < ${WRKSRC}/libargon2.pc > ${STAGEDIR}${PREFIX}/libdata/pkgconfig/libargon2.pc
 
 .include <bsd.port.mk>

Modified: head/security/libargon2/pkg-plist
==============================================================================
--- head/security/libargon2/pkg-plist	Tue Dec 12 11:28:43 2017	(r456118)
+++ head/security/libargon2/pkg-plist	Tue Dec 12 11:38:48 2017	(r456119)
@@ -2,4 +2,6 @@ bin/argon2
 include/argon2.h
 lib/libargon2.a
 lib/libargon2.so
+lib/libargon2.so.0
+libdata/pkgconfig/libargon2.pc
 man/man1/argon2.1.gz



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