| @@ -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) |
| | | 12 | R_PKGNAME?= ${DISTNAME:C/_.*//} |
| | | 13 | R_PKGVER?= ${DISTNAME:C/.*_//} |
| | | 14 | .else |
11 | DISTNAME?= ${R_PKGNAME}_${R_PKGVER} | | 15 | DISTNAME?= ${R_PKGNAME}_${R_PKGVER} |
| | | 16 | .endif |
12 | PKGNAME?= R-${R_PKGNAME}-${R_PKGVER:S/-/./} | | 17 | PKGNAME?= R-${R_PKGNAME}-${R_PKGVER:S/-/./} |
13 | MASTER_SITES?= ${MASTER_SITE_R_CRAN:=contrib/} | | 18 | MASTER_SITES?= ${MASTER_SITE_R_CRAN:=contrib/} |
14 | DIST_SUBDIR?= R | | 19 | DIST_SUBDIR?= R |
15 | CATEGORIES+= math | | 20 | CATEGORIES+= math |
16 | HOMEPAGE?= https://CRAN.R-project.org/package=${R_PKGNAME} | | 21 | HOMEPAGE?= https://CRAN.R-project.org/package=${R_PKGNAME} |
17 | | | 22 | |
18 | WRKSRC= ${WRKDIR}/${R_PKGNAME} | | 23 | WRKSRC= ${WRKDIR}/${R_PKGNAME} |
19 | | | 24 | |
20 | INSTALLATION_DIRS= ${R_LIB} | | 25 | INSTALLATION_DIRS= ${R_LIB} |
21 | | | 26 | |
22 | INSTALL_ENV+= R_LIBS= | | 27 | INSTALL_ENV+= R_LIBS= |
23 | | | 28 | |
24 | do-build: | | 29 | do-build: |