]> git.pld-linux.org Git - packages/ldc.git/blob - ldc.spec
disable lld support; rel 2
[packages/ldc.git] / ldc.spec
1 #
2 # Conditional build:
3 %bcond_with     bootstrap               # bootstrap from pre-compiled binaries
4
5 %define bootstrap_version 1.27.1
6 Summary:        LLVM D Compiler
7 Name:           ldc
8 Version:        1.28.0
9 Release:        2
10 # The DMD frontend in dmd/* GPL version 1 or artistic license
11 # The files gen/asmstmt.cpp and gen/asm-*.hG PL version 2+ or artistic license
12 License:        BSD
13 Source0:        https://github.com/ldc-developers/ldc/releases/download/v%{version}/%{name}-%{version}-src.tar.gz
14 # Source0-md5:  719213b2ba5e7f7dd3e5092fb3950c48
15 Source1:        https://github.com/ldc-developers/ldc/releases/download/v%{bootstrap_version}/%{name}2-%{bootstrap_version}-linux-x86_64.tar.xz
16 # Source1-md5:  1bc671b41ba59848e3d0ffe74c83fc7b
17 Source3:        macros.%{name}
18 Patch0:         %{name}-include-path.patch
19 Patch1:         %{name}-no-default-rpath.patch
20 URL:            https://github.com/ldc-developers/ldc
21 BuildRequires:  bash-completion
22 BuildRequires:  cmake
23 BuildRequires:  curl-devel
24 BuildRequires:  gc
25 %{!?with_bootstrap:BuildRequires:       ldc}
26 BuildRequires:  libconfig-devel
27 BuildRequires:  libedit-devel
28 BuildRequires:  libstdc++-devel
29 BuildRequires:  llvm-devel >= 12
30 BuildRequires:  rpmbuild(macros) >= 2.008
31 BuildRequires:  zlib-devel
32 ExclusiveArch:  %{x8664}
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %define dmdfe_major 2
36 %define dmdfe_minor 0
37 %define dmdfe_bump  98
38 %define dmdfe       %{dmdfe_major}.%{dmdfe_minor}.%{dmdfe_bump}
39
40 # Unresolved symbols found: _D4core9exception6_storeG128v
41 %define skip_post_check_so libphobos2-ldc-debug-shared.so.*
42
43 %description
44 LDC is a portable compiler for the D programming language with modern
45 optimization and code generation capabilities.
46
47 It uses the official DMD compiler frontend to support the latest
48 version of D, and relies on the LLVM Core libraries for code
49 generation.
50
51 %package druntime
52 Summary:        Runtime library for D
53 License:        Boost
54
55 %description druntime
56 Druntime is the minimum library required to support the D programming
57 language. It includes the system code required to support the garbage
58 collector, associative arrays, exception handling, array vector
59 operations, startup/shutdown, etc.
60
61 %description druntime -l fr
62 Druntime est la bibliothèque minimal requise pour supporter la
63 programmation en D. Est inclut le code système requis pour supporter
64 le ramasse miette, tableau associatif, gestion des exceptions,
65 opertation sur des vecteurs, démarage/extinction, etc
66
67 %package phobos
68 Summary:        Standard Runtime Library
69 License:        Boost
70 Requires:       %{name}-druntime = %{version}-%{release}
71
72 %description phobos
73 Each module in Phobos conforms as much as possible to the following
74 design goals. These are goals rather than requirements because D is
75 not a religion, it's a programming language, and it recognizes that
76 sometimes the goals are contradictory and counterproductive in certain
77 situations, and programmers have jobs that need to get done
78
79 %description phobos -l fr
80 Chaque module de Phobos est conforme autant que possible à la
81 conception suivante objectifs. Ce sont des objectifs plutôt que des
82 exigences car D n'est pas une religion, c'est un language de
83 programmation, et il reconnaît que, parfois, les objectifs sont
84 contradictoires et contre-productif dans certaines situations, et les
85 programmeurs ont travail qui doit être effectué.
86
87 %package phobos-geany-tags
88 Summary:        Support for enable autocompletion in geany
89 BuildRequires:  geany
90 Requires:       %{name} = %{version}-%{release}
91 Requires:       geany
92 BuildArch:      noarch
93
94 %description phobos-geany-tags
95 Enable autocompletion for phobos library in geany (IDE)
96
97 %description phobos-geany-tags -l fr
98 Active l'autocompletion pour pour la bibliothèque phobos dans geany
99 (IDE)
100
101 %prep
102 %setup -q -n %{name}-%{version}-src
103 %patch0 -p1
104 %patch1 -p1
105
106 # temp geany config directory for allow geany to generate tags
107 install -d geany_config
108
109 %if %{with bootstrap}
110 set -- *
111 install -d build-bootstrap2
112 cp -al "$@" build-bootstrap2
113 tar xf %{SOURCE1}
114 mv ldc2-%{bootstrap_version}-linux-x86_64 build-bootstrap1
115 %endif
116
117 %build
118 %if %{with bootstrap}
119 cd build-bootstrap2
120 %cmake \
121         -S .. \
122         -B build \
123         -DD_COMPILER:PATH=$(pwd)/../build-bootstrap1/bin/ldmd2 \
124         -DLDC_WITH_LLD:BOOL=OFF \
125         %{nil}
126 %{__cmake} --build build
127 cd ..
128 %endif
129
130 %cmake \
131         -B build \
132         -DMULTILIB:BOOL=OFF \
133         -DINCLUDE_INSTALL_DIR:PATH=%{_prefix}/lib/ldc/%{_target_platform}/include/d \
134         -DBASH_COMPLETION_COMPLETIONSDIR:PATH=%{_datadir}/bash-completion/completions \
135 %if %{with bootstrap}
136         -DD_COMPILER:PATH=$(pwd)/build-bootstrap2/build/bin/ldmd2 \
137 %endif
138         -DLDC_WITH_LLD:BOOL=OFF \
139         %{nil}
140
141 %{__cmake} --build build
142
143 # generate geany tags
144 geany -c geany_config -g phobos.d.tags $(find runtime/phobos/std -name "*.d")
145
146 %install
147 rm -rf $RPM_BUILD_ROOT
148 DESTDIR="$RPM_BUILD_ROOT" %{__cmake} --install build
149
150 # macros for D package
151 install -d $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d/
152 install --mode=0644 %{SOURCE3} $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d/macros.ldc
153
154 # geany tags
155 install -d $RPM_BUILD_ROOT%{_datadir}/geany/tags/
156 cp -p phobos.d.tags $RPM_BUILD_ROOT%{_datadir}/geany/tags/
157
158 %clean
159 rm -rf $RPM_BUILD_ROOT
160
161 %files
162 %defattr(644,root,root,755)
163 %doc README.md LICENSE
164 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ldc2.conf
165 %attr(755,root,root) %{_bindir}/ldc2
166 %attr(755,root,root) %{_bindir}/ldmd2
167 %attr(755,root,root) %{_bindir}/ldc-build-runtime
168 %attr(755,root,root) %{_bindir}/ldc-profdata
169 %attr(755,root,root) %{_bindir}/ldc-prune-cache
170 %{_rpmconfigdir}/macros.d/macros.ldc
171 %dir %{_prefix}/lib/ldc
172 %dir %{_prefix}/lib/ldc/%{_target_platform}
173 %dir %{_prefix}/lib/ldc/%{_target_platform}/include
174 %dir %{_prefix}/lib/ldc/%{_target_platform}/include/d
175 %{_prefix}/lib/ldc/%{_target_platform}/include/d/core
176 %{_prefix}/lib/ldc/%{_target_platform}/include/d%{_sysconfdir}
177 %{_prefix}/lib/ldc/%{_target_platform}/include/d/ldc
178 %{_prefix}/lib/ldc/%{_target_platform}/include/d/object.d
179 %{_prefix}/lib/ldc/%{_target_platform}/include/d/std
180 %{_libdir}/libdruntime-ldc-debug-shared.so
181 %{_libdir}/libdruntime-ldc-shared.so
182 %{_libdir}/libphobos2-ldc-debug-shared.so
183 %{_libdir}/libphobos2-ldc-shared.so
184 %dir %{_datadir}/bash-completion
185 %dir %{bash_compdir}
186 %{bash_compdir}/ldc2
187
188 %files druntime
189 %defattr(644,root,root,755)
190 %doc runtime/druntime/README.md runtime/README runtime/druntime/LICENSE.txt
191 %{_libdir}/libdruntime-ldc-debug-shared.so.%{dmdfe}
192 %{_libdir}/libdruntime-ldc-debug-shared.so.%{dmdfe_bump}
193 %{_libdir}/libdruntime-ldc-shared.so.%{dmdfe}
194 %{_libdir}/libdruntime-ldc-shared.so.%{dmdfe_bump}
195
196 %files phobos
197 %defattr(644,root,root,755)
198 %doc runtime/phobos/LICENSE_1_0.txt
199 %{_libdir}/libphobos2-ldc-debug-shared.so.%{dmdfe}
200 %{_libdir}/libphobos2-ldc-debug-shared.so.%{dmdfe_bump}
201 %{_libdir}/libphobos2-ldc-shared.so.%{dmdfe}
202 %{_libdir}/libphobos2-ldc-shared.so.%{dmdfe_bump}
203
204 %files phobos-geany-tags
205 %defattr(644,root,root,755)
206 %{_datadir}/geany/tags/phobos.d.tags
This page took 0.122788 seconds and 4 git commands to generate.