summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Valverde2023-06-11 19:51:08 +0100
committerJoão Valverde2023-06-11 19:56:36 +0100
commit90288ecae7034ecfd90fbaa3c3c0de22e27ee514 (patch)
tree800c60bc00009a614b545f342f486fbb42d9ee3a
parent747005f280f9dd9022a4533dfbd8f204f2529fff (diff)
downloadaur-90288ecae7034ecfd90fbaa3c3c0de22e27ee514.tar.gz
Upgrade to 1.19.1
For now it doesn't include a static library.
-rw-r--r--.SRCINFO16
-rw-r--r--0001-Use-RPM-compiler-options.patch41
-rw-r--r--0002-Add-static-pkg-config.patch83
-rw-r--r--0003-fix-cmake-targets.patch19
-rw-r--r--PKGBUILD67
5 files changed, 18 insertions, 208 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a83ae92776c1..b574905967e1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,24 +1,16 @@
pkgbase = mingw-w64-c-ares
pkgdesc = C library that performs DNS requests and name resolves asynchronously (mingw-w64)
- pkgver = 1.15.0
+ pkgver = 1.19.1
pkgrel = 1
url = https://c-ares.haxx.se/
arch = any
- license = custom
- makedepends = mingw-w64-configure
+ license = MIT
makedepends = mingw-w64-cmake
depends = mingw-w64-crt
options = !strip
options = !buildflags
options = staticlibs
- source = https://github.com/c-ares/c-ares/archive/cares-1_15_0.tar.gz
- source = 0001-Use-RPM-compiler-options.patch
- source = 0002-Add-static-pkg-config.patch
- source = 0003-fix-cmake-targets.patch
- sha256sums = 7deb7872cbd876c29036d5f37e30c4cbc3cc068d59d8b749ef85bb0736649f04
- sha256sums = f00faa8723fd530b027f96b987ef19138628a49afdf52ffb0554b36156fc9d74
- sha256sums = f181a2556cf28a0cbc948cd58a7bcf0c3c3cef01370d0f0fa6b3915f62d05d56
- sha256sums = 5810001abdd4acb8ae725dedb4d67874c3e2935775ecba30469a2a79c76fd6a0
+ source = https://c-ares.org/download/c-ares-1.19.1.tar.gz
+ sha256sums = 321700399b72ed0e037d0074c629e7741f6b2ec2dda92956abe3e9671d3e268e
pkgname = mingw-w64-c-ares
-
diff --git a/0001-Use-RPM-compiler-options.patch b/0001-Use-RPM-compiler-options.patch
deleted file mode 100644
index 721b71373b7f..000000000000
--- a/0001-Use-RPM-compiler-options.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 7dada62a77e061c752123e672e844386ff3b01ea Mon Sep 17 00:00:00 2001
-From: Stephen Gallagher <sgallagh@redhat.com>
-Date: Wed, 10 Apr 2013 12:32:44 -0400
-Subject: [PATCH] Use RPM compiler options
-
----
- m4/cares-compilers.m4 | 19 ++++++-------------
- 1 file changed, 6 insertions(+), 13 deletions(-)
-
-diff --git a/m4/cares-compilers.m4 b/m4/cares-compilers.m4
-index 7ee8e0dbe741c1a64149a0d20b826f507b3ec620..d7708230fb5628ae80fbf1052da0d2c78ebbc160 100644
---- a/m4/cares-compilers.m4
-+++ b/m4/cares-compilers.m4
-@@ -143,19 +143,12 @@ AC_DEFUN([CARES_CHECK_COMPILER_GNU_C], [
- gccvhi=`echo $gccver | cut -d . -f1`
- gccvlo=`echo $gccver | cut -d . -f2`
- compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
-- flags_dbg_all="-g -g0 -g1 -g2 -g3"
-- flags_dbg_all="$flags_dbg_all -ggdb"
-- flags_dbg_all="$flags_dbg_all -gstabs"
-- flags_dbg_all="$flags_dbg_all -gstabs+"
-- flags_dbg_all="$flags_dbg_all -gcoff"
-- flags_dbg_all="$flags_dbg_all -gxcoff"
-- flags_dbg_all="$flags_dbg_all -gdwarf-2"
-- flags_dbg_all="$flags_dbg_all -gvms"
-- flags_dbg_yes="-g"
-- flags_dbg_off="-g0"
-- flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
-- flags_opt_yes="-O2"
-- flags_opt_off="-O0"
-+ flags_dbg_all=""
-+ flags_dbg_yes=""
-+ flags_dbg_off=""
-+ flags_opt_all=""
-+ flags_opt_yes=""
-+ flags_opt_off=""
- CURL_CHECK_DEF([_WIN32], [], [silent])
- else
- AC_MSG_RESULT([no])
---
-1.8.1.4
diff --git a/0002-Add-static-pkg-config.patch b/0002-Add-static-pkg-config.patch
deleted file mode 100644
index 3071da47cf6b..000000000000
--- a/0002-Add-static-pkg-config.patch
+++ /dev/null
@@ -1,83 +0,0 @@
- Makefile.am | 4 ++--
- buildconf | 1 +
- configure.ac | 2 +-
- libcares-static.pc.in | 11 +++++++++++
- libcares.pc.in | 2 +-
- 5 files changed, 16 insertions(+), 4 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 364db1a..3fa6ddc 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -54,7 +54,7 @@ noinst_PROGRAMS =$(PROGS)
- # regular sources and headers
- EXTRA_DIST = AUTHORS CHANGES README.cares Makefile.inc Makefile.dj \
- Makefile.m32 Makefile.netware Makefile.msvc Makefile.Watcom $(man_MANS) \
-- config-win32.h RELEASE-NOTES libcares.pc.in buildconf get_ver.awk maketgz \
-+ config-win32.h RELEASE-NOTES libcares.pc.in libcares-static.pc.in buildconf get_ver.awk maketgz \
- TODO ares_build.h.in cares.rc README.msvc $(MSVCFILES) \
- $(CSOURCES) $(HHEADERS) config-dos.h acountry.1 adig.1 ahost.1 INSTALL.md \
- CMakeLists.txt ares_build.h.cmake ares_config.h.cmake c-ares-config.cmake.in \
-@@ -68,7 +68,7 @@
-
- pkgconfigdir = $(libdir)/pkgconfig
- pkgconfig_DATA = libcares.pc
--
-+pkgconfig_DATA += libcares-static.pc
- CARES_VERSION_INFO = -version-info 5:0:3
- # This flag accepts an argument of the form current[:revision[:age]]. So,
- # passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
-diff --git a/buildconf b/buildconf
-index a779d86..2bc10e5 100755
---- a/buildconf
-+++ b/buildconf
-@@ -162,6 +162,7 @@ for fname in .deps \
- configure \
- depcomp \
- libcares.pc \
-+ libcares-static.pc \
- libtool \
- libtool.m4 \
- libtool.m4.tmp \
-diff --git a/configure.ac b/configure.ac
-index 7e86ad6..e970960 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -900,6 +900,6 @@ if test "x$build_tests" = "xyes" ; then
- AC_CONFIG_SUBDIRS([test])
- fi
-
--AC_CONFIG_FILES([Makefile libcares.pc])
-+AC_CONFIG_FILES([Makefile libcares.pc libcares-static.pc])
- AC_OUTPUT
- XC_AMEND_DISTCLEAN(['.'])
-diff --git a/libcares-static.pc.in b/libcares-static.pc.in
-new file mode 100644
-index 0000000..4612712
---- /dev/null
-+++ b/libcares-static.pc.in
-@@ -0,0 +1,11 @@
-+#***************************************************************************
-+# Project ___ __ _ _ __ ___ ___
-+# / __|____ / _` | '__/ _ \/ __|
-+# | (_|_____| (_| | | | __/\__ \
-+# \___| \__,_|_| \___||___/
-+#
-+Name: c-ares-static
-+URL: http://daniel.haxx.se/projects/c-ares/
-+Description: asynchronous DNS lookup library
-+Version: @VERSION@
-+Cflags: -DCARES_STATICLIB
-diff --git a/libcares.pc.in b/libcares.pc.in
-index e757c1b..99fdbba 100644
---- a/libcares.pc.in
-+++ b/libcares.pc.in
-@@ -14,7 +14,7 @@ URL: http://daniel.haxx.se/projects/c-ares/
- Description: asynchronous DNS lookup library
- Version: @VERSION@
- Requires:
--Requires.private:
-+Requires.private: libcares-static
- Cflags: -I${includedir} @CPPFLAG_CARES_STATICLIB@
- Libs: -L${libdir} -lcares
- Libs.private: @CARES_PRIVATE_LIBS@
diff --git a/0003-fix-cmake-targets.patch b/0003-fix-cmake-targets.patch
deleted file mode 100644
index 620b8bc78ecd..000000000000
--- a/0003-fix-cmake-targets.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- c-ares-cares-1_13_0/CMakeLists.txt.orig 2017-11-14 10:37:45.399929800 +0300
-+++ c-ares-cares-1_13_0/CMakeLists.txt 2017-11-14 10:40:39.555223600 +0300
-@@ -545,6 +545,7 @@
- EXPORT_NAME cares
- OUTPUT_NAME cares
- VERSION "${CARES_LIB_VERSION_MAJOR}.${CARES_LIB_VERSION_MINOR}.${CARES_LIB_VERSION_RELEASE}"
-+ RUNTIME_OUTPUT_NAME cares-${CARES_LIB_VERSION_AGE}
- SOVERSION "${CARES_LIB_VERSION_MAJOR}"
- )
-
-@@ -574,7 +575,7 @@
-
- SET_TARGET_PROPERTIES (${LIBNAME} PROPERTIES
- EXPORT_NAME cares${STATIC_SUFFIX}
-- OUTPUT_NAME cares${STATIC_SUFFIX}
-+ OUTPUT_NAME cares
- )
-
- IF (CARES_STATIC_PIC)
diff --git a/PKGBUILD b/PKGBUILD
index e795d8b81346..e676389530a1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,61 +1,26 @@
# Maintainer: Andrew Sun <adsun701@gmail.com>
+# Maintainer: Joao Valverde <j at v6e dot pt>
pkgname=mingw-w64-c-ares
-pkgver=1.15.0
+pkgver=1.19.1
pkgrel=1
pkgdesc="C library that performs DNS requests and name resolves asynchronously (mingw-w64)"
arch=('any')
url="https://c-ares.haxx.se/"
-license=('custom')
-makedepends=('mingw-w64-configure' 'mingw-w64-cmake')
+license=('MIT')
+makedepends=('mingw-w64-cmake')
depends=('mingw-w64-crt')
options=('!strip' '!buildflags' 'staticlibs')
-source=("https://github.com/c-ares/c-ares/archive/cares-${pkgver//./_}.tar.gz"
- "0001-Use-RPM-compiler-options.patch"
- "0002-Add-static-pkg-config.patch"
- "0003-fix-cmake-targets.patch")
-sha256sums=('7deb7872cbd876c29036d5f37e30c4cbc3cc068d59d8b749ef85bb0736649f04'
- 'f00faa8723fd530b027f96b987ef19138628a49afdf52ffb0554b36156fc9d74'
- 'f181a2556cf28a0cbc948cd58a7bcf0c3c3cef01370d0f0fa6b3915f62d05d56'
- '5810001abdd4acb8ae725dedb4d67874c3e2935775ecba30469a2a79c76fd6a0')
+source=("https://c-ares.org/download/c-ares-${pkgver}.tar.gz")
+sha256sums=('321700399b72ed0e037d0074c629e7741f6b2ec2dda92956abe3e9671d3e268e')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
-# Helper macros to help make tasks easier #
-apply_patch_with_msg() {
- for _patch in "$@"
- do
- msg2 "Applying $_patch"
- patch -Nbp1 -i "${srcdir}/$_patch"
- done
-}
-
-del_file_exists() {
- for _fname in "$@"
- do
- if [ -f $_fname ]; then
- rm -rf $_fname
- fi
- done
-}
-# =========================================== #
-
-prepare() {
- cd "${srcdir}/c-ares-cares-${pkgver//./_}"
- del_file_exists libcares-static.pc.in
- apply_patch_with_msg 0001-Use-RPM-compiler-options.patch \
- 0002-Add-static-pkg-config.patch \
- 0003-fix-cmake-targets.patch
-
- autoreconf -fi
-}
-
build() {
- cd "${srcdir}/c-ares-cares-${pkgver//./_}"
+ cd "${srcdir}/c-ares-${pkgver}"
for _arch in ${_architectures}; do
mkdir -p build-${_arch} && pushd build-${_arch}
- ${_arch}-configure ..
- ${_arch}-cmake -DCARES_STATIC=ON -DCARES_SHARED=ON ..
+ ${_arch}-cmake -DCMAKE_SHARED_LIBRARY_NAME_WITH_VERSION=ON ..
make
popd
done
@@ -63,18 +28,14 @@ build() {
package() {
for _arch in ${_architectures}; do
- cd "${srcdir}/c-ares-cares-${pkgver//./_}/build-${_arch}"
+ cd "${srcdir}/c-ares-${pkgver}/build-${_arch}"
make DESTDIR="${pkgdir}" install
-
- cp ${srcdir}/c-ares-cares-${pkgver//./_}/nameser.h ${pkgdir}/usr/${_arch}/include
-
- # provide pkgconfig files
- sed -i -e "s|Version: -|Version: ${pkgver}|g" libcares.pc libcares-static.pc
- install -Dm644 libcares.pc ${pkgdir}/usr/${_arch}/lib/pkgconfig/libcares.pc
- install -Dm644 libcares-static.pc ${pkgdir}/usr/${_arch}/lib/pkgconfig/libcares-static.pc
-
+
+ # remove documentation
+ rm -rf "$pkgdir"/usr/${_arch}/share/man
+ rmdir "$pkgdir"/usr/${_arch}/share
+
${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.exe
${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
- ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
done
}