e31eb72040
musl provides neither sys/queue.h nor sys/cdefs.h. Those two headers are however quite widely used in a lot of packages (though they should at least not use cdefs.h which is only full of mostly-legacy macros, and which is mostly an internal header of glibc and was never really meant to be exposed to, and used by packages). But we don't live in an ideal world, so a lot of packages break when those two headers are missing. We already took care of sys/queue.h with the netbsd-queue package. But the need for cdefs.h is getting more and more pressing. We rename the netbsd-queue package into musl-compat-headers, and we make it install sys/queue.h (from NetBSD) and sys/cdefs.h (a minimalist one we bundle in Buildroot). We can't use the cdefs.h from NetBSD because it includes machine-dependent headers; instead we bundle a very minimalistic one, that covers only what we need. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Baruch Siach <baruch@tkos.co.il> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
35 lines
1.2 KiB
Makefile
35 lines
1.2 KiB
Makefile
################################################################################
|
|
#
|
|
# musl-compat-headers
|
|
#
|
|
################################################################################
|
|
|
|
# No main site, just using extra downloads
|
|
MUSL_COMPAT_HEADERS_QUEUE_H = http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/queue.h?rev=1.70
|
|
|
|
MUSL_COMPAT_HEADERS_EXTRA_DOWNLOADS = $(MUSL_COMPAT_HEADERS_QUEUE_H)
|
|
|
|
MUSL_COMPAT_HEADERS_LICENSE = BSD-3c, 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 $(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))
|