pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc Fix build and install of Boost under Mac OS X:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ec4efec03a6f
branches:  trunk
changeset: 506731:ec4efec03a6f
user:      jmmv <jmmv%pkgsrc.org@localhost>
date:      Sat Jan 21 09:02:16 2006 +0000

description:
Fix build and install of Boost under Mac OS X:
- Correctly use threads.
- Use the correct tool set.
- Make libraries (Boost.Test) with undefined symbols build correctly.
- Change the installed library names so that they match other systems
  (thus avoiding manual PLIST substitutions).  There is a hack here,
  though, to let the dylib stuff kick in...

diffstat:

 devel/boost-build/bjam.mk        |  11 +++++++++--
 devel/boost-build/toolset.mk     |   6 ++++--
 meta-pkgs/boost/distinfo         |   6 ++++--
 meta-pkgs/boost/patches/patch-ad |   6 +++---
 meta-pkgs/boost/patches/patch-ae |  12 ++++++++++++
 meta-pkgs/boost/patches/patch-ag |  12 ++++++++++++
 6 files changed, 44 insertions(+), 9 deletions(-)

diffs (118 lines):

diff -r 255b8bcc3ef9 -r ec4efec03a6f devel/boost-build/bjam.mk
--- a/devel/boost-build/bjam.mk Sat Jan 21 08:14:04 2006 +0000
+++ b/devel/boost-build/bjam.mk Sat Jan 21 09:02:16 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bjam.mk,v 1.2 2005/03/25 12:45:09 jmmv Exp $
+# $NetBSD: bjam.mk,v 1.3 2006/01/21 09:02:16 jmmv Exp $
 #
 
 .include "../../devel/boost-build/buildlink3.mk"
@@ -15,13 +15,20 @@
 .if defined(BOOST_DEBUG) && !empty(BOOST_DEBUG:M[Yy][Ee][Ss])
 BJAM_BUILD+=           debug
 .endif
-BJAM_BUILD+=           <linkflags>-Wl,-R${PREFIX}/lib
+BJAM_BUILD+=           <linkflags>${COMPILER_RPATH_FLAG}${PREFIX}/lib
 BJAM_BUILD+=           <threading>multi
 BJAM_BUILD+=           release
 BJAM_CMD=              ${SETENV} ${MAKE_ENV} ${BJAM} ${BJAM_ARGS}
 
 bjam-build:
        @cd ${WRKSRC} && ${BJAM_CMD} stage
+.if ${OPSYS} == "Darwin"
+       @cd ${WRKSRC}/stage/lib && \
+       for f in *-mt.dylib; do \
+           ${LN} -s $${f} \
+               `${ECHO} $${f} | ${SED} 's|.dylib|.${BOOST_VERSION}.dylib|'`; \
+       done
+.endif
 
 bjam-install:
        @cd ${WRKSRC} && ${BJAM_CMD} install
diff -r 255b8bcc3ef9 -r ec4efec03a6f devel/boost-build/toolset.mk
--- a/devel/boost-build/toolset.mk      Sat Jan 21 08:14:04 2006 +0000
+++ b/devel/boost-build/toolset.mk      Sat Jan 21 09:02:16 2006 +0000
@@ -1,8 +1,10 @@
-# $NetBSD: toolset.mk,v 1.1 2005/02/26 22:48:35 jmmv Exp $
+# $NetBSD: toolset.mk,v 1.2 2006/01/21 09:02:16 jmmv Exp $
 
 .include "../../mk/compiler.mk"
 
-.if !empty(PKGSRC_COMPILER:Mgcc)
+.if ${OPSYS} == "Darwin"
+BOOST_TOOLSET=         darwin
+.elif !empty(PKGSRC_COMPILER:Mgcc)
 BOOST_TOOLSET=         gcc
 .elif !empty(PKGSRC_COMPILER:Mmipspro*)
 BOOST_TOOLSET=         mipspro
diff -r 255b8bcc3ef9 -r ec4efec03a6f meta-pkgs/boost/distinfo
--- a/meta-pkgs/boost/distinfo  Sat Jan 21 08:14:04 2006 +0000
+++ b/meta-pkgs/boost/distinfo  Sat Jan 21 09:02:16 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.6 2006/01/20 20:40:19 jmmv Exp $
+$NetBSD: distinfo,v 1.7 2006/01/21 09:02:16 jmmv Exp $
 
 SHA1 (boost_1_33_1.tar.bz2) = 22682f75ff0d1ea548688e78c8cca83d599ca576
 RMD160 (boost_1_33_1.tar.bz2) = 3d5999d321b558f74d786bec52ee1b1fcd7e7152
@@ -6,6 +6,8 @@
 SHA1 (patch-aa) = 957dad8d5993f0d28b399eedb2d0ae14ecfebc4c
 SHA1 (patch-ab) = 197c51ac67d74923d02f8a9746b5d2e0f7b84736
 SHA1 (patch-ac) = 453d4107df03e96e66cbdbebceebdfcbed2710c1
-SHA1 (patch-ad) = f5ab062abdb23b0586d08aad843debf4d6162c87
+SHA1 (patch-ad) = 4d8bd0cea4b6758d52890cec420892f3ece4ea09
+SHA1 (patch-ae) = 87d4aa6ae5162de7489bae5315a018670c8045cb
 SHA1 (patch-af) = 64a6fa2be7a526a0a3e6f47d5f703d7253a51615
+SHA1 (patch-ag) = 6c862a0f50590327344d6973617ccc56df67fa76
 SHA1 (patch-ah) = e16c08bb0f63e63ae082e9d83c588e3adcf9cb3b
diff -r 255b8bcc3ef9 -r ec4efec03a6f meta-pkgs/boost/patches/patch-ad
--- a/meta-pkgs/boost/patches/patch-ad  Sat Jan 21 08:14:04 2006 +0000
+++ b/meta-pkgs/boost/patches/patch-ad  Sat Jan 21 09:02:16 2006 +0000
@@ -1,13 +1,13 @@
-$NetBSD: patch-ad,v 1.3 2006/01/12 22:48:46 joerg Exp $
+$NetBSD: patch-ad,v 1.4 2006/01/21 09:02:16 jmmv Exp $
 
---- boost/config/suffix.hpp.orig       2005-06-21 12:35:22.000000000 +0000
+--- boost/config/suffix.hpp.orig       2006-01-20 21:59:33.000000000 +0100
 +++ boost/config/suffix.hpp
 @@ -213,7 +213,7 @@
  // from here then add to the appropriate compiler section):
  //
  #if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \
 -    || defined(_PTHREADS)) && !defined(BOOST_HAS_THREADS)
-+    || defined(_PTHREADS) || defined(__DragonFly__)) && !defined(BOOST_HAS_THREADS)
++    || defined(_PTHREADS) || defined(__DragonFly__) || defined(__APPLE__)) && !defined(BOOST_HAS_THREADS)
  #  define BOOST_HAS_THREADS
  #endif
  
diff -r 255b8bcc3ef9 -r ec4efec03a6f meta-pkgs/boost/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/meta-pkgs/boost/patches/patch-ae  Sat Jan 21 09:02:16 2006 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-ae,v 1.3 2006/01/21 09:02:16 jmmv Exp $
+
+--- tools/build/v1/darwin-tools.jam.orig       2006-01-21 00:05:33.000000000 +0100
++++ tools/build/v1/darwin-tools.jam
+@@ -149,6 +149,7 @@ if -bind_at_load in $(.LINKFLAGS)
+     .LINKFLAGS = [ difference $(.LINKFLAGS) : -bind_at_load ] ;
+ }
+ flags darwin LINKFLAGS : $(.LINKFLAGS) ;
++flags darwin LINKFLAGS : -flat_namespace -undefined suppress ;
+ 
+ 
+ #### Link ####
diff -r 255b8bcc3ef9 -r ec4efec03a6f meta-pkgs/boost/patches/patch-ag
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/meta-pkgs/boost/patches/patch-ag  Sat Jan 21 09:02:16 2006 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-ag,v 1.3 2006/01/21 09:02:16 jmmv Exp $
+
+--- tools/build/v1/boost-base.jam.orig 2006-01-21 00:28:08.000000000 +0100
++++ tools/build/v1/boost-base.jam
+@@ -2616,6 +2616,7 @@ rule common-variant-tag ( toolset varian
+     
+     local thread-tag = ;
+     if <threading>multi in $(properties) { thread-tag = mt ; }
++    if $(OS) = MACOSX { thread-tag = mt ; }
+     
+     local runtime-tag = ;
+     if <runtime-link>static in $(properties) { runtime-tag += s ; }



Home | Main Index | Thread Index | Old Index