diff options
Diffstat (limited to 'vcpkg/ports/libudns')
| -rw-r--r-- | vcpkg/ports/libudns/configure.patch | 61 | ||||
| -rw-r--r-- | vcpkg/ports/libudns/portfile.cmake | 33 | ||||
| -rw-r--r-- | vcpkg/ports/libudns/vcpkg.json | 8 |
3 files changed, 102 insertions, 0 deletions
diff --git a/vcpkg/ports/libudns/configure.patch b/vcpkg/ports/libudns/configure.patch new file mode 100644 index 0000000..b39e298 --- /dev/null +++ b/vcpkg/ports/libudns/configure.patch @@ -0,0 +1,61 @@ +diff --git a/configure b/configure +index dda98b3..5594bf3 100755 +--- a/configure ++++ b/configure +@@ -26,7 +26,7 @@ enable() { + opt=`echo "$1" | sed 's/^--[^-]*-//'` + case "$opt" in + ipv6) ;; +- *) echo "configure: unrecognized option \`$1'" >&2; exit 1;; ++ *) echo "configure: unrecognized option \`$1'" >&2; opt=unused;; + esac + eval enable_$opt=$2 + } +@@ -50,11 +50,14 @@ Optional features (all enabled by default if system supports a feature): + EOF + exit 0 + ;; +- *) echo "configure: unknown option \`$1'" >&2; exit 1 ;; ++ *) echo "configure: unknown option \`$1'" >&2;; + esac + shift + done + ++CC="$CC $CPPFLAGS" ++export CC ++ + . ./configure.lib + + ac_msg "configure" +@@ -75,7 +78,8 @@ int main(int argc, char **argv) { + EOF + + if ac_library_find_v 'socket and connect' "" "-lsocket -lnsl" <<EOF +-int main() { socket(); connect(); return 0; } ++#include <sys/socket.h> ++int main() { socket(0,0,0); connect(0,0,0); return 0; } + EOF + then : + else +diff --git a/configure.lib b/configure.lib +index 541177a..672c082 100644 +--- a/configure.lib ++++ b/configure.lib +@@ -125,7 +125,7 @@ ac_prog_c_compiler_v() { + echo 'int main(int argc, char **argv) { return 0; }' >conftest.c + + if [ -n "$CC" ]; then +- if ac_run $CC -o conftest conftest.c && ac_run ./conftest; then ++ if ac_run $CC -o conftest conftest.c && true ac_run ./conftest; then + ac_result "\$CC ($CC)" + else + ac_result no +@@ -224,7 +224,7 @@ ac_library_find_v() { + } + + ac_compile_run() { +- ac_link "$@" && ac_run ./conftest ++ ac_link "$@" && true ac_run ./conftest + } + + ac_grep_cpp() { diff --git a/vcpkg/ports/libudns/portfile.cmake b/vcpkg/ports/libudns/portfile.cmake new file mode 100644 index 0000000..6d2a12c --- /dev/null +++ b/vcpkg/ports/libudns/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) # port needs work + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ortclib/udns + REF udns_0_4 + SHA512 4df8def718c75872536d42a757237d6c8e0afce8a53aedd7fea73814dc5cf8b5d6c9ae8f01a8cfc76864aa8293c172f08953a6750a66749ba19a3721bb4cf2ec + HEAD_REF master + PATCHES + configure.patch +) + +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + COPY_SOURCE +) + +vcpkg_build_make(BUILD_TARGET staticlib) +vcpkg_fixup_pkgconfig() +# Install +if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libudns.a DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +endif() +if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libudns.a DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +endif() + +file(INSTALL ${SOURCE_PATH}/udns.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libudns/vcpkg.json b/vcpkg/ports/libudns/vcpkg.json new file mode 100644 index 0000000..535b2a7 --- /dev/null +++ b/vcpkg/ports/libudns/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libudns", + "version": "0.4", + "port-version": 6, + "description": "The DNS library, udns, implements thread-safe stub DNS resolver functionality, which may be used both traditional, syncronous way and asyncronously, with application-supplied event loop.", + "homepage": "https://github.com/ortclib/udns", + "supports": "!windows & !osx" +} |