Index: head/lang/fpc/Makefile =================================================================== --- head/lang/fpc/Makefile (revision 404084) +++ head/lang/fpc/Makefile (revision 404085) @@ -1,180 +1,180 @@ # Created by: John Merryweather Cooper et al # $FreeBSD$ PORTNAME= fpc DISTVERSIONPREFIX= release_ DISTVERSION= 3_0_0 PORTREVISION?= 0 CATEGORIES?= lang MASTER_SITES= http://leaf.dragonflybsd.org/~marino/dports-src/:DragonFlybootstrap \ LOCAL/acm/freepascal/:bootstrap \ LOCAL/marino:man DISTFILES= ${DISTNAME}${EXTRACT_SUFX} DIST_SUBDIR= freepascal MAINTAINER?= freebsd-fpc@FreeBSD.org COMMENT?= Free Pascal compiler with Turbo and Delphi USES= gmake iconv ONLY_FOR_ARCHS= i386 amd64 BOOTVER= 2.6.4 MANVER= 3.0.0 USE_GITHUB= yes GH_ACCOUNT= fpc-svn GH_PROJECT= fpc FPCSRCDIR= ${GH_PROJECT}-${GH_TAGNAME} .include .if ${ARCH} == "i386" PPNAME= ppc386 FPC_ARCH= i386 PLIST_SUB= FPC_I386="" \ FPC_AMD64="@comment " .elif ${ARCH} == "amd64" PPNAME= ppcx64 FPC_ARCH= x86_64 PLIST_SUB= FPC_I386="@comment " \ FPC_AMD64="" .endif .if ${OPSYS} == FreeBSD PLIST_SUB+= FREEBSD="" .else PLIST_SUB+= FREEBSD="@comment " .endif .if !defined(PKGNAMESUFFIX) SUB_FILES= pkg-message BUILDNAME= ${FPC_ARCH}-${OPSYS:tl} PLIST_SUB+= PORTVERSION=${PORTVERSION} \ BUILDNAME=${BUILDNAME} DISTFILES+= ${BOOTDIR}.tar.gz:${OPSYS:MDragonFly}bootstrap \ fpc-${MANVER}.man.tar.gz:man NEWFPCMAKE= ${WRKDIR}/${FPCSRCDIR}/utils/fpcm/bin/${BUILDNAME}/fpcmake MAKE_ARGS+= FPCMAKE=${NEWFPCMAKE} \ FPCTARGET=${BUILDNAME} \ ARCH=${FPC_ARCH} \ OPT="${OPT}" \ BSDHIER=1 \ INSTALL="${INSTALL_DATA}" \ INSTALLEXE="${INSTALL_PROGRAM}" \ INSTALLSCR="${INSTALL_SCRIPT}" \ INSTALL_PREFIX=${STAGEDIR}${PREFIX} NEWPPC= PP=${WRKSRC}/compiler/${PPNAME} NEWFPC= FPC=${WRKSRC}/compiler/${PPNAME} BOOTDIR= ${PPNAME}-${BOOTVER}-${OPSYS:tl} BOOTPPC= PP=${WRKDIR}/${BOOTDIR} do-extract: # unpack binary distribution @${MKDIR} ${WRKDIR} @${TAR} -xzf ${_DISTDIR}/${BOOTDIR}.tar.gz \ --directory ${WRKDIR} && ${CHMOD} +x ${WRKDIR}/${BOOTDIR} # unpack man files @${TAR} -xzf ${_DISTDIR}/fpc-${MANVER}.man.tar.gz --directory ${WRKDIR} # unpack source distribution @(cd ${WRKDIR} && ${GZIP_CMD} -dc \ ${_DISTDIR}/${DISTNAME}${EXTRACT_SUFX} | \ ${TAR} -xf - \ ${FPCSRCDIR}/compiler \ ${FPCSRCDIR}/rtl \ ${FPCSRCDIR}/utils/fpcmkcfg \ ${FPCSRCDIR}/packages/fcl-base \ ${FPCSRCDIR}/packages/fcl-process \ ${FPCSRCDIR}/packages/fcl-res \ ${FPCSRCDIR}/packages/fpmkunit \ ${FPCSRCDIR}/packages/hash \ ${FPCSRCDIR}/packages/libtar \ ${FPCSRCDIR}/packages/paszlib \ ${FPCSRCDIR}/packages/rtl-objpas \ ${FPCSRCDIR}/utils/fpcm) post-patch: .if ${OPSYS} == FreeBSD @${REINPLACE_CMD} -i "" -e 's|900044|${OSVERSION}|g' \ ${WRKSRC}/rtl/freebsd/${FPC_ARCH}/*.as .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')|" \ ${WRKDIR}/${FPCSRCDIR}/compiler/systems/t_bsd.pas @${REINPLACE_CMD} -e 's|defined(bsd) and not ||' \ ${WRKDIR}/${FPCSRCDIR}/rtl/unix/cwstring.pp .endif @${REINPLACE_CMD} -e '/samplecfg/ {s/INSTALLEXE/INSTALLSCR/;}' \ ${WRKDIR}/${FPCSRCDIR}/compiler/Makefile @${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' \ ${WRKDIR}/${FPCSRCDIR}/packages/fpmkunit/src/fpmkunit.pp do-build: # build fpc compiler @${ECHO_MSG} "##### STARTING COMPILER #####" (cd ${WRKDIR}/${FPCSRCDIR}/compiler && ${SETENV} ${MAKE_ENV} \ - ${MAKE_CMD} cycle ${MAKE_ARGS} ${BOOTPPC}) + LDVER=ld.bfd ${MAKE_CMD} cycle ${MAKE_ARGS} ${BOOTPPC}) @${ECHO_MSG} "##### COMPLETE COMPILER #####" # build fpcmkcfg @${ECHO_MSG} "##### STARTING BOOTSTRAP FPMKUNIT #####" (cd ${WRKDIR}/${FPCSRCDIR}/packages/fpmkunit && ${SETENV} \ ${MAKE_ENV} ${MAKE_CMD} bootstrap ${MAKE_ARGS} ${NEWPPC}) @${ECHO_MSG} "##### COMPLETE BOOTSTRAP FPMKUNIT #####" .for component in fcl-res rtl-objpas fcl-base @${ECHO_MSG} "##### STARTING ${component:tu} #####" (cd ${WRKDIR}/${FPCSRCDIR}/packages/${component} && \ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${NEWPPC}) @${ECHO_MSG} "##### COMPLETE ${component:tu} #####" .endfor @${ECHO_MSG} "##### STARTING FPMAKE #####" (cd ${WRKDIR}/${FPCSRCDIR}/utils/fpcm && ${SETENV} \ ${MAKE_ENV} ${MAKE_CMD} release ${MAKE_ARGS} ${NEWPPC}) @${ECHO_MSG} "##### COMPLETE FPMAKE #####" .for component in hash paszlib libtar fcl-process fpmkunit @${ECHO_MSG} "##### STARTING ${component:tu} #####" (cd ${WRKDIR}/${FPCSRCDIR}/packages/${component} && ${SETENV} \ ${MAKE_ENV} ${MAKE_CMD} release ${MAKE_ARGS} ${NEWPPC}) @${ECHO_MSG} "##### COMPLETE ${component:tu} #####" .endfor @${ECHO_MSG} "##### STARTING FPCMKCFG #####" (cd ${WRKDIR}/${FPCSRCDIR}/utils/fpcmkcfg && ${SETENV} \ ${MAKE_ENV} ${MAKE_CMD} release ${MAKE_ARGS} ${NEWPPC}) @${ECHO_MSG} "##### COMPLETE FPCMKCFG #####" do-install: # Installing fpc compiler (cd ${WRKDIR}/${FPCSRCDIR}/rtl && ${SETENV} ${MAKE_ENV} \ ${MAKE_CMD} install ${MAKE_ARGS} ${NEWFPC}) # Installing fpc runtime (cd ${WRKDIR}/${FPCSRCDIR}/compiler && ${SETENV} ${MAKE_ENV} \ ${MAKE_CMD} install ${MAKE_ARGS} ${NEWFPC}) # Installing fpmkunit and its dependencies .for component in hash paszlib libtar fcl-process fpmkunit (cd ${WRKDIR}/${FPCSRCDIR}/packages/${component} && ${SETENV} \ ${MAKE_ENV} ${MAKE_CMD} install ${MAKE_ARGS} ${NEWPPC}) .endfor # Installing fpcmkcfg ${INSTALL_PROGRAM} ${WRKDIR}/${FPCSRCDIR}/utils/fpcmkcfg/bin/${BUILDNAME}/fpcmkcfg \ ${STAGEDIR}${PREFIX}/bin # Installing fpcmake ${INSTALL_PROGRAM} ${NEWFPCMAKE} ${STAGEDIR}${PREFIX}/bin # Installing manpages ${INSTALL_MAN} ${WRKDIR}/man/man1/* ${STAGEDIR}${MAN1PREFIX}/man/man1 ${INSTALL_MAN} ${WRKDIR}/man/man5/* ${STAGEDIR}${MAN1PREFIX}/man/man5 # symlinking compiler (cd ${STAGEDIR}${PREFIX}/bin && ${LN} -s ../lib/fpc/${PORTVERSION}/${PPNAME}) # creating sample configuration file ${SH} "${STAGEDIR}${PREFIX}/lib/fpc/${PORTVERSION}/samplecfg" \ "${STAGEDIR}${PREFIX}/lib/fpc/${PORTVERSION}" \ "${STAGEDIR}${PREFIX}/etc" @${REINPLACE_CMD} -i "" -e 's|${STAGEDIR}||' \ -e 's|^-Fl/usr/local/lib|-Fl${LOCALBASE}/lib;${LOCALBASE}/lib/qt4|g' \ ${STAGEDIR}${PREFIX}/etc/fpc.cfg.sample .else .include "${MASTERDIR}/Makefile.units" .endif .include Index: head/lang/fpc/files/patch-compiler_cfileutl.pas =================================================================== --- head/lang/fpc/files/patch-compiler_cfileutl.pas (nonexistent) +++ head/lang/fpc/files/patch-compiler_cfileutl.pas (revision 404085) @@ -0,0 +1,12 @@ +--- compiler/cfileutl.pas.orig 2015-11-13 21:15:29 UTC ++++ compiler/cfileutl.pas +@@ -23,9 +23,7 @@ unit cfileutl; + + {$i fpcdefs.inc} + +-{$ifndef DragonFly} + {$define usedircache} +-{$endif DragonFly} + + interface + Property changes on: head/lang/fpc/files/patch-compiler_cfileutl.pas ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/lang/fpc/files/patch-compiler_systems_t__bsd.pas =================================================================== --- head/lang/fpc/files/patch-compiler_systems_t__bsd.pas (nonexistent) +++ head/lang/fpc/files/patch-compiler_systems_t__bsd.pas (revision 404085) @@ -0,0 +1,23 @@ +--- compiler/systems/t_bsd.pas.orig 2015-11-13 21:15:29 UTC ++++ compiler/systems/t_bsd.pas +@@ -192,6 +192,8 @@ begin + DynamicLinker:='/usr/libexec/ld.so' + else if target_info.system in systems_netbsd then + DynamicLinker:='/usr/libexec/ld.elf_so' ++ else if target_info.system=system_x86_64_dragonfly then ++ DynamicLinker:='/libexec/ld-elf.so.2' + else + DynamicLinker:=''; + end; +@@ -718,7 +720,10 @@ begin + Replace(cmdstr,'$DYNLINK',DynLinkStr); + if (target_info.system in systems_darwin) then + Replace(cmdstr,'$PRTOBJ',GetDarwinPrtobjName(false)); +- BinStr:=FindUtil(utilsprefix+BinStr); ++ if target_info.system=system_x86_64_dragonfly then ++ BinStr:='/usr/libexec/binutils225/elf/ld.bfd' ++ else ++ BinStr:=FindUtil(utilsprefix+BinStr); + + { create dsym file? } + extdbgbinstr:=''; Property changes on: head/lang/fpc/files/patch-compiler_systems_t__bsd.pas ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/lang/fpc/files/patch-rtl_bsd_ossysc.inc =================================================================== --- head/lang/fpc/files/patch-rtl_bsd_ossysc.inc (nonexistent) +++ head/lang/fpc/files/patch-rtl_bsd_ossysc.inc (revision 404085) @@ -0,0 +1,14 @@ +--- rtl/bsd/ossysc.inc.orig 2015-11-13 21:15:29 UTC ++++ rtl/bsd/ossysc.inc +@@ -282,7 +282,11 @@ begin + repeat + novalid:=false; + CurEntry:=pdirent(dirp^.dd_rewind); ++{$ifdef dragonfly} ++ RecLen:=(CurEntry^.d_namlen + 24) and $FFFFFFF8; ++{$else} + RecLen:=CurEntry^.d_reclen; ++{$endif} + if RecLen<>0 Then + begin {valid direntry?} + if CurEntry^.d_fileno<>0 then Property changes on: head/lang/fpc/files/patch-rtl_bsd_ossysc.inc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/lang/fpc/files/patch-rtl_bsd_ostypes.inc =================================================================== --- head/lang/fpc/files/patch-rtl_bsd_ostypes.inc (nonexistent) +++ head/lang/fpc/files/patch-rtl_bsd_ostypes.inc (revision 404085) @@ -0,0 +1,27 @@ +--- rtl/bsd/ostypes.inc.orig 2015-11-13 21:15:29 UTC ++++ rtl/bsd/ostypes.inc +@@ -145,6 +145,16 @@ TYPE + + { directory services } + {$ifndef darwinarm} ++{$ifdef dragonfly} ++ dirent = record ++ d_fileno : ino_t; // file number of entry ++ d_namlen : cuint16; // strlen (d_name) ++ d_type : cuint8; // file type, see below ++ d_unused1 : cuint8; // padding, reserved ++ d_unused2 : cuint32; // reserved ++ d_name : array[0..255] of char; // name, null terminated ++ end; ++{$else} + dirent = record + d_fileno : cuint32; // file number of entry + d_reclen : cuint16; // length of this record +@@ -152,6 +162,7 @@ TYPE + d_namlen : cuint8; // length of string in d_name + d_name : array[0..(255 + 1)-1] of char; // name must be no longer than this + end; ++{$endif} + {$else not darwinarm} + {$packrecords 4} + { available on Mac OS X 10.6 and later, and used by all iPhoneOS versions } Property changes on: head/lang/fpc/files/patch-rtl_bsd_ostypes.inc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property