net/asterisk-11.x and net/asterisk-13.x: fix LOW_MEMORY, drop patch
authorSebastian Kemper <sebastian_ml@gmx.net>
Fri, 28 Jul 2017 19:45:25 +0000 (21:45 +0200)
committerSebastian Kemper <sebastian_ml@gmx.net>
Fri, 28 Jul 2017 19:45:55 +0000 (21:45 +0200)
LOW_MEMORY can't be enabled by defining it in ASTCFLAGS. This can be
verified in the headers Asterisk installs: LOW_MEMORY actually is not
defined (it would be if LOW_MEMORY was enabled).

LOW_MEMORY can be enabled successfully with menuselect. This commit
makes menuselect usable and calls it to enable LOW_MEMORY.

This commit also disables BUILD_NATIVE with menuselect. So even if
configure detects that -march=native is available, it won't be used.
This means the configure.ac patch that was added previously can be
dropped.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
net/asterisk-11.x/Makefile
net/asterisk-11.x/patches/054-fix-cross-compile.patch [deleted file]
net/asterisk-13.x/Makefile
net/asterisk-13.x/patches/054-fix-cross-compile.patch [deleted file]

index 5dc0374169dd17ff3d18babfd08f8d955b794c16..366685c1e6049bc94856991102622bacc351062f 100644 (file)
@@ -323,10 +323,16 @@ define Build/Compile
        CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOSTPKG)/include/libxml2" \
        LDFLAGS="$(HOST_LDFLAGS) -Wl,-rpath,$(STAGING_DIR_HOSTPKG)/lib" \
        $(MAKE) -C "$(PKG_BUILD_DIR)/menuselect"
+       $(MAKE) -C "$(PKG_BUILD_DIR)" menuselect-tree
+       cd "$(PKG_BUILD_DIR)" && \
+               ./menuselect/menuselect \
+                       --disable BUILD_NATIVE \
+                       --enable LOW_MEMORY \
+                       menuselect.makeopts
        $(MAKE) -C "$(PKG_BUILD_DIR)" include/asterisk/version.h \
                include/asterisk/buildopts.h defaults.h \
                makeopts.embed_rules
-       ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY" \
+       ASTCFLAGS="$(EXTRA_CFLAGS)" \
        ASTLDFLAGS="$(EXTRA_LDFLAGS)" \
        $(MAKE) -C "$(PKG_BUILD_DIR)" \
                ASTVARLIBDIR="/usr/lib/asterisk" \
diff --git a/net/asterisk-11.x/patches/054-fix-cross-compile.patch b/net/asterisk-11.x/patches/054-fix-cross-compile.patch
deleted file mode 100644 (file)
index 92e83eb..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -1104,7 +1104,10 @@ fi
- AC_SUBST(AST_SHADOW_WARNINGS)
- AC_MSG_CHECKING(for -march=native support)
--if $(${CC} -march=native -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
-+if test "${cross_compiling}" = "yes"; then
-+      AC_MSG_RESULT(cross-compile)
-+      AST_NATIVE_ARCH=0
-+elif $(${CC} -march=native -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
-       AC_MSG_RESULT(yes)
-       AST_NATIVE_ARCH=1
- else
index 13614fd6e16256d8ccae965a62f59293788c11b9..6400c6b0d17bf8e5f4d0307f0e148739e5b21f93 100644 (file)
@@ -264,10 +264,16 @@ define Build/Compile
        CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOSTPKG)/include/libxml2" \
        LDFLAGS="$(HOST_LDFLAGS) -Wl,-rpath,$(STAGING_DIR_HOSTPKG)/lib" \
        $(MAKE) -C "$(PKG_BUILD_DIR)/menuselect"
+       $(MAKE) -C "$(PKG_BUILD_DIR)" menuselect-tree
+       cd "$(PKG_BUILD_DIR)" && \
+               ./menuselect/menuselect \
+                       --disable BUILD_NATIVE \
+                       --enable LOW_MEMORY \
+                       menuselect.makeopts
        $(MAKE) -C "$(PKG_BUILD_DIR)" \
                include/asterisk/version.h \
                include/asterisk/buildopts.h defaults.h
-       ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY" \
+       ASTCFLAGS="$(EXTRA_CFLAGS)" \
        ASTLDFLAGS="$(EXTRA_LDFLAGS)" \
        $(MAKE) -C "$(PKG_BUILD_DIR)" \
                ASTVARLIBDIR="/usr/lib/asterisk" \
diff --git a/net/asterisk-13.x/patches/054-fix-cross-compile.patch b/net/asterisk-13.x/patches/054-fix-cross-compile.patch
deleted file mode 100644 (file)
index dd1f2ea..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/configure.ac
-+++ b/configure.ac
-@@ -1226,7 +1226,10 @@ fi
- AC_SUBST(AST_SHADOW_WARNINGS)
- AC_MSG_CHECKING(for -march=native support)
--if $(${CC} -march=native -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
-+if test "${cross_compiling}" = "yes"; then
-+      AC_MSG_RESULT(cross-compile)
-+      AST_NATIVE_ARCH=0
-+elif $(${CC} -march=native -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then
-       AC_MSG_RESULT(yes)
-       AST_NATIVE_ARCH=1
- else