fix bug
This commit is contained in:
parent
b56fedb49f
commit
f9b5f16095
@ -1,19 +1,29 @@
|
|||||||
#%global debug_package %{nil}
|
#%global debug_package %{nil}
|
||||||
|
%undefine _ld_as_needed
|
||||||
|
|
||||||
|
%define major 3
|
||||||
|
|
||||||
Name: freeimage
|
Name: freeimage
|
||||||
Version: 3.18.0
|
Version: 3.18.0
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: FreeImage is a library project for developers who would like to support popular graphics image formats (PNG, JPEG, TIFF, BMP and others)
|
Summary: FreeImage is a library project for developers who would like to support popular graphics image formats (PNG, JPEG, TIFF, BMP and others)
|
||||||
License: GPLv2 or GPLv3 and FIPL
|
License: GPLv2 or GPLv3 and FIPL
|
||||||
URL: https://freeimage.sourceforge.io/
|
URL: https://freeimage.sourceforge.io/
|
||||||
Source0: http://downloads.sourceforge.net/freeimage/FreeImage3180.zip
|
Source0: http://downloads.sourceforge.net/freeimage/FreeImage3180.zip
|
||||||
|
|
||||||
Patch0: CVE-2019-12211_2019-12213.patch
|
Patch0: CVE-2019-12211_2019-12213.patch
|
||||||
|
|
||||||
# https://github.com/glennrp/libpng/commit/32784523239c376dfe544bb6c7012c4934624a6d
|
# https://github.com/glennrp/libpng/commit/32784523239c376dfe544bb6c7012c4934624a6d
|
||||||
Patch1: fix-libpng-arm-neon.patch
|
Patch1: fix-libpng-arm-neon.patch
|
||||||
|
Patch2: FreeImage_unbundle.patch
|
||||||
|
# Fix incorrect path in doxyfile
|
||||||
|
Patch3: FreeImage_doxygen.patch
|
||||||
|
# Fix incorrect variable names in BIGENDIAN blocks
|
||||||
|
Patch4: FreeImage_bigendian.patch
|
||||||
|
|
||||||
|
|
||||||
|
BuildRequires: doxygen gcc-c++ make jxrlib-devel libjpeg-devel libmng-devel libpng-devel libtiff-devel libwebp-devel LibRaw-devel OpenEXR-devel openjpeg2-devel
|
||||||
|
|
||||||
BuildRequires: gcc autoconf automake doxygen
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
FreeImage is a library project for developers who would like to support popular graphics image formats (PNG, JPEG, TIFF, BMP and others). Some highlights are: extremely simple in use, not limited to the local PC (unique FreeImageIO) and Plugin driven!
|
FreeImage is a library project for developers who would like to support popular graphics image formats (PNG, JPEG, TIFF, BMP and others). Some highlights are: extremely simple in use, not limited to the local PC (unique FreeImageIO) and Plugin driven!
|
||||||
@ -28,10 +38,35 @@ FreeImage is a library project for developers who would like to support popular
|
|||||||
%setup -q -n FreeImage
|
%setup -q -n FreeImage
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
|
# remove all included libs to make sure these don't get used during compile
|
||||||
|
rm -r Source/Lib* Source/ZLib Source/OpenEXR
|
||||||
|
|
||||||
|
# clear files which cannot be built due to dependencies on private headers
|
||||||
|
# (see also unbundle patch)
|
||||||
|
> Source/FreeImage/PluginG3.cpp
|
||||||
|
> Source/FreeImageToolkit/JPEGTransform.cpp
|
||||||
|
|
||||||
|
# sanitize encodings / line endings
|
||||||
|
for file in `find . -type f -name '*.c' -or -name '*.cpp' -or -name '*.h' -or -name '*.txt' -or -name Makefile`; do
|
||||||
|
iconv --from=ISO-8859-15 --to=UTF-8 $file > $file.new && \
|
||||||
|
sed -i 's|\r||g' $file.new && \
|
||||||
|
touch -r $file $file.new && mv $file.new $file
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%make_build -f Makefile.gnu DESTDIR=%{buildroot}
|
sh ./gensrclist.sh
|
||||||
%make_build -f Makefile.fip DESTDIR=%{buildroot}
|
sh ./genfipsrclist.sh
|
||||||
|
%ifarch %{power64} %{mips32} aarch64
|
||||||
|
%make_build -f Makefile.gnu CFLAGS="%{optflags} -fPIC" CXXFLAGS="%{optflags} -fPIC" LDFLAGS="%{__global_ldflags}"
|
||||||
|
%make_build -f Makefile.fip CFLAGS="%{optflags} -fPIC" CXXFLAGS="%{optflags} -fPIC" LDFLAGS="%{__global_ldflags}"
|
||||||
|
%else
|
||||||
|
%make_build -f Makefile.gnu CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}"
|
||||||
|
%make_build -f Makefile.fip CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}"
|
||||||
|
%endif
|
||||||
|
|
||||||
pushd Wrapper/FreeImagePlus/doc
|
pushd Wrapper/FreeImagePlus/doc
|
||||||
doxygen FreeImagePlus.dox
|
doxygen FreeImagePlus.dox
|
||||||
@ -74,6 +109,11 @@ ldconfig -n %{buildroot}%{_libdir}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 09 2020 weidong <weidong@uniontech.com>
|
||||||
|
- Unbundle bundled libraries
|
||||||
|
- Fix incorrect path in doxyfile
|
||||||
|
- Fix incorrect variable names in BIGENDIAN blocks
|
||||||
|
|
||||||
* Thu Sep 10 2020 weidong <weidong@uniontech.com>
|
* Thu Sep 10 2020 weidong <weidong@uniontech.com>
|
||||||
- fix libpng arm neon in freeimage
|
- fix libpng arm neon in freeimage
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user