aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/bsd.octave.mk
diff options
context:
space:
mode:
authormaho <maho@FreeBSD.org>2008-09-08 08:23:03 +0800
committermaho <maho@FreeBSD.org>2008-09-08 08:23:03 +0800
commit46a6366d096e551c205c8deae2e2f83e2c0623b0 (patch)
treeab162fd10aa5f3e716201e8ce26a78d461a13bd8 /Mk/bsd.octave.mk
parentfdb3be1aea90bde55318a1a344398f0bea2ee26d (diff)
downloadfreebsd-ports-gnome-46a6366d096e551c205c8deae2e2f83e2c0623b0.tar.gz
freebsd-ports-gnome-46a6366d096e551c205c8deae2e2f83e2c0623b0.tar.zst
freebsd-ports-gnome-46a6366d096e551c205c8deae2e2f83e2c0623b0.zip
Replacment port: math/octave-forge.
PR: 127030 Submitted by: Stephen Montgomery-Smith <stephen@math.missouri.edu> Approved by: portmgr (pav)
Diffstat (limited to 'Mk/bsd.octave.mk')
-rw-r--r--Mk/bsd.octave.mk61
1 files changed, 61 insertions, 0 deletions
diff --git a/Mk/bsd.octave.mk b/Mk/bsd.octave.mk
new file mode 100644
index 000000000000..09903a1ad994
--- /dev/null
+++ b/Mk/bsd.octave.mk
@@ -0,0 +1,61 @@
+#-*- mode: makefile; tab-width: 4; -*-
+# ex:ts=4
+#
+# $FreeBSD$
+#
+# 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.
+
+
+MASTER_SITES= SF/octave
+DISTNAME= ${OCTAVE_PKGNAME}-${PORTVERSION}
+
+bsd_octave_mk_MAINTAINER= stephen@math.missouri.edu
+
+BUILD_DEPENDS+= octave:${PORTSDIR}/math/octave
+RUN_DEPENDS+= octave:${PORTSDIR}/math/octave
+RUN_DEPENDS+= ${LOCALBASE}/share/octave/tarballs:${PORTSDIR}/math/octave-forge-base
+LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre
+USE_FORTRAN= yes
+# hack to get fortran installed with octave
+RUN_DEPENDS+= ${BUILD_DEPENDS:M*fortran*} ${BUILD_DEPENDS:M*f77*} ${BUILD_DEPENDS:M*g77*}
+
+USE_GMAKE= yes
+GNU_CONFIGURE= yes
+
+DIST_SUBDIR= octave-forge
+OCTAVE_PKGNAME= ${PORTNAME:S/octave-forge-//}
+TARBALLS_DIR= ${LOCALBASE}/share/octave/tarballs
+
+MAKE_ENV+= PACKAGE=${WRKDIR}/${DISTNAME}.tar.gz
+
+do-install:
+ ${MKDIR} ${TARBALLS_DIR}
+ ${INSTALL_DATA} ${WRKDIR}/${DISTNAME}.tar.gz ${TARBALLS_DIR}/.
+ ${RM} -f ${TARBALLS_DIR}/${OCTAVE_PKGNAME}.tar.gz
+ octave -H -q --no-site-file --eval "pkg('install','${TARBALLS_DIR}/${DISTNAME}.tar.gz')"
+ ${LN} -s ${DISTNAME}.tar.gz ${TARBALLS_DIR}/${OCTAVE_PKGNAME}.tar.gz
+
+post-install:
+ @${ECHO_CMD} "share/octave/tarballs/${DISTNAME}.tar.gz" >> ${TMPPLIST}
+ @${ECHO_CMD} "@exec octave -H -q --no-site-file --eval \"pkg('install','${LOCALBASE}/share/octave/tarballs/${DISTNAME}.tar.gz')\" > /dev/null" >> ${TMPPLIST}
+ @${ECHO_CMD} "share/octave/tarballs/${OCTAVE_PKGNAME}.tar.gz" >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec octave -H -q --no-site-file --eval \"pkg('uninstall','${OCTAVE_PKGNAME}')\" > /dev/null" >> ${TMPPLIST}
+ @if [ -e ${.CURDIR}/pkg-message ]; then ${CAT} ${.CURDIR}/pkg-message; fi
+
+check-octave-forge-depends: extract
+ @listd=`${PERL} -lne '$$_=lc($$_);if (s/^depends://){s/\(.*?\)//g;s/\s*\,\s*/ /g;s/octave//g;print}' < ${WRKSRC}/DESCRIPTION`; \
+ listm=`${PERL} -lne 'if (/RUN_DEPENDS\+=\t..TARBALLS_DIR.\/(.*)\.tar\.gz/){print$$1}' < ${.CURDIR}/Makefile`; \
+ for i in $$listd; do \
+ if !(${ECHO_CMD} $$listm|${GREP} $$i > /dev/null); then \
+ ${ECHO_MSG} "octave-forge-${OCTAVE_PKGNAME} is missing dependency octave-forge-$$i"; \
+ fi; \
+ done; \
+ for i in $$listm; do \
+ if !(${ECHO_CMD} $$listd|${GREP} $$i > /dev/null); then \
+ ${ECHO_MSG} "octave-forge-${OCTAVE_PKGNAME} has unnecessary dependency octave-forge-$$i"; \
+ fi; \
+ done; \
+