mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-27 20:40:34 -09:00
package/zstd: rework build and install
Create libzstd.pc in the build step instead of triggering a lazy build during installation when it is missing. Move PREFIX=/usr to ZSTD_OPTS. It is needed for building libzstd.pc during the build step; for consistency, make sure it's available in all steps. Attach '-release' to the targets, since the default is to build lib-release and zstd-release. Its only effect is to clear DEBUGFLAGS (which are just warning flags). Signed-off-by: Norbert Lange <nolange79@gmail.com> [Arnout: add check-package disable] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
committed by
Arnout Vandecappelle (Essensium/Mind)
parent
60f7c478e4
commit
0f0e913f10
@@ -12,6 +12,7 @@ ZSTD_LICENSE_FILES = LICENSE COPYING
|
|||||||
ZSTD_CPE_ID_VENDOR = facebook
|
ZSTD_CPE_ID_VENDOR = facebook
|
||||||
ZSTD_CPE_ID_PRODUCT = zstandard
|
ZSTD_CPE_ID_PRODUCT = zstandard
|
||||||
|
|
||||||
|
ZSTD_OPTS += PREFIX=/usr
|
||||||
ZSTD_OPTS += ZSTD_LEGACY_SUPPORT=0
|
ZSTD_OPTS += ZSTD_LEGACY_SUPPORT=0
|
||||||
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
||||||
ZSTD_DEPENDENCIES += zlib
|
ZSTD_DEPENDENCIES += zlib
|
||||||
@@ -60,12 +61,14 @@ else
|
|||||||
ZSTD_OPTS += HAVE_THREAD=0
|
ZSTD_OPTS += HAVE_THREAD=0
|
||||||
ZSTD_BUILD_LIBS := $(addsuffix -nomt,$(ZSTD_BUILD_LIBS))
|
ZSTD_BUILD_LIBS := $(addsuffix -nomt,$(ZSTD_BUILD_LIBS))
|
||||||
endif
|
endif
|
||||||
|
# check-package disable OverriddenVariable - override intended
|
||||||
|
ZSTD_BUILD_LIBS := $(addsuffix -release,$(ZSTD_BUILD_LIBS))
|
||||||
|
|
||||||
define ZSTD_BUILD_CMDS
|
define ZSTD_BUILD_CMDS
|
||||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
|
||||||
-C $(@D)/lib $(ZSTD_BUILD_LIBS)
|
-C $(@D)/lib $(ZSTD_BUILD_LIBS) libzstd.pc
|
||||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
|
||||||
-C $(@D) zstd
|
-C $(@D) zstd-release
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define ZSTD_INSTALL_STAGING_CMDS
|
define ZSTD_INSTALL_STAGING_CMDS
|
||||||
@@ -76,9 +79,9 @@ endef
|
|||||||
|
|
||||||
define ZSTD_INSTALL_TARGET_CMDS
|
define ZSTD_INSTALL_TARGET_CMDS
|
||||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
|
||||||
DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/programs install
|
DESTDIR=$(TARGET_DIR) -C $(@D)/programs install
|
||||||
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) $(ZSTD_OPTS) \
|
||||||
DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D)/lib $(ZSTD_INSTALL_LIBS)
|
DESTDIR=$(TARGET_DIR) -C $(@D)/lib $(ZSTD_INSTALL_LIBS)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
HOST_ZSTD_OPTS += PREFIX=$(HOST_DIR)
|
HOST_ZSTD_OPTS += PREFIX=$(HOST_DIR)
|
||||||
|
|||||||
Reference in New Issue
Block a user