aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2010-08-04 13:35:01 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2010-08-04 13:35:01 -0300
commit276df4915072203af407ebcbef575f057056c200 (patch)
tree1c117728cf3cd48acb2be7bed1c96241e4485234
parentAdded tag 0.4 for changeset b32ce35ac47a (diff)
downloadg-octave-276df4915072203af407ebcbef575f057056c200.tar.gz
g-octave-276df4915072203af407ebcbef575f057056c200.tar.bz2
g-octave-276df4915072203af407ebcbef575f057056c200.zip
updated ebuilds
-rw-r--r--ebuilds/g-octave-0.3.ebuild79
-rw-r--r--ebuilds/g-octave-0.4.ebuild84
-rw-r--r--ebuilds/g-octave-9999.ebuild16
3 files changed, 98 insertions, 81 deletions
diff --git a/ebuilds/g-octave-0.3.ebuild b/ebuilds/g-octave-0.3.ebuild
deleted file mode 100644
index 8ba64fe..0000000
--- a/ebuilds/g-octave-0.3.ebuild
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI="2"
-
-inherit distutils
-
-MY_PV="1278111487"
-INFO_REV="1"
-#PATCHES_REV="1"
-
-DESCRIPTION="A tool that generates and installs ebuilds for Octave-Forge"
-HOMEPAGE="http://g-octave.rafaelmartins.eng.br/"
-
-SRC_URI="http://soc.dev.gentoo.org/~rafaelmartins/g-octave/releases/${P}.tar.gz
- http://soc.dev.gentoo.org/~rafaelmartins/g-octave/db/octave-forge-${MY_PV}.db.tar.gz
- http://soc.dev.gentoo.org/~rafaelmartins/g-octave/db/info-${MY_PV}-${INFO_REV}.json"
- #http://soc.dev.gentoo.org/~rafaelmartins/g-octave/db/patches-${MY_PV}-${PATCHES_REV}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="svn test"
-
-DEPEND="( >=dev-lang/python-2.6 <dev-lang/python-3 )"
-RDEPEND="${DEPEND}
- svn? ( dev-python/pysvn )
- || ( >=sys-apps/portage-2.1.7[-python3] <sys-apps/portage-2.1.7 )"
-
-PYTHON_MODNAME="g_octave"
-
-src_unpack() {
- unpack ${P}.tar.gz
-}
-
-src_prepare() {
- distutils_src_prepare
- sed -i -e 's/^has_fetch.*$/has_fetch = False/' scripts/g-octave \
- || die 'failed to patch the g-octave main script'
- if ! use svn; then
- rm -rf g_octave/svn/ || die 'failed to remove the Subversion stuff.'
- sed -i -e '/g_octave.svn/d' -e '/pysvn/d' setup.py \
- || die 'failed to remove the SVN stuff from setup.py'
- fi
-}
-
-src_install() {
- distutils_src_install
- dohtml ${PN}.html
- doman ${PN}.1
-}
-
-src_test() {
- PYTHONPATH=. scripts/run_tests.py || die "test failed."
-}
-
-pkg_postinst() {
- distutils_pkg_postinst
- elog
- elog 'To be able to use g-octave with the shipped package database, please'
- elog 'edit your configuration file, clean your db directory and run:'
- elog " emerge --config =${PF}"
- elog
- elog 'Please install the package manager that you want to use before run g-octave'
- elog
-}
-
-pkg_config() {
- local db="$(g-octave --config db)"
- mkdir -p "${db}"
- elog "Copying g-octave database files to: ${db}"
- cp "${DISTDIR}/octave-forge-${MY_PV}.db.tar.gz" "${db}/" \
- || die "failed to copy octave-forge-${MY_PV}.db.tar.gz"
- cp "${DISTDIR}/info-${MY_PV}-${INFO_REV}.json" "${db}/" \
- || die "failed to copy info-${MY_PV}-${INFO_REV}.json"
- #cp "${DISTDIR}/patches-${MY_P}-${PATCHES_REV}.tar.gz" "${db}/" \
- # || die "failed to copy patches-${MY_P}-${PATCHES_REV}.tar.gz"
-}
diff --git a/ebuilds/g-octave-0.4.ebuild b/ebuilds/g-octave-0.4.ebuild
new file mode 100644
index 0000000..ada8432
--- /dev/null
+++ b/ebuilds/g-octave-0.4.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="2"
+SUPPORT_PYTHON_ABIS="1"
+PYTHON_DEPEND="*:2.6"
+
+DB_COMMIT="cd6b664df376d50455efc19ad23a1463484f81f7"
+DB_COMMIT_ID="cd6b664"
+DB_DIR="rafaelmartins-${PN}-db-${DB_COMMIT_ID}"
+
+inherit distutils
+
+DESCRIPTION="A tool that generates and installs ebuilds for Octave-Forge"
+HOMEPAGE="http://www.g-octave.org/"
+
+SRC_URI="http://www.g-octave.org/releases/${P}.tar.gz
+ http://github.com/rafaelmartins/${PN}-db/tarball/${DB_COMMIT} -> ${PF}-db.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc test"
+
+DEPEND="doc? ( >=dev-python/sphinx-1.0 )"
+RDEPEND="sys-apps/portage"
+
+PYTHON_MODNAME="g_octave"
+
+src_prepare() {
+ distutils_src_prepare
+ sed -i -e 's/^has_fetch.*$/has_fetch = False/' scripts/g-octave \
+ || die 'failed to patch the g-octave main script'
+}
+
+src_compile() {
+ distutils_src_compile
+ if use doc; then
+ emake -C docs html
+ fi
+}
+
+src_install() {
+ distutils_src_install
+ dohtml ${PN}.html
+ doman ${PN}.1
+ if use doc; then
+ mv docs/_build/{html,sphinx}
+ dohtml -r docs/_build/sphinx
+ fi
+}
+
+src_test() {
+ testing() {
+ PYTHONPATH="build-${PYTHON_ABI}/lib" "$(PYTHON)" \
+ scripts/run_tests.py || die 'test failed.'
+ }
+ python_execute_function testing
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+ elog
+ elog 'To be able to use g-octave with the shipped package database, please'
+ elog 'edit your configuration file, clean your db directory and run:'
+ elog " emerge --config =${PF}"
+ elog
+ elog "If you are upgrading from =${PN}-0.3, please read this:"
+ elog 'http://doc.g-octave.org/0.4/upgrading/#from-0-3-to-0-4'
+ elog
+ elog 'Please install the package manager that you want to use before run g-octave'
+ elog
+}
+
+pkg_config() {
+ local db="$(g-octave --config db)"
+ mkdir -p "${db}"
+ einfo "Extracting g-octave database files to: ${db}"
+ tar -xzf "${DISTDIR}/${PF}-db.tar.gz" -C "${db}" || die 'tar failed.'
+ rm -rf "${db}"/{patches,octave-forge,info.json,timestamp}
+ mv -f "${db}/${DB_DIR}"/* ${db} || die 'mv failed.'
+ rm -rf "${db}/${DB_DIR}"
+}
diff --git a/ebuilds/g-octave-9999.ebuild b/ebuilds/g-octave-9999.ebuild
index 17c3993..7bec90a 100644
--- a/ebuilds/g-octave-9999.ebuild
+++ b/ebuilds/g-octave-9999.ebuild
@@ -16,19 +16,31 @@ EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/g-octave.git"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
-IUSE="test"
+IUSE="doc test"
-DEPEND=">=dev-python/docutils-0.6"
+DEPEND=">=dev-python/docutils-0.6
+ doc? ( >=dev-python/sphinx-1.0 )"
RDEPEND="sys-apps/portage"
S="${WORKDIR}/${PN}"
PYTHON_MODNAME="g_octave"
+src_compile() {
+ distutils_src_compile
+ if use doc; then
+ emake -C docs html
+ fi
+}
+
src_install() {
distutils_src_install
dohtml ${PN}.html
doman ${PN}.1
+ if use doc; then
+ mv docs/_build/{html,sphinx}
+ dohtml -r docs/_build/sphinx
+ fi
}
src_test() {