diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:54:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:54:39 +0000 |
commit | 267c6f2ac71f92999e969232431ba04678e7437e (patch) | |
tree | 358c9467650e1d0a1d7227a21dac2e3d08b622b2 /external/bzip2 | |
parent | Initial commit. (diff) | |
download | libreoffice-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/bzip2')
-rw-r--r-- | external/bzip2/ExternalProject_bzip2.mk | 35 | ||||
-rw-r--r-- | external/bzip2/Makefile | 14 | ||||
-rw-r--r-- | external/bzip2/Module_bzip2.mk | 17 | ||||
-rw-r--r-- | external/bzip2/README | 1 | ||||
-rw-r--r-- | external/bzip2/UnpackedTarball_bzip2.mk | 24 | ||||
-rw-r--r-- | external/bzip2/disable-test.patch.0 | 49 |
6 files changed, 140 insertions, 0 deletions
diff --git a/external/bzip2/ExternalProject_bzip2.mk b/external/bzip2/ExternalProject_bzip2.mk new file mode 100644 index 0000000000..b4c93a356c --- /dev/null +++ b/external/bzip2/ExternalProject_bzip2.mk @@ -0,0 +1,35 @@ +# -*- 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,bzip2)) + +$(eval $(call gb_ExternalProject_register_targets,bzip2,\ + build \ +)) + +$(eval $(call gb_ExternalProject_use_nmake,bzip2,build)) + +ifeq ($(COM),MSC) +$(call gb_ExternalProject_get_state_target,bzip2,build): + $(call gb_Trace_StartRange,bzip2,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + nmake -nologo -f makefile.msc \ + ) + $(call gb_Trace_EndRange,bzip2,EXTERNAL) +else +$(call gb_ExternalProject_get_state_target,bzip2,build): + $(call gb_Trace_StartRange,bzip2,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + $(MAKE) \ + CC="$(CC) -fPIC" \ + ) + $(call gb_Trace_EndRange,bzip2,EXTERNAL) +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/bzip2/Makefile b/external/bzip2/Makefile new file mode 100644 index 0000000000..569ad8a0ba --- /dev/null +++ b/external/bzip2/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/bzip2/Module_bzip2.mk b/external/bzip2/Module_bzip2.mk new file mode 100644 index 0000000000..2a59f7a6ae --- /dev/null +++ b/external/bzip2/Module_bzip2.mk @@ -0,0 +1,17 @@ +# -*- 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,bzip2)) + +$(eval $(call gb_Module_add_targets,bzip2,\ + ExternalProject_bzip2 \ + UnpackedTarball_bzip2 \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/bzip2/README b/external/bzip2/README new file mode 100644 index 0000000000..917a9d662b --- /dev/null +++ b/external/bzip2/README @@ -0,0 +1 @@ +Data compression library from [http://bzip.org/]. diff --git a/external/bzip2/UnpackedTarball_bzip2.mk b/external/bzip2/UnpackedTarball_bzip2.mk new file mode 100644 index 0000000000..350b45c76e --- /dev/null +++ b/external/bzip2/UnpackedTarball_bzip2.mk @@ -0,0 +1,24 @@ +# -*- 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,bzip2)) + +$(eval $(call gb_UnpackedTarball_set_tarball,bzip2,$(BZIP2_TARBALL))) + +$(eval $(call gb_UnpackedTarball_fix_end_of_line,bzip2,\ + makefile.msc \ +)) + +ifneq ($(CROSS_COMPILING),) +$(eval $(call gb_UnpackedTarball_add_patches,bzip2,\ + external/bzip2/disable-test.patch.0 \ +)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/bzip2/disable-test.patch.0 b/external/bzip2/disable-test.patch.0 new file mode 100644 index 0000000000..10d95ed25a --- /dev/null +++ b/external/bzip2/disable-test.patch.0 @@ -0,0 +1,49 @@ +Disable bzip2 tests when cross compiling on Windows to avoid this error: + +> Doing 6 tests (3 compress, 3 uncompress) ... +> If there's a problem, things might stop at this point. +> +> .\\bzip2 -1 < sample1.ref > sample1.rb2 +> This version of C:\sources\libo-core\workdir\UnpackedTarball\bzip2\bzip2.exe is not compatible with the version of Windows you're running. +> Check your computer's system information and then contact the software publisher. +> NMAKE : fatal error U1077: '.\\bzip2' : return code '0x1' +> Stop. + +--- makefile.msc.orig 2019-07-14 02:50:05.000000000 +0900 ++++ makefile.msc 2023-09-20 20:00:14.124370100 +0900 +@@ -14,7 +14,7 @@ + decompress.obj \ + bzlib.obj + +-all: lib bzip2 test ++all: lib bzip2 + + bzip2: lib + $(CC) $(CFLAGS) -o bzip2 bzip2.c libbz2.lib setargv.obj +@@ -23,26 +23,6 @@ + lib: $(OBJS) + lib /out:libbz2.lib $(OBJS) + +-test: bzip2 +- type words1 +- .\\bzip2 -1 < sample1.ref > sample1.rb2 +- .\\bzip2 -2 < sample2.ref > sample2.rb2 +- .\\bzip2 -3 < sample3.ref > sample3.rb2 +- .\\bzip2 -d < sample1.bz2 > sample1.tst +- .\\bzip2 -d < sample2.bz2 > sample2.tst +- .\\bzip2 -ds < sample3.bz2 > sample3.tst +- @echo All six of the fc's should find no differences. +- @echo If fc finds an error on sample3.bz2, this could be +- @echo because WinZip's 'TAR file smart CR/LF conversion' +- @echo is too clever for its own good. Disable this option. +- @echo The correct size for sample3.ref is 120,244. If it +- @echo is 150,251, WinZip has messed it up. +- fc sample1.bz2 sample1.rb2 +- fc sample2.bz2 sample2.rb2 +- fc sample3.bz2 sample3.rb2 +- fc sample1.tst sample1.ref +- fc sample2.tst sample2.ref +- fc sample3.tst sample3.ref + + + |