Use cmake instead of configure
[platform/upstream/libpng.git] / packaging / libpng.spec
index 2a4a60c..10b6ca9 100644 (file)
@@ -1,12 +1,14 @@
 Name:           libpng
-Version:        1.6.21
-Release:        1
+Version:        1.6.37
+Release:        3
 License:        Libpng
 Summary:        A library of functions for manipulating PNG image format files
-Url:            http://www.libpng.org/pub/png/
+Url:            http://www.libpng.org/pub/png/libpng.html
 Group:          System/Libraries
 Source:         %{name}-%{version}.tar.bz2
 Source1001:     libpng.manifest
+
+BuildRequires:  cmake
 BuildRequires:  zlib-devel
 
 %description
@@ -38,18 +40,17 @@ cp %{SOURCE1001} .
 CFLAGS+=" -D_ARCH_ARM_ -mfpu=neon"
 %endif
 
-%if "%{tizen_profile_name}" == "tv"
-CFLAGS+=" -D_PNG_COLOR_PICK_ENABLED_ -D_PNG_SEQUENTIAL_READ_SUPPORTED_"
-%endif
-
-%configure \
-    --disable-static \
-%ifarch %arm armv7l armv7el aarch64
-    --enable-arm-neon=check
+%cmake . -DPNG_STATIC=OFF \
+         -DSKIP_INSTALL_PROGRAMS=ON \
+         -DSKIP_INSTALL_EXPORT=ON \
+%ifarch %{arm}
+         -DPNG_ARM_NEON=check \
+%else
+         -DPNG_ARM_NEON=off \
 %endif
+         %{?ubsan: -DPNG_ARM_NEON=off}
 
-
-%__make %{?_smp_mflags}
+make %{?jobs:-j%jobs}
 
 %install
 %make_install