Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162163805
D11615.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D11615.diff
View Options
Index: head/math/R/Makefile
===================================================================
--- head/math/R/Makefile
+++ head/math/R/Makefile
@@ -3,7 +3,7 @@
PORTNAME= R
PORTVERSION= 3.4.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= math lang
MASTER_SITES= CRAN/src/base/R-${PORTVERSION:C|\..*||}
@@ -27,6 +27,7 @@
pathfix perl5 readline:port
USE_PERL5= build
+USE_LDCONFIG= ${PREFIX}/lib/R/lib
OPTIONS_DEFINE= ICU INFO LDOUBLE LETTER LIBR MEMPROF NLS RPROF X11
OPTIONS_GROUP= NEEDGCC NEEDX11
@@ -135,8 +136,15 @@
X11_CONFIGURE_WITH= x
X11_USE= xorg=ice,sm,x11,xext,xmu,xscrnsaver,xt
+LIBVER= ${PORTVERSION:R}
+PLIST_SUB= LIBVER=${LIBVER}
+
post-patch:
@${REINPLACE_CMD} -e "s|/usr/local|${LOCALBASE}|g" ${WRKSRC}/configure
+ @${REINPLACE_CMD} "s|%%LIBVER%%|${LIBVER}|" \
+ ${WRKSRC}/src/main/Makefile.in \
+ ${WRKSRC}/src/extra/blas/Makefile.in \
+ ${WRKSRC}/src/modules/lapack/Makefile.in
.include <bsd.port.pre.mk>
.include "compiler.mk"
Index: head/math/R/files/patch-src_extra_blas_Makefile.in
===================================================================
--- head/math/R/files/patch-src_extra_blas_Makefile.in
+++ head/math/R/files/patch-src_extra_blas_Makefile.in
@@ -0,0 +1,27 @@
+--- src/extra/blas/Makefile.in.orig 2017-07-16 08:46:49 UTC
++++ src/extra/blas/Makefile.in
+@@ -19,7 +19,7 @@ SOURCES = blas00.c blas.f cmplxblas.f
+ Rblas_la = libRblas$(R_DYLIB_EXT)
+ ## @RBLAS_LDFLAGS@ is used on macOS
+ ## first for internal BLAS
+-Rblas_la_LIBADD = @RBLAS_LDFLAGS@ $(FLIBS_IN_SO)
++Rblas_la_LIBADD = -Wl,-soname,libRblas.so.%%LIBVER%% $(FLIBS_IN_SO)
+ ## then external one
+ Rblas_la_LIBADD0 = @RBLAS_LDFLAGS@
+
+@@ -43,6 +43,7 @@ Rblas_install: $(Rblas_la)
+ @$(MKINSTALLDIRS) $(DESTDIR)$(Rexeclibdir)
+ @$(SHELL) $(top_srcdir)/tools/copy-if-change $(Rblas_la) \
+ $(DESTDIR)$(Rexeclibdir)/$(Rblas_la)
++ @cd $(DESTDIR)$(Rexeclibdir) && ln -s $(Rblas_la) $(Rblas_la).%%LIBVER%%
+
+ Rblas_install-strip: $(Rblas_la)
+ @$(MKINSTALLDIRS) $(DESTDIR)$(Rexeclibdir)
+@@ -50,6 +51,7 @@ Rblas_install-strip: $(Rblas_la)
+ @if test -n "$(STRIP_LIBS)"; then \
+ $(STRIP_LIBS) "$(DESTDIR)$(Rexeclibdir)/$(Rblas_la)" ;\
+ fi
++ @cd "$(DESTDIR)$(Rexeclibdir)" && ln -s $(Rblas_la) $(Rblas_la).%%LIBVER%%
+
+ mostlyclean: clean
+ clean:
Index: head/math/R/files/patch-src_main_Makefile.in
===================================================================
--- head/math/R/files/patch-src_main_Makefile.in
+++ head/math/R/files/patch-src_main_Makefile.in
@@ -0,0 +1,19 @@
+--- src/main/Makefile.in.orig 2017-07-16 08:46:49 UTC
++++ src/main/Makefile.in
+@@ -110,7 +110,7 @@ libR_la_LIBADD = $(MAIN_OBJS) $(EXTRA_STATIC_LIBS) $(
+ libR_la_DEPENDENCIES = $(STATIC_LIBS) $(R_TZONE) @WANT_R_SHLIB_TRUE@ @USE_EXPORTFILES_TRUE@ $(top_builddir)/etc/R.exp
+
+ ## The next is needed for macOS only at present
+-LIBR_LDFLAGS = @LIBR_LDFLAGS@
++LIBR_LDFLAGS = -Wl,-soname,libR.so.%%LIBVER%%
+
+
+ all: R
+@@ -200,6 +200,7 @@ install-bin: installdirs
+ install-lib: installdirs
+ @$(MKINSTALLDIRS) "$(DESTDIR)$(Rexeclibdir)"
+ @$(SHELL) $(top_srcdir)/tools/copy-if-change $(libR_la) "$(DESTDIR)$(Rexeclibdir)/$(libR_la)"
++ @cd "$(DESTDIR)$(Rexeclibdir)" && ln -s $(libR_la) $(libR_la).%%LIBVER%%
+ install-static: installdirs
+ @$(MKINSTALLDIRS) "$(DESTDIR)$(Rexeclibdir)"
+ @$(SHELL) $(top_srcdir)/tools/copy-if-change libR.a "$(DESTDIR)$(Rexeclibdir)/libR.a"
Index: head/math/R/files/patch-src_modules_lapack_Makefile.in
===================================================================
--- head/math/R/files/patch-src_modules_lapack_Makefile.in
+++ head/math/R/files/patch-src_modules_lapack_Makefile.in
@@ -0,0 +1,30 @@
+--- src/modules/lapack/Makefile.in.orig 2017-07-16 08:46:49 UTC
++++ src/modules/lapack/Makefile.in
+@@ -82,16 +82,17 @@ $(lapack_la): $(lapack_la_OBJECTS)
+ ## Include BLAS here, as with (static) ATLAS that pulls all the
+ ## BLAS routines into one place.
+ $(Rlapack_la): $(LIBOBJECTS)
+- $(DYLIB_LINK) -o $@ $(LIBOBJECTS) @RLAPACK_LDFLAGS@ @BLAS_LIBS@ $(Rlapack_la_LIBADD)
++ $(DYLIB_LINK) -o $@ $(LIBOBJECTS) -Wl,-soname,libRlapack.so.%%LIBVER%% @BLAS_LIBS@ $(Rlapack_la_LIBADD)
+
+ Rlapack_install: $(Rlapack_la)
+ @$(MKINSTALLDIRS) "$(DESTDIR)$(Rexeclibdir)"
+ @$(SHELL) $(top_srcdir)/tools/copy-if-change $(Rlapack_la) \
+ $(Rexeclibdir)/$(Rlapack_la)
+-
++ @cd $(Rexeclibdir) && ln -s $(Rlapack_la) $(Rlapack_la).%%LIBVER%%
+ install: installdirs
+ @$(SHELL) $(top_srcdir)/tools/copy-if-change $(lapack_la) "$(DESTDIR)$(Rexecmodulesdir)/$(lapack_la)"
+ @USE_EXTERNAL_LAPACK_FALSE@ @$(SHELL) $(top_srcdir)/tools/copy-if-change $(Rlapack_la) "$(DESTDIR)$(Rexeclibdir)/$(Rlapack_la)"
++@USE_EXTERNAL_LAPACK_FALSE@ @cd "$(DESTDIR)$(Rexeclibdir)" && ln -sf $(Rlapack_la) $(Rlapack_la).%%LIBVER%%
+ installdirs:
+ @$(MKINSTALLDIRS) "$(DESTDIR)$(Rexecmodulesdir)"
+ install-strip-Rlapack:
+@@ -104,6 +105,7 @@ install-strip: @USE_EXTERNAL_LAPACK_FALSE@ install-str
+ @if test -n "$(STRIP_LIBS)"; then \
+ $(STRIP_LIBS) "$(DESTDIR)$(Rexecmodulesdir)/$(lapack_la)"; \
+ fi
++ @cd "$(DESTDIR)$(Rexeclibdir)" && ln -s $(Rlapack_la) $(Rlapack_la).%%LIBVER%%
+ uninstall:
+ @rm -f "$(Rexecmodulesdir)/$(lapack_la)"
+
Index: head/math/R/pkg-plist
===================================================================
--- head/math/R/pkg-plist
+++ head/math/R/pkg-plist
@@ -101,8 +101,11 @@
lib/R/include/Rversion.h
lib/R/include/S.h
%%RBLAS%%lib/R/lib/libRblas.so
+%%RBLAS%%lib/R/lib/libRblas.so.%%LIBVER%%
%%RBLAS%%lib/R/lib/libRlapack.so
+%%RBLAS%%lib/R/lib/libRlapack.so.%%LIBVER%%
%%LIBR%%lib/R/lib/libR.so
+%%LIBR%%lib/R/lib/libR.so.%%LIBVER%%
lib/R/library/KernSmooth/DESCRIPTION
lib/R/library/KernSmooth/INDEX
lib/R/library/KernSmooth/Meta/features.rds
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 11, 11:26 AM (18 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34958523
Default Alt Text
D11615.diff (5 KB)
Attached To
Mode
D11615: math/R: set SONAME for some R libraries
Attached
Detach File
Event Timeline
Log In to Comment