From 067a855e5180b89f39726ea1cf5992f4d0c3ce6d Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Fri, 11 Aug 2023 12:59:51 +0200 Subject: [PATCH] initial package creation Signed-off-by: Toshaan Bharvani --- SOURCES/xc3sprog-ambiguous-byte.patch | 148 +++++++++++++++++++++++++ SOURCES/xc3sprog-cxx-environment.patch | 11 ++ SPECS/xc3sprog.spec | 68 ++++++++++++ 3 files changed, 227 insertions(+) create mode 100644 SOURCES/xc3sprog-ambiguous-byte.patch create mode 100644 SOURCES/xc3sprog-cxx-environment.patch create mode 100644 SPECS/xc3sprog.spec diff --git a/SOURCES/xc3sprog-ambiguous-byte.patch b/SOURCES/xc3sprog-ambiguous-byte.patch new file mode 100644 index 0000000..332eb6d --- /dev/null +++ b/SOURCES/xc3sprog-ambiguous-byte.patch @@ -0,0 +1,148 @@ +diff -u a/bitfile.cpp b/bitfile.cpp +--- a/bitfile.cpp 2017-08-16 23:18:43.000000000 +1000 ++++ b/bitfile.cpp 2021-09-05 13:54:41.982983499 +1000 +@@ -96,7 +96,7 @@ + length = ftell(fp); /* Fix at end */ + fseek(fp, 0, SEEK_SET); + if(buffer) delete [] buffer; +- buffer= new byte[length]; ++ buffer= new ::byte[length]; + if (buffer == 0) + return 1; + fread(buffer,1, length, fp); +@@ -128,7 +128,7 @@ + length >>= 1; /* We read two Hex nibbles for each byte*/ + fseek(fp, 0, SEEK_SET); + if(buffer) delete [] buffer; +- buffer= new byte[length]; ++ buffer= new ::byte[length]; + + /* FIXME: generate a dummy header*/ + if (buffer == 0) +@@ -176,7 +176,7 @@ + /* FIXME: Fill in dtime and date from the input file */ + + if(buffer) delete [] buffer; +- buffer=new byte[length]; ++ buffer=new ::byte[length]; + while ((fgets(buf, 1024, fp)) != 0) + { + uint32_t count; +@@ -333,13 +333,13 @@ + + void BitFile::processData(FILE *fp) + { +- byte t[4]; ++ ::byte t[4]; + fread(t,1,4,fp); + length=(t[0]<<24)+(t[1]<<16)+(t[2]<<8)+t[3]; + if(buffer) delete [] buffer; +- buffer=new byte[length]; ++ buffer=new ::byte[length]; + for(unsigned int i=0; i>16) +@@ -616,11 +616,11 @@ + + void BitFile::readField(string &field, FILE *fp) + { +- byte t[2]; ++ ::byte t[2]; + fread(t,1,2,fp); + unsigned short len=(t[0]<<8)+t[1]; + for(int i=0; i= 37 +BuildRequires: libusb-compat-0.1-devel +%else +BuildRequires: libusb-devel +%endif + +%description +xc3sprog is a suite of utilities for programming Xilinx FPGAs, CPLDs, and +EEPROMs with the Xilinx Parallel Cable and other JTAG adapters under Linux. + + +%prep +%autosetup -n %{name}-code-r%{version}-trunk + + +%build +%cmake +%cmake_build + + +%install +%cmake_install + +install -p -m 644 -D -t $RPM_BUILD_ROOT%{_datadir}/xc3sprog \ + cablelist.txt \ + devlist.txt + +install -p -m 644 -D -t $RPM_BUILD_ROOT%{_datadir}/xc3sprog/bscan_spi \ + bscan_spi/README.txt \ + bscan_spi/*.vhd \ + bscan_spi/*.v \ + bscan_spi/*.ucf \ + bscan_spi/*.bit + +install -p -m 644 -D -t $RPM_BUILD_ROOT%{_datadir}/xc3sprog/multiboot \ + multiboot/README \ + multiboot/*.bit \ + multiboot/*.hex + + +%files +%license COPYING LICENSE +%doc byte-order.txt Contributors PERFORMANCE README Readme.Cmake Readme.Darwin +%doc Readme.DLC10 Readme.JTAG_Timing README.Win32 ToDo +%dir %{_datadir}/xc3sprog +%{_bindir}/bitparse +%{_bindir}/detectchain +%{_bindir}/javr +%{_bindir}/jedecparse +%{_bindir}/readdna +%{_bindir}/srecparse +%{_bindir}/xc2c_warp +%{_bindir}/xc3sprog +%{_datadir}/xc3sprog