Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Nov 2016 21:32:13 +0000 (UTC)
From:      Joseph Mingrone <jrm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r427398 - head/math/R
Message-ID:  <201611292132.uATLWDIt061109@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jrm
Date: Tue Nov 29 21:32:13 2016
New Revision: 427398
URL: https://svnweb.freebsd.org/changeset/ports/427398

Log:
  Fix build issue when the LTO option is enabled, do not register
  ${PREFIX}/lib/R/lib with ldconfig, and fix typo.
  
  GCC 4.9 now generates slim object files which only contain intermediate
  language representation for LTO. This means, either -ffat-lto-objects must
  be used to create files which also contain object code or gcc-ar/gcc-ranlib
  must be used to create static libraries suitable for LTO processing. This
  patch sets AR/RANLIB to gcc-ar/gcc-ranlib.
  
  The libraries under ${PREFIX}/lib/R/lib are not intended (by upstream) to
  be registered with ldconfig, but are opened by dlopen(3). This means pkg
  will not register shared library dependencies, so we will have to adjust
  and bump ports as necessary. When necessary, unfortunately, is unclear
  based on how things work upstream.
  
  Fix typo: OPENMP_USE=compiler:openmp should have been
  OPENMP_USES=compiler:openmp.
  
  Bump PORTREVISION.
  
  PR:	214785
          214666
  Reported by:	taozhenext@gmail.com (214785), dbn (214666)
  Approved by:	swills (mentor)
  Differential Revision:	https://reviews.freebsd.org/D8650

Modified:
  head/math/R/Makefile
  head/math/R/pkg-plist

Modified: head/math/R/Makefile
==============================================================================
--- head/math/R/Makefile	Tue Nov 29 21:15:41 2016	(r427397)
+++ head/math/R/Makefile	Tue Nov 29 21:32:13 2016	(r427398)
@@ -3,7 +3,7 @@
 
 PORTNAME=		R
 PORTVERSION=		3.3.2
-PORTREVISION=		5
+PORTREVISION=		6
 CATEGORIES=		math lang
 MASTER_SITES=		CRAN/src/base/R-${PORTVERSION:C|\..*||}
 
@@ -65,7 +65,7 @@ ATLAS_VARS=		MANUAL_PACKAGE_BUILD=\
 CAIROPANGO_IMPLIES=	X11
 CAIROPANGO_CONFIGURE_WITH=cairo
 CAIROPANGO_USES=	gettext jpeg pkgconfig
-CAIROPANGO_USE=		gnome=pango,cairo
+CAIROPANGO_USE=		GNOME=pango,cairo
 GHOSTSCRIPT_IMPLIES=	X11
 GHOSTSCRIPT_USES=	ghostscript
 ICU_CONFIGURE_WITH=	ICU
@@ -81,7 +81,11 @@ LDOUBLE_CONFIGURE_ENABLE=long-double
 LETTER_CONFIGURE_ENV=	R_PAPERSIZE=letter
 LIBR_CONFIGURE_ENABLE=	R-shlib
 LTO_CONFIGURE_ENABLE=	lto
-LTO_USE=		gcc=yes
+LTO_CONFIGURE_ENV=	AR="${LOCALBASE}/bin/gcc-ar${GCC_DEFAULT:S/.//g}" \
+			RANLIB="${LOCALBASE}/bin/gcc-ranlib${GCC_DEFAULT:S/.//g}"
+LTO_USE=		GCC=yes
+LTO_VARS=		BINUTILS="ADDR2LINE AS CPPFILT GPROF LD NM OBJCOPY \
+			OBJDUMP READELF SIZE STRINGS"
 MEMPROF_CONFIGURE_ENABLE=memory-profiling
 NETLIB_USES=		blaslapack:netlib
 NETLIB_CONFIGURE_ON=	--disable-BLAS-shlib
@@ -90,7 +94,7 @@ NLS_USES=		gettext
 OPENBLAS_USES=		blaslapack:openblas
 OPENBLAS_CONFIGURE_ON=	--disable-BLAS-shlib
 OPENMP_CONFIGURE_ENABLE=openmp
-OPENMP_USE=		compiler:openmp
+OPENMP_USES=		compiler:openmp
 PNG_IMPLIES=		X11
 PNG_LIB_DEPENDS=	libpng.so:graphics/png
 PNG_CONFIGURE_WITH=	libpng
@@ -115,33 +119,9 @@ TIFF_CONFIGURE_WITH=	libtiff
 X11_CONFIGURE_WITH=	x
 X11_USE=		xorg=ice,sm,x11,xext,xmu,xscrnsaver,xt
 
-R_SOVERSION=		1
-RBLAS_SOVERSION=	2
-RLAPACK_SOVERSION=	4
-
-PLIST_SUB=		R_SOVERSION="${R_SOVERSION}" \
-			RBLAS_SOVERSION="${RBLAS_SOVERSION}" \
-			RLAPACK_SOVERSION="${RLAPACK_SOVERSION}"
-
-.include <bsd.port.options.mk>
-.include "compiler.mk"
-
-.if ${PORT_OPTIONS:MLIBR} || ${PORT_OPTIONS:MRBLAS}
-USE_LDCONFIG=		${PREFIX}/lib/R/lib
-.endif
-
 post-patch:
 	@${REINPLACE_CMD} -e "s|/usr/local|${LOCALBASE}|g" ${WRKSRC}/configure
 
-## TODO: Add missing soname and soversion to shared libraries
-post-install:
-.for L in R Rblas Rlapack
-	if [ -d ${STAGEDIR}${PREFIX}/lib/R/lib ]; then \
-		cd ${STAGEDIR}${PREFIX}/lib/R/lib; \
-		if [ -f lib${L}.so ]; then \
-			${LN} -sf lib${L}.so lib${L}.so.${${L:tu}_SOVERSION}; \
-		fi; \
-	fi
-.endfor
-
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+.include "compiler.mk"
+.include <bsd.port.post.mk>

Modified: head/math/R/pkg-plist
==============================================================================
--- head/math/R/pkg-plist	Tue Nov 29 21:15:41 2016	(r427397)
+++ head/math/R/pkg-plist	Tue Nov 29 21:32:13 2016	(r427398)
@@ -101,11 +101,8 @@ lib/R/include/Rmath.h
 lib/R/include/Rversion.h
 lib/R/include/S.h
 %%RBLAS%%lib/R/lib/libRblas.so
-%%RBLAS%%lib/R/lib/libRblas.so.%%RBLAS_SOVERSION%%
 %%RBLAS%%lib/R/lib/libRlapack.so
-%%RBLAS%%lib/R/lib/libRlapack.so.%%RLAPACK_SOVERSION%%
 %%LIBR%%lib/R/lib/libR.so
-%%LIBR%%lib/R/lib/libR.so.%%R_SOVERSION%%
 lib/R/library/KernSmooth/DESCRIPTION
 lib/R/library/KernSmooth/INDEX
 lib/R/library/KernSmooth/Meta/Rd.rds



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611292132.uATLWDIt061109>