#21 Use legacy behavior for cmake-configure
Merged 3 years ago by ngompa. Opened 3 years ago by ngompa.
rpms/ ngompa/epel-rpm-macros use-legacy-cmake-behavior  into  epel8

file modified
+1 -1
@@ -2,7 +2,7 @@ 

  # Shell wrapper for supporting compiling with different backends for CMake < 3.13

  

  # Collect arguments

- __cmake_builddir="$1"

+ __cmake_builddir="$(realpath $1)"

  __build_flags="${@:2}"

  

  if [ -f "${__cmake_builddir}/Makefile" ]; then

file modified
+8 -4
@@ -3,11 +3,15 @@ 

  

  # Collect arguments

  __cmake="$1"

- __cmake_srcdir="$2"

- __cmake_builddir="$3"

+ __cmake_srcdir="$(realpath $2)"

+ __cmake_builddir="$(realpath $3)"

  __cmake_flags="${@:4}"

+ __cmake_retval=0

  

  # Do the build

  mkdir -p "${__cmake_builddir}"

- "${__cmake}" ${__cmake_flags} "${__cmake_srcdir}" "${__cmake_builddir}"

- exit $?

+ pushd "${__cmake_builddir}"

+ "${__cmake}" ${__cmake_flags} "${__cmake_srcdir}"

+ __cmake_retval=$?

+ popd

+ exit ${__cmake_retval}

file modified
+1 -1
@@ -2,7 +2,7 @@ 

  # Shell wrapper for supporting installing with different backends for CMake < 3.13

  

  # Collect arguments

- __cmake_builddir="$1"

+ __cmake_builddir="$(realpath $1)"

  __cmake_destdir="$2"

  

  if [ -f "${__cmake_builddir}/Makefile" ]; then

file modified
+4 -1
@@ -1,6 +1,6 @@ 

  Name:           epel-rpm-macros

  Version:        8

- Release:        15

+ Release:        16

  Summary:        Extra Packages for Enterprise Linux RPM macros

  

  Group:          System Environment/Base
@@ -83,6 +83,9 @@ 

  

  

  %changelog

+ * Thu Jul 30 2020 Neal Gompa <ngompa13@gmail.com> - 8-16

+ - Use legacy behavior for cmake-configure

+ 

  * Wed Jul 29 2020 Neal Gompa <ngompa13@gmail.com> - 8-15

  - Backport support for out-of-source builds controlled by __cmake_in_source_build macro (#1861329)

  - Backport cmake_build and cmake_install macros

This is based on what I did for backporting these macros for Debian/Ubuntu builds for even older versions of CMake.

Supersedes #20.

Pull-Request has been merged by ngompa

3 years ago