summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Ostrovsky <david@ostrovsky.org>2012-10-20 10:05:45 -0700
committerMichael Stahl <mstahl@redhat.com>2012-10-23 19:11:01 +0200
commit97d83c45faf42ada9993239c3835641d8bbd070f (patch)
tree53f22ad112377f11e0fa872ac148f37361d6b395
parent5e9a7f1919663d22cb568b1afdc018ef6be0cc91 (diff)
gbuildification of ct2n
Conflicts: config_host.mk.in Change-Id: I98ca1bb2af19d99a7a908991cf27a148ee84c543
-rw-r--r--Makefile.top2
-rw-r--r--RepositoryModule_ooo.mk1
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.ac2
-rw-r--r--ct2n/Extension_ct2n.mk54
-rw-r--r--ct2n/Makefile7
-rw-r--r--ct2n/Module_ct2n.mk21
-rw-r--r--ct2n/UnpackedTarball_ct2n.mk33
-rw-r--r--ct2n/delzip2
-rw-r--r--ct2n/description-en-US.txt4
-rw-r--r--ct2n/makefile.mk66
-rw-r--r--ct2n/prj/build.lst5
-rw-r--r--ct2n/prj/d.lst1
-rw-r--r--ct2n/prj/dmake0
-rw-r--r--ooo.lst.in2
-rw-r--r--solenv/gbuild/UnpackedTarball.mk3
16 files changed, 130 insertions, 74 deletions
diff --git a/Makefile.top b/Makefile.top
index 821631d35bcd..2b1aceacda02 100644
--- a/Makefile.top
+++ b/Makefile.top
@@ -62,6 +62,7 @@ cppcanvas\
cppu\
cppuhelper\
cpputools\
+ct2n\
cui\
dbaccess\
desktop\
@@ -206,7 +207,6 @@ binfilter \
cairo\
cppunit\
crashrep\
-ct2n\
curl\
epm\
expat\
diff --git a/RepositoryModule_ooo.mk b/RepositoryModule_ooo.mk
index ffc605bc8071..557e17927992 100644
--- a/RepositoryModule_ooo.mk
+++ b/RepositoryModule_ooo.mk
@@ -59,6 +59,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
cppu \
cppuhelper \
cpputools \
+ $(call gb_Helper_optional,CT2N,ct2n) \
cui \
dbaccess \
desktop \
diff --git a/config_host.mk.in b/config_host.mk.in
index e867c5757978..0ea224e2c2c1 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -85,6 +85,7 @@ export CPUNAME=@CPUNAME@
export CPUNAME_FOR_BUILD=@CPUNAME_FOR_BUILD@
export CPU_FOR_BUILD=@CPU_FOR_BUILD@
export CROSS_COMPILING=@CROSS_COMPILING@
+export CT2N_TARBALL=@CT2N_TARBALL@
export CURL_CFLAGS=@CURL_CFLAGS@
export CURL_LIBS=@CURL_LIBS@
export CXX=@CXX@
diff --git a/configure.ac b/configure.ac
index 29804ec6524e..a76c6b32f022 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11060,10 +11060,12 @@ AC_MSG_CHECKING([for ConvertTextToNumber extension integration])
if test "x$enable_ext_ct2n" = "xyes" -a "x$enable_extension_integration" != "xno"; then
BUILD_TYPE="$BUILD_TYPE CT2N"
SCPDEFS="$SCPDEFS -DWITH_EXTENSION_CT2N"
+ CT2N_TARBALL="451ccf439a36a568653b024534669971-ConvertTextToNumber-1.3.2.oxt"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
+AC_SUBST([CT2N_TARBALL])
dnl ===================================================================
dnl Test whether to include Numbertext extension
diff --git a/ct2n/Extension_ct2n.mk b/ct2n/Extension_ct2n.mk
new file mode 100644
index 000000000000..37c31870c3ef
--- /dev/null
+++ b/ct2n/Extension_ct2n.mk
@@ -0,0 +1,54 @@
+# -*- 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_Extension_Extension,ConvertTextToNumber,\
+ workdir/$(INPATH_FOR_BUILD)/UnpackedTarball/ConvertTextToNumber))
+
+CT2N_DIR := $(call gb_UnpackedTarball_get_dir,ConvertTextToNumber)
+
+# we have our own LICENSE file; force using it instead of the default one
+$(call gb_ExtensionTarget_get_target,ConvertTextToNumber) : \
+ LICENSE := $(CT2N_DIR)/registration/LICENSE
+
+$(eval $(call gb_Extension_add_files,ConvertTextToNumber,,\
+ $(CT2N_DIR)/Addons.xcu \
+))
+
+$(eval $(call gb_Extension_add_files,ConvertTextToNumber,CT2N,\
+ $(CT2N_DIR)/CT2N/MainCode.xba \
+ $(CT2N_DIR)/CT2N/ToClipbord.xba \
+ $(CT2N_DIR)/CT2N/Language.xba \
+ $(CT2N_DIR)/CT2N/dialog.xlb \
+ $(CT2N_DIR)/CT2N/dlgCode.xba \
+ $(CT2N_DIR)/CT2N/script.xlb \
+ $(CT2N_DIR)/CT2N/dlgCT2N.xdl \
+ $(CT2N_DIR)/CT2N/UserSettings.xba \
+))
+
+$(eval $(call gb_Extension_add_files,ConvertTextToNumber,Office/UI,\
+ $(CT2N_DIR)/Office/UI/BaseWindowState.xcu \
+ $(CT2N_DIR)/Office/UI/ImpressWindowState.xcu \
+ $(CT2N_DIR)/Office/UI/StartModuleWindowState.xcu \
+ $(CT2N_DIR)/Office/UI/BasicIDEWindowState.xcu \
+ $(CT2N_DIR)/Office/UI/CalcWindowState.xcu \
+ $(CT2N_DIR)/Office/UI/WriterWindowState.xcu \
+ $(CT2N_DIR)/Office/UI/DrawWindowState.xcu \
+ $(CT2N_DIR)/Office/UI/MathWindowState.xcu \
+))
+
+$(eval $(call gb_Extension_add_files,ConvertTextToNumber,icons,\
+ $(CT2N_DIR)/icons/image1_26.bmp \
+ $(CT2N_DIR)/icons/image1_16.bmp \
+))
+
+$(eval $(call gb_Extension_add_files,ConvertTextToNumber,pkg-desc,\
+ $(CT2N_DIR)/pkg-desc/pkg-description.txt \
+))
+
+# vim: set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/ct2n/Makefile b/ct2n/Makefile
new file mode 100644
index 000000000000..ccb1c85a04da
--- /dev/null
+++ b/ct2n/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/ct2n/Module_ct2n.mk b/ct2n/Module_ct2n.mk
new file mode 100644
index 000000000000..3fdb546b000c
--- /dev/null
+++ b/ct2n/Module_ct2n.mk
@@ -0,0 +1,21 @@
+# -*- 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_Module_Module,ConvertTextToNumber))
+
+ifneq (,$(filter CT2N,$(BUILD_TYPE)))
+
+$(eval $(call gb_Module_add_targets,ConvertTextToNumber,\
+ UnpackedTarball_ct2n \
+ Extension_ct2n \
+))
+
+endif
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/ct2n/UnpackedTarball_ct2n.mk b/ct2n/UnpackedTarball_ct2n.mk
new file mode 100644
index 000000000000..7239d8ac969a
--- /dev/null
+++ b/ct2n/UnpackedTarball_ct2n.mk
@@ -0,0 +1,33 @@
+# -*- 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_UnpackedTarball_UnpackedTarball,ConvertTextToNumber))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,ConvertTextToNumber,$(CT2N_TARBALL),0))
+
+# Extension class requires description-en-US.txt file
+$(eval $(call gb_UnpackedTarball_add_file,ConvertTextToNumber,\
+ description-en-US.txt,ct2n/description-en-US.txt))
+
+$(eval $(call gb_UnpackedTarball_add_patches,ConvertTextToNumber,\
+ ct2n/ConvertTextToNumber-1.3.2-no-license.patch \
+ ct2n/ConvertTextToNumber-1.3.2-no-visible-by-default.patch \
+))
+
+# adjustments for using Extension class
+# 1. manifest.xml is expected in root directory
+# 2. LICENSE file is required, reuse existing COPYING
+$(eval $(call gb_UnpackedTarball_set_post_action,ConvertTextToNumber,\
+ mv $(call gb_UnpackedTarball_get_dir,ConvertTextToNumber)/META-INF/manifest.xml \
+ $(call gb_UnpackedTarball_get_dir,ConvertTextToNumber) && \
+ mv $(call gb_UnpackedTarball_get_dir,ConvertTextToNumber)/registration/COPYING \
+ $(call gb_UnpackedTarball_get_dir,ConvertTextToNumber)/registration/LICENSE \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/ct2n/delzip b/ct2n/delzip
deleted file mode 100644
index 00d6fa1d41c7..000000000000
--- a/ct2n/delzip
+++ /dev/null
@@ -1,2 +0,0 @@
-*.orig
-so_*_ct2n
diff --git a/ct2n/description-en-US.txt b/ct2n/description-en-US.txt
new file mode 100644
index 000000000000..a91393b5acf5
--- /dev/null
+++ b/ct2n/description-en-US.txt
@@ -0,0 +1,4 @@
+From [http://extensions.libreoffice.org/extension-center/ct2n-convert-text-to-number-and-dates].
+
+ConvertTextToNumber replaces numbers and dates, formatted
+ as text, with real numbers.
diff --git a/ct2n/makefile.mk b/ct2n/makefile.mk
deleted file mode 100644
index 0a4a7b7851cf..000000000000
--- a/ct2n/makefile.mk
+++ /dev/null
@@ -1,66 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# 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=ct2n
-TARGET=ct2n
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-TARFILE_MD5=451ccf439a36a568653b024534669971
-TARFILE_NAME=ConvertTextToNumber-1.3.2
-TARFILE_ROOTDIR=.
-BUILD_DIR=.
-
-PATCH_FILES=\
- ConvertTextToNumber-1.3.2-no-license.patch \
- ConvertTextToNumber-1.3.2-no-visible-by-default.patch
-
-CONFIGURE_DIR=
-CONFIGURE_ACTION=
-CONFIGURE_FLAGS=
-BUILD_ACTION=
-
-ZIP1TARGET=ConvertTextToNumber
-ZIP1EXT=.oxt
-ZIP1FLAGS=-u -r
-ZIP1DIR=$(MISC)/build$/$(TARFILE_ROOTDIR)
-ZIP1LIST= * -x "*.orig" -x "so_*_ct2n"
-ZIP1DEPS=$(PACKAGE_DIR)/$(PREDELIVER_FLAG_FILE)
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : set_ext.mk
-.INCLUDE : tg_ext.mk
-.INCLUDE : target.mk
-
-ZIP1TARGET : $(PACKAGE_DIR)/$(PREDELIVER_FLAG_FILE)
diff --git a/ct2n/prj/build.lst b/ct2n/prj/build.lst
index 714d9265d372..a594256b1410 100644
--- a/ct2n/prj/build.lst
+++ b/ct2n/prj/build.lst
@@ -1,3 +1,2 @@
-ct2n ct2n : solenv NULL
-ct2n ct2n usr1 - all ct2n_mkout NULL
-ct2n ct2n nmake - all ct2n_ct2n NULL
+ct2n ct2n : solenv NULL
+ct2n ct2n\prj nmake - all ct2n_ct2n NULL
diff --git a/ct2n/prj/d.lst b/ct2n/prj/d.lst
index bb394d57baef..e69de29bb2d1 100644
--- a/ct2n/prj/d.lst
+++ b/ct2n/prj/d.lst
@@ -1 +0,0 @@
-..\%__SRC%\bin\ConvertTextToNumber*.oxt %_DEST%\bin\*
diff --git a/ct2n/prj/dmake b/ct2n/prj/dmake
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/ct2n/prj/dmake
+++ /dev/null
diff --git a/ooo.lst.in b/ooo.lst.in
index 0b644966924e..755daa994afc 100644
--- a/ooo.lst.in
+++ b/ooo.lst.in
@@ -45,7 +45,7 @@ a7d6c5f2fe2d481149ed3ba807b5c043-gdk-pixbuf-2.23.0.tar.gz
2ab442d169156f34c379c968f3f482dd-zlib-1.2.7.tar.bz2
0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
7c53f83e0327343f4060c0eb83842daf-icu4c-49_1_1-src.tgz
-451ccf439a36a568653b024534669971-ConvertTextToNumber-1.3.2.oxt
+@CT2N_TARBALL@
0f63ee487fda8f21fafa767b3c447ac9-ixion-0.2.0.tar.gz
a0a861f539f0e7a91d05e6b9457e4db1-nss-3.13.5-with-nspr-4.9.1.tar.gz
3121aaf3e13e5d88dfff13fb4a5f1ab8-hunspell-1.3.2.tar.gz
diff --git a/solenv/gbuild/UnpackedTarball.mk b/solenv/gbuild/UnpackedTarball.mk
index 73123622c2d4..53a4715ec5d5 100644
--- a/solenv/gbuild/UnpackedTarball.mk
+++ b/solenv/gbuild/UnpackedTarball.mk
@@ -73,6 +73,9 @@ $(call gb_UnpackedTarget_get_target,%).tgz :
$(call gb_UnpackedTarget_get_target,%).zip :
$(call gb_UnpackedTarget__command,unzip,$@,$*)
+$(call gb_UnpackedTarget_get_target,%).oxt :
+ $(call gb_UnpackedTarget__command,unzip,$@,$*)
+
.PHONY : $(call gb_UnpackedTarget_get_clean_target,%)
$(call gb_UnpackedTarget_get_clean_target,%) :
$(call gb_Output_announce,$*,$(false),UPK,1)