]> git.pld-linux.org Git - packages/fpc.git/blame - fpc.spec
- rebuild with binutils 2.24.51.0.1
[packages/fpc.git] / fpc.spec
CommitLineData
d59a3c01
BZ
1#
2# Conditional build:
938b52f5 3%bcond_without ide # build with ide
d59a3c01
BZ
4%bcond_without doc # build without doc
5
e8f622a3 6Summary: 32-bit compiler for the i386 and m68k processors
1d1a4bc8
ER
7Summary(pl.UTF-8): 32 bitowy kompilator dla procesorów i386 i m68k
8Summary(ru.UTF-8): Свободный компилятор Pascal
9Summary(uk.UTF-8): Вільний компілятор Pascal
e8f622a3 10Name: fpc
9e9ea3c1 11Version: 2.6.2
dc9d7a87 12Release: 3
3c782031 13License: GPL v2+
e8f622a3 14Group: Development/Languages
7ab23651 15Source0: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/source/%{name}build-%{version}.tar.gz
9e9ea3c1 16# Source0-md5: 89c7e60db6280f3d5cc006a4a9ff43a9
7ab23651 17Source1: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/i386-linux/%{name}-%{version}.i386-linux.tar
9e9ea3c1 18# Source1-md5: 3474affc41d6106c498fc5b79f883588
7ab23651 19Source2: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/x86_64-linux/%{name}-%{version}.x86_64-linux.tar
9e9ea3c1 20# Source2-md5: c32c4c8e94aed6f84b34407e7ea84ecd
e7da2251 21Source3: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/powerpc-linux/%{name}-%{version}.powerpc-linux.tar
9e9ea3c1 22# Source3-md5: 07f891e7552aeb21908940b05c3062a3
786da423 23Patch0: %{name}-skip-dev-dot.patch
938b52f5 24Patch1: %{name}-link.patch
04dae7e9 25Patch2: %{name}-gdb.patch
ff731c41 26Patch3: %{name}-r22920.patch
e8f622a3 27URL: http://www.freepascal.org/
3c782031 28BuildRequires: binutils-devel >= 3:2.17.50
f5681e7a 29BuildRequires: gpm-devel
41cff313 30BuildRequires: ncurses-devel
3f331815 31BuildRequires: rpmbuild(macros) >= 1.213
938b52f5 32%if %{with ide}
3c782031 33BuildRequires: expat-devel
7c170f2b 34BuildRequires: gdb-lib >= 7.2-7
3c782031
JB
35BuildRequires: python-devel
36BuildRequires: readline-devel
37BuildRequires: libselinux-devel
38BuildRequires: xz-devel
39BuildRequires: zlib-devel
938b52f5
JR
40%endif
41%if %{with doc}
42BuildRequires: tetex-fonts-jknappen
43BuildRequires: tetex-format-pdflatex
44BuildRequires: tetex-makeindex
45BuildRequires: tetex-metafont
46BuildRequires: texlive-xetex
47%endif
7da7a711 48Requires: binutils
41cff313 49Provides: fpc-bootstrap
0ba63043 50ExclusiveArch: %{ix86} %{x8664} ppc
e7e4f882 51BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
e8f622a3
AM
52
53%description
5da97089 54Free Pascal is a 32-bit compiler for the i386 and m68k processors.
55Free Pascal is designed to be, as much as possible, source compatible
56with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
57attained), but it also enhances these languages with elements like
58function overloading. And, unlike these ancestors, it supports
59multiple platforms.
e8f622a3 60
6b989699
JR
61%description -l pl.UTF-8
62Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
63Free Pascal został zaprojektowany by być (jak tylko to możliwe)
64kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal również
65rozszerza te języki elementami takimi jak przeciążanie funkcji.
e8f622a3 66
6b989699
JR
67%description -l ru.UTF-8
68FPC -- 32-битный компилятор Pascal, совместимый с Turbo Pascal 7.0 и
69Delphi. Поставляется с RTL (библиотекой времени исполнения), FCL
70(библиотекой свободных компонент), интерфейсами к gtk, ncurses, zlib,
3c3a6271 71mysql, postgres, ibase.
def44520 72
6b989699
JR
73%description -l uk.UTF-8
74FPC -- 32-бітний компілятор Pascal, сумісний із Turbo Pascal 7.0 та
75Delphi. Постачається із RTL (бібліотекою часу виконання), FCL
76(бібліотекою вільних компонент), інтерфейсами до gtk, ncurses, zlib,
3c3a6271 77mysql, postgres, ibase.
def44520 78
412a5ed9
KK
79%package src
80Summary: Free Pascal Compiler source files
1d1a4bc8 81Summary(pl.UTF-8): Pliki źródłowe kompilatora Free Pascal
412a5ed9 82Group: Development
412a5ed9 83Requires: %{name} = %{version}-%{release}
41cff313 84Provides: fpcsrc
412a5ed9
KK
85
86%description src
87Free Pascal Compiler source files.
88
6b989699
JR
89%description src -l pl.UTF-8
90Pliki źródłowe kompilatora Free Pascal.
412a5ed9 91
1eee4a0c
JR
92%package examples
93Summary: Free Pascal Compiler exaple programs
1d1a4bc8 94Summary(pl.UTF-8): Przykładowe programy do kompilatora Free Pascal
1eee4a0c 95Group: Documentation
3f331815 96Requires: %{name} = %{version}-%{release}
1eee4a0c
JR
97
98%description examples
99Free Pascal Compiler exaple programs.
100
6b989699
JR
101%description examples -l pl.UTF-8
102Przykładowe programy do kompilatora Free Pascal.
1eee4a0c 103
786da423
JR
104%package doc
105Summary: Free Pascal Compiler documentation
1d1a4bc8 106Summary(pl.UTF-8): Dokumentacja do kompilatora Free Pascal
786da423 107Group: Documentation
7ab23651 108# doesn't require base
786da423
JR
109
110%description doc
111Documentation for fpc in PDF format.
112
6b989699 113%description doc -l pl.UTF-8
786da423
JR
114Dokumentacja do fpc w formacie PDF.
115
e8f622a3 116%prep
d59a3c01 117%setup -q -n %{name}build-%{version}
786da423 118%patch0 -p1
938b52f5 119%patch1 -p1
04dae7e9 120%patch2 -p1
ff731c41 121%patch3 -p0
d59a3c01 122
d3e9323d 123%ifarch %{ix86}
786da423 124tar xf %{SOURCE1}
4e71325a 125%define _bver %{version}
d3e9323d 126%define _bname 386
04dae7e9 127%define _barch i386
d3e9323d 128%endif
3f331815 129%ifarch %{x8664}
786da423 130tar xf %{SOURCE2}
4e71325a 131%define _bver %{version}
d3e9323d 132%define _bname x64
04dae7e9 133%define _barch x86_64
d3e9323d 134%endif
add5738b 135%ifarch ppc
786da423 136tar xf %{SOURCE3}
4e71325a 137%define _bver %{version}
add5738b 138%define _bname ppc
04dae7e9 139%define _barch powepc
add5738b 140%endif
d3e9323d 141
04dae7e9 142cd %{name}-%{version}.%{_barch}-linux
786da423 143tar xf binary.*-linux.tar
04dae7e9 144cd ..
786da423
JR
145
146mkdir bin
147cd bin
04dae7e9 148for i in ../%{name}-%{version}.%{_barch}-linux/*.tar.gz ; do
786da423
JR
149 tar xzf $i
150done
4e71325a 151ln -sf `pwd`/lib/%{name}/%{_bver}/ppc* bin
938b52f5 152cd ..
786da423 153
412a5ed9
KK
154# save for fpc-src
155install -d fpc-src
156cp -af fpcsrc/* fpc-src
add634ff 157rm -r fpc-src/{ide,tests}
412a5ed9 158
008ddcda
JB
159%if 0%{?debug:1}
160find fpcsrc -name Makefile | xargs %{__sed} -i -e 's/-Xs//'
161%endif
162
938b52f5
JR
163%build
164# use ld.bfd
165[ -d our-ld ] || install -d our-ld
166ln -sf %{_bindir}/ld.bfd our-ld/ld
167export PATH=$(pwd)/our-ld:$PATH
168
4e71325a 169PP=`pwd`/bin/lib/%{name}/%{_bver}/ppc%{_bname}
80841e72 170NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
171NEWFPDOC=`pwd`/fpcsrc/utils/fpdoc/fpdoc
d3e9323d 172
ca161524 173# DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
174case "%{_build_cpu}" in
d59a3c01
BZ
175 i386) OPTF="-OG2p1" ;;
176 i486) OPTF="-OG2p1" ;;
177 i586) OPTF="-OG2p2" ;;
178 i686) OPTF="-Og2p3" ;;
179 athlon) OPTF="-Og2p3" ;;
180 *) OPTF="-O2" ;;
ca161524 181esac
182
80841e72 183%{__make} -C fpcsrc compiler_cycle \
008ddcda 184 OPT="$OPTF %{!?debug:-Xs} -n" \
d88793f7 185 RELEASE="1" \
e8f622a3
AM
186 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
187 BININSTALLDIR=%{_bindir} \
1eee4a0c 188 PP="$PP" \
94c54379 189 FPC="$PP" \
d59a3c01 190 LINKSMART=YES
94c54379 191
008ddcda 192%{__make} -C fpcsrc OPT="$OPTF %{!?debug:-Xs} -n" \
d88793f7 193 RELEASE="1" \
5edb3786
SZ
194 BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
195 BININSTALLDIR=%{_bindir} \
fee73cf5 196 GDBLIBDIR=%{_libdir} \
5edb3786 197 PP="$NEWPP" \
94c54379 198 FPC="$NEWPP" \
d59a3c01 199 FPDOC=$NEWFPDOC \
d3e9323d 200 DATA2INC=`pwd`/utils/data2inc \
d59a3c01
BZ
201 LINKSMART=YES \
202 NODOCS=YES \
203 rtl_clean \
204 packages_clean \
205 utils_clean \
206 %{?with_ide: ide_clean installer_clean} \
207 rtl_all \
208 packages_all \
938b52f5 209 utils_all %{?with_ide:ide_all installer_all}
f5681e7a 210
d59a3c01 211%if %{with doc}
786da423 212export save_size=10000
cbfcda9f 213%{__make} -j1 -C fpcdocs \
786da423
JR
214 FPDOC=$NEWFPDOC \
215 FPC="$NEWPP" \
216 pdf
d59a3c01 217%endif
786da423 218
e8f622a3
AM
219%install
220rm -rf $RPM_BUILD_ROOT
412a5ed9
KK
221install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_datadir}/fpcsrc,%{_examplesdir}/fpc}
222
223cp -af fpc-src/* $RPM_BUILD_ROOT%{_datadir}/fpcsrc
e8f622a3 224
80841e72 225NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
226FPCMAKE=`pwd`/fpcsrc/utils/fpcm/fpcmake
7be7bd7e 227%{__make} -j1 -C fpcsrc \
f5681e7a 228 compiler_distinstall \
229 rtl_distinstall \
f5681e7a 230 packages_distinstall \
d59a3c01 231 %{?with_ide:ide_distinstall} \
f5681e7a 232 utils_distinstall \
d3e9323d 233 PP="$NEWPP" \
234 FPCMAKE="$FPCMAKE" \
f5681e7a 235 SMARTLINK=YES \
8bf0c9cb 236 INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
237 INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
238 INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
239 INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
240 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
d88793f7 241 INSTALL_BASEDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
f5681e7a 242 INSTALL_EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name} \
7da7a711 243 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
d88793f7 244 CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc
d3e9323d 245
7be7bd7e 246%{__make} -j1 -C install/man installman \
80841e72 247 INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir}
9a679a53 248
fcc93709
JR
249ln -sf ../%{_lib}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir}
250
251ln -sf %{_bindir}/ld.bfd $RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}/ld
e8f622a3 252
2844e15a
JR
253sh fpc-src/compiler/utils/samplecfg $RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} $RPM_BUILD_ROOT%{_sysconfdir}
254%{__sed} -i -e "s,$RPM_BUILD_ROOT,,g" $RPM_BUILD_ROOT%{_sysconfdir}/{*.cfg,fppkg/default}
e588518e 255
e8f622a3
AM
256%clean
257rm -rf $RPM_BUILD_ROOT
258
e8f622a3
AM
259%files
260%defattr(644,root,root,755)
261%attr(755,root,root) %{_bindir}/*
3c3a6271 262%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpc.cfg
2844e15a
JR
263%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fppkg.cfg
264%dir %{_sysconfdir}/fppkg
265%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fppkg/default
e8f622a3
AM
266%dir %{_libdir}/%{name}
267%dir %{_libdir}/%{name}/%{version}
d88793f7 268%dir %{_libdir}/%{name}/lexyacc
e8f622a3 269%{_libdir}/%{name}/%{version}/msg
1eee4a0c 270%{_libdir}/%{name}/%{version}/units
d59a3c01 271%if %{with ide}
f5681e7a 272%{_libdir}/%{name}/%{version}/ide
d59a3c01 273%endif
d88793f7 274%{_libdir}/%{name}/lexyacc/*
fcc93709 275%attr(755,root,root) %{_libdir}/%{name}/%{version}/ld
d3e9323d 276%attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname}
1eee4a0c 277%attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
7da7a711 278%{_mandir}/man*/*
1eee4a0c 279
412a5ed9
KK
280%files src
281%defattr(644,root,root,755)
282%{_datadir}/fpcsrc
283
1eee4a0c
JR
284%files examples
285%defattr(644,root,root,755)
f5681e7a 286%{_examplesdir}/fpc
786da423 287
d59a3c01 288%if %{with doc}
786da423
JR
289%files doc
290%defattr(644,root,root,755)
291%doc fpcdocs/*.pdf
d59a3c01 292%endif
This page took 0.086008 seconds and 4 git commands to generate.