Accepting request 656851 from graphics

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/656851
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libjpeg-turbo?expand=0&rev=44
This commit is contained in:
Dominique Leuenberger 2018-12-19 12:24:34 +00:00 committed by Git OBS Bridge
commit caba68d4f6
2 changed files with 27 additions and 1 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Dec 3 10:48:42 UTC 2018 - Petr Gajdos <pgajdos@suse.com>
- asan_build: build ASAN included
- debug_build: build more suitable for debugging
-------------------------------------------------------------------
Tue Nov 13 11:14:01 UTC 2018 - Petr Gajdos <pgajdos@suse.com>

View File

@ -16,6 +16,9 @@
#
%define asan_build 0
%define debug_build 0
%define srcver 2.0.1
%define major 8
%define minor 2
@ -103,8 +106,21 @@ files using the libjpeg library.
%patch2 -p1
%build
export LDFLAGS="-Wl,-z,relro,-z,now"
MYLDFLAGS="-Wl,-z,relro,-z,now"
MYCFLAGS="%{optflags}"
%if %{asan_build}
MYLDFLAGS="$MYLDFLAGS -lasan"
MYCFLAGS="$MYCFLAGS -fsanitize=address"
%endif
%if %{debug_build}
MYCFLAGS="$MYCFLAGS -O0"
%endif
%cmake \
%if %{debug_build} || %{asan_build}
-DCMAKE_BUILD_TYPE=DEBUG \
-DCMAKE_C_FLAGS_DEBUG="$MYCFLAGS" \
%endif
-DCMAKE_SHARED_LINKER_FLAGS="$MYLDFLAGS" \
-DENABLE_STATIC=OFF \
-DWITH_JPEG8=ON \
%ifarch ppc
@ -114,6 +130,10 @@ export LDFLAGS="-Wl,-z,relro,-z,now"
make %{?_smp_mflags}
%check
%if %{asan_build}
# ASAN needs /proc to be mounted
exit 0
%endif
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
%ctest