From 83b0ed82dcba653cb16516542464401bee9f0e35 Mon Sep 17 00:00:00 2001 From: tigro Date: Sat, 28 Dec 2024 11:45:47 +0300 Subject: [PATCH] import mujs-1.3.3-6.el10 --- .gitignore | 11 +--- .mujs.metadata | 1 + SOURCES/downstream-soname-version.patch | 13 +++++ SOURCES/set-library-soname-version.patch | 61 ++++++++++++++++++++++ mujs.spec => SPECS/mujs.spec | 64 ++++++++++++++++++++---- sources | 1 - 6 files changed, 131 insertions(+), 20 deletions(-) create mode 100644 .mujs.metadata create mode 100644 SOURCES/downstream-soname-version.patch create mode 100644 SOURCES/set-library-soname-version.patch rename mujs.spec => SPECS/mujs.spec (70%) delete mode 100644 sources diff --git a/.gitignore b/.gitignore index fc14421..9641189 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1 @@ -/mujs-c1ad1ba.tar.gz -/mujs-0827611.tar.gz -/mujs-5c337af.tar.gz -/mujs-a0ceaf5.tar.gz -/mujs-4006739.tar.gz -/mujs-25821e6.tar.gz -/mujs-1.0.4.tar.gz -/1.0.9.tar.gz -/mujs-1.2.0.tar.gz -/mujs-1.3.2.tar.gz +SOURCES/mujs-1.3.3.tar.gz diff --git a/.mujs.metadata b/.mujs.metadata new file mode 100644 index 0000000..674d80c --- /dev/null +++ b/.mujs.metadata @@ -0,0 +1 @@ +b8a9570c37113addaa41b33262fb484c7fe26122 SOURCES/mujs-1.3.3.tar.gz diff --git a/SOURCES/downstream-soname-version.patch b/SOURCES/downstream-soname-version.patch new file mode 100644 index 0000000..925c61e --- /dev/null +++ b/SOURCES/downstream-soname-version.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index 021f285..65274f3 100644 +--- a/Makefile ++++ b/Makefile +@@ -4,7 +4,7 @@ + + default: build/debug/mujs build/debug/mujs-pp + +-SOVERSION = 1 ++SOVERSION = 0.1 + + CFLAGS = -std=c99 -pedantic -Wall -Wextra -Wno-unused-parameter + diff --git a/SOURCES/set-library-soname-version.patch b/SOURCES/set-library-soname-version.patch new file mode 100644 index 0000000..4fc38d2 --- /dev/null +++ b/SOURCES/set-library-soname-version.patch @@ -0,0 +1,61 @@ +From b1ed73b72d63c44a2e081abae35c061844adb338 Mon Sep 17 00:00:00 2001 +From: Alessandro Astone +Date: Fri, 26 Jan 2024 15:08:12 +0100 +Subject: [PATCH] Set library SONAME with version + +--- + Makefile | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 95ccdc3..a646f76 100644 +--- a/Makefile ++++ b/Makefile +@@ -4,6 +4,8 @@ + + default: build/debug/mujs build/debug/mujs-pp + ++SOVERSION = 1 ++ + CFLAGS = -std=c99 -pedantic -Wall -Wextra -Wno-unused-parameter + + OPTIM = -O3 +@@ -84,7 +86,8 @@ build/sanitize/mujs: main.c one.c $(SRCS) $(HDRS) + + build/debug/libmujs.$(SO): one.c $(SRCS) $(HDRS) + @mkdir -p $(@D) +- $(CC) $(CFLAGS) -g -fPIC -shared -o $@ one.c -lm ++ $(CC) $(CFLAGS) -g -fPIC -shared -Wl,-soname,libmujs.so.$(SOVERSION) -o $@.$(SOVERSION) one.c -lm ++ ln -sf libmujs.so.$(SOVERSION) $@ + build/debug/libmujs.o: one.c $(SRCS) $(HDRS) + @mkdir -p $(@D) + $(CC) $(CFLAGS) -g -c -o $@ one.c +@@ -97,7 +100,8 @@ build/debug/mujs-pp: pp.c build/debug/libmujs.o + + build/release/libmujs.$(SO): one.c $(SRCS) $(HDRS) + @mkdir -p $(@D) +- $(CC) $(CFLAGS) $(OPTIM) -fPIC -shared -o $@ one.c -lm ++ $(CC) $(CFLAGS) $(OPTIM) -fPIC -shared -Wl,-soname,libmujs.so.$(SOVERSION) -o $@.$(SOVERSION) one.c -lm ++ ln -sf libmujs.so.$(SOVERSION) $@ + build/release/libmujs.o: one.c $(SRCS) $(HDRS) + @mkdir -p $(@D) + $(CC) $(CFLAGS) $(OPTIM) -c -o $@ one.c +@@ -131,7 +135,9 @@ install-static: install-common build/release/libmujs.a + install -m 644 build/release/libmujs.a $(DESTDIR)$(libdir) + + install-shared: install-common build/release/libmujs.$(SO) +- install -m 755 build/release/libmujs.$(SO) $(DESTDIR)$(libdir) ++ install -m 755 build/release/libmujs.$(SO).$(SOVERSION) $(DESTDIR)$(libdir) ++ cp -af build/release/libmujs.$(SO) $(DESTDIR)$(libdir) ++ chmod 755 $(DESTDIR)$(libdir) + + install: install-static + +@@ -142,6 +148,7 @@ uninstall: + rm -f $(DESTDIR)$(libdir)/pkgconfig/mujs.pc + rm -f $(DESTDIR)$(libdir)/libmujs.a + rm -f $(DESTDIR)$(libdir)/libmujs.$(SO) ++ rm -f $(DESTDIR)$(libdir)/libmujs.$(SO).$(SOVERSION) + + tarball: + git archive --format=zip --prefix=mujs-$(VERSION)/ HEAD > mujs-$(VERSION).zip diff --git a/mujs.spec b/SPECS/mujs.spec similarity index 70% rename from mujs.spec rename to SPECS/mujs.spec index 996f283..4616a14 100644 --- a/mujs.spec +++ b/SPECS/mujs.spec @@ -1,14 +1,18 @@ Name: mujs -Version: 1.3.2 -Release: 1%{?dist} +Version: 1.3.3 +Release: 6%{?dist} Summary: An embeddable Javascript interpreter License: ISC URL: https://mujs.com/ Source0: https://mujs.com/downloads/%{name}-%{version}.tar.gz -#BuildRequires: coreutils +# https://github.com/ccxvii/mujs/pull/187 +Patch0: set-library-soname-version.patch + +# use custom soname version until it lands upstream to avoid future potential conflict +Patch1: downstream-soname-version.patch + BuildRequires: gcc -BuildRequires: grep BuildRequires: make BuildRequires: readline-devel @@ -19,37 +23,79 @@ other software to extend them with scripting capabilities. %package devel Summary: MuJS development files Requires: %{name}%{?_isa} = %{version}-%{release} -Provides: %{name}-static = %{version}-%{release} %description devel +This package provides the MuJS shared library. + +%package static +Summary: MuJS development files using static lib +Requires: %{name}-devel%{?_isa} = %{version}-%{release} + +%description static This package provides the MuJS static library. + %prep -%setup -q -n %{name}-%{version} +%autosetup -p1 chmod a-x -v docs/* %build -%make_build debug %{?_smp_mflags} XCFLAGS="%{optflags} -fPIC" LDFLAGS="%{?__global_ldflags}" +%make_build release prefix="%{_prefix}" libdir="%{_libdir}" CFLAGS="%{build_cflags} %{build_ldflags}" %install -%make_install prefix="%{_prefix}" libdir="%{_libdir}" \ - XCFLAGS="%{optflags} -fPIC" LDFLAGS="%{?__global_ldflags}" +%make_install prefix="%{_prefix}" libdir="%{_libdir}" +%{__make} install-shared DESTDIR=%{?buildroot} INSTALL="%{__install} -p" prefix="%{_prefix}" libdir="%{_libdir}" %files %license COPYING %doc AUTHORS README docs %{_bindir}/%{name} +%{_bindir}/%{name}-pp +%{_libdir}/lib%{name}.so.0{,.*} %files devel %license COPYING %doc AUTHORS README %{_libdir}/pkgconfig/%{name}.pc %{_includedir}/%{name}.h +%{_libdir}/lib%{name}.so + +%files static %{_libdir}/lib%{name}.a %changelog +* Sat Dec 28 2024 Arkady L. Shane - 1.3.3-6 +- Rebuilt for MSVSphere 10 + +* Thu Jul 18 2024 Fedora Release Engineering - 1.3.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Thu Jan 25 2024 Alessandro Astone - 1.3.3-5 +- Fix paths in pkgconfig file +- Make shared library versioned + +* Thu Jan 25 2024 Fedora Release Engineering - 1.3.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 1.3.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Sep 30 2023 Alain Vigne 1.3.3-2 +- Install the shared library instead of default static one. Solve RHBZ#2241358 +- Add a -static subpackage + +* Tue Sep 19 2023 Alain Vigne 1.3.3-1 +- upstream release 1.3.3 +- migrated to SPDX license + +* Thu Jul 20 2023 Fedora Release Engineering - 1.3.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jan 19 2023 Fedora Release Engineering - 1.3.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Dec 01 2022 Alain Vigne 1.3.2-1 - upstream release 1.3.2 - Fix CVE-2022-44789 (rhbz#2148261) diff --git a/sources b/sources deleted file mode 100644 index 39b3d36..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (mujs-1.3.2.tar.gz) = ccffb04171f7ecec2cfa6f0e59859acc911836370a648e4c6703db174631ce316413a64ebf4b32eea3d3b09221ff01861cda91f4b1b9bebf495168f26f90daf5