From 7b0312076c40f0e5f8a003a3fc07c61cc6c43fd9 Mon Sep 17 00:00:00 2001 From: Petr Hracek Date: Wed, 7 Oct 2015 13:15:15 +0200 Subject: [PATCH] Fix problem with multilibs like jconfig.h (#1264675) Signed-off-by: Petr Hracek --- libjpeg-turbo.spec | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/libjpeg-turbo.spec b/libjpeg-turbo.spec index 91bf9e8..2d9bddb 100644 --- a/libjpeg-turbo.spec +++ b/libjpeg-turbo.spec @@ -1,6 +1,6 @@ Name: libjpeg-turbo Version: 1.4.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A MMX/SSE2 accelerated library for manipulating JPEG image files License: IJG URL: http://sourceforge.net/projects/libjpeg-turbo @@ -84,6 +84,44 @@ find %{buildroot} -name "*.la" -delete # Fix perms chmod -x README-turbo.txt +# multilib header hack +# we only apply this to known Red Hat multilib arches, per bug #1264675 +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 $RPM_BUILD_ROOT%{_includedir}/jconfig.h \ + $RPM_BUILD_ROOT%{_includedir}/jconfig-$wordsize.h + + cat >$RPM_BUILD_ROOT%{_includedir}/jconfig.h < + +#if __WORDSIZE == 32 +# include "jconfig-32.h" +#elif __WORDSIZE == 64 +# include "jconfig-64.h" +#else +# error "unexpected value for __WORDSIZE macro" +#endif + +#endif +EOF + +fi + %check make test %{?_smp_mflags} @@ -99,7 +137,7 @@ make test %{?_smp_mflags} %files devel %doc coderules.txt jconfig.txt libjpeg.txt structure.txt example.c -%{_includedir}/jconfig.h +%{_includedir}/jconfig*.h %{_includedir}/jerror.h %{_includedir}/jmorecfg.h %{_includedir}/jpegint.h @@ -127,6 +165,9 @@ make test %{?_smp_mflags} %{_libdir}/libturbojpeg.so %changelog +* Wed Oct 07 2015 Petr Hracek - 1.4.2-2 +- Fix problem with multilibs like jconfig.h (#1264675) + * Wed Oct 07 2015 Petr Hracek - 1.4.2-1 - New upstream release 1.4.2 (#1265034)