]> git.pld-linux.org Git - packages/fpc.git/blob - fpc.spec
- WIP on debugger support in fp IDE
[packages/fpc.git] / fpc.spec
1 # TODO:
2 # - check why it builds all static..
3 # - doesn't build on ppc/sparc :/ hgw why
4 Summary:        32-bit compiler for the i386 and m68k processors
5 Summary(pl):    32 bitowy kompilator dla procesorów i386 i m68k
6 Summary(ru):    ó×ÏÂÏÄÎÙÊ ËÏÍÐÉÌÑÔÏÒ Pascal
7 Summary(uk):    ÷¦ÌØÎÉÊ ËÏÍЦÌÑÔÏÒ Pascal
8 Name:           fpc
9 Version:        2.0.4
10 Release:        0.4
11 License:        GPL
12 Group:          Development/Languages
13 Source0:        ftp://ftp.freepascal.org/pub/fpc/dist/source-%{version}/%{name}build-%{version}.tar.gz
14 # Source0-md5:  1ff8b80d1f5f564983bb4e1550b8b53a
15 Source1:        ftp://ftp.freepascal.org/pub/fpc/dist/i386-linux-%{version}/%{name}-%{version}.i386-linux.tar
16 # Source1-md5:  d826aab69c98b9efe30398ff63e4c9d9
17 Source2:        ftp://ftp.freepascal.org/pub/fpc/dist/x86_64-linux-%{version}/%{name}-%{version}.x86_64-linux.tar
18 # Source2-md5:  3bbfe4c061ebd40502789eccef069d7c
19 Source3:        ftp://ftp.freepascal.org/pub/fpc/dist/powerpc-linux-%{version}/%{name}-%{version}.powerpc-linux.tar
20 # Source3-md5:  6ec5302fe446d94e5aaa1e159b0d65df
21 # no 2.0.4 binary for sparc, 2.0.0 only
22 Source4:        ftp://ftp.freepascal.org/pub/fpc/dist/sparc-linux-2.0.0/%{name}-2.0.0.sparc-linux.tar
23 # Source4-md5:  dd8925ce8ce93309456c3072e6e4d14d
24 Patch0:         %{name}-skip-dev-dot.patch
25 Patch1:         %{name}-makedocs.patch
26 Patch2:         %{name}-gdb65.patch
27 URL:            http://www.freepascal.org/
28 BuildRequires:  binutils-static >= 2.17.50
29 BuildRequires:  ncurses-devel
30 BuildRequires:  gdb-lib
31 BuildRequires:  gpm-devel
32 BuildRequires:  rpmbuild(macros) >= 1.213
33 BuildRequires:  tetex-fonts-jknappen
34 BuildRequires:  tetex-format-pdflatex
35 BuildRequires:  tetex-makeindex
36 BuildRequires:  tetex-metafont
37 Provides:       fpc-bootstrap
38 Requires:       binutils
39 ExclusiveArch:  %{ix86} %{x8664} ppc sparc
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 Free Pascal is a 32-bit compiler for the i386 and m68k processors.
44 Free Pascal is designed to be, as much as possible, source compatible
45 with Turbo Pascal 7.0 and Delphi 4 (although this goal is not yet
46 attained), but it also enhances these languages with elements like
47 function overloading. And, unlike these ancestors, it supports
48 multiple platforms.
49
50 %description -l pl
51 Free Pascal to 32 bitowy kompilator dla procesorów i386 oraz m86k.
52 Free Pascal zosta³ zaprojektowany by byæ (jak tylko to mo¿liwe)
53 kompatybilnym z Turbo Pascal 7.0 oraz Delphi 4. Free Pascal równie¿
54 rozszerza te jêzyki elementami takimi jak przeci±¿anie funkcji.
55
56 %description -l ru
57 FPC -- 32-ÂÉÔÎÙÊ ËÏÍÐÉÌÑÔÏÒ Pascal, ÓÏ×ÍÅÓÔÉÍÙÊ Ó Turbo Pascal 7.0 É
58 Delphi. ðÏÓÔÁ×ÌÑÅÔÓÑ Ó RTL (ÂÉÂÌÉÏÔÅËÏÊ ×ÒÅÍÅÎÉ ÉÓÐÏÌÎÅÎÉÑ), FCL
59 (ÂÉÂÌÉÏÔÅËÏÊ Ó×ÏÂÏÄÎÙÈ ËÏÍÐÏÎÅÎÔ), ÉÎÔÅÒÆÅÊÓÁÍÉ Ë gtk, ncurses, zlib,
60 mysql, postgres, ibase.
61
62 %description -l uk
63 FPC -- 32-¦ÔÎÉÊ ËÏÍЦÌÑÔÏÒ Pascal, ÓÕͦÓÎÉÊ ¦Ú Turbo Pascal 7.0 ÔÁ
64 Delphi. ðÏÓÔÁÞÁ¤ÔØÓÑ ¦Ú RTL (¦Â̦ÏÔÅËÏÀ ÞÁÓÕ ×ÉËÏÎÁÎÎÑ), FCL
65 (¦Â̦ÏÔÅËÏÀ ×¦ÌØÎÉÈ ËÏÍÐÏÎÅÎÔ), ¦ÎÔÅÒÆÅÊÓÁÍÉ ÄÏ gtk, ncurses, zlib,
66 mysql, postgres, ibase.
67
68 %package src
69 Summary:        Free Pascal Compiler source files
70 Summary(pl):    Pliki ¼ród³owe kompilatora Free Pascal
71 Group:          Development
72 Provides:       fpcsrc
73 Requires:       %{name} = %{version}-%{release}
74
75 %description src
76 Free Pascal Compiler source files.
77
78 %description src -l pl
79 Pliki ¼ród³owe kompilatora Free Pascal.
80
81 %package examples
82 Summary:        Free Pascal Compiler exaple programs
83 Summary(pl):    Przyk³adowe programy do kompilatora Free Pascal
84 Group:          Documentation
85 Requires:       %{name} = %{version}-%{release}
86
87 %description examples
88 Free Pascal Compiler exaple programs.
89
90 %description examples -l pl
91 Przyk³adowe programy do kompilatora Free Pascal.
92
93 %package doc
94 Summary:        Free Pascal Compiler documentation
95 Summary(pl):    Dokumentacja do kompilatora Free Pascal
96 Group:          Documentation
97 Requires:       %{name} = %{version}
98
99 %description doc
100 Documentation for fpc in PDF format.
101
102 %description doc -l pl
103 Dokumentacja do fpc w formacie PDF.
104
105 %prep
106 %setup -q -n %{name}build_%{version}_exp
107 %patch0 -p1
108 %patch1 -p1
109 %patch2 -p1
110 %ifarch %{ix86}
111 tar xf %{SOURCE1}
112 %define _bver %{version}
113 %define _bname 386
114 %endif
115 %ifarch %{x8664}
116 tar xf %{SOURCE2}
117 %define _bver %{version}
118 %define _bname x64
119 %endif
120 %ifarch ppc
121 tar xf %{SOURCE3}
122 %define _bver %{version}
123 %define _bname ppc
124 %endif
125 %ifarch sparc
126 tar xf %{SOURCE4}
127 %define _bver 2.0.0
128 %define _bname sparc
129 %endif
130
131 tar xf binary.*-linux.tar
132
133 mkdir bin
134 cd bin
135 for i in ../*.tar.gz ; do
136         tar xzf $i
137 done
138 ln -sf `pwd`/lib/%{name}/%{_bver}/ppc* bin
139
140 %build
141 # save for fpc-src
142 install -d fpc-src
143 cp -af fpcsrc/* fpc-src
144
145 PP=`pwd`/bin/lib/%{name}/%{_bver}/ppc%{_bname}
146 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
147 NEWFPDOC=`pwd`/fpcsrc/utils/fpdoc/fpdoc
148
149 # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins
150 case "%{_build_cpu}" in
151         i386,i486)
152                 OPTF="-OG2p1" ;;
153         i586)
154                 OPTF="-OG2p2" ;;
155         i686,athlon)
156                 OPTF="-Og2p3" ;;
157         *)
158                 OPTF="-O2" ;;
159 esac
160
161 %{__make} -C fpcsrc compiler_cycle \
162         OPT="$OPTF -Xs -n" \
163         RELEASE="1" \
164         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
165         BININSTALLDIR=%{_bindir} \
166         PP="$PP" \
167         FPC="$PP" \
168         SMARTLINK=YES
169
170 %{__make} -C fpcsrc OPT="$OPTF -Xs -n" \
171         RELEASE="1" \
172         BASEINSTALLDIR=%{_libdir}/%{name}/%{version} \
173         BININSTALLDIR=%{_bindir} \
174         GDBLIBDIR=%{_libdir} \
175         PP="$NEWPP" \
176         FPC="$NEWPP" \
177         DATA2INC=`pwd`/utils/data2inc \
178         SMARTLINK=YES \
179         rtl_clean rtl_smart \
180         packages_base_smart \
181         fcl_smart \
182         fv_smart \
183         packages_extra_smart \
184         ide_all \
185         utils_all
186
187 export save_size=10000
188 %{__make} -C fpcdocs \
189         FPDOC=$NEWFPDOC \
190         FPC="$NEWPP" \
191         pdf
192
193 %install
194 rm -rf $RPM_BUILD_ROOT
195 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_mandir},%{_datadir}/fpcsrc,%{_examplesdir}/fpc}
196
197 cp -af fpc-src/* $RPM_BUILD_ROOT%{_datadir}/fpcsrc
198
199 NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname}
200 FPCMAKE=`pwd`/fpcsrc/utils/fpcm/fpcmake
201 %{__make} -C fpcsrc \
202         compiler_distinstall \
203         rtl_distinstall \
204         fcl_distinstall \
205         fv_distinstall \
206         packages_distinstall \
207         ide_distinstall \
208         utils_distinstall \
209         PP="$NEWPP" \
210         FPCMAKE="$FPCMAKE" \
211         SMARTLINK=YES \
212         INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
213         INSTALL_BINDIR=$RPM_BUILD_ROOT%{_bindir} \
214         INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
215         INSTALL_DOCDIR=$RPM_BUILD_ROOT%{_docdir} \
216         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
217         INSTALL_BASEDIR=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} \
218         INSTALL_EXAMPLEDIR=$RPM_BUILD_ROOT%{_examplesdir}/%{name} \
219         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \
220         CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc
221
222 %{__make} -C install/man installman \
223         INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir}
224
225 ln -sf %{_libdir}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir}
226
227 sh fpcsrc/compiler/utils/samplecfg %{_libdir}/%{name}/%{version} $RPM_BUILD_ROOT%{_sysconfdir}
228
229 %clean
230 rm -rf $RPM_BUILD_ROOT
231
232 %files
233 %defattr(644,root,root,755)
234 %attr(755,root,root) %{_bindir}/*
235 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/fpc.cfg
236 %dir %{_libdir}/%{name}
237 %dir %{_libdir}/%{name}/%{version}
238 %dir %{_libdir}/%{name}/lexyacc
239 %{_libdir}/%{name}/%{version}/msg
240 %{_libdir}/%{name}/%{version}/units
241 %{_libdir}/%{name}/%{version}/ide
242 %{_libdir}/%{name}/lexyacc/*
243 %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname}
244 %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg
245 %{_mandir}/man*/*
246
247 %files src
248 %defattr(644,root,root,755)
249 %{_datadir}/fpcsrc
250
251 %files examples
252 %defattr(644,root,root,755)
253 %{_examplesdir}/fpc
254
255 %files doc
256 %defattr(644,root,root,755)
257 %doc fpcdocs/*.pdf
This page took 0.044094 seconds and 4 git commands to generate.