aboutsummaryrefslogtreecommitdiff
path: root/lang/fpc
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2015-01-10 14:41:53 +0000
committerJohn Marino <marino@FreeBSD.org>2015-01-10 14:41:53 +0000
commit2d4447cf51c6b5f346482ed36cd7e0c1f256e503 (patch)
tree68938df4355dbefbc00aa559cc6b6701d4f01196 /lang/fpc
parent88aa758deff53f9a3b77f06e106d523bddc0bd60 (diff)
downloadports-2d4447cf51c6b5f346482ed36cd7e0c1f256e503.tar.gz
ports-2d4447cf51c6b5f346482ed36cd7e0c1f256e503.zip
lang/fpc: Remove unnecessarily variable substition and EXTRACT_SUFX
There were several substitions like "${XXX:S/$/.something/} which is the equivalent of appending, e.g. "${XXX}.something". So for the sake of comprehension, change these to appends, and also just hardcode ".tar.gz" instead of using ${EXTRACT_SUFX} for the same reason. Since the distfiles are being manually defined, there's no real purpose to have a variable in the name, and if the EXTRACT_SUFX changes for any reason (say a new distfile with a different suffix requiring USES+=tar), then the code actually breaks. These changes make the code easier to read, comprehend, and arguably makes the port more robust.
Notes
Notes: svn path=/head/; revision=376710
Diffstat (limited to 'lang/fpc')
-rw-r--r--lang/fpc/Makefile15
1 files changed, 7 insertions, 8 deletions
diff --git a/lang/fpc/Makefile b/lang/fpc/Makefile
index 1e27d9635a66..001fbc1603e6 100644
--- a/lang/fpc/Makefile
+++ b/lang/fpc/Makefile
@@ -15,7 +15,7 @@ MASTER_SITES= ftp://ftp.freepascal.org/pub/fpc/dist/${PORTVERSION}/source/:sourc
SF/freepascal/Source/${PORTVERSION}:source \
LOCAL/acm/freepascal/:bootstrap \
LOCAL/acm/freepascal/:man
-DISTFILES= ${DISTNAME:S/$/.source/}${EXTRACT_SUFX}:source
+DISTFILES= ${DISTNAME}.source.tar.gz:source
DIST_SUBDIR= freepascal
MAINTAINER?= freebsd-fpc@FreeBSD.org
@@ -57,8 +57,8 @@ SUB_FILES= pkg-message
BUILDNAME= ${FPC_ARCH}-${OPSYS:tl}
PLIST_SUB+= PORTVERSION=${PORTVERSION} \
BUILDNAME=${BUILDNAME}
-DISTFILES+= ${BOOTDIR}${EXTRACT_SUFX}:${OPSYS:MDragonFly}bootstrap \
- ${DISTNAME:S/$/.man/}${EXTRACT_SUFX}:man
+DISTFILES+= ${BOOTDIR}.tar.gz:${OPSYS:MDragonFly}bootstrap \
+ ${DISTNAME}.man.tar.gz:man
MAKE_ARGS+= FPCMAKE=${WRKDIR}/${FPCSRCDIR}/utils/fpcm/fpcmake \
FPCTARGET=${BUILDNAME} \
ARCH=${FPC_ARCH} \
@@ -73,14 +73,13 @@ BOOTPPC= PP=${WRKDIR}/${BOOTDIR}
do-extract:
# unpack binary distribution
@${MKDIR} ${WRKDIR}
- @${TAR} -xzf ${_DISTDIR}/${BOOTDIR}${EXTRACT_SUFX} \
+ @${TAR} -xzf ${_DISTDIR}/${BOOTDIR}.tar.gz \
--directory ${WRKDIR} && ${CHMOD} +x ${WRKDIR}/${BOOTDIR}
# unpack man files
- @${TAR} -xzf ${_DISTDIR}/${DISTNAME:S/$/.man/}${EXTRACT_SUFX} \
- --directory ${WRKDIR}
+ @${TAR} -xzf ${_DISTDIR}/${DISTNAME}.man.tar.gz --directory ${WRKDIR}
# unpack source distribution
- @(cd ${WRKDIR} && ${GZIP_CMD} -dc \
- ${_DISTDIR}/${DISTNAME:S/$/.source/}${EXTRACT_SUFX} | \
+ @(cd ${WRKDIR} && \
+ ${GZIP_CMD} -dc ${_DISTDIR}/${DISTNAME}.source.tar.gz | \
${TAR} -xf - \
${FPCSRCDIR}/compiler \
${FPCSRCDIR}/rtl \