You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libreoffice/0002-reduce-copypasta.patch

157 lines
3.5 KiB

From 57c439a15e151fa9f7c298ceb15165749958c53c Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Tue, 8 Mar 2016 06:06:36 +0100
Subject: [PATCH 2/4] reduce copypasta
Change-Id: I5303caf69128a0a6d28fccfcf2ab63ed466e3853
---
RepositoryExternal.mk | 81 +++++++++++++--------------------------------------
1 file changed, 21 insertions(+), 60 deletions(-)
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index c8aab64..58f924d 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -617,7 +617,7 @@ endif # SYSTEM_HUNSPELL
ifneq ($(SYSTEM_BOOST),)
-define gb_LinkTarget__use_boostdatetime
+define gb_LinkTarget__use_boost_lib
$(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
$(BOOST_CPPFLAGS) \
@@ -627,43 +627,24 @@ $(call gb_LinkTarget_add_ldflags,$(1),\
$(BOOST_LDFLAGS) \
)
-$(call gb_LinkTarget_add_libs,$(1),\
- $(BOOST_DATE_TIME_LIB) \
-)
+$(call gb_LinkTarget_add_libs,$(1),$(2))
endef
-define gb_LinkTarget__use_boost_iostreams
-$(call gb_LinkTarget_set_include,$(1),\
- $$(INCLUDE) \
- $(BOOST_CPPFLAGS) \
-)
+define gb_LinkTarget__use_boostdatetime
+$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
-$(call gb_LinkTarget_add_ldflags,$(1),\
- $(BOOST_LDFLAGS) \
-)
+endef
-$(call gb_LinkTarget_add_libs,$(1),\
- $(BOOST_IOSTREAMS_LIB) \
-)
+define gb_LinkTarget__use_boost_iostreams
+$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
endef
gb_ExternalProject__use_boost_iostreams :=
define gb_LinkTarget__use_boost_system
-$(call gb_LinkTarget_set_include,$(1),\
- $$(INCLUDE) \
- $(BOOST_CPPFLAGS) \
-)
-
-$(call gb_LinkTarget_add_ldflags,$(1),\
- $(BOOST_LDFLAGS) \
-)
-
-$(call gb_LinkTarget_add_libs,$(1),\
- $(BOOST_SYSTEM_LIB) \
-)
+$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
endef
@@ -681,37 +662,29 @@ gb_ExternalProject__use_boost_headers:=
else # !SYSTEM_BOOST
-ifeq ($(OS),WNT)
-define gb_LinkTarget__use_boostthread
+define gb_LinkTarget__use_boost_lib
$(call gb_LinkTarget_add_defs,$(1),\
-DBOOST_ALL_NO_LIB \
)
-$(call gb_LinkTarget_use_static_libraries,$(1),\
- boostthread \
-)
+$(call gb_LinkTarget_use_static_libraries,$(1),$(2))
+
+endef
+
+ifeq ($(OS),WNT)
+define gb_LinkTarget__use_boostthread
+$(call gb_LinkTarget__use_boost_lib,$(1),boostthread)
+
endef
endif
define gb_LinkTarget__use_boostdatetime
-$(call gb_LinkTarget_add_defs,$(1),\
- -DBOOST_ALL_NO_LIB \
-)
-
-$(call gb_LinkTarget_use_static_libraries,$(1),\
- boostdatetime \
-)
+$(call gb_LinkTarget__use_boost_lib,$(1),boostdatetime)
endef
define gb_LinkTarget__use_boost_filesystem
-$(call gb_LinkTarget_add_defs,$(1),\
- -DBOOST_ALL_NO_LIB \
-)
-
-$(call gb_LinkTarget_use_static_libraries,$(1),\
- boost_filesystem \
-)
+$(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
endef
@@ -720,13 +693,7 @@ $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
endef
define gb_LinkTarget__use_boost_iostreams
-$(call gb_LinkTarget_add_defs,$(1),\
- -DBOOST_ALL_NO_LIB \
-)
-
-$(call gb_LinkTarget_use_static_libraries,$(1),\
- boost_iostreams \
-)
+$(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
endef
@@ -735,13 +702,7 @@ $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
endef
define gb_LinkTarget__use_boost_system
-$(call gb_LinkTarget_add_defs,$(1),\
- -DBOOST_ALL_NO_LIB \
-)
-
-$(call gb_LinkTarget_use_static_libraries,$(1),\
- boost_system \
-)
+$(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
endef
--
2.5.0