Return-Path: Delivered-To: apmail-labs-commits-archive@minotaur.apache.org Received: (qmail 7213 invoked from network); 15 Feb 2009 08:16:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Feb 2009 08:16:35 -0000 Received: (qmail 27921 invoked by uid 500); 15 Feb 2009 08:16:35 -0000 Delivered-To: apmail-labs-commits-archive@labs.apache.org Received: (qmail 27838 invoked by uid 500); 15 Feb 2009 08:16:35 -0000 Mailing-List: contact commits-help@labs.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: labs@labs.apache.org Delivered-To: mailing list commits@labs.apache.org Received: (qmail 27828 invoked by uid 99); 15 Feb 2009 08:16:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Feb 2009 00:16:35 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Feb 2009 08:16:34 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2E1A5238889E; Sun, 15 Feb 2009 08:16:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r744628 - /labs/orthrus/trunk/SConstruct Date: Sun, 15 Feb 2009 08:16:14 -0000 To: commits@labs.apache.org From: pquerna@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090215081614.2E1A5238889E@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: pquerna Date: Sun Feb 15 08:16:13 2009 New Revision: 744628 URL: http://svn.apache.org/viewvc?rev=744628&view=rev Log: Improve linking, so that installed copies should work with both osx's sucky linker, and at the same time from our working copy. Modified: labs/orthrus/trunk/SConstruct Modified: labs/orthrus/trunk/SConstruct URL: http://svn.apache.org/viewvc/labs/orthrus/trunk/SConstruct?rev=744628&r1=744627&r2=744628&view=diff ============================================================================== --- labs/orthrus/trunk/SConstruct (original) +++ labs/orthrus/trunk/SConstruct Sun Feb 15 08:16:13 2009 @@ -18,6 +18,7 @@ EnsureSConsVersion(1, 2, 0) from os.path import join as pjoin + opts = Variables('build.py') # TODO: Move these to be gathered from a version header file. @@ -36,9 +37,6 @@ env.ParseConfig(env['APRUTIL'] + ' --includes --ldflags --libs --link-ld') env.AppendUnique(CPPPATH = ["include"]) -if env['PLATFORM'] == 'darwin': - env.AppendUnique(LINKFLAGS = ['-undefined', 'dynamic_lookup']) - lib = env.SharedLibrary(target='orthrus-%d' % (orthrus_major), source = ['src/core.c', 'src/error.c', 'src/hex.c', 'src/words.c']) @@ -47,10 +45,24 @@ appenv = env.Clone() appenv.AppendUnique(LIBS=lib) +if appenv['PLATFORM'] != 'darwin': + if 0: + # TOOD: Figure out if OS supports origin/relative rpaths + appenv.Append(LINKFLAGS = Split('-z origin')) + appenv.Append(RPATH = env.Literal(pjoin('\\$$ORIGIN', os.pardir, 'lib'))) + else: + appenv.Append(RPATH = [pjoin(env['PREFIX'], 'lib')]) + ortcalc = appenv.Program(target='ortcalc', source = ['src/ui/ortcalc/ortcalc.c']) install = [] -install.extend(env.Install(pjoin(env['DESTDIR'], env['PREFIX'], 'bin'), ortcalc)) +foo = env.Install(pjoin(env['DESTDIR'], env['PREFIX'], 'bin'), ortcalc) +if env['PLATFORM'] == 'darwin': + env.AddPostAction(foo, + "install_name_tool -change 'liborthrus-%d.dylib' '%s/liborthrus-%d.dylib' %s" % (orthrus_major, + pjoin(env['PREFIX'], 'lib'), orthrus_major, foo[0].get_abspath())) + +install.extend(foo) install.extend(env.Install(pjoin(env['DESTDIR'], env['PREFIX'], 'lib'), lib)) install.extend(env.Install(pjoin(env['DESTDIR'], env['PREFIX'], 'include', "orthrus-%d" % (orthrus_major)), headers)) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org For additional commands, e-mail: commits-help@labs.apache.org