diff options
author | Ruben Undheim <ruben.undheim@gmail.com> | 2018-07-13 22:38:17 +0200 |
---|---|---|
committer | Ruben Undheim <ruben.undheim@gmail.com> | 2019-10-19 22:54:53 +0200 |
commit | 09702b2d4e70d53b5191378c7c614686958cec93 (patch) | |
tree | 4259e451212c8ab22805b16794c89afca91bd13a | |
parent | d8f8a3e7e9e7e17aaa6b6e1610bba2d90bcfdc29 (diff) |
Install the python programs and the iceboxdb module in /usr/share/fpga-icestorm/python, instead of in /usr/bin where upstream wants to put them.
The rationale for this is that icebox imports iceboxdb, so iceboxdb needs
to be findable by the python importer, but iceboxdb is not useful for any
program other than icebox, so it should not be in the normal system-wide
python include path.
Gbp-Pq: Name 0001-Install-the-python-programs-and-the-iceboxdb-module-.patch
-rw-r--r-- | icebox/Makefile | 40 | ||||
-rw-r--r-- | icetime/icetime.cc | 11 |
2 files changed, 22 insertions, 29 deletions
diff --git a/icebox/Makefile b/icebox/Makefile index 6906681..60afa29 100644 --- a/icebox/Makefile +++ b/icebox/Makefile @@ -36,26 +36,26 @@ clean: rm -f icebox.pyc iceboxdb.pyc install: all - mkdir -p $(DESTDIR)$(PREFIX)/share/icebox - mkdir -p $(DESTDIR)$(PREFIX)/bin - cp chipdb-384.txt $(DESTDIR)$(PREFIX)/share/icebox/ - cp chipdb-1k.txt $(DESTDIR)$(PREFIX)/share/icebox/ - cp chipdb-8k.txt $(DESTDIR)$(PREFIX)/share/icebox/ - cp chipdb-5k.txt $(DESTDIR)$(PREFIX)/share/icebox/ - cp chipdb-u4k.txt $(DESTDIR)$(PREFIX)/share/icebox/ - cp chipdb-lm4k.txt $(DESTDIR)$(PREFIX)/share/icebox/ - cp icebox.py $(DESTDIR)$(PREFIX)/bin/icebox.py - cp iceboxdb.py $(DESTDIR)$(PREFIX)/bin/iceboxdb.py - cp icebox_chipdb.py $(DESTDIR)$(PREFIX)/bin/icebox_chipdb$(PY_EXE) - cp icebox_diff.py $(DESTDIR)$(PREFIX)/bin/icebox_diff$(PY_EXE) - cp icebox_explain.py $(DESTDIR)$(PREFIX)/bin/icebox_explain$(PY_EXE) - cp icebox_asc2hlc.py $(DESTDIR)$(PREFIX)/bin/icebox_asc2hlc$(PY_EXE) - cp icebox_hlc2asc.py $(DESTDIR)$(PREFIX)/bin/icebox_hlc2asc$(PY_EXE) - cp icebox_colbuf.py $(DESTDIR)$(PREFIX)/bin/icebox_colbuf$(PY_EXE) - cp icebox_html.py $(DESTDIR)$(PREFIX)/bin/icebox_html$(PY_EXE) - cp icebox_maps.py $(DESTDIR)$(PREFIX)/bin/icebox_maps$(PY_EXE) - cp icebox_vlog.py $(DESTDIR)$(PREFIX)/bin/icebox_vlog$(PY_EXE) - cp icebox_stat.py $(DESTDIR)$(PREFIX)/bin/icebox_stat$(PY_EXE) + mkdir -p $(DESTDIR)$(PREFIX)/share/fpga-icestorm/chipdb + mkdir -p $(DESTDIR)$(PREFIX)/share/fpga-icestorm/python + cp chipdb-384.txt $(DESTDIR)$(PREFIX)/share/fpga-icestorm/chipdb/ + cp chipdb-1k.txt $(DESTDIR)$(PREFIX)/share/fpga-icestorm/chipdb/ + cp chipdb-8k.txt $(DESTDIR)$(PREFIX)/share/fpga-icestorm/chipdb/ + cp chipdb-5k.txt $(DESTDIR)$(PREFIX)/share/fpga-icestorm/chipdb/ + cp chipdb-u4k.txt $(DESTDIR)$(PREFIX)/share/fpga-icestorm/chipdb/ + cp chipdb-lm4k.txt $(DESTDIR)$(PREFIX)/share/fpga-icestorm/chipdb/ + cp icebox.py $(DESTDIR)$(PREFIX)/share/fpga-icestorm/python/icebox.py + cp iceboxdb.py $(DESTDIR)$(PREFIX)/share/fpga-icestorm/python/iceboxdb.py + cp icebox_chipdb.py $(DESTDIR)$(PREFIX)/share/fpga-icestorm/python/icebox_chipdb$(PY_EXE) + cp icebox_diff.py $(DESTDIR)$(PREFIX)/share/fpga-icestorm/python/icebox_diff$(PY_EXE) + cp icebox_explain.py $(DESTDIR)$(PREFIX)/share/fpga-icestorm/python/icebox_explain$(PY_EXE) + cp icebox_asc2hlc.py $(DESTDIR)$(PREFIX)/share/fpga-icestorm/python/icebox_asc2hlc$(PY_EXE) + cp icebox_hlc2asc.py $(DESTDIR)$(PREFIX)/share/fpga-icestorm/python/icebox_hlc2asc$(PY_EXE) + cp icebox_colbuf.py $(DESTDIR)$(PREFIX)/share/fpga-icestorm/python/icebox_colbuf$(PY_EXE) + cp icebox_html.py $(DESTDIR)$(PREFIX)/share/fpga-icestorm/python/icebox_html$(PY_EXE) + cp icebox_maps.py $(DESTDIR)$(PREFIX)/share/fpga-icestorm/python/icebox_maps$(PY_EXE) + cp icebox_vlog.py $(DESTDIR)$(PREFIX)/share/fpga-icestorm/python/icebox_vlog$(PY_EXE) + cp icebox_stat.py $(DESTDIR)$(PREFIX)/share/fpga-icestorm/python/icebox_stat$(PY_EXE) uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/icebox.py diff --git a/icetime/icetime.cc b/icetime/icetime.cc index cc37625..9bf4ff5 100644 --- a/icetime/icetime.cc +++ b/icetime/icetime.cc @@ -324,16 +324,9 @@ void read_config() void read_chipdb() { char buffer[1024]; - std::string filepath = chipdbfile; + snprintf(buffer, 1024, "/usr/share/fpga-icestorm/chipdb/chipdb-%s.txt", config_device.c_str()); - if (filepath.empty()) - filepath = find_chipdb(config_device); - if (filepath.empty()) { - fprintf(stderr, "Can't find chipdb file for device %s\n", config_device.c_str()); - exit(1); - } - - FILE *fdb = fopen(filepath.c_str(), "r"); + FILE *fdb = fopen(buffer, "r"); if (fdb == nullptr) { perror("Can't open chipdb file"); exit(1); |