]> TLD Linux GIT Repositories - packages/rpm-tld-macros.git/commitdiff
- merged 2.049 from PLD master
authorMarcin Krol <hawk@tld-linux.org>
Wed, 13 Aug 2025 09:42:03 +0000 (11:42 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Wed, 13 Aug 2025 09:42:03 +0000 (11:42 +0200)
macros.python
macros.tld
rpm-tld-macros.spec

index 36e26e7b70840ed3873d8cdae9ea43c74aeedba1..48b238fe846c32a03eb56378e4940215f5c593f9 100644 (file)
        CXXFLAGS="${CXXFLAGS:-%rpmcppflags %rpmcxxflags}"; export CXXFLAGS; \
        %{?__cc:CC="%{__cc}"; export CC;} \
        %{?__cxx:CXX="%{__cxx}"; export CXX;} \
+       PKG_CONFIG_ALLOW_CROSS=1; export PKG_CONFIG_ALLOW_CROSS; \
+       RUSTC="${RUSTC:-%__rustc}"; export RUSTC; \
+       %{?rustc_wrapper:RUSTC_WRAPPER="${RUSTC_WRAPPER:-%rustc_wrapper}"; export RUSTC_WRAPPER;} \
+       RUSTFLAGS="${RUSTFLAGS:-%rpmrustflags}"; export RUSTFLAGS; \
        %{__python} setup.py \
        build --build-base=build-2 \
 }
        CXXFLAGS="${CXXFLAGS:-%rpmcppflags %rpmcxxflags}"; export CXXFLAGS; \
        %{?__cc:CC="%{__cc}"; export CC;} \
        %{?__cxx:CXX="%{__cxx}"; export CXX;} \
+       PKG_CONFIG_ALLOW_CROSS=1; export PKG_CONFIG_ALLOW_CROSS; \
+       RUSTC="${RUSTC:-%__rustc}"; export RUSTC; \
+       %{?rustc_wrapper:RUSTC_WRAPPER="${RUSTC_WRAPPER:-%rustc_wrapper}"; export RUSTC_WRAPPER;} \
+       RUSTFLAGS="${RUSTFLAGS:-%rpmrustflags}"; export RUSTFLAGS; \
        %{__python} setup.py \
        build --build-base=build-2 \
        install --skip-build \
        CXXFLAGS="${CXXFLAGS:-%rpmcppflags %rpmcxxflags}"; export CXXFLAGS; \
        %{?__cc:CC="%{__cc}"; export CC;} \
        %{?__cxx:CXX="%{__cxx}"; export CXX;} \
+       PKG_CONFIG_ALLOW_CROSS=1; export PKG_CONFIG_ALLOW_CROSS; \
+       RUSTC="${RUSTC:-%__rustc}"; export RUSTC; \
+       %{?rustc_wrapper:RUSTC_WRAPPER="${RUSTC_WRAPPER:-%rustc_wrapper}"; export RUSTC_WRAPPER;} \
+       RUSTFLAGS="${RUSTFLAGS:-%rpmrustflags}"; export RUSTFLAGS; \
        %{__python3} setup.py build --build-base=build-3 \
 }
 
        CXXFLAGS="${CXXFLAGS:-%rpmcppflags %rpmcxxflags}"; export CXXFLAGS; \
        %{?__cc:CC="%{__cc}"; export CC;} \
        %{?__cxx:CXX="%{__cxx}"; export CXX;} \
+       PKG_CONFIG_ALLOW_CROSS=1; export PKG_CONFIG_ALLOW_CROSS; \
+       RUSTC="${RUSTC:-%__rustc}"; export RUSTC; \
+       %{?rustc_wrapper:RUSTC_WRAPPER="${RUSTC_WRAPPER:-%rustc_wrapper}"; export RUSTC_WRAPPER;} \
+       RUSTFLAGS="${RUSTFLAGS:-%rpmrustflags}"; export RUSTFLAGS; \
        %{__python3} setup.py \
        build --build-base=build-3 \
        install --skip-build \
        CXXFLAGS="${CXXFLAGS:-%rpmcppflags %rpmcxxflags}"; export CXXFLAGS; \
        %{?__cc:CC="%{__cc}"; export CC;} \
        %{?__cxx:CXX="%{__cxx}"; export CXX;} \
+       PKG_CONFIG_ALLOW_CROSS=1; export PKG_CONFIG_ALLOW_CROSS; \
+       RUSTC="${RUSTC:-%__rustc}"; export RUSTC; \
+       %{?rustc_wrapper:RUSTC_WRAPPER="${RUSTC_WRAPPER:-%rustc_wrapper}"; export RUSTC_WRAPPER;} \
+       RUSTFLAGS="${RUSTFLAGS:-%rpmrustflags}"; export RUSTFLAGS; \
         %{__python3} \
         -m build \
         --wheel \
        CXXFLAGS="${CXXFLAGS:-%rpmcppflags %rpmcxxflags}"; export CXXFLAGS; \
        %{?__cc:CC="%{__cc}"; export CC;} \
        %{?__cxx:CXX="%{__cxx}"; export CXX;} \
+       PKG_CONFIG_ALLOW_CROSS=1; export PKG_CONFIG_ALLOW_CROSS; \
+       RUSTC="${RUSTC:-%__rustc}"; export RUSTC; \
+       %{?rustc_wrapper:RUSTC_WRAPPER="${RUSTC_WRAPPER:-%rustc_wrapper}"; export RUSTC_WRAPPER;} \
+       RUSTFLAGS="${RUSTFLAGS:-%rpmrustflags}"; export RUSTFLAGS; \
         %{__python3} \
         -m installer \
         --destdir=$RPM_BUILD_ROOT \
index 84ed96b40607855eb1041cd6da4dadab17f06c20..1231e528076815309a9fe3a5827183c294044ceb 100644 (file)
@@ -280,7 +280,14 @@ pakietu oraz przy odpluskwianiu samego pakietu.\
        fi; \
 )}%_topdir
 
-%_tmppath              %(echo "${TMPDIR:-/var/tmp}")
+%_tmppath %{lua:
+local tmpdir = os.getenv("TMPDIR")
+if not tmpdir or tmpdir == "" then
+  tmpdir = "/var/tmp"
+end
+print(tmpdir)
+}
+
 %tmpdir                        %{_tmppath}
 
 # Left for compatibility with rpm < 4.20
@@ -1421,7 +1428,7 @@ fi;
        filelist='%{-s*}'
        i=$base
        while read checksum file; do
-               printf "patch%d %s\\n" $i "$patchlevel" | sed -e s,^,%%,
+               printf "patch -P%d %s\\n" $i "$patchlevel" | sed -e s,^,%%,
                i=$((i+1))
        done < $filelist
 }
@@ -1429,7 +1436,7 @@ fi;
        start=$(expr $base + %1);
        end=$(expr $base + %{?2}%{!?2:%{1}});
        echo ": patchset_patch %1%{?2: to %2}";
-       seq -f "patch%g $patchlevel" $start $end | sed -e s,^,%%,;
+       seq -f "patch -P%g $patchlevel" $start $end | sed -e s,^,%%,;
 }
 ) \
 %{nil}
index c696118422f276a274788c7f4caba3603a69fe10..bba83095324d9cddc575a72b21d263d05037a7e6 100644 (file)
@@ -1,4 +1,4 @@
-%define                rpm_macros_rev  2.047
+%define                rpm_macros_rev  2.049
 %define                find_lang_rev   1.42
 # split into individual X_prov_ver if there is a reason to desync
 %define                prov_ver        4.15