Lines 1-321
Link Here
|
1 |
# Created by: Maurice Castro <maurice@serc.rmit.edu.au> |
1 |
# Created by: Maurice Castro <maurice@serc.rmit.edu.au> |
2 |
# $FreeBSD$ |
2 |
# $FreeBSD$ |
3 |
|
3 |
|
4 |
PORTNAME?= R |
4 |
PORTNAME= R |
5 |
PORTVERSION= 3.3.1 |
5 |
PORTVERSION= 3.3.1 |
6 |
PORTREVISION= 2 |
6 |
PORTREVISION= 2 |
7 |
CATEGORIES= math lang |
7 |
CATEGORIES= math lang |
8 |
MASTER_SITES= http://cran.r-project.org/%SUBDIR%/ \ |
8 |
MASTER_SITES= http://cran.r-project.org/%SUBDIR%/ \ |
9 |
ftp://cran.r-project.org/pub/R/%SUBDIR%/ \ |
9 |
ftp://cran.r-project.org/pub/R/%SUBDIR%/ \ |
10 |
http://cran.at.r-project.org/%SUBDIR%/ \ |
10 |
http://cran.at.r-project.org/%SUBDIR%/ \ |
11 |
http://cran.au.r-project.org/%SUBDIR%/ \ |
11 |
http://cran.au.r-project.org/%SUBDIR%/ \ |
12 |
http://cran.br.r-project.org/%SUBDIR%/ \ |
12 |
http://cran.br.r-project.org/%SUBDIR%/ \ |
13 |
http://cran.ch.r-project.org/%SUBDIR%/ \ |
13 |
http://cran.ch.r-project.org/%SUBDIR%/ \ |
14 |
http://cran.es.r-project.org/%SUBDIR%/ \ |
14 |
http://cran.es.r-project.org/%SUBDIR%/ \ |
15 |
http://cran.dk.r-project.org/%SUBDIR%/ \ |
15 |
http://cran.dk.r-project.org/%SUBDIR%/ \ |
16 |
http://cran.uk.r-project.org/%SUBDIR%/ \ |
16 |
http://cran.uk.r-project.org/%SUBDIR%/ \ |
17 |
http://cran.us.r-project.org/%SUBDIR%/ \ |
17 |
http://cran.us.r-project.org/%SUBDIR%/ \ |
18 |
ftp://ftp.u-aizu.ac.jp/pub/lang/R/CRAN/%SUBDIR%/ \ |
18 |
ftp://ftp.u-aizu.ac.jp/pub/lang/R/CRAN/%SUBDIR%/ \ |
19 |
http://lib.stat.cmu.edu/R/CRAN/%SUBDIR%/ \ |
19 |
http://lib.stat.cmu.edu/R/CRAN/%SUBDIR%/ \ |
20 |
http://cran.stat.ucla.edu/%SUBDIR%/ \ |
20 |
http://cran.stat.ucla.edu/%SUBDIR%/ \ |
21 |
http://probability.ca/cran/%SUBDIR%/ |
21 |
http://probability.ca/cran/%SUBDIR%/ |
22 |
MASTER_SITE_SUBDIR= src/base/R-${PORTVERSION:C|\..*||} |
22 |
MASTER_SITE_SUBDIR= src/base/R-${PORTVERSION:C|\..*||} |
23 |
|
23 |
|
24 |
MAINTAINER= jrm@ftfl.ca |
24 |
MAINTAINER= jrm@ftfl.ca |
25 |
COMMENT?= Language for statistical computing and graphics |
25 |
COMMENT= Language for statistical computing and graphics |
26 |
|
26 |
|
27 |
LICENSE= GPLv2 |
27 |
LICENSE= GPLv2 |
28 |
|
28 |
|
29 |
BUILD_DEPENDS= ${LOCALBASE}/bin/gsed:textproc/gsed \ |
|
|
30 |
texi2dvi:print/texinfo |
31 |
LIB_DEPENDS= libcurl.so:ftp/curl \ |
29 |
LIB_DEPENDS= libcurl.so:ftp/curl \ |
32 |
libpcre.so:devel/pcre |
30 |
libpcre.so:devel/pcre |
|
|
31 |
BUILD_DEPENDS= texi2dvi:print/texinfo |
33 |
|
32 |
|
34 |
CONFIGURE_ENV= LIBR_LDFLAGS="${LDFLAGS}" OBJC="${CC}" \ |
33 |
GNU_CONFIGURE= yes |
35 |
SED="${LOCALBASE}/bin/gsed" \ |
34 |
USES= fortran iconv |
36 |
ac_cv_have_decl_powl=yes ac_cv_have_decl_log1pl=yes |
35 |
USE_LDCONFIG= ${PREFIX}/lib/R/lib |
37 |
|
36 |
|
38 |
OPTIONS_DEFINE= MISSING DOCS LTO OPENMP LONGDOUBLE |
37 |
CONFIGURE_ARGS= --disable-java --enable-memory-profiling \ |
|
|
38 |
rdocdir=${DOCSDIR} |
39 |
|
39 |
|
40 |
MISSING_DESC= use libmissing rather than libquadmath |
|
|
41 |
LTO_DESC= Try to produce faster code through LTO |
42 |
LONGDOUBLE_DESC= Enable use of long double data type |
43 |
LTO_CONFIGURE_ENABLE= lto |
44 |
OPENMP_CONFIGURE_ENABLE= openmp |
45 |
LONGDOUBLE_CONFIGURE_ENABLE= long-double |
46 |
|
47 |
OPTIONS_SINGLE= BLAS |
48 |
OPTIONS_SINGLE_BLAS= RBLAS ATLAS OPENBLAS NETLIB |
49 |
OPTIONS_DEFAULT= OPENBLAS |
50 |
|
51 |
RBLAS_DESC= Use internal blas implementation |
52 |
|
53 |
OPENBLAS_USES= blaslapack:openblas |
54 |
NETLIB_USES= blaslapack:netlib |
55 |
ATLAS_USES= blaslapack:atlas |
56 |
RBLAS_CONFIGURE_ON= --without-blas --without-lapack |
57 |
RBLAS_CONFIGURE_OFF= --with-blas="-L${LOCALBASE}/lib ${BLASLIB}" \ |
58 |
--with-lapack="${LAPACKLIB}" |
59 |
|
60 |
OPTIONS_SUB= RBLAS |
61 |
|
62 |
.if defined(LIBRMATH_SLAVEPORT) |
63 |
BUILD_WRKSRC= ${WRKSRC}/src/nmath/standalone |
64 |
CONFIGURE_ARGS= --disable-nls --with-ICU=no --with-cairo=no \ |
65 |
--with-jpeglib=no --with-libpng=no --with-libtiff=no \ |
66 |
--with-readline=no --with-tcltk=no --with-x=no \ |
67 |
--without-libintl-prefix |
68 |
CONFIGURE_ENV+= ac_cv_header_iconv_h=no |
69 |
PLIST_SUB= RMATH_SOVERSION="${RMATH_SOVERSION}" |
70 |
USE_LDCONFIG= yes |
71 |
.else # LIBRMATH_SLAVEPORT |
72 |
ALL_TARGET= all |
73 |
INSTALL_TARGET= install-strip |
40 |
INSTALL_TARGET= install-strip |
74 |
CONFIGURE_ARGS= --enable-memory-profiling rdocdir=${DOCSDIR} \ |
41 |
MAKE_JOBS_UNSAFE= yes |
75 |
--with-system-bzlib --with-system-zlib |
|
|
76 |
CONFIGURE_ENV+= FCFLAGS="${FFLAGS}" \ |
77 |
R_LD_LIBRARY_PATH="${R_LD_LIBRARY_PATH}" TAR="${TAR}" |
78 |
|
42 |
|
79 |
OPTIONS_DEFINE+= ICU THREADS |
43 |
OPTIONS_DEFINE= DOCS ICU INFO LETTER LIBR LDOUBLE LTO MISSING NLS \ |
|
|
44 |
OPENMP THREADS X11 |
80 |
|
45 |
|
81 |
ICU_DESC= Use ICU for collation in multibyte locales |
46 |
OPTIONS_GROUP= NEEDX11 |
|
|
47 |
OPTIONS_GROUP_NEEDX11= GHOSTSCRIPT JPEG CAIROPANGO PDF PNG TCLTK TIFF |
82 |
|
48 |
|
83 |
OPTIONS_DEFAULT+= ICU THREADS |
49 |
OPTIONS_SINGLE= BLAS |
|
|
50 |
OPTIONS_SINGLE_BLAS= ATLAS OPENBLAS NETLIB RBLAS |
84 |
|
51 |
|
85 |
.if !defined(LIBR_SLAVEPORT) |
52 |
OPTIONS_SUB= YES |
86 |
RUN_DEPENDS+= ${LOCALBASE}/bin/gsed:textproc/gsed |
|
|
87 |
USE_LDCONFIG= ${PREFIX}/lib/R/lib |
88 |
#now only used to build the R.1 manpage: |
89 |
USES+= perl5 |
90 |
USE_PERL5= build |
91 |
|
53 |
|
92 |
OPTIONS_DEFINE+= GHOSTSCRIPT INFO_MANUALS JPEG LETTER_PAPER LIBR \ |
54 |
ATLAS_DESC= ATLAS BLAS implementation |
93 |
PANGOCAIRO PDF_MANUALS PNG TCLTK TIFF X11 |
55 |
GHOSTSCRIPT_DESC= Graphics Device for Bitmap Files via Ghostscript |
|
|
56 |
CAIROPANGO_DESC= Cairo graphics device and Pango multi-language text |
57 |
INFO_DESC= GNU info manuals |
58 |
JPEG_DESC= JPEG graphics device |
59 |
LDOUBLE_DESC= Enable long double data type |
60 |
LETTER_DESC= US Letter paper |
61 |
LIBR_DESC= Build dynamic (shared) R library |
62 |
LTO_DESC= Try to produce faster code through LTO |
63 |
MISSING_DESC= Use libmissing rather than libquadmath |
64 |
NEEDX11_DESC= X11-Implying Options |
65 |
NETLIB_DESC= Netlib BLAS implementation |
66 |
OPENBLAS_DESC= OpenBLAS BLAS implementation |
67 |
PDF_DESC= PDF manuals (requires TeX) |
68 |
PNG_DESC= PNG graphics device |
69 |
RBLAS_DESC= Use R-bundled BLAS implementation |
70 |
X11_DESC= X11 graphics device |
94 |
|
71 |
|
95 |
GHOSTSCRIPT_DESC= [dev2]bitmap() graphics devices |
72 |
OPTIONS_DEFAULT= GHOSTSCRIPT ICU INFO JPEG LTO LIBR OPENBLAS OPENMP \ |
96 |
INFO_MANUALS_DESC= GNU info manuals |
73 |
CAIROPANGO PNG TCLTK TIFF THREADS X11 |
97 |
JPEG_DESC= jpeg() graphics device |
|
|
98 |
LETTER_PAPER_DESC= US Letter paper |
99 |
LIBR_DESC= R shared library and a dynamically-linked R |
100 |
PANGOCAIRO_DESC= cairo and pango graphics support |
101 |
PDF_MANUALS_DESC= PDF manuals (requires TeX) |
102 |
PNG_DESC= png() graphics device |
103 |
TCLTK_DESC= tcltk package |
104 |
X11_DESC= X11() graphics device |
105 |
|
74 |
|
106 |
OPTIONS_DEFAULT+= GHOSTSCRIPT INFO_MANUALS JPEG LTO LIBR OPENMP \ |
|
|
107 |
PANGOCAIRO PNG TCLTK TIFF X11 |
108 |
|
109 |
OPTIONS_DEFAULT_armv6+= MISSING |
75 |
OPTIONS_DEFAULT_armv6+= MISSING |
110 |
OPTIONS_DEFAULT_powerpc+= MISSING |
76 |
OPTIONS_DEFAULT_powerpc+= MISSING |
111 |
OPTIONS_DEFAULT_powerpc64+= MISSING |
77 |
OPTIONS_DEFAULT_powerpc64+= MISSING |
112 |
OPTIONS_DEFAULT_sparc64+= MISSING |
78 |
OPTIONS_DEFAULT_sparc64+= MISSING |
113 |
|
79 |
|
114 |
.endif # !LIBR_SLAVEPORT |
80 |
ATLAS_USES= blaslapack:atlas |
115 |
PLIST_SUB= R_SOVERSION="${R_SOVERSION}" \ |
|
|
116 |
RBLAS_SOVERSION="${RBLAS_SOVERSION}" \ |
117 |
RLAPACK_SOVERSION="${RLAPACK_SOVERSION}" |
118 |
R_LD_LIBRARY_PATH= ${_GCC_RUNTIME}:${LOCALBASE}/lib |
119 |
USES+= iconv |
120 |
.endif # LIBRMATH_SLAVEPORT |
121 |
GNU_CONFIGURE= yes |
122 |
MAKE_JOBS_UNSAFE= yes |
123 |
R_SOVERSION= 1 |
124 |
RBLAS_SOVERSION= 2 |
125 |
RLAPACK_SOVERSION= 4 |
126 |
RMATH_SOVERSION= 0 |
127 |
USES+= fortran |
128 |
|
81 |
|
129 |
.include "compiler.mk" |
82 |
GHOSTSCRIPT_IMPLIES= X11 |
130 |
.include <bsd.port.options.mk> |
83 |
GHOSTSCRIPT_USES= ghostscript |
131 |
|
84 |
|
132 |
.if ${ARCH} == "sparc64" || ${ARCH} == "powerpc64" |
85 |
ICU_CONFIGURE_WITH= ICU |
133 |
PICFLAG?= -fPIC |
86 |
ICU_LIB_DEPENDS= libicui18n.so:devel/icu |
134 |
.else |
|
|
135 |
PICFLAG?= -fpic |
136 |
.endif |
137 |
.for flag in LD CXXLD |
138 |
CONFIGURE_ENV += SHLIB_${flag}FLAGS="${PICFLAG}" |
139 |
.endfor |
140 |
|
87 |
|
141 |
.if ${OSVERSION} > 1000052 && \ |
88 |
INFO_IMPLIES= DOCS |
142 |
(${ARCH} == amd64 || ${ARCH} == i386 || ${ARCH} == ia64 || ${ARCH} == pc98 || ${ARCH} == sparc64) |
89 |
INFO_INSTALL_TARGET= install-info |
143 |
.for _f in coshl erfcl erfl lgammal powl sinhl tanhl tgammal |
90 |
INFO_INFO= R-FAQ R-admin R-data R-exts R-ints R-intro R-lang |
144 |
CFLAGS+= -fno-builtin-${_f} |
|
|
145 |
LDFLAGS+= -fno-builtin-${_f} |
146 |
.endfor |
147 |
.endif |
148 |
|
91 |
|
149 |
.if ${PORT_OPTIONS:MMISSING} |
92 |
JPEG_IMPLIES= X11 |
150 |
.for _f in acos asin atan cos cosh exp log pow sin sinh tan tanh |
93 |
JPEG_CONFIGURE_WITH= jpeglib |
151 |
CONFIGURE_ENV+= ac_cv_have_decl_c${_f}=yes |
|
|
152 |
.endfor |
153 |
LIB_DEPENDS+= libmissing.so:math/libmissing |
154 |
LIBM= -L${LOCALBASE}/lib -lmissing -lm |
155 |
LIBMH= "missing_math.h" |
156 |
.if defined(LIBRMATH_SLAVEPORT) |
157 |
CPPFLAGS+= -I${LOCALBASE}/include |
158 |
.endif |
159 |
.else |
160 |
LIBM= -lquadmath -lm |
161 |
LIBMH= <quadmath.h> |
162 |
.endif |
163 |
|
94 |
|
164 |
.if !defined(LIBRMATH_SLAVEPORT) |
95 |
LETTER_CONFIGURE_ENV= R_PAPERSIZE=letter |
165 |
|
96 |
|
166 |
.if ${PORT_OPTIONS:MICU} |
97 |
LIBR_CONFIGURE_ENABLE= R-shlib |
167 |
LIB_DEPENDS+= libicui18n.so:devel/icu |
|
|
168 |
CONFIGURE_ARGS+= --with-ICU |
169 |
.else |
170 |
CONFIGURE_ARGS+= --without-ICU |
171 |
.endif |
172 |
|
98 |
|
173 |
.if ${PORT_OPTIONS:MNLS} |
99 |
LDOUBLE_CONFIGURE_ENABLE=long-double |
174 |
USES+= gettext |
|
|
175 |
PLIST_SUB+= NLS="" |
176 |
.else |
177 |
CONFIGURE_ARGS+= --disable-nls |
178 |
PLIST_SUB+= NLS="@comment " |
179 |
.endif |
180 |
|
100 |
|
181 |
.if ${PORT_OPTIONS:MTHREADS} |
101 |
LTO_CONFIGURE_ENABLE= lto |
182 |
CONFIGURE_ARGS+= --enable-threads=posix |
|
|
183 |
.else |
184 |
CONFIGURE_ARGS+= --disable-threads |
185 |
.endif |
186 |
|
102 |
|
187 |
.if defined(LIBR_SLAVEPORT) |
103 |
.for i in acos asin atan cos cosh exp log pow sin sinh tan tanh |
|
|
104 |
MISSING_CONFIGURE_ENV+= ac_cv_have_decl_c${i}=yes |
105 |
.endfor |
106 |
MISSING_LIB_DEPENDS= libmissing.so:math/libmissing |
107 |
MISSING_VARS= LIBM="-L${LOCALBASE}/lib -lmissing -lm" \ |
108 |
LIBMH=<missing_math.h> |
109 |
MISSING_VARS_OFF= LIBM='-lquadmath -lm' \ |
110 |
LIBMH=<quadmath.h> |
188 |
|
111 |
|
189 |
CONFIGURE_ARGS+= --disable-BLAS-shlib --without-pic --without-x |
112 |
NETLIB_USES= blaslapack:netlib |
190 |
USES+= readline |
|
|
191 |
|
113 |
|
192 |
.else # LIBR_SLAVEPORT |
114 |
NLS_CONFIGURE_OFF= --disable-nls |
|
|
115 |
NLS_USES= gettext |
193 |
|
116 |
|
194 |
.if ${PORT_OPTIONS:MGHOSTSCRIPT} |
117 |
OPENBLAS_USES= blaslapack:openblas |
195 |
USES+= ghostscript |
|
|
196 |
.endif |
197 |
|
118 |
|
198 |
.if ${PORT_OPTIONS:MJPEG} |
119 |
OPENMP_CONFIGURE_ENABLE=openmp |
199 |
USES+= jpeg |
|
|
200 |
CONFIGURE_ARGS+= --with-jpeglib |
201 |
.else |
202 |
CONFIGURE_ARGS+= --without-jpeglib |
203 |
.endif |
204 |
|
120 |
|
205 |
.if ${PORT_OPTIONS:MLETTER_PAPER} |
121 |
CAIROPANGO_IMPLIES= X11 |
206 |
CONFIGURE_ENV += R_PAPERSIZE=letter |
122 |
CAIROPANGO_CONFIGURE_WITH=cairo |
207 |
.endif |
123 |
CAIROPANGO_USES= gettext jpeg pkgconfig |
|
|
124 |
CAIROPANGO_USE= gnome=pango,cairo |
208 |
|
125 |
|
209 |
.if ${PORT_OPTIONS:MLIBR} |
126 |
PDF_IMPLIES= DOCS X11 |
210 |
CONFIGURE_ARGS+= --enable-R-shlib |
127 |
PDF_USE= tex=dvipsk:build,kpathsea:build,pdftex:build |
211 |
PLIST_SUB+= LIBR="" |
128 |
PDF_ALL_TARGET= pdf |
212 |
.else |
129 |
PDF_INSTALL_TARGET= install-pdf |
213 |
PLIST_SUB+= LIBR="@comment " |
130 |
.for i in KPSEWHICH MAKEINDEX PDFLATEX PDFTEX TEX TEXI2DVI |
214 |
.endif |
131 |
PDF_CONFIGURE_ENV_OFF+= ac_cv_path_${i}="" |
|
|
132 |
.endfor |
215 |
|
133 |
|
216 |
.if ${PORT_OPTIONS:MPANGOCAIRO} |
134 |
PNG_IMPLIES= X11 |
217 |
USES+= pkgconfig |
135 |
PNG_LIB_DEPENDS= libpng.so:graphics/png |
218 |
USE_GNOME+= pango cairo |
136 |
PNG_CONFIGURE_WITH= libpng |
219 |
PLIST_SUB+= PANGOCAIRO="" |
|
|
220 |
.else |
221 |
CONFIGURE_ARGS+= --without-cairo |
222 |
PLIST_SUB+= PANGOCAIRO="@comment " |
223 |
.endif |
224 |
|
137 |
|
225 |
.if ${PORT_OPTIONS:MPNG} |
138 |
RBLAS_CONFIGURE_ON= --without-blas \ |
226 |
LIB_DEPENDS+= libpng.so:graphics/png |
139 |
--without-lapack |
227 |
CONFIGURE_ARGS+= --with-libpng |
140 |
RBLAS_CONFIGURE_OFF= --with-blas="-L${LOCALBASE}/lib ${BLASLIB}" \ |
228 |
.else |
141 |
--with-lapack="${LAPACKLIB}" |
229 |
CONFIGURE_ARGS+= --without-libpng |
|
|
230 |
.endif |
231 |
|
142 |
|
232 |
.if ${PORT_OPTIONS:MTCLTK} |
143 |
TCLTK_IMPLIES= X11 |
233 |
USES+= tk:84+ |
144 |
TCLTK_USES= tcl tk:84+ |
234 |
CONFIGURE_ARGS+= --with-tcltk \ |
145 |
TCLTK_CONFIGURE_WITH= tcltk |
235 |
--with-tcl-config=${TCL_LIBDIR}/tclConfig.sh \ |
|
|
236 |
--with-tk-config=${TK_LIBDIR}/tkConfig.sh |
237 |
PLIST_SUB+= TCLTK="" |
238 |
.else |
239 |
CONFIGURE_ARGS+= --without-tcltk |
240 |
PLIST_SUB+= TCLTK="@comment " |
241 |
.endif |
242 |
|
146 |
|
243 |
.if ${PORT_OPTIONS:MTIFF} |
147 |
THREADS_CONFIGURE_ON= --enable-threads=posix |
244 |
LIB_DEPENDS+= libtiff.so:graphics/tiff |
148 |
THREADS_CONFIGURE_OFF= --disable-threads |
245 |
CONFIGURE_ARGS+= --with-libtiff |
|
|
246 |
.else |
247 |
CONFIGURE_ARGS+= --without-libtiff |
248 |
.endif |
249 |
|
149 |
|
250 |
.if ${PORT_OPTIONS:MX11} |
150 |
TIFF_IMPLIES= X11 |
251 |
CONFIGURE_ARGS+= --with-x |
151 |
TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff |
252 |
USE_XORG= ice sm x11 xext xmu xscrnsaver xt |
152 |
TIFF_CONFIGURE_WITH= libtiff |
253 |
PLIST_SUB+= X11="" |
|
|
254 |
.else |
255 |
CONFIGURE_ARGS+= --without-x |
256 |
PLIST_SUB+= X11="@comment " |
257 |
.endif |
258 |
|
153 |
|
259 |
.if ${PORT_OPTIONS:MINFO_MANUALS} && ${PORT_OPTIONS:MDOCS} |
154 |
X11_CONFIGURE_WITH= x |
260 |
ALL_TARGET+= info |
155 |
X11_USE= xorg=ice,sm,x11,xext,xmu,xscrnsaver,xt |
261 |
CONFIGURE_ENV+= INSTALL_INFO="${LOCALBASE}/bin/install-info" \ |
|
|
262 |
MAKEINFO="${LOCALBASE}/bin/makeinfo" |
263 |
INFO= R-FAQ R-admin R-data R-exts R-intro R-lang |
264 |
.endif |
265 |
|
156 |
|
266 |
.if ${PORT_OPTIONS:MPDF_MANUALS} && ${PORT_OPTIONS:MDOCS} |
157 |
R_SOVERSION= 1 |
267 |
USE_TEX= texlive dvipsk kpathsea pdftex |
158 |
RBLAS_SOVERSION= 2 |
268 |
#BUILD_DEPENDS += texi2dvi:print/texinfo |
159 |
RLAPACK_SOVERSION= 4 |
269 |
ALL_TARGET+= pdf |
160 |
|
270 |
CONFIGURE_ENV += INSTALL_INFO="${LOCALBASE}/bin/install-info" \ |
161 |
PLIST_SUB= R_SOVERSION="${R_SOVERSION}" \ |
271 |
MAKEINFO="${LOCALBASE}/bin/makeinfo" |
162 |
RBLAS_SOVERSION="${RBLAS_SOVERSION}" \ |
272 |
INSTALL_TARGET+= install-pdf |
163 |
RLAPACK_SOVERSION="${RLAPACK_SOVERSION}" |
273 |
PLIST_SUB+= PDF_MANUAL="" |
164 |
|
274 |
.else |
165 |
.include "compiler.mk" |
275 |
.for _b in KPSEWHICH MAKEINDEX PDFLATEX PDFTEX TEX TEXI2DVI |
166 |
.include <bsd.port.options.mk> |
276 |
CONFIGURE_ENV+= ac_cv_path_${_b}="" |
167 |
|
|
|
168 |
.if ${OSVERSION} > 1000052 && \ |
169 |
(${ARCH} == amd64 || ${ARCH} == i386 || ${ARCH} == ia64 || ${ARCH} == pc98 || \ |
170 |
${ARCH} == sparc64) |
171 |
.for i in coshl erfcl erfl lgammal powl sinhl tanhl tgammal |
172 |
CFLAGS+= -fno-builtin-${i} |
173 |
LDFLAGS+= -fno-builtin-${i} |
277 |
.endfor |
174 |
.endfor |
278 |
PLIST_SUB+= PDF_MANUAL="@comment " |
|
|
279 |
.endif |
175 |
.endif |
280 |
.endif # LIBR_SLAVEPORT |
|
|
281 |
.endif # !LIBRMATH_SLAVEPORT |
282 |
|
176 |
|
283 |
post-patch: |
177 |
post-patch: |
284 |
@${REINPLACE_CMD} -e '\|LIBS=|s|-lrt ||' \ |
|
|
285 |
-e '\|-lm[". ]|s|-lm|${LIBM}|' \ |
286 |
${WRKSRC}/configure |
287 |
.if !${PORT_OPTIONS:MMISSING} |
178 |
.if !${PORT_OPTIONS:MMISSING} |
288 |
.if ${OSVERSION} < 1000016 |
179 |
.if ${OSVERSION} < 1000016 |
289 |
@${REINPLACE_CMD} -e 's/# define EXP expl/# define EXP(x) (long double)expq((__float128)(x))/' \ |
180 |
@${REINPLACE_CMD} -e \ |
290 |
${WRKSRC}/src/nmath/pnchisq.c\ |
181 |
's/# define EXP expl/# define EXP(x) (long double)expq((__float128)(x))/' \ |
|
|
182 |
${WRKSRC}/src/nmath/pnchisq.c \ |
291 |
${WRKSRC}/src/nmath/pgamma.c |
183 |
${WRKSRC}/src/nmath/pgamma.c |
292 |
@${REINPLACE_CMD} -e 's/# define LOG logl/# define LOG(x) (long double)logq((__float128)(x))/' \ |
184 |
@${REINPLACE_CMD} -e \ |
293 |
${WRKSRC}/src/nmath/pnchisq.c\ |
185 |
's/# define LOG logl/# define LOG(x) (long double)logq((__float128)(x))/' \ |
|
|
186 |
${WRKSRC}/src/nmath/pnchisq.c \ |
294 |
${WRKSRC}/src/nmath/pgamma.c |
187 |
${WRKSRC}/src/nmath/pgamma.c |
295 |
|
|
|
296 |
.endif |
188 |
.endif |
297 |
.if ${OSVERSION} < 1000034 |
189 |
.if ${OSVERSION} < 1000034 |
298 |
@${REINPLACE_CMD} -Ee 's/(log)(1p)?l\(/(long double)\1\2q((__float128)/' \ |
190 |
@${REINPLACE_CMD} -Ee 's/(log)(1p)?l\(/(long double)\1\2q((__float128)/'\ |
299 |
${WRKSRC}/src/nmath/dnbeta.c \ |
191 |
${WRKSRC}/src/nmath/dnbeta.c \ |
300 |
${WRKSRC}/src/nmath/pnbeta.c |
192 |
${WRKSRC}/src/nmath/pnbeta.c |
301 |
.endif |
193 |
.endif |
302 |
@${REINPLACE_CMD} -Ee 's/powl\((.*)(long double)/(long double)powq((__float128)\1__float128/' \ |
194 |
@${REINPLACE_CMD} -Ee \ |
|
|
195 |
's/powl\((.*)(long double)/(long double)powq((__float128)\1__float128/' \ |
303 |
${WRKSRC}/src/main/format.c |
196 |
${WRKSRC}/src/main/format.c |
304 |
.else |
197 |
.else # !PORT_OPTIONS:MMISSING |
305 |
.if ${OSVERSION} > 1000052 && \ |
198 |
.if ${OSVERSION} > 1000052 && \ |
306 |
(${ARCH} == amd64 || ${ARCH} == i386 || ${ARCH} == ia64 || ${ARCH} == pc98 || ${ARCH} == sparc64) |
199 |
(${ARCH} == amd64 || ${ARCH} == i386 || ${ARCH} == ia64 || ${ARCH} == pc98 || \ |
|
|
200 |
${ARCH} == sparc64) |
307 |
@${REINPLACE_CMD} -e '\|^FLIBS="$$ac_cv_f77_libs"|s|"|&${LIBM} |' \ |
201 |
@${REINPLACE_CMD} -e '\|^FLIBS="$$ac_cv_f77_libs"|s|"|&${LIBM} |' \ |
308 |
${WRKSRC}/configure |
202 |
${WRKSRC}/configure |
309 |
.endif |
203 |
.endif |
310 |
@${REINPLACE_CMD} -e \ |
204 |
@${REINPLACE_CMD} -e \ |
311 |
'\|#[[:blank:]]*include[[:blank:]]*<complex.h>|{x;s|^.*$$|#include "missing_complex.h"|;H;x;}' \ |
205 |
'\|#[[:blank:]]*include[[:blank:]]*<complex.h>|{x;s|^.*$$|#include "missing_complex.h"|;H;x;}' \ |
312 |
${WRKSRC}/src/main/complex.c |
206 |
${WRKSRC}/src/main/complex.c |
313 |
.endif |
207 |
.endif # !PORT_OPTIONS:MMISSING |
314 |
@${REINPLACE_CMD} -e \ |
208 |
@${REINPLACE_CMD} -e \ |
315 |
'\|#[[:blank:]]*include[[:blank:]]*<math.h>|{x;s|^.*$$|#include ${LIBMH}|;H;x;}' \ |
209 |
'\|#[[:blank:]]*include[[:blank:]]*<math.h>|{x;s|^.*$$|#include ${LIBMH}|;H;x;}'\ |
316 |
${WRKSRC}/src/nmath/nmath.h \ |
210 |
${WRKSRC}/src/nmath/nmath.h \ |
317 |
${WRKSRC}/src/include/Rmath.h0.in |
211 |
${WRKSRC}/src/include/Rmath.h0.in |
318 |
@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|g' \ |
212 |
@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|g'\ |
319 |
${WRKSRC}/src/nmath/standalone/Makefile.in \ |
213 |
${WRKSRC}/src/nmath/standalone/Makefile.in \ |
320 |
${WRKSRC}/src/unix/Makefile.in |
214 |
${WRKSRC}/src/unix/Makefile.in |
321 |
@${REINPLACE_CMD} -e "s|/usr/local|${LOCALBASE}|g" \ |
215 |
@${REINPLACE_CMD} -e "s|/usr/local|${LOCALBASE}|g" \ |
Lines 322-374
Link Here
|
322 |
${WRKSRC}/configure \ |
216 |
${WRKSRC}/configure \ |
323 |
${WRKSRC}/src/library/profile/Rprofile.unix \ |
217 |
${WRKSRC}/src/library/profile/Rprofile.unix \ |
324 |
${WRKSRC}/src/scripts/javareconf.in |
218 |
${WRKSRC}/src/scripts/javareconf.in |
325 |
.if !defined(LIBRMATH_SLAVEPORT) |
|
|
326 |
.if !${PORT_OPTIONS:MNLS} |
327 |
@(cd ${WRKSRC}/src/library/Recommended; \ |
328 |
for tarfile in *.tgz *.tar.gz ; do \ |
329 |
${TAR} -czf temptgz --exclude='*/po/*' @$$tarfile ; \ |
330 |
${MV} temptgz $$tarfile ; \ |
331 |
done) |
332 |
@${REINPLACE_CMD} -e '/ls -d $$srcdir\/inst/d' \ |
333 |
${WRKSRC}/src/library/translations/Makefile.in |
334 |
.endif |
335 |
|
219 |
|
336 |
.if !${PORT_OPTIONS:MMISSING} |
220 |
.if !${PORT_OPTIONS:MMISSING} |
337 |
pre-configure: |
221 |
pre-configure: |
338 |
@if [ ! -f ${_GCC_RUNTIME}/libquadmath.a ] ; then \ |
222 |
@if [ ! -f ${_GCC_RUNTIME}/libquadmath.a ] ; then \ |
339 |
${PRINTF} "\n\n\n%s\n\n\n" "libquadmath is not available for your\ |
223 |
IGNORE="\n\n\n%s\n\n\n" "libquadmath is not available for your\ |
340 |
compiler and architecture: please enable the MISSING option." ; \ |
224 |
compiler and architecture: please enable the MISSING option."; \ |
341 |
exit 1 ; fi |
225 |
fi |
342 |
.endif |
226 |
.endif |
343 |
|
227 |
|
344 |
.if defined(LIBR_SLAVEPORT) |
|
|
345 |
do-build: |
346 |
.for d in include extra |
347 |
@(cd ${WRKSRC}/src/${d}; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} \ |
348 |
${MAKE_ARGS} R) |
349 |
.endfor |
350 |
@(cd ${WRKSRC}/src/main; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} \ |
351 |
${MAKE_ARGS} Makefile Makedeps libR.a) |
352 |
|
353 |
do-install: |
354 |
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/R/lib |
355 |
${INSTALL_DATA} ${WRKSRC}/src/main/libR.a ${STAGEDIR}${PREFIX}/lib/R/lib |
356 |
|
357 |
.else # LIBR_SLAVEPORT |
358 |
|
359 |
pre-configure-script: |
360 |
@${FIND} ${WRKSRC} \( -name '*.orig' -o -name '*.bak' \) -delete |
361 |
|
362 |
check regression-test test: build |
363 |
@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} LANGUAGE=en \ |
364 |
LC_COLLATE=C LC_TIME=C ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} \ |
365 |
check) |
366 |
|
367 |
check-all: build |
368 |
@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} LANGUAGE=en \ |
369 |
LC_COLLATE=C LC_TIME=C ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} \ |
370 |
check-all) |
371 |
|
372 |
post-install: |
228 |
post-install: |
373 |
.for L in R Rblas Rlapack |
229 |
.for L in R Rblas Rlapack |
374 |
@if [ -d ${STAGEDIR}${PREFIX}/lib/R/lib ] ; then \ |
230 |
@if [ -d ${STAGEDIR}${PREFIX}/lib/R/lib ] ; then \ |
Lines 375-403
Link Here
|
375 |
cd ${STAGEDIR}${PREFIX}/lib/R/lib; if [ -f lib${L}.so ] ; then \ |
231 |
cd ${STAGEDIR}${PREFIX}/lib/R/lib; if [ -f lib${L}.so ] ; then \ |
376 |
${LN} -sf lib${L}.so lib${L}.so.${${L:tu}_SOVERSION} ; fi; fi |
232 |
${LN} -sf lib${L}.so lib${L}.so.${${L:tu}_SOVERSION} ; fi; fi |
377 |
.endfor |
233 |
.endfor |
378 |
.if ${PORT_OPTIONS:MINFO_MANUALS} && ${PORT_OPTIONS:MDOCS} |
|
|
379 |
@(cd ${WRKSRC}/doc/manual; \ |
380 |
for infofile in ${INFO}; do \ |
381 |
${INSTALL_DATA} $${infofile}.info* ${STAGEDIR}${PREFIX}/${INFO_PATH}/; \ |
382 |
done) |
383 |
.endif |
384 |
|
234 |
|
385 |
${FIND} ${STAGEDIR}${PREFIX}/lib/ -name "*.so" | ${XARGS} ${STRIP_CMD} |
|
|
386 |
|
387 |
.endif # LIBR_SLAVEPORT |
388 |
.else # !LIBRMATH_SLAVEPORT |
389 |
do-install: |
390 |
${INSTALL_DATA} ${WRKSRC}/src/include/Rmath.h ${STAGEDIR}${PREFIX}/include |
391 |
${INSTALL_DATA} ${BUILD_WRKSRC}/libRmath.a ${STAGEDIR}${PREFIX}/lib |
392 |
${INSTALL_LIB} ${BUILD_WRKSRC}/libRmath.so \ |
393 |
${STAGEDIR}${PREFIX}/lib/libRmath.so.${RMATH_SOVERSION} |
394 |
@(cd ${STAGEDIR}${PREFIX}/lib; ${LN} -sf libRmath.so.${RMATH_SOVERSION} libRmath.so) |
395 |
|
396 |
check regression-test test: build |
397 |
@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} LANGUAGE=en \ |
398 |
LC_COLLATE=C LC_TIME=C ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} test; \ |
399 |
${SETENV} LD_LIBRARY_PATH="${BUILD_WRKSRC}" ${BUILD_WRKSRC}/test) |
400 |
|
401 |
.endif # !LIBRMATH_SLAVEPORT |
402 |
|
403 |
.include <bsd.port.mk> |
235 |
.include <bsd.port.mk> |