Name: fpc Version: 3.2.2 Release: 2mamba Summary: A Turbo Pascal 7.0 and Delphi compatible 32bit Pascal Compiler Group: Applications/Development Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: https://www.freepascal.org/ Source: http://downloads.sourceforge.net/project/freepascal/Source/%{version}/fpcbuild-%{version}.zip Patch0: fpc-3.2.2-fix-lib-paths-on-aarch64.patch Patch1: fpc-3.2.2-glibc-2.34.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel ## AUTOBUILDREQ-END BuildRequires: dos2unix Requires(post): %{__install_info} Requires(preun): %{__install_info} %description Free Pascal is a 32, 64 and 16 bit professional Pascal compiler. It can target multiple processor architectures: Intel x86, AMD64/x86-64, PowerPC, PowerPC64, SPARC, and ARM. Supported operating systems include Linux, FreeBSD, Haiku, Mac OS X/iOS/Darwin, DOS, Win32, Win64, WinCE, OS/2, MorphOS, Nintendo GBA, Nintendo DS, and Nintendo Wii. Additionally, support for the JVM, MIPS (big and little endian variants), i8086, Motorola 68k and AArch64 architectures is available in the development versions. %package src Summary: Free Pascal Compiler - sources Group: Development/Libraries %description src The fpc-src package contains the sources of Free Pascal, for documentation or automatical-code generation purposes. %debug_package %prep %setup -q -n %{name}build-%{version} #-D -T #:<< _EOF cd fpcsrc dos2unix -R compiler/systems/t_linux.pas dos2unix -R rtl/linux/*/* %patch 0 -p0 -b .fix-lib-paths-on-aarch64 %patch 1 -p1 -b .glibc-2.34 cd .. if [ ! -e %{_bindir}/fpc ]; then # bootstrap %ifarch %{ix86} BINARY_ARCH=i386 %else BINARY_ARCH=%{_target_cpu} %endif BINARY_SRC="https://downloads.sourceforge.net/project/freepascal/Linux/%{version}/fpc-%{version}.${BINARY_ARCH}-linux.tar" curl -L $BINARY_SRC -o fpc.tar tar xf fpc.tar mv fpc-%{version}.$BINARY_ARCH-linux bootstrap cd bootstrap echo `pwd`/../bootstrap | ./install.sh cd .. fi dos2unix ./fpcsrc/compiler/utils/samplecfg dos2unix ./install/beos/samplecfg %build #:<< _EOF # Save the source-files mkdir -p fpc_src cp -a fpcsrc/rtl fpc_src cp -a fpcsrc/packages fpc_src if [ ! -e %{_bindir}/fpc ]; then cd fpcsrc/compiler ../../bootstrap/bin/fpcmake -Tall cd ../.. %make build NOGDB=1 FPCPROG=`pwd`/bootstrap/bin/fpc else cd fpcsrc/compiler fpcmake -Tall cd ../.. %make build NOGDB=1 fi %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" if [ ! -e %{_bindir}/fpc ]; then %makeinstall \ INSTALL_PREFIX=%{buildroot}%{_prefix} \ INSTALL_LIBDIR=%{buildroot}%{_libdir} \ INSTALL_MANDIR=%{buildroot}%{_mandir} \ INSTALL_BASEDIR=%{buildroot}%{_libdir}/%{name}/%{version} \ CODPATH=%{buildroot}%{_libdir}/%{name}/lexyacc \ INSTALL_DOCDIR=%{buildroot}%{_docdir}/%{name} \ INSTALL_BINDIR=%{buildroot}%{_bindir} \ INSTALL_EXAMPLEDIR=%{buildroot}%{_docdir}/%{name}/examples \ FPCPROG=`pwd`/bootstrap/bin/fpc install -d %{buildroot}%{_sysconfdir} sed -i "s|^FPCBIN=.*|FPCBIN=fpc|" bootstrap/lib/fpc/%{version}/samplecfg PATH=$PWD/bootstrap/bin:$PATH \ bootstrap/lib/fpc/%{version}/samplecfg \ %{_libdir}/fpc/%{version} \ %{buildroot}%{_sysconfdir} else %makeinstall \ INSTALL_PREFIX=%{buildroot}%{_prefix} \ INSTALL_LIBDIR=%{buildroot}%{_libdir} \ INSTALL_MANDIR=%{buildroot}%{_mandir} \ INSTALL_BASEDIR=%{buildroot}%{_libdir}/%{name}/%{version} \ CODPATH=%{buildroot}%{_libdir}/%{name}/lexyacc \ INSTALL_DOCDIR=%{buildroot}%{_docdir}/%{name} \ INSTALL_BINDIR=%{buildroot}%{_bindir} \ INSTALL_EXAMPLEDIR=%{buildroot}%{_docdir}/%{name}/examples install -d %{buildroot}%{_sysconfdir} %{buildroot}%{_libdir}/fpc/%{version}/samplecfg \ %{_libdir}/fpc/%{version} \ %{buildroot}%{_sysconfdir} fi %ifarch x86_64 ln -s %{_libdir}/fpc/%{version}/ppcx64 %{buildroot}%{_bindir}/ppcx64 %endif %ifarch %{ix86} ln -s %{_libdir}/fpc/%{version}/ppc386 %{buildroot}%{_bindir}/ppc386 %endif %ifarch aarch64 ln -s %{_libdir}/fpc/%{version}/ppcaarch64 %{buildroot}%{_bindir}/ppcaarch64 %endif # Strip buildroot from paths sed -i "s|%{buildroot}||" %{buildroot}%{_sysconfdir}/fpc.cfg # use -fPIC by default cat >> %{buildroot}%{_sysconfdir}/fpc.cfg << _EOF #ifdef cpux86_64 # for x86_64 use -fPIC by default -Cg #endif _EOF # Install the source-files mkdir -p %{buildroot}%{_datadir}/fpcsrc cp -a fpc_src/* %{buildroot}%{_datadir}/fpcsrc/ rm -rf %{buildroot}/usr/lib/%{name}/lexyacc %find_lang %{name} || touch %{name}.lang %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %files %defattr(-,root,root) %config %{_sysconfdir}/fpc.cfg %ifnarch aarch64 %config %{_sysconfdir}/fppkg.cfg %dir %{_sysconfdir}/fppkg %config %{_sysconfdir}/fppkg/default %endif %{_bindir}/* %{_libdir}/libpas2jslib.so %dir %{_libdir}/fpc %{_libdir}/fpc/* %{_mandir}/man1/*.1* %{_mandir}/man5/*.5* %dir %{_docdir}/fpc-* %{_docdir}/fpc-*/* %dir %{_docdir}/fpc %{_docdir}/fpc/* %doc fpcsrc/rtl/COPYING.FPC %files src %defattr(-,root,root) %dir %{_datadir}/fpcsrc %{_datadir}/fpcsrc/* %changelog * Wed Nov 27 2024 Silvan Calarco 3.2.2-2mamba - add fpc-src subpackage * Thu May 27 2021 Automatic Build System 3.2.2-1mamba - automatic version update by autodist * Sun Jul 05 2020 Automatic Build System 3.2.0-1mamba - automatic version update by autodist * Sun Dec 24 2017 Automatic Build System 3.0.4-1mamba - automatic version update by autodist * Tue Mar 07 2017 Automatic Build System 3.0.2-1mamba - automatic version update by autodist * Thu Dec 10 2015 Automatic Build System 3.0.0-1mamba - automatic version update by autodist * Sun Oct 25 2015 Silvan Calarco 2.6.4-1mamba - package created using the webbuild interface