[packages/quickjs] - new - only static libraries are packaged
witekfl
witekfl at pld-linux.org
Sat Oct 9 20:35:52 CEST 2021
commit 503cd9043e44e8ef3095b5788ac1f6fb2be09a55
Author: Witold Filipczyk <witekfl at poczta.onet.pl>
Date: Sat Oct 9 20:34:20 2021 +0200
- new
- only static libraries are packaged
quickjs.spec | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
rpmpldcflags.patch | 12 ++++++++++
2 files changed, 82 insertions(+)
---
diff --git a/quickjs.spec b/quickjs.spec
new file mode 100644
index 0000000..c7c7293
--- /dev/null
+++ b/quickjs.spec
@@ -0,0 +1,70 @@
+%define ver 2021-03-27
+Summary: QuickJS Javascript Engine
+Summary(pl.UTF-8): Silnik Javascriptu QuickJS
+Name: quickjs
+Version: 20210327
+Release: 1
+License: MIT
+Group: Libraries
+Source0: https://bellard.org/%{name}/%{name}-%{ver}.tar.xz
+# Source0-md5: 135182a626aa0c87a49aa2bf58fd39bf
+Patch0: rpmpldcflags.patch
+URL: https://bellard.org/quickjs/
+BuildRequires: make
+BuildRequires: libtool
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+BuildRequires: rpmbuild(macros) >= 1.583
+
+%description
+QuickJS is a small and embeddable Javascript engine. It supports the
+ES2020 specification including modules, asynchronous generators, proxies and BigInt.
+It supports mathematical extensions such as big decimal float float
+numbers (BigDecimal), big binary floating point numbers (BigFloat),
+and operator overloading.
+
+%description -l pl.UTF-8
+QuickJS jest małym osadzalnym silnikiem Javascriptu. Wspiera specyfikację
+ES2020, w tym moduły, asynchroniczne generatory, proxy i BigInt.
+Wspiera też rozszerzenia matematyczne, takie jak liczby BigDecimal, BigFloat
+i przeciążenia operatorów.
+
+%package devel
+Summary: Header files for %{name} library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name}
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Header files for %{name} library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki %{name}.
+
+%prep
+%setup -q -n %{name}-%{ver}
+%patch0 -p1
+
+%build
+%{__make} RPMPLDCFLAGS="%{rpmcflags}" \
+ LDFLAGS="%{rpmldflags}" \
+ prefix="%{_prefix}"
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT \
+ prefix="%{_prefix}"
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/*
+%{_prefix}/lib/%{name}
+
+%files devel
+%defattr(644,root,root,755)
+%doc doc
+%{_includedir}/%{name}
diff --git a/rpmpldcflags.patch b/rpmpldcflags.patch
new file mode 100644
index 0000000..4b2d596
--- /dev/null
+++ b/rpmpldcflags.patch
@@ -0,0 +1,12 @@
+diff -up quickjs-2021-03-27/Makefile.orig quickjs-2021-03-27/Makefile
+--- quickjs-2021-03-27/Makefile.orig 2021-03-27 11:00:32.000000000 +0100
++++ quickjs-2021-03-27/Makefile 2021-10-09 19:52:07.936499497 +0200
+@@ -110,7 +110,7 @@ endif
+ CFLAGS+=$(DEFINES)
+ CFLAGS_DEBUG=$(CFLAGS) -O0
+ CFLAGS_SMALL=$(CFLAGS) -Os
+-CFLAGS_OPT=$(CFLAGS) -O2
++CFLAGS_OPT=$(CFLAGS) -O2 $(RPMPLDCFLAGS)
+ CFLAGS_NOLTO:=$(CFLAGS_OPT)
+ LDFLAGS=-g
+ ifdef CONFIG_LTO
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/quickjs.git/commitdiff/503cd9043e44e8ef3095b5788ac1f6fb2be09a55
More information about the pld-cvs-commit
mailing list