stubby: update to version 0.3.0
authorJonathan G. Underwood <redacted>
Wed, 1 Jul 2020 21:23:20 +0000 (22:23 +0100)
committerJonathan G. Underwood <redacted>
Wed, 1 Jul 2020 21:27:27 +0000 (22:27 +0100)
Signed-off-by: Jonathan G. Underwood <redacted>
net/stubby/Makefile
net/stubby/patches/stubby-0.3.0-fix-config-install.patch [new file with mode: 0644]

index 406624838b3a3d90aeb7d289a6d1e9d22170e69b..739e33e39eb020964bcfc0e010d9b5a86702a093 100644 (file)
@@ -5,23 +5,23 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=stubby
-PKG_VERSION:=0.2.6
-PKG_RELEASE:=5
+PKG_VERSION:=0.3.0
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/getdnsapi/$(PKG_NAME)
 PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-PKG_MIRROR_HASH:=af896c471ac67b31c2263d11fcdfcdb32a213621c2f8789f4b0a4ceca4437108
+PKG_MIRROR_HASH:=f1585aa6881bf39c2c8f99df045d5739bb78403417a1e827644cb202fa4280f0
 
 PKG_MAINTAINER:=Jonathan Underwood <jonathan.underwood@gmail.com>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=COPYING
 
-PKG_FIXUP:=autoreconf
-PKG_INSTALL:=1
+CMAKE_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/cmake.mk
 
 define Package/stubby/Default
   TITLE:=stubby
diff --git a/net/stubby/patches/stubby-0.3.0-fix-config-install.patch b/net/stubby/patches/stubby-0.3.0-fix-config-install.patch
new file mode 100644 (file)
index 0000000..c873a50
--- /dev/null
@@ -0,0 +1,35 @@
+--- a/CMakeLists.txt   2020-07-01 22:17:14.424445933 +0100
++++ b/CMakeLists.txt   2020-07-01 22:17:57.032637638 +0100
+@@ -115,14 +115,26 @@
+ # Ensure the file gets CRLF line endings on Windows.
+ file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/stubby.yml INPUT ${CMAKE_CURRENT_SOURCE_DIR}/stubby.yml.example)
+-# Copy to destination iff no destination file exists.
++
++# Copy stubby.yml to destination iff no destination file exists.
++# This is complicated by (a) not being able to use generators, due to
++# CMake minimum version requirement, and (b) to account for DESTDIR.
++# And in the latter case, if we're adding DESTDIR to the start of the
++# path, we must on Windows remove any initial drive letter. That's what
++# INSTALL appears to do.
+ install(CODE "\
+-  set(targetdir ${STUBBYCONFDIR})\n\
+-  if (\$ENV{DESTDIR})\n\
+-    set(targetdir \$ENV{DESTDIR}/\${targetdir})\n\
++  set(targetdir \"${STUBBYCONFDIR}\")\n\
++  set(destdir \"\$ENV{DESTDIR}\")\n\
++  if (destdir)\n\
++    string(REGEX REPLACE \"^([A-Z]:)?/(.*)\" \"\\\\2\" newtarget \"\${targetdir}\")\n\
++    if (newtarget)\n\
++      set(targetdir \"\${newtarget}\")\n\
++    endif ()\n\
++    set(targetdir \"\${destdir}/\${newtarget}\")\n\
+   endif ()\n\
+-  if (NOT EXISTS \${targetdir}/stubby.yml)\n\
+-    file(COPY ${CMAKE_CURRENT_BINARY_DIR}/stubby.yml DESTINATION \${targetdir})\n\
++  if (NOT EXISTS \"\${targetdir}/stubby.yml\")\n\
++    file(COPY \"${CMAKE_CURRENT_BINARY_DIR}/stubby.yml\" DESTINATION \"\${targetdir}\")\n\
++    message(\"-- Installing: \${targetdir}/stubby.yml\")\n\
+   endif ()")
+ if (APPLE)
git clone https://git.99rst.org/PROJECT