- Update `www/rejik' to version 3.2.12 and undeprecate

- Fix the build with -fno-common, drop no longer needed USE_GCC
This commit is contained in:
Alexey Dokuchaev 2020-10-05 16:30:49 +00:00
parent 08a8ef0695
commit 7a7f14d4cf
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=551503
9 changed files with 202 additions and 9 deletions

View File

@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= rejik
PORTVERSION= 3.2.11
PORTREVISION= 9
PORTVERSION= 3.2.12
CATEGORIES= www
MASTER_SITES= http://www.rejik.ru/download/
DISTNAME= redirector-${PORTVERSION}_squid_3.4
@ -13,16 +12,11 @@ COMMENT= Squid redirector used for blocking unwanted content
LICENSE= BSD4CLAUSE
DEPRECATED= Abandonware, requires MAKE_JOBS_UNSAFE, -fcommon,...
EXPIRATION_DATE=2020-10-05
RUN_DEPENDS= ${LOCALBASE}/sbin/squid:www/squid
LIB_DEPENDS= libpcre.so:devel/pcre
USES= perl5 tar:tgz
USE_GCC= any
MAKE_ARGS= CC=${CC} INSTALL_PATH=${PREFIX}/rejik3
CFLAGS+= -fcommon
USERS= squid
GROUPS= squid

View File

@ -1,2 +1,3 @@
SHA256 (redirector-3.2.11_squid_3.4.tgz) = f6659d1c68f13c600ecd1736ac249c93eb91c6d834607caf3ecdba690cdcf771
SIZE (redirector-3.2.11_squid_3.4.tgz) = 44790
TIMESTAMP = 1458543356
SHA256 (redirector-3.2.12_squid_3.4.tgz) = 188b7b40a7ea27223dda2118db296ef97439ca4b1627014d6c0ff62c58e9e27c
SIZE (redirector-3.2.12_squid_3.4.tgz) = 45808

View File

@ -0,0 +1,36 @@
--- get_opt.c.orig 2013-11-15 10:28:02 UTC
+++ get_opt.c
@@ -5,6 +5,33 @@
#include <string.h>
#include "vars.h"
+int sections_count;
+char *chg_log;
+FILE *change_log;
+
+char **work_id;
+int work_id_count;
+int work_id_flag;
+
+char **allow_id;
+int allow_id_count;
+
+char *work_ip;
+int work_ip_count;
+int work_ip_flag;
+
+char *allow_ip;
+int allow_ip_count;
+
+int write_hostname_to_log;
+char *makecache;
+char *err_log;
+char *allow_urls_file;
+
+char **change_from;
+char **change_to;
+int change_count;
+int raw_change_log_flag;
void get_opt(char* config_file)
{

View File

@ -0,0 +1,11 @@
--- id.c.orig 2013-11-15 10:28:02 UTC
+++ id.c
@@ -5,6 +5,8 @@
#include <string.h>
#include "vars.h"
+char *input_ident_un;
+
int add_id(char *string,char ***id_list,int *count)
{
char tmp[ML_CFG],etmp[ML_ETMP], *k;

View File

@ -0,0 +1,17 @@
--- init_vars.c.orig 2013-11-15 10:28:02 UTC
+++ init_vars.c
@@ -1,6 +1,14 @@
#include <stdlib.h>
#include "vars.h"
+char *change_reason;
+struct p_url *i_url;
+char *input_url;
+char *input_url_un;
+char *input_ident;
+char *input_host;
+char *input_method;
+
void init_vars(void)
{
write_hostname_to_log=0;

View File

@ -0,0 +1,11 @@
--- ip.c.orig 2013-11-15 10:28:02 UTC
+++ ip.c
@@ -3,6 +3,8 @@
#include <string.h>
#include "vars.h"
+char *input_ip;
+
int add_ip(char *string,char **ip_list,int *count)
{
char *k,*k1,tmp[ML_CFG],etmp[ML_ETMP];

View File

@ -0,0 +1,11 @@
--- make-cache.c.orig 2013-11-15 10:28:02 UTC
+++ make-cache.c
@@ -2,6 +2,8 @@
#include <string.h>
#include "vars.h"
+struct section **redir;
+
/***************************************
********** Start MAIN function ********/
int main(int argc, char* argv[])

View File

@ -0,0 +1,12 @@
--- redirector.c.orig 2013-11-15 10:28:02 UTC
+++ redirector.c
@@ -4,6 +4,9 @@
#include <errno.h>
#include "vars.h"
+struct section **redir;
+char **allow_urls;
+int allow_urls_count;
/***************************************
********** Start MAIN function ********/

View File

@ -0,0 +1,100 @@
--- vars.h.orig 2016-03-21 06:49:53 UTC
+++ vars.h
@@ -48,23 +48,23 @@
#define ML_2LD 200
#define ML_SUBDOMEN 512
-FILE *change_log;
+extern FILE *change_log;
-char *input_ident;
-char *input_ident_un;
-char *input_ip;
-char *input_url;
-char *input_url_un;
+extern char *input_ident;
+extern char *input_ident_un;
+extern char *input_ip;
+extern char *input_url;
+extern char *input_url_un;
#ifdef CASE_INDEPENDENT
char *input_url_uc;
#endif
-char *input_method;
-char *input_host;
-struct p_url *i_url;
+extern char *input_method;
+extern char *input_host;
+extern struct p_url *i_url;
-char *change_reason;
+extern char *change_reason;
/*****************************************************************
@@ -82,40 +82,38 @@ struct p_url
};
//GLOBAL OPTIONS
-char *err_log; // Error log path
-char *chg_log; // Change log path
-char *makecache; // make-cache program
+extern char *err_log; // Error log path
+extern char *chg_log; // Change log path
+extern char *makecache; // make-cache program
-char *work_ip; //Work ip
-int work_ip_count; //Work ip count
-int work_ip_flag; //Work ip flag
+extern char *work_ip; //Work ip
+extern int work_ip_count; //Work ip count
+extern int work_ip_flag; //Work ip flag
-char *allow_ip; //Allow ip
-int allow_ip_count; //Allow ip count
+extern char *allow_ip; //Allow ip
+extern int allow_ip_count; //Allow ip count
-char **work_id; //Work id
-int work_id_count; //Work id count
-int work_id_flag; //Work id flag
+extern char **work_id; //Work id
+extern int work_id_count; //Work id count
+extern int work_id_flag; //Work id flag
-char **allow_id; //Allow id
-int allow_id_count; //Allow id count
+extern char **allow_id; //Allow id
+extern int allow_id_count; //Allow id count
-char *allow_urls_file; //Allow urls file name
-char **allow_urls; //Allow urls
-int allow_urls_count; //Allow urls count
+extern char *allow_urls_file; //Allow urls file name
+extern char **allow_urls; //Allow urls
+extern int allow_urls_count; //Allow urls count
-char **change_from; //
-char **change_to; // Change data
-int change_count; //
-int raw_change_log_flag; //
+extern char **change_from; //
+extern char **change_to; // Change data
+extern int change_count; //
+extern int raw_change_log_flag; //
-int sections_count; //Count of sections in config
+extern int write_hostname_to_log; // Write hostname to log flag
-int write_hostname_to_log; // Write hostname to log flag
-
//SECTIONS OPTIONS
-int sections_count; //Count of sections in config
-struct section
+extern int sections_count; //Count of sections in config
+extern struct section
{
char *name; //Header name
char *ban_dir; //Ban lists dir