diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
commit | 940b4d1848e8c70ab7642901a68594e8016caffc (patch) | |
tree | eb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /external/cairo/ExternalProject_cairo.mk | |
parent | Initial commit. (diff) | |
download | libreoffice-upstream.tar.xz libreoffice-upstream.zip |
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'external/cairo/ExternalProject_cairo.mk')
-rw-r--r-- | external/cairo/ExternalProject_cairo.mk | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/external/cairo/ExternalProject_cairo.mk b/external/cairo/ExternalProject_cairo.mk new file mode 100644 index 000000000..43b4a7b53 --- /dev/null +++ b/external/cairo/ExternalProject_cairo.mk @@ -0,0 +1,79 @@ +# -*- 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,cairo)) + +$(eval $(call gb_ExternalProject_use_external_project,cairo,pixman)) + +$(eval $(call gb_ExternalProject_use_externals,cairo,\ + freetype \ + libpng \ + zlib \ +)) + +ifeq ($(OS),ANDROID) +$(eval $(call gb_ExternalProject_use_unpacked,cairo,fontconfig)) +$(eval $(call gb_ExternalProject_use_unpacked,cairo,libpng)) +endif + +$(eval $(call gb_ExternalProject_register_targets,cairo,\ + build \ +)) + +ifeq ($(OS),WNT) + +$(call gb_ExternalProject_get_state_target,cairo,build) : + $(call gb_Trace_StartRange,cairo,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + $(MAKE) -f Makefile.win32 CFG=release ZLIB3RDLIB=zlib.lib \ + ) + $(call gb_Trace_EndRange,cairo,EXTERNAL) + + +else + +# overwrite src/cairo-version.h because that is just a dummy file and included +# from cairo.h in non-overridable way + +$(call gb_ExternalProject_get_state_target,cairo,build) : + $(call gb_Trace_StartRange,cairo,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + ./configure \ + $(if $(debug),STRIP=" ") \ + $(if $(filter ANDROID iOS,$(OS)),CFLAGS="$(if $(debug),-g) $(ZLIB_CFLAGS) $(gb_VISIBILITY_FLAGS)") \ + $(if $(filter-out ANDROID iOS,$(OS)),CFLAGS="$(if $(debug),-g) $(ZLIB_CFLAGS)" ) \ + $(if $(filter ANDROID iOS,$(OS)),PKG_CONFIG=./dummy_pkg_config) \ + LIBS="$(ZLIB_LIBS)" \ + $(if $(filter -fsanitize=%,$(LDFLAGS)),LDFLAGS="$(LDFLAGS) -fuse-ld=bfd") \ + pixman_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,pixman)/pixman" \ + pixman_LIBS="-L$(call gb_UnpackedTarball_get_dir,pixman)/pixman/.libs -lpixman-1 \ + $(if $(filter LINUX,$(OS)),-Wl$(COMMA)-z$(COMMA)origin \ + -Wl$(COMMA)-rpath$(COMMA)\\\$$\$$ORIGIN)" \ + png_REQUIRES="trick_configure_into_using_png_CFLAGS_and_LIBS" \ + png_CFLAGS="$(LIBPNG_CFLAGS)" png_LIBS="$(LIBPNG_LIBS)" \ + $(if $(SYSTEM_FREETYPE),,FREETYPE_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,freetype)/include") \ + $(if $(SYSTEM_FONTCONFIG),,FONTCONFIG_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,fontconfig)") \ + $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,$(if $(filter ANDROID,$(OS)),--disable-shared,--disable-static)) \ + $(if $(filter ANDROID iOS,$(OS)),--disable-xlib --disable-xcb,$(if $(filter TRUE,$(DISABLE_GUI)),--disable-xlib --disable-xcb,--enable-xlib --enable-xcb)) \ + $(if $(filter iOS,$(OS)),--enable-quartz --enable-quartz-font) \ + --disable-valgrind \ + $(if $(filter iOS,$(OS)),--disable-ft,--enable-ft --enable-fc) \ + --disable-svg --enable-gtk-doc=no --enable-test-surfaces=no \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \ + $(if $(filter INTEL ARM,$(CPUNAME)),ac_cv_c_bigendian=no ax_cv_c_float_words_bigendian=no)) \ + $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ + && cp cairo-version.h src/cairo-version.h \ + && cd src && $(MAKE) \ + ) + $(call gb_Trace_EndRange,cairo,EXTERNAL) + +endif + +# vim: set noet sw=4 ts=4: |