summaryrefslogtreecommitdiff
path: root/lang/fpc/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lang/fpc/Makefile')
-rw-r--r--lang/fpc/Makefile123
1 files changed, 57 insertions, 66 deletions
diff --git a/lang/fpc/Makefile b/lang/fpc/Makefile
index b6c45612f9b5..01b2ecbeb4fe 100644
--- a/lang/fpc/Makefile
+++ b/lang/fpc/Makefile
@@ -1,7 +1,7 @@
PORTNAME= fpc
PORTVERSION= 3.2.2
-PORTREVISION?= 4
-CATEGORIES?= lang
+PORTREVISION= 5
+CATEGORIES= lang
MASTER_SITES= SF/freepascal/Source/${PORTVERSION}:source \
https://downloads.freepascal.org/${PORTNAME}/dist/${PORTVERSION}/source/:source \
http://leaf.dragonflybsd.org/~marino/dports-src/:DragonFlybootstrap \
@@ -10,11 +10,13 @@ MASTER_SITES= SF/freepascal/Source/${PORTVERSION}:source \
DISTFILES= ${DISTNAME:S/$/.source/}${EXTRACT_SUFX}:source
DIST_SUBDIR= freepascal
-MAINTAINER?= acm@FreeBSD.org
-COMMENT?= Free Pascal compiler with Turbo and Delphi compatibility
+MAINTAINER= acm@FreeBSD.org
+COMMENT= Free Pascal compiler with Turbo and Delphi compatibility
WWW= https://www.freepascal.org/
-RUN_DEPENDS?= ${LOCALBASE}/bin/as:devel/binutils
+CONFLICTS= fpc-devel
+
+RUN_DEPENDS= ${LOCALBASE}/bin/as:devel/binutils
ONLY_FOR_ARCHS= amd64 i386
@@ -49,7 +51,6 @@ PLIST_SUB+= FREEBSD=""
PLIST_SUB+= FREEBSD="@comment "
.endif
-.if !defined(PKGNAMESUFFIX)
SUB_FILES= pkg-message
BUILDNAME= ${FPC_ARCH}-${OPSYS:tl}
@@ -63,7 +64,7 @@ MAKE_ARGS+= FPCMAKE=${NEWFPCMAKE} \
ARCH=${FPC_ARCH} \
OPT="${OPT}" \
BSDHIER=1 \
- INSTALL="${INSTALL_DATA}" \
+ INSTALL="${INSTALL_DATA} -p" \
INSTALLEXE="${INSTALL_PROGRAM}" \
INSTALLSCR="${INSTALL_SCRIPT}" \
INSTALL_PREFIX=${STAGEDIR}${PREFIX} \
@@ -83,20 +84,7 @@ do-extract:
# 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}/packages/fcl-res \
- ${FPCSRCDIR}/packages/fpmkunit \
- ${FPCSRCDIR}/packages/hash \
- ${FPCSRCDIR}/packages/libtar \
- ${FPCSRCDIR}/packages/paszlib \
- ${FPCSRCDIR}/packages/rtl-objpas \
- ${FPCSRCDIR}/packages/tplylib \
- ${FPCSRCDIR}/utils/fpcm)
+ ${TAR} -xf -)
post-patch:
.if ${OPSYS} == FreeBSD
@@ -119,6 +107,44 @@ post-patch:
@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' \
${WRKDIR}/${FPCSRCDIR}/packages/fpmkunit/src/fpmkunit.pp
+# enable units
+ @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \
+ ${WRKSRC}/packages/a52/fpmake.pp
+ @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \
+ ${WRKSRC}/packages/dts/fpmake.pp
+ @${REINPLACE_CMD} -i "" -e 's|freebsd,||g' \
+ ${WRKSRC}/packages/fpgtk/fpmake.pp
+ @${REINPLACE_CMD} -i "" -e 's|iphonesim|freebsd,iphonesim|g' \
+ ${WRKSRC}/packages/gnome1/fpmake.pp
+ @${REINPLACE_CMD} -i "" -e 's|iphonesim|freebsd,iphonesim|g' \
+ ${WRKSRC}/packages/gtk1/fpmake.pp
+ @${REINPLACE_CMD} -i "" -e 's|iphonesim|freebsd,iphonesim|g' \
+ ${WRKSRC}/packages/imlib/fpmake.pp
+ @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \
+ ${WRKSRC}/packages/ldap/fpmake.pp
+ @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \
+ ${WRKSRC}/packages/libsee/fpmake.pp
+ @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \
+ ${WRKSRC}/packages/lua/fpmake.pp
+ @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \
+ ${WRKSRC}/packages/mad/fpmake.pp
+ @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \
+ ${WRKSRC}/packages/modplug/fpmake.pp
+ @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \
+ ${WRKSRC}/packages/newt/fpmake.pp
+ @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \
+ ${WRKSRC}/packages/oggvorbis/fpmake.pp
+ @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \
+ ${WRKSRC}/packages/openal/fpmake.pp
+ @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \
+ ${WRKSRC}/packages/opencl/fpmake.pp
+ @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \
+ ${WRKSRC}/packages/proj4/fpmake.pp
+ @${REINPLACE_CMD} -i "" -e 's|os2|freebsd,os2|g' \
+ ${WRKSRC}/packages/rexx/fpmake.pp
+ @${REINPLACE_CMD} -i "" -e 's|linux|freebsd,linux|g' \
+ ${WRKSRC}/packages/zorba/fpmake.pp
+
do-build:
# build fpc compiler
@${ECHO_MSG} "##### STARTING COMPILER #####"
@@ -126,63 +152,28 @@ do-build:
${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 rtl-objpas fcl-base tplylib fcl-res
- @${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 #####"
+# build units
+ @${ECHO_MSG} "##### STARTING UNITS #####"
+ (cd ${WRKDIR}/${FPCSRCDIR} && ${SETENV} ${MAKE_ENV} \
+ ${MAKE_CMD} build ${MAKE_ARGS} ${BOOTPPC})
+ @${ECHO_MSG} "##### COMPLETE UNITS #####"
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
+ (cd ${WRKDIR}/${FPCSRCDIR} && ${SETENV} ${MAKE_ENV} \
+ ${MAKE_CMD} install ${MAKE_ARGS} ${BOOTPPC})
+
# 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})
+ (cd ${STAGEDIR}${PREFIX}/bin && ${LN} -sf ../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/lib;/usr/lib|-Fl${LOCALBASE}/lib;${LOCALBASE}/lib/qt5|g' \
+ -e 's|^#-Fl/lib;/usr/lib|-Fl${LOCALBASE}/lib;${LOCALBASE}/lib/qt5;${LOCALBASE}/lib/qt6|g' \
${STAGEDIR}${PREFIX}/etc/fpc.cfg.sample
-.else
-.include "${MASTERDIR}/Makefile.units"
-.endif
.include <bsd.port.post.mk>