Fix multilib conflicts in js-config.h
The multilib header handling is copied verbatim from libjpeg-turbo.
This commit is contained in:
parent
f00bcf36c0
commit
d2795ed492
42
mozjs60.spec
42
mozjs60.spec
@ -16,7 +16,7 @@
|
||||
|
||||
Name: mozjs%{major}
|
||||
Version: 60.9.0
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: SpiderMonkey JavaScript library
|
||||
|
||||
License: MPLv2.0 and MPLv1.1 and BSD and GPLv2+ and GPLv3+ and LGPLv2+ and AFL and ASL 2.0
|
||||
@ -160,6 +160,43 @@ popd
|
||||
# Fix permissions
|
||||
chmod -x %{buildroot}%{_libdir}/pkgconfig/*.pc
|
||||
|
||||
# Avoid multilib conflicts
|
||||
case `uname -i` in
|
||||
i386 | ppc | s390 | sparc )
|
||||
wordsize="32"
|
||||
;;
|
||||
x86_64 | ppc64 | s390x | sparc64 )
|
||||
wordsize="64"
|
||||
;;
|
||||
*)
|
||||
wordsize=""
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -n "$wordsize"
|
||||
then
|
||||
mv %{buildroot}%{_includedir}/mozjs-60/js-config.h \
|
||||
%{buildroot}%{_includedir}/mozjs-60/js-config-$wordsize.h
|
||||
|
||||
cat >%{buildroot}%{_includedir}/mozjs-60/js-config.h <<EOF
|
||||
#ifndef JS_CONFIG_H_MULTILIB
|
||||
#define JS_CONFIG_H_MULTILIB
|
||||
|
||||
#include <bits/wordsize.h>
|
||||
|
||||
#if __WORDSIZE == 32
|
||||
# include "js-config-32.h"
|
||||
#elif __WORDSIZE == 64
|
||||
# include "js-config-64.h"
|
||||
#else
|
||||
# error "unexpected value for __WORDSIZE macro"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
# Remove unneeded files
|
||||
rm %{buildroot}%{_bindir}/js%{major}-config
|
||||
rm %{buildroot}%{_libdir}/libjs_static.ajs
|
||||
@ -200,6 +237,9 @@ ln -s libmozjs-%{major}.so.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so
|
||||
%{_includedir}/mozjs-%{major}/
|
||||
|
||||
%changelog
|
||||
* Tue Sep 10 2019 Kalev Lember <klember@redhat.com> - 60.9.0-3
|
||||
- Fix multilib conflicts in js-config.h
|
||||
|
||||
* Sat Sep 07 2019 Kalev Lember <klember@redhat.com> - 60.9.0-2
|
||||
- Backport patches for s390x support
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user