You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make Asterisk compile successfully with FreeBSD. Since there is still
an issue with the GitHub CI not detecting the uuid package, the FreeBSD
build remains disabled in the CI, but should work if installing on a
regular FreeBSD system. Issues remain with actually running it; the
enclosed changes fix compilation issues only.
PREREQ_PACKAGES="$PREREQ_PACKAGES ntp tcpdump mpg123 bind-tools"# bind-tools for dig
958
959
fi
@@ -1070,7 +1071,7 @@ install_freepbx_checks() {
1070
1071
fi
1071
1072
if [ -f$AST_CONFIG_DIR/extensions.conf ];then
1072
1073
if [ "$FORCE_INSTALL"!="1" ];then
1073
-
echoerr "An existing /etc/asterisk/extensions.conf has been detected on the file system. Installing FreePBX will overwrite ALL OF YOUR CONFIGURATION!!!"
1074
+
echoerr "An existing $AST_CONFIG_DIR/extensions.conf has been detected on the file system. Installing FreePBX will overwrite ALL OF YOUR CONFIGURATION!!!"
1074
1075
printf"%s\n""If this is intended, rerun the command with the -f or --force flag. Be sure to backup your configuration first if desired."
1075
1076
exit 2
1076
1077
fi
@@ -1124,9 +1125,9 @@ uninstall_freepbx() {
1124
1125
# rm -rf /var/lib/asterisk/bin/* # there could be other stuff in here
niceval="-15"# -15 to speed up compilation by increasing CPU priority.
3192
3206
fi
3193
3207
if [ "$OS_DIST_INFO"="FreeBSD" ];then
3194
-
nice $AST_MAKE ASTLDFLAGS=-lcrypt main
3208
+
# For some reason, %%LIBSYSINFO%% is in the linking flags on FreeBSD, remove that from being added. libsysinfo is needed though.
3209
+
# Same with HAVE_CRYPT_R, that's not available but gets detected, so undetect it
3210
+
# Note that these sed expressions are designed for BSD sed, and do not work with GNU sed
3211
+
sed -i '''/LIBSYSINFO/d' main/Makefile
3212
+
sed -i '''/HAVE_CRYPT_R/d' include/asterisk/autoconfig.h
3213
+
sed -i "" -e 's|WRAP_LIBC_MALLOC|ASTMM_LIBC ASTMM_REDIRECT|g' addons/mp3/interface.c # for format_mp3
3214
+
sed -i "" -e 's|\\s|s|g' build_tools/make_xml_documentation # fix sed command in this script to remove the backslash for BSD sed
3215
+
nice $AST_MAKE"ASTLDFLAGS=-lcrypt -lsysinfo" main
3216
+
if [ $?-eq 0 ];then
3217
+
nice $AST_MAKE -j$(nproc)# compile Asterisk. This is the longest step, if you are installing for the first time. Also, don't let it take over the server.
3218
+
fi
3195
3219
else
3196
3220
nice $AST_MAKE -j$(nproc) main # compile 'main' subdirectory first
0 commit comments