Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > eba68d52850058d71c154afca4ed4fc6 > files > 8

fpc-3.0.4-6.mga7.src.rpm

# Attempt to fix https://ml.mageia.org/l/arc/dev/2014-10/msg00662.html
%global __requires_exclude pear\\(source/objp\\.php\\)

%ifarch aarch64
# Bootstrap the aarch64-compiler. Set this to 0 after we've bootstrapped.
%{!?_with_bootstrap: %global bootstrap 0}
%else
%{!?_with_bootstrap: %global bootstrap 0}
%endif

# debuginfo seems to be broken on i586 and arm
%ifarch %{ix86} %{arm}
%define debug_package %{nil}
%endif

Name:           fpc
Version:        3.0.4
Release:        %mkrel 6
Summary:        Free Pascal Compiler

Group:          Development/Other
License:        GPLv2+ and LGPLv2+ with exceptions
URL:            http://www.freepascal.org/
Source0:        ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/source/fpcbuild-%{version}.tar.gz
# This is only needed when we're bootstrapping.
# But it's not in an 'if defined' block, since the file has to be included in the srpm
# Thus you should enable this line when we're bootstrapping for any target
#
# Last used for aarch64 bootstrap, for the aarch64 boostrap, a compiler has been used that has
# been cross-compiled on a x86_64 system using
#  make all CPU_TARGET=aarch64 OS_TARGET=linux BINUTILSPREFIX=aarch64-linux-gnu-
# in the fpcsrc directory of fpcbuild-3.0.4.tar.gz. The compiler is then copied from
# fpcsrc/compiler/ppca64 to SOURCES dir.
#Source1:        ppca64-3.0.4
# Configuration templates:
Source2:        fpc.cft
Source3:        fppkg.cfg
Source4:        default.cft
Patch0:         fpc-3.0.4-ex71-does-not-exist.patch
# From Debian, modified for our needs:
Patch101:	fix_FTBFS_on_linux_not_amd64.patch
# From Debian:
Patch102:	add-arm64-support.patch
Patch103:	after_patch_arm64_systems.pas.patch
Patch104:	further-arm64-fixes.patch

# From Fedora, to allow -debuginfo extraction on x86
Patch200:	fpc-3.0.4-dwarfdebug.patch

ExclusiveArch:  %{arm} %{ix86} x86_64 ppc ppc64 aarch64

%if ! 0%{?bootstrap}
BuildRequires:  fpc >= 3.0.0
%endif

BuildRequires:  texlive-dist
BuildRequires:  mysql-devel
BuildRequires:  postgresql-devel

Requires:       gpm
Requires:       ncurses
Requires:       binutils

# 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

Free Pascal is a free 32/64bit Pascal Compiler. It comes with a run-time
library and is fully compatible with Turbo Pascal 7.0 and nearly Delphi
compatible. Some extensions are added to the language, like function
overloading and generics. Shared libraries can be linked. This package
contains the command-line compiler and utilities. Provided units are the
runtime library (RTL), free component library (FCL) and packages.

%package doc
Summary:        Free Pascal Compiler - documentation and examples
Group:          Documentation

%description doc

The fpc-doc package contains the documentation (in pdf format) and examples
of Free Pascal.

%package src
Summary:        Free Pascal Compiler - sources
Group:          Development/Other

%description src

The fpc-src package contains the sources of Free Pascal, for documentation or
automatical-code generation purposes.

%define smart _smart

%define fpcdebugopt -g -gl

%ifarch ppc
%define ppcname ppcppc
%define fpcarchname ppc
%endif

%ifarch x86_64
%define ppcname ppcx64
%define fpcarchname x86_64
%endif

%ifarch ppc64
%define ppcname ppcppc64
%define fpcarchname powerpc64
%endif

%ifarch %{arm}
%define ppcname ppcarm
%define fpcarchname arm
%endif

%ifarch %{ix86}
%define ppcname ppc386
%define fpcarchname i386
%endif

%ifarch aarch64
%define ppcname ppca64
%define fpcarchname aarch64
%endif

%prep
%setup -n fpcbuild-%{version} -q
%autopatch -p1

%if 0%{bootstrap}
install -Dpm755 %{_sourcedir}/%{ppcname}-3.0.4 bootstrap-bin/%{ppcname}-3.0.4
%endif

%build
# The source-files:
mkdir -p fpc_src
cp -a fpcsrc/rtl fpc_src
cp -a fpcsrc/packages fpc_src
rm -rf fpc_src/packages/extra/amunits
rm -rf fpc_src/packages/extra/winunits

%if ! 0%{?bootstrap}
%ifarch aarch64
# update Makefiles to support aarch64
fpcmake $(find . -name "Makefile.fpc")
%endif
%endif

%if 0%{?bootstrap}
STARTPP=$(pwd)/bootstrap-bin/%{ppcname}-3.0.4
%else
STARTPP=%{_bindir}/%{ppcname}
%endif
%define fpcopt -k"--build-id"
cd fpcsrc
NEWPP=`pwd`/compiler/%{ppcname}
DATA2INC=`pwd`/utils/data2inc
# FIXME: -j1 as there is a race on armv7hl - seen on "missing" `prt0.o' and 'dllprt0.o'.
make -j1 compiler_cycle FPC=${STARTPP} OPT='%{fpcopt} %{fpcdebugopt}'
make %{?_smp_mflags} rtl_clean rtl%{smart} FPC=${NEWPP} OPT='%{fpcopt}'
make %{?_smp_mflags} packages%{smart} FPC=${NEWPP} OPT='%{fpcopt}'
make %{?_smp_mflags} ide_all FPC=${NEWPP} OPT='%{fpcopt} %{fpcdebugopt}'
make %{?_smp_mflags} utils_all FPC=${NEWPP} DATA2INC=${DATA2INC} OPT='%{fpcopt} %{fpcdebugopt}'

cd ..
# FIXME: -j1 as there is a race - seen on "missing" `rtl.xct'.
make -j1 -C fpcdocs pdf FPC=${NEWPP}

%install
cd fpcsrc
NEWPP=`pwd`/compiler/%{ppcname}
NEWFPCMAKE=`pwd`/utils/fpcm/bin/%{fpcarchname}-linux/fpcmake
INSTALLOPTS="-j1 FPC=${NEWPP} FPCMAKE=${NEWFPCMAKE} \
                INSTALL_PREFIX=%{buildroot}%{_prefix} \
                INSTALL_LIBDIR=%{buildroot}%{_libdir} \
                INSTALL_BASEDIR=%{buildroot}%{_libdir}/%{name}/%{version} \
                CODPATH=%{buildroot}%{_libdir}/%{name}/lexyacc \
                INSTALL_DOCDIR=%{buildroot}%{_defaultdocdir}/%{name} \
                INSTALL_BINDIR=%{buildroot}%{_bindir}
                INSTALL_EXAMPLEDIR=%{buildroot}%{_defaultdocdir}/%{name}/examples"
make compiler_distinstall ${INSTALLOPTS}
make rtl_distinstall ${INSTALLOPTS}
make packages_distinstall ${INSTALLOPTS}
make ide_distinstall ${INSTALLOPTS}
make utils_distinstall ${INSTALLOPTS}
cd ../install
make -C doc ${INSTALLOPTS}
make -C man ${INSTALLOPTS} INSTALL_MANDIR=%{buildroot}%{_mandir}
cd ..
make -C fpcdocs pdfinstall ${INSTALLOPTS}

# create link
ln -sf ../%{_lib}/%{name}/%{version}/%{ppcname} %{buildroot}%{_bindir}/%{ppcname}

# Remove the version-number from the documentation-directory
mv %{buildroot}%{_defaultdocdir}/%{name}-%{version}/* %{buildroot}%{_defaultdocdir}/%{name}
rmdir %{buildroot}%{_defaultdocdir}/%{name}-%{version}

# 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=%{_libdir}/%{name}/\$fpcversion" -o %{buildroot}%{_libdir}/%{name}/%{version}/ide/text/fp.cfg
%{buildroot}%{_bindir}/fpcmkcfg -p -2 -o %{buildroot}%{_libdir}/%{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 fpcsrc/compiler/COPYING.txt %{buildroot}%{_defaultdocdir}/%{name}/COPYING
cp -a fpcsrc/rtl/COPYING.txt %{buildroot}%{_defaultdocdir}/%{name}/COPYING.rtl
cp -a fpcsrc/rtl/COPYING.FPC %{buildroot}%{_defaultdocdir}/%{name}/COPYING.FPC

# The source-files:
mkdir -p %{buildroot}%{_datadir}/fpcsrc
cp -a fpc_src/* %{buildroot}%{_datadir}/fpcsrc/

# Workaround:
# newer rpm versions do not allow garbage
# delete lexyacc (The hardcoded library path is necessary because 'make
# install' places this file hardcoded at usr/lib)
rm -rf %{buildroot}/usr/lib/%{name}/lexyacc


%files
%{_bindir}/*
%{_libdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}.cfg
%config(noreplace) %{_sysconfdir}/fppkg.cfg
%config(noreplace) %{_sysconfdir}/fppkg/default_%{_arch}
%dir %{_defaultdocdir}/%{name}/
%doc %{_defaultdocdir}/%{name}/NEWS
%doc %{_defaultdocdir}/%{name}/README
%doc %{_defaultdocdir}/%{name}/faq*
%doc %{_defaultdocdir}/%{name}/COPYING*
%{_mandir}/*/*

%files doc
%dir %{_defaultdocdir}/%{name}/
%doc %{_defaultdocdir}/%{name}/*.pdf
%doc %{_defaultdocdir}/%{name}/*/*

%files src
%{_datadir}/fpcsrc


%changelog
* Fri Oct 12 2018 pterjan <pterjan> 3.0.4-6.mga7
+ Revision: 1319849
- Add a Fedora patch to generate dwarf2 debug symbols on i586 instead of stabs which are not supported by find-debuginfo

* Sun Sep 23 2018 umeabot <umeabot> 3.0.4-5.mga7
+ Revision: 1297751
- Mageia 7 Mass Rebuild

* Thu Aug 09 2018 wally <wally> 3.0.4-4.mga7
+ Revision: 1250686
- non-bootstrap build

* Thu Aug 09 2018 wally <wally> 3.0.4-3.mga7
+ Revision: 1250613
- another bootstrap build for aarch64 due to a build failure
- disable debug pkg also on arm

* Wed Aug 08 2018 wally <wally> 3.0.4-2.mga7
+ Revision: 1250441
- bootstrap build for aarch64 using binary cross-compiled on x86_64
- add patches mainly from Debian to support aarch64

* Tue Mar 20 2018 kekepower <kekepower> 3.0.4-1.mga7
+ Revision: 1210555
- Update to version 3.0.4
- Add patch to remove ex71 as it does not exist
- Removed old patches

* Wed Feb 07 2018 daviddavid <daviddavid> 3.0.2-3.mga7
+ Revision: 1199422
- BR texlive-dist to fix build (for File `pdftex.def' not found)

* Sun Jul 30 2017 joequant <joequant> 3.0.2-2.mga7
+ Revision: 1132869
- fix objp.php requires issue

* Sun Jul 30 2017 joequant <joequant> 3.0.2-1.mga7
+ Revision: 1132847
- update to 3.0.2
- update to 3.0.2
- bootstrap and add debuginfo

* Sun Jul 30 2017 joequant <joequant> 3.0.0-6.mga7
+ Revision: 1132781
- disable debuginfo for i586.  Doesn't seem to work
- bump up items
- remove debuginfo for i586
- add another debug flag
- fix groups
- spec file tweaks
- rebuild
- rebuild
- update to 3.0.0

* 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