summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbiao716.wang <biao716.wang@samsung.com>2020-12-07 11:58:29 +0900
committerbiao716.wang <biao716.wang@samsung.com>2020-12-09 17:32:53 +0900
commita26c0b2357111eed25cf264967cbf2bc1c306650 (patch)
treef766326b775137ec95984a56da2493c3e0a23660
parent04c87672f50ee420d3a1fab45169428011b825d8 (diff)
downloadcmake-sandbox/wangbiao/cmake_3164.tar.gz
cmake-sandbox/wangbiao/cmake_3164.tar.bz2
cmake-sandbox/wangbiao/cmake_3164.zip
New: Add dependece with zstd, actually there exist internal zstd in cmake.Y Change-Id: I72753531d4c77db3d93f66bdaefcb9bde2f1b737 Signed-off-by: biao716.wang <biao716.wang@samsung.com>
-rw-r--r--packaging/cmake.spec5
-rw-r--r--packaging/macros.cmake62
-rw-r--r--packaging/macros.cmake_316465
-rw-r--r--packaging/macros.cmake_orig25
4 files changed, 79 insertions, 78 deletions
diff --git a/packaging/cmake.spec b/packaging/cmake.spec
index 662275de8..821b9b08c 100644
--- a/packaging/cmake.spec
+++ b/packaging/cmake.spec
@@ -22,8 +22,7 @@ BuildRequires: pkgconfig(openssl1.1)
BuildRequires: pkgconfig(liblzma)
BuildRequires: pkgconfig(libarchive) >= 3.3.3
BuildRequires: pkgconfig(zlib)
-BuildRequires: pkgconfig(libcurl)
-#BuildRequires: pkgconfig(libzstd)
+BuildRequires: pkgconfig(libzstd)
BuildRequires: procps
%description
@@ -54,6 +53,8 @@ export LDFLAGS="-ltinfo"
--no-system-curl \
--no-system-jsoncpp \
--no-system-librhash \
+ --no-system-libarchive \
+ --no-system-zstd \
--no-system-libuv
%__make VERBOSE=1 %{?_smp_mflags}
diff --git a/packaging/macros.cmake b/packaging/macros.cmake
index 37ec99c12..8257f9666 100644
--- a/packaging/macros.cmake
+++ b/packaging/macros.cmake
@@ -1,65 +1,25 @@
#
# Macros for cmake
#
+%_cmake_lib_suffix64 -DLIB_SUFFIX=64
+%_cmake_skip_rpath -DCMAKE_SKIP_RPATH:BOOL=ON
%__cmake %{_bindir}/cmake
-%__ctest %{_bindir}/ctest
-%__builddir build
-%__builder %__make
-%__sourcedir .
%cmake \
- find %__sourcedir -name CMakeLists.txt \\\
- -exec sed -i -re '/^[[:blank:]]*[sS][eE][tT][[:blank:]]*\\\([[:blank:]]*(CMAKE_BUILD_TYPE|CMAKE_COLOR_MAKEFILE|CMAKE_INSTALL_PREFIX|CMAKE_VERBOSE_MAKEFILE).*\\\)/{s/^/#IGNORE /}' {} + \
- mkdir -p %__builddir \
- cd %__builddir \
- %__cmake $OLDPWD/%__sourcedir \\\
-%if "%__builder" == "%__make" \
- -G"Unix Makefiles" \\\
-%else \
- -GNinja \\\
-%endif \
+ CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
+ CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
+ FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
+ %__cmake \\\
+ -DCMAKE_VERBOSE_MAKEFILE=ON \\\
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\
+ -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \\\
-DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\
-DLIB_INSTALL_DIR:PATH=%{_libdir} \\\
-DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\
-DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\
- -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \\\
- -DCMAKE_BUILD_TYPE=RelWithDebInfo \\\
- -DCMAKE_C_FLAGS="${CFLAGS:-%optflags} -DNDEBUG" \\\
- -DCMAKE_CXX_FLAGS="${CXXFLAGS:-%optflags} -DNDEBUG" \\\
- -DCMAKE_Fortran_FLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}} -DNDEBUG" \\\
- -DCMAKE_EXE_LINKER_FLAGS="%{?build_ldflags} -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \\\
- -DCMAKE_MODULE_LINKER_FLAGS="%{?build_ldflags} -Wl,--as-needed" \\\
- -DCMAKE_SHARED_LINKER_FLAGS="%{?build_ldflags} -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \\\
%if "%{?_lib}" == "lib64" \
- -DLIB_SUFFIX=64 \\\
-%endif \
- -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\
- -DBUILD_SHARED_LIBS:BOOL=ON \\\
- -DBUILD_STATIC_LIBS:BOOL=OFF \\\
- -DCMAKE_COLOR_MAKEFILE:BOOL=OFF \\\
- -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF \\\
- -DCMAKE_MODULES_INSTALL_DIR=%{_datadir}/cmake/Modules
-
-%__builder_verbose \
-%if "%__builder" == "%__make" \
- %{?_make_output_sync} VERBOSE=1 \\\
-%else \
- -v \\\
+ %{?_cmake_lib_suffix64} \\\
%endif \
-%{nil}
-
-%cmake_build %__builder \\%__builder_verbose %{?_smp_mflags}
-
-%make_jobs \
- echo "Deprecated %%make_jobs macro used, please use %%cmake_build" \
- %cmake_build
-
-%cmake_install \
- DESTDIR=%{buildroot} %__builder install -C %__builddir
-
-%ctest(:-:) \
- cd %__builddir \
- %__ctest --output-on-failure --force-new-ctest-process %{?_smp_mflags} %** \
- cd ..
+ %{?_cmake_skip_rpath} \\\
+ -DBUILD_SHARED_LIBS:BOOL=ON
diff --git a/packaging/macros.cmake_3164 b/packaging/macros.cmake_3164
new file mode 100644
index 000000000..37ec99c12
--- /dev/null
+++ b/packaging/macros.cmake_3164
@@ -0,0 +1,65 @@
+#
+# Macros for cmake
+#
+%__cmake %{_bindir}/cmake
+%__ctest %{_bindir}/ctest
+%__builddir build
+%__builder %__make
+%__sourcedir .
+
+%cmake \
+ find %__sourcedir -name CMakeLists.txt \\\
+ -exec sed -i -re '/^[[:blank:]]*[sS][eE][tT][[:blank:]]*\\\([[:blank:]]*(CMAKE_BUILD_TYPE|CMAKE_COLOR_MAKEFILE|CMAKE_INSTALL_PREFIX|CMAKE_VERBOSE_MAKEFILE).*\\\)/{s/^/#IGNORE /}' {} + \
+ mkdir -p %__builddir \
+ cd %__builddir \
+ %__cmake $OLDPWD/%__sourcedir \\\
+%if "%__builder" == "%__make" \
+ -G"Unix Makefiles" \\\
+%else \
+ -GNinja \\\
+%endif \
+ -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\
+ -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\
+ -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\
+ -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\
+ -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\
+ -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \\\
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \\\
+ -DCMAKE_C_FLAGS="${CFLAGS:-%optflags} -DNDEBUG" \\\
+ -DCMAKE_CXX_FLAGS="${CXXFLAGS:-%optflags} -DNDEBUG" \\\
+ -DCMAKE_Fortran_FLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}} -DNDEBUG" \\\
+ -DCMAKE_EXE_LINKER_FLAGS="%{?build_ldflags} -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \\\
+ -DCMAKE_MODULE_LINKER_FLAGS="%{?build_ldflags} -Wl,--as-needed" \\\
+ -DCMAKE_SHARED_LINKER_FLAGS="%{?build_ldflags} -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \\\
+%if "%{?_lib}" == "lib64" \
+ -DLIB_SUFFIX=64 \\\
+%endif \
+ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\
+ -DBUILD_SHARED_LIBS:BOOL=ON \\\
+ -DBUILD_STATIC_LIBS:BOOL=OFF \\\
+ -DCMAKE_COLOR_MAKEFILE:BOOL=OFF \\\
+ -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF \\\
+ -DCMAKE_MODULES_INSTALL_DIR=%{_datadir}/cmake/Modules
+
+%__builder_verbose \
+%if "%__builder" == "%__make" \
+ %{?_make_output_sync} VERBOSE=1 \\\
+%else \
+ -v \\\
+%endif \
+%{nil}
+
+%cmake_build %__builder \\%__builder_verbose %{?_smp_mflags}
+
+%make_jobs \
+ echo "Deprecated %%make_jobs macro used, please use %%cmake_build" \
+ %cmake_build
+
+%cmake_install \
+ DESTDIR=%{buildroot} %__builder install -C %__builddir
+
+%ctest(:-:) \
+ cd %__builddir \
+ %__ctest --output-on-failure --force-new-ctest-process %{?_smp_mflags} %** \
+ cd ..
+
diff --git a/packaging/macros.cmake_orig b/packaging/macros.cmake_orig
deleted file mode 100644
index 8257f9666..000000000
--- a/packaging/macros.cmake_orig
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# Macros for cmake
-#
-%_cmake_lib_suffix64 -DLIB_SUFFIX=64
-%_cmake_skip_rpath -DCMAKE_SKIP_RPATH:BOOL=ON
-%__cmake %{_bindir}/cmake
-
-%cmake \
- CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
- CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
- FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
- %__cmake \\\
- -DCMAKE_VERBOSE_MAKEFILE=ON \\\
- -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\
- -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \\\
- -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\
- -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\
- -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\
- -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\
-%if "%{?_lib}" == "lib64" \
- %{?_cmake_lib_suffix64} \\\
-%endif \
- %{?_cmake_skip_rpath} \\\
- -DBUILD_SHARED_LIBS:BOOL=ON
-