Files
buildroot/package/sqlite/sqlite.mk
Yann E. MORIN 296744b0f4 Revert "package/sqlite: bump version to 3.49.0"
sqlite 3.49.0 has changed its buildsystem, causing a lot of breakage
along the lines.

Although a few fixes have already been applied (and reverted in the
previous commits), there are remaining pain-points that are not trivial
to fix in a timely manner :

  - the buildsystem forces an rpath to /usr/lib, and it is not obvious
    how to prevent that (excepyt with patching),

  - there is an optional dependency to zlib that is not accounted for,
    neither in the target nor in the host variants; this causes issues
    when the build host has libz-devel (or similar) already installed,
    in whicxh case sqlite detets it and links with it; as it is missing
    an rpath to $(HOST_DIR)/lib, this causesw a build failure when
    another package pulls in zlib. See:
    https://autobuild.buildroot.org/results/1a81cb7c88a41a03767a1a201ee0628468f60766/build-end.log
    https://lore.kernel.org/buildroot/20250219195112.GA2631528@pevik/T/#mb7c7ac63902ed55623a5adf5d1db4a3f60db9fef

Fixing the second issue would seem easy enough, but zlib could depend on
ccache (when that is enabled), and ccqche depends on sqlite, so that
would be a circular dependency. And there is no option in sqlite's
configure script to forcefully disable use of zlib...

A revert is the quickest solution to unbreak for the time being, as the
next release is nearing due date. Another bump can be attempted later,
that addresses all the remaining issues.

This reverts commit db85638cea.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Scott Fan <fancp2007@gmail.com>
Cc: Romain Naour <romain.naour@gmail.com>
Cc: Petr Vorel <petr.vorel@gmail.com>
Acked-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-02-20 00:10:49 +01:00

80 lines
2.1 KiB
Makefile

################################################################################
#
# sqlite
#
################################################################################
SQLITE_VERSION = 3.48.0
SQLITE_TAR_VERSION = 3480000
SQLITE_SOURCE = sqlite-autoconf-$(SQLITE_TAR_VERSION).tar.gz
SQLITE_SITE = https://www.sqlite.org/2025
SQLITE_LICENSE = blessing
SQLITE_LICENSE_FILES = tea/license.terms
SQLITE_CPE_ID_VENDOR = sqlite
SQLITE_INSTALL_STAGING = YES
ifeq ($(BR2_PACKAGE_SQLITE_STAT4),y)
SQLITE_CFLAGS += -DSQLITE_ENABLE_STAT4
endif
ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_COLUMN_METADATA),y)
SQLITE_CFLAGS += -DSQLITE_ENABLE_COLUMN_METADATA
endif
ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_FTS3),y)
SQLITE_CFLAGS += -DSQLITE_ENABLE_FTS3
endif
ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_JSON1),y)
SQLITE_CFLAGS += -DSQLITE_ENABLE_JSON1
endif
ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY),y)
SQLITE_CFLAGS += -DSQLITE_ENABLE_UNLOCK_NOTIFY
endif
ifeq ($(BR2_PACKAGE_SQLITE_SECURE_DELETE),y)
SQLITE_CFLAGS += -DSQLITE_SECURE_DELETE
endif
ifeq ($(BR2_PACKAGE_SQLITE_NO_SYNC),y)
SQLITE_CFLAGS += -DSQLITE_NO_SYNC
endif
# Building with Microblaze Gcc 4.9 makes compiling to hang.
# Work around using -O0
ifeq ($(BR2_microblaze):$(BR2_TOOLCHAIN_GCC_AT_LEAST_5),y:)
SQLITE_CFLAGS += $(TARGET_CFLAGS) -O0
else
# fallback to standard -O3 when -Ofast is present to avoid -ffast-math
SQLITE_CFLAGS += $(subst -Ofast,-O3,$(TARGET_CFLAGS))
endif
SQLITE_CONF_ENV = CFLAGS="$(SQLITE_CFLAGS)"
ifeq ($(BR2_STATIC_LIBS),y)
SQLITE_CONF_OPTS += --enable-dynamic-extensions=no
else
SQLITE_CONF_OPTS += --disable-static-shell
endif
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
SQLITE_CONF_OPTS += --enable-threadsafe
else
SQLITE_CONF_OPTS += --disable-threadsafe
SQLITE_CFLAGS += -DSQLITE_THREADSAFE=0
endif
ifeq ($(BR2_PACKAGE_NCURSES)$(BR2_PACKAGE_READLINE),yy)
SQLITE_DEPENDENCIES += ncurses readline
SQLITE_CONF_OPTS += --disable-editline --enable-readline
else ifeq ($(BR2_PACKAGE_LIBEDIT),y)
SQLITE_DEPENDENCIES += libedit
SQLITE_CONF_OPTS += --enable-editline --disable-readline
else
SQLITE_CONF_OPTS += --disable-editline --disable-readline
endif
$(eval $(autotools-package))
$(eval $(host-autotools-package))