Fix multi lib

epel8
Matthias Clasen 19 years ago
parent f961ad0547
commit 5fae546727

@ -0,0 +1,76 @@
--- ImageMagick-6.2.5/magick/Magick-config.in.multilib 2006-06-02 11:13:32.000000000 -0400
+++ ImageMagick-6.2.5/magick/Magick-config.in 2006-06-02 11:13:37.000000000 -0400
@@ -16,28 +16,28 @@
exit 1
fi
-while test $# -gt 0; do
+while btest $# -gt 0; do
case $1 in
--prefix)
- echo @PREFIX_DIR@
+ pkg-config --variable prefix ImageMagick
;;
--exec-prefix)
- echo @EXEC_PREFIX_DIR@
+ pkg-config --variable exec_prefix ImageMagick
;;
--version)
- echo @PACKAGE_VERSION@
+ pkg-config --modversion ImageMagick
;;
--cflags)
- echo '@MAGICK_CFLAGS@'
+ pkg-config --cflags ImageMagick
;;
--cppflags)
- echo '@MAGICK_CPPFLAGS@'
+ pkg-config --cflags ImageMagick
;;
--ldflags)
- echo '@MAGICK_LDFLAGS@'
+ pkg-config --libs ImageMagick
;;
--libs)
- echo '@MAGICK_LIBS@'
+ pkg-config --libs ImageMagick
;;
*)
echo "${usage}" 1>&2
--- ImageMagick-6.2.5/wand/Wand-config.in.multilib 2006-06-02 11:13:49.000000000 -0400
+++ ImageMagick-6.2.5/wand/Wand-config.in 2006-06-02 11:13:52.000000000 -0400
@@ -21,26 +21,25 @@
while test $# -gt 0; do
case $1 in
--prefix)
- echo @PREFIX_DIR@
+ pkg-config --variable prefix Wand
;;
--exec-prefix)
- echo @EXEC_PREFIX_DIR@
+ pkg-config --variable exec_prefix Wand
;;
--version)
- echo @PACKAGE_VERSION@
+ pkg-config --modversion Wand
;;
--cflags)
- echo "`Magick-config --cflags`"
+ pkg-config --cflags Wand
;;
--cppflags)
- echo "`Magick-config --cppflags`"
+ pkg-config --cflags Wand
;;
--ldflags)
- echo "`Magick-config --ldflags`"
- ;;
+ pkg-config --libs Wand
+ ;;
--libs)
- LIBS="-lWand `Magick-config --libs`"
- echo "$LIBS"
+ pkg-config --lbs Wand
;;
*)
echo "${usage}" 1>&2

@ -9,7 +9,7 @@ Version: %{VER}.%{Patchlevel}
%else
Version: %{VER}
%endif
Release: 6
Release: 7
License: freeware
Group: Applications/Multimedia
%if "%{Patchlevel}" != ""
@ -21,6 +21,7 @@ Source1: magick_small.png
Patch1: ImageMagick-6.2.1-local_doc.patch
Patch2: ImageMagick-6.2.5-format-string-again.patch
Patch3: ImageMagick-6.2.5-yet-another-overflow.patch
Patch4: ImageMagick-6.2.5-multilib.patch
Url: http://www.imagemagick.org/
Buildroot: %{_tmppath}/%{name}-%{version}-root
@ -117,6 +118,7 @@ however.
%patch1 -p1 -b .local_doc
%patch2 -p1 -b .format-string-again
%patch3 -p1 -b .yet-another-overflow
%patch4 -p1 -b .multilib
%build
%configure --enable-shared \
@ -165,8 +167,33 @@ rm -rf $RPM_BUILD_ROOT%{_libdir}/libltdl.*
rm -f $RPM_BUILD_ROOT%{_libdir}/ImageMagick-*/modules*/*/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/*.{a,la}
# link docs
#ln -sf %{_docdir}/%{name}-%{version} $RPM_BUILD_ROOT%{_libdir}/ImageMagick-%{VER}/doc
# fix multilib issues
%ifarch x86_64 s390x ia64 ppc64
%define wordsize 64
%else
%define wordsize 32
%endif
mv $RPM_BUILD_ROOT%{_includedir}/magick/magick-config.h \
$RPM_BUILD_ROOT%{_includedir}/magick/magick-config-%{wordsize}.h
cat >$RPM_BUILD_ROOT%{_includedir}/magick/magick-config.h <<EOF
#ifndef ORBIT_MULTILIB
#define ORBIT_MULTILIB
#include <bits/wordsize.h>
#if __WORDSIZE == 32
# include "magick-config-32.h"
#elif __WORDSIZE == 64
# include "magick-config-64.h"
#else
# error "unexpected value for __WORDSIZE macro"
#endif
#endif
EOF
%clean
rm -rf $RPM_BUILD_ROOT
@ -224,6 +251,9 @@ rm -rf $RPM_BUILD_ROOT
%doc PerlMagick/demo/ PerlMagick/Changelog PerlMagick/README.txt
%changelog
* Fri Jun 2 2006 Matthias Clasen <mclasen@redhat.com> - 6.2.5.4-7
- Fix multilib issues
* Thu May 25 2006 Matthias Clasen <mclasen@redhat.com> - 6.2.5.4-6
- Fix a heap overflow CVE-2006-2440 (#192279)
- Include required .la files

Loading…
Cancel
Save