X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=fpc.spec;h=03530ddc9ad99c0700f99702cc6045eea1de9fbe;hb=7c170f2b34add98aa802541657208f297c1856e0;hp=b65810d71f9aa8f7de79f54f1d50c9a947d912c0;hpb=6b989699bf3fb72739a98e0b40a2bf6cf6c16db9;p=packages%2Ffpc.git diff --git a/fpc.spec b/fpc.spec index b65810d..03530dd 100644 --- a/fpc.spec +++ b/fpc.spec @@ -1,43 +1,48 @@ -# TODO: -# - check why it builds all static.. -# - doesn't build on ppc/sparc :/ hgw why +# +# Conditional build: +%bcond_without ide # build with ide +%bcond_without doc # build without doc + Summary: 32-bit compiler for the i386 and m68k processors -Summary(pl.UTF-8): 32 bitowy kompilator dla procesorów i386 i m68k -Summary(ru.UTF-8): Свободный компилятор Pascal -Summary(uk.UTF-8): Вільний компілятор Pascal +Summary(pl.UTF-8): 32 bitowy kompilator dla procesorów i386 i m68k +Summary(ru.UTF-8): Свободный компилятор Pascal +Summary(uk.UTF-8): Вільний компілятор Pascal Name: fpc -Version: 2.0.4 -Release: 2 +Version: 2.4.4 +Release: 0.1 License: GPL Group: Development/Languages -Source0: ftp://ftp.freepascal.org/pub/fpc/dist/source-%{version}/%{name}build-%{version}.tar.gz -# Source0-md5: 1ff8b80d1f5f564983bb4e1550b8b53a -Source1: ftp://ftp.freepascal.org/pub/fpc/dist/i386-linux-%{version}/%{name}-%{version}.i386-linux.tar -# Source1-md5: d826aab69c98b9efe30398ff63e4c9d9 -Source2: ftp://ftp.freepascal.org/pub/fpc/dist/x86_64-linux-%{version}/%{name}-%{version}.x86_64-linux.tar -# Source2-md5: 3bbfe4c061ebd40502789eccef069d7c -Source3: ftp://ftp.freepascal.org/pub/fpc/dist/powerpc-linux-%{version}/%{name}-%{version}.powerpc-linux.tar -# Source3-md5: 6ec5302fe446d94e5aaa1e159b0d65df -# no 2.0.4 binary for sparc, 2.0.0 only -Source4: ftp://ftp.freepascal.org/pub/fpc/dist/sparc-linux-2.0.0/%{name}-2.0.0.sparc-linux.tar -# Source4-md5: dd8925ce8ce93309456c3072e6e4d14d +Source0: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/source/%{name}build-%{version}.tar.gz +# Source0-md5: d069dfd3412bd0d26dcd1b81ac998305 +Source1: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/i386-linux/%{name}-%{version}.i386-linux.tar +# Source1-md5: e761c4866ac4c8fcbe09f657f315ec32 +Source2: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/x86_64-linux/%{name}-%{version}.x86_64-linux.tar +# Source2-md5: 058e6cd765026748a2bd24c86f1ecf18 +Source3: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/powerpc-linux/%{name}-%{version}.powerpc-linux.tar +# Source3-md5: cea93e5da48c45da3147236cba75dc76 Patch0: %{name}-skip-dev-dot.patch -Patch1: %{name}-makedocs.patch -Patch2: %{name}-gdb65.patch -Patch3: %{name}-avoid-RE.patch +Patch1: %{name}-link.patch URL: http://www.freepascal.org/ BuildRequires: binutils-static >= 3:2.17.50 -BuildRequires: gdb-lib BuildRequires: gpm-devel BuildRequires: ncurses-devel BuildRequires: rpmbuild(macros) >= 1.213 +%if %{with ide} +BuildRequires: gdb-lib >= 7.2-7 +BuildRequires: python-static +BuildRequires: readline-static +BuildRequires: zlib-static +%endif +%if %{with doc} BuildRequires: tetex-fonts-jknappen BuildRequires: tetex-format-pdflatex BuildRequires: tetex-makeindex BuildRequires: tetex-metafont +BuildRequires: texlive-xetex +%endif Requires: binutils Provides: fpc-bootstrap -ExclusiveArch: %{ix86} %{x8664} ppc sparc +ExclusiveArch: %{ix86} %{x8664} ppc BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -68,7 +73,7 @@ mysql, postgres, ibase. %package src Summary: Free Pascal Compiler source files -Summary(pl.UTF-8): Pliki źródłowe kompilatora Free Pascal +Summary(pl.UTF-8): Pliki źródłowe kompilatora Free Pascal Group: Development Requires: %{name} = %{version}-%{release} Provides: fpcsrc @@ -81,7 +86,7 @@ Pliki źródłowe kompilatora Free Pascal. %package examples Summary: Free Pascal Compiler exaple programs -Summary(pl.UTF-8): Przykładowe programy do kompilatora Free Pascal +Summary(pl.UTF-8): Przykładowe programy do kompilatora Free Pascal Group: Documentation Requires: %{name} = %{version}-%{release} @@ -93,9 +98,9 @@ Przykładowe programy do kompilatora Free Pascal. %package doc Summary: Free Pascal Compiler documentation -Summary(pl.UTF-8): Dokumentacja do kompilatora Free Pascal +Summary(pl.UTF-8): Dokumentacja do kompilatora Free Pascal Group: Documentation -Requires: %{name} = %{version}-%{release} +# doesn't require base %description doc Documentation for fpc in PDF format. @@ -104,11 +109,10 @@ Documentation for fpc in PDF format. Dokumentacja do fpc w formacie PDF. %prep -%setup -q -n %{name}build_%{version}_exp +%setup -q -n %{name}build-%{version} %patch0 -p1 %patch1 -p1 -%patch2 -p1 -%patch3 -p1 + %ifarch %{ix86} tar xf %{SOURCE1} %define _bver %{version} @@ -124,11 +128,6 @@ tar xf %{SOURCE3} %define _bver %{version} %define _bname ppc %endif -%ifarch sparc -tar xf %{SOURCE4} -%define _bver 2.0.0 -%define _bname sparc -%endif tar xf binary.*-linux.tar @@ -138,26 +137,30 @@ for i in ../*.tar.gz ; do tar xzf $i done ln -sf `pwd`/lib/%{name}/%{_bver}/ppc* bin +cd .. -%build # save for fpc-src install -d fpc-src cp -af fpcsrc/* fpc-src +%build +# use ld.bfd +[ -d our-ld ] || install -d our-ld +ln -sf %{_bindir}/ld.bfd our-ld/ld +export PATH=$(pwd)/our-ld:$PATH + PP=`pwd`/bin/lib/%{name}/%{_bver}/ppc%{_bname} NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname} NEWFPDOC=`pwd`/fpcsrc/utils/fpdoc/fpdoc # DO NOT PUT $RPM_OPT_FLAGS IN OPT, IT DOES NOT WORK - baggins case "%{_build_cpu}" in - i386,i486) - OPTF="-OG2p1" ;; - i586) - OPTF="-OG2p2" ;; - i686,athlon) - OPTF="-Og2p3" ;; - *) - OPTF="-O2" ;; + i386) OPTF="-OG2p1" ;; + i486) OPTF="-OG2p1" ;; + i586) OPTF="-OG2p2" ;; + i686) OPTF="-Og2p3" ;; + athlon) OPTF="-Og2p3" ;; + *) OPTF="-O2" ;; esac %{__make} -C fpcsrc compiler_cycle \ @@ -167,7 +170,7 @@ esac BININSTALLDIR=%{_bindir} \ PP="$PP" \ FPC="$PP" \ - SMARTLINK=YES + LINKSMART=YES %{__make} -C fpcsrc OPT="$OPTF -Xs -n" \ RELEASE="1" \ @@ -176,21 +179,25 @@ esac GDBLIBDIR=%{_libdir} \ PP="$NEWPP" \ FPC="$NEWPP" \ + FPDOC=$NEWFPDOC \ DATA2INC=`pwd`/utils/data2inc \ - SMARTLINK=YES \ - rtl_clean rtl_smart \ - packages_base_smart \ - fcl_smart \ - fv_smart \ - packages_extra_smart \ - ide_all \ - utils_all - + LINKSMART=YES \ + NODOCS=YES \ + rtl_clean \ + packages_clean \ + utils_clean \ + %{?with_ide: ide_clean installer_clean} \ + rtl_all \ + packages_all \ + utils_all %{?with_ide:ide_all installer_all} + +%if %{with doc} export save_size=10000 -%{__make} -C fpcdocs \ +%{__make} -j1 -C fpcdocs \ FPDOC=$NEWFPDOC \ FPC="$NEWPP" \ pdf +%endif %install rm -rf $RPM_BUILD_ROOT @@ -200,13 +207,11 @@ cp -af fpc-src/* $RPM_BUILD_ROOT%{_datadir}/fpcsrc NEWPP=`pwd`/fpcsrc/compiler/ppc%{_bname} FPCMAKE=`pwd`/fpcsrc/utils/fpcm/fpcmake -%{__make} -C fpcsrc \ +%{__make} -j1 -C fpcsrc \ compiler_distinstall \ rtl_distinstall \ - fcl_distinstall \ - fv_distinstall \ packages_distinstall \ - ide_distinstall \ + %{?with_ide:ide_distinstall} \ utils_distinstall \ PP="$NEWPP" \ FPCMAKE="$FPCMAKE" \ @@ -221,7 +226,7 @@ FPCMAKE=`pwd`/fpcsrc/utils/fpcm/fpcmake INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} \ CODPATH=$RPM_BUILD_ROOT%{_libdir}/%{name}/lexyacc -%{__make} -C install/man installman \ +%{__make} -j1 -C install/man installman \ INSTALL_MANDIR=$RPM_BUILD_ROOT%{_mandir} ln -sf %{_libdir}/%{name}/%{version}/ppc%{_bname} $RPM_BUILD_ROOT%{_bindir} @@ -240,7 +245,9 @@ rm -rf $RPM_BUILD_ROOT %dir %{_libdir}/%{name}/lexyacc %{_libdir}/%{name}/%{version}/msg %{_libdir}/%{name}/%{version}/units +%if %{with ide} %{_libdir}/%{name}/%{version}/ide +%endif %{_libdir}/%{name}/lexyacc/* %attr(755,root,root) %{_libdir}/%{name}/%{version}/ppc%{_bname} %attr(755,root,root) %{_libdir}/%{name}/%{version}/samplecfg @@ -254,6 +261,8 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %{_examplesdir}/fpc +%if %{with doc} %files doc %defattr(644,root,root,755) %doc fpcdocs/*.pdf +%endif