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: 89c7e60db6280f3d5cc006a4a9ff43a9
17 Source1: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/i386-linux/%{name}-%{version}.i386-linux.tar
18 # Source1-md5: 3474affc41d6106c498fc5b79f883588
19 Source2: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/x86_64-linux/%{name}-%{version}.x86_64-linux.tar
20 # Source2-md5: c32c4c8e94aed6f84b34407e7ea84ecd
21 Source3: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/powerpc-linux/%{name}-%{version}.powerpc-linux.tar
22 # Source3-md5: 07f891e7552aeb21908940b05c3062a3
23 Patch0: %{name}-skip-dev-dot.patch
24 Patch1: %{name}-link.patch
25 Patch2: %{name}-gdb.patch
26 Patch3: %{name}-r22920.patch
27 URL: http://www.freepascal.org/
28 BuildRequires: binutils-static >= 3:2.17.50
29 BuildRequires: gpm-devel
30 BuildRequires: ncurses-devel
31 BuildRequires: rpmbuild(macros) >= 1.213
33 BuildRequires: gdb-lib >= 7.2-7
34 BuildRequires: python-static
35 BuildRequires: readline-static
36 BuildRequires: libselinux-static
37 BuildRequires: libsepol-static
38 BuildRequires: zlib-static
39 BuildRequires: xz-static
42 BuildRequires: tetex-fonts-jknappen
43 BuildRequires: tetex-format-pdflatex
44 BuildRequires: tetex-makeindex
45 BuildRequires: tetex-metafont
46 BuildRequires: texlive-xetex
49 Provides: fpc-bootstrap
50 ExclusiveArch: %{ix86} %{x8664} ppc
51 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 Free Pascal is a 32-bit compiler for the i386 and m68k processors.
55 Free Pascal is designed to be, as much as possible, source compatible
56 with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
57 attained), but it also enhances these languages with elements like
58 function overloading. And, unlike these ancestors, it supports
61 %description -l pl.UTF-8
62 Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
63 Free Pascal został zaprojektowany by być (jak tylko to możliwe)
64 kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal również
65 rozszerza te języki elementami takimi jak przeciążanie funkcji.
67 %description -l ru.UTF-8
68 FPC -- 32-битный компилятор Pascal, совместимый с Turbo Pascal 7.0 и
69 Delphi. Поставляется с RTL (библиотекой времени исполнения), FCL
70 (библиотекой свободных компонент), интерфейсами к gtk, ncurses, zlib,
71 mysql, postgres, ibase.
73 %description -l uk.UTF-8
74 FPC -- 32-бітний компілятор Pascal, сумісний із Turbo Pascal 7.0 та
75 Delphi. Постачається із RTL (бібліотекою часу виконання), FCL
76 (бібліотекою вільних компонент), інтерфейсами до gtk, ncurses, zlib,
77 mysql, postgres, ibase.
80 Summary: Free Pascal Compiler source files
81 Summary(pl.UTF-8): Pliki źródłowe kompilatora Free Pascal
83 Requires: %{name} = %{version}-%{release}
87 Free Pascal Compiler source files.
89 %description src -l pl.UTF-8
90 Pliki źródłowe kompilatora Free Pascal.
93 Summary: Free Pascal Compiler exaple programs
94 Summary(pl.UTF-8): Przykładowe programy do kompilatora Free Pascal
96 Requires: %{name} = %{version}-%{release}
99 Free Pascal Compiler exaple programs.
101 %description examples -l pl.UTF-8
102 Przykładowe programy do kompilatora Free Pascal.
105 Summary: Free Pascal Compiler documentation
106 Summary(pl.UTF-8): Dokumentacja do kompilatora Free Pascal
108 # doesn't require base
111 Documentation for fpc in PDF format.
113 %description doc -l pl.UTF-8
114 Dokumentacja do fpc w formacie PDF.
117 %setup -q -n %{name}build-%{version}
125 %define _bver %{version}
131 %define _bver %{version}
133 %define _barch x86_64
137 %define _bver %{version}
139 %define _barch powepc
142 cd %{name}-%{version}.%{_barch}-linux
143 tar xf binary.*-linux.tar
148 for i in ../%{name}-%{version}.%{_barch}-linux/*.tar.gz ; do
151 ln -sf `pwd`/lib/%{name}/%{_bver}/ppc* bin
156 cp -af fpcsrc/* fpc-src
157 rm -r fpc-src/{ide,tests}
161 [ -d our-ld ] || install -d our-ld
162 ln -sf %{_bindir}/ld.bfd our-ld/ld
163 export PATH=$(pwd)/our-ld:$PATH
165 PP=`pwd`/bin/lib/%{name}/%{_bver}/ppc%{_bname}
166 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
167 NEWFPDOC=`pwd`/fpcsrc/utils/fpdoc/fpdoc
169 # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
170 case "%{_build_cpu}" in
171 i386) OPTF="-OG2p1" ;;
172 i486) OPTF="-OG2p1" ;;
173 i586) OPTF="-OG2p2" ;;
174 i686) OPTF="-Og2p3" ;;
175 athlon) OPTF="-Og2p3" ;;
179 %{__make} -C fpcsrc compiler_cycle \
182 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
183 BININSTALLDIR=%{_bindir} \
188 %{__make} -C fpcsrc OPT="$OPTF -Xs -n" \
190 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
191 BININSTALLDIR=%{_bindir} \
192 GDBLIBDIR=%{_libdir} \
196 DATA2INC=`pwd`/utils/data2inc \
202 %{?with_ide: ide_clean installer_clean} \
205 utils_all %{?with_ide:ide_all installer_all}
208 export save_size=10000
209 %{__make} -j1 -C fpcdocs \
216 rm -rf $RPM_BUILD_ROOT
217 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_datadir}/fpcsrc,%{_examplesdir}/fpc}
219 cp -af fpc-src/* $RPM_BUILD_ROOT%{_datadir}/fpcsrc
221 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
222 FPCMAKE=`pwd`/fpcsrc/utils/fpcm/fpcmake
223 %{__make} -j1 -C fpcsrc \
224 compiler_distinstall \
226 packages_distinstall \
227 %{?with_ide:ide_distinstall} \
232 INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
233 INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
234 INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
235 INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
236 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
237 INSTALL_BASEDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
238 INSTALL_EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name} \
239 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
240 CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc
242 %{__make} -j1 -C install/man installman \
243 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir}
245 ln -sf ../%{_lib}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir}
247 ln -sf %{_bindir}/ld.bfd $RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}/ld
249 sh fpc-src/compiler/utils/samplecfg $RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} $RPM_BUILD_ROOT%{_sysconfdir}
250 %{__sed} -i -e "s,$RPM_BUILD_ROOT,,g" $RPM_BUILD_ROOT%{_sysconfdir}/{*.cfg,fppkg/default}
253 rm -rf $RPM_BUILD_ROOT
256 %defattr(644,root,root,755)
257 %attr(755,root,root) %{_bindir}/*
258 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpc.cfg
259 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fppkg.cfg
260 %dir %{_sysconfdir}/fppkg
261 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fppkg/default
262 %dir %{_libdir}/%{name}
263 %dir %{_libdir}/%{name}/%{version}
264 %dir %{_libdir}/%{name}/lexyacc
265 %{_libdir}/%{name}/%{version}/msg
266 %{_libdir}/%{name}/%{version}/units
268 %{_libdir}/%{name}/%{version}/ide
270 %{_libdir}/%{name}/lexyacc/*
271 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ld
272 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname}
273 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
277 %defattr(644,root,root,755)
281 %defattr(644,root,root,755)
286 %defattr(644,root,root,755)