From dd886bbae19f3aca2fd7f1a4d46c462396180843 Mon Sep 17 00:00:00 2001 From: John Galt Date: Mon, 21 Jul 2014 15:37:13 -0700 Subject: [PATCH] New package: libclc-git --- srcpkgs/libclc-devel-git | 1 + srcpkgs/libclc-git/template | 65 +++++++++++++++++++++++++++++++++++++ srcpkgs/libclc-ptx-git | 1 + srcpkgs/libclc-r600-git | 1 + 4 files changed, 68 insertions(+) create mode 120000 srcpkgs/libclc-devel-git create mode 100644 srcpkgs/libclc-git/template create mode 120000 srcpkgs/libclc-ptx-git create mode 120000 srcpkgs/libclc-r600-git diff --git a/srcpkgs/libclc-devel-git b/srcpkgs/libclc-devel-git new file mode 120000 index 00000000000..a72028c369f --- /dev/null +++ b/srcpkgs/libclc-devel-git @@ -0,0 +1 @@ +libclc-git \ No newline at end of file diff --git a/srcpkgs/libclc-git/template b/srcpkgs/libclc-git/template new file mode 100644 index 00000000000..485d178adcd --- /dev/null +++ b/srcpkgs/libclc-git/template @@ -0,0 +1,65 @@ +# Template file for 'libclc-git' +pkgname=libclc-git +sha=3b853378ab3bd607aa758492b61522b0a83084cb +version=20140717 +revision=1 +makedepends="python libffi-devel zlib-devel llvm>=3.4.2_2 clang>=3.4.2_2" +depends="libclc-ptx-git libclc-r600-git" +short_desc="Open implementation of the OpenCL C programming language" +maintainer="John Galt" +license="BSD/MIT" +homepage="http://libclc.llvm.org" +provides="libclc-${version}_${revision}" +replaces="libclc>=0" + +do_fetch() { + # Upstream libclc git is http://llvm.org/git/libclc.git, however + # we use a minimal git-core for git:// protocol. + local url="git://github.com/llvm-mirror/libclc" + msg_normal "Fetching source from $url ...\n" + git clone ${url} ${wrksrc} + cd ${wrksrc} + git reset --hard ${sha} +} + +do_configure() { + ./configure.py --prefix=/usr +} + +do_build() { + make ${makejobs} +} + +do_install() { + make DESTDIR=$DESTDIR install +} + +libclc-devel-git_package() { + short_desc+=" (development files)" + provides="libclc-devel-${version}_${revision}" + replaces="libclc-devel>=0" + pkg_install() { + vmove usr/share + vmove usr/include + } +} + +libclc-ptx-git_package() { + short_desc+=" - ptx support only" + provides="libclc-ptx-${version}_${revision}" + replaces="libclc-ptx>=0" + depends="libclc-devel" + pkg_install() { + vmove "usr/lib/clc/*ptx*.bc" + } +} + +libclc-r600-git_package() { + short_desc+=" - r600 support only" + provides="libclc-r600-${version}_${revision}" + replaces="libclc-r600>=0" + depends="libclc-devel" + pkg_install() { + vmove "usr/lib/clc/*r600*.bc" + } +} diff --git a/srcpkgs/libclc-ptx-git b/srcpkgs/libclc-ptx-git new file mode 120000 index 00000000000..a72028c369f --- /dev/null +++ b/srcpkgs/libclc-ptx-git @@ -0,0 +1 @@ +libclc-git \ No newline at end of file diff --git a/srcpkgs/libclc-r600-git b/srcpkgs/libclc-r600-git new file mode 120000 index 00000000000..a72028c369f --- /dev/null +++ b/srcpkgs/libclc-r600-git @@ -0,0 +1 @@ +libclc-git \ No newline at end of file