mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2025-12-26 13:40:22 +00:00
v2ray: bump to 5.22.0 (#22263)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
--- a/go/pkg/mod/github.com/adrg/xdg@v0.5.0/internal/pathutil/pathutil_unix_test.go
|
||||
+++ b/go/pkg/mod/github.com/adrg/xdg@v0.5.0/internal/pathutil/pathutil_unix_test.go
|
||||
--- a/internal/pathutil/pathutil_unix_test.go
|
||||
+++ b/internal/pathutil/pathutil_unix_test.go
|
||||
@@ -19,7 +19,7 @@
|
||||
require.Equal(t, home, pathutil.UserHomeDir())
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
}
|
||||
|
||||
func TestExpandHome(t *testing.T) {
|
||||
--- a/go/pkg/mod/github.com/adrg/xdg@v0.5.0/internal/pathutil/pathutil_unix.go
|
||||
+++ b/go/pkg/mod/github.com/adrg/xdg@v0.5.0/internal/pathutil/pathutil_unix.go
|
||||
--- a/internal/pathutil/pathutil_unix.go
|
||||
+++ b/internal/pathutil/pathutil_unix.go
|
||||
@@ -16,7 +16,7 @@
|
||||
return home
|
||||
}
|
||||
@@ -20,19 +20,9 @@
|
||||
}
|
||||
|
||||
// Exists returns true if the specified path exists.
|
||||
--- a/go/pkg/mod/github.com/adrg/xdg@v0.5.0/paths_unix.go
|
||||
+++ b/go/pkg/mod/github.com/adrg/xdg@v0.5.0/paths_unix.go
|
||||
@@ -3,9 +3,7 @@
|
||||
package xdg
|
||||
|
||||
import (
|
||||
- "os"
|
||||
"path/filepath"
|
||||
- "strconv"
|
||||
|
||||
"github.com/adrg/xdg/internal/pathutil"
|
||||
"github.com/adrg/xdg/internal/userdirs"
|
||||
@@ -19,27 +18,25 @@
|
||||
--- a/paths_unix.go
|
||||
+++ b/paths_unix.go
|
||||
@@ -19,12 +17,12 @@
|
||||
func initBaseDirs(home string) {
|
||||
// Initialize standard directories.
|
||||
baseDirs.dataHome = pathutil.EnvPath(envDataHome, filepath.Join(home, ".local", "share"))
|
||||
@@ -44,9 +34,11 @@
|
||||
baseDirs.stateHome = pathutil.EnvPath(envStateHome, filepath.Join(home, ".local", "state"))
|
||||
baseDirs.cacheHome = pathutil.EnvPath(envCacheHome, filepath.Join(home, ".cache"))
|
||||
- baseDirs.runtime = pathutil.EnvPath(envRuntimeDir, filepath.Join("/run/user", strconv.Itoa(os.Getuid())))
|
||||
+ baseDirs.runtime = pathutil.EnvPath(envRuntimeDir, filepath.Join("@TERMUX_PREFIX@/var/run"))
|
||||
+ baseDirs.runtime = pathutil.EnvPath(envRuntimeDir, filepath.Join("@TERMUX_PREFIX@/var/run/user", strconv.Itoa(os.Getuid())))
|
||||
|
||||
// Initialize non-standard directories.
|
||||
baseDirs.binHome = pathutil.EnvPath(envBinHome, filepath.Join(home, ".local", "bin"))
|
||||
@@ -32,16 +30,14 @@
|
||||
appDirs := []string{
|
||||
filepath.Join(baseDirs.dataHome, "applications"),
|
||||
filepath.Join(home, ".local/share/applications"),
|
||||
@@ -65,16 +57,8 @@
|
||||
}
|
||||
|
||||
for _, dir := range baseDirs.data {
|
||||
--- a/go/pkg/mod/github.com/adrg/xdg@v0.5.0/paths_unix_test.go
|
||||
+++ b/go/pkg/mod/github.com/adrg/xdg@v0.5.0/paths_unix_test.go
|
||||
@@ -5,7 +5,6 @@
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
- "strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
--- a/paths_unix_test.go
|
||||
+++ b/paths_unix_test.go
|
||||
@@ -24,7 +23,7 @@
|
||||
},
|
||||
&envSample{
|
||||
@@ -93,48 +77,62 @@
|
||||
actual: &xdg.ConfigDirs,
|
||||
},
|
||||
&envSample{
|
||||
@@ -49,15 +48,15 @@
|
||||
@@ -49,7 +48,7 @@
|
||||
},
|
||||
&envSample{
|
||||
name: "XDG_RUNTIME_DIR",
|
||||
- expected: filepath.Join("/run/user", strconv.Itoa(os.Getuid())),
|
||||
+ expected: filepath.Join("@TERMUX_PREFIX@/var/run"),
|
||||
+ expected: filepath.Join("@TERMUX_PREFIX@/var/run/user", strconv.Itoa(os.Getuid())),
|
||||
actual: &xdg.RuntimeDir,
|
||||
},
|
||||
&envSample{
|
||||
@@ -61,8 +60,7 @@
|
||||
name: "XDG_APPLICATION_DIRS",
|
||||
expected: []string{
|
||||
filepath.Join(home, ".local/share/applications"),
|
||||
- "/usr/local/share/applications",
|
||||
- "/usr/share/applications",
|
||||
+ "@TERMUX_PREFIX@/local/share/applications",
|
||||
+ "@TERMUX_PREFIX@/share/applications",
|
||||
},
|
||||
actual: &xdg.ApplicationDirs,
|
||||
},
|
||||
@@ -66,8 +65,8 @@
|
||||
@@ -71,8 +69,7 @@
|
||||
expected: []string{
|
||||
filepath.Join(home, ".local/share/fonts"),
|
||||
filepath.Join(home, ".fonts"),
|
||||
- "/usr/local/share/fonts",
|
||||
- "/usr/share/fonts",
|
||||
+ "@TERMUX_PREFIX@/local/share/fonts",
|
||||
+ "@TERMUX_PREFIX@/share/fonts",
|
||||
},
|
||||
actual: &xdg.FontDirs,
|
||||
},
|
||||
@@ -86,8 +85,8 @@
|
||||
@@ -91,10 +88,10 @@
|
||||
},
|
||||
&envSample{
|
||||
name: "XDG_DATA_DIRS",
|
||||
- value: "~/.local/data:/usr/share",
|
||||
- expected: []string{filepath.Join(home, ".local/data"), "/usr/share"},
|
||||
+ value: "~/.local/data:@TERMUX_PREFIX@/share",
|
||||
+ expected: []string{filepath.Join(home, ".local/data"), "@TERMUX_PREFIX@/etc/xdg"},
|
||||
actual: &xdg.DataDirs,
|
||||
name: "XDG_DATA_DIRS",
|
||||
- value: "~/.local/data:/usr/share",
|
||||
+ value: "~/.local/data:@TERMUX_PREFIX@/share",
|
||||
expected: []string{
|
||||
filepath.Join(home, ".local/data"),
|
||||
- "/usr/share",
|
||||
+ "@TERMUX_PREFIX@/share",
|
||||
},
|
||||
actual: &xdg.DataDirs,
|
||||
},
|
||||
@@ -106,10 +103,10 @@
|
||||
},
|
||||
&envSample{
|
||||
@@ -231,7 +230,7 @@
|
||||
name: "XDG_CONFIG_DIRS",
|
||||
- value: "~/.local/config:/etc/xdg",
|
||||
+ value: "~/.local/config:@TERMUX_PREFIX@/etc/xdg",
|
||||
expected: []string{
|
||||
filepath.Join(home, ".local/config"),
|
||||
- "/etc/xdg",
|
||||
+ "@TERMUX_PREFIX@/etc/xdg",
|
||||
},
|
||||
actual: &xdg.ConfigDirs,
|
||||
},
|
||||
@@ -248,7 +245,7 @@
|
||||
require.NoError(t, os.Unsetenv(envHomeVar))
|
||||
|
||||
xdg.Reload()
|
||||
@@ -2,14 +2,14 @@ TERMUX_PKG_HOMEPAGE=https://www.v2fly.org/
|
||||
TERMUX_PKG_DESCRIPTION="A platform for building proxies to bypass network restrictions"
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION="5.21.0"
|
||||
TERMUX_PKG_VERSION="5.22.0"
|
||||
TERMUX_PKG_SRCURL=git+https://github.com/v2fly/v2ray-core
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
TERMUX_PKG_UPDATE_TAG_TYPE="latest-release-tag"
|
||||
|
||||
_RELEASE_URL=https://github.com/v2fly/v2ray-core/releases/download/v$TERMUX_PKG_VERSION/v2ray-linux-64.zip
|
||||
_RELEASE_SHA256=37483377c0f3e13ced9094d92ffc5259e1bbabf54fcedebab35737a9b18140ce
|
||||
_RELEASE_SHA256=ab181a2f70ea4c5536e98660c3462f5f2b3775e6268ee27dec91c8c80b0da946
|
||||
|
||||
termux_pkg_auto_update() {
|
||||
local latest_tag
|
||||
@@ -52,6 +52,13 @@ termux_step_post_get_source() {
|
||||
$_RELEASE_SHA256
|
||||
mkdir -p $TERMUX_PKG_SRCDIR/v2ray-linux-64
|
||||
unzip -d $TERMUX_PKG_SRCDIR/v2ray-linux-64 $TERMUX_PKG_CACHEDIR/v2ray-linux-64-$TERMUX_PKG_VERSION.zip
|
||||
|
||||
local d
|
||||
for d in go/pkg/mod/github.com/adrg/xdg*/; do
|
||||
sed 's|@TERMUX_PREFIX@|'"${TERMUX_PREFIX}"'|g' \
|
||||
$TERMUX_PKG_BUILDER_DIR/0001-fix-config-paths.diff \
|
||||
| patch -p1 -d ${d}
|
||||
done
|
||||
}
|
||||
|
||||
termux_step_make() {
|
||||
|
||||
Reference in New Issue
Block a user