Tue Sep 26 20:37:17 2023 UTC ()
math/R: Unbreak build on macOS > 12

R 4.2.0 uses a deprecated function
Set MACOSX_DEPLOYMENT_TARGET=12.0 for temporary fix on macOS 13+


(bacon)
diff -r1.241 -r1.242 pkgsrc/math/R/Makefile

cvs diff -r1.241 -r1.242 pkgsrc/math/R/Makefile (expand / switch to unified diff)

--- pkgsrc/math/R/Makefile 2023/07/21 22:46:50 1.241
+++ pkgsrc/math/R/Makefile 2023/09/26 20:37:17 1.242
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.241 2023/07/21 22:46:50 mef Exp $ 1# $NetBSD: Makefile,v 1.242 2023/09/26 20:37:17 bacon Exp $
2 2
3# 3#
4# If updating this package, please try to ensure PLIST.Darwin is kept in sync 4# If updating this package, please try to ensure PLIST.Darwin is kept in sync
5# to avoid unnecessarily breaking macOS users. 5# to avoid unnecessarily breaking macOS users.
6# 6#
7DISTNAME= R-4.2.0 7DISTNAME= R-4.2.0
8PKGREVISION= 7 8PKGREVISION= 7
9CATEGORIES= math 9CATEGORIES= math
10MASTER_SITES= ${MASTER_SITE_R_CRAN:=base/R-4/} 10MASTER_SITES= ${MASTER_SITE_R_CRAN:=base/R-4/}
11 11
12MAINTAINER= pkgsrc-users@NetBSD.org 12MAINTAINER= pkgsrc-users@NetBSD.org
13HOMEPAGE= https://www.R-project.org/ 13HOMEPAGE= https://www.R-project.org/
14COMMENT= Statistical language for data analysis and graphics 14COMMENT= Statistical language for data analysis and graphics
@@ -94,26 +94,34 @@ CONFIGURE_ENV+= ac_cv_path_R_GZIPCMD=${ @@ -94,26 +94,34 @@ CONFIGURE_ENV+= ac_cv_path_R_GZIPCMD=${
94CONFIGURE_ENV+= ac_cv_path_R_UNZIPCMD=${TOOLS_PATH.unzip} 94CONFIGURE_ENV+= ac_cv_path_R_UNZIPCMD=${TOOLS_PATH.unzip}
95CONFIGURE_ENV+= r_cv_prog_f77_flag_mieee=no 95CONFIGURE_ENV+= r_cv_prog_f77_flag_mieee=no
96CONFIGURE_ENV+= ac_cv_path_PDFLATEX="" 96CONFIGURE_ENV+= ac_cv_path_PDFLATEX=""
97 97
98# We don't want "lib64" 98# We don't want "lib64"
99CONFIGURE_ENV+= LIBnn=lib 99CONFIGURE_ENV+= LIBnn=lib
100 100
101# Package assumes it can append to files (specifically DESCRIPTION) that have 101# Package assumes it can append to files (specifically DESCRIPTION) that have
102# been installed SHAREMODE 102# been installed SHAREMODE
103SHAREMODE= 644 103SHAREMODE= 644
104 104
105CONFIGURE_ARGS.Darwin+= --disable-openmp 105CONFIGURE_ARGS.Darwin+= --disable-openmp
106 106
 107# Temporary fix for deprecated function ATSFontFindFromName() in R 4.2.0
 108# Newer R versions should eliminate this function and obsolete this hack
 109# https://trac.macports.org/ticket/66095
 110# Darwin 21 corresponds to macOS 12
 111.if ${OPSYS} == "Darwin" && ${OS_VERSION:R} > 21
 112MAKE_ENV.Darwin+= MACOSX_DEPLOYMENT_TARGET="12.0"
 113.endif
 114
107# R_PAPERSIZE can be: A4, Letter, Legal, Executive 115# R_PAPERSIZE can be: A4, Letter, Legal, Executive
108.if defined(PAPERSIZE) 116.if defined(PAPERSIZE)
109R_PAPERSIZE?= ${PAPERSIZE} 117R_PAPERSIZE?= ${PAPERSIZE}
110.else 118.else
111R_PAPERSIZE?= A4 119R_PAPERSIZE?= A4
112.endif 120.endif
113.if (${R_PAPERSIZE} == "Letterdj") 121.if (${R_PAPERSIZE} == "Letterdj")
114R_PAPERSIZE= Letter 122R_PAPERSIZE= Letter
115.endif 123.endif
116CONFIGURE_ENV+= R_PAPERSIZE=${R_PAPERSIZE:Q} 124CONFIGURE_ENV+= R_PAPERSIZE=${R_PAPERSIZE:Q}
117 125
118# These macros are used during the build, so strip off the -o,-g flags. 126# These macros are used during the build, so strip off the -o,-g flags.
119INSTALL_DATA= ${INSTALL} ${COPY} -m ${SHAREMODE} 127INSTALL_DATA= ${INSTALL} ${COPY} -m ${SHAREMODE}