]> git.pld-linux.org Git - SPECS.git/blob - LunarGLASS.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / LunarGLASS.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # build with tests
4
5 %define snap    20160216
6 %define commit  55f8dd9b8628c0a14772e17be2e90a9ded1a75e5
7 %define rel     0.1
8
9 %define llvm_version    3.4.2
10
11 Summary:        LLVM IR and optimizer for shaders, including front-end adapters for GLSL and SPIR-V and back-end adapter for GLSL
12 Name:           LunarGLASS
13 Version:        0
14 Release:        0.%{snap}.%{rel}
15 License:        BSD-like
16 Group:          Libraries
17 Source0:        https://github.com/LunarG/LunarGLASS/archive/%{commit}/%{name}-%{snap}.tar.gz
18 # Source0-md5:  d05a3f5a2412d525bb76bf8868ee5c35
19 Source1:        http://llvm.org/releases/%{llvm_version}/llvm-%{llvm_version}.src.tar.gz
20 # Source1-md5:  a20669f75967440de949ac3b1bad439c
21 Patch0:         CMakeLists.patch
22 URL:            https://github.com/LunarG/LunarGLASS/
23 BuildRequires:  clang
24 BuildRequires:  cmake
25 BuildRequires:  glslang-devel
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 LunarGLASS is an LLVM-based shader-compiler stack available to
30 open-source developers. It brings a new approach by splitting the
31 common shared intermediate representation (IR) into two levels; the
32 top level is completely platform independent while the bottom level is
33 dynamically tailorable to different families of architecture. Both
34 levels still lend themselves to portability and sharing of tools.
35 Together, they solve the problem of having a standard portable IR
36 without being biased toward a specific class of target architecture.
37
38 LunarGLASS is a long-term compiler stack architecture, based on
39 establishing common intermediate representations (IRs) allowing
40 modularity between stack layers. Each source-language front end would
41 benefit from a common set of high- and mid-level optimizations, as
42 would each back end, without the need to invent additional IRs. The
43 short-term goal is to leverage investments in existing IRs while the
44 long-term goal is to reduce the number of IRs and not require
45 optimization difficulties caused by losing information going through
46 an IR.
47
48 %package devel
49 Summary:        Header files for %{name} library
50 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki %{name}
51 Group:          Development/Libraries
52
53 %description devel
54 Header files for %{name} library.
55
56 %description devel -l pl.UTF-8
57 Pliki nagłówkowe biblioteki %{name}.
58
59 %prep
60 %setup -qn %{name}-%{commit}
61 %patch0 -p1
62
63 cd Core/LLVM/llvm-3.4
64 tar -x --strip-components=1 --skip-old-files -f %{SOURCE1}
65 cd ../../..
66
67 %build
68 cd Core/LLVM/llvm-3.4
69 install -d build
70 cd build
71 ../%%configure
72
73 %{__make}
74 %{__make} install prefix=%{_prefix}/local DESTDIR=`pwd`/install
75
76 cd ../../../..
77
78 install -d build
79 cd build
80 %cmake \
81         -DGLSLANGINCLUDES=%{_includedir}/glslang \
82         -DGLSLANGLIBS=%{_libdir} \
83         ../
84 %{__make}
85
86 %{?with_tests:%{__make} test}
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90
91 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}}
92
93 cd build
94 %{__make} install
95
96 cp -p install/bin/LunarGOO $RPM_BUILD_ROOT%{_bindir}
97 cp -p install/lib/*.a $RPM_BUILD_ROOT%{_libdir}
98
99 cd ..
100
101 for path in $(find * -name '*.h') ; do
102         install -D $path $RPM_BUILD_ROOT%{_includedir}/%{name}/$path
103 done
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 %files
109 %defattr(644,root,root,755)
110 %doc Readme.md Todo.txt
111 %attr(755,root,root) %{_bindir}/LunarGOO
112
113 %files devel
114 %defattr(644,root,root,755)
115 %{_libdir}/*.a
116 %{_includedir}/%{name}
This page took 1.561468 seconds and 3 git commands to generate.