Use cmake instead of configure 86/283986/3
authorhj kim <backto.kim@samsung.com>
Tue, 8 Nov 2022 06:12:19 +0000 (15:12 +0900)
committerhj kim <backto.kim@samsung.com>
Thu, 10 Nov 2022 01:06:31 +0000 (10:06 +0900)
And add below options.
-DSKIP_INSTALL_PROGRAMS=ON : skip unused binary installation, such as pngfix
-DSKIP_INSTALL_EXPORT=ON : skip generated cmake file installation, such as libpng16-noconfig.cmake

Change-Id: Iecebd471a66ba2bf4e6fca27e9a2143fd7d8238c

packaging/libpng.spec

index 438294a..10b6ca9 100644 (file)
@@ -1,12 +1,14 @@
 Name:           libpng
 Version:        1.6.37
-Release:        2
+Release:        3
 License:        Libpng
 Summary:        A library of functions for manipulating PNG image format files
 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,15 +40,17 @@ cp %{SOURCE1001} .
 CFLAGS+=" -D_ARCH_ARM_ -mfpu=neon"
 %endif
 
-%configure \
-    --disable-static \
+%cmake . -DPNG_STATIC=OFF \
+         -DSKIP_INSTALL_PROGRAMS=ON \
+         -DSKIP_INSTALL_EXPORT=ON \
 %ifarch %{arm}
-    --enable-arm-neon=check \
-    %{?ubsan: --enable-arm-neon=no}
+         -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