pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkgsrc: math/R: Derive R_PKGNAME and R_PKGVER from DISTNAME



details:   https://anonhg.NetBSD.org/pkgsrc/rev/882cc916371e
branches:  trunk
changeset: 306199:882cc916371e
user:      minskim <minskim%pkgsrc.org@localhost>
date:      Thu Apr 12 15:40:18 2018 +0000
description:
math/R: Derive R_PKGNAME and R_PKGVER from DISTNAME

This reduces # of variables to define in an R extension package.

diffstat:

 math/R/Makefile.extension |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r a550fe14b86c -r 882cc916371e math/R/Makefile.extension
--- a/math/R/Makefile.extension Thu Apr 12 15:11:02 2018 +0000
+++ b/math/R/Makefile.extension Thu Apr 12 15:40:18 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.extension,v 1.21 2018/04/09 21:57:46 minskim Exp $
+# $NetBSD: Makefile.extension,v 1.22 2018/04/12 15:40:18 minskim Exp $
 #
 # This Makefile fragment is included by packages for R library packages.
 #
@@ -8,7 +8,12 @@
 #     for the package desired.
 # (2) Include this Makefile fragment in the package Makefile,
 
+.if defined(DISTNAME)
+R_PKGNAME?=    ${DISTNAME:C/_.*//}
+R_PKGVER?=     ${DISTNAME:C/.*_//}
+.else
 DISTNAME?=             ${R_PKGNAME}_${R_PKGVER}
+.endif
 PKGNAME?=              R-${R_PKGNAME}-${R_PKGVER:S/-/./}
 MASTER_SITES?=         ${MASTER_SITE_R_CRAN:=contrib/}
 DIST_SUBDIR?=          R



Home | Main Index | Thread Index | Old Index