From 91ae31e6ca5fd16e031c74694029ba33c1b1863f Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 17 Feb 2025 15:06:03 +0000 Subject: [PATCH] 20191221 --- .abf.yml | 1 - tinyemu-makefile.patch | 27 +++++++++++++++++++++++++++ tinyemu.spec | 30 +++++++++++++++++++++++++----- 3 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 tinyemu-makefile.patch diff --git a/.abf.yml b/.abf.yml index 8dcdcc4..c65c3ab 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,3 +1,2 @@ sources: - tinyemu-2018-09-23.tar: 7e467dc9807d9f3777108889c4e6e0df007146c1 tinyemu-2019-12-21.tar.gz: f5b412113f31410d890dac7c414a4d12ed33a193 diff --git a/tinyemu-makefile.patch b/tinyemu-makefile.patch new file mode 100644 index 0000000..8be0c55 --- /dev/null +++ b/tinyemu-makefile.patch @@ -0,0 +1,27 @@ +diff --git a/Makefile.old b/Makefile +index 390ae37..68f1d7d 100644 +--- a/Makefile.old ++++ b/Makefile +@@ -48,9 +48,10 @@ CC=$(CROSS_PREFIX)gcc + STRIP=$(CROSS_PREFIX)strip + CFLAGS=-O2 -Wall -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -MMD + CFLAGS+=-D_GNU_SOURCE -DCONFIG_VERSION=\"$(shell cat VERSION)\" +-LDFLAGS= ++CFLAGS+="-I/opt/openssl3.3/include" ++LDFLAGS="-L/opt/openssl3.3/lib -Wl,-rpath,/opt/openssl3.3/lib" + +-bindir=/usr/local/bin ++bindir=/usr/bin + INSTALL=install + + PROGS+= temu$(EXE) +@@ -77,7 +78,8 @@ endif + ifdef CONFIG_FS_NET + CFLAGS+=-DCONFIG_FS_NET + EMU_OBJS+=fs_net.o fs_wget.o fs_utils.o block_net.o +-EMU_LIBS+=-lcurl -lcrypto ++EMU_LIBS+=-L/opt/openssl3.3/lib -Wl,-rpath,/opt/openssl3.3/lib -lcurl -lcrypto ++ + ifdef CONFIG_WIN32 + EMU_LIBS+=-lwsock32 + endif # CONFIG_WIN32 diff --git a/tinyemu.spec b/tinyemu.spec index 1ed4393..88ee107 100644 --- a/tinyemu.spec +++ b/tinyemu.spec @@ -4,11 +4,20 @@ Name: tinyemu Version: 20191221 Release: 1 Summary: Tiny RISC-V emulator -URL: https://bellard.org/tinyemu/ +URL: https://bellard.org/tinyemu Source0: https://bellard.org/%{name}/%{name}-2019-12-21.tar.gz -Patch0: %{name}_makefile.patch +Source10: https://bellard.org/jslinux/buildroot-riscv64.cfg +Source11: https://bellard.org/jslinux/alpine-x86.cfg +Source12: https://bellard.org/jslinux/alpine-x86-xwin.cfg +Source13: https://bellard.org/jslinux/win2k.cfg +Source14: https://bellard.org/jslinux/freedos.cfg +Source15: https://bellard.org/jslinux/buildroot-riscv64-xwin.cfg +Source16: https://bellard.org/jslinux/fedora33-riscv.cfg +Source17: https://bellard.org/jslinux/fedora33-riscv-xwin.cfg +Patch0: %{name}-makefile.patch License: MIT Group: Emulators +Provides: temu == %{EVRD} BuildRequires: pkgconfig(sdl) BuildRequires: pkgconfig(openssl3.3) BuildRequires: pkgconfig(libcurl) @@ -38,19 +47,30 @@ filesystem %prep %setup -qn %{name}-2019-12-21 -#patch -p0 +%patch -p1 + %build -export OPENSSL_DIR=/opt/openssl3.3 %make %install -install -d %{buildroot}%{_bindir} +install -d %{buildroot}%{_datadir}/%{name} %{buildroot}%{_bindir} %makeinstall_std +cp %{SOURCE10} \ + %{SOURCE11} \ + %{SOURCE12} \ + %{SOURCE13} \ + %{SOURCE14} \ + %{SOURCE15} \ + %{SOURCE16} \ + %{SOURCE17} \ + %{buildroot}%{_datadir}/%{name}/ + %files %doc readme.txt MIT-LICENSE.txt %{_bindir}/temu %{_bindir}/build_filelist %{_bindir}/splitimg +%{_datadir}/%{name}/*