diff --git a/README.md b/README.md index cadae3f..3370fca 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # mozjs52 +Mozilla stand-alone library implementing JavaScript 24. + diff --git a/mozjs-52.6.0-soname.patch b/mozjs-52.6.0-soname.patch new file mode 100644 index 0000000..12a73b8 --- /dev/null +++ b/mozjs-52.6.0-soname.patch @@ -0,0 +1,34 @@ +diff --git a/config/rules.mk b/config/rules.mk +--- a/config/rules.mk ++++ b/config/rules.mk +@@ -418,7 +418,7 @@ endif # AIX + # + # Linux: add -Bsymbolic flag for components + # +-ifeq ($(OS_ARCH),Linux) ++#ifeq ($(OS_ARCH),Linux) + ifdef IS_COMPONENT + EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic + endif +@@ -426,7 +426,8 @@ ifdef LD_VERSION_SCRIPT + EXTRA_DSO_LDOPTS += -Wl,--version-script,$(LD_VERSION_SCRIPT) + EXTRA_DEPS += $(LD_VERSION_SCRIPT) + endif +-endif ++#endif ++EXTRA_DSO_LDOPTS += -Wl,-soname,lib$(JS_LIBRARY_NAME).so.0 + + ifdef SYMBOLS_FILE + ifeq ($(OS_TARGET),WINNT) +diff --git a/js/src/Makefile.in b/js/src/Makefile.in +--- a/js/src/Makefile.in ++++ b/js/src/Makefile.in +@@ -222,6 +222,8 @@ ifneq (,$(REAL_LIBRARY)) + endif + ifneq (,$(SHARED_LIBRARY)) + $(SYSINSTALL) $(SHARED_LIBRARY) $(DESTDIR)$(libdir) ++ mv -f $(DESTDIR)$(libdir)/$(SHARED_LIBRARY) $(DESTDIR)$(libdir)/$(SHARED_LIBRARY).0 ++ ln -s $(SHARED_LIBRARY).0 $(DESTDIR)$(libdir)/$(SHARED_LIBRARY) + ifeq ($(OS_ARCH),Darwin) + install_name_tool -id $(abspath $(libdir)/$(SHARED_LIBRARY)) $(DESTDIR)$(libdir)/$(SHARED_LIBRARY) + endif diff --git a/mozjs52.spec b/mozjs52.spec new file mode 100644 index 0000000..66fb1d8 --- /dev/null +++ b/mozjs52.spec @@ -0,0 +1,129 @@ +%define MAJver %(echo %version | cut -d. -f1) +%define majver %(echo %version | cut -d. -f1-2) +Name: mozjs52 +Version: 52.6.0 +Release: 2mamba +Summary: Mozilla stand-alone library implementing JavaScript 24 +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://www.mozilla.org +Source: http://ftp.gnome.org/pub/gnome/teams/releng/tarballs-needing-help/mozjs/mozjs-%{version}gnome1.tar.xz +#Source: http://ftp.mozilla.org/pub/mozilla.org/js/mozjs-%{version}.tar.bz2 +Patch0: mozjs-52.6.0-soname.patch +# Only GPL because linking to readline +License: GPL +#License: MPL, GPL, LGPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libgcc +BuildRequires: libicu-devel +BuildRequires: libnspr-devel +BuildRequires: libreadline-devel +BuildRequires: libstdc++6-devel +BuildRequires: libtermcap-devel +BuildRequires: libz-devel +## AUTOBUILDREQ-END +BuildRequires: pkg-config +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} +Requires(post): %{__install_info} +Requires(preun): %{__install_info} +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +Mozilla stand-alone library implementing JavaScript 24. + +%package -n lib%{name} +Group: System/Libraries +Summary: Mozilla stand-alone library implementing JavaScript 24 + +%description -n lib%{name} +Mozilla stand-alone library implementing JavaScript 24. + +%package -n lib%{name}-devel +Group: Development/Libraries +Summary: Development files for %{name} +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} +Requires: pkg-config + +%description -n lib%{name}-devel +This package contains libraries and header files for developing applications that use %{name}. + +%debug_package + +%prep +%setup -q -c +#-D -T +#:<< _EOF +%patch0 -p1 + +%build +#:<< _EOF +cd js/src +export LIBS="-ltermcap" +%ifarch arm +export CFLAGS="-fpermissive -fno-delete-null-pointer-checks -fno-tree-vrp -fno-strict-aliasing -O2 -fno-schedule-insns" +export CXXFLAGS="-fpermissive -fno-delete-null-pointer-checks -fno-tree-vrp -fno-strict-aliasing -O2 -fno-schedule-insns" +%endif + +%configure \ + --with-intl-api \ + --with-system-nspr \ + --with-system-icu \ + --enable-threadsafe \ + --enable-readline + +#%ifarch arm +# --with-cpu-arch=armv5te \ +# --enable-optimize="-g -O2 -fno-schedule-insns" +#%endif + +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +cd js/src +%makeinstall + +#rm -f %{buildroot}%{_libdir}/libmozjs185.so +#ln -s libmozjs185.so.%{majver} %{buildroot}%{_libdir}/libmozjs185.so +#rm -f %{buildroot}%{_libdir}/libmozjs185.so.1.0 +#ln -s libmozjs185.so.%{version} %{buildroot}%{_libdir}/libmozjs185.so.1.0 + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -n lib%{name} -p /sbin/ldconfig +%postun -n lib%{name} -p /sbin/ldconfig + +%files -n lib%{name} +%defattr(-,root,root) +%{_libdir}/libmozjs-%{MAJver}.so.* +%{_libdir}/libjs_static.ajs + +%files -n lib%{name}-devel +%defattr(-,root,root) +%{_bindir}/js%{MAJver} +%{_bindir}/js%{MAJver}-config +%dir %{_includedir}/mozjs-%{MAJver}/ +%{_includedir}/mozjs-%{MAJver}/* +%{_libdir}/libmozjs-%{MAJver}.so +%{_libdir}/pkgconfig/mozjs-%{MAJver}.pc +%doc README + +%changelog +* Sat Jul 06 2019 Silvan Calarco 52.6.0-2mamba +- legacy package + +* Tue Dec 11 2018 Silvan Calarco 52.6.0-1mamba +- update to 52.6.0 + +* Mon Dec 10 2018 Silvan Calarco 52.2.1-2mamba +- arm: rebuilt + +* Mon Aug 13 2018 Silvan Calarco 52.2.1-1mamba +- update to 52.2.1 + +* Thu Jun 19 2014 Silvan Calarco 24.2.0-1mamba +- package created from mozjs185