aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2015-01-09 20:00:30 +0000
committerJohn Marino <marino@FreeBSD.org>2015-01-09 20:00:30 +0000
commitfe0e6bcacc782a7db3826ef2a1cc47d11320ce1a (patch)
treef1bfc512f652b0503a8133a20f67470577cd1fe1
parent97c332e87a5a4995bdd3058ef432a5ef4c4ab94e (diff)
downloadports-fe0e6bcacc782a7db3826ef2a1cc47d11320ce1a.tar.gz
ports-fe0e6bcacc782a7db3826ef2a1cc47d11320ce1a.zip
Notes
-rw-r--r--lang/fpc/Makefile90
-rw-r--r--lang/fpc/Makefile.units8
-rw-r--r--lang/fpc/distinfo2
-rw-r--r--lang/fpc/pkg-plist6
4 files changed, 69 insertions, 37 deletions
diff --git a/lang/fpc/Makefile b/lang/fpc/Makefile
index e5e9eeaa5d86..98179f54c6aa 100644
--- a/lang/fpc/Makefile
+++ b/lang/fpc/Makefile
@@ -11,6 +11,7 @@ MASTER_SITES= ftp://ftp.freepascal.org/pub/fpc/dist/${PORTVERSION}/source/:sourc
ftp://freepascal.stack.nl/pub/fpc/dist/${PORTVERSION}/source/:source \
ftp://ftp.no.freepascal.org/pub/fpc/dist/${PORTVERSION}/source/:source \
ftp://ftp.us.freepascal.org/pub/fpc/dist/${PORTVERSION}/source/:source \
+ http://leaf.dragonflybsd.org/~marino/dports-src/:DragonFlybootstrap \
SF/freepascal/Source/${PORTVERSION}:source \
${MASTER_SITE_GOOGLE_CODE}:bootstrap \
${MASTER_SITE_LOCAL:S|$|acm/freepascal/:bootstrap|} \
@@ -25,19 +26,15 @@ COMMENT?= Free Pascal compiler with Turbo and Delphi
PROJECTHOST= bsdistfiles
USES= gmake iconv
ONLY_FOR_ARCHS= i386 amd64
+BOOTVER= 2.6.4
OPTIONSFILE= ${PORT_DBDIR}/${PORTNAME}${PKGNAMESUFFIX}/options
-#OPT?=-Ur -CX
OPT?=-CX
FPCSRCDIR= ${PORTNAME}-${PORTVERSION}
.include <bsd.port.pre.mk>
-.if ${OPSYS} == DragonFly
-IGNORE= not supported on DragonFly yet
-.endif
-
.if ${ARCH} == "i386"
PPNAME= ppc386
FPC_ARCH= i386
@@ -50,44 +47,66 @@ 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}-freebsd
+BUILDNAME= ${FPC_ARCH}-${OPSYS:tl}
PLIST_SUB+= PORTVERSION=${PORTVERSION} \
BUILDNAME=${BUILDNAME}
-DISTFILES+= ${PPNAME}-${PORTVERSION}-${OPSYS:tl}${EXTRACT_SUFX}:bootstrap \
+DISTFILES+= ${BOOTDIR}${EXTRACT_SUFX}:${OPSYS:MDragonFly}bootstrap \
${DISTNAME:S/$/.man/}${EXTRACT_SUFX}:man
-MAKE_ARGS+= PP=${WRKDIR}/${PPNAME}-${PORTVERSION}-${OPSYS:tl} \
- FPCMAKE=${WRKDIR}/${FPCSRCDIR}/utils/fpcm/fpcmake \
+MAKE_ARGS+= FPCMAKE=${WRKDIR}/${FPCSRCDIR}/utils/fpcm/fpcmake \
FPCTARGET=${BUILDNAME} \
ARCH=${FPC_ARCH} \
OPT="${OPT}" \
BSDHIER=1 \
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} xfz ${_DISTDIR}/${PPNAME}-${PORTVERSION}-${OPSYS:tl}${EXTRACT_SUFX} --directory \
- ${WRKDIR} && ${CHMOD} +x ${WRKDIR}/${PPNAME}-${PORTVERSION}-${OPSYS:tl}
+ @${TAR} -xzf ${_DISTDIR}/${BOOTDIR}${EXTRACT_SUFX} \
+ --directory ${WRKDIR} && ${CHMOD} +x ${WRKDIR}/${BOOTDIR}
# unpack man files
- @${TAR} xfz ${_DISTDIR}/${DISTNAME:S/$/.man/}${EXTRACT_SUFX} --directory \
- ${WRKDIR}
+ @${TAR} -xzf ${_DISTDIR}/${DISTNAME:S/$/.man/}${EXTRACT_SUFX} \
+ --directory ${WRKDIR}
# unpack source distribution
- @cd ${WRKDIR} && \
- ${GZIP_CMD} -dc ${_DISTDIR}/${DISTNAME:S/$/.source/}${EXTRACT_SUFX} \
- | ${TAR} xf - ${FPCSRCDIR}/compiler ${FPCSRCDIR}/rtl \
- ${FPCSRCDIR}/utils/fpcmkcfg ${FPCSRCDIR}/packages/fcl-base \
- ${FPCSRCDIR}/packages/fcl-process ${FPCSRCDIR}/utils/fpcm
+ @(cd ${WRKDIR} && ${GZIP_CMD} -dc \
+ ${_DISTDIR}/${DISTNAME:S/$/.source/}${EXTRACT_SUFX} | \
+ ${TAR} -xf - \
+ ${FPCSRCDIR}/compiler \
+ ${FPCSRCDIR}/rtl \
+ ${FPCSRCDIR}/utils/fpcmkcfg \
+ ${FPCSRCDIR}/packages/fcl-base \
+ ${FPCSRCDIR}/packages/fcl-process \
+ ${FPCSRCDIR}/utils/fpcm)
post-patch:
.if ${ARCH} == "i386"
- @${REINPLACE_CMD} -i "" -e 's|504000|${OSVERSION}|g' ${WRKDIR}/${FPCSRCDIR}/rtl/freebsd/${FPC_ARCH}/cprt0.as
+ @${REINPLACE_CMD} -i "" -e 's|504000|${OSVERSION}|g' \
+ ${WRKDIR}/${FPCSRCDIR}/rtl/freebsd/${FPC_ARCH}/cprt0.as
.elif ${ARCH} == "amd64"
- @${REINPLACE_CMD} -i "" -e 's|700055|${OSVERSION}|g' ${WRKDIR}/${FPCSRCDIR}/rtl/freebsd/${FPC_ARCH}/cprt0.as
- @${REINPLACE_CMD} -i "" -e 's|502110|${OSVERSION}|g' ${WRKDIR}/${FPCSRCDIR}/rtl/freebsd/${FPC_ARCH}/gprt0.as
- @${REINPLACE_CMD} -i "" -e 's|700055|${OSVERSION}|g' ${WRKDIR}/${FPCSRCDIR}/rtl/freebsd/${FPC_ARCH}/prt0.as
+. if ${OPSYS} == FreeBSD
+ @${REINPLACE_CMD} -i "" -e 's|700055|${OSVERSION}|g' \
+ ${WRKDIR}/${FPCSRCDIR}/rtl/freebsd/${FPC_ARCH}/cprt0.as
+ @${REINPLACE_CMD} -i "" -e 's|502110|${OSVERSION}|g' \
+ ${WRKDIR}/${FPCSRCDIR}/rtl/freebsd/${FPC_ARCH}/gprt0.as
+ @${REINPLACE_CMD} -i "" -e 's|700055|${OSVERSION}|g' \
+ ${WRKDIR}/${FPCSRCDIR}/rtl/freebsd/${FPC_ARCH}/prt0.as
+. else
+ @${REINPLACE_CMD} -i "" -e 's|400000|${DFLYVERSION}|g' \
+ ${WRKSRC}/${FPCSRCDIR}/rtl/dragonfly/${FPC_ARCH}/*.as
+. endif
.endif
.if empty(ICONV_LIB)
@${REINPLACE_CMD} -e "s|if (s<>'c') or reorder then|if ((s<>'c') and (s<>'iconv')) or reorder then|" \
@@ -98,22 +117,31 @@ post-patch:
do-build:
# build fpc compiler
- @cd ${WRKDIR}/${FPCSRCDIR}/compiler && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} cycle ${MAKE_ARGS}
+ (cd ${WRKDIR}/${FPCSRCDIR}/compiler && ${SETENV} ${MAKE_ENV} \
+ ${MAKE_CMD} cycle ${MAKE_ARGS} ${BOOTPPC})
# build fpcmkcfg
- @cd ${WRKDIR}/${FPCSRCDIR}/utils/fpcm && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS}
- @cd ${WRKDIR}/${FPCSRCDIR}/packages/fcl-base && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS}
- @cd ${WRKDIR}/${FPCSRCDIR}/packages/fcl-process && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS}
- @cd ${WRKDIR}/${FPCSRCDIR}/utils/fpcmkcfg && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS}
+ (cd ${WRKDIR}/${FPCSRCDIR}/utils/fpcm && ${SETENV} ${MAKE_ENV} \
+ ${MAKE_CMD} ${MAKE_ARGS} ${NEWPPC})
+ (cd ${WRKDIR}/${FPCSRCDIR}/packages/fcl-base && ${SETENV} ${MAKE_ENV} \
+ ${MAKE_CMD} ${MAKE_ARGS} ${NEWPPC})
+ (cd ${WRKDIR}/${FPCSRCDIR}/packages/fcl-process && \
+ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${NEWPPC})
+ (cd ${WRKDIR}/${FPCSRCDIR}/utils/fpcmkcfg && \
+ ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${NEWPPC})
do-install:
# Installing fpc compiler
- @cd ${WRKDIR}/${FPCSRCDIR}/rtl && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} install ${MAKE_ARGS}
+ (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}
+ (cd ${WRKDIR}/${FPCSRCDIR}/compiler && ${SETENV} ${MAKE_ENV} \
+ ${MAKE_CMD} install ${MAKE_ARGS} ${NEWFPC})
# Installng fpcmkcfg
- @cd ${WRKDIR}/${FPCSRCDIR}/utils/fpcmkcfg && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} install ${MAKE_ARGS}
+ (cd ${WRKDIR}/${FPCSRCDIR}/utils/fpcmkcfg && ${SETENV} ${MAKE_ENV} \
+ ${MAKE_CMD} install ${MAKE_ARGS} ${NEWFPC})
# Installng fpcmake
- @cd ${WRKDIR}/${FPCSRCDIR}/utils/fpcm && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} install ${MAKE_ARGS}
+ ${INSTALL_PROGRAM} ${WRKDIR}/${FPCSRCDIR}/utils/fpcm/fpcmake \
+ ${STAGEDIR}${PREFIX}/bin
# Installing manpages
${INSTALL_MAN} ${WRKDIR}/man/man1/* ${STAGEDIR}${MAN1PREFIX}/man/man1
${INSTALL_MAN} ${WRKDIR}/man/man5/* ${STAGEDIR}${MAN1PREFIX}/man/man5
diff --git a/lang/fpc/Makefile.units b/lang/fpc/Makefile.units
index 17a0e742f926..aabc2adc3123 100644
--- a/lang/fpc/Makefile.units
+++ b/lang/fpc/Makefile.units
@@ -1,4 +1,4 @@
-BUILDNAME= ${FPC_ARCH}-freebsd
+BUILDNAME= ${FPC_ARCH}-${OPSYS:tl}
PLIST_SUB+= PORTVERSION=${PORTVERSION} \
BUILDNAME=${BUILDNAME}
@@ -6,6 +6,8 @@ PLIST_SUB+= PORTVERSION=${PORTVERSION} \
PLIST= ${.CURDIR}/pkg-plist
PATCHDIR= ${.CURDIR}/files
FILESDIR= ${.CURDIR}/files
+DFLY_PATCHDIR= ${.CURDIR}/dragonfly
+DFLY_FILESDIR= ${.CURDIR}/dragonfly
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
BUILD_WRKSRC= ${WRKDIR}/${WRKUNITDIR}
INSTALL_WRKSRC= ${WRKDIR}/${WRKUNITDIR}
@@ -39,11 +41,11 @@ post-extract:
post-patch:
.if ${PKGNAMESUFFIX} == "-fpmkunit"
- @${REINPLACE_CMD} -e 's|\[Linux\]|\[Linux,FreeBSD,NetBSD,OpenBSD\]|g' \
+ @${REINPLACE_CMD} -e 's|\[Linux\]|\[Linux,FreeBSD,DragonFly\]|g' \
${WRKDIR}/${WRKUNITDIR}/src/${PKGNAMESUFFIX:S/-//}.pp
.endif
.if ${PKGNAMESUFFIX} == "-fppkg"
- @${REINPLACE_CMD} -e 's|packages_freebsd=fcl-net fcl-web|packages_freebsd=fcl-net|g' \
+ @${REINPLACE_CMD} -e 's|packages_${OPSYS:tl}=fcl-net fcl-web|packages_${OPSYS:tl}=fcl-net|g' \
${WRKDIR}/${WRKUNITDIR}/Makefile.fpc
.endif
.if ${PKGNAMESUFFIX} == "-utils"
diff --git a/lang/fpc/distinfo b/lang/fpc/distinfo
index ad0586fda50d..d3a8decb6755 100644
--- a/lang/fpc/distinfo
+++ b/lang/fpc/distinfo
@@ -6,3 +6,5 @@ SHA256 (freepascal/ppcx64-2.6.4-freebsd.tar.gz) = f74a268a206fbd52d3c92f4e0722cd
SIZE (freepascal/ppcx64-2.6.4-freebsd.tar.gz) = 1035650
SHA256 (freepascal/fpc-2.6.4.man.tar.gz) = c1d5bc37f96d60b37dd0ea85b6c7244306ae61c01df6053226309a75145ab804
SIZE (freepascal/fpc-2.6.4.man.tar.gz) = 43335
+SHA256 (freepascal/ppcx64-2.6.4-dragonfly.tar.gz) = d537d84302c0e0cb56d45851ab8da664145b9e2619346d35f1e3797a6f924ef9
+SIZE (freepascal/ppcx64-2.6.4-dragonfly.tar.gz) = 4033024
diff --git a/lang/fpc/pkg-plist b/lang/fpc/pkg-plist
index c96a78ec26cc..fb9b838f08fa 100644
--- a/lang/fpc/pkg-plist
+++ b/lang/fpc/pkg-plist
@@ -81,8 +81,8 @@ lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/fmtbcd.ppu
lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/fpintres.o
lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/fpintres.ppu
lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/libpfpintres.a
-lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/freebsd.o
-lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/freebsd.ppu
+%%FREEBSD%%lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/freebsd.o
+%%FREEBSD%%lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/freebsd.ppu
lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/getopts.o
lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/getopts.ppu
lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/gprt0.o
@@ -117,7 +117,7 @@ lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/libperrors.a
lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/libpexeinfo.a
lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/libpfgl.a
lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/libpfmtbcd.a
-lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/libpfreebsd.a
+%%FREEBSD%%lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/libpfreebsd.a
lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/libpgetopts.a
lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/libpheaptrc.a
lib/fpc/%%PORTVERSION%%/units/%%BUILDNAME%%/rtl/libpinitc.a