Files
buildroot/package/musl-compat-headers/musl-compat-headers.mk
Thomas Petazzoni ebcccdfbd6 package/musl-compat-headers: fix download of queue.h
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/queue.h?rev=1.70 now
returns some HTML soup instead of the plain text version of the file,
causing the hash check to fail.

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/queue.h?rev=1.70;content-type=text%2Fplain
returns the correct data, but the ";" in the URL causes some issues
with the parsing logic in Buildroot.

So let's switch to
https://raw.githubusercontent.com/NetBSD/src/03be82a6b173b3c62116b7a186067fed3004dd44/sys/sys/queue.h
which delivers exactly the same file, but hopefully will be more
stable. The file name changed to just queue.h, but the contents is the
same.

Fixes:

  http://autobuild.buildroot.net/results/57c8078f382f74859076512425b2f1c52f44e95a/
  https://gitlab.com/buildroot.org/buildroot/-/jobs/8199992850 (and many other similar cases)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
2024-10-30 20:45:29 +01:00

35 lines
1.2 KiB
Makefile

################################################################################
#
# musl-compat-headers
#
################################################################################
# No main site, just using extra downloads
MUSL_COMPAT_HEADERS_QUEUE_H = https://raw.githubusercontent.com/NetBSD/src/03be82a6b173b3c62116b7a186067fed3004dd44/sys/sys/queue.h
MUSL_COMPAT_HEADERS_EXTRA_DOWNLOADS = $(MUSL_COMPAT_HEADERS_QUEUE_H)
MUSL_COMPAT_HEADERS_LICENSE = BSD-3-Clause, Public Domain or CC0
MUSL_COMPAT_HEADERS_LICENSE_FILES = queue.h cdefs.h
MUSL_COMPAT_HEADERS_ADD_TOOLCHAIN_DEPENDENCY = NO
# Only installs headers
MUSL_COMPAT_HEADERS_INSTALL_TARGET = NO
MUSL_COMPAT_HEADERS_INSTALL_STAGING = YES
# Copying both headers so legal-info finds them (they are _LICENSE_FILES)
define MUSL_COMPAT_HEADERS_EXTRACT_CMDS
$(INSTALL) -m 0644 -D $(MUSL_COMPAT_HEADERS_DL_DIR)/$(notdir $(MUSL_COMPAT_HEADERS_QUEUE_H)) $(@D)/queue.h
$(INSTALL) -m 0644 -D $(MUSL_COMPAT_HEADERS_PKGDIR)/cdefs.h $(@D)/cdefs.h
endef
define MUSL_COMPAT_HEADERS_INSTALL_STAGING_CMDS
$(INSTALL) -D -m 0644 $(@D)/queue.h \
$(STAGING_DIR)/usr/include/sys/queue.h
$(INSTALL) -D -m 0644 $(@D)/cdefs.h \
$(STAGING_DIR)/usr/include/sys/cdefs.h
endef
$(eval $(generic-package))