Files
rpi-buildroot/package/liblinear/liblinear.mk
Julien Olivain 8b18c67f26 package/liblinear: fix _SITE url
The package _SITE url only contains the latest version at a given point
in time. When a new version is published, it is replacing the old one.

This issue was not detected because the archive was downloaded from the
sources.buildroot.org backup mirror, when the primary source became
unavailable.

Since commit 559bb33ae "support/testing: do not use s.b.o" [1], the
runtime test infrastructure is disabling this backup mirror. This
makes the nmap runtime test failing [2], which is using liblinear as
a dependency.

The liblinear package author confirmed in a private email that all the
releases, including the latest version, are all kept in the "oldfiles"
directory.

This commit fixes this download issue by updating the _SITE url to that
location. While at it, this commit also change the url to use https
(since the http equivalent redirects to https).

Fixes:
- [2]

[1] 559bb33ae7
[2] https://gitlab.com/buildroot.org/buildroot/-/jobs/7948008007

Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-10-26 15:22:26 +02:00

47 lines
1.4 KiB
Makefile

################################################################################
#
# liblinear
#
################################################################################
LIBLINEAR_VERSION = 2.45
LIBLINEAR_SITE = https://www.csie.ntu.edu.tw/~cjlin/liblinear/oldfiles
LIBLINEAR_LICENSE = BSD-3-Clause
LIBLINEAR_LICENSE_FILES = COPYRIGHT
LIBLINEAR_INSTALL_STAGING = YES
LIBLINEAR_CFLAGS = $(TARGET_CFLAGS)
ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
# $1: destination directory
define LIBLINEAR_INSTALL_SHARED
$(INSTALL) -m 0644 -D $(@D)/liblinear.so.5 $(1)/usr/lib/liblinear.so.5
ln -sf liblinear.so.5 $(1)/usr/lib/liblinear.so
endef
LIBLINEAR_CFLAGS += -fPIC
endif
ifeq ($(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),y)
# $1: destination directory
define LIBLINEAR_INSTALL_STATIC
$(INSTALL) -m 0644 -D $(@D)/liblinear.a $(1)/usr/lib/liblinear.a
endef
endif
define LIBLINEAR_BUILD_CMDS
$(MAKE) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(LIBLINEAR_CFLAGS)" -C $(@D) \
$(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),lib) \
$(if $(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),static-lib)
endef
define LIBLINEAR_INSTALL_STAGING_CMDS
$(INSTALL) -m 0644 -D $(@D)/linear.h $(STAGING_DIR)/usr/include/linear.h
$(call LIBLINEAR_INSTALL_SHARED,$(STAGING_DIR))
$(call LIBLINEAR_INSTALL_STATIC,$(STAGING_DIR))
endef
define LIBLINEAR_INSTALL_TARGET_CMDS
$(call LIBLINEAR_INSTALL_SHARED,$(TARGET_DIR))
endef
$(eval $(generic-package))