Hello. I tried to create a "port", see the Makefile attached I created already. For further informations and your convenience, look at this website:
POCL: https://launchpad.net/pocl LLVM: http://llvm.org/docs/ReleaseNotes.html I use FreeBSD 10.0-CURRENT r240186M amd64, my world and kernel are build with CLANG. The software, pocl, itself is straight forward able to compile. I didn't "patch" anything or put magic sophisticated knowledge into "porting it", I simply created the Makefile for the start. Feel free to work on it. The Makefile is capable of building POCL on all FreeBSD 10 systems I run, but it fails on FreeBSD 9.1-STABLE. I didn't investigate further, since I have some first-priority questiosn and maybe some of the more experienced people here are willing to contribute their knowledge. 0) In my CLANG built world, fetch(1) ends up with an "Authentication error" fetching the sources from the site (see PR: bin/171402). This needs to be fixed before the port works out of the box, you need to download the source tar-ball manually for the first time from the site mentioned above entitle POCL. 1) The port need to be build with a version number of the shared library created - otherwise ldconfig doesn't seem to recognize the installed library and does not load it into the cache. 2) A more sophisticated detection of the build environment is needed. I failed providing a detection of the existence of a CLANG, legacy or GCC > 4.6 build environment, I guess this can be done with the version number of FreeBSD itself or with some knobs I do not know about. I'm new to the ports system on this sophisticated level. I think it is too early to announce this port with a PR, since FreeBSD < 10 isn't supported yet. 3) I didn't test the library with "real world" software, but I think I will this in the near future, if it is working and usable. If some folks could also provide "tests", please be invited. Thanks. Oliver
PORTNAME= pocl PORTVERSION= 0.6.0 CATEGORIES= devel MAINTAINER= po...@freebsd.org COMMENT= Portable OpenCL - an efficient open source (MIT-licensed) implementation of the OpenCL 1.2 standard. MASTER_SITES= https://launchpad.net/pocl/${PORTVERSION:C/\.[0-9]$//}/${PORTVERSION}/+download/ DISTNAME= ${PORTNAME}-${PORTVERSION:C/\.[0-9]$//} CONFLICTS= opencl-* freeocl* DISABLE_MAKE_JOBS= yes OPTIONS_SINGLE= LANG OPTIONS_SINGLE_LANG= COMP_CLANG COMP_GCC OPTIONS_DEFAULT= COMP_CLANG COMP_CLANG_DESC= Use LLVM/CLANG compiler COMP_GCC_DESC= Use GNU GCC compiler .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MCOMP_GCC} USE_GCC= 4.6+ .endif .if ${PORT_OPTIONS:MCOMP_CLANG} CXXFLAGS+= -stdlib=libc++ CPPFLAGS+= -I${LOCALBASE}/include .endif BUILD_DEPENDS= ${LOCALBASE}/bin/llvm-config:${PORTSDIR}/devel/llvm USE_GMAKE= yes USE_GL= yes USE_LDCONFIG= yes USE_AUTOTOOLS= libltdl GNU_CONFIGURE= yes CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib .include <bsd.port.mk>
signature.asc
Description: OpenPGP digital signature