diff options
author | marino <marino@FreeBSD.org> | 2015-01-10 14:41:53 +0000 |
---|---|---|
committer | marino <marino@FreeBSD.org> | 2015-01-10 14:41:53 +0000 |
commit | 19092e6aced5169cac30407169e825154d1ba942 (patch) | |
tree | 68938df4355dbefbc00aa559cc6b6701d4f01196 | |
parent | 1d201b5f86cafff7ee1e4c6bcb6294fdf8fa4e57 (diff) | |
download | FreeBSD-ports-19092e6aced5169cac30407169e825154d1ba942.zip FreeBSD-ports-19092e6aced5169cac30407169e825154d1ba942.tar.gz |
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.
-rw-r--r-- | lang/fpc/Makefile | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lang/fpc/Makefile b/lang/fpc/Makefile index 1e27d96..001fbc1 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 \ |