#2 Remove redundant $@ in mingw_cmake and mingw_meson.
Merged 5 years ago by kalev. Opened 5 years ago by qulogic.
rpms/ qulogic/mingw-filesystem redundant-args  into  master

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

          -DCMAKE_INSTALL_LIBDIR:PATH=%{mingw32_libdir} \\\

          ${MINGW_CMAKE_ARGS} \\\

          ${MINGW32_CMAKE_ARGS} \\\

-         "$@" $__mingw32_topdir

+         $__mingw32_topdir

  

  %mingw32_cmake \

    MINGW32_CMAKE_ARGS="${MINGW32_CMAKE_ARGS} -DINCLUDE_INSTALL_DIR:PATH=%{mingw32_includedir}" \
@@ -173,7 +173,7 @@ 

          --infodir %{mingw32_infodir} \\\

          ${MINGW_MESON_ARGS} \\\

          ${MINGW32_MESON_ARGS} \\\

-         "$@" $__mingw32_topdir

+         $__mingw32_topdir

  

  %mingw32_description This is the cross-compiled version of this library / tool.\

  You should only install this package if you want to cross-compile programs for \

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

          -DCMAKE_INSTALL_LIBDIR:PATH=%{mingw64_libdir} \\\

          ${MINGW_CMAKE_ARGS} \\\

          ${MINGW64_CMAKE_ARGS} \\\

-         "$@" $__mingw64_topdir

+         $__mingw64_topdir

  

  %mingw64_cmake \

    MINGW64_CMAKE_ARGS="${MINGW64_CMAKE_ARGS} -DINCLUDE_INSTALL_DIR:PATH=%{mingw64_includedir}" \
@@ -173,7 +173,7 @@ 

          --infodir %{mingw64_infodir} \\\

          ${MINGW_MESON_ARGS} \\\

          ${MINGW64_MESON_ARGS} \\\

-         "$@" $__mingw64_topdir

+         $__mingw64_topdir

  

  %mingw64_description This is the cross-compiled version of this library / tool.\

  You should only install this package if you want to cross-compile programs for \

file modified
+5 -2
@@ -6,8 +6,8 @@ 

  %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)

  

  Name:           mingw-filesystem

- Version:        104

- Release:        3%{?dist}

+ Version:        105

+ Release:        1%{?dist}

  Summary:        MinGW cross compiler base filesystem and environment

  

  License:        GPLv2+
@@ -316,6 +316,9 @@ 

  

  

  %changelog

+ * Tue Feb 05 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 105-1

+ - Remove redundant $@ in mingw_cmake and mingw_meson, breaking wrapper scripts

+ 

  * Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org>

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

  

$@ is not used by the RPM macro in RPM since it is executed as a line by itself, not a script or function (at least, as I understand it, since mingw_configure don't use it.)

There's already a $@ in the mingw-scripts.sh file, so when expanded from the macro, the script contains two $@, sending redundant arguments to cmake and meson.

This duplication breaks things like mingw32_meson build-directory because the macro determines the source directory (as $__mingw32_topdir) and replaces "$@" $__mingw32_topdir "$@" producing build-directory source-directory build-directory, which confuses meson.

I guess this was okay with cmake because you can only pass source directory or build directory, but not both. Thus you would only be passing options and they can (mostly) be duplicated without issue.

rebased onto ed40f14

5 years ago

Pull-Request has been merged by kalev

5 years ago