commit: 2f1f74c765eefaf97893bc1b6bda907729748c6b Author: Tony Olagbaiye <bqv <AT> fron <DOT> io> AuthorDate: Fri Dec 9 22:12:24 2022 +0000 Commit: Tony Olagbaiye <gentoo <AT> fron <DOT> io> CommitDate: Fri Dec 9 22:12:24 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2f1f74c7
dev-embedded/icestorm: new package, add 0_p20210309, 9999 Signed-off-by: Tony Olagbaiye <bqv <AT> fron.io> dev-embedded/icestorm/Manifest | 1 + .../icestorm/files/icestorm-9999-flags.patch | 42 +++++++++++++++++++++ .../icestorm/files/icestorm-9999-ftdi-fix.patch | 28 ++++++++++++++ .../icestorm/files/icestorm-9999-prefix.patch | 26 +++++++++++++ dev-embedded/icestorm/icestorm-0_p20210309.ebuild | 43 ++++++++++++++++++++++ dev-embedded/icestorm/icestorm-9999.ebuild | 42 +++++++++++++++++++++ dev-embedded/icestorm/metadata.xml | 12 ++++++ 7 files changed, 194 insertions(+) diff --git a/dev-embedded/icestorm/Manifest b/dev-embedded/icestorm/Manifest new file mode 100644 index 000000000..831a26e11 --- /dev/null +++ b/dev-embedded/icestorm/Manifest @@ -0,0 +1 @@ +DIST icestorm-0_p20210309.tar.gz 946813 BLAKE2B 6b687cea549127fbdbeb44222feb1bac406db2ef9d7fb11992aa2f0b5540b83bd8e1cf4faa5c62bf9fa1b681497ac102843f3f5cf0fa39cce7951d523084049a SHA512 17cfce499173dffa0ae7d4564b89c0e28ef32a80534c07bf099958981e487db1ec6c35c6b82376e5513f9fe79f67a3e7dd360203512cd43686e52d47ae7f073a diff --git a/dev-embedded/icestorm/files/icestorm-9999-flags.patch b/dev-embedded/icestorm/files/icestorm-9999-flags.patch new file mode 100644 index 000000000..c1865c99a --- /dev/null +++ b/dev-embedded/icestorm/files/icestorm-9999-flags.patch @@ -0,0 +1,42 @@ +From 624ee9278f15abb6de5d014294bb5ba4a717401b Mon Sep 17 00:00:00 2001 +From: "Daniel M. Weeks" <d...@danweeks.net> +Date: Mon, 20 Mar 2017 16:50:06 -0400 +Subject: [PATCH 2/3] flags + +Signed-off-by: Daniel M. Weeks <d...@danweeks.net> +--- + config.mk | 4 ++-- + iceprog/Makefile | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/config.mk b/config.mk +index c7f80a3..779c4e2 100644 +--- a/config.mk ++++ b/config.mk +@@ -19,8 +19,8 @@ endif + WARN_LEVEL ?= all + + LDLIBS = -lm -lstdc++ +-CFLAGS += -MD -MP -O$(OPT_LEVEL) $(DBG_LEVEL) -W$(WARN_LEVEL) -std=$(C_STD) -I$(PREFIX)/include +-CXXFLAGS += -MD -MP -O$(OPT_LEVEL) $(DBG_LEVEL) -W$(WARN_LEVEL) -std=$(CXX_STD) -I$(PREFIX)/include ++CFLAGS += -MD -MP $(DBG_LEVEL) -W$(WARN_LEVEL) -std=$(C_STD) -I$(PREFIX)/include ++CXXFLAGS += -MD -MP $(DBG_LEVEL) -W$(WARN_LEVEL) -std=$(CXX_STD) -I$(PREFIX)/include + + DESTDIR ?= + CHIPDB_SUBDIR ?= $(PROGRAM_PREFIX)icebox +diff --git a/iceprog/Makefile b/iceprog/Makefile +index 3cb07b8..7f5050f 100644 +--- a/iceprog/Makefile ++++ b/iceprog/Makefile +@@ -4,7 +4,7 @@ ifneq ($(shell uname -s),Darwin) + LDLIBS = -L/usr/local/lib -lm + else + LIBFTDI_NAME = $(shell $(PKG_CONFIG) --exists libftdi1 && echo ftdi1 || echo ftdi) +- LDLIBS = -L/usr/local/lib -l$(LIBFTDI_NAME) -lm ++ LDLIBS = -l$(LIBFTDI_NAME) -lm + endif + + ifeq ($(STATIC),1) +-- +Daniel M. Weeks + diff --git a/dev-embedded/icestorm/files/icestorm-9999-ftdi-fix.patch b/dev-embedded/icestorm/files/icestorm-9999-ftdi-fix.patch new file mode 100644 index 000000000..43ec929e7 --- /dev/null +++ b/dev-embedded/icestorm/files/icestorm-9999-ftdi-fix.patch @@ -0,0 +1,28 @@ +From 9fada8e486778af30e2ab38bca9c86089fa78a33 Mon Sep 17 00:00:00 2001 +From: "Daniel M. Weeks" <d...@danweeks.net> +Date: Tue, 27 Jun 2017 10:32:51 -0400 +Subject: [PATCH 3/3] FTDI fix + +Signed-off-by: Daniel M. Weeks <d...@danweeks.net> +--- + iceprog/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/iceprog/Makefile b/iceprog/Makefile +index 7f5050f..949aee4 100644 +--- a/iceprog/Makefile ++++ b/iceprog/Makefile +@@ -12,8 +12,8 @@ LDFLAGS += -static + LDLIBS += $(shell for pkg in libftdi1 libftdi; do $(PKG_CONFIG) --silence-errors --static --libs $$pkg && exit; done; echo -lftdi; ) + CFLAGS += $(shell for pkg in libftdi1 libftdi; do $(PKG_CONFIG) --silence-errors --static --cflags $$pkg && exit; done; ) + else +-LDLIBS += $(shell for pkg in libftdi1 libftdi; do $(PKG_CONFIG) --silence-errors --libs $$pkg && exit; done; echo -lftdi; ) +-CFLAGS += $(shell for pkg in libftdi1 libftdi; do $(PKG_CONFIG) --silence-errors --cflags $$pkg && exit; done; ) ++override LDLIBS += $(shell for pkg in libftdi1 libftdi; do $(PKG_CONFIG) --silence-errors --libs $$pkg && exit; done; echo -lftdi; ) ++override CFLAGS += $(shell for pkg in libftdi1 libftdi; do $(PKG_CONFIG) --silence-errors --cflags $$pkg && exit; done; ) + endif + + all: $(PROGRAM_PREFIX)iceprog$(EXE) +-- +Daniel M. Weeks + diff --git a/dev-embedded/icestorm/files/icestorm-9999-prefix.patch b/dev-embedded/icestorm/files/icestorm-9999-prefix.patch new file mode 100644 index 000000000..b729906e5 --- /dev/null +++ b/dev-embedded/icestorm/files/icestorm-9999-prefix.patch @@ -0,0 +1,26 @@ +From 5bc4954b147bf44a483493ddecdef871a72affba Mon Sep 17 00:00:00 2001 +From: "Daniel M. Weeks" <d...@danweeks.net> +Date: Mon, 20 Mar 2017 16:42:11 -0400 +Subject: [PATCH 1/3] prefix + +Signed-off-by: Daniel M. Weeks <d...@danweeks.net> +--- + icebox/icebox_vlog.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/icebox/icebox_vlog.py b/icebox/icebox_vlog.py +index 0133347..d251651 100755 +--- a/icebox/icebox_vlog.py ++++ b/icebox/icebox_vlog.py +@@ -384,7 +384,7 @@ def seg_to_net(seg, default=None): + + if lookup_symbols: + text_func.append("// Debug Symbols") +- with open("/usr/local/share/icebox/chipdb-%s.txt" % ic.device, "r") as f: ++ with open("/usr/share/icebox/chipdb-%s.txt" % ic.device, "r") as f: + current_net = -1 + exported_names = dict() + for line in f: +-- +Daniel M. Weeks + diff --git a/dev-embedded/icestorm/icestorm-0_p20210309.ebuild b/dev-embedded/icestorm/icestorm-0_p20210309.ebuild new file mode 100644 index 000000000..fef371959 --- /dev/null +++ b/dev-embedded/icestorm/icestorm-0_p20210309.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7,8} ) +inherit eutils python-any-r1 toolchain-funcs + +DESCRIPTION="IceStorm - tools for analyzing and creating bitstreams for Lattice iCE40 FPGAs" +HOMEPAGE="http://www.clifford.at/icestorm/" +LICENSE="ISC" +if [ ${PV} == "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/cliffordwolf/icestorm.git" +else + EGIT_COMMIT="c495861c19bd0976c88d4964f912abe76f3901c3" + SRC_URI="https://github.com/cliffordwolf/${PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" + S="${WORKDIR}/${PN}-${EGIT_COMMIT}" +fi + +SLOT="0" +IUSE="ftdi" + +RDEPEND="ftdi? ( dev-embedded/libftdi:= )" +DEPEND=" + ${PYTHON_DEPS} + virtual/pkgconfig + ${RDEPEND}" + +PATCHES=( "${FILESDIR}"/${PN}-9999-prefix.patch + "${FILESDIR}"/${PN}-9999-flags.patch + "${FILESDIR}"/${PN}-9999-ftdi-fix.patch ) + +src_compile() { + export PREFIX=/usr + emake CC=$(tc-getCC) CXX=$(tc-getCXX) CFLAGS="$CFLAGS" ICEPROG=$(usex ftdi 1 0) +} + +src_install() { + emake DESTDIR="${D}" ICEPROG=$(usex ftdi 1 0) install + einstalldocs +} diff --git a/dev-embedded/icestorm/icestorm-9999.ebuild b/dev-embedded/icestorm/icestorm-9999.ebuild new file mode 100644 index 000000000..fd47e2068 --- /dev/null +++ b/dev-embedded/icestorm/icestorm-9999.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8,9,10} ) +inherit eutils python-any-r1 toolchain-funcs + +DESCRIPTION="IceStorm - tools for analyzing and creating bitstreams for Lattice iCE40 FPGAs" +HOMEPAGE="http://www.clifford.at/icestorm/" +LICENSE="ISC" +if [ ${PV} == "9999" ]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/cliffordwolf/icestorm.git" +else + EGIT_COMMIT="" + SRC_URI="https://github.com/cliffordwolf/${PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" + S="${WORKDIR}/${PN}-${EGIT_COMMIT}" +fi + +SLOT="0" +IUSE="ftdi" + +RDEPEND="ftdi? ( dev-embedded/libftdi:= )" +DEPEND=" + ${PYTHON_DEPS} + virtual/pkgconfig + ${RDEPEND}" + +PATCHES=( "${FILESDIR}"/${PN}-9999-prefix.patch + "${FILESDIR}"/${PN}-9999-ftdi-fix.patch ) + +src_compile() { + export PREFIX=/usr + emake CC=$(tc-getCC) CXX=$(tc-getCXX) CFLAGS="$CFLAGS" ICEPROG=$(usex ftdi 1 0) +} + +src_install() { + emake DESTDIR="${D}" ICEPROG=$(usex ftdi 1 0) install + einstalldocs +} diff --git a/dev-embedded/icestorm/metadata.xml b/dev-embedded/icestorm/metadata.xml new file mode 100644 index 000000000..67e415794 --- /dev/null +++ b/dev-embedded/icestorm/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <longdescription lang="en"> + </longdescription> + <use> + <flag name='ftdi'>Enable support for USB FTDI chips via <pkg>dev-embedded/libftdi</pkg></flag> + </use> + <upstream> + <remote-id type="github">cliffordwolf/icestorm</remote-id> + </upstream> +</pkgmetadata>