summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreroen <eroen@occam.eroen.eu>2014-08-25 23:19:38 +0200
committereroen <eroen@occam.eroen.eu>2014-08-26 00:06:53 +0200
commit5c8f608ca36fdefefe34b8ba259ad4789d1bd777 (patch)
treeba799d61ded4a48c50c466786656b0e055e16fa6 /sci-mathematics
parentignore metadata/md5-cache (diff)
downloaderoen-5c8f608ca36fdefefe34b8ba259ad4789d1bd777.tar.gz
eroen-5c8f608ca36fdefefe34b8ba259ad4789d1bd777.tar.bz2
eroen-5c8f608ca36fdefefe34b8ba259ad4789d1bd777.zip
matlab - initial
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/matlab/matlab-2014a.ebuild89
-rw-r--r--sci-mathematics/matlab/metadata.xml4
2 files changed, 93 insertions, 0 deletions
diff --git a/sci-mathematics/matlab/matlab-2014a.ebuild b/sci-mathematics/matlab/matlab-2014a.ebuild
new file mode 100644
index 0000000..9317374
--- /dev/null
+++ b/sci-mathematics/matlab/matlab-2014a.ebuild
@@ -0,0 +1,89 @@
+# By eroen, 2014
+# Distributed under the terms of the ISC licence
+# $Header: $
+
+EAPI=5
+
+inherit cdrom
+
+MY_PV=R${PV}
+
+DESCRIPTION="High-level language and interactive environment"
+HOMEPAGE="http://www.mathworks.com/products/matlab/"
+SRC_URI=""
+
+LICENSE="MATLAB"
+RESTRICT="bindist"
+SLOT=${MY_PV}
+KEYWORDS="-* ~amd64"
+IUSE=""
+
+HDEPEND="app-admin/chrpath"
+LIBDEPEND=""
+DEPEND="${LIBDEPEND}"
+RDEPEND="${LIBDEPEND}"
+[[ ${EAPI} == *-hdepend ]] || DEPEND+=" ${HDEPEND}"
+
+S=${WORKDIR}
+MY_PREFIX=/opt/${P}
+INSTALL_KEY_VAR=MATLAB_${MY_PV}_FILE_INSTALLATION_KEY
+
+QA_PRESTRIPPED="${MY_PREFIX#/}/.*"
+QA_TEXTRELS="${MY_PREFIX#/}/bin/glnxa64/*"
+QA_FLAGS_IGNORED="${MY_PREFIX#/}/.*"
+
+pkg_pretend() {
+ if [[ $MERGE_TYPE != binary ]] && [[ -z ${!INSTALL_KEY_VAR} ]]; then
+ eerror "You need to set ${INSTALL_KEY_VAR} to your MATLAB ${MY_PV}"
+ eerror "File Installation Key, eg. by adding"
+ eerror " ${INSTALL_KEY_VAR}=\"12345-67890-12345-67890\""
+ eerror "to your make.conf ."
+ eerror
+ die
+ fi
+}
+
+src_unpack() {
+ CDROM_NAME="MATLAB ${MY_PV}_UNIX dvd" cdrom_get_cds version.txt
+
+ # I can't find any version-specific filenames at all :(
+ local DISK_PV=$(head -n 1 "${CDROM_ROOT}"/version.txt)
+ if [[ ${DISK_PV} != ${MY_PV} ]]; then
+ eerror "Incorrect disk found at ${CDROM_ROOT}."
+ eerror "Expected version: ${MY_PV}"
+ eerror "Found version: ${DISK_PV}"
+ eerror
+ die
+ fi
+}
+
+src_configure() {
+ sed -e '/^# destinationFolder=/a destinationFolder='"${ED%/}${MY_PREFIX}" \
+ -e '/^# fileInstallationKey=/afileInstallationKey='"${!INSTALL_KEY_VAR}" \
+ -e '/^# agreeToLicense=/a agreeToLicense=yes' \
+ -e '/^# mode=/a mode=silent' \
+ -e '/^# automatedModeTimeout=/a automatedModeTimeout=0' \
+ -e '/^#product.MATLAB$/a product.MATLAB' \
+ < "${CDROM_ROOT}"/installer_input.txt \
+ > "${T}"/installer_input.txt \
+ || die
+}
+
+src_install() {
+ "${CDROM_ROOT}"/install \
+ -inputFile "${T}"/installer_input.txt \
+ -tmpdir "${T}" \
+ -verbose \
+ || die
+ find "${ED%/}${MY_PREFIX}"/bin/glnxa64 -type f -name '*.so*' -execdir chrpath -d {} + || die
+
+ # User should be able to add a licence.
+ dodir "${MY_PREFIX}"/licences
+ fperms 1777 "${MY_PREFIX}"/licences
+}
+
+pkg_postinst() {
+ :
+ # x11-misc/wmname wmname LG3D
+ # first startup, key file/activation
+}
diff --git a/sci-mathematics/matlab/metadata.xml b/sci-mathematics/matlab/metadata.xml
new file mode 100644
index 0000000..097975e
--- /dev/null
+++ b/sci-mathematics/matlab/metadata.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+</pkgmetadata>