From: Stefan Huber Date: Tue, 18 Aug 2026 07:40:11 +0000 (+0200) Subject: dev-embedded/simavr: carry over from hamari overlay, bump to 1.8 X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=ff71c7d10f59d7f06524bbab2ad23165e2459082;p=shuber-gentoo-overlay.git dev-embedded/simavr: carry over from hamari overlay, bump to 1.8 Import the simavr-1.7 ebuild from the hamari overlay and bump to the 1.8 release. The carried-over install patch redirected headers to /usr/avr/include/simavr, which doesn't match simavr's own simavr.pc/simavr-avr.pc (${prefix}/include) and broke pkg-config consumers. Replaced it with a smaller patch that parameterizes the Makefile's hardcoded "lib" install dir as INSTALL_LIBDIR, fed via $(get_libdir) so multilib-strict passes and the binary's RPATH points at the real install location instead of the build directory. Also pass SIMAVR_VERSION=${PV} so the .pc files report the real version instead of "unknown". Also drop the dead empty RDEPEND/BDEPEND assignments and the redundant KEYWORDS="" on the live ebuild branch, convert PATCHES to an array, and add metadata.xml with a maintainer and GitHub remote-id. Co-Authored-By: Claude Sonnet 5 --- diff --git a/dev-embedded/simavr/Manifest b/dev-embedded/simavr/Manifest new file mode 100644 index 0000000..74e1cde --- /dev/null +++ b/dev-embedded/simavr/Manifest @@ -0,0 +1,4 @@ +AUX simavr-libdir.patch 2417 BLAKE2B 80e861ce4743e71b9c97c4658579e79a0916e54e8c89f7b7fd4b58f655007952d1e3ad054eaa80ebb57df75454df65440ea0c4f8fb66ea824888473b00706f7e SHA512 083f5da35918b7cdf76231a06ab75da1eb807125e3b555b83a92ecda0823517fd8fb66bd2ed530a664fa9a85fdba6cfcd6479e66f050c574c4a1bf060b7d1e32 +DIST simavr-1.8.tar.gz 3958333 BLAKE2B e709a41e489958a598cb2e4726053899fcf8676906d75c9ab7b941bb559d347d8130660a6c3b870d6052dc5969d3245eb960864bfbbd261c84e32df7d55e2c9f SHA512 744ca05c78b368df44b1886b7b5bf7dae0a137a8da2e7a395eb0fabcc579c0f6321b174ee1179c8ed7f8a10952dff3ff52aa5ecb82e8fcb5acc641b86ae17d2c +EBUILD simavr-1.8.ebuild 738 BLAKE2B da6d1dc4c80acaf54cb6d012df885b7ef6495df46382925f66ef620b5d09ddc1250cdaf06da69f077f65042a1ea1e42e2a3dce5801135900f211860c422494ee SHA512 5a5dfd1c2899cea7c815c65288b4241da658f6cebb1b1c9dd7d391010869da90aca255bac4285e43f3a7bacff1b9c2451626ce0cade18ba4e59ca539b6108b71 +MISC metadata.xml 323 BLAKE2B c35be8eefdfc07aa7899f27348496cbd84b45333cf9e976f28a622d108afdea81032300099fd8208195d65cea2f869953d088ba16dc8f3530c2ae930f9fe01c0 SHA512 a6bd6a1e0f4d35c5d159f5d76643cfee757c3b58a60f84de9978b2c3b410514c3a38ae23f88704413af0b72e6be654f508780ba34f96a0880a647637a82c3621 diff --git a/dev-embedded/simavr/files/simavr-libdir.patch b/dev-embedded/simavr/files/simavr-libdir.patch new file mode 100644 index 0000000..b8e2498 --- /dev/null +++ b/dev-embedded/simavr/files/simavr-libdir.patch @@ -0,0 +1,50 @@ +--- a/simavr/Makefile 2026-06-02 20:12:32.000000000 +0200 ++++ b/simavr/Makefile 2026-08-18 10:11:20.310236542 +0200 +@@ -79,16 +79,16 @@ + $(INSTALL) -m644 sim/*.h $(DESTDIR)/include/simavr/ + $(INSTALL) -m644 sim_core_*.h $(DESTDIR)/include/simavr/ + $(INSTALL) -m644 sim/avr/*.h $(DESTDIR)/include/simavr/avr/ +- $(MKDIR) $(DESTDIR)/lib +- $(INSTALL) ${OBJ}/libsimavr.a $(DESTDIR)/lib/ +- $(MKDIR) $(DESTDIR)/lib/pkgconfig/ +- sed -e "s|PREFIX|${PREFIX}|g" -e "s|VERSION|${SIMAVR_VERSION}|g" \ +- simavr-avr.pc >$(DESTDIR)/lib/pkgconfig/simavr-avr.pc +- sed -e "s|PREFIX|${PREFIX}|g" -e "s|VERSION|${SIMAVR_VERSION}|g" \ +- simavr.pc >$(DESTDIR)/lib/pkgconfig/simavr.pc ++ $(MKDIR) $(DESTDIR)/$(INSTALL_LIBDIR) ++ $(INSTALL) ${OBJ}/libsimavr.a $(DESTDIR)/$(INSTALL_LIBDIR)/ ++ $(MKDIR) $(DESTDIR)/$(INSTALL_LIBDIR)/pkgconfig/ ++ sed -e "s|PREFIX|${PREFIX}|g" -e "s|VERSION|${SIMAVR_VERSION}|g" -e "s|/lib$$|/$(INSTALL_LIBDIR)|" \ ++ simavr-avr.pc >$(DESTDIR)/$(INSTALL_LIBDIR)/pkgconfig/simavr-avr.pc ++ sed -e "s|PREFIX|${PREFIX}|g" -e "s|VERSION|${SIMAVR_VERSION}|g" -e "s|/lib$$|/$(INSTALL_LIBDIR)|" \ ++ simavr.pc >$(DESTDIR)/$(INSTALL_LIBDIR)/pkgconfig/simavr.pc + ifeq (${shell uname}, Linux) +- $(INSTALL) ${OBJ}/libsimavr.so.1 $(DESTDIR)/lib/ +- ln -sf libsimavr.so.1 $(DESTDIR)/lib/libsimavr.so ++ $(INSTALL) ${OBJ}/libsimavr.so.1 $(DESTDIR)/$(INSTALL_LIBDIR)/ ++ ln -sf libsimavr.so.1 $(DESTDIR)/$(INSTALL_LIBDIR)/libsimavr.so + endif + $(MKDIR) $(DESTDIR)/bin + $(INSTALL) ${OBJ}/${target}.elf $(DESTDIR)/bin/simavr +--- a/Makefile.common 2026-06-02 20:12:32.000000000 +0200 ++++ b/Makefile.common 2026-08-18 10:11:04.027156065 +0200 +@@ -122,6 +122,10 @@ + LIBDIR := ${shell pwd}/${SIMAVR}/${OBJ} + LDFLAGS += -L${LIBDIR} -lsimavr -lm + ++# libdir under PREFIX to embed in the RELEASE=1 RPATH and to install into; ++# override to match the target multilib layout (e.g. lib64) ++INSTALL_LIBDIR ?= lib ++ + # Are libelf and/or libdwarf installed? + C_LIBELF := ${shell pkg-config --cflags \ + libelf 2>/dev/null && \ +@@ -149,7 +153,7 @@ + ifeq ($(RELEASE),1) + # allow the shared library to be found in the build directory + # only for linking, the install time location is used at runtime +-LFLAGS += -Wl,-rpath-link,${LIBDIR} -Wl,-rpath,${PREFIX}/lib ++LFLAGS += -Wl,-rpath-link,${LIBDIR} -Wl,-rpath,${PREFIX}/${INSTALL_LIBDIR} + else + # allow the shared library to be found in the build directory + LFLAGS += -Wl,-rpath,${LIBDIR} diff --git a/dev-embedded/simavr/metadata.xml b/dev-embedded/simavr/metadata.xml new file mode 100644 index 0000000..3d2e74f --- /dev/null +++ b/dev-embedded/simavr/metadata.xml @@ -0,0 +1,11 @@ + + + + + shuber@sthu.org + Stefan Huber + + + buserror/simavr + + diff --git a/dev-embedded/simavr/simavr-1.8.ebuild b/dev-embedded/simavr/simavr-1.8.ebuild new file mode 100644 index 0000000..958325e --- /dev/null +++ b/dev-embedded/simavr/simavr-1.8.ebuild @@ -0,0 +1,31 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Atmel AVR simulator" +HOMEPAGE="https://github.com/buserror/simavr" + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/buserror/simavr.git" + inherit git-r3 +else + SRC_URI="https://github.com/buserror/simavr/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="GPL-3" +SLOT="0" + +PATCHES=( + "${FILESDIR}/${PN}-libdir.patch" +) + +src_compile() { + emake RELEASE=1 PREFIX=/usr INSTALL_LIBDIR="$(get_libdir)" build-simavr +} + +src_install() { + emake RELEASE=1 DESTDIR="${D}/usr" PREFIX=/usr INSTALL_LIBDIR="$(get_libdir)" SIMAVR_VERSION="${PV}" install-simavr + dodoc doc/manual/manual.pdf +}