pkgsrc-Changes archive

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

CVS commit: pkgsrc/math/R



Module Name:    pkgsrc
Committed By:   rumko
Date:           Fri Oct  6 20:47:37 UTC 2017

Modified Files:
        pkgsrc/math/R: Makefile distinfo
Added Files:
        pkgsrc/math/R/patches: patch-configure.ac patch-m4_R.m4
Removed Files:
        pkgsrc/math/R/patches: patch-ac

Log Message:
math/R: better fix for fbsd

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

Oked @joerg


To generate a diff of this commit:
cvs rdiff -u -r1.175 -r1.176 pkgsrc/math/R/Makefile
cvs rdiff -u -r1.75 -r1.76 pkgsrc/math/R/distinfo
cvs rdiff -u -r1.39 -r0 pkgsrc/math/R/patches/patch-ac
cvs rdiff -u -r0 -r1.1 pkgsrc/math/R/patches/patch-configure.ac \
    pkgsrc/math/R/patches/patch-m4_R.m4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/math/R/Makefile
diff -u pkgsrc/math/R/Makefile:1.175 pkgsrc/math/R/Makefile:1.176
--- pkgsrc/math/R/Makefile:1.175        Sun Sep 10 20:36:56 2017
+++ pkgsrc/math/R/Makefile      Fri Oct  6 20:47:37 2017
@@ -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 @@ INSTALL_TARGET=               install install-info
 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+=     --with-system-xz
 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 @@ BUILDLINK_API_DEPENDS.bzip2+=       bzip2>=1.0
 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

Index: pkgsrc/math/R/distinfo
diff -u pkgsrc/math/R/distinfo:1.75 pkgsrc/math/R/distinfo:1.76
--- pkgsrc/math/R/distinfo:1.75 Sat Mar 11 09:50:34 2017
+++ pkgsrc/math/R/distinfo      Fri Oct  6 20:47:37 2017
@@ -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

Added files:

Index: pkgsrc/math/R/patches/patch-configure.ac
diff -u /dev/null pkgsrc/math/R/patches/patch-configure.ac:1.1
--- /dev/null   Fri Oct  6 20:47:37 2017
+++ pkgsrc/math/R/patches/patch-configure.ac    Fri Oct  6 20:47:37 2017
@@ -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.
+ 
+@@ -290,7 +291,7 @@ AC_ARG_ENABLE([BLAS-shlib],
+ 
+ ## 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=
+@@ -689,7 +690,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*)
+@@ -1376,7 +1377,7 @@ rm -f libconftest${DYLIB_EXT} conftest.c
+     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)
+@@ -1472,6 +1473,12 @@ rm -f libconftest${DYLIB_EXT} conftest.c
+     ;;
+   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"
+@@ -1514,22 +1521,22 @@ rm -f libconftest${DYLIB_EXT} conftest.c
+   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.    
+@@ -1584,7 +1591,7 @@ R_SH_VAR_ADD(MAIN_LDFLAGS, [${main_ldfla
+ : ${CPICFLAGS="${cpicflags}"}
+ if test -z "${CPICFLAGS}"; then
+   case "${host_os}" in
+-    aix*|irix*|mingw*|osf*)
++    aix*|irix*|mingw*|osf*|darwin*)
+       ;;
+     *)
+       AC_MSG_WARN([I could not determine CPICFLAGS.])
+@@ -1667,10 +1674,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.
+@@ -2582,7 +2589,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=
Index: pkgsrc/math/R/patches/patch-m4_R.m4
diff -u /dev/null pkgsrc/math/R/patches/patch-m4_R.m4:1.1
--- /dev/null   Fri Oct  6 20:47:37 2017
+++ pkgsrc/math/R/patches/patch-m4_R.m4 Fri Oct  6 20:47:37 2017
@@ -0,0 +1,48 @@
+$NetBSD: patch-m4_R.m4,v 1.1 2017/10/06 20:47:37 rumko Exp $
+
+Ensure tests for clog & co. fail, not just emit warning
+
+--- m4/R.m4.orig       2017-01-05 23:15:05.000000000 +0000
++++ m4/R.m4
+@@ -226,7 +226,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
+@@ -1015,6 +1015,9 @@ ${F77} ${FFLAGS} -c conftestf.f 1>&AS_ME
+ 
+ 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];
+@@ -1107,6 +1110,9 @@ typedef struct {
+ 
+ extern void F77_SYMBOL(cftest)(Rcomplex *x);
+ 
++int MAIN_ () { return 0; }
++int MAIN__ () { return 0; }
++
+ int main () {
+     Rcomplex z[3];
+ 
+@@ -3639,9 +3645,9 @@ R_CHECK_FUNCS([cabs carg cexp clog csqrt
+ AC_DEFUN([R_CHECK_DECL],
+ [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])dnl
+ AC_CACHE_CHECK([whether $1 exists and is declared], ac_Symbol,
+-[AC_LINK_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
+-[#ifndef $1
+-  char *p = (char *) $1;
++[AC_LINK_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])
++#ifndef $1
++char *p = (char *) $1;
+ #endif
+ ])],
+                    [AS_VAR_SET(ac_Symbol, yes)],



Home | Main Index | Thread Index | Old Index