Clean up Mac OS X .jnilibs
Those .jnilibs that are not needed as .dylibs (this includes those that are also UNO components) are handled via RepositoryFixes.mk. The remaining one, libjava_uno.jnilib is packaged as a symlink in instdir. Everything else is not necessary and removed (including the venerable oddity macosx-create-bundle). Change-Id: I34a1801b0733cdff885c1c72db16fa631c5d82ef
This commit is contained in:
@@ -31,6 +31,16 @@ endif
|
||||
|
||||
gb_Executable_FILENAMES_FOR_BUILD := $(subst $(gb_Executable_EXT),$(gb_Executable_EXT_for_build),$(gb_Executable_FILENAMES))
|
||||
|
||||
# fixes for .jnilibs on Mac OS X that are not also needed as .dylibs:
|
||||
ifeq ($(OS),MACOSX)
|
||||
gb_Library_FILENAMES := \
|
||||
$(subst jpipe:libjpipe.dylib,jpipe:libjpipe.jnilib,$(gb_Library_FILENAMES))
|
||||
gb_Library_FILENAMES := \
|
||||
$(subst juh:libjuh.dylib,juh:libjuh.jnilib,$(gb_Library_FILENAMES))
|
||||
gb_Library_FILENAMES := \
|
||||
$(subst hsqldb:libhsqldb.dylib,hsqldb:libhsqldb.jnilib,$(gb_Library_FILENAMES))
|
||||
endif
|
||||
|
||||
# fixes for all the libraries that are named with too much creativity and do
|
||||
# not follow any of the established nameschemes
|
||||
|
||||
|
@@ -1,22 +0,0 @@
|
||||
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
||||
#
|
||||
# This file is part of the LibreOffice project.
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
|
||||
$(eval $(call gb_CustomTarget_CustomTarget,jurt/util))
|
||||
|
||||
$(eval $(call gb_CustomTarget_register_targets,jurt/util,\
|
||||
libjpipe.jnilib \
|
||||
))
|
||||
|
||||
# TODO: could this be replaced by defining library jpipe as gb_Library_Bundle?
|
||||
$(call gb_CustomTarget_get_workdir,jurt/util)/libjpipe.jnilib : $(call gb_Library_get_target,jpipe)
|
||||
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),MCB,1)
|
||||
cp $< $(dir $@)$(notdir $<) && \
|
||||
$(SOLARENV)/bin/macosx-create-bundle $(dir $@)$(notdir $<)
|
||||
|
||||
# vim:set shiftwidth=4 tabstop=4 noexpandtab:
|
@@ -16,13 +16,6 @@ $(eval $(call gb_Module_add_targets,jurt,\
|
||||
Library_jpipe \
|
||||
))
|
||||
|
||||
ifeq ($(OS),MACOSX)
|
||||
$(eval $(call gb_Module_add_targets,jurt,\
|
||||
CustomTarget_jnilib \
|
||||
Package_jnilib \
|
||||
))
|
||||
endif
|
||||
|
||||
ifeq ($(OS),WNT)
|
||||
$(eval $(call gb_Module_add_targets,jurt,\
|
||||
Library_jpipx \
|
||||
|
@@ -1,14 +0,0 @@
|
||||
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
||||
#
|
||||
# This file is part of the LibreOffice project.
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
|
||||
$(eval $(call gb_Package_Package,jurt_jnilib,$(call gb_CustomTarget_get_workdir,jurt/util)))
|
||||
|
||||
$(eval $(call gb_Package_add_file,jurt_jnilib,lib/$(basename $(call gb_Library_get_filename,jpipe)).jnilib,libjpipe.jnilib))
|
||||
|
||||
# vim:set noet sw=4 ts=4:
|
@@ -171,7 +171,6 @@ $(eval $(call gb_InstallModule_add_scpfiles,scp2/ooo,\
|
||||
scp2/source/ooo/module_lang_template \
|
||||
scp2/source/ooo/profileitem_ooo \
|
||||
scp2/source/ooo/scpaction_ooo \
|
||||
scp2/source/ooo/shortcut_ooo \
|
||||
$(if $(filter WNTGCC,$(OS)$(COM)),\
|
||||
scp2/source/ooo/mingw_dlls \
|
||||
) \
|
||||
|
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* This file incorporates work covered by the following license notice:
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed
|
||||
* with this work for additional information regarding copyright
|
||||
* ownership. The ASF licenses this file to you under the Apache
|
||||
* License, Version 2.0 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
#include "macros.inc"
|
||||
|
||||
#ifdef MACOSX
|
||||
|
||||
#ifdef ENABLE_JAVA
|
||||
|
||||
// auto_ooo_lib_hsqldb defined in gbuild ($(WORKDIR)/AutoInstall/ooo)
|
||||
Shortcut gid_Shortcut_Lib_Hsqldb_2
|
||||
FileID = auto_ooo_lib_hsqldb;
|
||||
Dir = SCP2_OOO_LIB_DIR;
|
||||
Name = "libhsqldb.jnilib";
|
||||
Styles = (NETWORK, RELATIVE);
|
||||
End
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
//i44154 -end-
|
@@ -282,12 +282,10 @@ End
|
||||
#endif
|
||||
|
||||
#if defined ENABLE_JAVA && defined MACOSX
|
||||
Unixlink gid_Unixlink_Dl_JavaUno
|
||||
BIN_FILE_BODY;
|
||||
Dir = SCP2_URE_DL_DIR;
|
||||
Name = "libjava_uno.jnilib";
|
||||
Target = "libjava_uno.dylib";
|
||||
Styles = ();
|
||||
File gid_File_bridges_jnilib_java_uno
|
||||
Dir = FILELIST_DIR;
|
||||
Name = "bridges_jnilib_java_uno.filelist";
|
||||
Styles = (FILELIST);
|
||||
End
|
||||
#endif
|
||||
|
||||
@@ -638,6 +636,7 @@ Module gid_Module_Root_Ure_Hidden
|
||||
gid_File_Dl_Profile_Uno,
|
||||
gid_Unixlink_File_Dl_Rmcxt,
|
||||
gid_File_Dl_JrepropertiesClass,
|
||||
gid_File_bridges_jnilib_java_uno,
|
||||
gid_File_ure_install,
|
||||
gid_File_Dl_Jpipe,
|
||||
gid_File_Dl_Jpipx,
|
||||
@@ -657,8 +656,7 @@ Module gid_Module_Root_Ure_Hidden
|
||||
gid_File_Misc_TypesRdb,
|
||||
gid_File_Misc_ServicesRdb,
|
||||
gid_File_Misc_JavavendorsXml);
|
||||
Unixlinks = (gid_Unixlink_Dl_JavaUno,
|
||||
gid_Unixlink_File_Dl_Sal,
|
||||
Unixlinks = (gid_Unixlink_File_Dl_Sal,
|
||||
gid_Unixlink_File_Dl_Salhelper,
|
||||
gid_Unixlink_File_Dl_Cppu,
|
||||
gid_Unixlink_File_Dl_Cppuhelper,
|
||||
|
@@ -1,95 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This file is part of the LibreOffice project.
|
||||
#
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
#
|
||||
# This file incorporates work covered by the following license notice:
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed
|
||||
# with this work for additional information regarding copyright
|
||||
# ownership. The ASF licenses this file to you under the Apache
|
||||
# License, Version 2.0 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
#
|
||||
# Documentation
|
||||
# -------------
|
||||
#
|
||||
# The purpose of this script to take Mac OS X executables and shared libraries
|
||||
# and package them into the required Mac OS X bundle format.
|
||||
#
|
||||
# This script has the following usage:
|
||||
# macosx-create-bundle file1 [file2] ... [fileN]
|
||||
#
|
||||
# Note that file1 through fileN can in either of the following formats:
|
||||
# - A file name
|
||||
# - A file name and a directory to look for missing files. To use this option,
|
||||
# use the following format:
|
||||
# filename=directory
|
||||
#
|
||||
# The file argument is the file that you want to package into a Mac OS X
|
||||
# bundle. Currently, this script will only package executables and shared
|
||||
# libraries.
|
||||
#
|
||||
# The output for each executable will be a bundle named <file>.app and
|
||||
# the output for each shared library will be a symlink from libfoo.jnilib
|
||||
# back to libfoo.dylib.
|
||||
# These output directories will be in the same directory as the executable or
|
||||
# shared library.
|
||||
|
||||
# Code
|
||||
# ----
|
||||
|
||||
# Parse command line arguments
|
||||
if [ $# = 0 ]; then
|
||||
printf "macosx-create-bundle: error: incorrect number of arguments\n" >&2
|
||||
printf "Usage: macosx-create-bundle file1 [file2] ... [fileN]\n" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while [ $# != 0 ]; do
|
||||
inputfile=`echo "$1" | awk -F= '{print $1}'`
|
||||
sourcedir=`echo "$1" | awk -F= '{print $2}'`
|
||||
|
||||
shift
|
||||
|
||||
inputfilename=`basename "$inputfile"`
|
||||
outputdir=`dirname "$inputfile"`
|
||||
|
||||
solverlibdir="$SOLARVERSION/$INPATH/lib"
|
||||
locallibdir="../../../../lib"
|
||||
|
||||
solverbindir="$SOLARVERSION/$INPATH/bin"
|
||||
localbindir="../../.."
|
||||
|
||||
# Determine file type
|
||||
filetype=`file -L "$inputfile"`
|
||||
|
||||
# Create bundle based on file type
|
||||
if printf "$filetype" | grep -q 'Mach-O executable'; then
|
||||
|
||||
# Do nothing as this step is obsolete
|
||||
:
|
||||
|
||||
elif printf "$filetype" | grep -q 'dynamically linked shared library'; then
|
||||
# Screen out lib\w+static libraries as they are not used directly
|
||||
if ! printf "$inputfilename" | grep -q -x -E 'lib\w+static.*\.dylib'; then
|
||||
# Create jnilib link
|
||||
inputjnilibname="`basename $inputfilename .dylib`.jnilib"
|
||||
if [ ! -L "$outputdir/$inputjnilibname" ]; then
|
||||
rm -Rf "$outputdir/$inputjnilibname"
|
||||
fi
|
||||
# Link jnilib
|
||||
ln -sf "$inputfilename" "$outputdir/$inputjnilibname"
|
||||
|
||||
#printf "macosx-create-bundle: $outputdir/$inputjnilibname successfully created\n"
|
||||
fi
|
||||
else
|
||||
printf "macosx-create-bundle: error: file is not an executable or shared library.\n" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
@@ -157,8 +157,7 @@ $(call gb_Helper_abbreviate_dirs,\
|
||||
$(if $(filter Executable,$(TARGETTYPE)), \
|
||||
$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl app $(LAYER) $(1) &&) \
|
||||
$(if $(filter Library Bundle CppunitTest,$(TARGETTYPE)),\
|
||||
$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl shl $(LAYER) $(if $(SOVERSION),$(1).$(SOVERSION),$(1)) && \
|
||||
ln -sf $(notdir $(1)) $(basename $(1)).jnilib &&) \
|
||||
$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl shl $(LAYER) $(if $(SOVERSION),$(1).$(SOVERSION),$(1)) &&) \
|
||||
$(if $(MACOSX_CODESIGNING_IDENTITY), \
|
||||
$(if $(filter Executable,$(TARGETTYPE)), \
|
||||
(codesign --identifier=$(MACOSX_BUNDLE_IDENTIFIER).$(notdir $(1)) --sign $(MACOSX_CODESIGNING_IDENTITY) --force $(1) || true) &&)) \
|
||||
|
Reference in New Issue
Block a user