Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/openlayers: bump to version 7.0.0
@ 2022-08-25 15:12 Thomas Claveirole
  2022-08-27  9:36 ` Yann E. MORIN
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Claveirole @ 2022-08-25 15:12 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Claveirole

Do not rely on the "dist" archive anymore (or the "legacy" archive as
OpenLayers calls it now).  Build the JavaScript directly from the
source archive instead, using host-nodejs.

Note that the v6.14.1-dist.zip archive for the previous version did
change, hence the hash for previous version is broken.  See
https://github.com/openlayers/openlayers/issues/14053 for details.

Signed-off-by: Thomas Claveirole <thomas.claveirole@green-communications.fr>
---
 package/openlayers/Config.in       |  5 +++++
 package/openlayers/openlayers.hash |  3 ++-
 package/openlayers/openlayers.mk   | 27 ++++++++++++++++-----------
 3 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/package/openlayers/Config.in b/package/openlayers/Config.in
index a7b7f334cf..55ce17ecb7 100644
--- a/package/openlayers/Config.in
+++ b/package/openlayers/Config.in
@@ -1,5 +1,10 @@
 config BR2_PACKAGE_OPENLAYERS
 	bool "openlayers"
+
+	depends on BR2_PACKAGE_HOST_QEMU_USER_ARCH_SUPPORTS # host-nodejs
+	depends on BR2_HOST_GCC_AT_LEAST_8 # host-nodejs
+	select BR2_PACKAGE_HOST_NODEJS
+
 	help
 	  OpenLayers makes it easy to put a dynamic map in any web
 	  page. It can display map tiles, vector data and markers
diff --git a/package/openlayers/openlayers.hash b/package/openlayers/openlayers.hash
index 1c93b9a729..e1fa859e14 100644
--- a/package/openlayers/openlayers.hash
+++ b/package/openlayers/openlayers.hash
@@ -1,2 +1,3 @@
 # Locally computed:
-sha256  8a9fda6e392688c049ebb88fb2c73b5788b4965b625443de4cca7d4688b1fb82  v6.14.1-dist.zip
+sha256  290568a9f1243fbbf21a1140f1763399a4126cd3e6c308892507c2d5fc9601e7  openlayers-7.0.0.tar.gz
+sha256  6c4347b83a8c9feef18d57b18e3b6c44cf901b3c344a4a1fbd837e421555ab8e  LICENSE.md
diff --git a/package/openlayers/openlayers.mk b/package/openlayers/openlayers.mk
index 4626e7545a..08a58cd796 100644
--- a/package/openlayers/openlayers.mk
+++ b/package/openlayers/openlayers.mk
@@ -4,21 +4,26 @@
 #
 ################################################################################
 
-OPENLAYERS_VERSION = 6.14.1
-OPENLAYERS_SOURCE = v$(OPENLAYERS_VERSION)-dist.zip
-OPENLAYERS_SITE = https://github.com/openlayers/openlayers/releases/download/v$(OPENLAYERS_VERSION)
-OPENLAYERS_LICENSE = BSD-2-Clause
-# There's no separate license file in the archive, only minified files.
+OPENLAYERS_VERSION = 7.0.0
+OPENLAYERS_SITE = $(call github,openlayers,openlayers,v$(OPENLAYERS_VERSION))
 
-define OPENLAYERS_EXTRACT_CMDS
-	unzip $(OPENLAYERS_DL_DIR)/$(OPENLAYERS_SOURCE) -d $(@D)
-	mv $(@D)/v$(OPENLAYERS_VERSION)-dist/* $(@D)
-	rmdir $(@D)/v$(OPENLAYERS_VERSION)-dist/
+# OpenLayers itself is BSD-2-Clause, but not all of the dependencies
+# it brings in are.  See $(@D)/build/legacy/*.LICENSE.txt after build
+# for details.
+OPENLAYERS_LICENSE = BSD-2-Clause, BSD-3-Clause (ieee754), Apache-2.0
+OPENLAYERS_LICENSE_FILES = LICENSE.md
+
+OPENLAYERS_DEPENDENCIES = host-nodejs
+
+define OPENLAYERS_BUILD_CMDS
+	cd $(@D) && $(NPM) install && $(NPM) run build-legacy
 endef
 
 define OPENLAYERS_INSTALL_TARGET_CMDS
-	$(INSTALL) -D -m 0644 $(@D)/ol.css $(TARGET_DIR)/var/www/ol.css
-	$(INSTALL) -D -m 0644 $(@D)/ol.js $(TARGET_DIR)/var/www/ol.js
+	$(INSTALL) -D -m 0644 \
+		$(@D)/build/legacy/ol.js $(TARGET_DIR)/var/www/ol.js
+	$(INSTALL) -D -m 0644 \
+		$(@D)/build/legacy/ol.css $(TARGET_DIR)/var/www/ol.css
 endef
 
 $(eval $(generic-package))
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-06 15:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-25 15:12 [Buildroot] [PATCH 1/1] package/openlayers: bump to version 7.0.0 Thomas Claveirole
2022-08-27  9:36 ` Yann E. MORIN
2022-09-01 13:51   ` Thomas Claveirole
2022-09-01 15:56     ` [Buildroot] [PATCH v2 1/1] package/openlayers: bump to version 7.1.0 Thomas Claveirole
2022-09-06 15:05       ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox