office-gobmx/solenv/bin/macosx-change-install-names.pl

92 lines
3.3 KiB
Perl
Raw Normal View History

#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
use lib ("$ENV{SOLARENV}/bin/modules");
use macosxotoolhelper;
sub action($$$)
{
my %action =
('app/UREBIN/URELIB' => '@executable_path/../lib',
'app/OOO/URELIB' => '@executable_path/../ure-link/lib',
'app/OOO/OOO' => '@executable_path',
'app/SDK/URELIB' => '@executable_path/../../ure-link/lib',
'app/BRAND/URELIB' => '@executable_path/../basis-link/ure-link/lib',
'app/BRAND/OOO' => '@executable_path/../basis-link/program',
'app/NONE/URELIB' => '@__VIA_LIBRARY_PATH__',
'app/NONE/OOO' => '@__VIA_LIBRARY_PATH__',
'shl/URELIB/URELIB' => '@loader_path',
'shl/OOO/URELIB' => '@loader_path/../ure-link/lib',
'shl/OOO/OOO' => '@loader_path',
'shl/OXT/URELIB' => '@executable_path/urelibs');
my ($type, $loc1, $loc2) = @_;
my $act = $action{"$type/$loc1/$loc2"};
die "illegal combination $type/$loc/$2" unless defined $act;
return $act;
}
@ARGV == 3 || @ARGV >= 2 && $ARGV[0] eq "extshl" or die
'Usage: app|shl|extshl UREBIN|URELIB|OOO|SDK|BRAND|OXT|NONE <filepath>*';
$type = shift @ARGV;
$loc = shift @ARGV;
if ($type eq "extshl")
{
$type = "shl";
my $change = "";
CWS-TOOLING: integrate CWS jl127 2009-07-30 10:12:10 +0200 jl r274470 : #i100873# switch on checking for symbol definitions. It works with the current xpcom lib. 2009-07-29 09:48:29 +0200 jl r274443 : #i100873# 2009-07-29 09:47:36 +0200 jl r274442 : #i100873# changes after resync with DEV300m53 which contains the seamonkey update 2009-07-28 10:00:03 +0200 jl r274389 : #100873# Patches from tono 2009-07-27 16:59:39 +0200 jl r274372 : CWS-TOOLING: rebase CWS jl127 to trunk@274203 (milestone: DEV300:m53) 2009-07-07 09:08:53 +0200 jl r273768 : #100873# 2009-07-06 17:16:10 +0200 jl r273754 : #100873# 2009-07-01 13:58:09 +0200 jl r273576 : #100873# added to readme 2009-07-01 13:15:02 +0200 jl r273573 : #100873# deliver lib files when building with MS compiler 2009-06-30 11:22:06 +0200 jl r273498 : #i100873# accidentally commented out patch_files 2009-06-30 09:01:10 +0200 jl r273489 : #100873# make rc.exe work in ooo windows build 2009-06-29 09:47:56 +0200 jl r273451 : #i100873# applied mingw patch from tono 2009-06-24 12:52:14 +0200 jl r273332 : #100873# reapplying the configure.in patch on version 273150 2009-06-24 12:51:12 +0200 jl r273331 : #100873# reapplying the patch on version 273150 2009-06-23 17:17:36 +0200 jl r273299 : #100873# manually modified patch from tono 2009-06-22 17:05:41 +0200 jl r273243 : #100873# applying mingw patch from tono 2009-06-22 17:02:30 +0200 jl r273242 : #100873# applying mingw patch from tono 2009-06-22 12:49:57 +0200 jl r273216 : #100873# dependency to stlport 2009-06-19 11:56:16 +0200 jl r273155 : #100873# undoing a previous change, instset_native complained about missing libjpipe.jnilib (jurt) 2009-06-19 10:13:03 +0200 jl r273150 : #100873# ooo builds shall also use the new nss by default 2009-06-18 14:32:07 +0200 jl r273117 : #110873# more debug output when verifying a certificate 2009-06-16 11:23:50 +0200 jl r273012 : #i10873# 2009-06-16 10:57:41 +0200 jl r273011 : #100873# wrong parameter definition in nsscrypto_initialize 2009-06-16 10:56:45 +0200 jl r273010 : #100873# wrong parameter definition in nsscrypto_initialize 2009-06-15 16:20:42 +0200 jl r272996 : #100873# initialization of NSS is now threadsafe 2009-06-10 12:50:46 +0200 jl r272804 : #100873# rename in foreach fails in 4nt 2009-06-09 13:43:00 +0200 jl r272768 : #i100873# deliver only .h from inc/nss otherwise we get a warning when nss/nssck.api is delivered 2009-06-08 16:15:44 +0200 jl r272739 : #i100873# 2009-06-08 16:04:54 +0200 jl r272738 : #i100873# 2009-06-08 15:45:52 +0200 jl r272736 : #i100873# 2009-06-08 15:44:15 +0200 jl r272735 : #i100873# unzipping of nss.tar.z not working with 4nt 2009-06-08 09:45:46 +0200 jl r272720 : #i100873# 2009-06-03 13:53:52 +0200 jl r272562 : #i100873# MOZILLABUILD not correct 2009-06-03 13:17:54 +0200 jl r272557 : #i100873# readme and makefile changes from cws jl125, support of new nss module 2009-06-03 09:57:40 +0200 jl r272544 : #i100873# added readme 2009-06-02 16:47:47 +0200 jl r272512 : #i100873# removed no longer needed stuff regarding jnilibs 2009-06-02 15:54:42 +0200 jl r272510 : #i100873# added NSS to BUILD_TYPE 2009-06-02 15:20:18 +0200 jl r272508 : #i100873# DEREFERENCE option for copy command 2009-06-02 13:00:12 +0200 jl r272496 : #i100873# PATCH_FILE_NAMES is now PATCH_FILES 2009-06-02 12:23:39 +0200 jl r272494 : #i100873# build dependency to nss 2009-05-29 16:21:40 +0200 jl r272470 : #i100873# seting ENABLE_NSS_MODULE==YES and includeing mozilla-build-1.3 folder in environment 2009-05-29 16:03:23 +0200 jl r272468 : #i100873# use intermediate certificates when validating a certificate 2009-05-29 15:57:16 +0200 jl r272466 : #i100873# use intermediate certificates when validating a certificate 2009-05-29 15:49:58 +0200 jl r272464 : #i100873# using ENABLE_NSS_MODULE 2009-05-29 15:33:14 +0200 jl r272463 : #i100873# using ENABLE_NSS_MODULE 2009-05-29 15:28:39 +0200 jl r272461 : #i100873# build dependency to nss module 2009-05-29 15:24:57 +0200 jl r272460 : #i100873# pass additional certificates into verifyCertificate function 2009-05-29 14:49:40 +0200 jl r272458 : #i100873# new NSS module 2009-05-29 14:43:44 +0200 jl r272457 : #i100873# new NSS module
2009-08-26 03:22:01 -05:00
my %inames;
foreach $file (@ARGV)
{
CWS-TOOLING: integrate CWS jl127 2009-07-30 10:12:10 +0200 jl r274470 : #i100873# switch on checking for symbol definitions. It works with the current xpcom lib. 2009-07-29 09:48:29 +0200 jl r274443 : #i100873# 2009-07-29 09:47:36 +0200 jl r274442 : #i100873# changes after resync with DEV300m53 which contains the seamonkey update 2009-07-28 10:00:03 +0200 jl r274389 : #100873# Patches from tono 2009-07-27 16:59:39 +0200 jl r274372 : CWS-TOOLING: rebase CWS jl127 to trunk@274203 (milestone: DEV300:m53) 2009-07-07 09:08:53 +0200 jl r273768 : #100873# 2009-07-06 17:16:10 +0200 jl r273754 : #100873# 2009-07-01 13:58:09 +0200 jl r273576 : #100873# added to readme 2009-07-01 13:15:02 +0200 jl r273573 : #100873# deliver lib files when building with MS compiler 2009-06-30 11:22:06 +0200 jl r273498 : #i100873# accidentally commented out patch_files 2009-06-30 09:01:10 +0200 jl r273489 : #100873# make rc.exe work in ooo windows build 2009-06-29 09:47:56 +0200 jl r273451 : #i100873# applied mingw patch from tono 2009-06-24 12:52:14 +0200 jl r273332 : #100873# reapplying the configure.in patch on version 273150 2009-06-24 12:51:12 +0200 jl r273331 : #100873# reapplying the patch on version 273150 2009-06-23 17:17:36 +0200 jl r273299 : #100873# manually modified patch from tono 2009-06-22 17:05:41 +0200 jl r273243 : #100873# applying mingw patch from tono 2009-06-22 17:02:30 +0200 jl r273242 : #100873# applying mingw patch from tono 2009-06-22 12:49:57 +0200 jl r273216 : #100873# dependency to stlport 2009-06-19 11:56:16 +0200 jl r273155 : #100873# undoing a previous change, instset_native complained about missing libjpipe.jnilib (jurt) 2009-06-19 10:13:03 +0200 jl r273150 : #100873# ooo builds shall also use the new nss by default 2009-06-18 14:32:07 +0200 jl r273117 : #110873# more debug output when verifying a certificate 2009-06-16 11:23:50 +0200 jl r273012 : #i10873# 2009-06-16 10:57:41 +0200 jl r273011 : #100873# wrong parameter definition in nsscrypto_initialize 2009-06-16 10:56:45 +0200 jl r273010 : #100873# wrong parameter definition in nsscrypto_initialize 2009-06-15 16:20:42 +0200 jl r272996 : #100873# initialization of NSS is now threadsafe 2009-06-10 12:50:46 +0200 jl r272804 : #100873# rename in foreach fails in 4nt 2009-06-09 13:43:00 +0200 jl r272768 : #i100873# deliver only .h from inc/nss otherwise we get a warning when nss/nssck.api is delivered 2009-06-08 16:15:44 +0200 jl r272739 : #i100873# 2009-06-08 16:04:54 +0200 jl r272738 : #i100873# 2009-06-08 15:45:52 +0200 jl r272736 : #i100873# 2009-06-08 15:44:15 +0200 jl r272735 : #i100873# unzipping of nss.tar.z not working with 4nt 2009-06-08 09:45:46 +0200 jl r272720 : #i100873# 2009-06-03 13:53:52 +0200 jl r272562 : #i100873# MOZILLABUILD not correct 2009-06-03 13:17:54 +0200 jl r272557 : #i100873# readme and makefile changes from cws jl125, support of new nss module 2009-06-03 09:57:40 +0200 jl r272544 : #i100873# added readme 2009-06-02 16:47:47 +0200 jl r272512 : #i100873# removed no longer needed stuff regarding jnilibs 2009-06-02 15:54:42 +0200 jl r272510 : #i100873# added NSS to BUILD_TYPE 2009-06-02 15:20:18 +0200 jl r272508 : #i100873# DEREFERENCE option for copy command 2009-06-02 13:00:12 +0200 jl r272496 : #i100873# PATCH_FILE_NAMES is now PATCH_FILES 2009-06-02 12:23:39 +0200 jl r272494 : #i100873# build dependency to nss 2009-05-29 16:21:40 +0200 jl r272470 : #i100873# seting ENABLE_NSS_MODULE==YES and includeing mozilla-build-1.3 folder in environment 2009-05-29 16:03:23 +0200 jl r272468 : #i100873# use intermediate certificates when validating a certificate 2009-05-29 15:57:16 +0200 jl r272466 : #i100873# use intermediate certificates when validating a certificate 2009-05-29 15:49:58 +0200 jl r272464 : #i100873# using ENABLE_NSS_MODULE 2009-05-29 15:33:14 +0200 jl r272463 : #i100873# using ENABLE_NSS_MODULE 2009-05-29 15:28:39 +0200 jl r272461 : #i100873# build dependency to nss module 2009-05-29 15:24:57 +0200 jl r272460 : #i100873# pass additional certificates into verifyCertificate function 2009-05-29 14:49:40 +0200 jl r272458 : #i100873# new NSS module 2009-05-29 14:43:44 +0200 jl r272457 : #i100873# new NSS module
2009-08-26 03:22:01 -05:00
my $iname = otoolD($file);
(defined $iname ? $iname : $file . "\n") =~ m'^(.*?([^/]+))\n$' or
die "unexpected otool -D output";
$change .= " -change $1 " . action($type, $loc, $loc) . "/$2";
CWS-TOOLING: integrate CWS jl127 2009-07-30 10:12:10 +0200 jl r274470 : #i100873# switch on checking for symbol definitions. It works with the current xpcom lib. 2009-07-29 09:48:29 +0200 jl r274443 : #i100873# 2009-07-29 09:47:36 +0200 jl r274442 : #i100873# changes after resync with DEV300m53 which contains the seamonkey update 2009-07-28 10:00:03 +0200 jl r274389 : #100873# Patches from tono 2009-07-27 16:59:39 +0200 jl r274372 : CWS-TOOLING: rebase CWS jl127 to trunk@274203 (milestone: DEV300:m53) 2009-07-07 09:08:53 +0200 jl r273768 : #100873# 2009-07-06 17:16:10 +0200 jl r273754 : #100873# 2009-07-01 13:58:09 +0200 jl r273576 : #100873# added to readme 2009-07-01 13:15:02 +0200 jl r273573 : #100873# deliver lib files when building with MS compiler 2009-06-30 11:22:06 +0200 jl r273498 : #i100873# accidentally commented out patch_files 2009-06-30 09:01:10 +0200 jl r273489 : #100873# make rc.exe work in ooo windows build 2009-06-29 09:47:56 +0200 jl r273451 : #i100873# applied mingw patch from tono 2009-06-24 12:52:14 +0200 jl r273332 : #100873# reapplying the configure.in patch on version 273150 2009-06-24 12:51:12 +0200 jl r273331 : #100873# reapplying the patch on version 273150 2009-06-23 17:17:36 +0200 jl r273299 : #100873# manually modified patch from tono 2009-06-22 17:05:41 +0200 jl r273243 : #100873# applying mingw patch from tono 2009-06-22 17:02:30 +0200 jl r273242 : #100873# applying mingw patch from tono 2009-06-22 12:49:57 +0200 jl r273216 : #100873# dependency to stlport 2009-06-19 11:56:16 +0200 jl r273155 : #100873# undoing a previous change, instset_native complained about missing libjpipe.jnilib (jurt) 2009-06-19 10:13:03 +0200 jl r273150 : #100873# ooo builds shall also use the new nss by default 2009-06-18 14:32:07 +0200 jl r273117 : #110873# more debug output when verifying a certificate 2009-06-16 11:23:50 +0200 jl r273012 : #i10873# 2009-06-16 10:57:41 +0200 jl r273011 : #100873# wrong parameter definition in nsscrypto_initialize 2009-06-16 10:56:45 +0200 jl r273010 : #100873# wrong parameter definition in nsscrypto_initialize 2009-06-15 16:20:42 +0200 jl r272996 : #100873# initialization of NSS is now threadsafe 2009-06-10 12:50:46 +0200 jl r272804 : #100873# rename in foreach fails in 4nt 2009-06-09 13:43:00 +0200 jl r272768 : #i100873# deliver only .h from inc/nss otherwise we get a warning when nss/nssck.api is delivered 2009-06-08 16:15:44 +0200 jl r272739 : #i100873# 2009-06-08 16:04:54 +0200 jl r272738 : #i100873# 2009-06-08 15:45:52 +0200 jl r272736 : #i100873# 2009-06-08 15:44:15 +0200 jl r272735 : #i100873# unzipping of nss.tar.z not working with 4nt 2009-06-08 09:45:46 +0200 jl r272720 : #i100873# 2009-06-03 13:53:52 +0200 jl r272562 : #i100873# MOZILLABUILD not correct 2009-06-03 13:17:54 +0200 jl r272557 : #i100873# readme and makefile changes from cws jl125, support of new nss module 2009-06-03 09:57:40 +0200 jl r272544 : #i100873# added readme 2009-06-02 16:47:47 +0200 jl r272512 : #i100873# removed no longer needed stuff regarding jnilibs 2009-06-02 15:54:42 +0200 jl r272510 : #i100873# added NSS to BUILD_TYPE 2009-06-02 15:20:18 +0200 jl r272508 : #i100873# DEREFERENCE option for copy command 2009-06-02 13:00:12 +0200 jl r272496 : #i100873# PATCH_FILE_NAMES is now PATCH_FILES 2009-06-02 12:23:39 +0200 jl r272494 : #i100873# build dependency to nss 2009-05-29 16:21:40 +0200 jl r272470 : #i100873# seting ENABLE_NSS_MODULE==YES and includeing mozilla-build-1.3 folder in environment 2009-05-29 16:03:23 +0200 jl r272468 : #i100873# use intermediate certificates when validating a certificate 2009-05-29 15:57:16 +0200 jl r272466 : #i100873# use intermediate certificates when validating a certificate 2009-05-29 15:49:58 +0200 jl r272464 : #i100873# using ENABLE_NSS_MODULE 2009-05-29 15:33:14 +0200 jl r272463 : #i100873# using ENABLE_NSS_MODULE 2009-05-29 15:28:39 +0200 jl r272461 : #i100873# build dependency to nss module 2009-05-29 15:24:57 +0200 jl r272460 : #i100873# pass additional certificates into verifyCertificate function 2009-05-29 14:49:40 +0200 jl r272458 : #i100873# new NSS module 2009-05-29 14:43:44 +0200 jl r272457 : #i100873# new NSS module
2009-08-26 03:22:01 -05:00
$inames{$file} = $2;
}
foreach $file (@ARGV)
{
CWS-TOOLING: integrate CWS jl127 2009-07-30 10:12:10 +0200 jl r274470 : #i100873# switch on checking for symbol definitions. It works with the current xpcom lib. 2009-07-29 09:48:29 +0200 jl r274443 : #i100873# 2009-07-29 09:47:36 +0200 jl r274442 : #i100873# changes after resync with DEV300m53 which contains the seamonkey update 2009-07-28 10:00:03 +0200 jl r274389 : #100873# Patches from tono 2009-07-27 16:59:39 +0200 jl r274372 : CWS-TOOLING: rebase CWS jl127 to trunk@274203 (milestone: DEV300:m53) 2009-07-07 09:08:53 +0200 jl r273768 : #100873# 2009-07-06 17:16:10 +0200 jl r273754 : #100873# 2009-07-01 13:58:09 +0200 jl r273576 : #100873# added to readme 2009-07-01 13:15:02 +0200 jl r273573 : #100873# deliver lib files when building with MS compiler 2009-06-30 11:22:06 +0200 jl r273498 : #i100873# accidentally commented out patch_files 2009-06-30 09:01:10 +0200 jl r273489 : #100873# make rc.exe work in ooo windows build 2009-06-29 09:47:56 +0200 jl r273451 : #i100873# applied mingw patch from tono 2009-06-24 12:52:14 +0200 jl r273332 : #100873# reapplying the configure.in patch on version 273150 2009-06-24 12:51:12 +0200 jl r273331 : #100873# reapplying the patch on version 273150 2009-06-23 17:17:36 +0200 jl r273299 : #100873# manually modified patch from tono 2009-06-22 17:05:41 +0200 jl r273243 : #100873# applying mingw patch from tono 2009-06-22 17:02:30 +0200 jl r273242 : #100873# applying mingw patch from tono 2009-06-22 12:49:57 +0200 jl r273216 : #100873# dependency to stlport 2009-06-19 11:56:16 +0200 jl r273155 : #100873# undoing a previous change, instset_native complained about missing libjpipe.jnilib (jurt) 2009-06-19 10:13:03 +0200 jl r273150 : #100873# ooo builds shall also use the new nss by default 2009-06-18 14:32:07 +0200 jl r273117 : #110873# more debug output when verifying a certificate 2009-06-16 11:23:50 +0200 jl r273012 : #i10873# 2009-06-16 10:57:41 +0200 jl r273011 : #100873# wrong parameter definition in nsscrypto_initialize 2009-06-16 10:56:45 +0200 jl r273010 : #100873# wrong parameter definition in nsscrypto_initialize 2009-06-15 16:20:42 +0200 jl r272996 : #100873# initialization of NSS is now threadsafe 2009-06-10 12:50:46 +0200 jl r272804 : #100873# rename in foreach fails in 4nt 2009-06-09 13:43:00 +0200 jl r272768 : #i100873# deliver only .h from inc/nss otherwise we get a warning when nss/nssck.api is delivered 2009-06-08 16:15:44 +0200 jl r272739 : #i100873# 2009-06-08 16:04:54 +0200 jl r272738 : #i100873# 2009-06-08 15:45:52 +0200 jl r272736 : #i100873# 2009-06-08 15:44:15 +0200 jl r272735 : #i100873# unzipping of nss.tar.z not working with 4nt 2009-06-08 09:45:46 +0200 jl r272720 : #i100873# 2009-06-03 13:53:52 +0200 jl r272562 : #i100873# MOZILLABUILD not correct 2009-06-03 13:17:54 +0200 jl r272557 : #i100873# readme and makefile changes from cws jl125, support of new nss module 2009-06-03 09:57:40 +0200 jl r272544 : #i100873# added readme 2009-06-02 16:47:47 +0200 jl r272512 : #i100873# removed no longer needed stuff regarding jnilibs 2009-06-02 15:54:42 +0200 jl r272510 : #i100873# added NSS to BUILD_TYPE 2009-06-02 15:20:18 +0200 jl r272508 : #i100873# DEREFERENCE option for copy command 2009-06-02 13:00:12 +0200 jl r272496 : #i100873# PATCH_FILE_NAMES is now PATCH_FILES 2009-06-02 12:23:39 +0200 jl r272494 : #i100873# build dependency to nss 2009-05-29 16:21:40 +0200 jl r272470 : #i100873# seting ENABLE_NSS_MODULE==YES and includeing mozilla-build-1.3 folder in environment 2009-05-29 16:03:23 +0200 jl r272468 : #i100873# use intermediate certificates when validating a certificate 2009-05-29 15:57:16 +0200 jl r272466 : #i100873# use intermediate certificates when validating a certificate 2009-05-29 15:49:58 +0200 jl r272464 : #i100873# using ENABLE_NSS_MODULE 2009-05-29 15:33:14 +0200 jl r272463 : #i100873# using ENABLE_NSS_MODULE 2009-05-29 15:28:39 +0200 jl r272461 : #i100873# build dependency to nss module 2009-05-29 15:24:57 +0200 jl r272460 : #i100873# pass additional certificates into verifyCertificate function 2009-05-29 14:49:40 +0200 jl r272458 : #i100873# new NSS module 2009-05-29 14:43:44 +0200 jl r272457 : #i100873# new NSS module
2009-08-26 03:22:01 -05:00
my $call = "install_name_tool$change -id \@__________________________________________________$loc/$inames{$file} $file";
system($call) == 0 or die "cannot $call";
}
}
foreach $file (@ARGV)
{
my $call = "otool -L $file";
open(IN, "-|", $call) or die "cannot $call";
my $change = "";
while (<IN>)
{
$change .= " -change $1 " . action($type, $loc, $2) . "$3"
if m'^\s*(@_{50}([^/]+)(/.+)) \(compatibility version \d+\.\d+\.\d+, current version \d+\.\d+\.\d+\)\n$';
}
close(IN);
if ($change ne "")
{
$call = "install_name_tool$change $file";
system($call) == 0 or die "cannot $call";
}
}