summaryrefslogtreecommitdiffstats
path: root/external/zlib
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
commit267c6f2ac71f92999e969232431ba04678e7437e (patch)
tree358c9467650e1d0a1d7227a21dac2e3d08b622b2 /external/zlib
parentInitial commit. (diff)
downloadlibreoffice-267c6f2ac71f92999e969232431ba04678e7437e.tar.xz
libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.zip
Adding upstream version 4:24.2.0.upstream/4%24.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'external/zlib')
-rw-r--r--external/zlib/Makefile14
-rw-r--r--external/zlib/Module_zlib.mk23
-rw-r--r--external/zlib/README1
-rw-r--r--external/zlib/StaticLibrary_zlib.mk36
-rw-r--r--external/zlib/StaticLibrary_zlib_x64.mk39
-rw-r--r--external/zlib/UnpackedTarball_zlib.mk21
6 files changed, 134 insertions, 0 deletions
diff --git a/external/zlib/Makefile b/external/zlib/Makefile
new file mode 100644
index 0000000000..569ad8a0ba
--- /dev/null
+++ b/external/zlib/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/zlib/Module_zlib.mk b/external/zlib/Module_zlib.mk
new file mode 100644
index 0000000000..468cb2dea9
--- /dev/null
+++ b/external/zlib/Module_zlib.mk
@@ -0,0 +1,23 @@
+# -*- 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,zlib))
+
+$(eval $(call gb_Module_add_targets,zlib,\
+ StaticLibrary_zlib \
+ UnpackedTarball_zlib \
+))
+
+ifeq ($(BUILD_X64),TRUE)
+$(eval $(call gb_Module_add_targets,zlib,\
+ StaticLibrary_zlib_x64 \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/zlib/README b/external/zlib/README
new file mode 100644
index 0000000000..4018757375
--- /dev/null
+++ b/external/zlib/README
@@ -0,0 +1 @@
+Compression library from [http://www.zlib.net/].
diff --git a/external/zlib/StaticLibrary_zlib.mk b/external/zlib/StaticLibrary_zlib.mk
new file mode 100644
index 0000000000..f5263bef7d
--- /dev/null
+++ b/external/zlib/StaticLibrary_zlib.mk
@@ -0,0 +1,36 @@
+# -*- 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_StaticLibrary_StaticLibrary,zlib))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,zlib,zlib))
+
+$(eval $(call gb_StaticLibrary_set_warnings_disabled,zlib))
+
+$(eval $(call gb_StaticLibrary_add_generated_cobjects,zlib,\
+ UnpackedTarball/zlib/adler32 \
+ UnpackedTarball/zlib/compress \
+ UnpackedTarball/zlib/crc32 \
+ UnpackedTarball/zlib/deflate \
+ UnpackedTarball/zlib/gzclose \
+ UnpackedTarball/zlib/gzlib \
+ UnpackedTarball/zlib/gzread \
+ UnpackedTarball/zlib/gzwrite \
+ UnpackedTarball/zlib/inffast \
+ UnpackedTarball/zlib/inflate \
+ UnpackedTarball/zlib/inftrees \
+ UnpackedTarball/zlib/trees \
+ UnpackedTarball/zlib/zutil \
+))
+
+ifeq ($(ENABLE_DEBUG),TRUE)
+$(eval $(call gb_StaticLibrary_add_cflags,zlib,-DZLIB_DEBUG))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/zlib/StaticLibrary_zlib_x64.mk b/external/zlib/StaticLibrary_zlib_x64.mk
new file mode 100644
index 0000000000..a51f326d11
--- /dev/null
+++ b/external/zlib/StaticLibrary_zlib_x64.mk
@@ -0,0 +1,39 @@
+# -*- 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_StaticLibrary_StaticLibrary,zlib_x64))
+
+$(eval $(call gb_StaticLibrary_set_x64,zlib_x64,YES))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,zlib_x64,zlib))
+
+$(eval $(call gb_StaticLibrary_set_warnings_disabled,zlib_x64))
+
+$(eval $(call gb_StaticLibrary_set_include,zlib_x64,\
+ -I$(call gb_UnpackedTarball_get_dir,zlib) \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_StaticLibrary_add_x64_generated_cobjects,zlib_x64,\
+ UnpackedTarball/zlib/x64/adler32 \
+ UnpackedTarball/zlib/x64/compress \
+ UnpackedTarball/zlib/x64/crc32 \
+ UnpackedTarball/zlib/x64/deflate \
+ UnpackedTarball/zlib/x64/inffast \
+ UnpackedTarball/zlib/x64/inflate \
+ UnpackedTarball/zlib/x64/inftrees \
+ UnpackedTarball/zlib/x64/trees \
+ UnpackedTarball/zlib/x64/zutil \
+))
+
+ifeq ($(ENABLE_DEBUG),TRUE)
+$(eval $(call gb_StaticLibrary_add_cflags,zlib_x64,-DZLIB_DEBUG))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/zlib/UnpackedTarball_zlib.mk b/external/zlib/UnpackedTarball_zlib.mk
new file mode 100644
index 0000000000..dd9fc1c314
--- /dev/null
+++ b/external/zlib/UnpackedTarball_zlib.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_UnpackedTarball_UnpackedTarball,zlib))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,zlib,$(ZLIB_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_set_post_action,zlib,\
+ mkdir -p x64 && \
+ cp $(addsuffix .c,adler32 compress crc32 deflate inffast inflate inftrees trees zutil) x64 \
+))
+
+$(eval $(call gb_UnpackedTarball_set_patchlevel,zlib,0))
+
+# vim: set noet sw=4 ts=4: