summaryrefslogtreecommitdiff
path: root/liborcus
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2012-09-09 15:29:43 +0200
committerMatúš Kukan <matus.kukan@gmail.com>2012-09-11 14:34:55 +0200
commit1ee760335b8562f52728baa6ffebb2e79b28e789 (patch)
treeeabc4cd9adbc50756f55856a1fe49eee0693862d /liborcus
parented2ad9638208b905f6501fedcd9b84d4176b9529 (diff)
liborcus: convert to gbuild
Change-Id: I6a0d869526ffd40bfe5ff81267f241c049d050f0
Diffstat (limited to 'liborcus')
-rw-r--r--liborcus/ExternalProject_liborcus.mk49
-rw-r--r--liborcus/Makefile7
-rw-r--r--liborcus/Module_liborcus.mk21
-rw-r--r--liborcus/UnpackedTarball_orcus.mk31
-rw-r--r--liborcus/liborcus_0.1.0-boost_disable_auto_lib.patch4
-rw-r--r--liborcus/liborcus_0.1.0-configure.patch4
-rw-r--r--liborcus/liborcus_0.1.0-mingw.patch12
-rw-r--r--liborcus/liborcus_0.1.0-warnings.patch8
-rw-r--r--liborcus/makefile.mk92
-rw-r--r--liborcus/prj/d.lst10
-rw-r--r--liborcus/prj/dmake0
11 files changed, 122 insertions, 116 deletions
diff --git a/liborcus/ExternalProject_liborcus.mk b/liborcus/ExternalProject_liborcus.mk
new file mode 100644
index 000000000000..80d38763788b
--- /dev/null
+++ b/liborcus/ExternalProject_liborcus.mk
@@ -0,0 +1,49 @@
+# -*- 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_ExternalProject_ExternalProject,liborcus))
+
+$(eval $(call gb_ExternalProject_use_unpacked,liborcus,orcus))
+
+$(eval $(call gb_ExternalProject_register_targets,liborcus,\
+ build \
+))
+
+ifeq ($(OS)$(COM),WNTMSC)
+
+$(call gb_ExternalProject_get_state_target,liborcus,build) :
+ cd $(EXTERNAL_WORKDIR)/vsprojects/liborcus-static-nozip \
+ && export BOOST_INCLUDE_DIR=$(OUTDIR)/inc/external \
+ && export BOOST_LIB_DIR=$(OUTDIR)/lib \
+ && $(COMPATH)/vcpackages/vcbuild.exe liborcus-static-nozip.vcproj "Release|Win32" \
+ && cp Release/orcus.lib $(OUTDIR)/lib \
+ && touch $@
+
+else
+
+$(call gb_ExternalProject_get_state_target,liborcus,build) :
+ cd $(EXTERNAL_WORKDIR) \
+ && $(if $(filter ANDROID,$(OS)),LIBS='-lgnustl_shared -lm') \
+ ./configure \
+ --with-pic \
+ --enable-static \
+ --disable-shared \
+ --without-libzip \
+ --disable-debug \
+ --disable-spreadsheet-model \
+ $(if $(filter NO,$(SYSTEM_BOOST)),CXXFLAGS=-I$(OUTDIR)/inc/external) \
+ $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
+ && $(GNUMAKE) \
+ && cp src/liborcus/.libs/liborcus-0.2.a $(OUTDIR)/lib \
+ && ln -s $(OUTDIR)/lib/liborcus.a liborcus-0.2.a \
+ && touch $@
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/liborcus/Makefile b/liborcus/Makefile
new file mode 100644
index 000000000000..ccb1c85a04da
--- /dev/null
+++ b/liborcus/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/liborcus/Module_liborcus.mk b/liborcus/Module_liborcus.mk
new file mode 100644
index 000000000000..f8c0ed0a4a65
--- /dev/null
+++ b/liborcus/Module_liborcus.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,liborcus))
+
+ifeq ($(SYSTEM_LIBORCUS),NO)
+
+$(eval $(call gb_Module_add_targets,liborcus,\
+ ExternalProject_liborcus \
+ UnpackedTarball_orcus \
+))
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/liborcus/UnpackedTarball_orcus.mk b/liborcus/UnpackedTarball_orcus.mk
new file mode 100644
index 000000000000..6846f22f3374
--- /dev/null
+++ b/liborcus/UnpackedTarball_orcus.mk
@@ -0,0 +1,31 @@
+# -*- 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,orcus))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,orcus,$(ORCUS_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_set_patchlevel,orcus,0))
+
+orcus_patches :=
+# -Werror,-Wunused-variable -Werror,-Wunused-private-field
+orcus_patches += liborcus_0.1.0-warnings.patch
+# make config.sub recognize arm-linux-androideabi
+orcus_patches += liborcus_0.1.0-configure.patch
+# fix MinGW build
+orcus_patches += liborcus_0.1.0-mingw.patch
+# disable boost "auto lib" in MSVC build
+# for some reason (CRLF in file?) this patch doesn't want to apply on unix...
+orcus_patches += liborcus_0.1.0-boost_disable_auto_lib.patch
+
+$(eval $(call gb_UnpackedTarball_add_patches,orcus,\
+ $(foreach patch,$(orcus_patches),liborcus/$(patch)) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/liborcus/liborcus_0.1.0-boost_disable_auto_lib.patch b/liborcus/liborcus_0.1.0-boost_disable_auto_lib.patch
index 18b2ed73014a..dec1422c84b6 100644
--- a/liborcus/liborcus_0.1.0-boost_disable_auto_lib.patch
+++ b/liborcus/liborcus_0.1.0-boost_disable_auto_lib.patch
@@ -1,5 +1,5 @@
---- misc/liborcus_0.1.0/vsprojects/liborcus-static-nozip/liborcus-static-nozip.vcproj 2012-09-07 06:00:35.000000000 +0200
-+++ misc/build/liborcus_0.1.0/vsprojects/liborcus-static-nozip/liborcus-static-nozip.vcproj 2012-09-10 18:10:23.821600000 +0200
+--- vsprojects/liborcus-static-nozip/liborcus-static-nozip.vcproj 2012-09-07 06:00:35.000000000 +0200
++++ vsprojects/liborcus-static-nozip/liborcus-static-nozip.vcproj 2012-09-10 18:10:23.821600000 +0200
@@ -42,7 +42,7 @@
Name="VCCLCompilerTool"
Optimization="0"
diff --git a/liborcus/liborcus_0.1.0-configure.patch b/liborcus/liborcus_0.1.0-configure.patch
index 27050eedb236..ae8502e417f0 100644
--- a/liborcus/liborcus_0.1.0-configure.patch
+++ b/liborcus/liborcus_0.1.0-configure.patch
@@ -1,5 +1,5 @@
---- misc/liborcus_0.1.0/config.sub
-+++ misc/build/liborcus_0.1.0/config.sub
+--- config.sub
++++ config.sub
@@ -120,7 +120,7 @@
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
diff --git a/liborcus/liborcus_0.1.0-mingw.patch b/liborcus/liborcus_0.1.0-mingw.patch
index e87f9a852afa..68d51502707b 100644
--- a/liborcus/liborcus_0.1.0-mingw.patch
+++ b/liborcus/liborcus_0.1.0-mingw.patch
@@ -1,5 +1,5 @@
-+++ misc/build/liborcus_0.1.0/configure.dt
-+++ misc/build/liborcus_0.1.0/configure
++++ configure.dt
++++ configure
@@ -619,6 +619,8 @@ WITH_LIBZIP_FALSE
WITH_LIBZIP_TRUE
LIBZIP_LIBS
@@ -39,8 +39,8 @@
if test -z "${WITH_LIBZIP_TRUE}" && test -z "${WITH_LIBZIP_FALSE}"; then
as_fn_error $? "conditional \"WITH_LIBZIP\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
-+++ misc/build/liborcus_0.1.0/src/liborcus/Makefile.in.dt
-+++ misc/build/liborcus_0.1.0/src/liborcus/Makefile.in
++++ src/liborcus/Makefile.in.dt
++++ src/liborcus/Makefile.in
@@ -362,7 +361,8 @@ INCDIR = $(top_srcdir)/include
SRCDIR = $(top_srcdir)/src/liborcus
BINDIR = $(top_srcdir)/bin
@@ -51,8 +51,8 @@
lib_LTLIBRARIES = liborcus-@ORCUS_API_VERSION@.la
liborcus_@ORCUS_API_VERSION@_la_SOURCES = dom_tree.cpp exception.cpp \
global.cpp spreadsheet_interface.cpp orcus_css.cpp \
-+++ misc/build/liborcus_0.1.0/src/Makefile.in.dt
-+++ misc/build/liborcus_0.1.0/src/Makefile.in
++++ src/Makefile.in.dt
++++ src/Makefile.in
@@ -37,26 +37,35 @@ host_triplet = @host@
bin_PROGRAMS = orcus-xml-dump$(EXEEXT) $(am__EXEEXT_2) $(am__EXEEXT_3)
EXTRA_PROGRAMS = orcus-test-common$(EXEEXT) orcus-test-xml$(EXEEXT) \
diff --git a/liborcus/liborcus_0.1.0-warnings.patch b/liborcus/liborcus_0.1.0-warnings.patch
index a7e796af3975..8ce6533c0908 100644
--- a/liborcus/liborcus_0.1.0-warnings.patch
+++ b/liborcus/liborcus_0.1.0-warnings.patch
@@ -1,5 +1,5 @@
---- misc/liborcus_0.1.0/src/liborcus/pstring.cpp 2012-09-07 06:00:35.000000000 +0200
-+++ misc/build/liborcus_0.1.0/src/liborcus/pstring.cpp 2012-09-07 16:56:14.000000000 +0200
+--- src/liborcus/pstring.cpp 2012-09-07 06:00:35.000000000 +0200
++++ src/liborcus/pstring.cpp 2012-09-07 16:56:14.000000000 +0200
@@ -57,25 +57,25 @@
pstring pstring::intern(const char* str, size_t n)
@@ -30,8 +30,8 @@
interned_strings.store.dump();
}
---- misc/liborcus_0.1.0/src/liborcus/xml_map_tree.cpp 2012-09-07 06:00:35.000000000 +0200
-+++ misc/build/liborcus_0.1.0/src/liborcus/xml_map_tree.cpp 2012-09-07 16:59:23.000000000 +0200
+--- src/liborcus/xml_map_tree.cpp 2012-09-07 06:00:35.000000000 +0200
++++ src/liborcus/xml_map_tree.cpp 2012-09-07 16:59:23.000000000 +0200
@@ -55,15 +55,14 @@
{
const char* mp_char;
diff --git a/liborcus/makefile.mk b/liborcus/makefile.mk
deleted file mode 100644
index 86821fc2fe9a..000000000000
--- a/liborcus/makefile.mk
+++ /dev/null
@@ -1,92 +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 .
-#
-
-PRJ=.
-
-PRJNAME=orcus
-TARGET=orcus
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-.IF "$(SYSTEM_LIBORCUS)" == "YES"
-@all:
- @echo "Using system liborcus..."
-.ENDIF
-
-TARFILE_NAME=liborcus_0.1.0
-TARFILE_MD5=46d9f4cf8b145c21ce1056e116d2ce71
-
-PATCH_FILES=liborcus_0.1.0-warnings.patch
- # -Werror,-Wunused-variable -Werror,-Wunused-private-field
-
-PATCH_FILES+=liborcus_0.1.0-configure.patch
- # make config.sub recognize arm-linux-androideabi
-
-# fix MinGW build
-PATCH_FILES+=liborcus_0.1.0-mingw.patch
-
-.IF "$(GUI)$(COM)"=="WNTMSC"
-
-# disable boost "auto lib" in MSVC build
-# for some reason (CRLF in file?) this patch doesn't want to apply on unix...
-PATCH_FILES+=liborcus_0.1.0-boost_disable_auto_lib.patch
-
-BUILD_DIR=vsprojects/liborcus-static-nozip
-BUILD_ACTION= \
- export BOOST_INCLUDE_DIR=$(OUTDIR)/inc/external && \
- export BOOST_LIB_DIR=$(OUTDIR)/lib && \
- $(COMPATH)$/vcpackages$/vcbuild.exe liborcus-static-nozip.vcproj "Release|Win32"
-
-.ELSE
-
-.IF "$(SYSTEM_BOOST)" == "NO"
-MY_CXXFLAGS = CXXFLAGS=-I$(OUTDIR)/inc/external
-.END
-
-CONFIGURE_DIR=
-CONFIGURE_ACTION=./configure \
- --with-pic \
- --enable-static \
- --disable-shared \
- --without-libzip \
- --disable-debug \
- --disable-spreadsheet-model $(MY_CXXFLAGS)
-
-.IF "$(CROSS_COMPILING)" == "YES"
-CONFIGURE_ACTION+=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
-.ENDIF
-
-.IF "$(OS)" == "ANDROID"
-CONFIGURE_ACTION:=LIBS='-lgnustl_shared -lm' $(CONFIGURE_ACTION)
-.ENDIF
-
-BUILD_ACTION=make
-BUILD_DIR=
-
-.ENDIF
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : set_ext.mk
-.INCLUDE : target.mk
-.INCLUDE : tg_ext.mk
-
diff --git a/liborcus/prj/d.lst b/liborcus/prj/d.lst
index 4e09e7706642..e69de29bb2d1 100644
--- a/liborcus/prj/d.lst
+++ b/liborcus/prj/d.lst
@@ -1,10 +0,0 @@
-mkdir: %_DEST%\inc\orcus
-mkdir: %_DEST%\inc\orcus\spreadsheet
-
-..\%__SRC%\misc\build\liborcus*\include\orcus\*.hpp %_DEST%\inc\orcus\
-..\%__SRC%\misc\build\liborcus*\include\orcus\spreadsheet\*.hpp %_DEST%\inc\orcus\spreadsheet\
-
-..\%__SRC%\misc\build\liborcus*\src\liborcus\.libs\liborcus-0.2.a %_DEST%\lib\
-symlink: %_DEST%\lib\liborcus-0.2.a %_DEST%\lib\liborcus.a
-
-..\%__SRC%\misc\build\liborcus*\vsprojects\liborcus-static-nozip\Release\orcus.lib %_DEST%\lib\
diff --git a/liborcus/prj/dmake b/liborcus/prj/dmake
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/liborcus/prj/dmake
+++ /dev/null