aboutsummaryrefslogtreecommitdiffstats
path: root/lang/fpc/Makefile.units
diff options
context:
space:
mode:
authoracm <acm@FreeBSD.org>2006-07-24 19:21:27 +0800
committeracm <acm@FreeBSD.org>2006-07-24 19:21:27 +0800
commitbe8c2fc2f0a9dbc5795cca72bab530cd95ac8cf9 (patch)
treea3a2f4268e8fe61cde513b3aae848bcf90394d28 /lang/fpc/Makefile.units
parentf17c49926cffd90046cb36851ca50d5d2a825410 (diff)
downloadfreebsd-ports-gnome-be8c2fc2f0a9dbc5795cca72bab530cd95ac8cf9.tar.gz
freebsd-ports-gnome-be8c2fc2f0a9dbc5795cca72bab530cd95ac8cf9.tar.zst
freebsd-ports-gnome-be8c2fc2f0a9dbc5795cca72bab530cd95ac8cf9.zip
- The big change on ports of freepascal, now all ports are compiled
- Adding entry for lang/fpc-utils Approved by: garga (mentor)
Diffstat (limited to 'lang/fpc/Makefile.units')
-rw-r--r--lang/fpc/Makefile.units70
1 files changed, 22 insertions, 48 deletions
diff --git a/lang/fpc/Makefile.units b/lang/fpc/Makefile.units
index 2e44768f6e42..9254f4a8602d 100644
--- a/lang/fpc/Makefile.units
+++ b/lang/fpc/Makefile.units
@@ -1,57 +1,31 @@
-UNITPREFIX?= units-
+PLIST= ${.CURDIR}/pkg-plist
+PATCHDIR= ${.CURDIR}/files
+WRKSRC= ${WRKDIR}/${PORTNAME}
+
+UNITPREFIX= unit-
UNITEXTRACT_SUFX= .tar.gz
UNITNAME= ${UNITPREFIX}${PKGNAMESUFFIX:S/-//}${BUILDNAME:S/^/./}${UNITEXTRACT_SUFX}
-UNITDIR= ${LOCALBASE}/lib/fpc/${PORTVERSION}/units/${BUILDNAME}
+UNITDIR= lib/fpc/${PORTVERSION}/units/${BUILDNAME}
-EXAMPLESDIR= share/examples/${PORTNAME}${PORTVERSION:S/^/-/}
-EXTRACT_CMD= ${CAT}
-EXTRACT_BEFORE_ARGS= # none
-EXTRACT_AFTER_ARGS= | ${TAR} -xf - binary${BUILDNAME:S/^/./}.tar && ${CAT} \
- binary${BUILDNAME:S/^/./}.tar| ${TAR} -xf - \
- ${UNITNAME} && ${CAT} ${UNITNAME} | ${GUNZIP_CMD} \
- -dc | ${TAR} -xf -
-do-install:
-.for DIRE in bin lib
- @if [ -d ${WRKDIR}/${DIRE} ]; \
- then \
- cd ${WRKDIR}/${DIRE} && \
- ${FIND} * -type d -exec ${MKDIR} "{}" "${PREFIX}/${DIRE}/{}" \; && \
- ${FIND} * -type f -exec ${INSTALL_SCRIPT} "{}" "${PREFIX}/${DIRE}/{}" \; ; \
- fi
-.endfor
-.if !defined(NOPORTDOCS)
-. for DIRE in share/examples share/doc
- @if [ -d ${WRKDIR}/${DIRE} ]; \
- then \
- cd ${WRKDIR}/${DIRE} && \
- ${FIND} * -type d -exec ${MKDIR} "{}" "${PREFIX}/${DIRE}/{}" \; && \
- ${FIND} * -type f -exec ${INSTALL_SCRIPT} "{}" "${PREFIX}/${DIRE}/{}" \; ; \
- fi
-. endfor
-.endif
+EXTRACT_AFTER_ARGS= | ${TAR} -xf - ${EXTRACTUNITDIR}
-add-plist-info: add-plist-fpcunits
-add-plist-fpcunits:
-.for DIRE in bin lib
- @if [ -d ${WRKDIR}/${DIRE} ]; \
- then \
- cd ${WRKDIR}/${DIRE} && \
- ${FIND} * -type f | ${SORT} | ${SED} -e 's|^|${DIRE}/|' >> ${TMPPLIST}.FILES && \
- ${FIND} -d * -type d | ${SED} -e 's|^|@unexec rmdir %D/${DIRE}/|' -e 's@$$@ 2>/dev/null || true@' >> ${TMPPLIST}.DIRS; \
- fi
-.endfor
-.if !defined(NOPORTDOCS)
-. for DIRE in share/examples share/doc
- @if [ -d ${WRKDIR}/${DIRE} ]; \
- then \
- cd ${WRKDIR}/${DIRE} && \
- ${FIND} * -type f | ${SORT} | ${SED} -e 's|^|${DIRE}/|' >> ${TMPPLIST}.FILES && \
- ${FIND} -d * -type d | ${SED} -e 's|^|@unexec rmdir %D/${DIRE}/|' -e 's@$$@ 2>/dev/null || true@' >> ${TMPPLIST}.DIRS; \
- fi
-. endfor
+.if !exists(${LOCALBASE}/bin/fpcmake)
+EXTRACTUNITDIR+= fpc-bin
+DISTFILES+= ${DISTNAME:S/$/.bin/}${EXTRACT_SUFX}:bin
+MAKE_ENV+= FPCMAKE=${WRKDIR}/${PORTNAME:S/$/-bin/}/bin/fpcmake
.endif
- @${CAT} ${TMPPLIST}.FILES > ${TMPPLIST} && ${CAT} ${TMPPLIST}.DIRS >> ${TMPPLIST}
+do-build:
+ @cd ${WRKDIR}/${WRKUNITDIR} && ${GMAKE} all ${MAKE_ENV}
+
+do-install:
+ @cd ${WRKDIR}/${WRKUNITDIR} && ${GMAKE} install ${MAKE_ENV}
+. if !defined(NOPORTSDOCS)
+. if defined(HAVE_EXAMPLES)
+ @cd ${WRKDIR}/${WRKUNITDIR} && ${GMAKE} fpc_exampleinstall
+. endif
+. endif
+
security-check: fpc-check-install
fpc-check-install: