summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2010-04-28 08:02:18 +0000
committerobache <obache@pkgsrc.org>2010-04-28 08:02:18 +0000
commita8b531173a121c07c88c5ef8b307f7620fcf57ad (patch)
tree6aa6dce870aeb571b1ec0c675c4fdde8333c96f3 /mk
parent25fe65e910c97e6fb42a74db324239c50d19b707 (diff)
downloadpkgsrc-a8b531173a121c07c88c5ef8b307f7620fcf57ad.tar.gz
Use BEINCLUDES and BELIBRARIES to find header files and libs additionally.
They point to the location of builtin header files and libraries for Haiku OS. No objection over two and a half months in tech-pkg@.
Diffstat (limited to 'mk')
-rw-r--r--mk/buildlink3/find-files.mk23
-rw-r--r--mk/buildlink3/find-libs.mk14
2 files changed, 31 insertions, 6 deletions
diff --git a/mk/buildlink3/find-files.mk b/mk/buildlink3/find-files.mk
index cdc51e8d25c..c82db394493 100644
--- a/mk/buildlink3/find-files.mk
+++ b/mk/buildlink3/find-files.mk
@@ -1,4 +1,4 @@
-# $NetBSD: find-files.mk,v 1.2 2005/07/15 18:27:55 jlam Exp $
+# $NetBSD: find-files.mk,v 1.3 2010/04/28 08:02:18 obache Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -83,17 +83,30 @@ USE_TOOLS+= grep
. if !defined(${_var_})
${_var_}= __nonexistent__
. for _file_ in ${BUILTIN_FIND_FILES.${_var_}}
-. if !empty(${_var_}:M__nonexistent__) && exists(${_file_})
+. if !empty(${_var_}:M__nonexistent__)
+_real_file_= __noexistent__
+. if exists(${_file_})
+_real_file_= ${_file_}
+. endif
+. if !empty(_real_file_:M__noexistent__) && defined(BEINCLUDES) && !empty(BEINCLUDES)
+. for _try_file_ in ${BEINCLUDES:S/;/ /g:=${_file_:S/\/usr\/include\//\//g}}
+. if !empty(_real_file_:M__noexistent__) && exists(${_try_file_})
+_real_file_= ${_try_file_}
+. endif
+. endfor
+. endif
+. if empty(_real_file_:M__noexistent__)
. if !defined(BUILTIN_FIND_GREP.${_var_})
-${_var_}= ${_file_}
+${_var_}= ${_real_file_}
. else
${_var_}!= \
- if ${GREP} -q ${BUILTIN_FIND_GREP.${_var_}:Q} ${_file_:Q}; then \
- ${ECHO} ${_file_:Q}; \
+ if ${GREP} -q ${BUILTIN_FIND_GREP.${_var_}:Q} ${_real_file_:Q}; then \
+ ${ECHO} ${_real_file_:Q}; \
else \
${ECHO} __nonexistent__; \
fi
. endif
+. endif
. endif
. endfor
. endif
diff --git a/mk/buildlink3/find-libs.mk b/mk/buildlink3/find-libs.mk
index 88dcc0c28eb..2d353ce36ad 100644
--- a/mk/buildlink3/find-libs.mk
+++ b/mk/buildlink3/find-libs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: find-libs.mk,v 1.5 2008/12/15 10:58:53 obache Exp $
+# $NetBSD: find-libs.mk,v 1.6 2010/04/28 08:02:18 obache Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -71,6 +71,18 @@ BUILTIN_LIB_FOUND.${_lib_}!= \
else \
${ECHO} no; \
fi
+. if BUILTIN_LIB_FOUND.${_lib_}=="no" && defined(BELIBRARIES) && !empty(BELIBRARIES)
+. for _path_ in ${BELIBRARIES:S/;/ /g}
+. if BULITIN_LIB_FOUND.${_lib_} == "no"
+BUILTIN_LIB_FOUND.${_lib_}!= \
+ if ${TEST} "`${ECHO} ${_path_}/lib${_lib_}.*`" != "${_path_}/lib/lib${_lib_}.*"; then \
+ ${ECHO} yes; \
+ else \
+ ${ECHO} no; \
+ fi
+. endif
+. endfor
+. endif
. endif
MAKEVARS+= BUILTIN_LIB_FOUND.${_lib_}
.endfor