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: d069dfd3412bd0d26dcd1b81ac998305
17 Source1: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/i386-linux/%{name}-%{version}.i386-linux.tar
18 # Source1-md5: e761c4866ac4c8fcbe09f657f315ec32
19 Source2: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/x86_64-linux/%{name}-%{version}.x86_64-linux.tar
20 # Source2-md5: 058e6cd765026748a2bd24c86f1ecf18
21 Source3: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/powerpc-linux/%{name}-%{version}.powerpc-linux.tar
22 # Source3-md5: cea93e5da48c45da3147236cba75dc76
23 Patch0: %{name}-skip-dev-dot.patch
24 Patch1: %{name}-link.patch
25 URL: http://www.freepascal.org/
26 BuildRequires: binutils-static >= 3:2.17.50
27 BuildRequires: gpm-devel
28 BuildRequires: ncurses-devel
29 BuildRequires: rpmbuild(macros) >= 1.213
31 BuildRequires: gdb-lib >= 7.2-7
32 BuildRequires: python-static
33 BuildRequires: readline-static
34 BuildRequires: zlib-static
37 BuildRequires: tetex-fonts-jknappen
38 BuildRequires: tetex-format-pdflatex
39 BuildRequires: tetex-makeindex
40 BuildRequires: tetex-metafont
41 BuildRequires: texlive-xetex
44 Provides: fpc-bootstrap
45 ExclusiveArch: %{ix86} %{x8664} ppc
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 Free Pascal is a 32-bit compiler for the i386 and m68k processors.
50 Free Pascal is designed to be, as much as possible, source compatible
51 with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
52 attained), but it also enhances these languages with elements like
53 function overloading. And, unlike these ancestors, it supports
56 %description -l pl.UTF-8
57 Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
58 Free Pascal został zaprojektowany by być (jak tylko to możliwe)
59 kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal również
60 rozszerza te języki elementami takimi jak przeciążanie funkcji.
62 %description -l ru.UTF-8
63 FPC -- 32-битный компилятор Pascal, совместимый с Turbo Pascal 7.0 и
64 Delphi. Поставляется с RTL (библиотекой времени исполнения), FCL
65 (библиотекой свободных компонент), интерфейсами к gtk, ncurses, zlib,
66 mysql, postgres, ibase.
68 %description -l uk.UTF-8
69 FPC -- 32-бітний компілятор Pascal, сумісний із Turbo Pascal 7.0 та
70 Delphi. Постачається із RTL (бібліотекою часу виконання), FCL
71 (бібліотекою вільних компонент), інтерфейсами до gtk, ncurses, zlib,
72 mysql, postgres, ibase.
75 Summary: Free Pascal Compiler source files
76 Summary(pl.UTF-8): Pliki źródłowe kompilatora Free Pascal
78 Requires: %{name} = %{version}-%{release}
82 Free Pascal Compiler source files.
84 %description src -l pl.UTF-8
85 Pliki źródłowe kompilatora Free Pascal.
88 Summary: Free Pascal Compiler exaple programs
89 Summary(pl.UTF-8): Przykładowe programy do kompilatora Free Pascal
91 Requires: %{name} = %{version}-%{release}
94 Free Pascal Compiler exaple programs.
96 %description examples -l pl.UTF-8
97 Przykładowe programy do kompilatora Free Pascal.
100 Summary: Free Pascal Compiler documentation
101 Summary(pl.UTF-8): Dokumentacja do kompilatora Free Pascal
103 # doesn't require base
106 Documentation for fpc in PDF format.
108 %description doc -l pl.UTF-8
109 Dokumentacja do fpc w formacie PDF.
112 %setup -q -n %{name}build-%{version}
118 %define _bver %{version}
123 %define _bver %{version}
128 %define _bver %{version}
132 tar xf binary.*-linux.tar
136 for i in ../*.tar.gz ; do
139 ln -sf `pwd`/lib/%{name}/%{_bver}/ppc* bin
144 cp -af fpcsrc/* fpc-src
148 [ -d our-ld ] || install -d our-ld
149 ln -sf %{_bindir}/ld.bfd our-ld/ld
150 export PATH=$(pwd)/our-ld:$PATH
152 PP=`pwd`/bin/lib/%{name}/%{_bver}/ppc%{_bname}
153 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
154 NEWFPDOC=`pwd`/fpcsrc/utils/fpdoc/fpdoc
156 # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
157 case "%{_build_cpu}" in
158 i386) OPTF="-OG2p1" ;;
159 i486) OPTF="-OG2p1" ;;
160 i586) OPTF="-OG2p2" ;;
161 i686) OPTF="-Og2p3" ;;
162 athlon) OPTF="-Og2p3" ;;
166 %{__make} -C fpcsrc compiler_cycle \
169 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
170 BININSTALLDIR=%{_bindir} \
175 %{__make} -C fpcsrc OPT="$OPTF -Xs -n" \
177 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
178 BININSTALLDIR=%{_bindir} \
179 GDBLIBDIR=%{_libdir} \
183 DATA2INC=`pwd`/utils/data2inc \
189 %{?with_ide: ide_clean installer_clean} \
192 utils_all %{?with_ide:ide_all installer_all}
195 export save_size=10000
196 %{__make} -j1 -C fpcdocs \
203 rm -rf $RPM_BUILD_ROOT
204 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_datadir}/fpcsrc,%{_examplesdir}/fpc}
206 cp -af fpc-src/* $RPM_BUILD_ROOT%{_datadir}/fpcsrc
208 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
209 FPCMAKE=`pwd`/fpcsrc/utils/fpcm/fpcmake
210 %{__make} -j1 -C fpcsrc \
211 compiler_distinstall \
213 packages_distinstall \
214 %{?with_ide:ide_distinstall} \
219 INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
220 INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
221 INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
222 INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
223 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
224 INSTALL_BASEDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
225 INSTALL_EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name} \
226 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
227 CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc
229 %{__make} -j1 -C install/man installman \
230 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir}
232 ln -sf %{_libdir}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir}
234 sh fpcsrc/compiler/utils/samplecfg %{_libdir}/%{name}/%{version} $RPM_BUILD_ROOT%{_sysconfdir}
237 rm -rf $RPM_BUILD_ROOT
240 %defattr(644,root,root,755)
241 %attr(755,root,root) %{_bindir}/*
242 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpc.cfg
243 %dir %{_libdir}/%{name}
244 %dir %{_libdir}/%{name}/%{version}
245 %dir %{_libdir}/%{name}/lexyacc
246 %{_libdir}/%{name}/%{version}/msg
247 %{_libdir}/%{name}/%{version}/units
249 %{_libdir}/%{name}/%{version}/ide
251 %{_libdir}/%{name}/lexyacc/*
252 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname}
253 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
257 %defattr(644,root,root,755)
261 %defattr(644,root,root,755)
266 %defattr(644,root,root,755)