summaryrefslogtreecommitdiff
path: root/liborcus/ExternalProject_liborcus.mk
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/ExternalProject_liborcus.mk
parented2ad9638208b905f6501fedcd9b84d4176b9529 (diff)
liborcus: convert to gbuild
Change-Id: I6a0d869526ffd40bfe5ff81267f241c049d050f0
Diffstat (limited to 'liborcus/ExternalProject_liborcus.mk')
-rw-r--r--liborcus/ExternalProject_liborcus.mk49
1 files changed, 49 insertions, 0 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: