Fix multilib conflicts in lvconfig.h
The multilib header handling is copied verbatim from libjpeg-turbo.
This commit is contained in:
parent
781c9e23e2
commit
6af697a4c2
@ -2,7 +2,7 @@
|
||||
|
||||
Name: libvisual
|
||||
Version: 0.4.0
|
||||
Release: 29%{?dist}
|
||||
Release: 30%{?dist}
|
||||
Epoch: 1
|
||||
Summary: Abstraction library for audio visualisation plugins
|
||||
License: LGPLv2+
|
||||
@ -54,6 +54,44 @@ make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make install DESTDIR=%{buildroot}
|
||||
|
||||
# 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}/libvisual-%{smallversion}/libvisual/lvconfig.h \
|
||||
%{buildroot}%{_includedir}/libvisual-%{smallversion}/libvisual/lvconfig-$wordsize.h
|
||||
|
||||
cat >%{buildroot}%{_includedir}/libvisual-%{smallversion}/libvisual/lvconfig.h <<EOF
|
||||
#ifndef __LV_CONFIG_H_MULTILIB__
|
||||
#define __LV_CONFIG_H_MULTILIB__
|
||||
|
||||
#include <bits/wordsize.h>
|
||||
|
||||
#if __WORDSIZE == 32
|
||||
# include "lvconfig-32.h"
|
||||
#elif __WORDSIZE == 64
|
||||
# include "lvconfig-64.h"
|
||||
#else
|
||||
# error "unexpected value for __WORDSIZE macro"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
EOF
|
||||
|
||||
fi
|
||||
|
||||
find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
|
||||
|
||||
%find_lang %{name}-%{smallversion}
|
||||
@ -73,6 +111,9 @@ find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jan 15 2021 Kalev Lember <klember@redhat.com> - 1:0.4.0-30
|
||||
- Fix multilib conflicts in lvconfig.h
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:0.4.0-29
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user