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: zlib-static
38 BuildRequires: tetex-fonts-jknappen
39 BuildRequires: tetex-format-pdflatex
40 BuildRequires: tetex-makeindex
41 BuildRequires: tetex-metafont
42 BuildRequires: texlive-xetex
45 Provides: fpc-bootstrap
46 ExclusiveArch: %{ix86} %{x8664} ppc
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 Free Pascal is a 32-bit compiler for the i386 and m68k processors.
51 Free Pascal is designed to be, as much as possible, source compatible
52 with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
53 attained), but it also enhances these languages with elements like
54 function overloading. And, unlike these ancestors, it supports
57 %description -l pl.UTF-8
58 Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
59 Free Pascal został zaprojektowany by być (jak tylko to możliwe)
60 kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal również
61 rozszerza te języki elementami takimi jak przeciążanie funkcji.
63 %description -l ru.UTF-8
64 FPC -- 32-битный компилятор Pascal, совместимый с Turbo Pascal 7.0 и
65 Delphi. Поставляется с RTL (библиотекой времени исполнения), FCL
66 (библиотекой свободных компонент), интерфейсами к gtk, ncurses, zlib,
67 mysql, postgres, ibase.
69 %description -l uk.UTF-8
70 FPC -- 32-бітний компілятор Pascal, сумісний із Turbo Pascal 7.0 та
71 Delphi. Постачається із RTL (бібліотекою часу виконання), FCL
72 (бібліотекою вільних компонент), інтерфейсами до gtk, ncurses, zlib,
73 mysql, postgres, ibase.
76 Summary: Free Pascal Compiler source files
77 Summary(pl.UTF-8): Pliki źródłowe kompilatora Free Pascal
79 Requires: %{name} = %{version}-%{release}
83 Free Pascal Compiler source files.
85 %description src -l pl.UTF-8
86 Pliki źródłowe kompilatora Free Pascal.
89 Summary: Free Pascal Compiler exaple programs
90 Summary(pl.UTF-8): Przykładowe programy do kompilatora Free Pascal
92 Requires: %{name} = %{version}-%{release}
95 Free Pascal Compiler exaple programs.
97 %description examples -l pl.UTF-8
98 Przykładowe programy do kompilatora Free Pascal.
101 Summary: Free Pascal Compiler documentation
102 Summary(pl.UTF-8): Dokumentacja do kompilatora Free Pascal
104 # doesn't require base
107 Documentation for fpc in PDF format.
109 %description doc -l pl.UTF-8
110 Dokumentacja do fpc w formacie PDF.
113 %setup -q -n %{name}build-%{version}
120 %define _bver %{version}
126 %define _bver %{version}
128 %define _barch x86_64
132 %define _bver %{version}
134 %define _barch powepc
137 cd %{name}-%{version}.%{_barch}-linux
138 tar xf binary.*-linux.tar
143 for i in ../%{name}-%{version}.%{_barch}-linux/*.tar.gz ; do
146 ln -sf `pwd`/lib/%{name}/%{_bver}/ppc* bin
151 cp -af fpcsrc/* fpc-src
155 [ -d our-ld ] || install -d our-ld
156 ln -sf %{_bindir}/ld.bfd our-ld/ld
157 export PATH=$(pwd)/our-ld:$PATH
159 PP=`pwd`/bin/lib/%{name}/%{_bver}/ppc%{_bname}
160 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
161 NEWFPDOC=`pwd`/fpcsrc/utils/fpdoc/fpdoc
163 # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
164 case "%{_build_cpu}" in
165 i386) OPTF="-OG2p1" ;;
166 i486) OPTF="-OG2p1" ;;
167 i586) OPTF="-OG2p2" ;;
168 i686) OPTF="-Og2p3" ;;
169 athlon) OPTF="-Og2p3" ;;
173 %{__make} -C fpcsrc compiler_cycle \
176 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
177 BININSTALLDIR=%{_bindir} \
182 %{__make} -C fpcsrc OPT="$OPTF -Xs -n" \
184 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
185 BININSTALLDIR=%{_bindir} \
186 GDBLIBDIR=%{_libdir} \
190 DATA2INC=`pwd`/utils/data2inc \
196 %{?with_ide: ide_clean installer_clean} \
199 utils_all %{?with_ide:ide_all installer_all}
202 export save_size=10000
203 %{__make} -j1 -C fpcdocs \
210 rm -rf $RPM_BUILD_ROOT
211 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_datadir}/fpcsrc,%{_examplesdir}/fpc}
213 cp -af fpc-src/* $RPM_BUILD_ROOT%{_datadir}/fpcsrc
215 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
216 FPCMAKE=`pwd`/fpcsrc/utils/fpcm/fpcmake
217 %{__make} -j1 -C fpcsrc \
218 compiler_distinstall \
220 packages_distinstall \
221 %{?with_ide:ide_distinstall} \
226 INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
227 INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
228 INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
229 INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
230 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
231 INSTALL_BASEDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
232 INSTALL_EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name} \
233 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
234 CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc
236 %{__make} -j1 -C install/man installman \
237 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir}
239 ln -sf ../%{_lib}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir}
241 ln -sf %{_bindir}/ld.bfd $RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}/ld
243 sh fpcsrc/compiler/utils/samplecfg %{_libdir}/%{name}/%{version} $RPM_BUILD_ROOT%{_sysconfdir}
246 rm -rf $RPM_BUILD_ROOT
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_bindir}/*
251 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpc.cfg
252 %dir %{_libdir}/%{name}
253 %dir %{_libdir}/%{name}/%{version}
254 %dir %{_libdir}/%{name}/lexyacc
255 %{_libdir}/%{name}/%{version}/msg
256 %{_libdir}/%{name}/%{version}/units
258 %{_libdir}/%{name}/%{version}/ide
260 %{_libdir}/%{name}/lexyacc/*
261 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ld
262 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname}
263 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
267 %defattr(644,root,root,755)
271 %defattr(644,root,root,755)
276 %defattr(644,root,root,755)