diff options
author | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2019-12-31 15:11:18 +0000 |
---|---|---|
committer | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2019-12-31 15:11:18 +0000 |
commit | 34196d10e5ee69d20c1534ccb6acc97c48296249 (patch) | |
tree | 2a8e1b46e250d661710bf15a002a6f11d62b504d /lang/fpc | |
parent | ec5997fc92034903024fa8b93deb0db8b7103bdb (diff) | |
download | ports-34196d10e5ee69d20c1534ccb6acc97c48296249.tar.gz ports-34196d10e5ee69d20c1534ccb6acc97c48296249.zip |
Notes
Diffstat (limited to 'lang/fpc')
-rw-r--r-- | lang/fpc/Makefile | 11 | ||||
-rw-r--r-- | lang/fpc/Makefile.units | 3 | ||||
-rw-r--r-- | lang/fpc/distinfo | 10 | ||||
-rw-r--r-- | lang/fpc/files/patch-compiler_systems_t__bsd.pas | 50 | ||||
-rw-r--r-- | lang/fpc/files/pkg-message.in | 9 |
5 files changed, 56 insertions, 27 deletions
diff --git a/lang/fpc/Makefile b/lang/fpc/Makefile index 909ee3e05500..ab1ea01df455 100644 --- a/lang/fpc/Makefile +++ b/lang/fpc/Makefile @@ -3,7 +3,7 @@ PORTNAME= fpc PORTVERSION= 3.0.4 -PORTREVISION?= 2 +PORTREVISION?= 3 CATEGORIES?= lang MASTER_SITES= ftp://ftp.freepascal.org/pub/fpc/dist/${PORTVERSION}/source/:source \ ftp://planetmirror.com/pub/fpc/dist/${PORTVERSION}/source/:source \ @@ -28,7 +28,7 @@ USE_BINUTILS= yes BOOTVER= 3.0.4 MANVER= 3.0.4 -LDPATH= "${LOCALBASE}/bin/ld.bfd" +FPC_LDPATH?= "${LOCALBASE}/bin/ld.bfd" #USE_GITHUB= yes #GH_ACCOUNT= fpc-svn @@ -72,7 +72,8 @@ MAKE_ARGS+= FPCMAKE=${NEWFPCMAKE} \ INSTALL="${INSTALL_DATA}" \ INSTALLEXE="${INSTALL_PROGRAM}" \ INSTALLSCR="${INSTALL_SCRIPT}" \ - INSTALL_PREFIX=${STAGEDIR}${PREFIX} + INSTALL_PREFIX=${STAGEDIR}${PREFIX} \ + FPC_LDPATH=${FPC_LDPATH} NEWPPC= PP=${WRKSRC}/compiler/${PPNAME} NEWFPC= FPC=${WRKSRC}/compiler/${PPNAME} BOOTDIR= ${PPNAME}-${BOOTVER}-${OPSYS:tl} @@ -106,13 +107,15 @@ post-patch: .if ${OPSYS} == FreeBSD @${REINPLACE_CMD} -i "" -e 's|900044|${OSVERSION}|g' \ ${WRKSRC}/rtl/freebsd/${FPC_ARCH}/*.as + @${REINPLACE_CMD} -i "" -e 's|197|477|g' \ + ${WRKSRC}/rtl/freebsd/sysnr.inc .else @${REINPLACE_CMD} -i "" -e 's|400000|${DFLYVERSION}|g' \ ${WRKSRC}/rtl/dragonfly/${FPC_ARCH}/*.as .endif .if empty(ICONV_LIB) @${REINPLACE_CMD} -e "s|s<>'c'|(s<>'c') and (s<>'iconv')|" \ - -e "s|%%LDPATH%%|${LDPATH}|g" \ + -e "s|%%FPC_LDPATH%%|${FPC_LDPATH}|g" \ ${WRKDIR}/${FPCSRCDIR}/compiler/systems/t_bsd.pas @${REINPLACE_CMD} -e 's|defined(bsd) and not ||' \ ${WRKDIR}/${FPCSRCDIR}/rtl/unix/cwstring.pp diff --git a/lang/fpc/Makefile.units b/lang/fpc/Makefile.units index ee54c67df7d8..a6efd51f1753 100644 --- a/lang/fpc/Makefile.units +++ b/lang/fpc/Makefile.units @@ -32,7 +32,8 @@ MAKE_ARGS+= PP="${LOCALBASE}/bin/fpc" \ INSTALL="${INSTALL_DATA}" \ INSTALLEXE="${INSTALL_PROGRAM}" \ INSTALLSCR="${INSTALL_SCRIPT}" \ - INSTALL_PREFIX="${STAGEDIR}${PREFIX}" + INSTALL_PREFIX="${STAGEDIR}${PREFIX}" \ + FPC_LDPATH=${FPC_LDPATH} ALL_TARGET= fpc_baseinfo release .if ${PORT_OPTIONS:MEXAMPLES} && defined(HAVE_EXAMPLES) diff --git a/lang/fpc/distinfo b/lang/fpc/distinfo index 8c9e8da22029..94bb968a9b8a 100644 --- a/lang/fpc/distinfo +++ b/lang/fpc/distinfo @@ -1,9 +1,9 @@ -TIMESTAMP = 1567485058 +TIMESTAMP = 1577757794 SHA256 (freepascal/fpc-3.0.4.source.tar.gz) = 69b3b7667b72b6759cf27226df5eb54112ce3515ff5efb79d95ac14bac742845 SIZE (freepascal/fpc-3.0.4.source.tar.gz) = 40347617 -SHA256 (freepascal/ppc386-3.0.4-freebsd.tar.gz) = 5cb99da20f8b7526aacdd6f3b242debb7608127e55a65a362f78717cd2592c7a -SIZE (freepascal/ppc386-3.0.4-freebsd.tar.gz) = 1121502 -SHA256 (freepascal/ppcx64-3.0.4-freebsd.tar.gz) = c5b55d450a0835de33613ea1147245c5442525caf029f71f62dd77f771753c7e -SIZE (freepascal/ppcx64-3.0.4-freebsd.tar.gz) = 1198446 +SHA256 (freepascal/ppc386-3.0.4-freebsd.tar.gz) = e8ee85613149a40f887fe7f0ad46604fb93b52989d7212dfe7bb909bdab63859 +SIZE (freepascal/ppc386-3.0.4-freebsd.tar.gz) = 1121658 +SHA256 (freepascal/ppcx64-3.0.4-freebsd.tar.gz) = ba021dd49afedf554f9c3dddeb5b81c2728836ca95848625f80dbe5dd3c7b2d8 +SIZE (freepascal/ppcx64-3.0.4-freebsd.tar.gz) = 1198609 SHA256 (freepascal/fpc-3.0.4.man.tar.gz) = bc5357fc6e56d77eeeb5d820023f7f721f5febcc684837f296a598c6c772b26c SIZE (freepascal/fpc-3.0.4.man.tar.gz) = 47294 diff --git a/lang/fpc/files/patch-compiler_systems_t__bsd.pas b/lang/fpc/files/patch-compiler_systems_t__bsd.pas index 92098f7cc7ea..10c84b259d53 100644 --- a/lang/fpc/files/patch-compiler_systems_t__bsd.pas +++ b/lang/fpc/files/patch-compiler_systems_t__bsd.pas @@ -1,46 +1,64 @@ --- compiler/systems/t_bsd.pas 2014-12-07 15:27:02.000000000 -0500 -+++ compiler/systems/t_bsd.pas 2019-09-02 21:10:43.316197000 -0500 -@@ -146,8 +146,8 @@ ++++ compiler/systems/t_bsd.pas 2019-12-30 19:00:54.968908000 -0500 +@@ -60,6 +60,7 @@ + private + LdSupportsNoResponseFile : boolean; + LibrarySuffix : Char; ++ LdPath : String; + Function WriteResponseFile(isdll:boolean) : Boolean; + function GetDarwinCrt1ObjName(isdll: boolean): TCmdStr; + Function GetDarwinPrtobjName(isdll: boolean): TCmdStr; +@@ -139,6 +140,9 @@ + } + begin + LibrarySuffix:=' '; ++ LdPath:=GetEnvironmentVariable('FPC_LDPATH'); ++ if not FileExists(LdPath,True) then ++ LdPath:='%%FPC_LDPATH%%'; + LdSupportsNoResponseFile := (target_info.system in ([system_m68k_netbsd]+systems_darwin)); + with Info do + begin +@@ -146,8 +150,8 @@ begin if not(target_info.system in systems_darwin) then begin - ExeCmd[1]:='ld $TARGET $EMUL $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -L. -o $EXE $CATRES'; - DllCmd[1]:='ld $TARGET $EMUL $OPT -shared -L. -o $EXE $CATRES' -+ ExeCmd[1]:='%%LDPATH%% $TARGET $EMUL $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -L. -o $EXE $CATRES'; -+ DllCmd[1]:='%%LDPATH%% $TARGET $EMUL $OPT -shared -L. -o $EXE $CATRES' ++ ExeCmd[1]:=LdPath + ' $TARGET $EMUL $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -L. -o $EXE $CATRES'; ++ DllCmd[1]:=LdPath + ' $TARGET $EMUL $OPT -shared -L. -o $EXE $CATRES' end else begin -@@ -166,22 +166,22 @@ +@@ -166,22 +170,22 @@ programs with problems that require Valgrind will have more than 60KB of data (first 4KB of address space is always invalid) } - ExeCmd[1]:='ld $PRTOBJ $TARGET $EMUL $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -multiply_defined suppress -L. -o $EXE $CATRES'; -+ ExeCmd[1]:='%%LDPATH%% $PRTOBJ $TARGET $EMUL $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -multiply_defined suppress -L. -o $EXE $CATRES'; ++ ExeCmd[1]:=LdPath + ' $PRTOBJ $TARGET $EMUL $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -multiply_defined suppress -L. -o $EXE $CATRES'; if not(cs_gdb_valgrind in current_settings.globalswitches) then ExeCmd[1]:=ExeCmd[1]+' -pagezero_size 0x10000'; {$else ndef cpu64bitaddr} - ExeCmd[1]:='ld $PRTOBJ $TARGET $EMUL $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -multiply_defined suppress -L. -o $EXE $CATRES'; -+ ExeCmd[1]:='%%LDPATH%% $PRTOBJ $TARGET $EMUL $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -multiply_defined suppress -L. -o $EXE $CATRES'; ++ ExeCmd[1]:=LdPath + ' $PRTOBJ $TARGET $EMUL $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -multiply_defined suppress -L. -o $EXE $CATRES'; {$endif ndef cpu64bitaddr} if (apptype<>app_bundle) then - DllCmd[1]:='ld $PRTOBJ $TARGET $EMUL $OPT $GCSECTIONS -dynamic -dylib -multiply_defined suppress -L. -o $EXE $CATRES' -+ DllCmd[1]:='%%LDPATH%% $PRTOBJ $TARGET $EMUL $OPT $GCSECTIONS -dynamic -dylib -multiply_defined suppress -L. -o $EXE $CATRES' ++ DllCmd[1]:=LdPath + ' $PRTOBJ $TARGET $EMUL $OPT $GCSECTIONS -dynamic -dylib -multiply_defined suppress -L. -o $EXE $CATRES' else - DllCmd[1]:='ld $PRTOBJ $TARGET $EMUL $OPT $GCSECTIONS -dynamic -bundle -multiply_defined suppress -L. -o $EXE $CATRES' -+ DllCmd[1]:='%%LDPATH%% $PRTOBJ $TARGET $EMUL $OPT $GCSECTIONS -dynamic -bundle -multiply_defined suppress -L. -o $EXE $CATRES' ++ DllCmd[1]:=LdPath + ' $PRTOBJ $TARGET $EMUL $OPT $GCSECTIONS -dynamic -bundle -multiply_defined suppress -L. -o $EXE $CATRES' end end else begin - ExeCmd[1]:='ld $TARGET $EMUL $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -L. -o $EXE $RES'; - DllCmd[1]:='ld $TARGET $EMUL $OPT $INIT $FINI $SONAME -shared -L. -o $EXE $RES'; -+ ExeCmd[1]:='%%LDPATH%% $TARGET $EMUL $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -L. -o $EXE $RES'; -+ DllCmd[1]:='%%LDPATH%% $TARGET $EMUL $OPT $INIT $FINI $SONAME -shared -L. -o $EXE $RES'; ++ ExeCmd[1]:=LdPath + ' $TARGET $EMUL $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -L. -o $EXE $RES'; ++ DllCmd[1]:=LdPath + ' $TARGET $EMUL $OPT $INIT $FINI $SONAME -shared -L. -o $EXE $RES'; end; if not(target_info.system in systems_darwin) then DllCmd[2]:='strip --strip-unneeded $EXE' -@@ -192,6 +192,8 @@ +@@ -192,6 +196,8 @@ DynamicLinker:='/usr/libexec/ld.so' else if target_info.system in systems_netbsd then DynamicLinker:='/usr/libexec/ld.elf_so' @@ -49,16 +67,16 @@ else DynamicLinker:=''; end; -@@ -555,7 +557,7 @@ +@@ -555,7 +561,7 @@ While not SharedLibFiles.Empty do begin S:=SharedLibFiles.GetFirst; - if (s<>'c') or reorder then -+ if (((((((s<>'c') and (s<>'iconv')) and (s<>'iconv')) and (s<>'iconv')) and (s<>'iconv')) and (s<>'iconv')) and (s<>'iconv')) or reorder then ++ if (((((((((s<>'c') and (s<>'iconv')) and (s<>'iconv')) and (s<>'iconv')) and (s<>'iconv')) and (s<>'iconv')) and (s<>'iconv')) and (s<>'iconv')) and (s<>'iconv')) or reorder then begin i:=Pos(target_info.sharedlibext,S); if i>0 then -@@ -718,7 +720,12 @@ +@@ -718,7 +724,12 @@ Replace(cmdstr,'$DYNLINK',DynLinkStr); if (target_info.system in systems_darwin) then Replace(cmdstr,'$PRTOBJ',GetDarwinPrtobjName(false)); @@ -66,7 +84,7 @@ + if target_info.system=system_x86_64_dragonfly then + BinStr:='/usr/libexec/binutils225/elf/ld.bfd'; + if target_info.system in systems_freebsd then -+ BinStr:='%%LDPATH%%' ++ BinStr:=LdPath + else + BinStr:=FindUtil(utilsprefix+BinStr); diff --git a/lang/fpc/files/pkg-message.in b/lang/fpc/files/pkg-message.in index 4b511beb7e4d..d90535d45583 100644 --- a/lang/fpc/files/pkg-message.in +++ b/lang/fpc/files/pkg-message.in @@ -20,7 +20,14 @@ * editors/fpc-ide -5) Enjoy it ;) +5) This port add support to fp compiler to get value from FPC_LDPATH + environment variable. By default fp compiler use %%LOCALBASE%%/bin/ld.bfd for + linking binaries. If you want change this, just must be define FPC_LDPATH + with path to ld tool that will be used by fp compiler. Take on mind that fpc + only works with binutils on this moment but could work with another ld tool + later on next versions of freepascal + +6) Enjoy it ;) EOM } ] |