git: 8231864a3b03 - main - Mk/**octave.mk: Convert to USES=octave

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Fri, 30 Dec 2022 17:54:51 UTC
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8231864a3b0376f9df37cc3904c4e217efc6110d

commit 8231864a3b0376f9df37cc3904c4e217efc6110d
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2022-12-30 17:49:45 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2022-12-30 17:54:39 +0000

    Mk/**octave.mk: Convert to USES=octave
    
    As part of the improvements of USES infrastructure Mk/bsd.octave.mk has
    been converted to Mk/Uses/octave.mk. This also declutters some old
    stuffs in the octave-* ports and makes it simpler to add more
    octave-forge ports easily.
    
    While I am here make all the ports portclippy/portfmt compliant. And use
    USES macros whenever possible.
    
    Reviewed by:    portmgr
    Approved by:    tcberner
    Differential Revision:  https://reviews.freebsd.org/D37887
---
 Mk/Uses/octave.mk                                  |  90 ++++++++++++++++++
 Mk/bsd.octave.mk                                   |  41 ---------
 benchmarks/octave-forge-benchmark/Makefile         |   5 +-
 math/octave-forge-actuarial/Makefile               |  16 +---
 math/octave-forge-audio/Makefile                   |  13 +--
 .../Makefile                                       |  21 ++---
 math/octave-forge-bim/Makefile                     |  23 ++---
 math/octave-forge-bioinfo/Makefile                 |   5 +-
 math/octave-forge-biosig/Makefile                  |  17 +---
 math/octave-forge-bsltl/Makefile                   |  18 +---
 math/octave-forge-cfitsio/Makefile                 |  17 +---
 math/octave-forge-cgi/Makefile                     |  18 +---
 math/octave-forge-civil-engineering/Makefile       |   5 +-
 math/octave-forge-coder/Makefile                   |  15 +--
 math/octave-forge-communications/Makefile          |  17 +---
 math/octave-forge-control/Makefile                 |  16 +---
 math/octave-forge-csg-toolkit/Makefile             |  28 ++----
 math/octave-forge-data-smoothing/Makefile          |  17 +---
 math/octave-forge-database/Makefile                |  17 +---
 math/octave-forge-dataframe/Makefile               |  16 +---
 math/octave-forge-dicom/Makefile                   |  13 +--
 math/octave-forge-divand/Makefile                  |  19 +---
 math/octave-forge-doctest/Makefile                 |  18 +---
 math/octave-forge-econometrics/Makefile            |  16 +---
 math/octave-forge-fda/Makefile                     |  19 +---
 math/octave-forge-femoctave/Makefile               |  15 +--
 math/octave-forge-fenv/Makefile                    |  15 +--
 math/octave-forge-financial/Makefile               |  20 +---
 math/octave-forge-fits/Makefile                    |  16 +---
 math/octave-forge-fpl/Makefile                     |  17 +---
 math/octave-forge-fuzzy-logic-toolkit/Makefile     |  18 +---
 math/octave-forge-ga/Makefile                      |  16 +---
 math/octave-forge-general/Makefile                 |  11 +--
 math/octave-forge-generate_html/Makefile           |  16 +---
 math/octave-forge-geographiclib/Makefile           |  16 +---
 math/octave-forge-geometry/Makefile                |  19 +---
 math/octave-forge-gnuplot/Makefile                 |  16 +---
 math/octave-forge-gsl/Makefile                     |  14 +--
 math/octave-forge-ident/Makefile                   |   5 +-
 math/octave-forge-image/Makefile                   |  16 +---
 math/octave-forge-informationtheory/Makefile       |   5 +-
 math/octave-forge-integration/Makefile             |   5 +-
 math/octave-forge-internal-fluid-flow/Makefile     |  17 +---
 math/octave-forge-interval/Makefile                |  14 +--
 math/octave-forge-io/Makefile                      |  14 +--
 math/octave-forge-irsa/Makefile                    |   5 +-
 math/octave-forge-level-set/Makefile               |  16 +---
 math/octave-forge-linear-algebra/Makefile          |  16 +---
 math/octave-forge-lssa/Makefile                    |  14 +--
 math/octave-forge-ltfat/Makefile                   |  12 +--
 math/octave-forge-mapping/Makefile                 |  20 ++--
 math/octave-forge-matgeom/Makefile                 |  17 +---
 math/octave-forge-mccabe-thiele/Makefile           |  21 ++---
 math/octave-forge-mechanics/Makefile               |  20 ++--
 math/octave-forge-miscellaneous/Makefile           |  16 +---
 math/octave-forge-missing-functions/Makefile       |   5 +-
 math/octave-forge-mpi/Makefile                     |  19 +---
 math/octave-forge-mqtt/Makefile                    |  18 +---
 math/octave-forge-msh/Makefile                     |  23 ++---
 math/octave-forge-multicore/Makefile               |   5 +-
 math/octave-forge-mvn/Makefile                     |  16 +---
 math/octave-forge-nan/Makefile                     |  17 +---
 math/octave-forge-ncarray/Makefile                 |  22 +----
 math/octave-forge-netcdf/Makefile                  |  18 +---
 math/octave-forge-nlwing2/Makefile                 |  14 +--
 math/octave-forge-nnet/Makefile                    |  16 +---
 math/octave-forge-nurbs/Makefile                   |  14 +--
 math/octave-forge-oct2mat/Makefile                 |   7 +-
 math/octave-forge-octclip/Makefile                 |  14 +--
 math/octave-forge-octproj/Makefile                 |  14 +--
 math/octave-forge-odebvp/Makefile                  |   5 +-
 math/octave-forge-onsas/Makefile                   |  17 +---
 math/octave-forge-optics/Makefile                  |  16 +---
 math/octave-forge-optim/Makefile                   |  21 +----
 math/octave-forge-optiminterp/Makefile             |  17 +---
 math/octave-forge-outliers/Makefile                |   5 +-
 math/octave-forge-parallel/Makefile                |  19 +---
 math/octave-forge-pde1dm/Makefile                  |  17 +---
 math/octave-forge-plot/Makefile                    |  16 +---
 math/octave-forge-ponchon-savarit/Makefile         |  19 +---
 math/octave-forge-psychrometrics/Makefile          |  17 +---
 math/octave-forge-pythonic/Makefile                |  17 +---
 math/octave-forge-quaternion/Makefile              |  14 +--
 math/octave-forge-queueing/Makefile                |  16 +---
 math/octave-forge-secs1d/Makefile                  |  18 +---
 math/octave-forge-secs2d/Makefile                  |   5 +-
 math/octave-forge-secs3d/Makefile                  |  20 +---
 math/octave-forge-signal/Makefile                  |  16 +---
 math/octave-forge-simp/Makefile                    |   5 +-
 math/octave-forge-sockets/Makefile                 |  14 +--
 math/octave-forge-sole/Makefile                    |  18 +---
 math/octave-forge-sparsersb/Makefile               |  14 +--
 math/octave-forge-specfun/Makefile                 |  14 +--
 math/octave-forge-special-matrix/Makefile          |   5 +-
 math/octave-forge-splines/Makefile                 |  18 +---
 math/octave-forge-sqlite/Makefile                  |  19 +---
 math/octave-forge-statistics-bootstrap/Makefile    |  18 +---
 math/octave-forge-statistics/Makefile              |  15 +--
 math/octave-forge-stk/Makefile                     |  14 +--
 math/octave-forge-strings/Makefile                 |  13 +--
 math/octave-forge-struct/Makefile                  |  14 +--
 math/octave-forge-symband/Makefile                 |   5 +-
 math/octave-forge-symbolic/Makefile                |  20 +---
 math/octave-forge-tcl-octave/Makefile              |   5 +-
 math/octave-forge-tsa/Makefile                     |  16 +---
 math/octave-forge-video/Makefile                   |  23 +----
 math/octave-forge-websockets/Makefile              |  21 ++---
 math/octave-forge-zenity/Makefile                  |   7 +-
 math/octave-forge-zeromq/Makefile                  |  17 +---
 math/octave-forge/Makefile                         |   8 +-
 math/octave/Makefile                               | 102 ++++++++++-----------
 math/octave/Makefile.version                       |   2 -
 112 files changed, 540 insertions(+), 1306 deletions(-)

diff --git a/Mk/Uses/octave.mk b/Mk/Uses/octave.mk
new file mode 100644
index 000000000000..e5c6be62df25
--- /dev/null
+++ b/Mk/Uses/octave.mk
@@ -0,0 +1,90 @@
+# Support for octave based ports
+#
+# Feature: 		octave
+# Usage:		USES=octave
+# Valid ARGS:	(none), env
+# 	- env : Loads only one environmental variable OCTAVE_VERSION
+# MAINTAINER:	stephen@FreeBSD.org
+#
+# Common code to install octave-forge packages.
+# It is, in effect, a wrapper using the package handling already built
+# into math/octave.
+
+.if !defined(_INCLUDE_USES_OCTAVE_MK)
+_INCLUDE_USES_OCTAVE_MK=    yes
+
+_valid_octave_ARGS=		env
+
+# Sanity check
+.  for arg in ${octave_ARGS}
+.    if empty(_valid_octave_ARGS:M${arg})
+IGNORE=	Incorrect 'USES+= octave:${octave_ARGS}' usage: argument [${arg}] is not recognized
+.    endif
+.  endfor
+
+OCTAVE_VERSION=	7.3.0
+
+.	if empty(octave_ARGS:Menv)
+BUILD_DEPENDS+=	octave:math/octave
+RUN_DEPENDS+=	octave:math/octave \
+		${LOCALBASE}/libexec/octave/load-octave-pkg:math/octave-forge-base
+LIB_DEPENDS+=	libpcre.so:devel/pcre
+
+.  if ! ${USES:Mcompiler}
+_USES_POST+=	compiler:c++14-lang
+.  endif
+
+.  if ! ${USES:Mfortran}
+_USES_POST+=	fortran
+.  endif
+
+.  if ! ${USES:Mgmake}
+_USES_POST+=	gmake
+.  endif
+
+CXXFLAGS+=	-I${LOCALBASE}/include/octave-${OCTAVE_VERSION}
+CFLAGS+=	-I${LOCALBASE}/include/octave-${OCTAVE_VERSION}
+CPPFLAGS+=	-I${LOCALBASE}/include/octave-${OCTAVE_VERSION}
+
+DIST_SUBDIR?=	octave-forge
+OCTAVE_PKGNAME=	${PORTNAME:S/octave-forge-//}
+OCTAVE_DISTNAME=	${OCTAVE_PKGNAME}-${DISTVERSION}
+OCTAVE_TARBALLS_DIR=	${LOCALBASE}/share/octave/tarballs
+OCTAVE_INSTALL_TARBALLS_DIR=	${STAGEDIR}${PREFIX}/share/octave/tarballs
+OCTAVE_SRC?=	${DISTNAME}
+WRKSRC?=	${WRKDIR}/${OCTAVE_SRC}/src
+
+MAKE_ENV+=	PACKAGE=${OCTAVE_DISTNAME}.tar.gz
+MAKE_ARGS=	CC="${CC}" CXX="${CXX}" LD_CXX="${CXX}" DL_LD="${CXX}" MKOCTFILE="${LOCALBASE}/bin/mkoctfile" OCTAVE_VERSION=-${OCTAVE_VERSION}
+
+LOAD_OCTAVE_PKG_CMD=	${LOCALBASE}/libexec/octave/load-octave-pkg
+
+.	if !target(pre-install)
+pre-install: octave-pre-install
+.	endif #	!target(pre-install)
+
+.	if !target(do-install)
+do-install: octave-do-install
+.	endif # !target(do-install)
+
+.	if !target(post-install)
+post-install: octave-post-install
+.	endif # !target(post-install)
+
+octave-pre-install:
+	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
+	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTAVE_SRC}
+
+octave-do-install:
+	${MKDIR} ${OCTAVE_INSTALL_TARBALLS_DIR}
+	${INSTALL_DATA} ${WRKDIR}/${OCTAVE_DISTNAME}.tar.gz ${OCTAVE_INSTALL_TARBALLS_DIR}/.
+	${LN} -s -f ${OCTAVE_DISTNAME}.tar.gz ${OCTAVE_INSTALL_TARBALLS_DIR}/${OCTAVE_PKGNAME}.tar.gz
+
+octave-post-install:
+	@${ECHO_CMD} "share/octave/tarballs/${OCTAVE_DISTNAME}.tar.gz" >> ${TMPPLIST}
+	@${ECHO_CMD} "share/octave/tarballs/${OCTAVE_PKGNAME}.tar.gz" >> ${TMPPLIST}
+	@${ECHO_CMD} "@postunexec if [ -x ${LOAD_OCTAVE_PKG_CMD} ]; then ${LOAD_OCTAVE_PKG_CMD}; fi" >> ${TMPPLIST}
+	@${ECHO_CMD} "@postexec if [ -x ${LOAD_OCTAVE_PKG_CMD} ]; then ${LOAD_OCTAVE_PKG_CMD}; fi" >> ${TMPPLIST}
+.	endif # empty(octave_ARGS:Menv)
+
+.endif # !defined(_INCLUDE_USES_OCTAVE_MK)
diff --git a/Mk/bsd.octave.mk b/Mk/bsd.octave.mk
deleted file mode 100644
index a4c58c4476aa..000000000000
--- a/Mk/bsd.octave.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-#-*- tab-width: 4; -*-
-# ex:ts=4
-#
-# bsd.octave.mk - Octave related macro
-# Common code to install octave-forge packages.
-# It is, in effect, a wrapper using the package handling already built
-# into math/octave.
-
-bsd_octave_mk_MAINTAINER=	stephen@FreeBSD.org
-
-BUILD_DEPENDS+=	octave:math/octave
-RUN_DEPENDS+=	octave:math/octave \
-		${LOCALBASE}/libexec/octave/load-octave-pkg:math/octave-forge-base
-LIB_DEPENDS+=	libpcre.so:devel/pcre
-
-USES+=		fortran gmake compiler:c++14-lang
-CXXFLAGS+=	-std=gnu++11
-
-DIST_SUBDIR?=	octave-forge
-OCTAVE_PKGNAME=	${PORTNAME:S/octave-forge-//}
-OCTAVE_DISTNAME=	${OCTAVE_PKGNAME}-${DISTVERSION}
-TARBALLS_DIR=	${LOCALBASE}/share/octave/tarballs
-INSTALL_TARBALLS_DIR=	${STAGEDIR}${PREFIX}/share/octave/tarballs
-
-.include "${.CURDIR}/../../math/octave/Makefile.version"
-
-MAKE_ENV+=	PACKAGE=${OCTAVE_DISTNAME}.tar.gz
-MAKE_ARGS=	CC="${CC}" CXX="${CXX}" LD_CXX="${CXX}" DL_LD="${CXX}" MKOCTFILE="${LOCALBASE}/bin/mkoctfile" OCTAVE_VERSION=-${OCTAVE_VERSION}
-
-LOAD_OCTAVE_PKG_CMD=	${LOCALBASE}/libexec/octave/load-octave-pkg
-
-do-install:
-	${MKDIR} ${INSTALL_TARBALLS_DIR}
-	${INSTALL_DATA} ${WRKDIR}/${OCTAVE_DISTNAME}.tar.gz ${INSTALL_TARBALLS_DIR}/.
-	${LN} -s -f ${OCTAVE_DISTNAME}.tar.gz ${INSTALL_TARBALLS_DIR}/${OCTAVE_PKGNAME}.tar.gz
-
-post-install:
-	@${ECHO_CMD} "share/octave/tarballs/${OCTAVE_DISTNAME}.tar.gz" >> ${TMPPLIST}
-	@${ECHO_CMD} "share/octave/tarballs/${OCTAVE_PKGNAME}.tar.gz" >> ${TMPPLIST}
-	@${ECHO_CMD} "@postunexec if [ -x ${LOAD_OCTAVE_PKG_CMD} ]; then ${LOAD_OCTAVE_PKG_CMD}; fi" >> ${TMPPLIST}
-	@${ECHO_CMD} "@postexec if [ -x ${LOAD_OCTAVE_PKG_CMD} ]; then ${LOAD_OCTAVE_PKG_CMD}; fi" >> ${TMPPLIST}
diff --git a/benchmarks/octave-forge-benchmark/Makefile b/benchmarks/octave-forge-benchmark/Makefile
index 099fcfcf887a..c0fdb8d26791 100644
--- a/benchmarks/octave-forge-benchmark/Makefile
+++ b/benchmarks/octave-forge-benchmark/Makefile
@@ -12,5 +12,8 @@ WWW=		https://packages.octave.org/
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
+USES=	octave
+
+WRKSRC=        ${WRKDIR}/${OCTAVE_SRC}
+
 .include <bsd.port.mk>
diff --git a/math/octave-forge-actuarial/Makefile b/math/octave-forge-actuarial/Makefile
index 377546940214..d9602b932b35 100644
--- a/math/octave-forge-actuarial/Makefile
+++ b/math/octave-forge-actuarial/Makefile
@@ -10,21 +10,13 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 WWW=		https://packages.octave.org/
 
 LICENSE=	GPLv3
-LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
+LICENSE_FILE=	${WRKDIR}/${OCTAVE_SRC}/COPYING
 
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-OCTSRC=		${OCTAVE_PKGNAME}
+USES=		octave
 
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
-
-do-build:
-	@${DO_NADA}
+OCTAVE_SRC=		${OCTAVE_PKGNAME}
 
 NO_ARCH=	yes
-
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
+NO_BUILD=	yes
 
 .include <bsd.port.mk>
diff --git a/math/octave-forge-audio/Makefile b/math/octave-forge-audio/Makefile
index d1b795e92ff8..a2528425bd15 100644
--- a/math/octave-forge-audio/Makefile
+++ b/math/octave-forge-audio/Makefile
@@ -13,19 +13,8 @@ LICENSE_FILE=	${WRKSRC}/../COPYING
 
 LIB_DEPENDS+=	librtmidi.so:audio/rtmidi
 
-USES=		compiler:c++11-lang pkgconfig
+USES=		compiler:c++11-lang octave pkgconfig
 
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-OCTSRC=		${DISTNAME}
-
-WRKSRC=		${WRKDIR}/${OCTSRC}/src
 GNU_CONFIGURE=	yes
 
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
-
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
-
 .include <bsd.port.mk>
diff --git a/math/octave-forge-automatic-differentiation/Makefile b/math/octave-forge-automatic-differentiation/Makefile
index 543b21a79960..35056303f94a 100644
--- a/math/octave-forge-automatic-differentiation/Makefile
+++ b/math/octave-forge-automatic-differentiation/Makefile
@@ -8,27 +8,18 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 WWW=		https://packages.octave.org/
 
 LICENSE=	GPLv3
-LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
+LICENSE_FILE=	${WRKDIR}/${OCTAVE_SRC}/COPYING
 
+RUN_DEPENDS+=	${OCTAVE_TARBALLS_DIR}/sockets.tar.gz:math/octave-forge-sockets
+
+USES=		octave
 USE_GITHUB=	yes
 GH_ACCOUNT=	StevenWaldrip
 GH_PROJECT=	Automatic-Differentiation
 
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-OCTSRC=		${GH_PROJECT}-${DISTVERSION}
-
-RUN_DEPENDS+=	${TARBALLS_DIR}/sockets.tar.gz:math/octave-forge-sockets
-
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
-
-do-build:
-	@${DO_NADA}
-
 NO_ARCH=	yes
+NO_BUILD=	yes
 
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
+OCTAVE_SRC=		${GH_PROJECT}-${DISTVERSION}
 
 .include <bsd.port.mk>
diff --git a/math/octave-forge-bim/Makefile b/math/octave-forge-bim/Makefile
index 88a7e530487d..1aa560c0cfd7 100644
--- a/math/octave-forge-bim/Makefile
+++ b/math/octave-forge-bim/Makefile
@@ -8,28 +8,19 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 WWW=		https://packages.octave.org/
 
 LICENSE=	GPLv2
-LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
+LICENSE_FILE=	${WRKDIR}/${OCTAVE_SRC}/COPYING
 
+RUN_DEPENDS=	${OCTAVE_TARBALLS_DIR}/fpl.tar.gz:math/octave-forge-fpl \
+		${OCTAVE_TARBALLS_DIR}/msh.tar.gz:math/octave-forge-msh
+
+USES=		octave
 USE_GITHUB=	yes
 GH_ACCOUNT=	carlodefalco
 GH_PROJECT=	bim
 
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-OCTSRC=		${GH_PROJECT}-${DISTVERSION}
-
-RUN_DEPENDS+=	${TARBALLS_DIR}/fpl.tar.gz:math/octave-forge-fpl
-RUN_DEPENDS+=	${TARBALLS_DIR}/msh.tar.gz:math/octave-forge-msh
-
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
-
-do-build:
-	@${DO_NADA}
-
 NO_ARCH=	yes
+NO_BUILD=	yes
 
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
+OCTAVE_SRC=		${GH_PROJECT}-${DISTVERSION}
 
 .include <bsd.port.mk>
diff --git a/math/octave-forge-bioinfo/Makefile b/math/octave-forge-bioinfo/Makefile
index 9afb626c3eaf..6c3307609c27 100644
--- a/math/octave-forge-bioinfo/Makefile
+++ b/math/octave-forge-bioinfo/Makefile
@@ -12,7 +12,10 @@ WWW=		https://packages.octave.org/
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
+USES=		octave
+
 GNU_CONFIGURE=	yes
 
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
+WRKSRC=        ${WRKDIR}/${OCTAVE_SRC}
+
 .include <bsd.port.mk>
diff --git a/math/octave-forge-biosig/Makefile b/math/octave-forge-biosig/Makefile
index e92ee1e2beff..537155bfb91a 100644
--- a/math/octave-forge-biosig/Makefile
+++ b/math/octave-forge-biosig/Makefile
@@ -10,23 +10,14 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 WWW=		https://packages.octave.org/
 
 LICENSE=	GPLv3
-LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
+LICENSE_FILE=	${WRKDIR}/${OCTAVE_SRC}/COPYING
 
 LIB_DEPENDS+=	libbiosig.so:biology/biosig
 
-ALL_TARGET=	# nada
-
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-
-OCTSRC=		${DISTNAME:R}
+USES=		octave
 
-WRKSRC=		${WRKDIR}/${OCTSRC}/src
-
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
+ALL_TARGET=	# nada
 
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
+OCTAVE_SRC=		${DISTNAME:R}
 
 .include <bsd.port.mk>
diff --git a/math/octave-forge-bsltl/Makefile b/math/octave-forge-bsltl/Makefile
index bae34b04eea5..8c34ea26423e 100644
--- a/math/octave-forge-bsltl/Makefile
+++ b/math/octave-forge-bsltl/Makefile
@@ -10,23 +10,11 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 WWW=		https://packages.octave.org/
 
 LICENSE=	GPLv3
-LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
+LICENSE_FILE=	${WRKDIR}/${OCTAVE_SRC}/COPYING
 
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-OCTSRC=		${DISTNAME}
-
-WRKSRC=		${WRKDIR}/${OCTSRC}/src
-
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
-
-do-build:
-	${DO_NADA}
+USES=		octave
 
 NO_ARCH=	yes
-
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
+NO_BUILD=	yes
 
 .include <bsd.port.mk>
diff --git a/math/octave-forge-cfitsio/Makefile b/math/octave-forge-cfitsio/Makefile
index 41fca05002e4..fac0318f1cc0 100644
--- a/math/octave-forge-cfitsio/Makefile
+++ b/math/octave-forge-cfitsio/Makefile
@@ -11,25 +11,12 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 WWW=		https://packages.octave.org/
 
 LICENSE=	GPLv3
-LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
+LICENSE_FILE=	${WRKDIR}/${OCTAVE_SRC}/COPYING
 
 LIB_DEPENDS+=	libcfitsio.so:astro/cfitsio
 
-USES=		autoreconf
-
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-
-OCTSRC=		${DISTNAME}
-
-WRKSRC=		${WRKDIR}/${OCTSRC}/src
+USES=		autoreconf octave
 
 GNU_CONFIGURE=	yes
 
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
-
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
-
 .include <bsd.port.mk>
diff --git a/math/octave-forge-cgi/Makefile b/math/octave-forge-cgi/Makefile
index f749b7f79852..4f82f4208ff3 100644
--- a/math/octave-forge-cgi/Makefile
+++ b/math/octave-forge-cgi/Makefile
@@ -10,23 +10,13 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 WWW=		https://packages.octave.org/
 
 LICENSE=	GPLv2
-LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
+LICENSE_FILE=	${WRKDIR}/${OCTAVE_SRC}/COPYING
 
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-OCTSRC=		${OCTAVE_PKGNAME}
-
-WRKSRC=		${WRKDIR}/${OCTSRC}/src
-
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
-
-do-build:
-	@${DO_NADA}
+USES=		octave
 
 NO_ARCH=	yes
+NO_BUILD=	yes
 
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
+OCTAVE_SRC=		${OCTAVE_PKGNAME}
 
 .include <bsd.port.mk>
diff --git a/math/octave-forge-civil-engineering/Makefile b/math/octave-forge-civil-engineering/Makefile
index e82dc1910e48..8914fce78164 100644
--- a/math/octave-forge-civil-engineering/Makefile
+++ b/math/octave-forge-civil-engineering/Makefile
@@ -12,7 +12,10 @@ WWW=		https://packages.octave.org/
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
+USES=			octave
+
 GNU_CONFIGURE=	yes
 
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
+WRKSRC=        ${WRKDIR}/${OCTAVE_SRC}
+
 .include <bsd.port.mk>
diff --git a/math/octave-forge-coder/Makefile b/math/octave-forge-coder/Makefile
index 21aa004127a7..0d5ef2ce693a 100644
--- a/math/octave-forge-coder/Makefile
+++ b/math/octave-forge-coder/Makefile
@@ -8,27 +8,20 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 WWW=		https://packages.octave.org/
 
 LICENSE=	GPLv3
-LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
+LICENSE_FILE=	${WRKDIR}/${OCTAVE_SRC}/COPYING
 
+USES=		octave
 USE_GITHUB=	yes
 GH_ACCOUNT=	shsajjadi
 GH_PROJECT=	OctaveCoder
 
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-OCTSRC=		${GH_PROJECT}-coder-${DISTVERSION}
+OCTAVE_SRC=		${GH_PROJECT}-coder-${DISTVERSION}
 
-WRKSRC=		${WRKDIR}/${OCTSRC}
-
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
+WRKSRC=		${WRKDIR}/${OCTAVE_SRC}
 
 do-build:
 	cd ${WRKSRC} && \
 	octave-cli -W -H -q --no-site-file --eval "pre_install" && \
 	${RM} pre_install.m
 
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
-
 .include <bsd.port.mk>
diff --git a/math/octave-forge-communications/Makefile b/math/octave-forge-communications/Makefile
index 1b44664fbc5d..dcbd60e2391b 100644
--- a/math/octave-forge-communications/Makefile
+++ b/math/octave-forge-communications/Makefile
@@ -10,23 +10,14 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 WWW=		https://packages.octave.org/
 
 LICENSE=	GPLv3
-LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
+LICENSE_FILE=	${WRKDIR}/${OCTAVE_SRC}/COPYING
 
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-OCTSRC=		${DISTNAME}
+RUN_DEPENDS=	${OCTAVE_TARBALLS_DIR}/signal.tar.gz:math/octave-forge-signal
+
+USES=		octave
 
 GNU_CONFIGURE=	yes
 
-WRKSRC=		${WRKDIR}/${OCTSRC}/src
 MAKE_ENV+=	MKOCTFILE=mkoctfile
 
-RUN_DEPENDS+=	${TARBALLS_DIR}/signal.tar.gz:math/octave-forge-signal
-
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
-
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
-
 .include <bsd.port.mk>
diff --git a/math/octave-forge-control/Makefile b/math/octave-forge-control/Makefile
index 7cfb117664f9..492bfbfb14c0 100644
--- a/math/octave-forge-control/Makefile
+++ b/math/octave-forge-control/Makefile
@@ -10,20 +10,10 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 WWW=		https://packages.octave.org/
 
 LICENSE=	GPLv3
-LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
+LICENSE_FILE=	${WRKDIR}/${OCTAVE_SRC}/COPYING
 
-GNU_CONFIGURE=	yes
-
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-OCTSRC=		${DISTNAME}
-
-WRKSRC=		${WRKDIR}/${OCTSRC}/src
+USES=			octave
 
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
-
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
+GNU_CONFIGURE=	yes
 
 .include <bsd.port.mk>
diff --git a/math/octave-forge-csg-toolkit/Makefile b/math/octave-forge-csg-toolkit/Makefile
index ce09c981d69c..ab6f14bbc684 100644
--- a/math/octave-forge-csg-toolkit/Makefile
+++ b/math/octave-forge-csg-toolkit/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	octave-forge-csg-toolkit
-PORTREVISION=	1
 DISTVERSIONPREFIX=	v
 DISTVERSION=	1.2.3
+PORTREVISION=	1
 CATEGORIES=	math
 
 MAINTAINER=	stephen@FreeBSD.org
@@ -9,30 +9,18 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 WWW=		https://packages.octave.org/
 
 LICENSE=	GPLv3
-LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
+LICENSE_FILE=	${WRKDIR}/${OCTAVE_SRC}/COPYING
 
-USES+=		compiler:gcc-c++11-lib
+RUN_DEPENDS=	${OCTAVE_TARBALLS_DIR}/io.tar.gz:math/octave-forge-io
 
+USES=		compiler octave
+USE_GCC=	yes
 USE_GITHUB=	yes
 GH_ACCOUNT=	pr0m1th3as
 GH_PROJECT=	${OCTAVE_PKGNAME}
 
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-OCTSRC=		${GH_PROJECT}-${DISTVERSION}
-
-WRKSRC=		${WRKDIR}/${OCTSRC}/src
-
-RUN_DEPENDS+=	${TARBALLS_DIR}/io.tar.gz:math/octave-forge-io
-
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
-
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
-
-.include <bsd.port.pre.mk>
-
 CXXFLAGS+=	-stdlib=libstdc++
 
-.include <bsd.port.post.mk>
+OCTAVE_SRC=		${GH_PROJECT}-${DISTVERSION}
+
+.include <bsd.port.mk>
diff --git a/math/octave-forge-data-smoothing/Makefile b/math/octave-forge-data-smoothing/Makefile
index f3c9920157fb..1651c5bef626 100644
--- a/math/octave-forge-data-smoothing/Makefile
+++ b/math/octave-forge-data-smoothing/Makefile
@@ -10,22 +10,15 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 WWW=		https://packages.octave.org/
 
 LICENSE=	GPLv3
-LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
+LICENSE_FILE=	${WRKDIR}/${OCTAVE_SRC}/COPYING
 
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-OCTSRC=		${OCTAVE_PKGNAME}
+RUN_DEPENDS+=	${OCTAVE_TARBALLS_DIR}/optim.tar.gz:math/octave-forge-optim
 
-RUN_DEPENDS+=	${TARBALLS_DIR}/optim.tar.gz:math/octave-forge-optim
-
-do-build:
-	@${DO_NADA}
+USES=		octave
 
 NO_ARCH=	yes
+NO_BUILD=	yes
 
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
+OCTAVE_SRC=		${OCTAVE_PKGNAME}
 
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
 .include <bsd.port.mk>
diff --git a/math/octave-forge-database/Makefile b/math/octave-forge-database/Makefile
index 7abd06cc8ea8..49b0784c362e 100644
--- a/math/octave-forge-database/Makefile
+++ b/math/octave-forge-database/Makefile
@@ -10,24 +10,13 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 WWW=		https://packages.octave.org/
 
 LICENSE=	GPLv3
-LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
+LICENSE_FILE=	${WRKDIR}/${OCTAVE_SRC}/COPYING
 
-RUN_DEPENDS+=	${TARBALLS_DIR}/struct.tar.gz:math/octave-forge-struct
+RUN_DEPENDS+=	${OCTAVE_TARBALLS_DIR}/struct.tar.gz:math/octave-forge-struct
 
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-OCTSRC=		${DISTNAME}
-
-WRKSRC=		${WRKDIR}/${OCTSRC}/src
+USES=		octave pgsql
 
 GNU_CONFIGURE=	yes
-USES+=		pgsql
-
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
-
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
 
 post-patch:
 	${REINPLACE_CMD} 's#endian.h#sys/endian.h#' ${WRKSRC}/wrap_endian.h
diff --git a/math/octave-forge-dataframe/Makefile b/math/octave-forge-dataframe/Makefile
index 9ca864028293..6418cfaa5469 100644
--- a/math/octave-forge-dataframe/Makefile
+++ b/math/octave-forge-dataframe/Makefile
@@ -10,21 +10,11 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 WWW=		https://packages.octave.org/
 
 LICENSE=	GPLv3
-LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
+LICENSE_FILE=	${WRKDIR}/${OCTAVE_SRC}/COPYING
 
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-OCTSRC=		${DISTNAME}
-
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
-
-do-build:
-	@${DO_NADA}
+USES=		octave
 
 NO_ARCH=	yes
-
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
+NO_BUILD=	yes
 
 .include <bsd.port.mk>
diff --git a/math/octave-forge-dicom/Makefile b/math/octave-forge-dicom/Makefile
index 414f1f1a110f..a68fe85f6bb5 100644
--- a/math/octave-forge-dicom/Makefile
+++ b/math/octave-forge-dicom/Makefile
@@ -9,23 +9,14 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 WWW=		https://packages.octave.org/
 
 LICENSE=	GPLv3
-LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
+LICENSE_FILE=	${WRKDIR}/${OCTAVE_SRC}/COPYING
 
 BUILD_DEPENDS+=	cmake:devel/cmake-core
 
 LIB_DEPENDS+=	libgdcmCommon.so:devel/gdcm
 
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-OCTSRC=		${DISTNAME}
+USES=		octave
 
-WRKSRC=		${WRKDIR}/${OCTSRC}/src
 GNU_CONFIGURE=	yes
 
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
-
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
-
 .include <bsd.port.mk>
diff --git a/math/octave-forge-divand/Makefile b/math/octave-forge-divand/Makefile
index e0d2b789c0f0..460ecde252fa 100644
--- a/math/octave-forge-divand/Makefile
+++ b/math/octave-forge-divand/Makefile
@@ -10,23 +10,14 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 WWW=		https://packages.octave.org/
 
 LICENSE=	GPLv2
-LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
+LICENSE_FILE=	${WRKDIR}/${OCTAVE_SRC}/COPYING
 
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-OCTSRC=		${OCTAVE_PKGNAME}
-
-WRKSRC=		${WRKDIR}/${OCTSRC}/src
-
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
-
-do-build:
-	@${DO_NADA}
+USES=		octave
 
 NO_ARCH=	yes
+NO_BUILD=	yes
 
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
+OCTAVE_SRC=			${OCTAVE_PKGNAME}
+WRKSRC=        ${WRKDIR}/${OCTAVE_SRC}
 
 .include <bsd.port.mk>
diff --git a/math/octave-forge-doctest/Makefile b/math/octave-forge-doctest/Makefile
index 1f5e98292b9b..bd8738bc800a 100644
--- a/math/octave-forge-doctest/Makefile
+++ b/math/octave-forge-doctest/Makefile
@@ -10,23 +10,11 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 WWW=		https://packages.octave.org/
 
 LICENSE=	BSD3CLAUSE
-LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
+LICENSE_FILE=	${WRKDIR}/${OCTAVE_SRC}/COPYING
 
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-OCTSRC=		${DISTNAME}
-
-WRKSRC=		${WRKDIR}/${OCTSRC}/src
-
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
-
-do-build:
-	@${DO_NADA}
+USES=		octave
 
 NO_ARCH=	yes
-
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
+NO_BUILD=	yes
 
 .include <bsd.port.mk>
diff --git a/math/octave-forge-econometrics/Makefile b/math/octave-forge-econometrics/Makefile
index 3541edda051e..cee2f4bff46c 100644
--- a/math/octave-forge-econometrics/Makefile
+++ b/math/octave-forge-econometrics/Makefile
@@ -10,20 +10,10 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 WWW=		https://packages.octave.org/
 
 LICENSE=	GPLv3
-LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
+LICENSE_FILE=	${WRKDIR}/${OCTAVE_SRC}/COPYING
 
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-OCTSRC=		${DISTNAME}
+RUN_DEPENDS=	${OCTAVE_TARBALLS_DIR}/optim.tar.gz:math/octave-forge-optim
 
-WRKSRC=		${WRKDIR}/${OCTSRC}/src
-
-RUN_DEPENDS+=	${TARBALLS_DIR}/optim.tar.gz:math/octave-forge-optim
-
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
-
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
+USES=		octave
 
 .include <bsd.port.mk>
diff --git a/math/octave-forge-fda/Makefile b/math/octave-forge-fda/Makefile
index 3c271323dd2f..e37038d6bc8f 100644
--- a/math/octave-forge-fda/Makefile
+++ b/math/octave-forge-fda/Makefile
@@ -8,28 +8,17 @@ COMMENT=	Octave-forge package ${OCTAVE_PKGNAME}
 WWW=		https://packages.octave.org/
 
 LICENSE=	GPLv3
-LICENSE_FILE=	${WRKDIR}/${OCTSRC}/COPYING
+LICENSE_FILE=	${WRKDIR}/${OCTAVE_SRC}/COPYING
 
+USES=		octave
 USE_GITLAB=	yes
 GL_ACCOUNT=	kakila
 GL_PROJECT=	fda
 GL_COMMIT=	99f733cfa284fc0fdf911e7da97269197c4dec94
 
-# OCTSRC is the name of the directory of the package.
-# It is usually ${OCTAVE_PKGNAME} or ${DISTNAME}.
-OCTSRC=		${GL_PROJECT}-${GL_COMMIT}
-
-WRKSRC=		${WRKDIR}/${OCTSRC}/src
-
-do-build:
-	@${DO_NADA}
-
 NO_ARCH=	yes
+NO_BUILD=	yes
 
-.include "${.CURDIR}/../../Mk/bsd.octave.mk"
-
-post-build:
-	${RM} ${WRKSRC}/Makefile ${WRKSRC}/configure
-	cd ${WRKDIR} && ${TAR} cfz ${OCTAVE_DISTNAME}.tar.gz ${OCTSRC}
+OCTAVE_SRC=		${GL_PROJECT}-${GL_COMMIT}
 
 .include <bsd.port.mk>
diff --git a/math/octave-forge-femoctave/Makefile b/math/octave-forge-femoctave/Makefile
*** 2623 LINES SKIPPED ***