Bug 218499

Summary: databases/pgbouncer add dns/c-ares support
Product: Ports & Packages Reporter: m.tsatsenko
Component: Individual Port(s)Assignee: Po-Chuan Hsieh <sunpoet>
Status: Closed FIXED    
Severity: Affects Only Me CC: zi
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
the patch m.tsatsenko: maintainer-approval+

Description m.tsatsenko 2017-04-08 23:12:09 UTC
Created attachment 181608 [details]
the patch

- Add an option for dns/c-ares support
- Bump PORTREVISION due to potential binary change. Previously the port could auto-detect pre installed c-ares and link against it.

QA:
Portlint OK
poudriere 103amd64 OK (with both C-ARES ON and OFF)
Comment 1 Po-Chuan Hsieh freebsd_committer 2017-05-05 15:29:57 UTC
We have shared description for CARES option. I would suggest using CARES instead of C-ARES. Do you agree with this change?

% grep CARES /usr/ports/Mk/bsd.options.desc.mk
CARES_DESC?=            Asynchronous DNS resolution via c-ares

The new patch is as follows:

Index: Makefile
===================================================================
--- Makefile    (revision 440150)
+++ Makefile    (working copy)
@@ -3,7 +3,7 @@

 PORTNAME=      pgbouncer
 PORTVERSION=   1.7.2
-PORTREVISION=  2
+PORTREVISION=  3
 CATEGORIES=    databases
 MASTER_SITES=  https://pgbouncer.github.io/downloads/files/${PORTVERSION}/ \
                http://pgbouncer.github.io/downloads/files/${PORTVERSION}/
@@ -26,6 +26,10 @@
 GNU_CONFIGURE= yes
 USES=          gmake ssl

+OPTIONS_DEFINE=        CARES
+CARES_LIB_DEPENDS=     libcares.so:dns/c-ares
+CARES_CONFIGURE_WITH=  cares
+
 CONFIGURE_ARGS=        --with-libevent=${LOCALBASE} --enable-evdns
 CONFIGURE_ENV+=        PTHREAD_LIBS="-lpthread"
Comment 2 Ryan Steinmetz freebsd_committer freebsd_triage 2017-05-05 16:07:11 UTC
This makes sense to me!
Comment 3 m.tsatsenko 2017-05-06 03:00:19 UTC
Hello,
I do.
Thanks for suggestion! Somehow I have missed it myself.
Comment 4 commit-hook freebsd_committer 2017-05-06 11:19:10 UTC
A commit references this bug:

Author: sunpoet
Date: Sat May  6 11:18:43 UTC 2017
New revision: 440257
URL: https://svnweb.freebsd.org/changeset/ports/440257

Log:
  Add CARES option

  - Bump PORTREVISION for package change

  PR:		218499
  Submitted by:	Mikhail Tsatsenko <m.tsatsenko@gmail.com> (maintainer)

Changes:
  head/databases/pgbouncer/Makefile
Comment 5 Po-Chuan Hsieh freebsd_committer 2017-05-06 11:19:30 UTC
Committed. Thanks!