ports/devel/erlang-cl/files/patch-c__src_Makefile
Christoph Moench-Tegeder ce4acb3c83 devel/erlang-cl: update to 1.2.4
While here, patch this port's build scripts to actually build the
opencl NIF (Native Implemented Function) - the build system didn't know
about FreeBSD and failed when building cl_nif.so, but the error went
unnoticed. Without this object, erlang-cl cannot load any CL function
(in our case, we want to use libOpenCL), which rather defeats the
purpose of this port.

Once we build and install cl_nif.so, we have to depend on devel/ocl-icd
to pull in libOpenCL.

PR:		239178
Approved by:	maintainer-timeout (erlang@)
2019-07-28 22:32:08 +00:00

16 lines
344 B
Text

--- c_src/Makefile.orig 2018-09-26 08:28:15 UTC
+++ c_src/Makefile
@@ -59,6 +59,13 @@ LD_SHARED := $(CC) -shared
LDFLAGS += -lOpenCL
endif
+ifeq ($(OSNAME), FreeBSD)
+LINUX = Yes
+CFLAGS += -O3 -fPIC
+LD_SHARED := $(CC) -shared
+LDFLAGS += -lOpenCL
+endif
+
ifeq ($(OSNAME), Darwin)
MAC_OS_X = Yes
ifeq ($(WORDSIZE), 32)