Lines 29-81
Link Here
|
29 |
LIB_DEPENDS= libcurl.so:ftp/curl \ |
29 |
LIB_DEPENDS= libcurl.so:ftp/curl \ |
30 |
libpcre.so:devel/pcre |
30 |
libpcre.so:devel/pcre |
31 |
|
31 |
|
|
|
32 |
CONFIGURE_ARGS= --disable-java \ |
33 |
rdocdir=${DOCSDIR} |
32 |
GNU_CONFIGURE= yes |
34 |
GNU_CONFIGURE= yes |
33 |
USES= fortran iconv objc:compiler perl5 |
35 |
INSTALL_TARGET= install-strip |
|
|
36 |
ONLY_FOR_ARCHS= i386 amd64 |
37 |
USES= fortran iconv localbase objc:compiler perl5 |
34 |
USE_PERL5= build |
38 |
USE_PERL5= build |
35 |
USE_LDCONFIG= ${PREFIX}/lib/R/lib |
39 |
USE_LDCONFIG= ${PREFIX}/lib/R/lib |
36 |
CONFIGURE_ARGS= --disable-java --enable-memory-profiling rdocdir=${DOCSDIR} |
|
|
37 |
INSTALL_TARGET= install-strip |
38 |
|
40 |
|
39 |
OPTIONS_DEFINE= DOCS ICU INFO LETTER LIBR LDOUBLE LTO MISSING NLS \ |
41 |
OPTIONS_DEFINE= DOCS ICU INFO LDOUBLE LETTER LIBR MEMPROF NLS RPROF X11 |
40 |
OPENMP THREADS X11 |
42 |
OPTIONS_GROUP= NEEDGCC NEEDX11 |
41 |
OPTIONS_GROUP= NEEDX11 |
43 |
OPTIONS_GROUP_NEEDGCC= LTO OPENMP |
42 |
OPTIONS_GROUP_NEEDX11= GHOSTSCRIPT JPEG CAIROPANGO PDF PNG TCLTK TIFF |
44 |
OPTIONS_GROUP_NEEDX11= GHOSTSCRIPT JPEG CAIROPANGO PDF PNG TCLTK TIFF |
43 |
OPTIONS_SINGLE= BLAS |
45 |
OPTIONS_RADIO= BLAS |
44 |
OPTIONS_SINGLE_BLAS= ATLAS OPENBLAS NETLIB RBLAS |
46 |
OPTIONS_RADIO_BLAS= ATLAS OPENBLAS NETLIB RBLAS |
45 |
|
47 |
|
46 |
OPTIONS_SUB= YES |
48 |
OPTIONS_SUB= YES |
47 |
|
49 |
|
48 |
ATLAS_DESC= ATLAS BLAS implementation |
50 |
ATLAS_DESC= ATLAS BLAS implementation |
49 |
GHOSTSCRIPT_DESC= Graphics Device for Bitmap Files via Ghostscript |
51 |
GHOSTSCRIPT_DESC= Graphics device for bitmap files via Ghostscript |
50 |
CAIROPANGO_DESC= Cairo graphics device and Pango multi-language text |
52 |
CAIROPANGO_DESC= Cairo graphics device and Pango multi-language text |
51 |
INFO_DESC= GNU info manuals |
53 |
INFO_DESC= GNU info manuals |
52 |
JPEG_DESC= JPEG graphics device |
54 |
JPEG_DESC= JPEG graphics device |
53 |
LDOUBLE_DESC= Enable long double data type |
55 |
LDOUBLE_DESC= Long double data type |
54 |
LETTER_DESC= US Letter paper |
56 |
LETTER_DESC= US letter paper |
55 |
LIBR_DESC= Build dynamic (shared) R library |
57 |
LIBR_DESC= Shared R library |
56 |
LTO_DESC= Try to produce faster code through LTO |
58 |
LTO_DESC= Use Link Time Optimization |
57 |
MISSING_DESC= Use libmissing rather than libquadmath |
59 |
MEMPROF_DESC= Memory profiling via Rprofmem() and tracemem() |
58 |
NEEDX11_DESC= X11-Implying Options |
60 |
NEEDGCC_DESC= Require GCC |
|
|
61 |
NEEDX11_DESC= Require X11 |
59 |
NETLIB_DESC= Netlib BLAS implementation |
62 |
NETLIB_DESC= Netlib BLAS implementation |
60 |
OPENBLAS_DESC= OpenBLAS BLAS implementation |
63 |
OPENBLAS_DESC= OpenBLAS BLAS implementation |
61 |
PDF_DESC= PDF manuals (requires TeX) |
64 |
PDF_DESC= PDF manuals (requires TeX) |
62 |
PNG_DESC= PNG graphics device |
65 |
PNG_DESC= PNG graphics device |
63 |
RBLAS_DESC= Use R-bundled BLAS implementation |
66 |
RBLAS_DESC= Use R-bundled BLAS implementation |
|
|
67 |
RPROF_DESC= R profiling via Rprof() |
64 |
X11_DESC= X11 graphics device |
68 |
X11_DESC= X11 graphics device |
65 |
|
69 |
|
66 |
OPTIONS_DEFAULT= GHOSTSCRIPT ICU INFO JPEG LTO LIBR OPENBLAS OPENMP \ |
70 |
OPTIONS_DEFAULT= CAIROPANGO GHOSTSCRIPT ICU INFO JPEG LDOUBLE LIBR PNG \ |
67 |
CAIROPANGO PNG TCLTK TIFF THREADS X11 |
71 |
RBLAS RPROF TCLTK TIFF X11 |
68 |
|
72 |
|
69 |
OPTIONS_DEFAULT_armv6+= MISSING |
|
|
70 |
OPTIONS_DEFAULT_powerpc+= MISSING |
71 |
OPTIONS_DEFAULT_powerpc64+= MISSING |
72 |
OPTIONS_DEFAULT_sparc64+= MISSING |
73 |
|
74 |
ATLAS_USES= blaslapack:atlas |
73 |
ATLAS_USES= blaslapack:atlas |
75 |
.if defined(BATCH) || defined(PACKAGE_BUILDING) |
74 |
ATLAS_VARS= MANUAL_PACKAGE_BUILD=\ |
76 |
ATLAS_IGNORE= Choose a BLAS option other than ATLAS for package building. |
75 |
"Choose a BLAS option other than ATLAS for package building." |
77 |
.endif |
|
|
78 |
|
76 |
|
|
|
77 |
CAIROPANGO_IMPLIES= X11 |
78 |
CAIROPANGO_CONFIGURE_WITH=cairo |
79 |
CAIROPANGO_USES= gettext jpeg pkgconfig |
80 |
CAIROPANGO_USE= gnome=pango,cairo |
81 |
|
79 |
DOCS_BUILD_DEPENDS= texi2any:print/texinfo |
82 |
DOCS_BUILD_DEPENDS= texi2any:print/texinfo |
80 |
|
83 |
|
81 |
GHOSTSCRIPT_IMPLIES= X11 |
84 |
GHOSTSCRIPT_IMPLIES= X11 |
Lines 90-112
Link Here
|
90 |
|
93 |
|
91 |
JPEG_IMPLIES= X11 |
94 |
JPEG_IMPLIES= X11 |
92 |
JPEG_CONFIGURE_WITH= jpeglib |
95 |
JPEG_CONFIGURE_WITH= jpeglib |
|
|
96 |
JPEG_CONFIGURE_ENV= r_cv_header_jpeglib_h=yes |
97 |
JPEG_USES= jpeg |
93 |
|
98 |
|
|
|
99 |
LDOUBLE_CONFIGURE_ENABLE=long-double |
100 |
|
94 |
LETTER_CONFIGURE_ENV= R_PAPERSIZE=letter |
101 |
LETTER_CONFIGURE_ENV= R_PAPERSIZE=letter |
95 |
|
102 |
|
96 |
LIBR_CONFIGURE_ENABLE= R-shlib |
103 |
LIBR_CONFIGURE_ENABLE= R-shlib |
97 |
|
104 |
|
98 |
LDOUBLE_CONFIGURE_ENABLE=long-double |
|
|
99 |
|
100 |
LTO_CONFIGURE_ENABLE= lto |
105 |
LTO_CONFIGURE_ENABLE= lto |
|
|
106 |
LTO_USE= gcc=yes |
101 |
|
107 |
|
102 |
.for i in acos asin atan cos cosh exp log pow sin sinh tan tanh |
108 |
MEMPROF_CONFIGURE_ENABLE=memory-profiling |
103 |
MISSING_CONFIGURE_ENV+= ac_cv_have_decl_c${i}=yes |
|
|
104 |
.endfor |
105 |
MISSING_LIB_DEPENDS= libmissing.so:math/libmissing |
106 |
MISSING_VARS= LIBM="-L${LOCALBASE}/lib -lmissing -lm" \ |
107 |
LIBMH=<missing_math.h> |
108 |
MISSING_VARS_OFF= LIBM='-lquadmath -lm' \ |
109 |
LIBMH=<quadmath.h> |
110 |
|
109 |
|
111 |
NETLIB_USES= blaslapack:netlib |
110 |
NETLIB_USES= blaslapack:netlib |
112 |
|
111 |
|
Lines 116-127
Link Here
|
116 |
OPENBLAS_USES= blaslapack:openblas |
115 |
OPENBLAS_USES= blaslapack:openblas |
117 |
|
116 |
|
118 |
OPENMP_CONFIGURE_ENABLE=openmp |
117 |
OPENMP_CONFIGURE_ENABLE=openmp |
|
|
118 |
OPENMP_USE= compiler:openmp |
119 |
|
119 |
|
120 |
CAIROPANGO_IMPLIES= X11 |
|
|
121 |
CAIROPANGO_CONFIGURE_WITH=cairo |
122 |
CAIROPANGO_USES= gettext jpeg pkgconfig |
123 |
CAIROPANGO_USE= gnome=pango,cairo |
124 |
|
125 |
PDF_IMPLIES= DOCS X11 |
120 |
PDF_IMPLIES= DOCS X11 |
126 |
PDF_USE= tex=dvipsk:build,kpathsea:build,pdftex:build |
121 |
PDF_USE= tex=dvipsk:build,kpathsea:build,pdftex:build |
127 |
PDF_INSTALL_TARGET= install-pdf |
122 |
PDF_INSTALL_TARGET= install-pdf |
Lines 134-150
Link Here
|
134 |
PNG_CONFIGURE_WITH= libpng |
129 |
PNG_CONFIGURE_WITH= libpng |
135 |
|
130 |
|
136 |
RBLAS_CONFIGURE_ON= --without-blas \ |
131 |
RBLAS_CONFIGURE_ON= --without-blas \ |
137 |
--without-lapack |
132 |
--without-lapack \ |
|
|
133 |
--enable-BLAS-shlib |
138 |
RBLAS_CONFIGURE_OFF= --with-blas="-L${LOCALBASE}/lib ${BLASLIB}" \ |
134 |
RBLAS_CONFIGURE_OFF= --with-blas="-L${LOCALBASE}/lib ${BLASLIB}" \ |
139 |
--with-lapack="${LAPACKLIB}" |
135 |
--with-lapack="${LAPACKLIB}" \ |
140 |
|
136 |
|
|
|
137 |
RPROF_CONFIGURE_ENABLE= R-profiling |
138 |
|
141 |
TCLTK_IMPLIES= X11 |
139 |
TCLTK_IMPLIES= X11 |
142 |
TCLTK_USES= tcl tk:84+ |
140 |
TCLTK_USES= tcl tk:84+ |
143 |
TCLTK_CONFIGURE_WITH= tcltk |
141 |
TCLTK_CONFIGURE_WITH= tcltk |
144 |
|
142 |
|
145 |
THREADS_CONFIGURE_ON= --enable-threads=posix |
|
|
146 |
THREADS_CONFIGURE_OFF= --disable-threads |
147 |
|
148 |
TIFF_IMPLIES= X11 |
143 |
TIFF_IMPLIES= X11 |
149 |
TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff |
144 |
TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff |
150 |
TIFF_CONFIGURE_WITH= libtiff |
145 |
TIFF_CONFIGURE_WITH= libtiff |
Lines 160-228
Link Here
|
160 |
RBLAS_SOVERSION="${RBLAS_SOVERSION}" \ |
155 |
RBLAS_SOVERSION="${RBLAS_SOVERSION}" \ |
161 |
RLAPACK_SOVERSION="${RLAPACK_SOVERSION}" |
156 |
RLAPACK_SOVERSION="${RLAPACK_SOVERSION}" |
162 |
|
157 |
|
163 |
.include "compiler.mk" |
|
|
164 |
.include <bsd.port.options.mk> |
158 |
.include <bsd.port.options.mk> |
165 |
|
159 |
|
166 |
.if ${OSVERSION} > 1000052 && \ |
160 |
.if ${OSVERSION} < 1000015 |
167 |
(${ARCH} == amd64 || ${ARCH} == i386 || ${ARCH} == ia64 || ${ARCH} == pc98 || \ |
161 |
USE_GCC= yes |
168 |
${ARCH} == sparc64) |
|
|
169 |
.for i in coshl erfcl erfl lgammal powl sinhl tanhl tgammal |
170 |
CFLAGS+= -fno-builtin-${i} |
171 |
LDFLAGS+= -fno-builtin-${i} |
172 |
.endfor |
173 |
.endif |
162 |
.endif |
174 |
|
163 |
|
175 |
post-patch: |
164 |
post-patch: |
176 |
.if !${PORT_OPTIONS:MMISSING} |
|
|
177 |
.if ${OSVERSION} < 1000016 |
178 |
@${REINPLACE_CMD} -e \ |
179 |
's/# define EXP expl/# define EXP(x) (long double)expq((__float128)(x))/' \ |
180 |
${WRKSRC}/src/nmath/pnchisq.c \ |
181 |
${WRKSRC}/src/nmath/pgamma.c |
182 |
@${REINPLACE_CMD} -e \ |
183 |
's/# define LOG logl/# define LOG(x) (long double)logq((__float128)(x))/' \ |
184 |
${WRKSRC}/src/nmath/pnchisq.c \ |
185 |
${WRKSRC}/src/nmath/pgamma.c |
186 |
.endif |
187 |
.if ${OSVERSION} < 1000034 |
188 |
@${REINPLACE_CMD} -Ee 's/(log)(1p)?l\(/(long double)\1\2q((__float128)/'\ |
189 |
${WRKSRC}/src/nmath/dnbeta.c \ |
190 |
${WRKSRC}/src/nmath/pnbeta.c |
191 |
.endif |
192 |
@${REINPLACE_CMD} -Ee \ |
193 |
's/powl\((.*)(long double)/(long double)powq((__float128)\1__float128/' \ |
194 |
${WRKSRC}/src/main/format.c |
195 |
.else # !PORT_OPTIONS:MMISSING |
196 |
.if ${OSVERSION} > 1000052 && \ |
197 |
(${ARCH} == amd64 || ${ARCH} == i386 || ${ARCH} == ia64 || ${ARCH} == pc98 || \ |
198 |
${ARCH} == sparc64) |
199 |
@${REINPLACE_CMD} -e '\|^FLIBS="$$ac_cv_f77_libs"|s|"|&${LIBM} |' \ |
200 |
${WRKSRC}/configure |
201 |
.endif |
202 |
@${REINPLACE_CMD} -e \ |
203 |
'\|#[[:blank:]]*include[[:blank:]]*<complex.h>|{x;s|^.*$$|#include "missing_complex.h"|;H;x;}' \ |
204 |
${WRKSRC}/src/main/complex.c |
205 |
.endif # !PORT_OPTIONS:MMISSING |
206 |
@${REINPLACE_CMD} -e \ |
207 |
'\|#[[:blank:]]*include[[:blank:]]*<math.h>|{x;s|^.*$$|#include ${LIBMH}|;H;x;}'\ |
208 |
${WRKSRC}/src/nmath/nmath.h \ |
209 |
${WRKSRC}/src/include/Rmath.h0.in |
210 |
@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|g'\ |
165 |
@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|g'\ |
211 |
${WRKSRC}/src/nmath/standalone/Makefile.in \ |
166 |
${WRKSRC}/src/nmath/standalone/Makefile.in \ |
212 |
${WRKSRC}/src/unix/Makefile.in |
167 |
${WRKSRC}/src/unix/Makefile.in |
213 |
@${REINPLACE_CMD} -e "s|/usr/local|${LOCALBASE}|g" \ |
168 |
@${REINPLACE_CMD} -e "s|/usr/local|${LOCALBASE}|g" \ |
214 |
${WRKSRC}/configure \ |
169 |
${WRKSRC}/configure |
215 |
${WRKSRC}/src/library/profile/Rprofile.unix \ |
|
|
216 |
${WRKSRC}/src/scripts/javareconf.in |
217 |
|
170 |
|
218 |
.if !${PORT_OPTIONS:MMISSING} |
|
|
219 |
pre-configure: |
220 |
@if [ ! -f ${_GCC_RUNTIME}/libquadmath.a ] ; then \ |
221 |
IGNORE="\n\n\n%s\n\n\n" "libquadmath is not available for your\ |
222 |
compiler and architecture: please enable the MISSING option."; \ |
223 |
fi |
224 |
.endif |
225 |
|
226 |
post-install: |
171 |
post-install: |
227 |
.for L in R Rblas Rlapack |
172 |
.for L in R Rblas Rlapack |
228 |
@if [ -d ${STAGEDIR}${PREFIX}/lib/R/lib ] ; then \ |
173 |
@if [ -d ${STAGEDIR}${PREFIX}/lib/R/lib ] ; then \ |