pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/buildlink3 Use BEINCLUDES and BELIBRARIES to find h...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2ef09d5ce16b
branches:  trunk
changeset: 574862:2ef09d5ce16b
user:      obache <obache%pkgsrc.org@localhost>
date:      Wed Apr 28 08:02:18 2010 +0000

description:
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:

 mk/buildlink3/find-files.mk |  23 ++++++++++++++++++-----
 mk/buildlink3/find-libs.mk  |  14 +++++++++++++-
 2 files changed, 31 insertions(+), 6 deletions(-)

diffs (72 lines):

diff -r 4bdd1a95e533 -r 2ef09d5ce16b mk/buildlink3/find-files.mk
--- a/mk/buildlink3/find-files.mk       Wed Apr 28 07:43:56 2010 +0000
+++ b/mk/buildlink3/find-files.mk       Wed Apr 28 08:02:18 2010 +0000
@@ -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 @@
 .  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 -r 4bdd1a95e533 -r 2ef09d5ce16b mk/buildlink3/find-libs.mk
--- a/mk/buildlink3/find-libs.mk        Wed Apr 28 07:43:56 2010 +0000
+++ b/mk/buildlink3/find-libs.mk        Wed Apr 28 08:02:18 2010 +0000
@@ -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 @@
        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



Home | Main Index | Thread Index | Old Index