소스 검색

postfix: fix musl compatibility

The current package patches `makedefs` to probe for the existance
of the `nsl` and `resolv` libraries but uses the wrong variables
for the prefix, leading to `makedefs` probing the host directories,
not the staging dir ones.

Replace `$PKG_BUILD_DIR` with `$STAGING_DIR` to perform the library
tests in the correct directory.

Fixes the following error spotted by doing test builds against musl
which does not provide a `libnsl`:

    .../mips-openwrt-linux-musl/bin/ld: cannot find -lnsl
    collect2: error: ld returned 1 exit status
    make: *** [master] Error 1

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Jo-Philipp Wich 9 년 전
부모
커밋
abcadcbede
2개의 변경된 파일7개의 추가작업 그리고 7개의 파일을 삭제
  1. 2
    2
      mail/postfix/Makefile
  2. 5
    5
      mail/postfix/patches/500-crosscompile.patch

+ 2
- 2
mail/postfix/Makefile 파일 보기

@@ -1,5 +1,5 @@
1 1
 # 
2
-# Copyright (C) 2014 OpenWrt.org
2
+# Copyright (C) 2014-2015 OpenWrt.org
3 3
 #
4 4
 # This is free software, licensed under the GNU General Public License v2.
5 5
 # See /LICENSE for more information.
@@ -8,7 +8,7 @@
8 8
 include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=postfix
11
-PKG_RELEASE:=1
11
+PKG_RELEASE:=2
12 12
 PKG_SOURCE_URL:=ftp://ftp.porcupine.org/mirrors/postfix-release/official/
13 13
 PKG_VERSION:=3.0.1
14 14
 PKG_MD5SUM:=3ec1416e7d4fba9566297c8fcf7a348c

+ 5
- 5
mail/postfix/patches/500-crosscompile.patch 파일 보기

@@ -1,6 +1,6 @@
1
---- postfix-2.10.2/makedefs	2013-02-04 05:33:13.000000000 +0400
2
-+++ postfix-2.10.2_patched/makedefs	2013-11-19 22:48:50.528560454 +0400
3
-@@ -190,9 +190,9 @@
1
+--- a/makedefs
2
++++ b/makedefs
3
+@@ -190,9 +190,9 @@ error() {
4 4
  
5 5
  case $# in
6 6
   # Officially supported usage.
@@ -13,7 +13,7 @@
13 13
      case "$VERSION" in
14 14
       dcosx*) SYSTEM=$VERSION;;
15 15
      esac;;
16
-@@ -522,9 +522,9 @@
16
+@@ -522,9 +522,9 @@ EOF
17 17
  		esac
18 18
  		for name in nsl resolv
19 19
  		do
@@ -21,7 +21,7 @@
21 21
 +		    for lib in /usr/lib64 /usr/lib64/* /usr/lib /usr/lib/* /lib /lib/*
22 22
  		    do
23 23
 -			test -e $lib/lib$name.a -o -e $lib/lib$name.so && {
24
-+			test -e $PKG_BUILD_DIR/$lib/lib$name.a -o -e $PKG_BUILD_DIR/$lib/lib$name.so && {
24
++			test -e $STAGING_DIR/$lib/lib$name.a -o -e $STAGING_DIR/$lib/lib$name.so && {
25 25
  			    SYSLIBS="$SYSLIBS -l$name"
26 26
  			    break
27 27
  			}