[PATCH] Update c-ares for including config scripts for CMake
"Carlo B. via Cygwin-apps" <[email protected]> Mon, 2 Feb 2026 14:24:34 +0100
| Newsgroups | gmane.os.cygwin.applications |
|---|---|
| Message-ID | <CADt9574sGjRQn2CWCfN4-qx1qKJKUT9x6ytJiXPwSPsNVMw7nA@mail.gmail.com> |
I compiled FlightGear Simulator for CYGWIN and MinGW and I dicovered that the simgear component was not able to find c-ares library. With reference to this message: https://cygwin.com/pipermail/cygwin-announce/2025-December/012721.html recently, c-ares has been updated to the latest version available at the time of writing, but it has been compiled by using autotools. As result, the development package does not include the config scripts for CMake. So, I updated the script for cygport of c-ares for using CMake instead. Now, the development package also includes the config scripts for CMake and simgear has been able to find the library successfully. I cloned the sources of the existing package script here: https://cygwin.com/cgit/cygwin-packages/c-ares/ and created a patch file that you can find attached to this email. At this address: https://github.com/carlo-bramini/packages-cygwin/tree/main/c-ares you can also find the modified cygport file with my precompiled libraries. The changes can be resumed as: 1) Added inherit to cmake 2) Increased release number from 0 to 1 3) Added CYGCMAKE_ARGS. Note, I have not removed autotools arguments just to keep the patch smaller. 4) libcares_devel_CATEGORY is now "Devel". 5) I removed the man files from libcares_devel and I created a new libcares_doc as "Doc". Into the above address of my packages-cygwin repository, you can also find updated packages for MinGW cross compilers, if you will want to upgrade them too. I hope that all you and the maintainer of the c-ares packages will find this report useful. Sincerely, Carlo Bramini.
c-ares.txt
(text/plain, 1.3 KB)
diff --git a/c-ares.cygport b/c-ares.cygport
index b1ec88b..6682daf 100644
--- a/c-ares.cygport
+++ b/c-ares.cygport
@@ -1,9 +1,11 @@
#|/usr/bin/cygport
# c-ares.cygport - c-ares Cygwin package build control script definitions
+inherit cmake
+
NAME=c-ares
VERSION=1.34.6
-RELEASE=0
+RELEASE=1
CATEGORY="Net Libs"
SUMMARY="Curl Asynchronous RESolver library"
@@ -69,33 +71,31 @@ CYGCONF_ARGS=
# --with-random=FILE read randomness from FILE (default=/dev/urandom)
# --with-sysroot[=DIR] Search for dependent libraries within DIR (or compiler sysroot if not specified).
+CYGCMAKE_ARGS="
+ -DCARES_BUILD_TOOLS=OFF
+"
+
ABI=2
-PKG_NAMES="libcares$ABI libcares-devel"
+PKG_NAMES="libcares$ABI libcares-devel libcares-doc"
declare libcares${ABI}_CONTENTS="
- usr/bin/cygcares-$ABI.dll
- usr/share/doc/c-ares/
+ usr/bin
+ usr/share/doc
"
+libcares_devel_CATEGORY="Devel"
libcares_devel_CONTENTS="
- usr/include/ares*.h
- usr/lib/libcares.dll.a
- usr/lib/pkgconfig/libcares.pc
- usr/share/man/man3/
+ usr/include
+ usr/lib
"
-
-src_compile() {
- cd $S
- cygautoreconf
- cd $B
- cygconf
- cygmake
-# cygmake ahost adig acountry
-}
+libcares_doc_CATEGORY="Doc"
+libcares_doc_CONTENTS="
+ usr/share/man
+"
CYGWIN_MAINTAINER=Brian%20Inglis