Re: security/opensc: Switch GH_* to stable /release/ MASTER_SITES

2018-05-09 Thread Stuart Henderson
On 2018/05/09 23:29, Klemens Nanni wrote:
> Looking at OpenSC due to naddy's lld mail, this came up first.
> 
> The release tarball now preships a configure script, but I refrained
> from touching the configure target for now since `autoreconf' or at
> least aclocal in particular is still neccessary. GNU auto* wizards, what
> do you say?

.am and .ac files are patched so yes, that's correct not to change this.

> While here, `find | xargs' can be turned into a simple `find -delete'.

makes sense to me, and we've had that for long enough now that there's
no need to worry that it might get in the way of a backport if that's
needed. (not that it seems likely for this port anyway, but it's
something to consider before using a new-ish feature).

> opensc works as before, no observed runtime changes so far.
> 
> Feedback?

I'd go for a REVISION bump just to be sure, then OK sthen@.

> Index: Makefile
> ===
> RCS file: /cvs/ports/security/opensc/Makefile,v
> retrieving revision 1.45
> diff -u -p -r1.45 Makefile
> --- Makefile  18 Feb 2018 10:35:31 -  1.45
> +++ Makefile  9 May 2018 21:06:37 -
> @@ -2,14 +2,10 @@
>  
>  COMMENT= set of libraries and utilities to access smart cards
>  
> -VERSION= 0.17.0
> -DISTNAME=OpenSC-${VERSION}
> -PKGNAME= opensc-${VERSION}
> +V=   0.17.0
> +DISTNAME=opensc-${V}
>  REVISION=2
> -GH_ACCOUNT=  OpenSC
> -GH_PROJECT=  ${GH_ACCOUNT}
> -GH_TAGNAME=  ${VERSION}
> -SUBST_VARS +=GH_TAGNAME
> +SUBST_VARS +=V
>  
>  SHARED_LIBS +=  opensc 6.0   # 5.0
>  SHARED_LIBS +=   smm-local 2.0   # 5.0
> @@ -25,6 +21,8 @@ PERMIT_PACKAGE_CDROM=   Yes
>  
>  WANTLIB= c crypto ncurses pthread readline z
>  
> +MASTER_SITES=https://github.com/OpenSC/OpenSC/releases/download/${V}/
> +
>  BUILD_DEPENDS=   devel/libtool \
>   ${MODGNU_AUTOCONF_DEPENDS} \
>   ${MODGNU_AUTOMAKE_DEPENDS} \
> @@ -57,7 +55,6 @@ post-install:
>   ${SUBST_CMD} -c -m 0644 -o ${BINOWN} -g ${BINGRP} \
>   ${FILESDIR}/libopensc.pc \
>   ${PREFIX}/lib/pkgconfig/libopensc.pc
> - @find ${PREFIX}/lib/pkcs11/ -name '*.la' -print0 | \
> - xargs -0r rm -f
> + @find ${PREFIX}/lib/pkcs11/ -name '*.la' -delete
>  
>  .include 
> Index: distinfo
> ===
> RCS file: /cvs/ports/security/opensc/distinfo,v
> retrieving revision 1.12
> diff -u -p -r1.12 distinfo
> --- distinfo  16 Aug 2017 14:39:07 -  1.12
> +++ distinfo  7 May 2018 21:32:31 -
> @@ -1,2 +1,2 @@
> -SHA256 (OpenSC-0.17.0.tar.gz) = AHxGIq/CJbjXob6lT1Mlr/pEF/TheqoDJWqp9MJXgv0=
> -SIZE (OpenSC-0.17.0.tar.gz) = 1407652
> +SHA256 (opensc-0.17.0.tar.gz) = vnPGgWhnq0ch5qmufbqOiQxfFp8KLLtL81Tg8wqUgwA=
> +SIZE (opensc-0.17.0.tar.gz) = 1950547
> Index: files/libopensc.pc
> ===
> RCS file: /cvs/ports/security/opensc/files/libopensc.pc,v
> retrieving revision 1.1
> diff -u -p -r1.1 libopensc.pc
> --- files/libopensc.pc16 Aug 2017 14:39:07 -  1.1
> +++ files/libopensc.pc7 May 2018 21:54:23 -
> @@ -5,6 +5,6 @@ includedir=${prefix}/include
>  
>  Name: libopensc
>  Description: OpenSC smartcard framework
> -Version: ${GH_TAGNAME}
> +Version: ${V}
>  Libs: -L${libdir} -lopensc
>  Cflags: -I${includedir}
> 



security/opensc: Switch GH_* to stable /release/ MASTER_SITES

2018-05-09 Thread Klemens Nanni
Looking at OpenSC due to naddy's lld mail, this came up first.

The release tarball now preships a configure script, but I refrained
from touching the configure target for now since `autoreconf' or at
least aclocal in particular is still neccessary. GNU auto* wizards, what
do you say?

While here, `find | xargs' can be turned into a simple `find -delete'.

opensc works as before, no observed runtime changes so far.

Feedback?

Index: Makefile
===
RCS file: /cvs/ports/security/opensc/Makefile,v
retrieving revision 1.45
diff -u -p -r1.45 Makefile
--- Makefile18 Feb 2018 10:35:31 -  1.45
+++ Makefile9 May 2018 21:06:37 -
@@ -2,14 +2,10 @@
 
 COMMENT=   set of libraries and utilities to access smart cards
 
-VERSION=   0.17.0
-DISTNAME=  OpenSC-${VERSION}
-PKGNAME=   opensc-${VERSION}
+V= 0.17.0
+DISTNAME=  opensc-${V}
 REVISION=  2
-GH_ACCOUNT=OpenSC
-GH_PROJECT=${GH_ACCOUNT}
-GH_TAGNAME=${VERSION}
-SUBST_VARS +=  GH_TAGNAME
+SUBST_VARS +=  V
 
 SHARED_LIBS +=  opensc 6.0 # 5.0
 SHARED_LIBS += smm-local 2.0   # 5.0
@@ -25,6 +21,8 @@ PERMIT_PACKAGE_CDROM= Yes
 
 WANTLIB=   c crypto ncurses pthread readline z
 
+MASTER_SITES=  https://github.com/OpenSC/OpenSC/releases/download/${V}/
+
 BUILD_DEPENDS= devel/libtool \
${MODGNU_AUTOCONF_DEPENDS} \
${MODGNU_AUTOMAKE_DEPENDS} \
@@ -57,7 +55,6 @@ post-install:
${SUBST_CMD} -c -m 0644 -o ${BINOWN} -g ${BINGRP} \
${FILESDIR}/libopensc.pc \
${PREFIX}/lib/pkgconfig/libopensc.pc
-   @find ${PREFIX}/lib/pkcs11/ -name '*.la' -print0 | \
-   xargs -0r rm -f
+   @find ${PREFIX}/lib/pkcs11/ -name '*.la' -delete
 
 .include 
Index: distinfo
===
RCS file: /cvs/ports/security/opensc/distinfo,v
retrieving revision 1.12
diff -u -p -r1.12 distinfo
--- distinfo16 Aug 2017 14:39:07 -  1.12
+++ distinfo7 May 2018 21:32:31 -
@@ -1,2 +1,2 @@
-SHA256 (OpenSC-0.17.0.tar.gz) = AHxGIq/CJbjXob6lT1Mlr/pEF/TheqoDJWqp9MJXgv0=
-SIZE (OpenSC-0.17.0.tar.gz) = 1407652
+SHA256 (opensc-0.17.0.tar.gz) = vnPGgWhnq0ch5qmufbqOiQxfFp8KLLtL81Tg8wqUgwA=
+SIZE (opensc-0.17.0.tar.gz) = 1950547
Index: files/libopensc.pc
===
RCS file: /cvs/ports/security/opensc/files/libopensc.pc,v
retrieving revision 1.1
diff -u -p -r1.1 libopensc.pc
--- files/libopensc.pc  16 Aug 2017 14:39:07 -  1.1
+++ files/libopensc.pc  7 May 2018 21:54:23 -
@@ -5,6 +5,6 @@ includedir=${prefix}/include
 
 Name: libopensc
 Description: OpenSC smartcard framework
-Version: ${GH_TAGNAME}
+Version: ${V}
 Libs: -L${libdir} -lopensc
 Cflags: -I${includedir}