# Attempt to fix https://ml.mageia.org/l/arc/dev/2014-10/msg00662.html %global __requires_exclude pear\\(source/objp\\.php\\) # (cjw) to bootstrap fpc for a new architecture ARCH, run # rpm -bb --define 'cross_target $ARCH' --target $ARCH fpc.spec %define bootstrap 0 %define build_cross %{?cross_target:1}%{!?cross_target:0} %define cross_prefix %{?cross_target:cross-%{cross_target}-} %if %{build_cross} %define fpc_target %{cross_target} %else %define fpc_target %_arch %endif %if %{fpc_target} == ppc %define fpc_target powerpc %endif %define fpc_short_target %_target_cpu %if %{fpc_short_target} == x86_64 %define fpc_short_target x64 %endif %if %{fpc_short_target} == armv5tl %define fpc_short_target arm %endif %if %{fpc_short_target} == armv7hl %define fpc_short_target arm %endif %if %{fpc_short_target} == i586 %define fpc_short_target 386 %endif %define fpcversion %{version} %define fpcdir %{_prefix}/lib/%{name}/%{fpcversion} %define docdir %{_datadir}/doc/fpc-%{fpcversion} %define builddocdir %{buildroot}%{docdir} %define buildmandir %{buildroot}%{_datadir} %define buildbindir %{buildroot}%{_bindir} %define buildlibdir %{buildroot}%{_libdir} %define buildexampledir %{builddocdir}/examples Name: fpc Version: 2.6.4 Release: %mkrel 14 ExclusiveArch: %{ix86} ppc x86_64 %arm License: GPLv2+ and LGPLv2+ with exceptions Group: Development/Other Source: http://surfnet.dl.sourceforge.net/sourceforge/freepascal/%{name}-%{version}.source.tar.gz Source2: fpc.cft Source3: fppkg.cfg Source4: default.cft #Source10 and Source11 only needed for bootstrap #Source10: ftp://ftp.freepascal.org/pub/fpc/dist/2.6.2/bootstrap/i386-linux-ppc386.bz2 #Source11: ftp://ftp.freepascal.org/pub/fpc/dist/2.6.2/bootstrap/x86_64-linux-ppcx64.bz2 Source12: ftp://ftp.freepascal.org/pub/fpc/dist/2.6.2/bootstrap/arm-linux-ppcarm.bz2 Patch0: fpc-2.6.2-r22920.patch Summary: Free Pascal Compiler URL: http://www.freepascal.org/ Requires: binutils # Sad but true :( %if ! %{bootstrap} BuildRequires: fpc %endif BuildRequires: texlive BuildRequires: mysql-devel BuildRequires: postgresql-devel %if %{build_cross} BuildRequires: cross-%{cross_target}-binutils %endif # Fix bug 8805 - needed for ptcGraph Requires: glibc-devel Requires: gcc Requires: libx11-devel Requires: libxext-devel Requires: libxrandr-devel Requires: libxxf86vm-devel Requires: libxxf86dga-devel %description The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible 32bit Pascal Compiler. It comes with fully TP 7.0 compatible run-time library. Some extensions are added to the language, like function overloading. Shared libraries can be linked. Basic Delphi support is already implemented (classes, exceptions,ansistrings,RTTI). This package contains commandline compiler and utils. Provided units are the runtime library (RTL), free component library (FCL), gtk,ncurses,zlib, mysql,postgres,ibase bindings. %package src # Needed for e.g. lazarus Summary: Source code of Free Pascal Compiler Group: Development/Other %description src The source code of Freepascal for documentation and code generation purposes. %prep %setup -q %patch0 -p1 %if %{bootstrap} %ifarch %ix86 cp %{_sourcedir}/i386-linux-ppc386.bz2 . bunzip2 i386-linux-ppc386.bz2 chmod 755 i386-linux-ppc386 %endif %ifarch %arm cp %{_sourcedir}/arm-linux-ppcarm.bz2 . bunzip2 arm-linux-ppcarm.bz2 chmod 755 arm-linux-ppcarm %else cp %{_sourcedir}/x86_64-linux-ppcx64.bz2 . bunzip2 x86_64-linux-ppcx64.bz2 chmod 755 x86_64-linux-ppcx64 %endif %endif # (anssi 12/2007) temporary to allow build with our unofficial 2.1.1: %if "%(rpm -q --qf '%%{version}' fpc 2>/dev/null)" == "2.1.1" cp -a rtl/linux/Makefile rtl/linux/Makefile.real perl -pi -e "s, fmtbcd , ," rtl/linux/Makefile perl -pi -e "s,if FPC_PATCH<2,ifdef FOOMDV," compiler/pp.pas %endif %if %{_target_cpu} == armv7hl sed -i 's|/lib/ld-linux.so.3|/usr/lib/ld-linux-armhf.so.3|' compiler/systems/t_linux.pas %endif %build mkdir -p fpc_src cp -a rtl packages fpc_src rm -rf fpc_src/packages/extra/amunits rm -rf fpc_src/packages/extra/winunits %define fpcdebugopt -gl %if %{build_cross} fpcmake -T%{fpc_target}-linux %endif %if %{build_cross} EXTRA_FLAGS="CPU_TARGET=%{fpc_target} BINUTILSPREFIX=%{cross_target}-linux-" NEWPP=`pwd`/compiler/ppcross%{fpc_short_target} %else EXTRA_FLAGS= NEWPP=`pwd`/compiler/ppc%{fpc_short_target} %endif NEWFPDOC=`pwd`/utils/fpdoc/fpdoc # (anssi 12/2007) -dVER2_0 fixes build with fpc 2.1.1. # Build twice due to fmtbcd borkage, see above. # Also, on x86 TARGET_LOADERS hack is needed with 2.1.1. make compiler_cycle ${EXTRA_FLAGS} \ %if %{bootstrap} %ifarch %ix86 FPC=`pwd`/i386-linux-ppc386 \ %endif %ifarch %arm FPC=`pwd`/arm-linux-ppcarm \ %else FPC=`pwd`/x86_64-linux-ppcx64 \ %endif %endif %if "%(rpm -q --qf '%%{version}' fpc 2>/dev/null)" == "2.1.1" FPC="fpc -dVER2_0" \ %ifarch %ix86 TARGET_LOADERS="prt0 dllprt0 cprt0 gprt0" %endif # cp -af rtl/linux/Makefile.real rtl/linux/Makefile cp -a ${NEWPP} bootstrapmdvfpc make compiler_cycle ${EXTRA_FLAGS} FPC="$(pwd)/bootstrapmdvfpc %{fpcdebugopt}" %endif # make rtl_clean rtl_smart FPC=${NEWPP} ${EXTRA_FLAGS} make packages_smart FPC=${NEWPP} ${EXTRA_FLAGS} make ide_all FPC="${NEWPP} ${EXTRA_FLAGS} %{fpcdebugopt}" make utils_all FPC="${NEWPP} ${EXTRA_FLAGS} %{fpcdebugopt}" #%if !%{build_cross} # make -C docs pdf FPDOC=${NEWFPDOC} FPC=${NEWPP} ${EXTRA_FLAGS} #%endif %install #NEWPPUFILES=`pwd`/utils/ppufiles %if %{build_cross} EXTRA_FLAGS="CPU_TARGET=%{fpc_target} BINUTILSPREFIX=%{cross_target}-linux-" NEWPP=`pwd`/compiler/ppcross%{fpc_short_target} NEWFCPMAKE=/usr/bin/fpcmake %else EXTRA_FLAGS= NEWPP=`pwd`/compiler/ppc%{fpc_short_target} NEWFCPMAKE=`pwd`//utils/fpcm/fpcmake %endif INSTALLOPTS="FPC=${NEWPP} INSTALL_PREFIX=%{buildroot}/%{_prefix} \ INSTALL_LIBDIR=%{buildlibdir} \ INSTALL_DOCDIR=%{builddocdir} \ INSTALL_BINDIR=%{buildbindir}" make compiler_distinstall ${INSTALLOPTS} FPCMAKE=${NEWFCPMAKE} ${EXTRA_FLAGS} make rtl_distinstall ${INSTALLOPTS} FPCMAKE=${NEWFCPMAKE} ${EXTRA_FLAGS} make packages_distinstall ${INSTALLOPTS} FPCMAKE=${NEWFCPMAKE} ${EXTRA_FLAGS} make ide_distinstall ${INSTALLOPTS} FPCMAKE=${NEWFCPMAKE} ${EXTRA_FLAGS} make utils_distinstall ${INSTALLOPTS} FPCMAKE=${NEWFCPMAKE} ${EXTRA_FLAGS} %if %{build_cross} rm -rf %{buildexampledir} %endif # create link ln -sf %{fpcdir}/ppc%{fpc_short_target} %{buildroot}%{_bindir}/ppc%{fpc_short_target} # Create a version independent compiler-configuration file with build-id # enabled by default # For this purpose some non-default templates are used. So the samplecfg # script could not be used and fpcmkcfg is called directly. %{buildroot}%{_bindir}/fpcmkcfg -p -t %{SOURCE2} -d "basepath=%{_exec_prefix}" -o %{buildroot}%{_sysconfdir}/fpc.cfg # Create the IDE configuration files %{buildroot}%{_bindir}/fpcmkcfg -p -1 -d "basepath=%{_prefix}/lib/%{name}/\$fpcversion" -o %{buildroot}%{_prefix}/lib/%{name}/%{version}/ide/text/fp.cfg %{buildroot}%{_bindir}/fpcmkcfg -p -2 -o %{buildroot}%{_prefix}/lib/%{name}/%{version}/ide/text/fp.ini # Create the fppkg configuration files %{buildroot}%{_bindir}/fpcmkcfg -p -t %{SOURCE3} -d CompilerConfigDir=%{_sysconfdir}/fppkg -d arch=%{_arch} -o %{buildroot}%{_sysconfdir}/fppkg.cfg %{buildroot}%{_bindir}/fpcmkcfg -p -t %{SOURCE4} -d fpcbin=%{_bindir}/fpc -d GlobalPrefix=%{_exec_prefix} -d lib=lib -o %{buildroot}%{_sysconfdir}/fppkg/default_%{_arch} # Include the COPYING-information for the compiler/rtl/fcl in the documentation cp -a compiler/COPYING.txt %{buildroot}%{_defaultdocdir}/%{name}-%{version}/COPYING cp -a rtl/COPYING.txt %{buildroot}%{_defaultdocdir}/%{name}-%{version}/COPYING.rtl cp -a rtl/COPYING.FPC %{buildroot}%{_defaultdocdir}/%{name}-%{version}/COPYING.FPC # The source-files: mkdir -p %{buildroot}%{_datadir}/fpcsrc cp -a fpc_src/* %{buildroot}%{_datadir}/fpcsrc/ %post # Create config %{fpcdir}/samplecfg %{fpcdir} %files %doc %{_defaultdocdir}/%{name}-%{version} %{_bindir}/* %{_prefix}/lib/fpc %config(noreplace) %{_sysconfdir}/%{name}.cfg %config(noreplace) %{_sysconfdir}/fppkg.cfg %config(noreplace) %{_sysconfdir}/fppkg/default_%{_arch} #%if !%{build_cross} #%{_mandir}/*/* #%endif %files src %{_datadir}/fpcsrc %changelog * Mon Jun 27 2016 pterjan <pterjan> 2.6.4-14.mga6 + Revision: 1037888 - Fix build on armv7hl * Fri Jun 03 2016 pterjan <pterjan> 2.6.4-13.mga6 + Revision: 1020064 - Fix build on armv7hl + umeabot <umeabot> - Mageia 6 Mass Rebuild * Wed Dec 02 2015 neoclust <neoclust> 2.6.4-11.mga6 + Revision: 907725 - Fix spec file arm ordering - Rebuild as fpc partially build and BS does not allow to resubmit - Add ARM bootstrap support * Thu Sep 17 2015 tv <tv> 2.6.4-8.mga6 + Revision: 880027 - reenable debuginfo & fix empty debuginfo (patch 2) * Wed Sep 09 2015 neoclust <neoclust> 2.6.4-7.mga6 + Revision: 875175 - Fix build with new rpm ( empty debuginfo) * Fri Oct 17 2014 akien <akien> 2.6.4-6.mga5 + Revision: 777886 - Fix regexp from previous commit * Fri Oct 17 2014 akien <akien> 2.6.4-5.mga5 + Revision: 777277 - Exclude wrong pear auto requires * Wed Oct 15 2014 umeabot <umeabot> 2.6.4-4.mga5 + Revision: 743602 - Second Mageia 5 Mass Rebuild * Wed Oct 01 2014 tv <tv> 2.6.4-3.mga5 + Revision: 733985 - rebuild for pear deps * Tue Sep 16 2014 umeabot <umeabot> 2.6.4-2.mga5 + Revision: 679316 - Mageia 5 Mass Rebuild * Wed May 21 2014 zezinho <zezinho> 2.6.4-1.mga5 + Revision: 624677 - new version * Thu Feb 06 2014 stormi <stormi> 2.6.2-5.mga5 + Revision: 584590 - remove binaries from SOURCE, were only needed to bootstrap * Wed Oct 23 2013 wally <wally> 2.6.2-5.mga4 + Revision: 546717 - disable bootstrap * Wed Oct 23 2013 wally <wally> 2.6.2-4.mga4 + Revision: 546713 - bootstrap build to fix requires (as fpc requires itself to build) - fix requires * Sat Oct 19 2013 umeabot <umeabot> 2.6.2-3.mga4 + Revision: 528374 - Mageia 4 Mass Rebuild + joequant <joequant> - add config files - add fpc requires + dams <dams> - clean specfile * Sat Jun 08 2013 joequant <joequant> 2.6.2-1.mga4 + Revision: 440523 - update to 2.6.2 * Sun Mar 17 2013 zezinho <zezinho> 2.6.0-3.mga3 + Revision: 403557 - fix #9215 gcc is not required * Fri Jan 11 2013 umeabot <umeabot> 2.6.0-2.mga3 + Revision: 350793 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sat Mar 03 2012 dams <dams> 2.6.0-1.mga2 + Revision: 217609 - new version 2.6.0 - clean spec file * Sat Sep 03 2011 ovitters <ovitters> 2.4.4-1.mga2 + Revision: 138311 - new version 2.4.4 * Fri May 13 2011 dmorgan <dmorgan> 2.4.0-2.mga1 + Revision: 97844 - Rebuild after bootstrapping - imported package fpc * Thu Jan 07 2010 Frederik Himpe <fhimpe@mandriva.org> 2.4.0-1mdv2010.1 + Revision: 487339 - Update to new version 2.4.0 * Tue Oct 06 2009 Anssi Hannula <anssi@mandriva.org> 2.2.4-2mdv2010.0 + Revision: 455139 - provide fpc-src package containing source code (needed for e.g. lazarus) * Wed May 13 2009 Frederik Himpe <fhimpe@mandriva.org> 2.2.4-1mdv2010.0 + Revision: 375519 - update to new version 2.2.4 * Tue Aug 12 2008 Frederik Himpe <fhimpe@mandriva.org> 2.2.2-1mdv2009.0 + Revision: 271218 - Update to new version 2.2.2 - Fix license * Tue Jun 17 2008 Thierry Vignaud <tvignaud@mandriva.com> 2.2.0-2mdv2009.0 + Revision: 220961 - rebuild * Thu Dec 27 2007 Anssi Hannula <anssi@mandriva.org> 2.2.0-1mdv2008.1 + Revision: 138282 - 2.2.0 - add hacks to allow bootstrap with 2.1.1 + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Thierry Vignaud <tvignaud@mandriva.com> - kill re-definition of %%buildroot on Pixel's request * Thu May 10 2007 Lenny Cartier <lenny@mandriva.org> 2.1.1-0.4mdv2008.0 + Revision: 26180 - Requires gcc * Mon Oct 23 2006 Christiaan Welvaart <cjw@daneel.dyndns.org> + 2006-10-23 21:31:45 (72131) - fix fpcdir for x86-64 (lib64 -> lib) * Mon Oct 23 2006 Christiaan Welvaart <cjw@daneel.dyndns.org> + 2006-10-23 21:28:19 (72130) Import fpc * Tue Jan 10 2006 Christiaan Welvaart <cjw@daneel.dyndns.org> 2.1.1-0.2mdk - add x86_64 to supported archs - fix bootstrapping for x86_64 * Thu Dec 29 2005 Lenny Cartier <lenny@mandriva.com> 2.1.1-0.1mdk - 2.1.1 - docs have disappeared/moved... if someone knows * Fri Aug 19 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 2.0.0-2mdk - add ppc to supported archs - add some infrastructure for cross bootstrap builds * Tue May 17 2005 Erwan Velu <velu@seanodes.com> 2.0.0-1mdk - 2.0.0 * Thu Feb 26 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 1.0.10-3mdk - own %%{_libdir}/fpc * Tue Nov 25 2003 Götz Waschk <waschk@linux-mandrake.com> 1.0.10-2mdk - fix man page location