diff --git a/ports/hamlib/portfile.cmake b/ports/hamlib/portfile.cmake new file mode 100644 index 0000000000..ac2b88d478 --- /dev/null +++ b/ports/hamlib/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Hamlib/Hamlib + REF "${VERSION}" + SHA512 84541adc1de2132d272a823c21a80376da8effe0be4afd41e8f4bf4b2bf714b2abf8418ed0d21491f961cbe358cff2718a07b499d6277a9292f81ce2b1eee92f +) + +vcpkg_list(SET options) +if("usb" IN_LIST FEATURES) + list(APPEND options --with-libusb=yes) +else() + list(APPEND options --with-libusb=no) +endif() +if("xml" IN_LIST FEATURES) + list(APPEND options --with-xml-support=yes) +else() + list(APPEND options --with-xml-support=no) +endif() + +vcpkg_make_configure( + SOURCE_PATH "${SOURCE_PATH}" + AUTORECONF + OPTIONS + ${options} + --with-cxx-binding=yes + --with-indi=no # needs libindi/libnova + --with-readline=no # needs readline + --enable-html-matrix=no # needs libgd + --enable-usrp=no + +) +vcpkg_make_install() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/hamlib/vcpkg.json b/ports/hamlib/vcpkg.json new file mode 100644 index 0000000000..a333994459 --- /dev/null +++ b/ports/hamlib/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "hamlib", + "version": "4.7.1", + "description": "Ham radio control library for rigs (radios), rotators, and amplifiers.", + "homepage": "https://hamlib.github.io/", + "documentation": "https://github.com/Hamlib/Hamlib/wiki/Documentation", + "license": null, + "supports": "(!windows | mingw) & !android", + "dependencies": [ + { + "name": "vcpkg-make", + "host": true + } + ], + "features": { + "usb": { + "description": "USB backend support", + "dependencies": [ + "libusb" + ] + }, + "xml": { + "description": "Rigmem XML support", + "dependencies": [ + "libxml2" + ] + } + } +} diff --git a/versions/baseline.json b/versions/baseline.json index 4d1e78159a..73feb8b05c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3736,6 +3736,10 @@ "baseline": "18.0.0", "port-version": 1 }, + "hamlib": { + "baseline": "4.7.1", + "port-version": 0 + }, "hanjingo-high-jump": { "baseline": "1.0.6", "port-version": 0 diff --git a/versions/h-/hamlib.json b/versions/h-/hamlib.json new file mode 100644 index 0000000000..a3a44e5ff6 --- /dev/null +++ b/versions/h-/hamlib.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "66c568e74340fb28a72a507d2eaabfcf8b2f4d72", + "version": "4.7.1", + "port-version": 0 + } + ] +}