pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/math/R math/R: better fix for fbsd



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c2dd85459296
branches:  trunk
changeset: 369852:c2dd85459296
user:      rumko <rumko%pkgsrc.org@localhost>
date:      Fri Oct 06 20:47:37 2017 +0000

description:
math/R: better fix for fbsd

Also move fixes from configure to configure.ac
m4/R.m4 fix by @joerg

Oked @joerg

diffstat:

 math/R/Makefile                   |   10 +-
 math/R/distinfo                   |    5 +-
 math/R/patches/patch-ac           |  221 --------------------------------------
 math/R/patches/patch-configure.ac |  114 +++++++++++++++++++
 math/R/patches/patch-m4_R.m4      |   48 ++++++++
 5 files changed, 170 insertions(+), 228 deletions(-)

diffs (truncated from 451 to 300 lines):

diff -r b834db4d1ef9 -r c2dd85459296 math/R/Makefile
--- a/math/R/Makefile   Fri Oct 06 19:25:20 2017 +0000
+++ b/math/R/Makefile   Fri Oct 06 20:47:37 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.175 2017/09/10 20:36:56 rumko Exp $
+# $NetBSD: Makefile,v 1.176 2017/10/06 20:47:37 rumko Exp $
 
 DISTNAME=              R-3.3.3
 PKGREVISION=           2
@@ -21,6 +21,7 @@
 TEST_TARGET=           check
 USE_TOOLS+=            gmake gzip:run makeinfo perl:run sed unzip:run xmkmf
 USE_TOOLS+=            pkg-config
+USE_TOOLS+=            aclocal autoconf autoreconf automake
 USE_LANGUAGES=         c c++ fortran
 USE_LIBTOOL=           yes
 TEXINFO_REQD=          5.1
@@ -46,10 +47,6 @@
 CONFIGURE_ARGS+=       --enable-long-double=no
 .endif
 
-# cpow and clog are not implemented on FreeBSD
-CONFIGURE_ENV.FreeBSD+=        ac_cv_have_decl_clog=no
-CONFIGURE_ENV.FreeBSD+=        ac_cv_have_decl_cpow=no
-
 .if ${OPSYS} != "Linux"
 USE_GNU_ICONV=         yes             # latin1 support, iconvlist
 .endif
@@ -141,6 +138,9 @@
 CONFIGURE_ARGS+=       --enable-mbcs=no
 .endif
 
+pre-configure:
+       ${RUN} cd ${WRKSRC} && autoreconf -fvi
+
 # Fix library names.  Relies on build system using -headerpad_max_install_names.
 .if ${OPSYS} == "Darwin"
 .PHONY: fix-darwin-install-name
diff -r b834db4d1ef9 -r c2dd85459296 math/R/distinfo
--- a/math/R/distinfo   Fri Oct 06 19:25:20 2017 +0000
+++ b/math/R/distinfo   Fri Oct 06 20:47:37 2017 +0000
@@ -1,11 +1,12 @@
-$NetBSD: distinfo,v 1.75 2017/03/11 09:50:34 wen Exp $
+$NetBSD: distinfo,v 1.76 2017/10/06 20:47:37 rumko Exp $
 
 SHA1 (R-3.3.3.tar.gz) = 9e205a817970578ecd80384f397bae35b46f13b9
 RMD160 (R-3.3.3.tar.gz) = 5f0d3aa3cf26132ac8774d2589083a12493c18ad
 SHA512 (R-3.3.3.tar.gz) = bcb0d92fc0b22c13e345a2f660e3b3cc5810f6a07c8f2e37949c81308c2b8a5edc322df0394ece563888645442b6c01a3e1e7005aa60bd9beacc718200829e75
 Size (R-3.3.3.tar.gz) = 29804326 bytes
-SHA1 (patch-ac) = 68c1943a352e6f8b2842331578ed746b1ac27bea
 SHA1 (patch-ad) = a43b4875a2ee4677b5f762abf3f9a623fd12cbb5
+SHA1 (patch-configure.ac) = c3e77e8f7bf784a269d09c937ab1997ef701aa81
+SHA1 (patch-m4_R.m4) = 704d5514e10adf0b5217bb71b06f44a612eca6e0
 SHA1 (patch-src_include_GraphicsBase.h) = eed25eaca982ca76bf75d199dd8bf48be2a99ac5
 SHA1 (patch-src_library_stats_src_Makefile.in) = 4eb93292858392792c37a706399e2cef91821bbe
 SHA1 (patch-src_main_character.c) = 1271cbd68ec57e28cf6a394398d21d6a18b6760b
diff -r b834db4d1ef9 -r c2dd85459296 math/R/patches/patch-ac
--- a/math/R/patches/patch-ac   Fri Oct 06 19:25:20 2017 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,221 +0,0 @@
-$NetBSD: patch-ac,v 1.39 2016/07/26 04:53:33 wen Exp $
-
-Do not include system paths in R_LD_LIBRARY_PATH.
-FreeBSD 10 is not FreeBSD 1.
-Fix texi2any version check.
-
---- configure.orig     2016-07-26 00:32:06.000000000 +0000
-+++ configure
-@@ -3896,7 +3896,7 @@ fi
- 
- ## As from R 3.2.0 split up -L... and -lR
- if test "${want_R_shlib}" = yes; then
--  LIBR0="-L\$(R_HOME)/lib\$(R_ARCH)"
-+  LIBR0="-Wl,-R${prefix}/lib/R/lib\$(R_ARCH) -L\$(R_HOME)/lib\$(R_ARCH)"
-   LIBR1=-lR
- else
-   LIBR0=
-@@ -5076,7 +5076,7 @@ if test -z "${texi2any_version_maj}" \
- elif test ${texi2any_version_maj} -gt 5; then
-   r_cv_prog_texi2any_v5=yes
- elif test ${texi2any_version_maj} -lt 5 \
--     || test ${texi2any_version_min} -lt 1; then
-+     || test ${texi2any_version_maj} = 5 -a ${texi2any_version_min} -lt 1; then
-   r_cv_prog_texi2any_v5=no
- else
-   r_cv_prog_texi2any_v5=yes
-@@ -22376,7 +22376,7 @@ case "${host_os}" in
-     ## Not so bad in later versions of Darwin,
-     ## where DYLD_FALLBACK_LIBRARY_PATH is used (see below).
-     ;;
--  *)
-+  donotuse*)
-     for arg in ${LDFLAGS}; do
-       case "${arg}" in
-         -L*)
-@@ -24958,6 +24958,11 @@ fi
-         done
-         ;;
-       -[lLR]*)
-+           case $ac_arg in
-+           -R*)
-+               ac_arg="${wl}$ac_arg"
-+               ;;
-+           esac
-           ac_exists=false
-   for ac_i in $ac_cv_f77_libs; do
-     if test x"$ac_arg" = x"$ac_i"; then
-@@ -25923,6 +25928,9 @@ cat > conftest.c <<EOF
- 
- extern void F77_SYMBOL(cftest)(int *a, int *b, double *x, double *y);
- 
-+int MAIN_ () { return 0; }
-+int MAIN__ () { return 0; }
-+
- int main () {
-   int a[3] = {17, 237, 2000000000}, b[2], res = 0;
-   double x[3] = {3.14159265, 123.456789, 2.3e34}, z[3];
-@@ -26018,6 +26026,9 @@ typedef struct {
- 
- extern void F77_SYMBOL(cftest)(Rcomplex *x);
- 
-+int MAIN_ () { return 0; }
-+int MAIN__ () { return 0; }
-+
- int main () {
-     Rcomplex z[3];
- 
-@@ -28175,7 +28186,7 @@ $as_echo "$as_me: WARNING: Use of flat n
-     fpicflags="${darwin_pic}"
-     shlib_cxxldflags="${shlib_ldflags}"
-     ;;
--  freebsd*)
-+  freebsd*|dragonfly*)
-     ## maybe this needs to depend on the compiler:
-     ## -export-dynamic used to work, but does not with clang.
-     ## Seems FreeBSD has used the GNU linker since at least 3.0 (Oct 1998)
-@@ -28271,6 +28282,12 @@ $as_echo "$as_me: WARNING: Use of flat n
-     ;;
-   netbsd*)
-     ## See the comments about FreeBSD
-+    fpicflags="-fPIC"
-+      case "${host_cpu}" in
-+        powerpc*)
-+        cpicflags="-fPIC"
-+        ;;
-+      esac
-     if ${CPP} - -dM < /dev/null | grep __ELF__ >/dev/null ; then
-       main_ldflags="-Wl,--export-dynamic"
-       shlib_ldflags="-shared"
-@@ -28313,22 +28330,22 @@ $as_echo "$as_me: WARNING: Use of flat n
-   solaris*)
- ## SPARC has only an 8k global object table, 1024 entries on 64-bit,
- ## so need PIC not pic.  They are the same on other Solaris platforms.
--    shlib_ldflags="-G"
--    shlib_cxxldflags="-G"
-    if test "${GCC}" = yes; then
-+      shlib_ldflags="-shared"
-+      shlib_cxxldflags="-shared"
-       cpicflags="-fPIC"
-       ld=`${CC} -print-prog-name=ld`
-       ldoutput=`${ld} -v 2>&1 | grep GNU`
-       if test -n "${ldoutput}"; then
-       main_ldflags="-Wl,-export-dynamic"
--      shlib_ldflags="-shared"
--        shlib_cxxldflags="-shared"
-       else
-         ## it seems gcc c 4.6.2 needs this with Solaris linker
-       shlib_ldflags="-shared"
-         shlib_cxxldflags="-shared"
-       fi
-     else
-+      shlib_ldflags="-G"
-+      shlib_cxxldflags="-G"
-       cpicflags="-KPIC"
-       if test "`basename ${CXX}`" = "CC" ; then
-         ## Forte version 7 needs -lCstd: Forte 6 does not.
-@@ -28389,7 +28406,7 @@ fi
- : ${CPICFLAGS="${cpicflags}"}
- if test -z "${CPICFLAGS}"; then
-   case "${host_os}" in
--    aix*|irix*|mingw*|osf*)
-+    aix*|irix*|mingw*|osf*|darwin*)
-       ;;
-     *)
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: I could not determine CPICFLAGS." >&5
-@@ -28489,10 +28506,10 @@ case "${host_os}" in
-     DYLIB_EXT=".dylib"
-     dylib_ldflags="${darwin_dylib_ldflags}"
-     MAJR_VERSION=`echo "${PACKAGE_VERSION}" | sed  -e "s/[\.][1-9]$/.0/"`
--    LIBR_LDFLAGS="-install_name libR.dylib -compatibility_version ${MAJR_VERSION}  -current_version ${PACKAGE_VERSION}  -headerpad_max_install_names"
--    RLAPACK_LDFLAGS="-install_name libRlapack.dylib -compatibility_version ${MAJR_VERSION} -current_version ${PACKAGE_VERSION}  -headerpad_max_install_names"
-+    LIBR_LDFLAGS="-install_name ${PREFIX}/lib/R/lib/libR.dylib -compatibility_version ${MAJR_VERSION}  -current_version ${PACKAGE_VERSION}  -headerpad_max_install_names"
-+    RLAPACK_LDFLAGS="-install_name ${PREFIX}/lib/R/lib/libRlapack.dylib -compatibility_version ${MAJR_VERSION} -current_version ${PACKAGE_VERSION}  -headerpad_max_install_names"
-     ## don't use version in libRblas so we can replace it with any BLAS implementation
--    RBLAS_LDFLAGS="-install_name libRblas.dylib -headerpad_max_install_names"
-+    RBLAS_LDFLAGS="-install_name ${PREFIX}/lib/R/lib/libRblas.dylib -headerpad_max_install_names"
-     ;;
-   hpux*)
-     ## Needs to avoid embedding a relative path ../../../bin.
-@@ -29106,6 +29123,14 @@ _ACEOF
- ## Cygwin had rintl but not nearbyintl
- for ac_func in expm1 hypot log1p log1pl log2 log10 nearbyint nearbyintl powl rint rintl
- do
-+case $ac_func in
-+expm1|log1p|log2|log10|nearbyint|nearbyintl|rint|rintl)
-+    args="x"
-+    ;;
-+hypot|powl)
-+    args="x,x"
-+    ;;
-+esac
- as_ac_Symbol=`$as_echo "ac_cv_have_decl_$ac_func" | $as_tr_sh`
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_func exists and is declared" >&5
- $as_echo_n "checking whether $ac_func exists and is declared... " >&6; }
-@@ -29115,24 +29140,12 @@ else
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #include <math.h>
-+volatile long double x;
- 
--#ifdef F77_DUMMY_MAIN
--
--#  ifdef __cplusplus
--     extern "C"
--#  endif
--   int F77_DUMMY_MAIN() { return 1; }
--
--#endif
- int
- main ()
- {
--#ifndef $ac_func
--  char *p = (char *) $ac_func;
--#endif
--
--  ;
--  return 0;
-+  return $ac_func($args);;;
- }
- _ACEOF
- if ac_fn_c_try_link "$LINENO"; then :
-@@ -32092,6 +32105,14 @@ cat > conftest.c <<EOF
- # define F77_SYMBOL(x)   x
- #endif
- extern void F77_SYMBOL(test1)(int *iflag);
-+ifdef F77_DUMMY_MAIN
-+
-+#  ifdef __cplusplus
-+     extern "C"
-+#  endif
-+   int F77_DUMMY_MAIN() { return 1; }
-+
-+#endif
- 
- int main () {
-   int iflag;
-@@ -32157,6 +32178,15 @@ else
- #else
- # define F77_SYMBOL(x)   x
- #endif
-+#ifdef F77_DUMMY_MAIN
-+
-+#  ifdef __cplusplus
-+     extern "C"
-+#  endif
-+   int F77_DUMMY_MAIN() { return 1; }
-+
-+#endif
-+
- void F77_SYMBOL(xerbla)(char *srname, int *info)
- {}
- void blas_set () {
-@@ -41516,7 +41546,7 @@ case "${host_os}" in
-     r_ld_library_defaults="/usr/lib64:/lib64:/usr/lib:/lib"
-     ;;
-   solaris*)
--    r_ld_library_defaults="/usr/lib:/lib"
-+    r_ld_library_defaults="/usr/lib:/lib:/usr/lib/amd64:/lib/amd64:/usr/lib/64:/lib/64"
-     ;;
-   *)
-     r_ld_library_defaults=
diff -r b834db4d1ef9 -r c2dd85459296 math/R/patches/patch-configure.ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/R/patches/patch-configure.ac Fri Oct 06 20:47:37 2017 +0000
@@ -0,0 +1,114 @@
+$NetBSD: patch-configure.ac,v 1.1 2017/10/06 20:47:37 rumko Exp $
+
+Do not include system paths in R_LD_LIBRARY_PATH.
+NetBSD, FreeBSD, DragonFly, Darwin and Solaris fixes
+
+--- configure.ac.orig  2016-10-04 09:15:04.000000000 +0000
++++ configure.ac
+@@ -33,6 +33,7 @@ m4_define([R_VERSION],
+ AC_INIT([R],[R_VERSION],[https://bugs.r-project.org],[R],[https://www.r-project.org])
+ AC_CONFIG_SRCDIR([src/include/Defn.h])
+ AC_CONFIG_AUX_DIR([tools])
++AC_CONFIG_MACRO_DIR([m4])
+ 
+ ### * Information on the package.
+ 



Home | Main Index | Thread Index | Old Index