Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Jan 2015 14:41:54 +0000 (UTC)
From:      John Marino <marino@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r376710 - head/lang/fpc
Message-ID:  <201501101441.t0AEfseT080304@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marino
Date: Sat Jan 10 14:41:53 2015
New Revision: 376710
URL: https://svnweb.freebsd.org/changeset/ports/376710
QAT: https://qat.redports.org/buildarchive/r376710/

Log:
  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.

Modified:
  head/lang/fpc/Makefile

Modified: head/lang/fpc/Makefile
==============================================================================
--- head/lang/fpc/Makefile	Sat Jan 10 14:39:42 2015	(r376709)
+++ head/lang/fpc/Makefile	Sat Jan 10 14:41:53 2015	(r376710)
@@ -15,7 +15,7 @@ MASTER_SITES=	ftp://ftp.freepascal.org/p
 		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 \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501101441.t0AEfseT080304>