summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Aznarán Laos2022-02-10 22:40:57 -0500
committerCarlos Aznarán Laos2022-02-10 22:40:57 -0500
commite79f8609e362da1fcc0e7f5639e8c238bb4a5dcc (patch)
tree451f5469fabbd63a100435aac27a9c9fac9a6e20
parent993a559252d868541a992cff9c7d1ca10c27c84c (diff)
downloadaur-e79f8609e362da1fcc0e7f5639e8c238bb4a5dcc.tar.gz
Add patch
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD25
2 files changed, 24 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 522f1a88b997..72151de43ac4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = octave-level-set
pkgdesc = Routines for calculating the time-evolution of the level-set equation and extracting geometric information from the level-set function
pkgver = 0.3.0
- pkgrel = 2
+ pkgrel = 3
url = https://octave.sourceforge.io/level-set
install = octave-level-set.install
arch = any
diff --git a/PKGBUILD b/PKGBUILD
index d5723c6f058a..6b76b830e324 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,7 +11,7 @@
_pack=level-set
pkgname=octave-${_pack}
pkgver=0.3.0
-pkgrel=2
+pkgrel=3
pkgdesc="Routines for calculating the time-evolution of the level-set equation and extracting geometric information from the level-set function"
arch=(any)
url="https://octave.sourceforge.io/${_pack}"
@@ -24,6 +24,7 @@ backup=()
options=()
install=${pkgname}.install
_archive=${_pack}-${pkgver}.tar.gz
+_archive_patched=${_pack}-${pkgver}-patched.tar.gz
source=("https://downloads.sourceforge.net/octave/${_archive}")
noextract=("${_archive}")
sha512sums=('f461433cf08f26da7eea68121c33232f976b08a634f0ba8cee6aeb017aaaec9c8261e64591657949d21c3e9734b77afd0034b909e2c4e8a6d1fb6393982a51e7')
@@ -39,6 +40,26 @@ _install_dir() {
cp -rT "$src" "$dst"
}
+prepare() {
+ cd "$srcdir"
+ tar xzf "$_archive"
+ # https://salsa.debian.org/pkg-octave-team/octave-level-set/-/blob/debian/latest/debian/patches/octave5.patch
+ sed -i 's/error (exc.what ());/error ("%s", exc.what ());/g' ${_pack}/src/internal_mesh.cpp
+ sed -i 's/error (exc.what ());/error ("%s", exc.what ());/g' ${_pack}/src/geomBoundary.cpp
+ sed -i 's/error (exc.what ());/error ("%s", exc.what ());/g' ${_pack}/src/geomElements.cpp
+ sed -i 's/error (exc.what ());/error ("%s", exc.what ());/g' ${_pack}/src/geomGamma.cpp
+ sed -i 's/error (exc.what ());/error ("%s", exc.what ());/g' ${_pack}/src/internal_fastmarching.cpp
+ sed -i 's/error (exc.what ());/error ("%s", exc.what ());/g' ${_pack}/src/internal_init_narrowband.cpp
+ sed -i 's/error (exc.what ());/error ("%s", exc.what ());/g' ${_pack}/src/nbFromGeom.cpp
+ sed -i 's/error (exc.what ());/error ("%s", exc.what ());/g' ${_pack}/src/upwindGrad.cpp
+ # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977012
+ sed -i 's/phi.nelem/phi.numel/g' ${_pack}/src/geomGamma.cpp
+ sed -i 's/inners.nelem/inners.numel/g' ${_pack}/src/internal_mesh.cpp
+ sed -i 's/cellSegs.nelem/cellSegs.numel/g' ${_pack}/src/internal_mesh.cpp
+ sed -i 's/idx.length/idx.numel/g' ${_pack}/src/internal_fastmarching.cpp
+ tar czf "$_archive_patched" "$_pack"
+}
+
build() {
_prefix="$srcdir"/install_prefix
_archprefix="$srcdir"/install_archprefix
@@ -48,7 +69,7 @@ build() {
cat <<-EOF
pkg local_list octave_packages;
pkg prefix $_prefix $_archprefix;
- pkg install -verbose -nodeps $_archive;
+ pkg install -verbose -nodeps $_archive_patched;
EOF
)"
}