diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2020-03-25 01:52:08 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-04-07 16:17:21 +0000 |
commit | 16d8d6ae21cb58120e0aa2bf0bc838bd5fc8c9a0 (patch) | |
tree | 060815582793d7f99658913488352fefcb1bbf08 | |
parent | b8f33433cf79c661a466f63d304343b86a856a33 (diff) |
Compile some more and put proper load paths in component xml files.
Change-Id: I2565d54aa2c5258d454200acb4adbc935c0193ae
-rwxr-xr-x | cppuhelper/genservices.py | 145 | ||||
-rw-r--r-- | i18npool/meson.build | 17 | ||||
-rw-r--r-- | lingucomponent/meson.build | 17 | ||||
-rw-r--r-- | meson.build | 1 | ||||
-rw-r--r-- | sc/meson.build | 20 |
5 files changed, 136 insertions, 64 deletions
diff --git a/cppuhelper/genservices.py b/cppuhelper/genservices.py index ec2aa8684726..cbd4d6116746 100755 --- a/cppuhelper/genservices.py +++ b/cppuhelper/genservices.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -import os, sys, subprocess, shutil +import os, sys, subprocess, shutil, tempfile import xml.etree.ElementTree as ET output_name = sys.argv[1] @@ -58,40 +58,40 @@ components = [ 'sc/util/sc', 'sc/util/scd', 'sc/util/scfilt', - 'scaddins/source/analysis/analysis', - 'scaddins/source/datefunc/date', - 'scaddins/source/pricing/pricing', +# 'scaddins/source/analysis/analysis', +# 'scaddins/source/datefunc/date', +# 'scaddins/source/pricing/pricing', 'sd/util/sd', - 'sd/util/sdd', +# 'sd/util/sdd', 'sd/util/sdfilt', - 'sdext/source/presenter/presenter', - 'sdext/source/minimizer/minimizer', +# 'sdext/source/presenter/presenter', +# 'sdext/source/minimizer/minimizer', 'sfx2/util/sfx', 'slideshow/util/slideshow', 'sot/util/sot', 'starmath/util/sm', 'starmath/util/smd', 'svl/source/fsstor/fsstorage', - 'svl/source/passwordcontainer/passwordcontainer', +# 'svl/source/passwordcontainer/passwordcontainer', 'svl/util/svl', 'svtools/util/svt', 'svgio/svgio', 'emfio/emfio', 'svx/util/svx', 'svx/util/svxcore', - 'svx/util/textconversiondlgs', +# 'svx/util/textconversiondlgs', 'sw/util/msword', 'sw/util/sw', - 'sw/util/swd', +# 'sw/util/swd', 'toolkit/util/tk', 'ucb/source/sorter/srtrs1', 'ucb/source/core/ucb1', - 'ucb/source/cacher/cached1', +# 'ucb/source/cacher/cached1', 'ucb/source/ucp/expand/ucpexpand1', - 'ucb/source/ucp/ext/ucpext', +# 'ucb/source/ucp/ext/ucpext', 'ucb/source/ucp/file/ucpfile1', 'ucb/source/ucp/hierarchy/ucphier1', - 'ucb/source/ucp/image/ucpimage', +# 'ucb/source/ucp/image/ucpimage', 'ucb/source/ucp/package/ucppkg1', 'ucb/source/ucp/tdoc/ucptdoc1', 'UnoControls/util/ctl', @@ -99,71 +99,90 @@ components = [ 'unoxml/source/rdf/unordf', 'unoxml/source/service/unoxml', 'uui/util/uui', - 'vcl/vcl.common', +# 'vcl/vcl.common', 'xmloff/source/transform/xof', 'xmloff/util/xo', 'xmlscript/util/xmlscript', - 'sccomp/source/solver/swarmsolver', - 'writerfilter/util/writerfilter', - 'writerperfect/source/draw/wpftdraw', - 'writerperfect/source/impress/wpftimpress', +# 'sccomp/source/solver/swarmsolver', +# 'writerfilter/util/writerfilter', +# 'writerperfect/source/draw/wpftdraw', +# 'writerperfect/source/impress/wpftimpress', 'writerperfect/source/writer/wpftwriter', - 'writerperfect/source/calc/wpftcalc', +# 'writerperfect/source/calc/wpftcalc', 'basctl/util/basctl', 'basic/util/sb', 'sc/util/vbaobj', - 'scripting/source/basprov/basprov', - 'scripting/source/dlgprov/dlgprov', +# 'scripting/source/basprov/basprov', +# 'scripting/source/dlgprov/dlgprov', 'scripting/source/protocolhandler/protocolhandler', - 'scripting/source/stringresource/stringresource', - 'scripting/source/vbaevents/vbaevents', - 'scripting/util/scriptframe', +# 'scripting/source/stringresource/stringresource', +# 'scripting/source/vbaevents/vbaevents', +# 'scripting/util/scriptframe', 'sw/util/vbaswobj', 'vbahelper/util/msforms', 'canvas/source/cairo/cairocanvas', - 'shell/source/sessioninstall/losessioninstall', - 'ucb/source/ucp/gio/ucpgio', +# 'shell/source/sessioninstall/losessioninstall', +# 'ucb/source/ucp/gio/ucpgio', ] -tmpdir = os.path.join(os.getcwd(), 'fobba') -if os.path.isdir(tmpdir): - shutil.rmtree(tmpdir) -os.mkdir(tmpdir) +# This is terrible and hacky and should be replaced with +# introspection or something similar. +def determine_libname(source_root, component_base): + component_name = os.path.split(component_base)[1] + component_dir = component_base.split('/', 1)[0] + meson_file = os.path.join(source_root, component_dir, 'meson.build') + assert(os.path.exists(meson_file)) + losearch = "shared_library('{}lo'".format(component_name) + nolosearch = "shared_library('{}'".format(component_name) + with open(meson_file) as mfile: + for line in mfile: + if losearch in line: + return 'lib{}lo.so'.format(component_name) + if nolosearch in line: + return 'lib{}.so'.format(component_name) + # Haximus Maximux + if component_name == 'comphelp': + return 'libcomphelper.so' + if component_name == 'filterconfig1': + return 'libfilterconfiglo.so' + if component_name == 'lwpfilter': + return 'liblwpft.so' + sys.exit('Could not find shared library for {}.'.format(component_base)) -root = ET.Element('list') +with tempfile.TemporaryDirectory() as tmpdir: + root = ET.Element('list') -for c in components: - cbase = os.path.basename(c) - iname = os.path.join('..', c + '.component') - oname = os.path.join(tmpdir, cbase + '.component') - n = ET.SubElement(root, 'filename') - n.text = oname - component = ET.parse(iname) - croot = component.getroot() - assert('environment' in croot.attrib) - croot.attrib['environment'] = 'gcc3' - croot.attrib['uri'] = 'vnd.sun.star.expand:$LO_LIB_DIR/libanimcorelo.so' - new_root = ET.Element('components') - new_root.append(component.getroot()) - new_root.attrib['xmlns'] = 'http://openoffice.org/2010/uno-components' - assert(not os.path.exists(oname)) - tree = ET.ElementTree(new_root) - tree.write(oname, xml_declaration=True) + for c in components: + cbase = os.path.basename(c) + iname = os.path.join('..', c + '.component') + oname = os.path.join(tmpdir, cbase + '.component') + assert(not os.path.exists(oname)) + n = ET.SubElement(root, 'filename') + n.text = oname + component = ET.parse(iname) + libname = determine_libname('..', c) + croot = component.getroot() + assert('environment' in croot.attrib) + croot.attrib['environment'] = 'gcc3' + croot.attrib['uri'] = 'vnd.sun.star.expand:$LO_LIB_DIR/' + libname + new_root = ET.Element('components') + new_root.append(component.getroot()) + new_root.attrib['xmlns'] = 'http://openoffice.org/2010/uno-components' + tree = ET.ElementTree(new_root) + tree.write(oname, xml_declaration=True) -tree = ET.ElementTree(root) -tmp_xml = 'servicelist.xml' -tree.write(tmp_xml, xml_declaration=True) + tree = ET.ElementTree(root) + tmp_xml = os.path.join(tmpdir, 'servicelist.xml') + tree.write(tmp_xml, xml_declaration=True) -rc = subprocess.call(['xsltproc', - #'-v', - '--nonet', - '-o', - output_name, - input_name, - tmp_xml, -]) + rc = subprocess.call(['xsltproc', + #'-v', + '--nonet', + '-o', + output_name, + input_name, + tmp_xml, + ]) -if rc != 0: - sys.exit(rc) - -os.unlink(tmp_xml) + if rc != 0: + sys.exit(rc) diff --git a/i18npool/meson.build b/i18npool/meson.build index 591638117732..0ff1f4e9dbff 100644 --- a/i18npool/meson.build +++ b/i18npool/meson.build @@ -121,7 +121,6 @@ i18npool_lib = shared_library('i18npoollo', 'source/transliteration/transliteration_OneToOne.cxx', break_sources, openoffice_c, - #'breakiterator/OpenOffice_dat.c', udk_fake_h, off_fake_h, cpp_args: ['-DLIBO_INTERNAL_ONLY'], include_directories: [main_inc, udkh_inc, offapi_inc, 'inc'], @@ -205,3 +204,19 @@ dict_zh_lib = shared_library('dict_zh', gnu_symbol_visibility: 'hidden', install: true, ) + +i18nsearch_lib = shared_library('i18nsearchlo', + 'source/search/levdis.cxx', + 'source/search/textsearch.cxx', + udk_fake_h, off_fake_h, + cpp_args: ['-DLIBO_INTERNAL_ONLY'], + include_directories: [main_inc, udkh_inc, offapi_inc, 'inc'], + link_with: [comphelper_lib, + cppu_lib, + cppuhelper_lib, + sal_lib, + ], + dependencies: [icuuc_dep, icu18_dep], + gnu_symbol_visibility: 'hidden', + install: true, +) diff --git a/lingucomponent/meson.build b/lingucomponent/meson.build index 13c4666c55fd..4539ea37dc48 100644 --- a/lingucomponent/meson.build +++ b/lingucomponent/meson.build @@ -90,3 +90,20 @@ guesslang_lib = shared_library('guesslanglo', gnu_symbol_visibility: 'hidden', install: true, ) + +numbertext_lib = shared_library('numbertextlo', + 'source/numbertext/numbertext.cxx', + udk_fake_h, off_fake_h, + cpp_args: ['-DLIBO_INTERNAL_ONLY'], + include_directories: [main_inc, udkh_inc, offapi_inc, 'source/lingutil'], + link_with: [cppu_lib, + cppuhelper_lib, + i18nlangtag_lib, + sal_lib, + tl_lib, + utl_lib, + ], + dependencies: [numbertext_dep], + gnu_symbol_visibility: 'hidden', + install: true, +) diff --git a/meson.build b/meson.build index c6134f153efb..51036878a25f 100644 --- a/meson.build +++ b/meson.build @@ -157,6 +157,7 @@ hunspell_dep = dependency('hunspell') hyphen_dep = cpp.find_library('hyphen') mythes_dep = dependency('mythes') libexttextcat_dep = dependency('libexttextcat') +numbertext_dep = dependency('libnumbertext') # The version in Ubuntu eoan is too old. mdds_dep = dependency('mdds-1.6', diff --git a/sc/meson.build b/sc/meson.build index a38c710113ba..a73a220e0542 100644 --- a/sc/meson.build +++ b/sc/meson.build @@ -1020,3 +1020,23 @@ vbaobj_lib = shared_library('vbaobjlo', gnu_symbol_visibility: 'hidden', install: true, ) + +scd_lib = shared_library('scdlo', + 'source/ui/unoobj/scdetect.cxx', + 'source/ui/unoobj/exceldetect.cxx', + udk_fake_h, off_fake_h, + cpp_args: ['-DLIBO_INTERNAL_ONLY'], + include_directories: [main_inc, udkh_inc, offapi_inc, 'inc'], + link_with: [comphelper_lib, + cppu_lib, + cppuhelper_lib, + sal_lib, + sfx_lib, + sot_lib, + tl_lib, + utl_lib, + ], + dependencies: [], + gnu_symbol_visibility: 'hidden', + install: true, +) |