diff options
Diffstat (limited to 'net/asterisk22/files/patch-Makefile')
-rw-r--r-- | net/asterisk22/files/patch-Makefile | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/net/asterisk22/files/patch-Makefile b/net/asterisk22/files/patch-Makefile new file mode 100644 index 000000000000..30def8923871 --- /dev/null +++ b/net/asterisk22/files/patch-Makefile @@ -0,0 +1,135 @@ +--- Makefile.orig 2022-08-18 15:18:29 UTC ++++ Makefile +@@ -144,7 +144,7 @@ ASTTOPDIR:=$(subst $(space),\$(space),$(CURDIR)) + OVERWRITE=y + + # Include debug and macro symbols in the executables (-g) and profiling info (-pg) +-DEBUG=-g3 ++#DEBUG=-g3 + + # Asterisk.conf is located in ASTETCDIR or by using the -C flag + # when starting Asterisk +@@ -168,7 +168,7 @@ LINKER_SYMBOL_PREFIX= + #_ASTCFLAGS+=-DOLD_DSP_ROUTINES + + # Default install directory for DAHDI hooks. +-DAHDI_UDEV_HOOK_DIR = /usr/share/dahdi/span_config.d ++#DAHDI_UDEV_HOOK_DIR = /usr/share/dahdi/span_config.d + + # If the file .asterisk.makeopts is present in your home directory, you can + # include all of your favorite menuselect options so that every time you download +@@ -226,12 +226,6 @@ else ifneq ($(findstring BSD,$(OSARCH)),) + _ASTCFLAGS+=-isystem /usr/local/include + endif + +-ifeq ($(OSARCH),FreeBSD) +- # -V is understood by BSD Make, not by GNU make. +- BSDVERSION=$(shell make -V OSVERSION -f /usr/share/mk/bsd.port.subdir.mk) +- _ASTCFLAGS+=$(shell if test $(BSDVERSION) -lt 500016 ; then echo "-D_THREAD_SAFE"; fi) +-endif +- + ifeq ($(OSARCH),NetBSD) + _ASTCFLAGS+=-pthread -D__LIBPTHREAD_SOURCE__ -I/usr/pkg/include + endif +@@ -475,8 +469,12 @@ endif + $(INSTALL) -m 644 $$n "$(DESTDIR)$(ASTDATADIR)/static-http/docs" ; \ + done \ + fi ++ if [ ! -d $(DESTDIR)$(DOCSDIR)/images ]; then \ ++ $(MKDIR) $(DESTDIR)$(DOCSDIR)/images; \ ++ fi ++ + for x in images/*.jpg; do \ +- $(INSTALL) -m 644 $$x "$(DESTDIR)$(ASTDATADIR)/images" ; \ ++ $(INSTALL) -m 644 $$x "$(DESTDIR)$(DOCSDIR)/images" ; \ + done + $(MAKE) -C sounds install + find rest-api -name "*.json" | while read x; do \ +@@ -545,7 +543,7 @@ INSTALLDIRS="$(ASTLIBDIR)" "$(ASTMODDIR)" "$(ASTSBINDI + "$(ASTDATADIR)/firmware/iax" "$(ASTDATADIR)/images" "$(ASTDATADIR)/keys" \ + "$(ASTDATADIR)/phoneprov" "$(ASTDATADIR)/rest-api" "$(ASTDATADIR)/static-http" \ + "$(ASTDATADIR)/sounds" "$(ASTDATADIR)/moh" "$(ASTMANDIR)/man8" "$(AGI_DIR)" "$(ASTDBDIR)" \ +- "$(ASTDATADIR)/third-party" "${ASTDATADIR}/keys/stir_shaken" "${ASTDATADIR}/keys/stir_shaken/cache" ++ "$(ASTDATADIR)/third-party" "${ASTDATADIR}/keys/stir_shaken" "$(ASTSPOOLDIR)/outgoing" + + installdirs: + @for i in $(INSTALLDIRS); do \ +@@ -557,7 +555,7 @@ installdirs: + main-bininstall: + +@DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" ASTLIBDIR="$(ASTLIBDIR)" $(SUBMAKE) -C main bininstall + +-bininstall: _all installdirs $(SUBDIRS_INSTALL) main-bininstall ++bininstall: _all installdirs $(SUBDIRS_INSTALL) main-bininstall install-headers + $(INSTALL) -m 755 contrib/scripts/astversion "$(DESTDIR)$(ASTSBINDIR)/" + $(INSTALL) -m 755 contrib/scripts/astgenkey "$(DESTDIR)$(ASTSBINDIR)/" + $(INSTALL) -m 755 contrib/scripts/autosupport "$(DESTDIR)$(ASTSBINDIR)/" +@@ -578,10 +576,10 @@ endif + if [ -f contrib/firmware/iax/iaxy.bin ] ; then \ + $(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin "$(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin"; \ + fi +-ifeq ($(HAVE_DAHDI),1) +- $(INSTALL) -d $(DESTDIR)/$(DAHDI_UDEV_HOOK_DIR) +- $(INSTALL) -m 644 contrib/scripts/dahdi_span_config_hook $(DESTDIR)$(DAHDI_UDEV_HOOK_DIR)/40-asterisk +-endif ++#ifeq ($(HAVE_DAHDI),1) ++# $(INSTALL) -d $(DESTDIR)/$(DAHDI_UDEV_HOOK_DIR) ++# $(INSTALL) -m 644 contrib/scripts/dahdi_span_config_hook $(DESTDIR)$(DAHDI_UDEV_HOOK_DIR)/40-asterisk ++#endif + + $(SUBDIRS_INSTALL): + +@DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" ASTDATADIR="$(ASTDATADIR)" $(SUBMAKE) -C $(@:-install=) install +@@ -706,7 +704,7 @@ ifeq ($(ASTERISKVERSION),UNKNOWN__git_check_fail) + endif + + +-install: badshell versioncheck bininstall datafiles ++install: badshell versioncheck bininstall datafiles samples + @if [ -x /usr/sbin/asterisk-post-install ]; then \ + /usr/sbin/asterisk-post-install "$(DESTDIR)" . ; \ + fi +@@ -751,23 +749,10 @@ upgrade: bininstall + # (2) the extension to strip off + define INSTALL_CONFIGS + @for x in $(1)/*$(2); do \ +- dst="$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x $(2)`"; \ +- if [ -f "$${dst}" ]; then \ +- if [ "$(OVERWRITE)" = "y" ]; then \ +- if cmp -s "$${dst}" "$$x" ; then \ +- echo "Config file $$x is unchanged"; \ +- continue; \ +- fi ; \ +- mv -f "$${dst}" "$${dst}.old" ; \ +- else \ +- echo "Skipping config file $$x"; \ +- continue; \ +- fi ;\ +- fi ; \ + echo "Installing file $$x"; \ +- $(INSTALL) -m 644 "$$x" "$${dst}" ;\ ++ $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample`.sample ; \ + done ; \ +- if [ "$(OVERWRITE)" = "y" ]; then \ ++ if true; then \ + echo "Updating asterisk.conf" ; \ + sed -e 's|^astcachedir.*$$|astcachedir => $(ASTCACHEDIR)|' \ + -e 's|^astetcdir.*$$|astetcdir => $(ASTETCDIR)|' \ +@@ -781,8 +766,8 @@ define INSTALL_CONFIGS + -e 's|^astrundir.*$$|astrundir => $(ASTVARRUNDIR)|' \ + -e 's|^astlogdir.*$$|astlogdir => $(ASTLOGDIR)|' \ + -e 's|^astsbindir.*$$|astsbindir => $(ASTSBINDIR)|' \ +- "$(DESTDIR)$(ASTCONFPATH)" > "$(DESTDIR)$(ASTCONFPATH).tmp" ; \ +- $(INSTALL) -m 644 "$(DESTDIR)$(ASTCONFPATH).tmp" "$(DESTDIR)$(ASTCONFPATH)" ; \ ++ "$(DESTDIR)$(ASTCONFPATH).sample" > "$(DESTDIR)$(ASTCONFPATH).tmp" ; \ ++ $(INSTALL) -m 644 "$(DESTDIR)$(ASTCONFPATH).tmp" "$(DESTDIR)$(ASTCONFPATH).sample" ; \ + rm -f "$(DESTDIR)$(ASTCONFPATH).tmp" ; \ + fi + endef +@@ -816,7 +801,7 @@ adsi: + else \ + echo "Installing $$x" ; \ + fi ; \ +- $(INSTALL) -m 644 "$$x" "$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`" ; \ ++ $(INSTALL) -m 644 "$$x" "$(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x`.sample" ; \ + done + + samples: adsi |