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}" 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} -rf .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