]> git.pld-linux.org Git - packages/clcc.git/commitdiff
- new auto/th/clcc-0.3.0-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 29 Nov 2014 20:56:31 +0000 (21:56 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 29 Nov 2014 20:56:31 +0000 (21:56 +0100)
- shared patch to use shared boost libraries instead of static
- no-svn patch not to use svn to determine build (.svn dir is not included in release anyway)
- opencl patch to define OpenCL library name on Linux

clcc-no-svn.patch [new file with mode: 0644]
clcc-opencl.patch [new file with mode: 0644]
clcc-shared.patch [new file with mode: 0644]
clcc.spec [new file with mode: 0644]

diff --git a/clcc-no-svn.patch b/clcc-no-svn.patch
new file mode 100644 (file)
index 0000000..0e839f7
--- /dev/null
@@ -0,0 +1,16 @@
+--- clcc-0.3.0/CMakeLists.txt.orig     2012-01-15 17:52:10.000000000 +0100
++++ clcc-0.3.0/CMakeLists.txt  2014-11-29 21:15:55.441208753 +0100
+@@ -19,13 +19,6 @@
+ set(CLCC_VERSION_PATCH        0)\r
+ set(CLCC_VERSION_BUILD        0)      #       Undetermined, set by subversion (if present)\r
\r
+-find_package(Subversion)\r
+-\r
+-if (Subversion_FOUND)\r
+-      Subversion_WC_INFO(${PROJECT_SOURCE_DIR} clcc)\r
+-      set(CLCC_VERSION_BUILD  ${clcc_WC_REVISION})\r
+-endif()\r
+-\r
+ if (WIN32)\r
+       set(CLCC_PLATFORM       win32)    \r
+ endif()\r
diff --git a/clcc-opencl.patch b/clcc-opencl.patch
new file mode 100644 (file)
index 0000000..4b1bf6f
--- /dev/null
@@ -0,0 +1,13 @@
+--- clcc-0.3.0/src/options.cpp.orig    2011-12-13 14:48:00.000000000 +0100
++++ clcc-0.3.0/src/options.cpp 2014-11-29 21:25:19.837851731 +0100
+@@ -33,8 +33,8 @@
+ #define CLCC_OPENCL_DYNLIB_NAME "/Library/Frameworks/OpenCL.framework/OpenCL"\r
+ #endif\r
\r
+-#ifdef __LINUX__\r
+-#define CLCC_OPENCL_DYNLIB_NAME "libOpenCL.so";\r
++#if defined(__LINUX__) || defined(__linux__)\r
++#define CLCC_OPENCL_DYNLIB_NAME "libOpenCL.so.1";\r
+ #endif\r
\r
+ static const char* opencl_lib_default = CLCC_OPENCL_DYNLIB_NAME;    //!<    The default dynamic library name to open, its value is platform-specific\r
diff --git a/clcc-shared.patch b/clcc-shared.patch
new file mode 100644 (file)
index 0000000..f839fe4
--- /dev/null
@@ -0,0 +1,10 @@
+--- clcc-0.3.0/src/CMakeLists.txt.orig 2012-01-15 17:52:10.000000000 +0100
++++ clcc-0.3.0/src/CMakeLists.txt      2014-11-29 20:44:33.061287745 +0100
+@@ -10,7 +10,6 @@
+ #  (See accompanying file license.txt)\r
+ ##########################################################################\r
\r
+-set(Boost_USE_STATIC_LIBS ON)\r
+ find_package(Boost REQUIRED program_options)\r
\r
+ if (MSVC)\r
diff --git a/clcc.spec b/clcc.spec
new file mode 100644 (file)
index 0000000..d0c340f
--- /dev/null
+++ b/clcc.spec
@@ -0,0 +1,63 @@
+Summary:       CLCC - The OpenCL kernel compiler
+Summary(pl.UTF-8):     CLCC - kompilator jąder OpenCL
+Name:          clcc
+Version:       0.3.0
+Release:       1
+License:       Boost v1.0
+Group:         Development/Tools
+Source0:       http://downloads.sourceforge.net/clcc/%{name}-%{version}-25-src.zip
+# Source0-md5: 7ec003cc775d1cd06e789fb054c1d695
+Patch0:                %{name}-shared.patch
+Patch1:                %{name}-no-svn.patch
+Patch2:                %{name}-opencl.patch
+URL:           http://clcc.sourceforge.net/
+BuildRequires: boost-devel
+BuildRequires: cmake >= 2.8
+BuildRequires: doxygen
+BuildRequires: libstdc++-devel
+Requires:      OpenCL
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+CLCC is a compiler for OpenCL kernel source files. It is intended to
+be a tool for application developers who need to incorporate OpenCL
+source code into their programs and who want to verify their OpenCL
+code actually gets compiled by the driver before their program tries
+to compile it on-demand.
+
+%description -l pl.UTF-8
+CLCC to kompilator plików źródłowych jąder OpenCL. Jest pomyślany jako
+narzędzie dla programistów potrzebujących wykorzystywać we własnych
+programach kody źródłowe OpenCL i chcących zweryfikować je przed
+skompilowaniem przez sterownik na żądanie w przypadku użycia przez
+program.
+
+%prep
+%setup -q -c
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+install -d build
+cd build
+%cmake .. \
+       -DBOOST_LIBRARIES=%{_libdir}
+%{__make} all clcc_doc
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+# not really useful for non-clcc developers
+%{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc license.txt 
+%attr(755,root,root) %{_bindir}/clcc
This page took 0.076432 seconds and 4 git commands to generate.