summaryrefslogtreecommitdiffstats
path: root/external/ucpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /external/ucpp
parentInitial commit. (diff)
downloadlibreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz
libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--external/ucpp/Executable_ucpp.mk33
-rw-r--r--external/ucpp/Makefile14
-rw-r--r--external/ucpp/Module_ucpp.mk20
-rw-r--r--external/ucpp/README3
-rw-r--r--external/ucpp/UnpackedTarball_ucpp.mk20
-rw-r--r--external/ucpp/ucpp.patch11
6 files changed, 101 insertions, 0 deletions
diff --git a/external/ucpp/Executable_ucpp.mk b/external/ucpp/Executable_ucpp.mk
new file mode 100644
index 000000000..a4be71c49
--- /dev/null
+++ b/external/ucpp/Executable_ucpp.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_Executable_Executable,ucpp))
+
+$(eval $(call gb_Executable_set_warnings_disabled,ucpp))
+
+$(eval $(call gb_Executable_use_unpacked,ucpp,ucpp))
+
+$(eval $(call gb_Executable_add_defs,ucpp,\
+ -DNO_UCPP_BUF \
+ -DUCPP_CONFIG \
+ -DSTAND_ALONE \
+))
+
+$(eval $(call gb_Executable_add_generated_cobjects,ucpp,\
+ UnpackedTarball/ucpp/assert \
+ UnpackedTarball/ucpp/cpp \
+ UnpackedTarball/ucpp/eval \
+ UnpackedTarball/ucpp/hash \
+ UnpackedTarball/ucpp/lexer \
+ UnpackedTarball/ucpp/macro \
+ UnpackedTarball/ucpp/mem \
+ UnpackedTarball/ucpp/nhash \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/ucpp/Makefile b/external/ucpp/Makefile
new file mode 100644
index 000000000..569ad8a0b
--- /dev/null
+++ b/external/ucpp/Makefile
@@ -0,0 +1,14 @@
+# -*- 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/.
+#
+
+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/external/ucpp/Module_ucpp.mk b/external/ucpp/Module_ucpp.mk
new file mode 100644
index 000000000..dc4c02f53
--- /dev/null
+++ b/external/ucpp/Module_ucpp.mk
@@ -0,0 +1,20 @@
+# -*- 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,ucpp))
+
+# if not cross-compiling or we need ucpp for ODK
+ifneq (,$(if $(CROSS_COMPILING),,T)$(filter ODK,$(BUILD_TYPE)))
+$(eval $(call gb_Module_add_targets,ucpp,\
+ Executable_ucpp \
+ UnpackedTarball_ucpp \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/ucpp/README b/external/ucpp/README
new file mode 100644
index 000000000..9246c701a
--- /dev/null
+++ b/external/ucpp/README
@@ -0,0 +1,3 @@
+ucpp is a C99 preprocessor
+
+Used to be hosted at https://code.google.com/p/ucpp/ - not sure where it's gone
diff --git a/external/ucpp/UnpackedTarball_ucpp.mk b/external/ucpp/UnpackedTarball_ucpp.mk
new file mode 100644
index 000000000..04d7113b8
--- /dev/null
+++ b/external/ucpp/UnpackedTarball_ucpp.mk
@@ -0,0 +1,20 @@
+# -*- 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,ucpp))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,ucpp,$(UCPP_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_set_patchlevel,ucpp,0))
+
+$(eval $(call gb_UnpackedTarball_add_patches,ucpp,\
+ external/ucpp/ucpp.patch \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/ucpp/ucpp.patch b/external/ucpp/ucpp.patch
new file mode 100644
index 000000000..c9c4b92b7
--- /dev/null
+++ b/external/ucpp/ucpp.patch
@@ -0,0 +1,11 @@
+--- cpp.c
++++ cpp.c
+@@ -2464,7 +2464,7 @@
+ warning(-1, "unknown option '%s'", argv[i]);
+ } else {
+ if (filename != 0) {
+- error(-1, "spurious filename '%s'", argv[i]);
++ error(-1, "spurious duplicate filename '%s' - vs. '%s' ", argv[i], filename);
+ return 2;
+ }
+ filename = argv[i];