-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathPortfile
203 lines (174 loc) · 7.32 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup cmake 1.1
PortGroup github 1.0
PortGroup legacysupport 1.1
PortGroup openssl 1.0
# clock_gettime
legacysupport.newest_darwin_requires_legacy 15
name syslog-ng-devel
github.setup syslog-ng syslog-ng d68f5a5146a0c4892a54eb466c93eb0c5be0cb58
version 2024.09.17
revision 0
set real_name syslog-ng
set real_version 4.8.0.157
conflicts ${real_name}
categories sysutils
license {GPL-2+ OpenSSLException}
maintainers {@barracuda156 gmail.com:vital.had} openmaintainer
description Highly configurable syslog replacement
long_description syslog-ng is the world's most flexible and scalable audit \
trail processing tool for organizations of any size. It \
provides a centralised, securely stored log of all devices \
on your network, whatever platform they run on. And \
syslog-ng also incorporates a host of powerful features, \
including filtering based on message content, as well as \
customisable data mining and analysis capabilities.
homepage https://www.syslog-ng.com
fetch.type git
post-fetch {
system -W ${worksrcpath} "git submodule update --init"
}
set py_ver 3.12
set py_ver_nodot [string map {. {}} ${py_ver}]
depends_build-append \
port:bison \
port:flex \
port:gettext \
port:gperf \
path:bin/pkg-config:pkgconfig \
port:python${py_ver_nodot}
depends_lib-append port:curl \
port:gettext-runtime \
path:lib/pkgconfig/glib-2.0.pc:glib2 \
port:hiredis \
port:ivykis \
port:json-c \
port:libdbi \
port:libesmtp \
port:libmaxminddb \
port:libnet \
port:librdkafka \
port:mongo-c-driver \
port:paho.mqtt.c \
port:pcre2 \
port:rabbitmq-c \
port:tcp_wrappers \
port:zlib
# https://github.com/syslog-ng/syslog-ng/pull/5094
patchfiles-append 0001-compat-add-inttypes.h-and-define-__STDC_FORMAT_MACRO.patch
startupitem.create yes
startupitem.executable ${prefix}/sbin/syslog-ng
startupitem.pidfile clean ${prefix}/var/syslog-ng.pid
compiler.c_standard 1999
compiler.cxx_standard 2017
# Do not enable testing by default; at the moment it uses
# criterion framework, which is broken on some platforms.
configure.args-append \
-DBUILD_TESTING=OFF \
-DENABLE_AFAMQP=ON \
-DENABLE_AFSMTP=ON \
-DENABLE_AFSNMP=ON \
-DENABLE_AFUSER=ON \
-DENABLE_APPMODEL=ON \
-DENABLE_AZURE_AUTH_HEADER=ON \
-DENABLE_CLOUD_AUTH=ON \
-DENABLE_CPP=ON \
-DENABLE_CURL=ON \
-DENABLE_DARWIN_OSL=OFF \
-DENABLE_EBPF=OFF \
-DENABLE_EXAMPLE_MODULES=OFF \
-DENABLE_GEOIP2=ON \
-DENABLE_GETENT=ON \
-DENABLE_GRPC=OFF \
-DENABLE_HOOK_COMMANDS=ON \
-DENABLE_IPV6=ON \
-DENABLE_JAVA=OFF \
-DENABLE_JAVA_MODULES=OFF \
-DENABLE_JOURNALD=OFF \
-DENABLE_JSON=ON \
-DENABLE_KAFKA=ON \
-DENABLE_MAP_VALUE_PAIRS=ON \
-DENABLE_MONGODB=ON \
-DENABLE_MQTT=ON \
-DENABLE_NATIVE=ON \
-DENABLE_OBJC=OFF \
-DENABLE_OPENBSD_SYS_DRIVER=OFF \
-DENABLE_PACCT=OFF \
-DENABLE_PYTHON=ON \
-DENABLE_PYTHON_MODULES=OFF \
-DENABLE_REDIS=ON \
-DENABLE_RIEMANN=OFF \
-DENABLE_SNMP=ON \
-DENABLE_SQL=ON \
-DENABLE_STARDATE=ON \
-DENABLE_STOMP=ON \
-DENABLE_XML=ON \
-DIVYKIS_SOURCE=system \
-DJSONC_SOURCE=system \
-DPYTHON_EXECUTABLE=${prefix}/bin/python${py_ver} \
-DWITH_COMPILE_DATE=OFF \
-DWITH_GETTEXT=ON
variant grpc description "Enable GRPC modules" {
depends_lib-append \
port:abseil \
port:c-ares \
port:grpc \
port:protobuf3-cpp \
port:re2
configure.args-replace \
-DENABLE_GRPC=OFF -DENABLE_GRPC=ON
}
variant osl description "Enable support for OSLog" {
configure.args-replace \
-DENABLE_DARWIN_OSL=OFF -DENABLE_DARWIN_OSL=ON \
-DENABLE_OBJC=OFF -DENABLE_OBJC=ON
}
# Clangs fail to build these, at least with Apple libc++.
# https://github.com/syslog-ng/syslog-ng/issues/5104
if {[string match *clang* ${configure.compiler}]} {
configure.args-replace \
-DENABLE_AFSNMP=ON -DENABLE_AFSNMP=OFF
}
if {[string match *gcc* ${configure.compiler}]} {
default_variants-append +grpc
}
# OSLog supported in 10.10+. No point in enabling this earlier.
# Also, it does not presently build with gcc.
# https://github.com/syslog-ng/syslog-ng/issues/5093
if {(${os.platform} eq "darwin" && ${os.major} > 13) \
&& ![string match *gcc* ${configure.compiler}]} {
default_variants-append +osl
}
post-destroot {
xinstall -m 644 ${filespath}/syslog-ng.conf-dist ${destroot}${prefix}/etc/
reinplace "s|%VERSION%|${real_version}|g" ${destroot}${prefix}/etc/syslog-ng.conf-dist
# https://github.com/syslog-ng/syslog-ng/issues/5100
foreach dylib [ exec find ${destroot}${prefix}/lib/syslog-ng -name "\*.dylib" ] {
regsub ":$" ${dylib} "" destroot_dylib_path
regsub ${destroot} ${destroot_dylib_path} "" dylib_path
system "install_name_tool -id ${dylib_path} ${destroot_dylib_path}"
}
if {[variant_isset grpc]} {
foreach module { libbigquery.dylib libloki.dylib libotel.dylib } {
system "install_name_tool -change ${prefix}/lib/libgrpc-protos.dylib \
${prefix}/lib/syslog-ng/libgrpc-protos.dylib \
${destroot}${prefix}/lib/syslog-ng/${module}"
}
}
xinstall -d ${destroot}${prefix}/share/doc/${name}
xinstall -m 644 -W ${worksrcpath} README.md AUTHORS COPYING NEWS.md \
GPL.txt LGPL.txt ${destroot}${prefix}/share/doc/${name}
}
post-activate {
if {![file exists ${prefix}/etc/syslog-ng.conf]} {
copy ${prefix}/etc/syslog-ng.conf-dist ${prefix}/etc/syslog-ng.conf
}
}
notes \
"To use syslog-ng, first unload OS X's built-in syslog daemon:
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.syslogd.plist
Then customize ${prefix}/etc/syslog-ng.conf,
and
sudo load syslog-ng
"