mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-30 12:15:13 +08:00
🎈 Sync 2026-03-06 10:53:39
This commit is contained in:
1 parent
5a716c7cfd
commit
fd01f0a4b8
2 files changed
-70
No files matched your search
@@ -1,65 +0,0 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=quickjs
|
|
||||||
PKG_VERSION:=2025.09.13
|
|
||||||
# The source versioning structure is somewhat bizarre as the file name
|
|
||||||
# might differ from the directory name and the version.
|
|
||||||
PKG_SRC_VERSION:=2025-09-13
|
|
||||||
PKG_SRC_VERSION_REV:=2
|
|
||||||
PKG_RELEASE:=1
|
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SRC_VERSION)$(if $(PKG_SRC_VERSION_REV),-$(PKG_SRC_VERSION_REV)).tar.xz
|
|
||||||
PKG_SOURCE_URL:=https://bellard.org/quickjs/
|
|
||||||
PKG_HASH:=skip
|
|
||||||
|
|
||||||
PKG_MAINTAINER:=George Sapkin <george@sapk.in>
|
|
||||||
PKG_LICENSE:=MIT
|
|
||||||
PKG_LICENSE_FILES:=LICENSE
|
|
||||||
PKG_CPE_ID:=cpe:/a:quickjs_project:quickjs
|
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SRC_VERSION)
|
|
||||||
PKG_BUILD_PARALLEL:=1
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
# quickjs uses the same flags both for host and target compiler, so we need
|
|
||||||
# to separate these and build host and target parts separately.
|
|
||||||
HOST_MAKE_FLAGS := \
|
|
||||||
$(MAKE_FLAGS) \
|
|
||||||
CC="$(HOSTCC_NOCACHE)" \
|
|
||||||
CFLAGS="$(HOST_CFLAGS) -D_GNU_SOURCE -DCONFIG_VERSION=\\\"$(PKG_SRC_VERSION)\\\"" \
|
|
||||||
CROSS_PREFIX="$(TARGET_CROSS)"
|
|
||||||
|
|
||||||
TARGET_MAKE_FLAGS := \
|
|
||||||
$(MAKE_FLAGS) \
|
|
||||||
CC="$(TARGET_CC)" \
|
|
||||||
CFLAGS_OPT="$(TARGET_CFLAGS) -D_GNU_SOURCE -DCONFIG_VERSION=\\\"$(PKG_SRC_VERSION)\\\"" \
|
|
||||||
EXTRA_LIBS="-latomic" \
|
|
||||||
QJSC=./host-qjsc
|
|
||||||
|
|
||||||
define Package/quickjs
|
|
||||||
SECTION:=lang
|
|
||||||
CATEGORY:=Languages
|
|
||||||
TITLE:=QuickJS JavaScript engine
|
|
||||||
URL:=https://bellard.org/quickjs
|
|
||||||
DEPENDS:=+libatomic
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/quickjs/description
|
|
||||||
QuickJS is a small and embeddable JavaScript engine. It supports the
|
|
||||||
ES2023 specification including modules, asynchronous generators, proxies
|
|
||||||
and BigInt.
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/Compile
|
|
||||||
$(INSTALL_DIR) $(PKG_BUILD_DIR)/.obj
|
|
||||||
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(HOST_MAKE_FLAGS) host-qjsc
|
|
||||||
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) $(TARGET_MAKE_FLAGS) qjs
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/quickjs/install
|
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/qjs $(1)/usr/bin
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,quickjs))
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = 'quickjs' ]; then
|
|
||||||
qjs --help | grep -F "${PKG_VERSION//./-}"
|
|
||||||
fi
|
|
||||||
Reference in new issue
Block a user