#1 Conditional support for mingw in EPEL9
Closed a year ago by smani. Opened a year ago by orion.
rpms/ orion/uriparser macros  into  rawhide

file modified
+27 -2
@@ -1,3 +1,19 @@ 

+ %if 0%{?el9}

+ # EL9.0 compat, should be fixed in 9.1

+ # https://bugzilla.redhat.com/show_bug.cgi?id=2080168

+ %global mingw32_pkg_name %(echo %{name} | sed -E 's/^(mingw-|)/mingw32-/')

+ %global mingw64_pkg_name %(echo %{name} | sed -E 's/^(mingw-|)/mingw64-/')

+ # EL9.0 only has mingw for x86_64 

+ # https://bugzilla.redhat.com/show_bug.cgi?id=2096010

+ %ifarch x86_64

+ %bcond_without mingw

+ %else

+ %bcond_with mingw

+ %endif

+ %else

+ %bcond_withtout mingw

+ %endif

+ 

  Name:           uriparser

  Version:        0.9.6

  Release:        5%{?dist}
@@ -16,11 +32,13 @@ 

  BuildRequires:  gtest-devel

  BuildRequires:  make

  

+ %if %{with mingw}

  BuildRequires:  mingw32-filesystem >= 95

  BuildRequires:  mingw32-gcc-c++

  

  BuildRequires:  mingw64-filesystem >= 95

  BuildRequires:  mingw64-gcc-c++

+ %endif

  

  

  %description
@@ -46,6 +64,7 @@ 

  The %{name}-doc package contains HTML documentation files for %{name}.

  

  

+ %if %{with mingw}

  %package -n mingw32-%{name}

  Summary:       MinGW Windows %{name} library

  BuildArch:     noarch
@@ -63,6 +82,7 @@ 

  

  

  %{?mingw_debug_package}

+ %endif

  

  

  
@@ -78,17 +98,20 @@ 

  %cmake

  %cmake_build

  

+ %if %{with mingw}

  # MinGW build

  %mingw_cmake -DURIPARSER_BUILD_TESTS=OFF -DURIPARSER_BUILD_DOCS=OFF

  %mingw_make_build

+ %endif

  

  

  %install

  %cmake_install

- %mingw_make_install

- 

  

+ %if %{with mingw}

+ %mingw_make_install

  %mingw_debug_install_post

+ %endif

  

  

  %check
@@ -111,6 +134,7 @@ 

  %license COPYING

  %doc %{_docdir}/%{name}/html

  

+ %if %{with mingw}

  %files -n mingw32-%{name}

  %license COPYING

  %{mingw32_bindir}/uriparse.exe
@@ -128,6 +152,7 @@ 

  %{mingw64_libdir}/lib%{name}.dll.a

  %{mingw64_libdir}/pkgconfig/lib%{name}.pc

  %{mingw64_libdir}/cmake/%{name}-%{version}/

+ %endif

  

  

  %changelog

This is kind of ugly, so you may only want to apply it to the epel9 branch. EPEL9 scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=89713737

Hopefully only temporary until the issues are resolved in RHEL9.

I've requested the epel9 branch and added you as collaborator, feel free to commit to the branch and build as soon as the branch is created!

Thanks, build started. Feel free to merge this or close it as you wish.

Pull-Request has been closed by smani

a year ago
Metadata