summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiretza2019-03-31 19:39:29 +0200
committervicencb2019-03-31 22:03:38 +0200
commit54c15bf7144e33c734c64e95f1bd8af85e49a987 (patch)
tree18df3644c7817f4379fd53f45549f9b95629cc26
parent0256cc2a8b862829ce80ebd0c3da0a5b5f237e0f (diff)
downloadaur-54c15bf7144e33c734c64e95f1bd8af85e49a987.tar.gz
Add patch for COE file output
COE output (`srec_cat some_file --binary -o test.coe --coe`) would always fail with: ``` The Coefficient (.COE) Files (Xilinx) output format is unable to cope with holes in the data,however there is a hole at 0x0000..0x0017. ``` Even if the input was a plain binary file, which can't have any holes. The cause was that the internal address value of the COE output was never incremented, and thus got out of sync with the input address, looking like a hole. Simple one-line fix. COE output was added in 1.61, which has the same problem - apparently it was never tested?! Signed-off-by: vicencb <vicencb@gmail.com>
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD13
-rw-r--r--coe.patch12
3 files changed, 25 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index df599b42a801..15f88fc829b1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = srecord
pkgdesc = The SRecord package is a collection of powerful tools for manipulating EPROM load files.
pkgver = 1.64
- pkgrel = 1
+ pkgrel = 2
url = http://srecord.sourceforge.net
arch = i686
arch = x86_64
@@ -10,7 +10,9 @@ pkgbase = srecord
makedepends = ghostscript
options = !makeflags
source = http://srecord.sourceforge.net/srecord-1.64.tar.gz
+ source = coe.patch
md5sums = 4de4a7497472d7972645c2af91313769
+ md5sums = 7bd7d4451a683d4832a0ddb2b160756e
pkgname = srecord
diff --git a/PKGBUILD b/PKGBUILD
index e1d56b1eb8cd..08ba2ea0a580 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,15 +1,21 @@
pkgname=srecord
pkgver=1.64
-pkgrel=1
+pkgrel=2
pkgdesc="The SRecord package is a collection of powerful tools for manipulating EPROM load files."
arch=('i686' 'x86_64')
license=('GPL')
makedepends=('boost' 'ghostscript')
url="http://srecord.sourceforge.net"
-source=("${url}/${pkgname}-${pkgver}.tar.gz")
+source=("${url}/${pkgname}-${pkgver}.tar.gz"
+ 'coe.patch')
# broken makefile has race conditions, remove "-j"
options=('!makeflags')
+prepare() {
+ cd "$srcdir/$pkgname-$pkgver"
+ patch -p1 < "$srcdir/coe.patch"
+}
+
build() {
cd "$srcdir/$pkgname-$pkgver"
./configure --prefix=/usr || return 1
@@ -20,4 +26,5 @@ package() {
cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir" install || return 1
}
-md5sums=('4de4a7497472d7972645c2af91313769')
+md5sums=('4de4a7497472d7972645c2af91313769'
+ '7bd7d4451a683d4832a0ddb2b160756e')
diff --git a/coe.patch b/coe.patch
new file mode 100644
index 000000000000..e3bfe24f6520
--- /dev/null
+++ b/coe.patch
@@ -0,0 +1,12 @@
+diff --git a/srecord/output/file/coe.cc b/srecord/output/file/coe.cc
+index 8e5995e..53bedb3 100644
+--- a/srecord/output/file/coe.cc
++++ b/srecord/output/file/coe.cc
+@@ -205,6 +205,7 @@ srecord::output_file_coe::write(const srecord::record &record)
+ )
+ fatal_alignment_error(width_in_bytes);
+
++ address += len;
+ for (unsigned j = 0; j < len; ++j)
+ {
+ if (got_data && (j % width_in_bytes) == 0)