postfix: fix build on macos
macos build fails due to two reasons: 1. using build host ar and ranlib tools 2. using uname -r to get kernel version First issue is fixed by specifying ar and ranlib from toolchain Second issue is fixed by specifying kernel release major version=5 Using 'uname -r' from build host for cross-compiling is not a good idea even for Linux build host Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
This commit is contained in:
parent
ad608b5ca7
commit
9d8171aa06
2 changed files with 6 additions and 4 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=postfix
|
PKG_NAME:=postfix
|
||||||
PKG_VERSION:=3.5.8
|
PKG_VERSION:=3.5.8
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:= \
|
PKG_SOURCE_URL:= \
|
||||||
|
|
|
@ -5,15 +5,17 @@
|
||||||
case $# in
|
case $# in
|
||||||
# Officially supported usage.
|
# Officially supported usage.
|
||||||
- 0) SYSTEM=`(uname -s) 2>/dev/null`
|
- 0) SYSTEM=`(uname -s) 2>/dev/null`
|
||||||
+ 0) SYSTEM="OpenWRT"
|
+ 0) SYSTEM="OpenWrt"
|
||||||
RELEASE=`(uname -r) 2>/dev/null`
|
RELEASE=`(uname -r) 2>/dev/null`
|
||||||
# No ${x%%y} support in Solaris 11 /bin/sh
|
# No ${x%%y} support in Solaris 11 /bin/sh
|
||||||
RELEASE_MAJOR=`expr "$RELEASE" : '\([0-9]*\)'` || exit 1
|
RELEASE_MAJOR=`expr "$RELEASE" : '\([0-9]*\)'` || exit 1
|
||||||
@@ -242,6 +242,15 @@ case "$SYSTEM" in
|
@@ -242,6 +242,17 @@ case "$SYSTEM" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "$SYSTEM.$RELEASE" in
|
case "$SYSTEM.$RELEASE" in
|
||||||
+ OpenWRT*) SYSTYPE=LINUX$RELEASE_MAJOR
|
+ OpenWrt*) SYSTYPE=LINUX5
|
||||||
|
+ AR="${CC-gcc}-ar"
|
||||||
|
+ RANLIB="${CC-gcc}-ranlib"
|
||||||
+ SYSLIBS="$SYSLIBS -ldl"
|
+ SYSLIBS="$SYSLIBS -ldl"
|
||||||
+ : ${SHLIB_SUFFIX=.so}
|
+ : ${SHLIB_SUFFIX=.so}
|
||||||
+ : ${SHLIB_CFLAGS=-fPIC}
|
+ : ${SHLIB_CFLAGS=-fPIC}
|
||||||
|
|
Loading…
Reference in a new issue