Thu Apr 12 15:40:18 2018 UTC ()
math/R: Derive R_PKGNAME and R_PKGVER from DISTNAME

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


(minskim)
diff -r1.21 -r1.22 pkgsrc/math/R/Makefile.extension

cvs diff -r1.21 -r1.22 pkgsrc/math/R/Makefile.extension (expand / switch to unified diff)

--- pkgsrc/math/R/Makefile.extension 2018/04/09 21:57:46 1.21
+++ pkgsrc/math/R/Makefile.extension 2018/04/12 15:40:18 1.22
@@ -1,24 +1,29 @@ @@ -1,24 +1,29 @@
1# $NetBSD: Makefile.extension,v 1.21 2018/04/09 21:57:46 minskim Exp $ 1# $NetBSD: Makefile.extension,v 1.22 2018/04/12 15:40:18 minskim Exp $
2# 2#
3# This Makefile fragment is included by packages for R library packages. 3# This Makefile fragment is included by packages for R library packages.
4# 4#
5# To use this Makefile fragment, simply: 5# To use this Makefile fragment, simply:
6# 6#
7# (1) define R_PKGNAME and R_PKGVER to the R package name and version 7# (1) define R_PKGNAME and R_PKGVER to the R package name and version
8# for the package desired. 8# for the package desired.
9# (2) Include this Makefile fragment in the package Makefile, 9# (2) Include this Makefile fragment in the package Makefile,
10 10
 11.if defined(DISTNAME)
 12R_PKGNAME?= ${DISTNAME:C/_.*//}
 13R_PKGVER?= ${DISTNAME:C/.*_//}
 14.else
11DISTNAME?= ${R_PKGNAME}_${R_PKGVER} 15DISTNAME?= ${R_PKGNAME}_${R_PKGVER}
 16.endif
12PKGNAME?= R-${R_PKGNAME}-${R_PKGVER:S/-/./} 17PKGNAME?= R-${R_PKGNAME}-${R_PKGVER:S/-/./}
13MASTER_SITES?= ${MASTER_SITE_R_CRAN:=contrib/} 18MASTER_SITES?= ${MASTER_SITE_R_CRAN:=contrib/}
14DIST_SUBDIR?= R 19DIST_SUBDIR?= R
15CATEGORIES+= math 20CATEGORIES+= math
16HOMEPAGE?= https://CRAN.R-project.org/package=${R_PKGNAME} 21HOMEPAGE?= https://CRAN.R-project.org/package=${R_PKGNAME}
17 22
18WRKSRC= ${WRKDIR}/${R_PKGNAME} 23WRKSRC= ${WRKDIR}/${R_PKGNAME}
19 24
20INSTALLATION_DIRS= ${R_LIB} 25INSTALLATION_DIRS= ${R_LIB}
21 26
22INSTALL_ENV+= R_LIBS= 27INSTALL_ENV+= R_LIBS=
23 28
24do-build: 29do-build: