diff options
author | Carlos Aznarán Laos | 2022-02-10 22:40:57 -0500 |
---|---|---|
committer | Carlos Aznarán Laos | 2022-02-10 22:40:57 -0500 |
commit | e79f8609e362da1fcc0e7f5639e8c238bb4a5dcc (patch) | |
tree | 451f5469fabbd63a100435aac27a9c9fac9a6e20 | |
parent | 993a559252d868541a992cff9c7d1ca10c27c84c (diff) | |
download | aur-e79f8609e362da1fcc0e7f5639e8c238bb4a5dcc.tar.gz |
Add patch
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 25 |
2 files changed, 24 insertions, 3 deletions
@@ -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 @@ -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 )" } |