Skip to content

Commit

Permalink
Merge Official Source
Browse files Browse the repository at this point in the history
Signed-off-by: Tianling Shen <[email protected]>
  • Loading branch information
1715173329 committed Sep 23, 2023
2 parents cf68e6b + e55b418 commit 2b18067
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 76 deletions.
3 changes: 1 addition & 2 deletions lang/node-ffi-napi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DEPENDS:=node/host
PKG_BUILD_PARALLEL:=1
PKG_BUILD_FLAGS:=no-mips16
PKG_LIBFFI_VERSION:=3.4.2

include $(INCLUDE_DIR)/package.mk

Expand All @@ -45,7 +44,7 @@ NODEJS_CPU:=$(subst powerpc,ppc,$(subst aarch64,arm64,$(subst x86_64,x64,$(subst
TMPNPM:=$(shell mktemp -u XXXXXXXXXX)
NPM_CACHE_DIR:=$(if $(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(call qstrip,$(CONFIG_NODEJS_NPM_CACHE_DIR)),$(TMP_DIR))

TARGET_CFLAGS+=$(FPIC) -I$(BUILD_DIR)/libffi-$(PKG_LIBFFI_VERSION)/$(GNU_TARGET_NAME)-gnu -I$(BUILD_DIR)/libffi-$(PKG_LIBFFI_VERSION)/$(GNU_TARGET_NAME)-$(TARGET_SUFFIX)
TARGET_CFLAGS+=$(FPIC)
TARGET_CPPFLAGS+=$(FPIC)

define Build/Compile
Expand Down
14 changes: 7 additions & 7 deletions lang/rust/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
# Copyright (C) 2023 Luca Barbato and Donald Hoskins

include $(TOPDIR)/rules.mk
include ./rust-values.mk

PKG_NAME:=rust
PKG_VERSION:=1.71.1
PKG_RELEASE:=1
PKG_VERSION:=1.72.0
PKG_RELEASE:=2

PKG_SOURCE:=rustc-$(PKG_VERSION)-src.tar.gz
PKG_SOURCE_URL:=https://static.rust-lang.org/dist/
PKG_HASH:=6fa90d50d1d529a75f6cc349784de57d7ec0ba2419b09bde7d335c25bd4e472e
HOST_BUILD_DIR:=$(BUILD_DIR)/host/rust-$(RUSTC_TARGET_ARCH)/rustc-$(PKG_VERSION)-src
PKG_HASH:=ea9d61bbb51d76b6ea681156f69f0e0596b59722f04414b01c6e100b4b5be3a1
HOST_BUILD_DIR:=$(BUILD_DIR)/host/rustc-$(PKG_VERSION)-src

PKG_MAINTAINER:=Luca Barbato <[email protected]>
PKG_LICENSE:=Apache-2.0 MIT
Expand All @@ -23,6 +22,7 @@ PKG_HOST_ONLY:=1

include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
include ./rust-values.mk

define Package/rust
SECTION:=lang
Expand All @@ -31,6 +31,7 @@ define Package/rust
TITLE:=Rust Programming Language Compiler
URL:=https://www.rust-lang.org/
DEPENDS:=$(RUST_ARCH_DEPENDS)
BUILDONLY:=1
endef

define Package/rust/description
Expand Down Expand Up @@ -95,8 +96,7 @@ define Host/Install
\
sed -e 's|@RUSTC_TARGET_ARCH@|$(RUSTC_TARGET_ARCH)|g' \
-e 's|@TARGET_CC_NOCACHE@|$(TARGET_CC_NOCACHE)|g' \
-e 's|@RUSTC_LDFLAGS@|$(RUSTC_LDFLAGS)|g' \
$(CURDIR)/files/cargo-config > $(CARGO_HOME)/config ; \
$(CURDIR)/files/cargo-config > $(CARGO_HOME)/config.toml ; \
)
endef

Expand Down
1 change: 0 additions & 1 deletion lang/rust/files/cargo-config
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[target.@RUSTC_TARGET_ARCH@]
linker = "@TARGET_CC_NOCACHE@"
rustflags = ["-Ctarget-feature=-crt-static", "-Clink-args=@RUSTC_LDFLAGS@"]

[profile.stripped]
inherits = "release"
Expand Down
6 changes: 3 additions & 3 deletions lang/rust/patches/0001-Update-xz2-and-use-it-static.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Subject: [PATCH] Update xz2 and use it static

--- a/src/bootstrap/Cargo.lock
+++ b/src/bootstrap/Cargo.lock
@@ -443,9 +443,9 @@ dependencies = [
@@ -430,9 +430,9 @@ dependencies = [

[[package]]
name = "lzma-sys"
Expand All @@ -23,7 +23,7 @@ Subject: [PATCH] Update xz2 and use it static
dependencies = [
"cc",
"libc",
@@ -912,9 +912,9 @@ dependencies = [
@@ -899,9 +899,9 @@ dependencies = [

[[package]]
name = "xz2"
Expand All @@ -37,7 +37,7 @@ Subject: [PATCH] Update xz2 and use it static
]
--- a/src/bootstrap/Cargo.toml
+++ b/src/bootstrap/Cargo.toml
@@ -50,7 +50,7 @@ toml = "0.5"
@@ -49,7 +49,7 @@ toml = "0.5"
ignore = "0.4.10"
opener = "0.5"
once_cell = "1.7.2"
Expand Down
35 changes: 0 additions & 35 deletions lang/rust/patches/0002-Bumped-libc-version.patch

This file was deleted.

3 changes: 2 additions & 1 deletion lang/rust/rust-package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ define Build/Compile/Cargo
cd $(PKG_BUILD_DIR) ; \
export PATH="$(CARGO_HOME)/bin:$(PATH)" ; \
CARGO_HOME=$(CARGO_HOME) \
TARGET_CFLAGS="$(TARGET_CFLAGS) $(RUST_CFLAGS)" \
TARGET_CFLAGS="$(TARGET_CFLAGS) $(RUSTC_CFLAGS)" \
TARGET_CC=$(TARGET_CC_NOCACHE) \
CC=$(HOSTCC_NOCACHE) \
RUSTFLAGS="$(CARGO_RUSTFLAGS)" \
$(CARGO_VARS) \
cargo install -v \
--profile stripped \
Expand Down
28 changes: 15 additions & 13 deletions lang/rust/rust-values.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,26 @@
# Copyright (C) 2023 Luca Barbato and Donald Hoskins

# Rust Environmental Vars
CONFIG_HOST_SUFFIX:=$(word 4, $(subst -, ,$(GNU_HOST_NAME)))
RUSTC_HOST_ARCH:=$(HOST_ARCH)-unknown-linux-$(CONFIG_HOST_SUFFIX)
RUSTC_HOST_SUFFIX:=$(word 4, $(subst -, ,$(GNU_HOST_NAME)))
RUSTC_HOST_ARCH:=$(HOST_ARCH)-unknown-linux-$(RUSTC_HOST_SUFFIX)
CARGO_HOME:=$(STAGING_DIR)/host/cargo
CARGO_VARS:=
CARGO_VARS?=

ifeq ($(CONFIG_USE_MUSL),y)
# Force linking of the SSP library for musl
ifdef CONFIG_PKG_CC_STACKPROTECTOR_REGULAR
ifeq ($(strip $(PKG_SSP)),1)
RUSTC_LDFLAGS += -lssp_nonshared
# Force linking of the SSP library for musl
ifdef CONFIG_PKG_CC_STACKPROTECTOR_REGULAR
ifeq ($(strip $(PKG_SSP)),1)
RUSTC_LDFLAGS+=-lssp_nonshared
endif
endif
endif
ifdef CONFIG_PKG_CC_STACKPROTECTOR_STRONG
ifeq ($(strip $(PKG_SSP)),1)
TARGET_CFLAGS += -lssp_nonshared
ifdef CONFIG_PKG_CC_STACKPROTECTOR_STRONG
ifeq ($(strip $(PKG_SSP)),1)
RUSTC_LDFLAGS+=-lssp_nonshared
endif
endif
endif
endif

CARGO_RUSTFLAGS+=-Ctarget-feature=-crt-static $(RUSTC_LDFLAGS)

ifeq ($(HOST_OS),Darwin)
ifeq ($(HOST_ARCH),arm64)
Expand Down Expand Up @@ -55,7 +57,7 @@ ifeq ($(ARCH),arm)
endif

ifeq ($(ARCH),aarch64)
RUST_CFLAGS:=-mno-outline-atomics
RUSTC_CFLAGS:=-mno-outline-atomics
endif

# Support only a subset for now.
Expand Down
4 changes: 2 additions & 2 deletions libs/czmq/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=czmq
PKG_VERSION:=4.2.1
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/zeromq/czmq/releases/download/v$(PKG_VERSION)/
Expand All @@ -30,7 +30,7 @@ define Package/czmq
TITLE:=CZMQ High-level C binding for ZeroMQ
URL:=http://czmq.zeromq.org
ABI_VERSION:=4
DEPENDS:=+libzmq +libuuid +libpcre +libmicrohttpd +liblz4 +libcurl
DEPENDS:=+libzmq +libuuid +libmicrohttpd +liblz4 +libcurl
endef

define Package/czmq/description
Expand Down
4 changes: 2 additions & 2 deletions libs/libuecc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PKG_RELEASE:=2

PKG_MAINTAINER:=Matthias Schiffer <[email protected]>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/NeoRaider/libuecc/releases/download/v$(PKG_VERSION)
PKG_SOURCE_URL:=https://github.com/neocturne/libuecc/releases/download/v$(PKG_VERSION)
PKG_HASH:=b94aef08eab5359d0facaa7ead2ce81b193eef0c61379d9835213ebc0a46257a

PKG_LICENSE:=BSD-2-Clause
Expand All @@ -26,7 +26,7 @@ define Package/libuecc
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Very small Elliptic Curve Cryptography library
URL:=https://github.com/NeoRaider/libuecc/
URL:=https://github.com/neocturne/libuecc/
endef

TARGET_CFLAGS += -ffunction-sections -fdata-sections
Expand Down
4 changes: 2 additions & 2 deletions mail/msmtp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=msmtp
PKG_VERSION:=1.8.19
PKG_VERSION:=1.8.24
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://marlam.de/msmtp/releases
PKG_HASH:=34a1e1981176874dbe4ee66ee0d9103c90989aa4dcdc4861e4de05ce7e44526b
PKG_HASH:=bd6644b1aaab17d61b86647993e3efad860b23c54283b00ddc579c1f5110aa59

PKG_MAINTAINER:=
PKG_LICENSE:=GPL-3.0-or-later
Expand Down
4 changes: 2 additions & 2 deletions net/fastd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ PKG_RELEASE=3

PKG_MAINTAINER:=Matthias Schiffer <[email protected]>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://github.com/NeoRaider/fastd/releases/download/v$(PKG_VERSION)
PKG_SOURCE_URL:=https://github.com/neocturne/fastd/releases/download/v$(PKG_VERSION)
PKG_HASH:=19750b88705d66811b7c21b672537909c19ae6b21350688cbd1a3a54d08a8951

PKG_LICENSE:=BSD-2-Clause LGPL-2.1-or-later
Expand Down Expand Up @@ -53,7 +53,7 @@ define Package/fastd
CATEGORY:=Network
DEPENDS:=+kmod-tun +libpthread +libuecc +FASTD_WITH_STATUS_SOCKET:libjson-c +FASTD_WITH_CAPABILITIES:libcap
TITLE:=Fast and Secure Tunneling Daemon
URL:=https://github.com/NeoRaider/fastd/
URL:=https://github.com/neocturne/fastd/
SUBMENU:=VPN
endef

Expand Down
4 changes: 2 additions & 2 deletions utils/mg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=mg
PKG_VERSION:=7.3
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/ibara/mg/tar.gz/$(PKG_NAME)-$(PKG_VERSION)?
Expand All @@ -22,7 +22,7 @@ include $(INCLUDE_DIR)/package.mk
define Package/mg
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libncurses +libpcre
DEPENDS:=+libncurses +libpcre2
TITLE:=microscopic EMACS style editor
URL:=https://github.com/ibara/mg
SUBMENU:=Editors
Expand Down
2 changes: 1 addition & 1 deletion utils/mg/patches/001-cross_compile_openwrt.patch
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
- ;;
-esac
+# OpenWrt
+libs='-lncurses -lpcreposix -lutil'
+libs='-lncurses -lpcre2-posix -lutil'
+cflags="$cflags -D_GNU_SOURCE -D__dead=\"__attribute__((__noreturn__))\" -Dst_mtimespec=st_mtim"

cat << EOF > config.h
Expand Down
2 changes: 1 addition & 1 deletion utils/mg/patches/901-use_pcre.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <sys/queue.h>
#include <sys/types.h>
-#include <regex.h>
+#include <pcreposix.h>
+#include <pcre2posix.h>
#include <signal.h>
#include <stdio.h>
#include <string.h>
4 changes: 2 additions & 2 deletions utils/setools/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=setools
PKG_VERSION:=4.4.2
PKG_VERSION:=4.4.3
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://github.com/SELinuxProject/setools/releases/download/$(PKG_VERSION)
PKG_HASH:=f23e3c8635aa289096ca0218ca6f4568a4346e088bc46f374cb0917b7fb66f05
PKG_HASH:=2f751599dbed0d628fb268a3302dd8c578829f302bd28e8c08e182aef7fd5cb8

PKG_BUILD_DEPENDS:=python-cython/host # Cython>=0.27

Expand Down

0 comments on commit 2b18067

Please sign in to comment.