diff options
author | Peter Foley <pefoley2@verizon.net> | 2011-12-17 22:29:19 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2011-12-17 22:29:19 +0100 |
commit | bee2690663cff923d1aa67b2b8e561ee6ca7457c (patch) | |
tree | 196cff60740700a57eeef47998c1f481774f7bc7 | |
parent | fc75a113718cbab1f6a06743085f2d3d3dd0725a (diff) |
extensions: convert spotlight to gbuild
-rw-r--r-- | extensions/Library_OOoSpotlightImporter.mk | 52 | ||||
-rw-r--r-- | extensions/Module_extensions.mk | 6 | ||||
-rw-r--r-- | extensions/Zip_mdibundle.mk | 40 | ||||
-rw-r--r-- | extensions/prj/build.lst | 1 | ||||
-rw-r--r-- | extensions/source/macosx/spotlight/delzip | 0 | ||||
-rw-r--r-- | extensions/source/macosx/spotlight/makefile.mk | 99 |
6 files changed, 98 insertions, 100 deletions
diff --git a/extensions/Library_OOoSpotlightImporter.mk b/extensions/Library_OOoSpotlightImporter.mk new file mode 100644 index 000000000000..4a622331e3e6 --- /dev/null +++ b/extensions/Library_OOoSpotlightImporter.mk @@ -0,0 +1,52 @@ +# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +# +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Initial Developer of the Original Code is +# Peter Foley <pefoley2@verizon.net> +# Portions created by the Initial Developer are Copyright (C) 2011 the +# Initial Developer. All Rights Reserved. +# +# Major Contributor(s): +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. +# + +$(eval $(call gb_Library_Library,OOoSpotlightImporter)) + +$(eval $(call gb_Library_add_objcobjects,OOoSpotlightImporter,\ + extensions/source/macosx/spotlight/GetMetadataForFile \ + extensions/source/macosx/spotlight/OOoContentDataParser \ + extensions/source/macosx/spotlight/OOoMetaDataParser \ + extensions/source/macosx/spotlight/OOoSpotlightImporter \ + extensions/source/macosx/spotlight/ioapi \ + extensions/source/macosx/spotlight/main \ + extensions/source/macosx/spotlight/unzip \ +)) + +$(eval $(call gb_Library_add_ldflags,OOoSpotlightImporter,\ + -framework CoreFoundation \ + -framework Foundation \ + -framework CoreServices \ + -bundle \ +)) + +$(eval $(call gb_Library_use_external,OOoSpotlightImporter,zlib)) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/extensions/Module_extensions.mk b/extensions/Module_extensions.mk index dd7c3359fb54..02e4ae4c43e3 100644 --- a/extensions/Module_extensions.mk +++ b/extensions/Module_extensions.mk @@ -79,6 +79,12 @@ endif # GUI=UNX endif # WITH_MOZILLA=YES +ifeq ($(OS),MACOSX) +$(eval $(call gb_Module_add_targets,extensions,\ + Library_OOoSpotlightImporter \ + Zip_mdibundle \ +)) +endif # OS=MACOSX $(eval $(call gb_Module_add_check_targets,extensions,\ CppunitTest_extensions_test_update \ diff --git a/extensions/Zip_mdibundle.mk b/extensions/Zip_mdibundle.mk new file mode 100644 index 000000000000..56e9b727c151 --- /dev/null +++ b/extensions/Zip_mdibundle.mk @@ -0,0 +1,40 @@ +# -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +# +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Initial Developer of the Original Code is +# Peter Foley <pefoley2@verizon.net> +# Portions created by the Initial Developer are Copyright (C) 2011 the +# Initial Developer. All Rights Reserved. +# +# Major Contributor(s): +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. +# + +MDISRC := $(SRCDIR)/extensions/source/macosx/spotlight/mdimporter + +$(eval $(call gb_Zip_Zip,mdibundle,$(WORKDIR)/Zip/mdibundle)) + +$(eval $(call gb_Zip_add_file,mdibundle,schema.xml,$(MDISRC)/schema.xml)) +$(eval $(call gb_Zip_add_file,mdibundle,Info.plist,$(MDISRC)/Info.plist)) +$(eval $(call gb_Zip_add_file,mdibundle,en.lproj/schema.strings,$(MDISRC)/en.lproj/schema.strings)) +$(eval $(call gb_Zip_add_file,mdibundle,OOoSpotlightImporter,$(OUTDIR)/bin/OOoSpotlightImporter)) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/extensions/prj/build.lst b/extensions/prj/build.lst index d47b82a57f1a..7d5e500019eb 100644 --- a/extensions/prj/build.lst +++ b/extensions/prj/build.lst @@ -6,7 +6,6 @@ ex extensions\inc\ucbhelper get - all ex_incucbh ex_in ex extensions\source\activex\msidl nmake - w ex_axmsidl ex_inc NULL ex extensions\source\activex\main nmake - w ex_axmain ex_axmsidl.w ex_inc NULL ex extensions\source\resource nmake - all ex_resrc ex_inc NULL -ex extensions\source\macosx\spotlight nmake - u ex_mxspotlight NULL ex extensions\source\bibliography nmake - all ex_bib ex_inc NULL ex extensions\source\xmlextract nmake - all ex_xmlextr ex_inc NULL ex extensions\source\dbpilots nmake - all ex_dbpilots ex_inc NULL diff --git a/extensions/source/macosx/spotlight/delzip b/extensions/source/macosx/spotlight/delzip deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/extensions/source/macosx/spotlight/delzip +++ /dev/null diff --git a/extensions/source/macosx/spotlight/makefile.mk b/extensions/source/macosx/spotlight/makefile.mk deleted file mode 100644 index e7b15150bd03..000000000000 --- a/extensions/source/macosx/spotlight/makefile.mk +++ /dev/null @@ -1,99 +0,0 @@ -#************************************************************************* -# -# 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. -# -#************************************************************************* - -PRJ=../../.. -PRJNAME=extensions -TARGET=spotlightplugin - -# --- Settings ---------------------------------- -.INCLUDE : settings.mk - -.IF "$(OS)"!="MACOSX" -dummy: - @echo Not using Mac OS X - nothing to build -.ENDIF - -# --- Files ------------------------------------- - -# ... object files ............................ -SLOFILES= \ - $(SLO)$/ioapi.obj \ - $(SLO)$/unzip.obj \ - $(SLO)$/main.obj \ - $(SLO)$/GetMetadataForFile.obj \ - $(SLO)$/OOoContentDataParser.obj \ - $(SLO)$/OOoMetaDataParser.obj \ - $(SLO)$/OOoSpotlightImporter.obj \ - -BUNDLE = $(MISC)$/OOoSpotlightImporter.mdimporter -CONTENTS = $(BUNDLE)$/Contents -RESOURCES = $(CONTENTS)$/Resources -MACOS = $(CONTENTS)$/MacOS - -BUNDLELIBS= -framework CoreFoundation \ - -framework Foundation \ - -framework CoreServices \ - $(ZLIB3RDLIB) - -plistfiles = $(CONTENTS)$/Info.plist -binaries = $(MACOS)$/OOoSpotlightImporter -resources = $(RESOURCES)/en.lproj/schema.strings \ - $(RESOURCES)/schema.xml - -ZIPFLAGS = -r -ZIP1TARGET = mdibundle -ZIP1DIR = $(CONTENTS) -ZIP1LIST = * - - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - -.IF "$(ZIP1TARGETN)"!="" -$(ZIP1TARGETN) : $(plistfiles) $(binaries) $(resources) - -.ENDIF # "$(ZIP1TARGETN)"!="" - -# Info.plist is just versioned and copied into the bundle -$(CONTENTS)$/%.plist : mdimporter/%.plist - $(MKDIRHIER) $(@:d) - $(COPY) "$<" "$@" - -$(MACOS)$/OOoSpotlightImporter: $(SLOFILES) - $(MKDIRHIER) $(@:d) - $(CC) -o $(MACOS)$/OOoSpotlightImporter $(SLOFILES:s/.obj/.o/) $(EXTRA_LINKFLAGS) $(BUNDLELIBS) -bundle -# we have to change the zlib install name, otherwise the plugin will not work - .IF "$(SYSTEM_ZLIB)"=="NO" - install_name_tool -change @executable_path/libz.1.dylib @executable_path/../../../../MacOS/libz.1.dylib $(MACOS)$/OOoSpotlightImporter - .ENDIF - -#the resources are just copied -$(RESOURCES)$/% : mdimporter/% - $(MKDIRHIER) $(@:d) - $(COPY) "$<" "$@" - |