Lines 29-61
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 |
--enable-R-shlib \ |
34 |
rdocdir=${DOCSDIR} |
32 |
GNU_CONFIGURE= yes |
35 |
GNU_CONFIGURE= yes |
33 |
USES= fortran iconv objc:compiler perl5 |
36 |
INSTALL_TARGET= install-strip |
|
|
37 |
ONLY_FOR_ARCHS= i386 amd64 |
38 |
USES= fortran iconv localbase objc:compiler perl5 |
34 |
USE_PERL5= build |
39 |
USE_PERL5= build |
35 |
USE_LDCONFIG= ${PREFIX}/lib/R/lib |
40 |
USE_LDCONFIG= ${PREFIX}/lib/R/lib |
36 |
CONFIGURE_ARGS= --disable-java --enable-memory-profiling rdocdir=${DOCSDIR} |
|
|
37 |
INSTALL_TARGET= install-strip |
38 |
|
41 |
|
39 |
OPTIONS_DEFINE= DOCS ICU INFO LETTER LIBR LDOUBLE LTO MISSING NLS \ |
42 |
OPTIONS_DEFINE= DOCS ICU INFO LETTER LDOUBLE NLS X11 |
40 |
OPENMP THREADS X11 |
43 |
OPTIONS_GROUP= NEEDGCC NEEDX11 |
41 |
OPTIONS_GROUP= NEEDX11 |
44 |
OPTIONS_GROUP_NEEDGCC= LTO OPENMP |
42 |
OPTIONS_GROUP_NEEDX11= GHOSTSCRIPT JPEG CAIROPANGO PDF PNG TCLTK TIFF |
45 |
OPTIONS_GROUP_NEEDX11= GHOSTSCRIPT JPEG CAIROPANGO PDF PNG TCLTK TIFF |
43 |
OPTIONS_SINGLE= BLAS |
46 |
OPTIONS_RADIO= BLAS |
44 |
OPTIONS_SINGLE_BLAS= ATLAS OPENBLAS NETLIB RBLAS |
47 |
OPTIONS_RADIO_BLAS= ATLAS OPENBLAS NETLIB RBLAS |
45 |
|
48 |
|
46 |
OPTIONS_SUB= YES |
49 |
OPTIONS_SUB= YES |
47 |
|
50 |
|
48 |
ATLAS_DESC= ATLAS BLAS implementation |
51 |
ATLAS_DESC= ATLAS BLAS implementation |
49 |
GHOSTSCRIPT_DESC= Graphics Device for Bitmap Files via Ghostscript |
52 |
GHOSTSCRIPT_DESC= Graphics device for bitmap files via Ghostscript |
50 |
CAIROPANGO_DESC= Cairo graphics device and Pango multi-language text |
53 |
CAIROPANGO_DESC= Cairo graphics device and Pango multi-language text |
51 |
INFO_DESC= GNU info manuals |
54 |
INFO_DESC= GNU info manuals |
52 |
JPEG_DESC= JPEG graphics device |
55 |
JPEG_DESC= JPEG graphics device |
53 |
LDOUBLE_DESC= Enable long double data type |
56 |
LDOUBLE_DESC= Enable long double data type |
54 |
LETTER_DESC= US Letter paper |
57 |
LETTER_DESC= US letter paper |
55 |
LIBR_DESC= Build dynamic (shared) R library |
58 |
LTO_DESC= Use Link Time Optimization |
56 |
LTO_DESC= Try to produce faster code through LTO |
59 |
NEEDGCC_DESC= Require GCC |
57 |
MISSING_DESC= Use libmissing rather than libquadmath |
60 |
NEEDX11_DESC= Require X11 |
58 |
NEEDX11_DESC= X11-Implying Options |
|
|
59 |
NETLIB_DESC= Netlib BLAS implementation |
61 |
NETLIB_DESC= Netlib BLAS implementation |
60 |
OPENBLAS_DESC= OpenBLAS BLAS implementation |
62 |
OPENBLAS_DESC= OpenBLAS BLAS implementation |
61 |
PDF_DESC= PDF manuals (requires TeX) |
63 |
PDF_DESC= PDF manuals (requires TeX) |
Lines 63-81
Link Here
|
63 |
RBLAS_DESC= Use R-bundled BLAS implementation |
65 |
RBLAS_DESC= Use R-bundled BLAS implementation |
64 |
X11_DESC= X11 graphics device |
66 |
X11_DESC= X11 graphics device |
65 |
|
67 |
|
66 |
OPTIONS_DEFAULT= GHOSTSCRIPT ICU INFO JPEG LTO LIBR OPENBLAS OPENMP \ |
68 |
OPTIONS_DEFAULT= CAIROPANGO GHOSTSCRIPT ICU INFO JPEG LDOUBLE PNG RBLAS \ |
67 |
CAIROPANGO PNG TCLTK TIFF THREADS X11 |
69 |
TCLTK TIFF X11 |
68 |
|
70 |
|
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 |
71 |
ATLAS_USES= blaslapack:atlas |
75 |
.if defined(BATCH) || defined(PACKAGE_BUILDING) |
72 |
ATLAS_VARS= MANUAL_PACKAGE_BUILD=\ |
76 |
ATLAS_IGNORE= Choose a BLAS option other than ATLAS for package building. |
73 |
"Choose a BLAS option other than ATLAS for package building." |
77 |
.endif |
|
|
78 |
|
74 |
|
|
|
75 |
CAIROPANGO_IMPLIES= X11 |
76 |
CAIROPANGO_CONFIGURE_WITH=cairo |
77 |
CAIROPANGO_USES= gettext jpeg pkgconfig |
78 |
CAIROPANGO_USE= gnome=pango,cairo |
79 |
|
79 |
DOCS_BUILD_DEPENDS= texi2any:print/texinfo |
80 |
DOCS_BUILD_DEPENDS= texi2any:print/texinfo |
80 |
|
81 |
|
81 |
GHOSTSCRIPT_IMPLIES= X11 |
82 |
GHOSTSCRIPT_IMPLIES= X11 |
Lines 90-113
Link Here
|
90 |
|
91 |
|
91 |
JPEG_IMPLIES= X11 |
92 |
JPEG_IMPLIES= X11 |
92 |
JPEG_CONFIGURE_WITH= jpeglib |
93 |
JPEG_CONFIGURE_WITH= jpeglib |
|
|
94 |
JPEG_CONFIGURE_ENV= r_cv_header_jpeglib_h=yes |
95 |
JPEG_USES= jpeg |
93 |
|
96 |
|
94 |
LETTER_CONFIGURE_ENV= R_PAPERSIZE=letter |
97 |
LETTER_CONFIGURE_ENV= R_PAPERSIZE=letter |
95 |
|
98 |
|
96 |
LIBR_CONFIGURE_ENABLE= R-shlib |
|
|
97 |
|
98 |
LDOUBLE_CONFIGURE_ENABLE=long-double |
99 |
LDOUBLE_CONFIGURE_ENABLE=long-double |
99 |
|
100 |
|
100 |
LTO_CONFIGURE_ENABLE= lto |
101 |
LTO_CONFIGURE_ENABLE= lto |
|
|
102 |
LTO_USE= GCC |
101 |
|
103 |
|
102 |
.for i in acos asin atan cos cosh exp log pow sin sinh tan tanh |
|
|
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 |
|
111 |
NETLIB_USES= blaslapack:netlib |
104 |
NETLIB_USES= blaslapack:netlib |
112 |
|
105 |
|
113 |
NLS_CONFIGURE_OFF= --disable-nls |
106 |
NLS_CONFIGURE_OFF= --disable-nls |
Lines 116-127
Link Here
|
116 |
OPENBLAS_USES= blaslapack:openblas |
109 |
OPENBLAS_USES= blaslapack:openblas |
117 |
|
110 |
|
118 |
OPENMP_CONFIGURE_ENABLE=openmp |
111 |
OPENMP_CONFIGURE_ENABLE=openmp |
|
|
112 |
OPENMP_USES= compiler:openmp |
119 |
|
113 |
|
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 |
114 |
PDF_IMPLIES= DOCS X11 |
126 |
PDF_USE= tex=dvipsk:build,kpathsea:build,pdftex:build |
115 |
PDF_USE= tex=dvipsk:build,kpathsea:build,pdftex:build |
127 |
PDF_INSTALL_TARGET= install-pdf |
116 |
PDF_INSTALL_TARGET= install-pdf |
Lines 136-150
Link Here
|
136 |
RBLAS_CONFIGURE_ON= --without-blas \ |
125 |
RBLAS_CONFIGURE_ON= --without-blas \ |
137 |
--without-lapack |
126 |
--without-lapack |
138 |
RBLAS_CONFIGURE_OFF= --with-blas="-L${LOCALBASE}/lib ${BLASLIB}" \ |
127 |
RBLAS_CONFIGURE_OFF= --with-blas="-L${LOCALBASE}/lib ${BLASLIB}" \ |
139 |
--with-lapack="${LAPACKLIB}" |
128 |
--with-lapack="${LAPACKLIB}" \ |
|
|
129 |
--enable-BLAS-shlib \ |
130 |
--enable-memory-profiling |
140 |
|
131 |
|
141 |
TCLTK_IMPLIES= X11 |
132 |
TCLTK_IMPLIES= X11 |
142 |
TCLTK_USES= tcl tk:84+ |
133 |
TCLTK_USES= tcl tk:84+ |
143 |
TCLTK_CONFIGURE_WITH= tcltk |
134 |
TCLTK_CONFIGURE_WITH= tcltk |
144 |
|
135 |
|
145 |
THREADS_CONFIGURE_ON= --enable-threads=posix |
|
|
146 |
THREADS_CONFIGURE_OFF= --disable-threads |
147 |
|
148 |
TIFF_IMPLIES= X11 |
136 |
TIFF_IMPLIES= X11 |
149 |
TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff |
137 |
TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff |
150 |
TIFF_CONFIGURE_WITH= libtiff |
138 |
TIFF_CONFIGURE_WITH= libtiff |
Lines 160-228
Link Here
|
160 |
RBLAS_SOVERSION="${RBLAS_SOVERSION}" \ |
148 |
RBLAS_SOVERSION="${RBLAS_SOVERSION}" \ |
161 |
RLAPACK_SOVERSION="${RLAPACK_SOVERSION}" |
149 |
RLAPACK_SOVERSION="${RLAPACK_SOVERSION}" |
162 |
|
150 |
|
163 |
.include "compiler.mk" |
|
|
164 |
.include <bsd.port.options.mk> |
151 |
.include <bsd.port.options.mk> |
165 |
|
152 |
|
166 |
.if ${OSVERSION} > 1000052 && \ |
153 |
.if ${OSVERSION} < 1000015 |
167 |
(${ARCH} == amd64 || ${ARCH} == i386 || ${ARCH} == ia64 || ${ARCH} == pc98 || \ |
154 |
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 |
155 |
.endif |
174 |
|
156 |
|
175 |
post-patch: |
157 |
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'\ |
158 |
@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|g'\ |
211 |
${WRKSRC}/src/nmath/standalone/Makefile.in \ |
159 |
${WRKSRC}/src/nmath/standalone/Makefile.in \ |
212 |
${WRKSRC}/src/unix/Makefile.in |
160 |
${WRKSRC}/src/unix/Makefile.in |
213 |
@${REINPLACE_CMD} -e "s|/usr/local|${LOCALBASE}|g" \ |
161 |
@${REINPLACE_CMD} -e "s|/usr/local|${LOCALBASE}|g" \ |
214 |
${WRKSRC}/configure \ |
162 |
${WRKSRC}/configure |
215 |
${WRKSRC}/src/library/profile/Rprofile.unix \ |
|
|
216 |
${WRKSRC}/src/scripts/javareconf.in |
217 |
|
163 |
|
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: |
164 |
post-install: |
227 |
.for L in R Rblas Rlapack |
165 |
.for L in R Rblas Rlapack |
228 |
@if [ -d ${STAGEDIR}${PREFIX}/lib/R/lib ] ; then \ |
166 |
@if [ -d ${STAGEDIR}${PREFIX}/lib/R/lib ] ; then \ |