changeset 6340:720a837ff693 release

add libmodbus * src/libmodbus.mk: new file * dist-files.mk, index.html: add ref to new file (grafted from 502fc27d1aacc71dfa403399d08da556d1f9be93)
author John Donoghue <john.donoghue@ieee.org>
date Thu, 30 Jun 2022 15:15:27 -0400
parents 7526630d3e39
children 42c17e88428a
files dist-files.mk index.html src/libmodbus.mk
diffstat 3 files changed, 33 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/dist-files.mk	Thu Jul 21 14:40:46 2022 -0400
+++ b/dist-files.mk	Thu Jun 30 15:15:27 2022 -0400
@@ -281,6 +281,7 @@
   libmikmod-test.c \
   libmikmod.mk \
   libmng.mk \
+  libmodbus.mk \
   libmodplug-test.c \
   libmodplug.mk \
   libmpcdec-1-configure_ac.patch \
--- a/index.html	Thu Jul 21 14:40:46 2022 -0400
+++ b/index.html	Thu Jun 30 15:15:27 2022 -0400
@@ -1650,6 +1650,10 @@
         <td class="website"><a href="www.musepack.net/index.php">libmpcdec</a></td>
     </tr>
     <tr>
+        <td class="package">libmodbus</td>
+        <td class="website"><a href="https://libmodbus.org/">libmodbus</a></td>
+    </tr>
+    <tr>
         <td class="package">libmodplug</td>
         <td class="website"><a href="http://modplug-xmms.sourceforge.net/">libmodplug</a></td>
     </tr>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/libmodbus.mk	Thu Jun 30 15:15:27 2022 -0400
@@ -0,0 +1,28 @@
+PKG             := libmodbus
+$(PKG)_IGNORE   :=
+$(PKG)_VERSION  := 3.1.7
+$(PKG)_CHECKSUM := 71d0aa223f21ddfacc8a2461f2e3e0c77e128efb
+$(PKG)_SUBDIR   := $(PKG)-$($(PKG)_VERSION)
+$(PKG)_FILE     := $($(PKG)_SUBDIR).tar.gz
+$(PKG)_URL      := https://libmodbus.org/releases/$($(PKG)_FILE)
+$(PKG)_DEPS     :=
+
+define $(PKG)_UPDATE
+    $(WGET) -q -O- 'https://github.com/stephane/libmodbus/tags' | \
+    $(SED) -n 's|.*releases/tag/v\([^"]*\).*|\1|p' | $(SORT) -V | \
+    tail -1
+endef
+
+define $(PKG)_BUILD
+  cd '$(1)' && ./configure \
+      $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \
+      $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
+      $(ENABLE_SHARED_OR_STATIC) \
+      --without-debug \
+      --prefix='$(HOST_PREFIX)' \
+      && $(CONFIGURE_POST_HOOK)
+ 
+    $(MAKE) -C '$(1)' -j '$(JOBS)' $(MXE_DISABLE_DOCS) $(MXE_DISABLE_PROGS)
+    $(MAKE) -C '$(1)' -j 1 install  $(MXE_DISABLE_DOCS) $(MXE_DISABLE_PROGS) DESTDIR='$(3)'
+endef
+