1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-11 07:22:22 +00:00
freebsd-ports/lang/fpc/Makefile.units
Jose Alonso Cardenas Marquez 34196d10e5 - Change LDPATH to FPC_LDPATH into lang/fpc/Makefile. It can be changed from
/etc/make.conf
- Add FPC_LDPATH to freepascal compiler. By default it is defined to
  %%LOCALBASE%%/bin/ld.bfd but it can be changed setting FPC_LDPATH environment
  variable
- Remove compatX dependencies from bootstrap and compiler. It could fix problems
  when GENERIC kernel is not used [1]
- Rebuild bootstrap (ppcx64 and ppc386) with new changes
- Bump PORTREVISION

PR:		239135
Submitted by:	fbsdbugs4 __at__ sentry.org
2019-12-31 15:11:18 +00:00

63 lines
1.9 KiB
Makefile

BUILDNAME= ${FPC_ARCH}-${OPSYS:tl}
PLIST_SUB+= PORTVERSION=${PORTVERSION} \
BUILDNAME=${BUILDNAME}
PLIST= ${.CURDIR}/pkg-plist
PATCHDIR= ${.CURDIR}/files
FILESDIR= ${.CURDIR}/files
DFLY_PATCHDIR= ${.CURDIR}/dragonfly
DFLY_FILESDIR= ${.CURDIR}/dragonfly
WRKSRC= ${WRKDIR}/${FPCSRCDIR}
BUILD_WRKSRC= ${WRKDIR}/${WRKUNITDIR}
INSTALL_WRKSRC= ${WRKDIR}/${WRKUNITDIR}
OPT+= -Ur
FPCDIR?= ${LOCALBASE}/lib/fpc/${PORTVERSION}
UNITPREFIX= unit-
UNITNAME= ${UNITPREFIX}${PKGNAMESUFFIX:S/-//}${BUILDNAME:S/^/./}${UNITEXTRACT_SUFX}
UNITDIR= lib/fpc/${PORTVERSION}/units/${BUILDNAME}
UNITEXTRACT_SUFX= .tar.gz
EXTRACT_AFTER_ARGS= ${EXTRACTUNITDIR}
MAKE_ARGS+= PP="${LOCALBASE}/bin/fpc" \
FPCFPMAKE="${LOCALBASE}/bin/fpc" \
FPCMAKE="${LOCALBASE}/bin/fpcmake" \
CPU_TARGET=${FPC_ARCH} \
OS_TARGET=${OPSYS:tl} \
COMPILER_OPTIONS="${OPT}" \
BSDHIER=1 \
VERBOSE=1 \
INSTALL="${INSTALL_DATA}" \
INSTALLEXE="${INSTALL_PROGRAM}" \
INSTALLSCR="${INSTALL_SCRIPT}" \
INSTALL_PREFIX="${STAGEDIR}${PREFIX}" \
FPC_LDPATH=${FPC_LDPATH}
ALL_TARGET= fpc_baseinfo release
.if ${PORT_OPTIONS:MEXAMPLES} && defined(HAVE_EXAMPLES)
LATE_INSTALL_ARGS= fpc_exampleinstall
.endif
post-extract:
@cd ${WRKDIR}/${WRKUNITDIR} && \
${FIND} ${WRKSRC} -type d -name .svn | ${XARGS} ${RM} -r
.if ${PKGNAMESUFFIX:M-utils} || ${PKGNAMESUFFIX:M-ide}
${REINPLACE_CMD} -e '/globalunit/ s|\.\./packages|${FPCDIR}|' \
${WRKDIR}/${WRKUNITDIR}/Makefile
.else
${REINPLACE_CMD} -e '/globalunit/ {s|\.\.|${FPCDIR}|;}' \
${WRKDIR}/${WRKUNITDIR}/Makefile
.endif
post-patch:
.if ${PKGNAMESUFFIX} == "-fppkg"
@${REINPLACE_CMD} -e 's|packages_${OPSYS:tl}=fcl-net fcl-web|packages_${OPSYS:tl}=fcl-net|g' \
${WRKDIR}/${WRKUNITDIR}/Makefile.fpc
.endif
.if ${PKGNAMESUFFIX} == "-rtl-extra"
@${REINPLACE_CMD} -e 's|android,linux,|android,linux,freebsd,dragonfly,|g' \
${WRKDIR}/${WRKUNITDIR}/fpmake.pp
.endif