Sun Apr 28 13:39:09 2013 UTC ()
Let to find libraires in COMPILER_LIB_DIRS instead of hard coded paths.


(obache)
diff -r1.10 -r1.11 pkgsrc/mk/buildlink3/find-libs.mk

cvs diff -r1.10 -r1.11 pkgsrc/mk/buildlink3/find-libs.mk (expand / switch to unified diff)

--- pkgsrc/mk/buildlink3/find-libs.mk 2012/04/23 08:44:00 1.10
+++ pkgsrc/mk/buildlink3/find-libs.mk 2013/04/28 13:39:09 1.11
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: find-libs.mk,v 1.10 2012/04/23 08:44:00 sbd Exp $ 1# $NetBSD: find-libs.mk,v 1.11 2013/04/28 13:39:09 obache Exp $
2# 2#
3# Copyright (c) 2005 The NetBSD Foundation, Inc. 3# Copyright (c) 2005 The NetBSD Foundation, Inc.
4# All rights reserved. 4# All rights reserved.
5# 5#
6# This code is derived from software contributed to The NetBSD Foundation 6# This code is derived from software contributed to The NetBSD Foundation
7# by Johnny C. Lam. 7# by Johnny C. Lam.
8# 8#
9# Redistribution and use in source and binary forms, with or without 9# Redistribution and use in source and binary forms, with or without
10# modification, are permitted provided that the following conditions 10# modification, are permitted provided that the following conditions
11# are met: 11# are met:
12# 1. Redistributions of source code must retain the above copyright 12# 1. Redistributions of source code must retain the above copyright
13# notice, this list of conditions and the following disclaimer. 13# notice, this list of conditions and the following disclaimer.
14# 2. Redistributions in binary form must reproduce the above copyright 14# 2. Redistributions in binary form must reproduce the above copyright
@@ -51,44 +51,27 @@ @@ -51,44 +51,27 @@
51# # ${BUILTIN_LIB_FOUND.intl} and ${BUILTIN_LIB_FOUND.iconv} are now 51# # ${BUILTIN_LIB_FOUND.intl} and ${BUILTIN_LIB_FOUND.iconv} are now
52# # either "yes" or "no". 52# # either "yes" or "no".
53# 53#
54 54
55.if empty(USE_TOOLS:Mecho) 55.if empty(USE_TOOLS:Mecho)
56USE_TOOLS+= echo 56USE_TOOLS+= echo
57.endif 57.endif
58.if empty(USE_TOOLS:Mtest) 58.if empty(USE_TOOLS:Mtest)
59USE_TOOLS+= test 59USE_TOOLS+= test
60.endif 60.endif
61 61
62.for _lib_ in ${BUILTIN_FIND_LIBS} 62.for _lib_ in ${BUILTIN_FIND_LIBS}
63. if !defined(BUILTIN_LIB_FOUND.${_lib_}) 63. if !defined(BUILTIN_LIB_FOUND.${_lib_})
64. if ${OPSYS} == "Haiku" && defined(BELIBRARIES) && !empty(BELIBRARIES) 
65BUILTIN_LIB_FOUND.${_lib_}= no 64BUILTIN_LIB_FOUND.${_lib_}= no
66. for _path_ in ${BELIBRARIES:S/:/ /g} 65. for _path_ in ${COMPILER_LIB_DIRS}
67. if ${BUILTIN_LIB_FOUND.${_lib_}} == "no" 66. if ${BUILTIN_LIB_FOUND.${_lib_}} == "no"
68BUILTIN_LIB_FOUND.${_lib_}!= \ 67BUILTIN_LIB_FOUND.${_lib_}!= \
69 if ${TEST} "`${ECHO} ${_path_}/lib${_lib_}.*`" != "${_path_}/lib${_lib_}.*"; then \ 68 if ${TEST} "`${ECHO} ${_path_}/lib${_lib_}.*`" != "${_path_}/lib${_lib_}.*"; then \
70 ${ECHO} yes; \ 69 ${ECHO} yes; \
71 else \ 70 else \
72 ${ECHO} no; \ 71 ${ECHO} no; \
73 fi 72 fi
74. endif 73. endif
75. endfor 74. endfor
76. else 
77# XXX: Why are we looking in '/usr/lib${ABI}' and '/lib${ABI}', as we should 
78# XXX: only be looking in '/usr/lib${LIBABISUFFIX}' and '/lib${LIBABISUFFIX}' 
79BUILTIN_LIB_FOUND.${_lib_}!= \ 
80 if ${TEST} "`${ECHO} /usr/lib${ABI}/lib${_lib_}.*`" != "/usr/lib${ABI}/lib${_lib_}.*"; then \ 
81 ${ECHO} yes; \ 
82 elif ${TEST} "`${ECHO} /lib${ABI}/lib${_lib_}.*`" != "/lib${ABI}/lib${_lib_}.*"; then \ 
83 ${ECHO} yes; \ 
84 elif ${TEST} "`${ECHO} /usr/lib${LIBABISUFFIX}/lib${_lib_}.*`" != "/usr/lib${LIBABISUFFIX}/lib${_lib_}.*"; then \ 
85 ${ECHO} yes; \ 
86 elif ${TEST} "`${ECHO} /lib${LIBABISUFFIX}/lib${_lib_}.*`" != "/lib${LIBABISUFFIX}/lib${_lib_}.*"; then \ 
87 ${ECHO} yes; \ 
88 else \ 
89 ${ECHO} no; \ 
90 fi 
91. endif 
92. endif 75. endif
93MAKEVARS+= BUILTIN_LIB_FOUND.${_lib_} 76MAKEVARS+= BUILTIN_LIB_FOUND.${_lib_}
94.endfor 77.endfor