Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[getdns] update to 1.7.3 #34188

Merged
merged 7 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions ports/getdns/disable-docs.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 413709da..d3dd03f0 100644
index 9170be7..def3758 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1039,9 +1039,9 @@ configure_file(src/version.c.in version.c)
@@ -1036,9 +1036,9 @@ configure_file(src/version.c.in version.c)

set(version ${PACKAGE_VERSION})
set(date ${API_VERSION})
Expand All @@ -15,28 +15,26 @@ index 413709da..d3dd03f0 100644
get_filename_component(out ${man} NAME_WE)
configure_file(${man} man3/${out}.3 @ONLY)

@@ -1061,7 +1061,7 @@ foreach (man ${mans})
@@ -1058,7 +1058,7 @@ foreach (man ${mans})
configure_file(${man} man3/${alt}.3 @ONLY)
endif ()
endforeach()
-endforeach()
+endif()

set(prefix ${CMAKE_INSTALL_PREFIX})
configure_file(getdns.pc.in getdns.pc @ONLY)
@@ -1099,11 +1099,11 @@ if (BUILD_GETDNS_SERVER_MON)
cmake_path(APPEND libdir_for_pc_file "\${prefix}" "${CMAKE_INSTALL_LIBDIR}")
@@ -1098,10 +1098,10 @@ if (BUILD_GETDNS_SERVER_MON)
endif ()

install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/getdns DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
-install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man3 DESTINATION share/man)
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man3 DESTINATION share/man)
-install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man3 DESTINATION ${CMAKE_INSTALL_MANDIR})
+#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man3 DESTINATION ${CMAKE_INSTALL_MANDIR})

-set(docdir share/doc/getdns)
-install(FILES AUTHORS ChangeLog COPYING LICENSE NEWS README.md DESTINATION ${docdir})
-install(FILES spec/index.html DESTINATION ${docdir}/spec)
+#set(docdir share/doc/getdns)
+#install(FILES AUTHORS ChangeLog COPYING LICENSE NEWS README.md DESTINATION ${docdir})
+#install(FILES spec/index.html DESTINATION ${docdir}/spec)
-install(FILES AUTHORS ChangeLog COPYING LICENSE NEWS README.md DESTINATION ${CMAKE_INSTALL_DOCDIR})
-install(FILES spec/index.html DESTINATION ${CMAKE_INSTALL_DOCDIR}/spec)
+#install(FILES AUTHORS ChangeLog COPYING LICENSE NEWS README.md DESTINATION ${CMAKE_INSTALL_DOCDIR})
+#install(FILES spec/index.html DESTINATION ${CMAKE_INSTALL_DOCDIR}/spec)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/getdns.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

install(CODE "message(\"\
30 changes: 30 additions & 0 deletions ports/getdns/fix-include.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
diff --git a/src/gldns/parse.c b/src/gldns/parse.c
index 367fa80..79fa527 100644
--- a/src/gldns/parse.c
+++ b/src/gldns/parse.c
@@ -13,7 +13,7 @@
#include "gldns/gbuffer.h"

#include <limits.h>
-#include <strings.h>
+#include <stdlib.h>

gldns_lookup_table gldns_directive_types[] = {
{ GLDNS_DIR_TTL, "$TTL" },
diff --git a/src/gldns/parseutil.c b/src/gldns/parseutil.c
index 293496a..bcd8e6f 100644
--- a/src/gldns/parseutil.c
+++ b/src/gldns/parseutil.c
@@ -14,8 +14,12 @@

#include "config.h"
#include "gldns/parseutil.h"
+#ifdef HAVE_SYS_TIME_H
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to see what happens with getdnsapi/getdns#538 before proceeding here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, upstream has had a couple months to respond and they have not so I think you can proceed but please evaluate just taking that patch submitted upstream.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#include <sys/time.h>
+#endif
+#ifdef HAVE_TIME_H
#include <time.h>
+#endif
#include <ctype.h>

gldns_lookup_table *
33 changes: 33 additions & 0 deletions ports/getdns/fix-libuv-deps.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c5b711e..6bd9ee2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -872,7 +872,7 @@ endif ()

# libuv extension.
if (USE_LIBUV)
- find_package(Libuv)
+ find_package(libuv CONFIG REQUIRED)
if (Libuv_FOUND)
# Check for new-style callbacks.
try_compile(HAVE_NEW_UV_TIMER_CB
@@ -894,8 +894,7 @@ if (USE_LIBUV)
set_property(TARGET uv_objects PROPERTY C_STANDARD 11)
if (ENABLE_STATIC)
add_library(getdns_ext_uv STATIC $<TARGET_OBJECTS:uv_objects>)
- target_include_directories(getdns_ext_uv PRIVATE Libuv::Libuv)
- target_link_libraries(getdns_ext_uv PUBLIC getdns Libuv::Libuv)
+ target_link_libraries(getdns_ext_uv PUBLIC getdns $<IF:$<TARGET_EXISTS:libuv::uv_a>,libuv::uv_a,libuv::uv>)
if (Libunbound_FOUND)
target_link_libraries(getdns_ext_uv PUBLIC Libunbound::Libunbound)
endif ()
@@ -903,8 +902,7 @@ if (USE_LIBUV)
endif ()
if (ENABLE_SHARED)
add_library(getdns_ext_uv_shared SHARED $<TARGET_OBJECTS:uv_objects>)
- target_include_directories(getdns_ext_uv_shared PRIVATE Libuv::Libuv)
- target_link_libraries(getdns_ext_uv_shared PUBLIC getdns_shared Libuv::Libuv)
+ target_link_libraries(getdns_ext_uv_shared PUBLIC getdns $<IF:$<TARGET_EXISTS:libuv::uv_a>,libuv::uv_a,libuv::uv>)
if (Libunbound_FOUND)
target_link_libraries(getdns_ext_uv_shared PUBLIC Libunbound::Libunbound)
endif ()
14 changes: 7 additions & 7 deletions ports/getdns/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
set(GETDNS_VERSION 1.7.0)
set(GETDNS_HASH d09b8bdd0b4a3df2d25b9689166226da83a5a7eb2c7436487dc637539ac6077624a4d66cf684c4e6c4911561872c6bd191af3afd90d275b1662e4c6c47773ef6)

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" GETDNS_ENABLE_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" GETDNS_ENABLE_SHARED)

vcpkg_download_distfile(ARCHIVE
URLS "https://getdnsapi.net/dist/getdns-${GETDNS_VERSION}.tar.gz"
FILENAME "getdns-${GETDNS_VERSION}.tar.gz"
SHA512 ${GETDNS_HASH}
URLS "https://getdnsapi.net/dist/getdns-${VERSION}.tar.gz"
FILENAME "getdns-${VERSION}.tar.gz"
SHA512 d5725a24378b6fe0018daefdaba5565d2d4d51109ef66609fc34270a0a69accb95f5f895d0cdfc5caca51d2ec586db126f367439f05aed12507395af26739e2f
)

vcpkg_extract_source_archive(
SOURCE_PATH
ARCHIVE "${ARCHIVE}"
PATCHES disable-docs.patch
PATCHES
disable-docs.patch
fix-include.patch
fix-libuv-deps.patch
)

if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
Expand Down
3 changes: 1 addition & 2 deletions ports/getdns/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "getdns",
"version": "1.7.0",
"port-version": 3,
"version": "1.7.3",
"description": "GetDNS is a modern asynchronous DNS API",
"homepage": "https://getdnsapi.net/",
"license": "BSD-3-Clause",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2921,8 +2921,8 @@
"port-version": 1
},
"getdns": {
"baseline": "1.7.0",
"port-version": 3
"baseline": "1.7.3",
"port-version": 0
},
"getopt": {
"baseline": "0",
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/getdns.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "bc99e968335624d1ff606befa894103b540fbde2",
"version": "1.7.3",
"port-version": 0
},
{
"git-tree": "b604fb24c9b81bf4bc5c30e7ca86e52750a86935",
"version": "1.7.0",
Expand Down