summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Aznarán Laos2022-02-10 17:29:41 -0500
committerCarlos Aznarán Laos2022-02-10 17:29:41 -0500
commit843e29bf8ff3ccb78e9962ba1340f9dd2e63469d (patch)
tree2a064617c1ba82d96d9f12ef32d187373ab7d18b
parentfa66ecace7a93d8f2bebad2feaea41151f4abc21 (diff)
downloadaur-octave-mechanics.tar.gz
Add patch
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD14
2 files changed, 13 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 34293d2e1e6f..3e573ab2f6b4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = octave-mechanics
pkgdesc = Library with functions useful for numerical computation in classical mechanics and structural analysis
pkgver = 1.3.1
- pkgrel = 5
+ pkgrel = 6
url = https://octave.sourceforge.io/mechanics
install = octave-mechanics.install
arch = any
diff --git a/PKGBUILD b/PKGBUILD
index 0b2d88a599e8..2f623fad2e53 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,7 +11,7 @@
_pack=mechanics
pkgname=octave-${_pack}
pkgver=1.3.1
-pkgrel=5
+pkgrel=6
pkgdesc="Library with functions useful for numerical computation in classical mechanics and structural analysis"
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=('e70d0e6e0918c052c7339e8979cebd2fcda63333c1ab2a05e45bf174b60dd7601e02e255dc97dbc359d59114b52f2654f2b7be6046a9f6885ac5f0a29f740e87')
@@ -39,6 +40,15 @@ _install_dir() {
cp -rT "$src" "$dst"
}
+prepare() {
+ cd "$srcdir"
+ tar xzf "$_archive"
+ # https://github.com/DragonFlyBSD/DPorts/blob/master/math/octave-forge-mechanics/files/patch-verletstep__boxed.cc
+ sed -i 's/feval/octave::feval/g' ${_pack}/inst/molecularDynamics/src/verletstep_boxed.cc
+ sed -i 's/feval/octave::feval/g' ${_pack}/inst/molecularDynamics/src/verletstep.cc
+ tar czf "$_archive_patched" "$_pack"
+}
+
build() {
_prefix="$srcdir"/install_prefix
_archprefix="$srcdir"/install_archprefix
@@ -48,7 +58,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
)"
}