summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-07-11 20:51:48 +0100
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-07-11 20:05:39 +0000
commitf1e7eeb83c18bce720d49e0e55704abd09ab96f7 (patch)
treee1c1ae1e884031f94c967d569af13720cedcf027
parente533ba0e521cf1da08c6b8d1b8229d5622bddcb5 (diff)
fdo#66826 - Allow parameters to be passed to patch such as --binary
Change-Id: I575b2721ffd08adabc3184b04ec302025a1feef2 Reviewed-on: https://gerrit.libreoffice.org/4850 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
-rw-r--r--lpsolve/UnpackedTarball_lpsolve.mk1
-rw-r--r--solenv/gbuild/UnpackedTarball.mk11
2 files changed, 11 insertions, 1 deletions
diff --git a/lpsolve/UnpackedTarball_lpsolve.mk b/lpsolve/UnpackedTarball_lpsolve.mk
index 09cb1a2673ea..f9074a2cd218 100644
--- a/lpsolve/UnpackedTarball_lpsolve.mk
+++ b/lpsolve/UnpackedTarball_lpsolve.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,lpsolve,3))
ifeq ($(OS_FOR_BUILD),WNT)
+$(eval $(call gb_UnpackedTarball_set_patchflags,lpsolve,--binary))
$(eval $(call gb_UnpackedTarball_add_patches,lpsolve,\
lpsolve/lp_solve_5.5-windows.patch \
))
diff --git a/solenv/gbuild/UnpackedTarball.mk b/solenv/gbuild/UnpackedTarball.mk
index a62b42aaba48..5f5af1fa6fbf 100644
--- a/solenv/gbuild/UnpackedTarball.mk
+++ b/solenv/gbuild/UnpackedTarball.mk
@@ -143,7 +143,7 @@ $(call gb_Helper_abbreviate_dirs,\
for p in $(UNPACKED_PATCHES); do \
pl=$(UNPACKED_PATCHLEVEL); \
s=$${p##*.}; case "$$s" in [0-9]$(CLOSE_PAREN) pl="$$s"; ;; esac ; \
- $(GNUPATCH) -f -s "-p$$pl" < "$$p"; \
+ $(GNUPATCH) $(UNPACKED_PATCHFLAGS) -f -s "-p$$pl" < "$$p"; \
if test "$$?" -ne 0; then echo "Patch FAILED: $$p"; exit 1; fi;\
done && \
) \
@@ -195,6 +195,7 @@ $(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_FILES :=
$(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_FIX_EOL :=
$(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_PATCHES :=
$(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_PATCHLEVEL := $(gb_UnpackedTarball_PATCHLEVEL_DEFAULT)
+$(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_PATCHFLAGS :=
$(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_POST_ACTION :=
$(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_PRE_ACTION :=
@@ -250,6 +251,14 @@ $(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_PATCHLEVEL := $(2)
endef
+# Add patch flags to be passed to patch for all patches cf. fdo#66826
+#
+# gb_UnpackedTarball_set_patchlevel unpacked level
+define gb_UnpackedTarball_set_patchflags
+$(call gb_UnpackedTarball_get_target,$(1)) : UNPACKED_PATCHFLAGS := $(2)
+
+endef
+
# Add a patch to be applied on the unpacked files
#
# gb_UnpackedTarball_add_patch unpacked patch