pkgsrc-Changes archive

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

Re: CVS commit: pkgsrc/math/R



Would this be better?
It does seem the necessary tests fail with this on at least my machine and the package still builds after applying it.

On Sun, Sep 10, 2017 at 10:46 PM, Joerg Sonnenberger <joerg%bec.de@localhost> wrote:
On Sun, Sep 10, 2017 at 08:36:56PM +0000, Rumko wrote:
> Module Name:  pkgsrc
> Committed By: rumko
> Date:         Sun Sep 10 20:36:56 UTC 2017
>
> Modified Files:
>       pkgsrc/math/R: Makefile
>
> Log Message:
> math/R: fix build on fbsd
>
> cpow and clog are not implemented on FreeBSD and the configure checks only
> emit warnings instead of errors.

Can you please try harder to make the configure check fail? Depending on
what they do, a global variable for the value is enough to ensure that
the compiler won't optimize away the call. The problem with changes like
this is that they get stale very easily.

Joerg

diff --git a/math/R/distinfo b/math/R/distinfo
index 18837d41151..151a63863a6 100644
--- a/math/R/distinfo
+++ b/math/R/distinfo
@@ -4,7 +4,7 @@ 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-ac) = f423076519749911a794b53a7fd50c8dde16f824
 SHA1 (patch-ad) = a43b4875a2ee4677b5f762abf3f9a623fd12cbb5
 SHA1 (patch-src_include_GraphicsBase.h) = eed25eaca982ca76bf75d199dd8bf48be2a99ac5
 SHA1 (patch-src_library_stats_src_Makefile.in) = 4eb93292858392792c37a706399e2cef91821bbe
diff --git a/math/R/patches/patch-ac b/math/R/patches/patch-ac
index c55f7ddcdf4..28dd371f9e6 100644
--- a/math/R/patches/patch-ac
+++ b/math/R/patches/patch-ac
@@ -3,10 +3,13 @@ $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.
+Use global variables in checks for math functions with
+complex args so that compiling them emits an error instead
+of a warning.
 
---- configure.orig     2016-07-26 00:32:06.000000000 +0000
+--- configure.orig     2017-02-26 23:17:05.000000000 +0000
 +++ configure
-@@ -3896,7 +3896,7 @@ fi
+@@ -3899,7 +3899,7 @@ fi
  
  ## As from R 3.2.0 split up -L... and -lR
  if test "${want_R_shlib}" = yes; then
@@ -15,7 +18,7 @@ Fix texi2any version check.
    LIBR1=-lR
  else
    LIBR0=
-@@ -5076,7 +5076,7 @@ if test -z "${texi2any_version_maj}" \
+@@ -5079,7 +5079,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 \
@@ -24,7 +27,7 @@ Fix texi2any version check.
    r_cv_prog_texi2any_v5=no
  else
    r_cv_prog_texi2any_v5=yes
-@@ -22376,7 +22376,7 @@ case "${host_os}" in
+@@ -22384,7 +22384,7 @@ case "${host_os}" in
      ## Not so bad in later versions of Darwin,
      ## where DYLD_FALLBACK_LIBRARY_PATH is used (see below).
      ;;
@@ -33,7 +36,7 @@ Fix texi2any version check.
      for arg in ${LDFLAGS}; do
        case "${arg}" in
          -L*)
-@@ -24958,6 +24958,11 @@ fi
+@@ -24966,6 +24966,11 @@ fi
          done
          ;;
        -[lLR]*)
@@ -45,7 +48,7 @@ Fix texi2any version check.
            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
+@@ -25931,6 +25936,9 @@ cat > conftest.c <<EOF
  
  extern void F77_SYMBOL(cftest)(int *a, int *b, double *x, double *y);
  
@@ -55,7 +58,7 @@ Fix texi2any version check.
  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 {
+@@ -26026,6 +26034,9 @@ typedef struct {
  
  extern void F77_SYMBOL(cftest)(Rcomplex *x);
  
@@ -65,7 +68,7 @@ Fix texi2any version check.
  int main () {
      Rcomplex z[3];
  
-@@ -28175,7 +28186,7 @@ $as_echo "$as_me: WARNING: Use of flat n
+@@ -28186,7 +28197,7 @@ $as_echo "$as_me: WARNING: Use of flat n
      fpicflags="${darwin_pic}"
      shlib_cxxldflags="${shlib_ldflags}"
      ;;
@@ -74,7 +77,7 @@ Fix texi2any version check.
      ## 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
+@@ -28282,6 +28293,12 @@ $as_echo "$as_me: WARNING: Use of flat n
      ;;
    netbsd*)
      ## See the comments about FreeBSD
@@ -87,7 +90,7 @@ Fix texi2any version check.
      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
+@@ -28324,22 +28341,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.
@@ -114,7 +117,7 @@ Fix texi2any version check.
        cpicflags="-KPIC"
        if test "`basename ${CXX}`" = "CC" ; then
          ## Forte version 7 needs -lCstd: Forte 6 does not.
-@@ -28389,7 +28406,7 @@ fi
+@@ -28400,7 +28417,7 @@ fi
  : ${CPICFLAGS="${cpicflags}"}
  if test -z "${CPICFLAGS}"; then
    case "${host_os}" in
@@ -123,7 +126,7 @@ Fix texi2any version check.
        ;;
      *)
        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: I could not determine CPICFLAGS." >&5
-@@ -28489,10 +28506,10 @@ case "${host_os}" in
+@@ -28500,10 +28517,10 @@ case "${host_os}" in
      DYLIB_EXT=".dylib"
      dylib_ldflags="${darwin_dylib_ldflags}"
      MAJR_VERSION=`echo "${PACKAGE_VERSION}" | sed  -e "s/[\.][1-9]$/.0/"`
@@ -137,7 +140,7 @@ Fix texi2any version check.
      ;;
    hpux*)
      ## Needs to avoid embedding a relative path ../../../bin.
-@@ -29106,6 +29123,14 @@ _ACEOF
+@@ -29117,6 +29134,14 @@ _ACEOF
  ## Cygwin had rintl but not nearbyintl
  for ac_func in expm1 hypot log1p log1pl log2 log10 nearbyint nearbyintl powl rint rintl
  do
@@ -152,7 +155,7 @@ Fix texi2any version check.
  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
+@@ -29126,24 +29151,12 @@ else
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  #include <math.h>
@@ -179,7 +182,26 @@ Fix texi2any version check.
  }
  _ACEOF
  if ac_fn_c_try_link "$LINENO"; then :
-@@ -32092,6 +32105,14 @@ cat > conftest.c <<EOF
+@@ -31380,13 +31393,14 @@ else
+    int F77_DUMMY_MAIN() { return 1; }
+ 
+ #endif
+-int
+-main ()
+-{
++
+ #ifndef $ac_func
+-  char *p = (char *) $ac_func;
++char *p = (char *) $ac_func;
+ #endif
+ 
++int
++main ()
++{
+   ;
+   return 0;
+ }
+@@ -32103,6 +32117,14 @@ cat > conftest.c <<EOF
  # define F77_SYMBOL(x)   x
  #endif
  extern void F77_SYMBOL(test1)(int *iflag);
@@ -194,7 +216,7 @@ Fix texi2any version check.
  
  int main () {
    int iflag;
-@@ -32157,6 +32178,15 @@ else
+@@ -32168,6 +32190,15 @@ else
  #else
  # define F77_SYMBOL(x)   x
  #endif
@@ -210,7 +232,7 @@ Fix texi2any version check.
  void F77_SYMBOL(xerbla)(char *srname, int *info)
  {}
  void blas_set () {
-@@ -41516,7 +41546,7 @@ case "${host_os}" in
+@@ -41528,7 +41559,7 @@ case "${host_os}" in
      r_ld_library_defaults="/usr/lib64:/lib64:/usr/lib:/lib"
      ;;
    solaris*)


Home | Main Index | Thread Index | Old Index