aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel/R-cran-data.table/Makefile20
-rw-r--r--devel/R-cran-data.table/files/extra-patch-src_Makevars10
2 files changed, 26 insertions, 4 deletions
diff --git a/devel/R-cran-data.table/Makefile b/devel/R-cran-data.table/Makefile
index 0c2c02a0a148..5f525fb9c468 100644
--- a/devel/R-cran-data.table/Makefile
+++ b/devel/R-cran-data.table/Makefile
@@ -3,7 +3,7 @@
PORTNAME= data.table
DISTVERSION= 1.12.8
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= devel
DISTNAME= ${PORTNAME}_${DISTVERSION}
@@ -13,13 +13,25 @@ COMMENT= Extension of Data.frame
LICENSE= MPL20
LICENSE_FILE= ${WRKSRC}/LICENSE
-BROKEN_i386= unable to load datatable.so
-
-USES= cran:auto-plist,compiles
+USES= cran:auto-plist
OPTIONS_DEFINE= OPENMP
OPTIONS_DEFAULT= OPENMP
OPENMP_CONFIGURE_ENABLE= openmp
+NO_ARCH_IGNORE= datatable.so
+
+.include <bsd.port.options.mk>
+
+.if ${ARCH} == i386
+# See PR 230888 : Missing 64 bit atomic functions for i386
+EXTRA_PATCHES= ${FILESDIR}/extra-patch-src_Makevars
+USES+= compiler:gcc-c++11-lib
+.elif defined(PPC_ABI) && ${PPC_ABI} == ELFv1
+USE_GCC= yes
+.else
+USES+= cran:compiles
+.endif
+
.include <bsd.port.mk>
diff --git a/devel/R-cran-data.table/files/extra-patch-src_Makevars b/devel/R-cran-data.table/files/extra-patch-src_Makevars
new file mode 100644
index 000000000000..892197382b88
--- /dev/null
+++ b/devel/R-cran-data.table/files/extra-patch-src_Makevars
@@ -0,0 +1,10 @@
+--- src/Makevars.orig 2020-06-28 23:46:07 UTC
++++ src/Makevars
+@@ -1,6 +1,6 @@
+
+ PKG_CFLAGS = $(SHLIB_OPENMP_CFLAGS)
+-PKG_LIBS = $(SHLIB_OPENMP_CFLAGS) -lz
++PKG_LIBS = $(SHLIB_OPENMP_CFLAGS) -lz -latomic
+
+ all: $(SHLIB)
+ mv $(SHLIB) datatable$(SHLIB_EXT)