This commit is contained in:
Your Name 2025-02-17 15:06:03 +00:00
parent f008793c01
commit 91ae31e6ca
3 changed files with 52 additions and 6 deletions

View file

@ -1,3 +1,2 @@
sources: sources:
tinyemu-2018-09-23.tar: 7e467dc9807d9f3777108889c4e6e0df007146c1
tinyemu-2019-12-21.tar.gz: f5b412113f31410d890dac7c414a4d12ed33a193 tinyemu-2019-12-21.tar.gz: f5b412113f31410d890dac7c414a4d12ed33a193

27
tinyemu-makefile.patch Normal file
View file

@ -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

View file

@ -4,11 +4,20 @@ Name: tinyemu
Version: 20191221 Version: 20191221
Release: 1 Release: 1
Summary: Tiny RISC-V emulator 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 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 License: MIT
Group: Emulators Group: Emulators
Provides: temu == %{EVRD}
BuildRequires: pkgconfig(sdl) BuildRequires: pkgconfig(sdl)
BuildRequires: pkgconfig(openssl3.3) BuildRequires: pkgconfig(openssl3.3)
BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(libcurl)
@ -38,19 +47,30 @@ filesystem
%prep %prep
%setup -qn %{name}-2019-12-21 %setup -qn %{name}-2019-12-21
#patch -p0 %patch -p1
%build %build
export OPENSSL_DIR=/opt/openssl3.3
%make %make
%install %install
install -d %{buildroot}%{_bindir} install -d %{buildroot}%{_datadir}/%{name} %{buildroot}%{_bindir}
%makeinstall_std %makeinstall_std
cp %{SOURCE10} \
%{SOURCE11} \
%{SOURCE12} \
%{SOURCE13} \
%{SOURCE14} \
%{SOURCE15} \
%{SOURCE16} \
%{SOURCE17} \
%{buildroot}%{_datadir}/%{name}/
%files %files
%doc readme.txt MIT-LICENSE.txt %doc readme.txt MIT-LICENSE.txt
%{_bindir}/temu %{_bindir}/temu
%{_bindir}/build_filelist %{_bindir}/build_filelist
%{_bindir}/splitimg %{_bindir}/splitimg
%{_datadir}/%{name}/*