This commit is contained in:
2026-04-02 17:14:50 +02:00
parent ff7fd3c9f0
commit 05c47c70bb
41 changed files with 12376 additions and 0 deletions

24
arch/liblzo2/Makefile Normal file
View File

@@ -0,0 +1,24 @@
#
# $Id$
#
PORTNAME= lzo2
PORTVERSION= 2.09
CATEGORIES= archivers devel
MASTER_SITES+= http://www.oberhumer.com/opensource/lzo/download/
MASTER_SITES+= http://fresh.t-systems-sfr.com/unix/src/misc/
MASTER_SITES+= http://ftp.uni-koeln.de/util/arc/
MASTER_SITE_SUBDIR= libs/compression
DISTNAME= lzo-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}
PKGNAMEPREFIX= lib
MAINTAINER= homeunix7@gmail.com
COMMENT= Portable speedy, lossless data compression library
GNU_CONFIGURE= yes
USES+= gmake
CONFIGURE_ARGS= --enable-shared
USE_LDCONFIG= yes
.include <bsd.port.mk>
#EOF

2
arch/liblzo2/distinfo Normal file
View File

@@ -0,0 +1,2 @@
SHA256 (lzo-2.09.tar.gz) = f294a7ced313063c057c504257f437c8335c41bfeed23531ee4e6a2b87bcb34c
SIZE (lzo-2.09.tar.gz) = 594855

View File

@@ -0,0 +1,11 @@
--- ./Makefile.in.orig 2015-02-04 13:24:51.000000000 +0200
+++ ./Makefile.in 2015-03-05 00:25:56.000000000 +0200
@@ -1381,7 +1381,7 @@
info-am:
-install-data-am: install-docDATA install-pkgincludeHEADERS
+install-data-am: install-pkgincludeHEADERS
install-dvi: install-dvi-am

View File

@@ -0,0 +1,11 @@
--- ./include/lzo/lzodefs.h.orig 2015-02-04 13:24:51.000000000 +0200
+++ ./include/lzo/lzodefs.h 2015-03-05 00:18:31.000000000 +0200
@@ -29,6 +29,8 @@
#ifndef __LZODEFS_H_INCLUDED
#define __LZODEFS_H_INCLUDED 1
+#include <limits.h>
+
#if defined(__CYGWIN32__) && !defined(__CYGWIN__)
# define __CYGWIN__ __CYGWIN32__
#endif

View File

@@ -0,0 +1,23 @@
--- ./lzotest/lzotest.c.orig 2015-02-04 13:24:51.000000000 +0200
+++ ./lzotest/lzotest.c 2015-03-05 00:18:31.000000000 +0200
@@ -206,7 +206,7 @@
// command line options
**************************************************************************/
-int opt_verbose = 2;
+int opt_verbose = 1;
long opt_c_loops = 0;
long opt_d_loops = 0;
@@ -1902,9 +1902,11 @@
if ((*s == '/' || *s == '\\') && s[1])
progname = s + 1;
+#if 0
printf("\nLZO real-time data compression library (v%s, %s).\n",
lzo_version_string(), lzo_version_date());
printf("Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer\nAll Rights Reserved.\n\n");
+#endif
/*

22
arch/liblzo2/pkg-descr Normal file
View File

@@ -0,0 +1,22 @@
LZO is a data compression library which is suitable for data
de-/compression in real-time. This means it favours speed over
compression ratio.
LZO implements a number of algorithms with the following features:
+ Decompression is simple and *very* fast.
+ Requires no memory for decompression.
+ Compression is pretty fast.
+ Requires 64 kB of memory for compression.
+ Allows you to dial up extra compression at a speed cost in the
compressor. The speed of the decompressor is not reduced.
+ Includes compression levels for generating pre-compressed data
which achieve a quite competitive compression ratio.
+ There is also a compression level which needs only 8 kB for
compression.
+ Algorithm is thread safe.
+ Algorithm is lossless.
Author: Markus Franz Xaver Johannes Oberhumer
markus.oberhumer@jk.uni-linz.ac.at
WWW: http://www.oberhumer.com/opensource/lzo/

18
arch/liblzo2/pkg-plist Normal file
View File

@@ -0,0 +1,18 @@
include/lzo/lzo1.h
include/lzo/lzo1a.h
include/lzo/lzo1b.h
include/lzo/lzo1c.h
include/lzo/lzo1f.h
include/lzo/lzo1x.h
include/lzo/lzo1y.h
include/lzo/lzo1z.h
include/lzo/lzo2a.h
include/lzo/lzo_asm.h
include/lzo/lzoconf.h
include/lzo/lzodefs.h
include/lzo/lzoutil.h
lib/liblzo2.a
lib/liblzo2.la
lib/liblzo2.so
lib/liblzo2.so.2
@dir include/lzo

26
devel/gindent/Makefile Normal file
View File

@@ -0,0 +1,26 @@
PORTNAME= gindent
DISTVERSION= 2.2.12
CATEGORIES= devel
MASTER_SITES= GNU/indent
DISTNAME= indent-${DISTVERSION}
MAINTAINER= moritz@schmi.tt
COMMENT= C source code reformatter
USES= gmake groff:run localbase:ldflags makeinfo
INFO= indent
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --program-prefix=g --htmldir=${DOCSDIR}
CPPFLAGS+= -DBERKELEY_DEFAULTS=1
post-patch:
${GREP} -lR "malloc\.h" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \
's|malloc\.h|stdlib.h|g'
${REINPLACE_CMD} -e 's,-Werror,,g' ${WRKSRC}/configure
.include <bsd.port.mk>

3
devel/gindent/distinfo Normal file
View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1600861654
SHA256 (indent-2.2.12.tar.gz) = e77d68c0211515459b8812118d606812e300097cfac0b4e9fb3472664263bb8b
SIZE (indent-2.2.12.tar.gz) = 967743

View File

@@ -0,0 +1,11 @@
--- doc/Makefile.in.orig 2020-11-04 19:20:47 UTC
+++ doc/Makefile.in
@@ -334,7 +334,7 @@ host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
-htmldir = $(docdir)
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@

View File

@@ -0,0 +1,179 @@
--- src/args.c.orig 2018-09-02 20:30:45 UTC
+++ src/args.c
@@ -105,13 +105,20 @@ RCSTAG_CC ("$Id$");
"-npcs\0-nprs\0-npsl\0-sai\0-saf\0-saw\0-ncs\0-nsc\0-sob\0-nfca\0-cp33\0-ss\0" \
"-ts8\0-il1\0-nbs\0"
-const char *settings_strings[6] = {
+#define KNF_SETTINGS_STRING \
+ "-bad\0-bap\0-nbbb\0-nbc\0-bbo\0-br\0-brs\0-nbs\0-c33\0-cd33\0-cdb\0" \
+ "-ce\0-ci4\0-cli0\0-cp33\0-ncs\0-d0\0-di0\0-ndj\0-nfc1\0-nfca\0-hnl\0" \
+ "-i8\0-ip8\0-l79\0-nlp\0-npcs\0-nprs\0-psl\0-sai\0-saf\0-saw\0-sc\0" \
+ "-nsob\0-nss\0"
+
+const char *settings_strings[7] = {
KR_SETTINGS_STRING,
GNU_SETTINGS_STRING,
ORIG_SETTINGS_STRING,
LINUX_SETTINGS_STRING,
"-ip0\0",
- VERSION
+ VERSION,
+ KNF_SETTINGS_STRING
};
#define KR_SETTINGS_IDX (void *)0
@@ -120,6 +127,7 @@ const char *settings_strings[6] = {
#define LINUX_SETTINGS_IDX (void *)3
#define NIP_SETTINGS_IDX (void *)4
#define VERSION_SETTINGS_IDX (void *)5
+#define KNF_SETTINGS_IDX (void *)6
/**
* Profile types. These identify what kind of switches and arguments
@@ -188,6 +196,7 @@ static int exp_hnl = 0;
static int exp_i = 0;
static int exp_il = 0;
static int exp_ip = 0;
+static int exp_knf = 0;
static int exp_kr = 0;
static int exp_l = 0;
static int exp_lc = 0;
@@ -296,66 +305,69 @@ const pro_ty pro[] =
#endif
{"pi", PRO_INT, -1, ONOFF_NA, &settings.paren_indent, &exp_pi},
{"pcs", PRO_BOOL, false, ON, &settings.proc_calls_space, &exp_pcs},
+ {"orig", PRO_SETTINGS, 0, ONOFF_NA, ORIG_SETTINGS_IDX, &exp_orig},
{"o", PRO_BOOL, false, ON, &settings.expect_output_file, &exp_o},
{"nv", PRO_BOOL, false, OFF, &settings.verbose, &exp_v},
- {"nut", PRO_BOOL, true, OFF, &settings.use_tabs, &exp_ut},
- {"nss", PRO_BOOL, false, OFF, &settings.space_sp_semicolon, &exp_ss},
- {"nsob", PRO_BOOL, false, OFF, &settings.swallow_optional_blanklines, &exp_sob},
- {"nsc", PRO_BOOL, true, OFF, &settings.star_comment_cont, &exp_sc},
- {"nsaw", PRO_BOOL, true, OFF, &settings.space_after_while, &exp_saw},
- {"nsai", PRO_BOOL, true, OFF, &settings.space_after_if, &exp_sai},
- {"nsaf", PRO_BOOL, true, OFF, &settings.space_after_for, &exp_saf},
- {"npsl", PRO_BOOL, true, OFF, &settings.procnames_start_line, &exp_psl},
- {"nprs", PRO_BOOL, false, OFF, &settings.parentheses_space, &exp_prs},
+ {"nut", PRO_BOOL, false, OFF, &settings.use_tabs, &exp_ut},
+ {"nss", PRO_BOOL, true, OFF, &settings.space_sp_semicolon, &exp_ss},
+ {"nsob", PRO_BOOL, true, OFF, &settings.swallow_optional_blanklines, &exp_sob},
+ {"nsc", PRO_BOOL, false, OFF, &settings.star_comment_cont, &exp_sc},
+ {"nsaw", PRO_BOOL, false, OFF, &settings.space_after_while, &exp_saw},
+ {"nsai", PRO_BOOL, false, OFF, &settings.space_after_if, &exp_sai},
+ {"nsaf", PRO_BOOL, false, OFF, &settings.space_after_for, &exp_saf},
+ {"npsl", PRO_BOOL, false, OFF, &settings.procnames_start_line, &exp_psl},
+ {"nprs", PRO_BOOL, true, OFF, &settings.parentheses_space, &exp_prs},
{"npro", PRO_IGN, 0, ONOFF_NA, 0, &exp_pro},
#ifdef PRESERVE_MTIME
{"npmt", PRO_BOOL, false, OFF, &settings.preserve_mtime, &exp_pmt},
#endif
- {"npcs", PRO_BOOL, false, OFF, &settings.proc_calls_space, &exp_pcs},
+ {"npcs", PRO_BOOL, true, OFF, &settings.proc_calls_space, &exp_pcs},
{"nlps", PRO_BOOL, false, OFF, &settings.leave_preproc_space, &exp_lps},
{"nlp", PRO_BOOL, true, OFF, &settings.lineup_to_parens, &exp_lp},
{"nip", PRO_SETTINGS, 0, ONOFF_NA, NIP_SETTINGS_IDX, &exp_nip},
- {"nhnl", PRO_BOOL, true, OFF, &settings.honour_newlines, &exp_hnl},
+ {"nhnl", PRO_BOOL, false, OFF, &settings.honour_newlines, &exp_hnl},
{"ngts", PRO_BOOL, false, OFF, &settings.gettext_strings, &exp_gts},
{"nfca", PRO_BOOL, true, OFF, &settings.format_comments, &exp_fca},
{"nfc1", PRO_BOOL, true, OFF, &settings.format_col1_comments, &exp_fc1},
{"neei", PRO_BOOL, false, OFF, &settings.extra_expression_indent, &exp_eei},
- {"ndj", PRO_BOOL, false, OFF, &settings.ljust_decl, &exp_dj},
- {"ncs", PRO_BOOL, true, OFF, &settings.cast_space, &exp_cs},
- {"nce", PRO_BOOL, true, OFF, &settings.cuddle_else, &exp_ce},
+ {"ndj", PRO_BOOL, true, OFF, &settings.ljust_decl, &exp_dj},
+ {"ncs", PRO_BOOL, false, OFF, &settings.cast_space, &exp_cs},
+ {"nce", PRO_BOOL, false, OFF, &settings.cuddle_else, &exp_ce},
{"ncdw", PRO_BOOL, false, OFF, &settings.cuddle_do_while, &exp_cdw},
- {"ncdb", PRO_BOOL, true, OFF, &settings.comment_delimiter_on_blankline, &exp_cdb},
+ {"ncdb", PRO_BOOL, false, OFF, &settings.comment_delimiter_on_blankline, &exp_cdb},
{"nbs", PRO_BOOL, false, OFF, &settings.blank_after_sizeof, &exp_bs},
{"nbfda", PRO_BOOL, false, OFF, &settings.break_function_decl_args, &exp_bfda},
{"nbfde", PRO_BOOL, false, OFF, &settings.break_function_decl_args_end, &exp_bfde},
{"nbc", PRO_BOOL, true, ON, &settings.leave_comma, &exp_bc},
- {"nbbo", PRO_BOOL, true, OFF, &settings.break_before_boolean_operator, &exp_bbo},
- {"nbbb", PRO_BOOL, false, OFF, &settings.blanklines_before_blockcomments, &exp_bbb},
+ {"nbbo", PRO_BOOL, false, OFF, &settings.break_before_boolean_operator, &exp_bbo},
+ {"nbbb", PRO_BOOL, true, OFF, &settings.blanklines_before_blockcomments, &exp_bbb},
{"nbap", PRO_BOOL, false, OFF, &settings.blanklines_after_procs, &exp_bap},
{"nbadp", PRO_BOOL, false, OFF, &settings.blanklines_after_declarations_at_proctop, &exp_badp},
{"nbad", PRO_BOOL, false, OFF, &settings.blanklines_after_declarations, &exp_bad},
{"nbacc", PRO_BOOL, false, OFF, &settings.blanklines_around_conditional_compilation, &exp_bacc},
{"linux", PRO_SETTINGS, 0, ONOFF_NA, LINUX_SETTINGS_IDX, &exp_linux},
{"lps", PRO_BOOL, false, ON, &settings.leave_preproc_space, &exp_lps},
- {"lp", PRO_BOOL, true, ON, &settings.lineup_to_parens, &exp_lp},
+ {"lp", PRO_BOOL, false, ON, &settings.lineup_to_parens, &exp_lp},
{"lc", PRO_INT, DEFAULT_RIGHT_COMMENT_MARGIN, ONOFF_NA, &settings.comment_max_col, &exp_lc},
{"l", PRO_INT, DEFAULT_RIGHT_MARGIN, ONOFF_NA, &settings.max_col, &exp_l},
+/* This is now the default. */
+ {"knf", PRO_SETTINGS, 0, ONOFF_NA, KNF_SETTINGS_IDX, &exp_knf},
{"kr", PRO_SETTINGS, 0, ONOFF_NA, KR_SETTINGS_IDX, &exp_kr},
- {"ip", PRO_INT, 4, ONOFF_NA, &settings.indent_parameters, &exp_ip},
- {"i", PRO_INT, 4, ONOFF_NA, &settings.ind_size, &exp_i},
+ {"ip", PRO_INT, 8, ONOFF_NA, &settings.indent_parameters, &exp_ip},
+ {"i", PRO_INT, 8, ONOFF_NA, &settings.ind_size, &exp_i},
{"il", PRO_INT, DEFAULT_LABEL_INDENT, ONOFF_NA, &settings.label_offset, &exp_il},
{"hnl", PRO_BOOL, true, ON, &settings.honour_newlines, &exp_hnl},
{"h", PRO_BOOL, 0, ONOFF_NA, NULL, NULL},
{"gts", PRO_BOOL, false, ON, &settings.gettext_strings, &exp_gts},
{"gnu", PRO_SETTINGS, 0, ONOFF_NA, GNU_SETTINGS_IDX, &exp_gnu},
{"fnc", PRO_BOOL, false, ON, &settings.fix_nested_comments, &exp_fnc},
- {"fca", PRO_BOOL, true, ON, &settings.format_comments, &exp_fca},
- {"fc1", PRO_BOOL, true, ON, &settings.format_col1_comments, &exp_fc1},
+ {"fca", PRO_BOOL, false, ON, &settings.format_comments, &exp_fca},
+ {"fc1", PRO_BOOL, false, ON, &settings.format_col1_comments, &exp_fc1},
{"eei", PRO_BOOL, false, ON, &settings.extra_expression_indent, &exp_eei},
{"dj", PRO_BOOL, false, ON, &settings.ljust_decl, &exp_dj},
- {"di", PRO_INT, 16, ONOFF_NA, &settings.decl_indent, &exp_di},
+ {"di", PRO_INT, 0, ONOFF_NA, &settings.decl_indent, &exp_di},
{"d", PRO_INT, 0, ONOFF_NA, &settings.unindent_displace, &exp_d},
- {"cs", PRO_BOOL, true, ON, &settings.cast_space, &exp_cs},
+ {"cs", PRO_BOOL, false, ON, &settings.cast_space, &exp_cs},
{"cp", PRO_INT, 33, ONOFF_NA, &settings.else_endif_col, &exp_cp},
{"cli", PRO_INT, 0, ONOFF_NA, &settings.case_indent, &exp_cli},
{"ci", PRO_INT, 4, ONOFF_NA, &settings.continuation_indent, &exp_ci},
@@ -376,12 +388,12 @@ const pro_ty pro[] =
{"bl", PRO_BOOL, true, OFF, &settings.btype_2, &exp_bl},
{"bfda", PRO_BOOL, false, ON, &settings.break_function_decl_args, &exp_bfda},
{"bfde", PRO_BOOL, false, ON, &settings.break_function_decl_args_end, &exp_bfde},
- {"bc", PRO_BOOL, true, OFF, &settings.leave_comma, &exp_bc},
+ {"bc", PRO_BOOL, false, OFF, &settings.leave_comma, &exp_bc},
{"bbo", PRO_BOOL, true, ON, &settings.break_before_boolean_operator, &exp_bbo},
{"bbb", PRO_BOOL, false, ON, &settings.blanklines_before_blockcomments, &exp_bbb},
- {"bap", PRO_BOOL, false, ON, &settings.blanklines_after_procs, &exp_bap},
- {"badp", PRO_BOOL, false, ON, &settings.blanklines_after_declarations_at_proctop, &exp_badp},
- {"bad", PRO_BOOL, false, ON, &settings.blanklines_after_declarations, &exp_bad},
+ {"bap", PRO_BOOL, true, ON, &settings.blanklines_after_procs, &exp_bap},
+ {"badp", PRO_BOOL, true, ON, &settings.blanklines_after_declarations_at_proctop, &exp_badp},
+ {"bad", PRO_BOOL, true, ON, &settings.blanklines_after_declarations, &exp_bad},
{"bacc", PRO_BOOL, false, ON, &settings.blanklines_around_conditional_compilation, &exp_bacc},
{"T", PRO_KEY, 0, ONOFF_NA, 0, &exp_T},
{"ppi", PRO_INT, 0, ONOFF_NA, &settings.force_preproc_width, &exp_ppi},
@@ -468,6 +480,7 @@ const pro_ty pro[] =
{"lp", PRO_BOOL, true, ON, &settings.lineup_to_parens, &exp_lp},
{"lc", PRO_INT, DEFAULT_RIGHT_COMMENT_MARGIN, ONOFF_NA, &settings.comment_max_col, &exp_lc},
{"l", PRO_INT, DEFAULT_RIGHT_MARGIN, ONOFF_NA, &settings.max_col, &exp_l},
+ {"knf", PRO_SETTINGS, 0, ONOFF_NA, KNF_SETTINGS_IDX, &exp_knf},
{"kr", PRO_SETTINGS, 0, ONOFF_NA, KR_SETTINGS_IDX, &exp_kr},
{"il", PRO_INT, DEFAULT_LABEL_INDENT, ONOFF_NA, &settings.label_offset, &exp_il},
{"ip", PRO_INT, 5, ONOFF_NA, &settings.indent_parameters, &exp_ip},
@@ -649,6 +662,9 @@ const long_option_conversion_ty option_conversions[] =
{"blank-lines-after-declarations", "bad"},
{"blank-lines-after-commas", "bc"},
{"blank-before-sizeof", "bs"},
+ {"berkeley-kernel-style", "knf"},
+ {"berkeley-kernel-normal-form", "knf"},
+ {"kernel-normal-form", "knf"},
{"berkeley-style", "orig"},
{"berkeley", "orig"},
{"Bill-Shannon", "bs"},
@@ -861,7 +877,7 @@ extern int set_option(
if (!found)
{
- DieError(invocation_error, _("%s: unknown option \"%s\"\n"), option_source, option - 1);
+ DieError(invocation_error, _("%s: unknown option \"%s\"\n"), option_source, option - option_length);
}
else if (strlen(p->p_name) == 1 && *(p->p_name) == 'h')
{

View File

@@ -0,0 +1,14 @@
--- src/indent.h.orig 2018-09-02 20:25:26 UTC
+++ src/indent.h
@@ -141,9 +141,9 @@ typedef enum bb_code
bb_cast
} bb_code_ty;
-#define DEFAULT_RIGHT_MARGIN 78
+#define DEFAULT_RIGHT_MARGIN 79
-#define DEFAULT_RIGHT_COMMENT_MARGIN 78
+#define DEFAULT_RIGHT_COMMENT_MARGIN 79
#define DEFAULT_LABEL_INDENT -2

View File

@@ -0,0 +1,11 @@
--- ./src/Makefile.in~ 2018-09-05 23:00:11.000000000 +0200
+++ ./src/Makefile.in 2022-07-31 10:27:50.962695000 +0200
@@ -352,7 +352,7 @@
BUILT_SOURCES = gperf.c gperf-cc.c
AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/intl
MAINTAINERCLEANFILES = Makefile.in libgettext.h
-AM_CFLAGS = -Wall -W -Werror -Wredundant-decls -Wshadow \
+AM_CFLAGS = -Wall -W -Wredundant-decls -Wshadow \
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs \
-Wmissing-declarations -Wcomment -Wbad-function-cast \
-Wcast-align $(am__append_1)

View File

@@ -0,0 +1,20 @@
--- ./src/output.c.orig 2018-09-05 18:47:56.000000000 +0200
+++ ./src/output.c 2022-07-31 10:20:19.045491000 +0200
@@ -74,7 +74,7 @@
RCSTAG_CC ("$Id$");
-static FILE * output = NULL;
+FILE * output = NULL;
static BOOLEAN inhibited = 0;
static buf_break_st_ty * buf_break_list = NULL;
buf_break_st_ty * buf_break = NULL;
@@ -840,7 +840,7 @@
BOOLEAN * pbreak_line,
int target_col_break)
{
- int paren_level = 0;
+ int paren_level = 0;
if (s_code != e_code)
{ /* print code section, if any */

4
devel/gindent/pkg-descr Normal file
View File

@@ -0,0 +1,4 @@
The `indent' program changes the appearance of a C program by
inserting or deleting whitespace.
WWW: http://www.gnu.org/software/indent/indent.html

107
devel/gindent/pkg-plist Normal file
View File

@@ -0,0 +1,107 @@
bin/gindent
man/man1/gindent.1.gz
share/doc/gindent/indent.html
share/info/indent.info
share/locale/bg/LC_MESSAGES/indent.mo
share/locale/ca/LC_MESSAGES/indent.mo
share/locale/cs/LC_MESSAGES/indent.mo
share/locale/da/LC_MESSAGES/indent.mo
share/locale/de/LC_MESSAGES/indent.mo
share/locale/el/LC_MESSAGES/indent.mo
share/locale/eo/LC_MESSAGES/indent.mo
share/locale/es/LC_MESSAGES/indent.mo
share/locale/et/LC_MESSAGES/indent.mo
share/locale/eu/LC_MESSAGES/indent.mo
share/locale/fi/LC_MESSAGES/indent.mo
share/locale/fr/LC_MESSAGES/indent.mo
share/locale/ga/LC_MESSAGES/indent.mo
share/locale/gl/LC_MESSAGES/indent.mo
share/locale/hr/LC_MESSAGES/indent.mo
share/locale/hu/LC_MESSAGES/indent.mo
share/locale/id/LC_MESSAGES/indent.mo
share/locale/it/LC_MESSAGES/indent.mo
share/locale/ja/LC_MESSAGES/indent.mo
share/locale/ko/LC_MESSAGES/indent.mo
share/locale/nl/LC_MESSAGES/indent.mo
share/locale/pl/LC_MESSAGES/indent.mo
share/locale/pt_BR/LC_MESSAGES/indent.mo
share/locale/ro/LC_MESSAGES/indent.mo
share/locale/ru/LC_MESSAGES/indent.mo
share/locale/sk/LC_MESSAGES/indent.mo
share/locale/sr/LC_MESSAGES/indent.mo
share/locale/sv/LC_MESSAGES/indent.mo
share/locale/tr/LC_MESSAGES/indent.mo
share/locale/uk/LC_MESSAGES/indent.mo
share/locale/vi/LC_MESSAGES/indent.mo
share/locale/zh_CN/LC_MESSAGES/indent.mo
share/locale/zh_TW.Big5/LC_MESSAGES/indent.mo
share/locale/zh_TW/LC_MESSAGES/indent.mo
@dir share/locale/bg/LC_MESSAGES
@dir share/locale/bg
@dir share/locale/ca/LC_MESSAGES
@dir share/locale/ca
@dir share/locale/cs/LC_MESSAGES
@dir share/locale/cs
@dir share/locale/da/LC_MESSAGES
@dir share/locale/da
@dir share/locale/de/LC_MESSAGES
@dir share/locale/de
@dir share/locale/el/LC_MESSAGES
@dir share/locale/el
@dir share/locale/eo/LC_MESSAGES
@dir share/locale/eo
@dir share/locale/es/LC_MESSAGES
@dir share/locale/es
@dir share/locale/et/LC_MESSAGES
@dir share/locale/et
@dir share/locale/eu/LC_MESSAGES
@dir share/locale/eu
@dir share/locale/fi/LC_MESSAGES
@dir share/locale/fi
@dir share/locale/fr/LC_MESSAGES
@dir share/locale/fr
@dir share/locale/ga/LC_MESSAGES
@dir share/locale/ga
@dir share/locale/gl/LC_MESSAGES
@dir share/locale/gl
@dir share/locale/hr/LC_MESSAGES
@dir share/locale/hr
@dir share/locale/hu/LC_MESSAGES
@dir share/locale/hu
@dir share/locale/id/LC_MESSAGES
@dir share/locale/id
@dir share/locale/it/LC_MESSAGES
@dir share/locale/it
@dir share/locale/ja/LC_MESSAGES
@dir share/locale/ja
@dir share/locale/ko/LC_MESSAGES
@dir share/locale/ko
@dir share/locale/nl/LC_MESSAGES
@dir share/locale/nl
@dir share/locale/pl/LC_MESSAGES
@dir share/locale/pl
@dir share/locale/pt_BR/LC_MESSAGES
@dir share/locale/pt_BR
@dir share/locale/ro/LC_MESSAGES
@dir share/locale/ro
@dir share/locale/ru/LC_MESSAGES
@dir share/locale/ru
@dir share/locale/sk/LC_MESSAGES
@dir share/locale/sk
@dir share/locale/sr/LC_MESSAGES
@dir share/locale/sr
@dir share/locale/sv/LC_MESSAGES
@dir share/locale/sv
@dir share/locale/tr/LC_MESSAGES
@dir share/locale/tr
@dir share/locale/uk/LC_MESSAGES
@dir share/locale/uk
@dir share/locale/vi/LC_MESSAGES
@dir share/locale/vi
@dir share/locale/zh_CN/LC_MESSAGES
@dir share/locale/zh_CN
@dir share/locale/zh_TW/LC_MESSAGES
@dir share/locale/zh_TW
@dir share/locale/zh_TW.Big5/LC_MESSAGES
@dir share/locale/zh_TW.Big5
@dir share/locale

62
net/openvpn/Makefile Normal file
View File

@@ -0,0 +1,62 @@
#
# $Id$
#
PORTNAME= openvpn
PORTVERSION= 2.6.14
CATEGORIES= security net
#MASTER_SITES= http://openvpn.net/release/
#MASTER_SITES+= http://swupdate.openvpn.net/community/releases/
#MASTER_SITES+= http://build.openvpn.net/downloads/releases/
MAINTAINER= homeunix7@gmail.com
COMMENT= Secure IP/Ethernet tunnel daemon
LIB_DEPENDS+= liblzo2.so:arch/liblzo2
GNU_CONFIGURE= yes
USES+= gmake
#CONFIGURE_ARGS+= --with-crypto-library=openssl
CONFIGURE_ARGS+= --mandir=${PREFIX}/man
CONFIGURE_ARGS+= --program-transform-name=''
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
SHEBANG_FILES= sample/sample-scripts/verify-cn
SHEBANG_FILES+= sample/sample-scripts/auth-pam.pl
SHEBANG_FILES+= sample/sample-scripts/ucn.pl
CONFIGURE_ARGS+= --enable-strict
#CONFIGURE_ENV+= ac_cv_prog_CMAKE="" CMAKE=""
OPENVPN_RUNDIR= /var/run/openvpn
OPENVPN_LOGDIR= /var/log/openvpn
OPENVPN_CONFDIR= ${PREFIX}/etc/openvpn
SUB_LIST+= OPENVPN_RUNDIR=${OPENVPN_RUNDIR}
SUB_LIST+= OPENVPN_LOGDIR=${OPENVPN_LOGDIR}
SUB_LIST+= OPENVPN_CONFDIR=${OPENVPN_CONFDIR}
PLIST_FILES+= man/man8/openvpn.8.gz
USE_RC_SUBR= openvpn.sh
USE_LDCONFIG= ${PREFIX}/lib
SUB_FILES= pkg-message pkg-install
post-build:
# cd ${WRKSRC}/plugin/down-root && ${MAKE}
# cd ${WRKSRC}/plugin/auth-pam && ${CC} ${CPPFLAGS} -I../.. -DDLOPEN_PAM=0 ${CFLAGS} -fPIC -shared -Wl,-soname,openvpn-auth-pam.so -o openvpn-auth-pam.so auth-pam.c pamdl.c -lc -lpam
## @# self-tests here
## cd ${WRKSRC} && ${MAKE} check
post-stage:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/sample/sample-config-files/*.conf ${STAGEDIR}${EXAMPLESDIR}
# ${MKDIR} ${PREFIX}/lib
# ${INSTALL_PROGRAM} ${WRKSRC}/plugin/down-root/openvpn-down-root.so ${PREFIX}/lib
# ${INSTALL_PROGRAM} ${WRKSRC}/plugin/auth-pam/openvpn-auth-pam.so ${PREFIX}/lib
.include <bsd.port.mk>
#EOF

3
net/openvpn/distinfo Normal file
View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1761496270
SHA256 (openvpn-2.6.14.tar.gz) = 9eb6a6618352f9e7b771a9d38ae1631b5edfeed6d40233e243e602ddf2195e7a
SIZE (openvpn-2.6.14.tar.gz) = 1926343

View File

@@ -0,0 +1,71 @@
#!/bin/sh
#
# $Id$
#
# PROVIDE: openvpn
# REQUIRE: DAEMON
# KEYWORD: shutdown
. /etc/rc.subr
name="openvpn"
rcvar="openvpn_enable"
command="%%PREFIX%%/sbin/${name}"
command_args=""
load_rc_config ${name}
extra_commands="list"
start_cmd="openvpn_start"
stop_cmd="openvpn_stop"
restart_cmd="openvpn_restart"
reload_cmd="openvpn_reload"
list_cmd="openvpn_list"
openvpn_list() {
echo -n "$1 "
}
openvpn_start() {
serv="$1"
conffile="%%PREFIX%%/etc/openvpn/${serv}.conf"
pidfile="/var/run/openvpn/${serv}.pid"
echo "Start openvpn $serv."
$command --config $conf --writepid $pidfile --daemon
}
openvpn_stop() {
serv="$1"
pidfile="/var/run/openvpn/${serv}.pid"
pid=$(check_pidfile $pidfile $command)
test ! -z "$pid" && ( kill "$pid"; echo "Stopping openvpn $serv.")
wait_for_pids $pid && rm -f "$pidfile"
}
openvpn_restart() {
serv="$1"
openvpn_stop $serv
openvpn_start $serv
}
openvpn_reload() {
serv="$1"
pid=$(check_pidfile $pidfile $command)
test ! -z "$pid" && ( kill -HUP "$pid")
}
load_rc_config $name
: ${openvpn_enable=NO}
test -z "$2" && conflist=$(find %%PREFIX%%/etc/openvpn -maxdepth 1 -name '*.conf')
test ! -z "$2" && test -r "%%PREFIX%%/etc/openvpn/${2}.conf" && conflist="%%PREFIX%%/etc/openvpn/${2}.conf"
for conf in $conflist; do
serv="$(basename $conf .conf)"
pidfile="/var/run/openvpn/${serv}.pid"
run_rc_command "$1" "$serv"
done
#EOF

View File

@@ -0,0 +1,91 @@
#!/bin/sh
#
# PROVIDE: openvpn
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# This script supports running multiple instances of openvpn.
# To run additional instance link this script to something like
# % ln -s openvpn openvpn_foo
# and define additional openvpn_foo_* variables in one of
# /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/openvpn_foo
#
# Below NAME should be substituted with the name of this script. By default
# it is openvpn, so read as openvpn_enable. If you linked the script to
# openvpn_foo, then read as openvpn_foo_enable etc.
#
# The following variables are supported (defaults are shown).
# You can place them in any of
# /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/NAME
#
# NAME_enable="NO" # set to YES to enable openvpn
# NAME_if="" # driver(s) to load, set to "tun", "tap" or "tun tap"
#
# # optional:
# NAME_flags="" # additional command line arguments
# NAME_configfile="%%PREFIX%%/etc/openvpn/NAME.conf" # --config file
# NAME_dir="%%PREFIX%%/etc/openvpn" # --cd directory
#
# You also need to set NAME_configfile and NAME_dir, if the configuration
# file and directory where keys and certificates reside differ from the above
# settings.
#
# Note that we deliberately refrain from unloading drivers.
#
# For further documentation, please see openvpn(8).
#
. /etc/rc.subr
name="openvpn"
extra_commands="reload"
pidfile="/var/run/${name}.pid"
command="%%PREFIX%%/sbin/openvpn"
start_precmd="openvpn_start_precmd"
stop_postcmd="openvpn_stop_postcmd"
rcvar="${name}_enable"
openvpn_start_precmd()
{
for i in $interfaces ; do
# FreeBSD <= 5.4 does not know kldstat's -m option
# FreeBSD >= 6.0 does not add debug.* sysctl information
# in the default build - we check both to keep things simple
if ! sysctl debug.if_${i}_debug >/dev/null 2>&1 \
&& ! kldstat -m if_${i} >/dev/null 2>&1 ; then
if ! kldload if_${i} ; then
warn "Could not load $i module."
return 1
fi
fi
done
return 0
}
openvpn_stop_postcmd()
{
rm -f "$pidfile" || warn "Could not remove $pidfile."
}
load_rc_config aaaaa
: ${openvpn_enable="NO"}
: ${openvpn_flags=""}
: ${openvpn_if=""}
: ${openvpn_configfile="%%PREFIX%%/etc/openvpn/openvpn.conf"}
: ${openvpn_dir="%%PREFIX%%/etc/openvpn"}
configfile="${openvpn_configfile}"
dir="${openvpn_dir}"
interfaces="${openvpn_if}"
required_files=${configfile}
command_args="--cd ${dir} --daemon ${name} --config ${configfile} --writepid ${pidfile}"
run_rc_command "$1"
#EOF

View File

@@ -0,0 +1,11 @@
--- doc/man-sections/generic-options.rst.orig 2023-01-25 10:00:58 UTC
+++ doc/man-sections/generic-options.rst
@@ -507,5 +507,8 @@ which mode OpenVPN is configured as.
since it is usually used by other system services already. Always
create a dedicated user for openvpn.
+ The FreeBSD port creates a group and user named :code:`openvpn`
+ for this purpose.
+
--writepid file
Write OpenVPN's main process ID to ``file``.

View File

@@ -0,0 +1,13 @@
--- sample/sample-config-files/loopback-client.orig 2016-08-23 14:16:22 UTC
+++ sample/sample-config-files/loopback-client
@@ -9,8 +9,8 @@
# ./openvpn --config sample-config-files/loopback-client (In one window)
# ./openvpn --config sample-config-files/loopback-server (Simultaneously in another window)
-rport 16000
-lport 16001
+rport 16100
+lport 16101
remote localhost
local localhost
dev null

View File

@@ -0,0 +1,13 @@
--- sample/sample-config-files/loopback-server.orig 2016-08-23 14:16:22 UTC
+++ sample/sample-config-files/loopback-server
@@ -9,8 +9,8 @@
# ./openvpn --config sample-config-files/loopback-client (In one window)
# ./openvpn --config sample-config-files/loopback-server (Simultaneously in another window)
-rport 16001
-lport 16000
+rport 16101
+lport 16100
remote localhost
local localhost
dev null

View File

@@ -0,0 +1,10 @@
--- src/plugins/auth-pam/auth-pam.c.orig 2021-06-21 04:44:39 UTC
+++ src/plugins/auth-pam/auth-pam.c
@@ -39,6 +39,7 @@
#include <stdio.h>
#include <string.h>
#include <ctype.h>
+#include <limits.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>

View File

@@ -0,0 +1,65 @@
--- tests/t_cltsrv.sh.orig 2016-08-23 13:10:22 UTC
+++ tests/t_cltsrv.sh
@@ -1,7 +1,7 @@
#! /bin/sh
#
# t_cltsrv.sh - script to test OpenVPN's crypto loopback
-# Copyright (C) 2005, 2006, 2008 Matthias Andree
+# Copyright (C) 2005 - 2014 Matthias Andree
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -22,8 +22,9 @@ set -e
srcdir="${srcdir:-.}"
top_srcdir="${top_srcdir:-..}"
top_builddir="${top_builddir:-..}"
-trap "rm -f log.$$ log.$$.signal ; trap 0 ; exit 77" 1 2 15
-trap "rm -f log.$$ log.$$.signal ; exit 1" 0 3
+root="${top_srcdir}/sample"
+trap "rm -f ${root}/sample-config-files/loopback-*.test log.$$ log.$$.signal ; trap 0 ; exit 77" 1 2 15
+trap "a=\$? ; rm -f ${root}/sample-config-files/loopback-*.test log.$$ log.$$.signal ; test \$a = 0 && exit 1 || exit \$a" 0 3
addopts=
case `uname -s` in
FreeBSD)
@@ -45,18 +46,38 @@ esac
# make sure that the --down script is executable -- fail (rather than
# skip) test if it isn't.
downscript="../tests/t_cltsrv-down.sh"
-root="${top_srcdir}/sample"
test -x "${root}/${downscript}" || chmod +x "${root}/${downscript}" || { echo >&2 "${root}/${downscript} is not executable, failing." ; exit 1 ; }
echo "The following test will take about two minutes." >&2
echo "If the addresses are in use, this test will retry up to two times." >&2
+set -- $(ifconfig lo0 | grep -E '\<inet' | head -n1)
+add=
+if [ "x$1$2" = "x" ] ; then
+ echo >&2 "### NO ADDRESSES ON LOOPBACK INTERFACE lo0, SKIPPING TEST ###"
+ exit 77
+fi
+if [ "inet6" = "$1" ] ; then
+ add='proto udp6 '
+fi
+for i in server client ; do
+ sed -e "s|localhost|${2%/*}|" -e "/^remote /a\\
+$add" ${root}/sample-config-files/loopback-$i \
+ >${root}/sample-config-files/loopback-$i.test
+done
+
# go
success=0
for i in 1 2 3 ; do
set +e
(
- "${top_builddir}/src/openvpn/openvpn" --script-security 2 --cd "${root}" ${addopts} --setenv role srv --down "${downscript}" --tls-exit --ping-exit 180 --config "sample-config-files/loopback-server" &
- "${top_builddir}/src/openvpn/openvpn" --script-security 2 --cd "${top_srcdir}/sample" ${addopts} --setenv role clt --down "${downscript}" --tls-exit --ping-exit 180 --config "sample-config-files/loopback-client"
+ "${top_builddir}/src/openvpn/openvpn" --script-security 2 \
+ --cd "${root}" ${addopts} --setenv role srv \
+ --down "${downscript}" --tls-exit --ping-exit 180 \
+ --config "sample-config-files/loopback-server.test" &
+ "${top_builddir}/src/openvpn/openvpn" --script-security 2 \
+ --cd "${top_srcdir}/sample" ${addopts} --setenv role clt \
+ --down "${downscript}" --tls-exit --ping-exit 180 \
+ --config "sample-config-files/loopback-client.test"
) 3>log.$$.signal >log.$$ 2>&1
e1=$?
wait $!

View File

@@ -0,0 +1,19 @@
#!/bin/sh
set -x
OPENVPN_RUNDIR="%%OPENVPN_RUNDIR%%"
OPENVPN_LOGDIR="%%OPENVPN_LOGDIR%%"
OPENVPN_CONFDIR="%%OPENVPN_CONFDIR%%"
case $2 in
PRE-INSTALL)
install -d -o root -g wheel -m 0750 ${OPENVPN_RUNDIR}
install -d -o root -g wheel -m 0750 ${OPENVPN_LOGDIR}
install -d -o root -g wheel -m 0750 ${OPENVPN_CONFDIR}
;;
POST-INSTALL)
;;
esac
exit 0
#EOF

View File

@@ -0,0 +1,20 @@
### ------------------------------------------------------------------------
### The OpenVPN FreeBSD port, since v2.0.1, uses rcNG to start OpenVPN.
### Edit /etc/rc.conf to start OpenVPN automatically at system startup.
### See %%PREFIX%%/etc/rc.d/openvpn%%RCSFX%% for details.
### ------------------------------------------------------------------------
### To get OpenVPN 1.X to talk with the new 2.0 version, you may need to
### edit the 1.X configuration file by adding these lines:
### tun-mtu 1500
### tun-mtu-extra 32
### mssfix 1450
### key-method 2 <- this key-method line only for TLS setups
### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### WARNING: THE DEFAULT PORT HAS CHANGED AND IS NOW 1194!
### OpenVPN 1.6 and older used 5000 rather than 1194 as their default
### port, so add the proper port options to your configuration file!
### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### For further compatibility, see <http://openvpn.net/relnotes.html>
### ------------------------------------------------------------------------
### If you want to donate to OpenVPN: <http://openvpn.net/donate.html>
### ------------------------------------------------------------------------

View File

@@ -0,0 +1,29 @@
set -e
rcvers() {
# determine if we have "old" or "new" (rcorder integration) scheme
# for %%PREFIX%%/etc/rc.d/* files
if test $1 -ge 700007 || test $1 -lt 700000 -a $1 -ge 600101 ; then
echo 2
else
echo 1
fi
}
if [ "$2" = INSTALL ] ; then
# check if the base system is new enough for us,
# which should only matter for package installs.
buildrc=$(rcvers %%OSVERSION%%)
execrc=$(rcvers $(sysctl -n kern.osreldate) )
if test $buildrc -gt $execrc ; then
cat <<EOF
Error: this package, $1, was compiled for a newer FreeBSD
====== version that uses different boot scripts.
Therefore, the rc.d script WILL NOT WORK.
Please update your ports tree and install security/openvpn from there.
EOF
exit 1
fi
fi

View File

@@ -0,0 +1,27 @@
#!/bin/sh
# OpenVPN simple up/down script for openresolvconf integration.
# (C) Copyright 2016 Baptiste Daroussin
# BSD 2-clause license.
set -e +u
: ${script_type:=down}
case "${script_type}" in
up)
i=1
while :; do
eval option=\"\$foreign_option_${i}\" || break
[ "${option}" ] || break
set -- ${option}
i=$((i + 1))
[ "$1" = "dhcp-option" ] || continue
case "$2" in
DNS) echo "nameserver ${3}" ;;
DOMAIN) echo "domain ${3}" ;;
DOMAIN-SEARCH) echo "search ${3}" ;;
esac
done | /sbin/resolvconf -a "${dev}"
;;
down)
/sbin/resolvconf -d "${dev}" -f
;;
esac

10
net/openvpn/pkg-descr Normal file
View File

@@ -0,0 +1,10 @@
OpenVPN is a robust, scalable and highly configurable VPN (Virtual Private
Network) daemon which can be used to securely link two or more private networks
using an encrypted tunnel over the internet. It can operate over UDP or TCP,
can use SSL or a pre-shared secret to authenticate peers, and in SSL mode, one
server can handle many clients.
WWW: http://openvpn.net/
- Matthias Andree
matthias.andree@gmx.de

14
net/openvpn/pkg-plist Normal file
View File

@@ -0,0 +1,14 @@
include/openvpn-msg.h
include/openvpn-plugin.h
lib/openvpn/plugins/openvpn-plugin-auth-pam.la
lib/openvpn/plugins/openvpn-plugin-auth-pam.so
lib/openvpn/plugins/openvpn-plugin-down-root.la
lib/openvpn/plugins/openvpn-plugin-down-root.so
man/man5/openvpn-examples.5.gz
man/man8/openvpn.8.gz
sbin/openvpn
share/examples/openvpn/client.conf
share/examples/openvpn/server.conf
@dir lib/openvpn/plugins
@dir lib/openvpn
@dir share/examples/openvpn

61
net/v2ray/Makefile Normal file
View File

@@ -0,0 +1,61 @@
PORTNAME= v2ray
DISTVERSIONPREFIX= v
DISTVERSION= 5.47.0
CATEGORIES= net
MAINTAINER= shen.elf@gmail.com
COMMENT= Platform for building proxies to bypass network restrictions
WWW= https://www.v2ray.com
USES= go:modules
USE_GITHUB= yes
USE_RC_SUBR= v2ray
GH_ACCOUNT= v2fly
GH_PROJECT= v2ray-core
GH_TUPLE=
GO_BUILDFLAGS= -ldflags='${STRIP} -w'
GO_TARGET= ./main:v2ray
GO_TESTFLAGS= -p 1 -tags json -timeout 30m
#USERS= v2ray
#GROUPS= v2ray
OWNER= ${PORTNAME}
GROUP= ${PORTNAME}
OWNER_ID= 360
GROUP_ID= 360
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
PKGINSTALL= ${WRKDIR}/pkg-install
USE_RC_SUBR= ${PORTNAME}
SUB_FILES+= pkg-install pkg-deinstall
SUB_LIST+= OWNER=${OWNER}
SUB_LIST+= GROUP=${GROUP}
SUB_LIST+= OWNER_ID=${OWNER_ID}
SUB_LIST+= GROUP_ID=${GROUP_ID}
#PLIST_SUB+= LOCALSTATEDIR=${LOCALSTATEDIR}
#PLIST_SUB+= PREFIX=${PREFIX}
#SUB_LIST+= LOCALSTATEDIR=${LOCALSTATEDIR}
SUB_LIST+= PREFIX=${PREFIX}
#LOCALSTATEDIR= /var
#LAYOUT_FILE= ${WRKSRC}/config.layout
pre-build:
cd ${WRKSRC} && go mod vendor
post-install:
${MKDIR} ${STAGEDIR}${DATADIR}
${INSTALL_DATA} ${FILESDIR}/geoip.dat ${STAGEDIR}${DATADIR}/geoip.dat
${INSTALL_DATA} ${FILESDIR}/geosite.dat ${STAGEDIR}${DATADIR}/geosite.dat
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/release/config/config.json ${STAGEDIR}${EXAMPLESDIR}/config.json.sample
${INSTALL_DATA} ${WRKSRC}/release/config/vpoint_socks_vmess.json ${STAGEDIR}${EXAMPLESDIR}/vpoint_socks_vmess.json
${INSTALL_DATA} ${WRKSRC}/release/config/vpoint_vmess_freedom.json ${STAGEDIR}${EXAMPLESDIR}/vpoint_vmess_freedom.json
.include <bsd.port.mk>

3
net/v2ray/distinfo Normal file
View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1775142245
SHA256 (v2fly-v2ray-core-v5.47.0_GH0.tar.gz) = 90ef85f8f2c5478fc1e4f455b40eaf35a1738e06ef519b85a62c0763e2391405
SIZE (v2fly-v2ray-core-v5.47.0_GH0.tar.gz) = 1153223

BIN
net/v2ray/files/geoip.dat Normal file

Binary file not shown.

11242
net/v2ray/files/geosite.dat Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
#!/bin/sh
set -x
case $2 in
DEINSTALL)
;;
POST-DEINSTALL)
;;
esac
exit 0
#EOF

View File

@@ -0,0 +1,45 @@
#!/bin/sh
set -x
case $2 in
PRE-INSTALL)
GROUP="%%GROUP%%"
OWNER="%%OWNER%%"
GROUP_ID="%%GROUP_ID%%"
OWNER_ID="%%OWNER_ID%%"
PKG_PREFIX="%%PREFIX%%"
# LOCALSTATEDIR="%%LOCALSTATEDIR%%"
# PROXYDIR="%%LOCALSTATEDIR%%/cache/apache"
# RUNDIR="%%LOCALSTATEDIR%%/run/apache"
# LOGDIR="%%LOCALSTATEDIR%%/log/apache"
# DATADIR="%%LOCALSTATEDIR%%/www/apache"
NAME="xray"
SHELL="/usr/sbin/nologin"
pw group add ${GROUP} -g ${GROUP_ID}
pw group show ${GROUP}
pw user add ${OWNER} -u ${OWNER_ID} \
-g ${GROUP} \
-d ${PKG_PREFIX} \
-s "${SHELL}" -u ${OWNER_ID} \
-c "${NAME}"
pw group mod ${GROUP} -M ${OWNER}
pw user show ${OWNER}
pw group show ${GROUP}
# for dir in ${LOGDIR} ${PROXYDIR} ${RUNDIR}; do
# install -d -o ${OWNER} -g ${GROUP} -m 0750 ${dir}
# done
# install -d -o root -g wheel -m 0755 ${DATADIR}
;;
POST-INSTALL)
;;
esac
exit 0
#EOF

47
net/v2ray/files/v2ray.in Normal file
View File

@@ -0,0 +1,47 @@
#!/bin/sh
# PROVIDE: v2ray
# REQUIRE: LOGIN
# KEYWORD: shutdown
# Add these lines to /etc/rc.conf.local or /etc/rc.conf to enable `v2ray':
#
# v2ray_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable v2ray
# v2ray_config (path): Set to "%%PREFIX%%/etc/v2ray/config.json" by default
# Set it to the v2ray server config
# v2ray_logdir (path): Set to "/var/log/v2ray" by default.
# Set it to the directory of v2ray log files
# v2ray_env (str): Set to "" by default.
# Set it to the desired environment variables
. /etc/rc.subr
name="v2ray"
rcvar="${name}_enable"
: ${v2ray_enable="NO"}
: ${v2ray_config="%%PREFIX%%/etc/$name/config.json"}
: ${v2ray_logdir="/var/log/${name}"}
: ${v2ray_env=""}
: ${v2ray_user="%%OWNER%%"}
: ${v2ray_group="%%GROUP%%"}
asset_env="V2RAY_LOCATION_ASSET=%%PREFIX%%/share/$name"
pidfile="/var/run/$name.pid"
procname="%%PREFIX%%/bin/$name"
command="/usr/sbin/daemon"
command_args="-c -p ${pidfile} /usr/bin/env ${asset_env} ${v2ray_env} ${procname} run -config ${v2ray_config}"
required_files="${v2ray_config}"
start_precmd="v2ray_startprecmd"
v2ray_startprecmd() {
touch "${pidfile}"
chown ${v2ray_user}:${v2ray_group} "${pidfile}"
mkdir -p "${v2ray_logdir}"
chown -R ${v2ray_user}:${v2ray_group} "${v2ray_logdir}"
}
load_rc_config "$name"
run_rc_command "$1"

3
net/v2ray/pkg-descr Normal file
View File

@@ -0,0 +1,3 @@
Project V is a set of network tools that help you to build your
own computer network. It secures your network connections and
thus protects your privacy.

8
net/v2ray/pkg-plist Normal file
View File

@@ -0,0 +1,8 @@
bin/v2ray
share/examples/v2ray/config.json.sample
share/examples/v2ray/vpoint_socks_vmess.json
share/examples/v2ray/vpoint_vmess_freedom.json
share/v2ray/geoip.dat
share/v2ray/geosite.dat
@dir share/examples/v2ray
@dir share/v2ray

View File

@@ -0,0 +1,11 @@
--- lib/math.in.h.orig 2018-12-23 14:34:15 UTC
+++ lib/math.in.h
@@ -34,7 +34,7 @@
#endif
#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
+# include "config.h"
#endif
_GL_INLINE_HEADER_BEGIN
#ifndef _GL_MATH_INLINE