mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
extra/fpc to 3.2.2-10
This commit is contained in:
parent
512dbfa715
commit
890b2531a2
4 changed files with 91 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
||||||
pkgbase = fpc
|
pkgbase = fpc
|
||||||
pkgdesc = Free Pascal Compiler, Turbo Pascal 7.0 and Delphi compatible.
|
pkgdesc = Free Pascal Compiler, Turbo Pascal 7.0 and Delphi compatible.
|
||||||
pkgver = 3.2.2
|
pkgver = 3.2.2
|
||||||
pkgrel = 9
|
pkgrel = 10
|
||||||
url = http://www.freepascal.org/
|
url = http://www.freepascal.org/
|
||||||
arch = x86_64
|
arch = x86_64
|
||||||
license = GPL
|
license = GPL
|
||||||
|
@ -18,6 +18,10 @@ pkgbase = fpc
|
||||||
options = staticlibs
|
options = staticlibs
|
||||||
backup = etc/fpc.cfg
|
backup = etc/fpc.cfg
|
||||||
source = https://downloads.sourceforge.net/project/freepascal/Source/3.2.2/fpcbuild-3.2.2.tar.gz
|
source = https://downloads.sourceforge.net/project/freepascal/Source/3.2.2/fpcbuild-3.2.2.tar.gz
|
||||||
|
source = honor_SOURCE_DATE_EPOCH_in_date.patch
|
||||||
|
source = prevent_date_in_fpcdocs.patch
|
||||||
sha512sums = 75889bb54adc70a6e2cbd291476b9b12d61c8f943a05b7d16d2024de3215c935465ff43b1400c412e128e260c7f49a9c66e35c21f86cb866e671b5b60a282d82
|
sha512sums = 75889bb54adc70a6e2cbd291476b9b12d61c8f943a05b7d16d2024de3215c935465ff43b1400c412e128e260c7f49a9c66e35c21f86cb866e671b5b60a282d82
|
||||||
|
sha512sums = a2261628760e85fc0a8f427b56b6054b9bd2b3641bd5c1a9e757a4d0c307162c8cce84c4623789606bddf14f4a010fd6f3020c38928d8e8825b05e6f7e390fa1
|
||||||
|
sha512sums = 26c036ba37982881ce9ae318e32b0ccdda54a6e477dbb54953b2f64dec2ff5a484282558da821d8ec43d7616593d8482813b42623acc7b4655f739b82aa3834f
|
||||||
|
|
||||||
pkgname = fpc
|
pkgname = fpc
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
pkgname=fpc
|
pkgname=fpc
|
||||||
pkgver=3.2.2
|
pkgver=3.2.2
|
||||||
pkgrel=9
|
pkgrel=10
|
||||||
pkgdesc="Free Pascal Compiler, Turbo Pascal 7.0 and Delphi compatible."
|
pkgdesc="Free Pascal Compiler, Turbo Pascal 7.0 and Delphi compatible."
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
url="http://www.freepascal.org/"
|
url="http://www.freepascal.org/"
|
||||||
|
@ -23,8 +23,18 @@ depends=('ncurses' 'zlib' 'expat' 'binutils' 'make')
|
||||||
makedepends=(fpc)
|
makedepends=(fpc)
|
||||||
options=(zipman libtool staticlibs !lto)
|
options=(zipman libtool staticlibs !lto)
|
||||||
validpgpkeys=('F40ADB902B24264AA42E50BF92EDB04BFF325CF3')
|
validpgpkeys=('F40ADB902B24264AA42E50BF92EDB04BFF325CF3')
|
||||||
source=("https://downloads.sourceforge.net/project/freepascal/Source/${pkgver}/fpcbuild-${pkgver}.tar.gz")
|
source=("https://downloads.sourceforge.net/project/freepascal/Source/${pkgver}/fpcbuild-${pkgver}.tar.gz"
|
||||||
sha512sums=('75889bb54adc70a6e2cbd291476b9b12d61c8f943a05b7d16d2024de3215c935465ff43b1400c412e128e260c7f49a9c66e35c21f86cb866e671b5b60a282d82')
|
honor_SOURCE_DATE_EPOCH_in_date.patch
|
||||||
|
prevent_date_in_fpcdocs.patch)
|
||||||
|
sha512sums=('75889bb54adc70a6e2cbd291476b9b12d61c8f943a05b7d16d2024de3215c935465ff43b1400c412e128e260c7f49a9c66e35c21f86cb866e671b5b60a282d82'
|
||||||
|
'a2261628760e85fc0a8f427b56b6054b9bd2b3641bd5c1a9e757a4d0c307162c8cce84c4623789606bddf14f4a010fd6f3020c38928d8e8825b05e6f7e390fa1'
|
||||||
|
'26c036ba37982881ce9ae318e32b0ccdda54a6e477dbb54953b2f64dec2ff5a484282558da821d8ec43d7616593d8482813b42623acc7b4655f739b82aa3834f')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "${srcdir}"/fpcbuild-${pkgver}
|
||||||
|
patch -Np1 -i ../honor_SOURCE_DATE_EPOCH_in_date.patch
|
||||||
|
patch -Np1 -i ../prevent_date_in_fpcdocs.patch
|
||||||
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "${srcdir}"/fpcbuild-${pkgver}
|
cd "${srcdir}"/fpcbuild-${pkgver}
|
||||||
|
@ -41,7 +51,7 @@ package() {
|
||||||
|
|
||||||
export HOME="${srcdir}"
|
export HOME="${srcdir}"
|
||||||
|
|
||||||
make -j1 PREFIX="${pkgdir}"/usr install
|
make -j1 PREFIX="${pkgdir}"/usr NO_MAN_COMPRESS=1 install
|
||||||
|
|
||||||
export PATH="${pkgdir}"/usr/bin:$PATH
|
export PATH="${pkgdir}"/usr/bin:$PATH
|
||||||
|
|
||||||
|
|
55
extra/fpc/honor_SOURCE_DATE_EPOCH_in_date.patch
Normal file
55
extra/fpc/honor_SOURCE_DATE_EPOCH_in_date.patch
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
Description: Reproducible builds requires that the build time stamp is not
|
||||||
|
recorded in binaries. In FPC they are fuild in via the $INCLUDE %DATE%
|
||||||
|
directive which calls getdatestr in globals.pas. To allow reproducible builds
|
||||||
|
we should honor the SOURCE_DATE_EPOCH environment variable. To not depend on
|
||||||
|
the dateutil unit, we include the required code from that package here.
|
||||||
|
Author: Paul Gevers <elbrus@debian.org>
|
||||||
|
Author: Abou Al Montacir <abou.almontacir@sfr.fr>
|
||||||
|
|
||||||
|
Index: fpc/fpcsrc/compiler/globals.pas
|
||||||
|
===================================================================
|
||||||
|
--- fpc.orig/fpcsrc/compiler/globals.pas
|
||||||
|
+++ fpc/fpcsrc/compiler/globals.pas
|
||||||
|
@@ -559,6 +559,7 @@ interface
|
||||||
|
startsystime : TSystemTime;
|
||||||
|
|
||||||
|
function getdatestr:string;
|
||||||
|
+ Function UnixToDateTime(const AValue: Int64): TDateTime;
|
||||||
|
function gettimestr:string;
|
||||||
|
function filetimestring( t : longint) : string;
|
||||||
|
function getrealtime(const st: TSystemTime) : real;
|
||||||
|
@@ -816,12 +817,34 @@ implementation
|
||||||
|
get the current date in a string YY/MM/DD
|
||||||
|
}
|
||||||
|
var
|
||||||
|
+ Year,Month,Day: Word;
|
||||||
|
st: TSystemTime;
|
||||||
|
+ SourceDateEpoch: string;
|
||||||
|
begin
|
||||||
|
+ SourceDateEpoch := GetEnvironmentVariable('SOURCE_DATE_EPOCH');
|
||||||
|
+ if Length(SourceDateEpoch)>0 then
|
||||||
|
+ begin
|
||||||
|
+ DecodeDate(UnixToDateTime(StrToInt64(SourceDateEpoch)),Year,Month,Day);
|
||||||
|
+ getdatestr:=L0(Year)+'/'+L0(Month)+'/'+L0(Day);
|
||||||
|
+ end
|
||||||
|
+ else
|
||||||
|
+ begin
|
||||||
|
GetLocalTime(st);
|
||||||
|
getdatestr:=L0(st.Year)+'/'+L0(st.Month)+'/'+L0(st.Day);
|
||||||
|
+ end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
+ Function UnixToDateTime(const AValue: Int64): TDateTime;
|
||||||
|
+ { Code copied from fpcsrc/packages/rtl-objpas/src/inc/dateutil.inc and
|
||||||
|
+ fpcsrc/rtl/objpas/sysutils/datih.inc }
|
||||||
|
+ const
|
||||||
|
+ TDateTimeEpsilon = 2.2204460493e-16 ;
|
||||||
|
+ UnixEpoch = TDateTime(-2415018.5) + TDateTime(2440587.5) ;
|
||||||
|
+ begin
|
||||||
|
+ Result:=UnixEpoch + AValue/SecsPerDay;
|
||||||
|
+ if (UnixEpoch>=0) and (Result<-TDateTimeEpsilon) then
|
||||||
|
+ Result:=int(Result-1.0+TDateTimeEpsilon)-frac(1.0+frac(Result));
|
||||||
|
+ end;
|
||||||
|
|
||||||
|
function filetimestring( t : longint) : string;
|
||||||
|
{
|
17
extra/fpc/prevent_date_in_fpcdocs.patch
Normal file
17
extra/fpc/prevent_date_in_fpcdocs.patch
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
Description: Timestamps in fpc documentation are hindering reproducible builds
|
||||||
|
Don't add the date to the footer of docs generated by fpdoc
|
||||||
|
Author: Paul Gevers <elbrus@debian.org>
|
||||||
|
Forwarded: no
|
||||||
|
Index: fpc/fpcdocs/Makefile.fpc
|
||||||
|
===================================================================
|
||||||
|
--- fpc.orig/fpcdocs/Makefile.fpc
|
||||||
|
+++ fpc/fpcdocs/Makefile.fpc
|
||||||
|
@@ -115,7 +115,7 @@ ifeq ($(HIDEPROTECTED),YES)
|
||||||
|
FCLOPTS+= --hide-protected
|
||||||
|
endif
|
||||||
|
|
||||||
|
-FPDOCHTMLOPTS=--footer-date="mmm dd yyyy"
|
||||||
|
+FPDOCHTMLOPTS=
|
||||||
|
|
||||||
|
ifeq (chm,$(HTMLFMT))
|
||||||
|
HTMLSUFFIX:=.chm
|
Loading…
Reference in a new issue