diff --git a/net/nekobox/Makefile b/net/nekobox/Makefile index 7f38469d3425..f4b0f14aa53f 100644 --- a/net/nekobox/Makefile +++ b/net/nekobox/Makefile @@ -1,39 +1,42 @@ PORTNAME= nekobox -DISTVERSION= 5.11.8 +DISTVERSION= 5.11.16 CATEGORIES= net MAINTAINER= yuri@FreeBSD.org COMMENT= Qt-based GUI proxy utility powered by Sing-box WWW= https://github.com/qr243vbi/nekobox LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= thrift:devel/thrift LIB_DEPENDS= libboost_filesystem.so:devel/boost-libs \ libcpr.so:www/cpr \ libcurl.so:ftp/curl \ - liblmdb.so:databases/lmdb \ - libthrift.so:devel/thrift-cpp + libleveldb.so:databases/leveldb \ + libsnappy.so:archivers/snappy \ + libthrift.so:devel/thrift-cpp \ + libyaml-cpp.so:devel/yaml-cpp RUN_DEPENDS= sing-box:net/sing-box USES= cmake compiler:c++20-lang desktop-file-utils gl localbase:ldflags pkgconfig qt:6 xorg -USE_GL= gl opengl -USE_QT= base declarative tools:build +USE_GL= opengl +USE_QT= base tools:build USE_XORG= ice sm x11 xext USE_GITHUB= yes GH_ACCOUNT= qr243vbi GH_PROJECT= nekobox +GH_TUPLE= quickjs-ng:quickjs:967aa0b:qjs/3rdparty/qjs CMAKE_ON= CMAKE_SKIP_INSTALL_RPATH \ SKIP_UPDATER CMAKE_OFF= SKIP_JS_UPDATER \ BUILD_GO_PARTS post-patch: ${CP} ${FILESDIR}/server_freebsd.go ${WRKSRC}/core/server/ ${CP} ${FILESDIR}/dns_manager_freebsd.go ${WRKSRC}/core/server/internal/boxdns/ ${CP} ${FILESDIR}/monitor_freebsd.go ${WRKSRC}/core/server/internal/boxdns/ .include diff --git a/net/nekobox/distinfo b/net/nekobox/distinfo index 8e7caf8dd42c..736874035dbf 100644 --- a/net/nekobox/distinfo +++ b/net/nekobox/distinfo @@ -1,3 +1,5 @@ -TIMESTAMP = 1778044716 -SHA256 (qr243vbi-nekobox-5.11.8_GH0.tar.gz) = 43bd92e77b4518991fa0bfcea07ae8359b0e5ca3aed90eb5907b9117fc58a25c -SIZE (qr243vbi-nekobox-5.11.8_GH0.tar.gz) = 8921359 +TIMESTAMP = 1780545804 +SHA256 (qr243vbi-nekobox-5.11.16_GH0.tar.gz) = c11a6fa9938395efd0c27d561bd74d96fd48cc5ce31604cc5c6e467edd30d313 +SIZE (qr243vbi-nekobox-5.11.16_GH0.tar.gz) = 10196761 +SHA256 (quickjs-ng-quickjs-967aa0b_GH0.tar.gz) = 9a07b53b2af197c83d9aa8bf9303cfe39b3a94b7c8730ef2fdb7d8f943121591 +SIZE (quickjs-ng-quickjs-967aa0b_GH0.tar.gz) = 847563 diff --git a/net/nekobox/files/patch-CMakeLists.txt b/net/nekobox/files/patch-CMakeLists.txt deleted file mode 100644 index 81a151a6969b..000000000000 --- a/net/nekobox/files/patch-CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ ---- CMakeLists.txt.orig 2026-05-02 21:54:00 UTC -+++ CMakeLists.txt -@@ -345,10 +345,16 @@ if(NOT ACL_LIB) - find_library(ACL_LIB acl) - - if(NOT ACL_LIB) -- message(FATAL_ERROR "libacl not found. Install libacl-devel.") -+ if(NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") -+ message(FATAL_ERROR "libacl not found. Install libacl-devel.") -+ else() -+ message(STATUS "libacl not found on FreeBSD, continuing without it") -+ endif() - endif() - --target_link_libraries(nekobox PRIVATE ${ACL_LIB}) -+if(ACL_LIB) -+ target_link_libraries(nekobox PRIVATE ${ACL_LIB}) -+endif() - endif() - - # Target Link -@@ -426,7 +432,9 @@ if (UNIX) - download_srslist() - --remove_rpath(nekobox) -+if(NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") -+ remove_rpath(nekobox) -+endif() - - set(PROGRAMPREFIX "${CMAKE_INSTALL_LIBEXECDIR}/Iblis" CACHE STRING "Installation Directory") diff --git a/net/nekobox/files/patch-core_CMakeLists.txt b/net/nekobox/files/patch-core_CMakeLists.txt index 816ad5d249a7..7f45e757dc9f 100644 --- a/net/nekobox/files/patch-core_CMakeLists.txt +++ b/net/nekobox/files/patch-core_CMakeLists.txt @@ -1,31 +1,34 @@ ---- core/CMakeLists.txt.orig 2026-05-02 21:54:00 UTC +-- Enable darwin build and disable TUN-based features on FreeBSD. +-- +-- This patch ensures GOOS is correctly set for macOS and that features +-- requiring TUN/TAP or gVisor are disabled on FreeBSD as they are not yet +-- fully supported or integrated in the same way. +--- core/CMakeLists.txt.orig 2026-06-04 03:56:20 UTC +++ core/CMakeLists.txt -@@ -40,6 +40,10 @@ if (GOOS STREQUAL "") - set(GOOS "windows") - elseif(LINUX) +@@ -42,6 +42,8 @@ if (GOOS STREQUAL "") set(GOOS "linux") -+ elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") -+ set(GOOS "freebsd") + elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + set(GOOS "freebsd") + elseif(APPLE) + set(GOOS "darwin") else() set(GOOS "") endif() -@@ -182,9 +186,15 @@ message(STATUS "DESTINATION IS ${DESTDIR} FOR MACHINE +@@ -184,13 +186,15 @@ message(STATUS "DESTINATION IS ${DESTDIR} FOR MACHINE # ---------------------------- # Tags # ---------------------------- --set(TAGS "with_clash_api,with_gvisor,with_quic,with_wireguard,with_utls,with_dhcp,with_tailscale,with_shadowtls,with_grpc,with_acme,with_internal_resolvectl") +-set(TAGS "with_clash_api,with_quic,with_wireguard,with_utls,with_dhcp,with_tailscale,with_shadowtls,with_grpc,with_acme,with_awg") +set(TAGS "with_clash_api,with_quic,with_utls,with_grpc,with_acme") --if(GOARCH STREQUAL "arm64" OR GOARCH STREQUAL "amd64") -+if(NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") -+ set(TAGS "${TAGS},with_gvisor,with_wireguard,with_dhcp,with_tailscale,with_shadowtls,with_internal_resolvectl") + if(NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") +- set(TAGS "${TAGS},with_gvisor") ++ set(TAGS "${TAGS},with_gvisor,with_wireguard,with_dhcp,with_tailscale,with_shadowtls,with_awg") + if(GOARCH STREQUAL "arm64" OR GOARCH STREQUAL "amd64") + set(TAGS "${TAGS},with_naive,with_naive_outbound,with_purego") + endif() +else() + message(STATUS "FreeBSD: disabling TUN-based and gVisor features") -+endif() -+ -+if((GOARCH STREQUAL "arm64" OR GOARCH STREQUAL "amd64") AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") - set(TAGS "${TAGS},with_naive,with_naive_outbound,with_purego") endif() + file(MAKE_DIRECTORY "${DESTDIR}") diff --git a/net/nekobox/files/patch-core_server_internal_boxdns_monitor__stub.go b/net/nekobox/files/patch-core_server_internal_boxdns_monitor__stub.go deleted file mode 100644 index ce16d4d753b7..000000000000 --- a/net/nekobox/files/patch-core_server_internal_boxdns_monitor__stub.go +++ /dev/null @@ -1,10 +0,0 @@ --- Exclude FreeBSD from the generic monitor stub; a FreeBSD-specific stub is --- provided separately. ---- core/server/internal/boxdns/monitor_stub.go.orig 2026-05-05 00:00:00 UTC -+++ core/server/internal/boxdns/monitor_stub.go -@@ -1,4 +1,4 @@ --//go:build !windows -+//go:build !windows && !freebsd - - package boxdns - diff --git a/net/nekobox/files/patch-core_server_internal_sys_set__dns__stub.go b/net/nekobox/files/patch-core_server_internal_sys_set__dns__stub.go index 7b45c811182b..e0afd8007651 100644 --- a/net/nekobox/files/patch-core_server_internal_sys_set__dns__stub.go +++ b/net/nekobox/files/patch-core_server_internal_sys_set__dns__stub.go @@ -1,9 +1,9 @@ -- Exclude FreeBSD from the stub since it does not use DNS control. ---- core/server/internal/sys/set_dns_stub.go.orig 2026-05-05 00:00:00 UTC +--- core/server/internal/sys/set_dns_stub.go.orig 2026-06-01 16:33:26 UTC +++ core/server/internal/sys/set_dns_stub.go @@ -1,4 +1,4 @@ --//go:build !darwin +-//go:build !freebsd +//go:build !darwin && !freebsd package sys diff --git a/net/nekobox/files/patch-core_server_server__linux.go b/net/nekobox/files/patch-core_server_server__linux.go deleted file mode 100644 index 53bb46e870cb..000000000000 --- a/net/nekobox/files/patch-core_server_server__linux.go +++ /dev/null @@ -1,9 +0,0 @@ --- Add explicit linux build constraint so the file is not compiled on FreeBSD. ---- core/server/server_linux.go.orig 2026-05-05 00:00:00 UTC -+++ core/server/server_linux.go -@@ -1,3 +1,5 @@ -+//go:build linux -+ - package main - - import ( diff --git a/net/nekobox/files/patch-src_gharqad_configs_proxy_AbstractBean.cpp b/net/nekobox/files/patch-src_gharqad_configs_proxy_AbstractBean.cpp new file mode 100644 index 000000000000..ed65b076bc86 --- /dev/null +++ b/net/nekobox/files/patch-src_gharqad_configs_proxy_AbstractBean.cpp @@ -0,0 +1,16 @@ +-- Add missing network headers for FreeBSD. +-- +-- This patch includes and which are required +-- for networking constants and structures on FreeBSD. +--- src/gharqad/configs/proxy/AbstractBean.cpp.orig 2026-06-04 04:04:10 UTC ++++ src/gharqad/configs/proxy/AbstractBean.cpp +@@ -3,6 +3,9 @@ + #include + #include + #else ++#include ++#include ++#include + #include + #include + #endif diff --git a/net/nekobox/files/patch-src_gharqad_main.cpp b/net/nekobox/files/patch-src_gharqad_main.cpp new file mode 100644 index 000000000000..5238dec9972a --- /dev/null +++ b/net/nekobox/files/patch-src_gharqad_main.cpp @@ -0,0 +1,48 @@ +-- Suppress unused-value warnings for QT_TRANSLATE_NOOP. +-- +--- src/gharqad/main.cpp.orig 2026-06-04 03:57:05 UTC ++++ src/gharqad/main.cpp +@@ -169,25 +169,25 @@ static void loadTranslate(QString locale) { + } + + static void loadTranslate(QString locale) { +- QT_TRANSLATE_NOOP("QPlatformTheme", "Cancel"); +- QT_TRANSLATE_NOOP("QPlatformTheme", "Apply"); +- QT_TRANSLATE_NOOP("QPlatformTheme", "Yes"); +- QT_TRANSLATE_NOOP("QPlatformTheme", "No"); +- QT_TRANSLATE_NOOP("QPlatformTheme", "OK"); +- QT_TRANSLATE_NOOP("QPlatformTheme", "Defaults"); +- QT_TRANSLATE_NOOP("QPlatformTheme", "Restore Defaults"); +- QT_TRANSLATE_NOOP("QPlatformTheme", "Discard"); ++ (void)QT_TRANSLATE_NOOP("QPlatformTheme", "Cancel"); ++ (void)QT_TRANSLATE_NOOP("QPlatformTheme", "Apply"); ++ (void)QT_TRANSLATE_NOOP("QPlatformTheme", "Yes"); ++ (void)QT_TRANSLATE_NOOP("QPlatformTheme", "No"); ++ (void)QT_TRANSLATE_NOOP("QPlatformTheme", "OK"); ++ (void)QT_TRANSLATE_NOOP("QPlatformTheme", "Defaults"); ++ (void)QT_TRANSLATE_NOOP("QPlatformTheme", "Restore Defaults"); ++ (void)QT_TRANSLATE_NOOP("QPlatformTheme", "Discard"); + +- QT_TRANSLATE_NOOP("QPlatformTheme", "Undo"); +- QT_TRANSLATE_NOOP("QPlatformTheme", "Redo"); +- QT_TRANSLATE_NOOP("QPlatformTheme", "Cut"); +- QT_TRANSLATE_NOOP("QPlatformTheme", "Copy"); +- QT_TRANSLATE_NOOP("QPlatformTheme", "Paste"); +- QT_TRANSLATE_NOOP("QPlatformTheme", "Delete"); +- QT_TRANSLATE_NOOP("QPlatformTheme", "Select All"); +- QT_TRANSLATE_NOOP("QPlatformTheme", "Stop"); +- QT_TRANSLATE_NOOP("QPlatformTheme", "Clear"); +- QT_TRANSLATE_NOOP("QPlatformTheme", "Copy Link Location"); ++ (void)QT_TRANSLATE_NOOP("QPlatformTheme", "Undo"); ++ (void)QT_TRANSLATE_NOOP("QPlatformTheme", "Redo"); ++ (void)QT_TRANSLATE_NOOP("QPlatformTheme", "Cut"); ++ (void)QT_TRANSLATE_NOOP("QPlatformTheme", "Copy"); ++ (void)QT_TRANSLATE_NOOP("QPlatformTheme", "Paste"); ++ (void)QT_TRANSLATE_NOOP("QPlatformTheme", "Delete"); ++ (void)QT_TRANSLATE_NOOP("QPlatformTheme", "Select All"); ++ (void)QT_TRANSLATE_NOOP("QPlatformTheme", "Stop"); ++ (void)QT_TRANSLATE_NOOP("QPlatformTheme", "Clear"); ++ (void)QT_TRANSLATE_NOOP("QPlatformTheme", "Copy Link Location"); + + if (trans != nullptr) { + trans->deleteLater(); diff --git a/net/nekobox/pkg-plist b/net/nekobox/pkg-plist index 5d6c18ecc058..cd5052b4892e 100644 --- a/net/nekobox/pkg-plist +++ b/net/nekobox/pkg-plist @@ -1,114 +1,113 @@ bin/nekobox libexec/Iblis/nekobox libexec/Iblis/public/about.html libexec/Iblis/public/af_ZA.qm libexec/Iblis/public/am_ET.qm libexec/Iblis/public/announcement_message.js libexec/Iblis/public/ar_SA.qm libexec/Iblis/public/ay_BO.qm libexec/Iblis/public/az_AZ.qm libexec/Iblis/public/be_BY.qm libexec/Iblis/public/bg_BG.qm libexec/Iblis/public/bn_BD.qm libexec/Iblis/public/bn_IN.qm libexec/Iblis/public/bo_CN.qm libexec/Iblis/public/bs_BA.qm libexec/Iblis/public/ca_ES.qm libexec/Iblis/public/check_routeprofiles.js libexec/Iblis/public/cs_CZ.qm libexec/Iblis/public/cy_GB.qm libexec/Iblis/public/da_DK.qm libexec/Iblis/public/de_DE.qm libexec/Iblis/public/dv_MV.qm libexec/Iblis/public/dz_BT.qm libexec/Iblis/public/el_GR.qm -libexec/Iblis/public/emoji.ttf libexec/Iblis/public/es_ES.qm libexec/Iblis/public/et_EE.qm libexec/Iblis/public/eu_ES.qm libexec/Iblis/public/fa_IR.qm libexec/Iblis/public/ff_SN.qm libexec/Iblis/public/fi_FI.qm libexec/Iblis/public/fj_FJ.qm libexec/Iblis/public/fr_FR.qm libexec/Iblis/public/gl_ES.qm libexec/Iblis/public/gn_PY.qm libexec/Iblis/public/gu_IN.qm libexec/Iblis/public/ha_NG.qm libexec/Iblis/public/he_IL.qm libexec/Iblis/public/hi_IN.qm libexec/Iblis/public/hr_HR.qm libexec/Iblis/public/hu_HU.qm libexec/Iblis/public/hy_AM.qm libexec/Iblis/public/id_ID.qm libexec/Iblis/public/ig_NG.qm libexec/Iblis/public/is_IS.qm libexec/Iblis/public/it_IT.qm libexec/Iblis/public/ja_JP.qm libexec/Iblis/public/ka_GE.qm libexec/Iblis/public/kg_CD.qm libexec/Iblis/public/kk_KZ.qm libexec/Iblis/public/km_KH.qm libexec/Iblis/public/kn_IN.qm libexec/Iblis/public/ko_KR.qm libexec/Iblis/public/ky_KG.qm libexec/Iblis/public/la_LA.qm libexec/Iblis/public/languages.txt libexec/Iblis/public/ln_CD.qm libexec/Iblis/public/lo_LA.qm libexec/Iblis/public/lt_LT.qm libexec/Iblis/public/lv_LV.qm libexec/Iblis/public/mi_NZ.qm libexec/Iblis/public/mk_MK.qm libexec/Iblis/public/ml_IN.qm libexec/Iblis/public/mn_MN.qm libexec/Iblis/public/mr_IN.qm libexec/Iblis/public/ms_MY.qm libexec/Iblis/public/my_MM.qm libexec/Iblis/public/ne_NP.qm libexec/Iblis/public/nl_NL.qm libexec/Iblis/public/no_NO.qm libexec/Iblis/public/or_IN.qm libexec/Iblis/public/pa_IN.qm libexec/Iblis/public/pa_PK.qm libexec/Iblis/public/pl_PL.qm libexec/Iblis/public/ps_AF.qm libexec/Iblis/public/pt_PT.qm libexec/Iblis/public/qu_PE.qm libexec/Iblis/public/ro_RO.qm libexec/Iblis/public/ru_RU.qm libexec/Iblis/public/rw_RW.qm libexec/Iblis/public/sd_PK.qm libexec/Iblis/public/si_LK.qm libexec/Iblis/public/sk_SK.qm libexec/Iblis/public/sm_WS.qm libexec/Iblis/public/so_SO.qm libexec/Iblis/public/sq_AL.qm libexec/Iblis/public/sr_BS.qm libexec/Iblis/public/sr_RS.qm libexec/Iblis/public/srslist.json libexec/Iblis/public/sv_SE.qm libexec/Iblis/public/sw_KE.qm libexec/Iblis/public/sw_TZ.qm libexec/Iblis/public/ta_IN.qm libexec/Iblis/public/te_IN.qm libexec/Iblis/public/tg_TJ.qm libexec/Iblis/public/th_TH.qm libexec/Iblis/public/ti_ET.qm libexec/Iblis/public/tk_TM.qm libexec/Iblis/public/tl_PH.qm libexec/Iblis/public/to_TO.qm libexec/Iblis/public/tr_TR.qm libexec/Iblis/public/ug_CN.qm libexec/Iblis/public/uk_UA.qm libexec/Iblis/public/uz_UZ.qm libexec/Iblis/public/vi_VN.qm libexec/Iblis/public/wo_SN.qm libexec/Iblis/public/xh_ZA.qm libexec/Iblis/public/yo_NG.qm libexec/Iblis/public/zh_CN.qm libexec/Iblis/public/zh_HK.qm libexec/Iblis/public/zh_TW.qm libexec/Iblis/public/zu_ZA.qm share/applications/nekobox.desktop share/icons/hicolor/256x256/apps/nekobox.png