pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/buildlink3 Along with BUILDLINK_INCDIRS.<pkg> and B...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cb0018938b49
branches:  trunk
changeset: 470629:cb0018938b49
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Thu Mar 11 00:26:29 2004 +0000

description:
Along with BUILDLINK_INCDIRS.<pkg> and BUILDLINK_LIBDIRS.<pkg>, also have
BUILDLINK_RPATHDIRS.<pkg> which is a list of directories relative to
BUILDLINK_PREFIX.<pkg> to add to the library runtime search path.  For
packages that are a full dependency, this defaults to
BUILDLINK_LIBDIRS.<pkg>, but for packages that are a build dependency,
this defaults to an empty list (on the theory that a build dependency
doesn't have any shared libraries required by the package at runtime).

diffstat:

 mk/buildlink3/bsd.buildlink3.mk |  38 ++++++++++++++++++++++++--------------
 1 files changed, 24 insertions(+), 14 deletions(-)

diffs (94 lines):

diff -r 323dd6bdac19 -r cb0018938b49 mk/buildlink3/bsd.buildlink3.mk
--- a/mk/buildlink3/bsd.buildlink3.mk   Wed Mar 10 23:41:44 2004 +0000
+++ b/mk/buildlink3/bsd.buildlink3.mk   Thu Mar 11 00:26:29 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.106 2004/03/10 19:42:27 jlam Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.107 2004/03/11 00:26:29 jlam Exp $
 #
 # An example package buildlink3.mk file:
 #
@@ -145,15 +145,16 @@
 # We skip the dependency calculation for some phases since they never
 # use the dependency information.
 #
+.for _pkg_ in ${_BLNK_PACKAGES} ${_BLNK_X11_LINKS_PACKAGE}
+BUILDLINK_DEPMETHOD.${_pkg_}?= full
+.endfor
 _BLNK_PHASES_SKIP_DEPENDS=     fetch patch tools buildlink configure build
 .if empty(_BLNK_PHASES_SKIP_DEPENDS:M${PKG_PHASE})
 _BLNK_ADD_TO.DEPENDS=          # empty
 _BLNK_ADD_TO.BUILD_DEPENDS=    # empty
 _BLNK_ADD_TO.RECOMMENDED=      # empty
 .  for _pkg_ in ${_BLNK_DEPENDS}
-.    if !defined(BUILDLINK_DEPMETHOD.${_pkg_})
-BUILDLINK_DEPMETHOD.${_pkg_}=  full
-.    endif
+BUILDLINK_DEPMETHOD.${_pkg_}?= full
 .    if !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mfull)
 _BLNK_DEPMETHOD.${_pkg_}=      _BLNK_ADD_TO.DEPENDS
 _BLNK_RECMETHOD.${_pkg_}=      _BLNK_ADD_TO.RECOMMENDED
@@ -262,7 +263,8 @@
 #                              <pkg> will work.
 #
 # BUILDLINK_INCDIRS.<pkg>,
-# BUILDLINK_LIBDIRS.<pkg>      subdirectories of BUILDLINK_PREFIX.<pkg>
+# BUILDLINK_LIBDIRS.<pkg>,
+# BUILDLINK_RPATHDIRS.<pkg>    subdirectories of BUILDLINK_PREFIX.<pkg>
 #                              that should be added to the
 #                              compiler/linker search paths; these
 #                              directories are checked to see if they
@@ -343,6 +345,11 @@
 BUILDLINK_LDFLAGS.${_pkg_}?=   # empty
 BUILDLINK_INCDIRS.${_pkg_}?=   include
 BUILDLINK_LIBDIRS.${_pkg_}?=   lib
+.  if !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mfull)
+BUILDLINK_RPATHDIRS.${_pkg_}?= ${BUILDLINK_LIBDIRS.${_pkg_}}
+.  else
+BUILDLINK_RPATHDIRS.${_pkg_}?= # empty
+.  endif
 .endfor
 
 # BUILDLINK_CPPFLAGS and BUILDLINK_LDFLAGS contain the proper -I...
@@ -386,9 +393,14 @@
 .        if empty(BUILDLINK_LDFLAGS:M-L${_dir_})
 BUILDLINK_LDFLAGS+=    -L${_dir_}
 .        endif
-.        if (${_USE_RPATH} == "yes") && \
-           empty(BUILDLINK_LDFLAGS:M${_COMPILER_LD_FLAG}${RPATH_FLAG}${_dir_})
-BUILDLINK_LDFLAGS+=            ${_COMPILER_LD_FLAG}${RPATH_FLAG}${_dir_}
+.      endif
+.    endfor
+.  endif
+.  if !empty(BUILDLINK_RPATHDIRS.${_pkg_}) && (${_USE_RPATH} == "yes")
+.    for _dir_ in ${BUILDLINK_RPATHDIRS.${_pkg_}:S/^/${BUILDLINK_PREFIX.${_pkg_}}\//}
+.      if exists(${_dir_})
+.        if empty(BUILDLINK_LDFLAGS:M${_COMPILER_LD_FLAG}${RPATH_FLAG}${_dir_})
+BUILDLINK_LDFLAGS+=    ${_COMPILER_LD_FLAG}${RPATH_FLAG}${_dir_}
 .        endif
 .      endif
 .    endfor
@@ -410,11 +422,10 @@
 # fulfilled through the default view.
 #
 .for _pkg_ in ${_BLNK_PACKAGES}
-.  if !empty(BUILDLINK_LIBDIRS.${_pkg_})
-.    for _dir_ in ${BUILDLINK_LIBDIRS.${_pkg_}:S/^/${LOCALBASE}\//}
+.  if !empty(BUILDLINK_RPATHDIRS.${_pkg_}) && (${_USE_RPATH} == "yes")
+.    for _dir_ in ${BUILDLINK_RPATHDIRS.${_pkg_}:S/^/${LOCALBASE}\//}
 .      if exists(${_dir_})
-.        if (${_USE_RPATH} == "yes") && \
-           empty(BUILDLINK_LDFLAGS:M${_COMPILER_LD_FLAG}${RPATH_FLAG}${_dir_})
+.        if empty(BUILDLINK_LDFLAGS:M${_COMPILER_LD_FLAG}${RPATH_FLAG}${_dir_})
 BUILDLINK_LDFLAGS+=    ${_COMPILER_LD_FLAG}${RPATH_FLAG}${_dir_}
 .        endif
 .      endif
@@ -425,8 +436,7 @@
 # Add the X11 library directory to the runtime library search path if
 # the package uses X11.
 #
-.if defined(USE_X11) && \
-    (${_USE_RPATH} == "yes") && \
+.if defined(USE_X11) && (${_USE_RPATH} == "yes") && \
     empty(BUILDLINK_LDFLAGS:M${_COMPILER_LD_FLAG}${RPATH_FLAG}${X11BASE}/lib)
 BUILDLINK_LDFLAGS+=    ${_COMPILER_LD_FLAG}${RPATH_FLAG}${X11BASE}/lib
 .endif



Home | Main Index | Thread Index | Old Index