3 %bcond_without ide # build with ide
4 %bcond_without doc # build without doc
6 Summary: 32-bit compiler for the i386 and m68k processors
7 Summary(pl.UTF-8): 32 bitowy kompilator dla procesorów i386 i m68k
8 Summary(ru.UTF-8): Свободный компилятор Pascal
9 Summary(uk.UTF-8): Вільний компілятор Pascal
14 Group: Development/Languages
15 Source0: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/source/%{name}build-%{version}.tar.gz
16 # Source0-md5: 17375e665a4e1311f85812fe2754f609
17 Source1: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/i386-linux/%{name}-%{version}.i386-linux.tar
18 # Source1-md5: 42b8fcaba867f515446a84aa0430db91
19 Source2: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/x86_64-linux/%{name}-%{version}.x86_64-linux.tar
20 # Source2-md5: 631d93ca49778537cd84fa3a2878883c
21 Source3: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/powerpc-linux/%{name}-%{version}.powerpc-linux.tar
22 # Source3-md5: e08ac5d45747d8a12589b55c7cd58ded
23 Patch0: %{name}-skip-dev-dot.patch
24 Patch1: %{name}-link.patch
25 Patch2: %{name}-gdb.patch
26 URL: http://www.freepascal.org/
27 BuildRequires: binutils-static >= 3:2.17.50
28 BuildRequires: gpm-devel
29 BuildRequires: ncurses-devel
30 BuildRequires: rpmbuild(macros) >= 1.213
32 BuildRequires: gdb-lib >= 7.2-7
33 BuildRequires: python-static
34 BuildRequires: readline-static
35 BuildRequires: libselinux-static
36 BuildRequires: zlib-static
37 BuildRequires: xz-static
40 BuildRequires: tetex-fonts-jknappen
41 BuildRequires: tetex-format-pdflatex
42 BuildRequires: tetex-makeindex
43 BuildRequires: tetex-metafont
44 BuildRequires: texlive-xetex
47 Provides: fpc-bootstrap
48 ExclusiveArch: %{ix86} %{x8664} ppc
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 Free Pascal is a 32-bit compiler for the i386 and m68k processors.
53 Free Pascal is designed to be, as much as possible, source compatible
54 with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
55 attained), but it also enhances these languages with elements like
56 function overloading. And, unlike these ancestors, it supports
59 %description -l pl.UTF-8
60 Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
61 Free Pascal został zaprojektowany by być (jak tylko to możliwe)
62 kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal również
63 rozszerza te języki elementami takimi jak przeciążanie funkcji.
65 %description -l ru.UTF-8
66 FPC -- 32-битный компилятор Pascal, совместимый с Turbo Pascal 7.0 и
67 Delphi. Поставляется с RTL (библиотекой времени исполнения), FCL
68 (библиотекой свободных компонент), интерфейсами к gtk, ncurses, zlib,
69 mysql, postgres, ibase.
71 %description -l uk.UTF-8
72 FPC -- 32-бітний компілятор Pascal, сумісний із Turbo Pascal 7.0 та
73 Delphi. Постачається із RTL (бібліотекою часу виконання), FCL
74 (бібліотекою вільних компонент), інтерфейсами до gtk, ncurses, zlib,
75 mysql, postgres, ibase.
78 Summary: Free Pascal Compiler source files
79 Summary(pl.UTF-8): Pliki źródłowe kompilatora Free Pascal
81 Requires: %{name} = %{version}-%{release}
85 Free Pascal Compiler source files.
87 %description src -l pl.UTF-8
88 Pliki źródłowe kompilatora Free Pascal.
91 Summary: Free Pascal Compiler exaple programs
92 Summary(pl.UTF-8): Przykładowe programy do kompilatora Free Pascal
94 Requires: %{name} = %{version}-%{release}
97 Free Pascal Compiler exaple programs.
99 %description examples -l pl.UTF-8
100 Przykładowe programy do kompilatora Free Pascal.
103 Summary: Free Pascal Compiler documentation
104 Summary(pl.UTF-8): Dokumentacja do kompilatora Free Pascal
106 # doesn't require base
109 Documentation for fpc in PDF format.
111 %description doc -l pl.UTF-8
112 Dokumentacja do fpc w formacie PDF.
115 %setup -q -n %{name}build-%{version}
122 %define _bver %{version}
128 %define _bver %{version}
130 %define _barch x86_64
134 %define _bver %{version}
136 %define _barch powepc
139 cd %{name}-%{version}.%{_barch}-linux
140 tar xf binary.*-linux.tar
145 for i in ../%{name}-%{version}.%{_barch}-linux/*.tar.gz ; do
148 ln -sf `pwd`/lib/%{name}/%{_bver}/ppc* bin
153 cp -af fpcsrc/* fpc-src
157 [ -d our-ld ] || install -d our-ld
158 ln -sf %{_bindir}/ld.bfd our-ld/ld
159 export PATH=$(pwd)/our-ld:$PATH
161 PP=`pwd`/bin/lib/%{name}/%{_bver}/ppc%{_bname}
162 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
163 NEWFPDOC=`pwd`/fpcsrc/utils/fpdoc/fpdoc
165 # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
166 case "%{_build_cpu}" in
167 i386) OPTF="-OG2p1" ;;
168 i486) OPTF="-OG2p1" ;;
169 i586) OPTF="-OG2p2" ;;
170 i686) OPTF="-Og2p3" ;;
171 athlon) OPTF="-Og2p3" ;;
175 %{__make} -C fpcsrc compiler_cycle \
178 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
179 BININSTALLDIR=%{_bindir} \
184 %{__make} -C fpcsrc OPT="$OPTF -Xs -n" \
186 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
187 BININSTALLDIR=%{_bindir} \
188 GDBLIBDIR=%{_libdir} \
192 DATA2INC=`pwd`/utils/data2inc \
198 %{?with_ide: ide_clean installer_clean} \
201 utils_all %{?with_ide:ide_all installer_all}
204 export save_size=10000
205 %{__make} -j1 -C fpcdocs \
212 rm -rf $RPM_BUILD_ROOT
213 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_datadir}/fpcsrc,%{_examplesdir}/fpc}
215 cp -af fpc-src/* $RPM_BUILD_ROOT%{_datadir}/fpcsrc
217 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
218 FPCMAKE=`pwd`/fpcsrc/utils/fpcm/fpcmake
219 %{__make} -j1 -C fpcsrc \
220 compiler_distinstall \
222 packages_distinstall \
223 %{?with_ide:ide_distinstall} \
228 INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
229 INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
230 INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
231 INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
232 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
233 INSTALL_BASEDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
234 INSTALL_EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name} \
235 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
236 CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc
238 %{__make} -j1 -C install/man installman \
239 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir}
241 ln -sf ../%{_lib}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir}
243 ln -sf %{_bindir}/ld.bfd $RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}/ld
245 sh fpc-src/compiler/utils/samplecfg $RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} $RPM_BUILD_ROOT%{_sysconfdir}
246 %{__sed} -i -e "s,$RPM_BUILD_ROOT,,g" $RPM_BUILD_ROOT%{_sysconfdir}/{*.cfg,fppkg/default}
249 rm -rf $RPM_BUILD_ROOT
252 %defattr(644,root,root,755)
253 %attr(755,root,root) %{_bindir}/*
254 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpc.cfg
255 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fppkg.cfg
256 %dir %{_sysconfdir}/fppkg
257 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fppkg/default
258 %dir %{_libdir}/%{name}
259 %dir %{_libdir}/%{name}/%{version}
260 %dir %{_libdir}/%{name}/lexyacc
261 %{_libdir}/%{name}/%{version}/msg
262 %{_libdir}/%{name}/%{version}/units
264 %{_libdir}/%{name}/%{version}/ide
266 %{_libdir}/%{name}/lexyacc/*
267 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ld
268 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname}
269 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
273 %defattr(644,root,root,755)
277 %defattr(644,root,root,755)
282 %defattr(644,root,root,755)