Skip to content

Commit

Permalink
app-portage/g-octave: apply patches using PATCHES variable
Browse files Browse the repository at this point in the history
Package-Manager: portage-2.2.28
  • Loading branch information
Rafael Martins committed Nov 6, 2016
1 parent 2c073e9 commit a766a6c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- ./g-octave-0.4.1/g_octave/package_manager.py 2010-10-23 23:37:26.000000000 +0200
+++ ./g-octave-0.4.1/g_octave/package_manager.py 2011-05-25 12:52:10.510019006 +0200
--- g-octave-0.4.1/g_octave/package_manager.py 2010-10-23 23:37:26.000000000 +0200
+++ g-octave-0.4.1/g_octave/package_manager.py 2011-05-25 12:52:10.510019006 +0200
@@ -15,6 +15,7 @@
'Portage',
'Pkgcore',
Expand Down Expand Up @@ -65,8 +65,8 @@
+ for line in p.stdout:
+ packages.append(line.strip())
+ return packages
--- ./g-octave-0.4.1/scripts/g-octave 2011-05-25 12:00:25.740019020 +0200
+++ ./g-octave-0.4.1/scripts/g-octave 2011-05-25 12:00:39.434019008 +0200
--- g-octave-0.4.1/scripts/g-octave 2011-05-25 12:00:25.740019020 +0200
+++ g-octave-0.4.1/scripts/g-octave 2011-05-25 12:00:39.434019008 +0200
@@ -217,7 +217,7 @@
return os.EX_DATAERR
return os.EX_OK
Expand Down
4 changes: 2 additions & 2 deletions app-portage/g-octave/files/g-octave-0.4.1-fix-Makefile.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- share/g-octave.eclass 2013-05-30 19:01:07.980521612 +0200
+++ share/g-octave.eclass.new 2013-05-30 19:03:38.933514388 +0200
--- g-octave-0.4.1/share/g-octave.eclass 2013-05-30 19:01:07.980521612 +0200
+++ g-octave-0.4.1/share/g-octave.eclass.new 2013-05-30 19:03:38.933514388 +0200
@@ -48,6 +48,9 @@
for filename in Makefile configure; do
cp "${DISTDIR}/g-octave_${filename}" "${S}/${filename}"
Expand Down
14 changes: 8 additions & 6 deletions app-portage/g-octave/g-octave-0.4.1-r5.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ DEPEND="doc? ( >=dev-python/sphinx-1.0 )"
RDEPEND="sys-apps/portage"

python_prepare_all() {
epatch "${FILESDIR}/${P}-add_cave_support.patch"
epatch "${FILESDIR}/${P}-fix-sourceforge-svn-root.patch"
epatch "${FILESDIR}/${P}-fix-Makefile.patch"
local PATCHES=(
"${FILESDIR}/${P}-add_cave_support.patch"
"${FILESDIR}/${P}-fix-sourceforge-svn-root.patch"
"${FILESDIR}/${P}-fix-Makefile.patch"
)
sed -i -e 's/^has_fetch.*$/has_fetch = False/' scripts/g-octave \
|| die 'failed to patch the g-octave main script'
distutils-r1_python_prepare_all
Expand Down Expand Up @@ -70,10 +72,10 @@ pkg_postinst() {

pkg_config() {
local db="$(g-octave --config db)"
mkdir -p "${db}"
mkdir -p "${db}" || die 'mkdir failed.'
einfo "Extracting g-octave database files to: ${db}"
tar -xzf "${DISTDIR}/${PN}-db-${DB_COMMIT:0:7}.tar.gz" -C "${db}" || die 'tar failed.'
rm -rf "${db}"/{patches,octave-forge,info.json,manifest.json,timestamp}
rm -rf "${db}"/{patches,octave-forge,info.json,manifest.json,timestamp} || die 'rm db files failed.'
mv -f "${db}/${DB_DIR}"/* "${db}" || die 'mv failed.'
rm -rf "${db}/${DB_DIR}"
rm -rf "${db}/${DB_DIR}" || die 'rm db dir failed.'
}

0 comments on commit a766a6c

Please sign in to comment.