diff options
author | fuzzard <fuzzard@kodi.tv> | 2022-04-18 02:12:13 +1000 |
---|---|---|
committer | fuzzard <fuzzard@kodi.tv> | 2022-05-19 17:38:54 +1000 |
commit | 3958a09217d7cb46e7c2aa2e65722e2dfd3c35b9 (patch) | |
tree | 8c7ddb89c801139ca992fe4ee80332f2d34c9c76 /tools/depends/target | |
parent | 9cda64a5c16ff3639c882b70cc843bf4acfa734a (diff) |
[tools/depends][target] freetype2-noharfbuzz use cmake build system
migrate to cmake build system
Diffstat (limited to 'tools/depends/target')
3 files changed, 47 insertions, 23 deletions
diff --git a/tools/depends/target/freetype2-noharfbuzz/01-darwinembedded-incorrecttoolchain.patch b/tools/depends/target/freetype2-noharfbuzz/01-darwinembedded-incorrecttoolchain.patch new file mode 100644 index 0000000000..256718e6cb --- /dev/null +++ b/tools/depends/target/freetype2-noharfbuzz/01-darwinembedded-incorrecttoolchain.patch @@ -0,0 +1,12 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -149,8 +149,7 @@ + # iOS only uses static libraries + set(BUILD_SHARED_LIBS OFF) + +- set(CMAKE_TOOLCHAIN_FILE +- ${CMAKE_SOURCE_DIR}/builds/cmake/iOS.cmake) ++ include(${CMAKE_SOURCE_DIR}/builds/cmake/iOS.cmake) + endif () + else () + if (DEFINED IOS_PLATFORM) diff --git a/tools/depends/target/freetype2-noharfbuzz/FREETYPE2-NOHARFBUZZ-VERSION b/tools/depends/target/freetype2-noharfbuzz/FREETYPE2-NOHARFBUZZ-VERSION new file mode 100644 index 0000000000..eba6f0e091 --- /dev/null +++ b/tools/depends/target/freetype2-noharfbuzz/FREETYPE2-NOHARFBUZZ-VERSION @@ -0,0 +1,5 @@ +LIBNAME=freetype +VERSION=2.11.1 +ARCHIVE=$(LIBNAME)-$(VERSION).tar.xz +SHA512=0848678482fbe20603a866f02da82c91122014d6f815ba4f1d9c03601c32e3ceb781f721c2b4427b6117d7c9742018af8dbb26566faf018595c70b50f8db3f08 +BYPRODUCT=libfreetype.a diff --git a/tools/depends/target/freetype2-noharfbuzz/Makefile b/tools/depends/target/freetype2-noharfbuzz/Makefile index 809e8cc875..e4a9fec384 100644 --- a/tools/depends/target/freetype2-noharfbuzz/Makefile +++ b/tools/depends/target/freetype2-noharfbuzz/Makefile @@ -1,43 +1,50 @@ -include ../../Makefile.include -DEPS = ../../Makefile.include Makefile ../../download-files.include - -# lib name, version -LIBNAME=freetype -VERSION=2.11.1 -SOURCE=$(LIBNAME)-$(VERSION) -ARCHIVE=$(SOURCE).tar.xz -SHA512=0848678482fbe20603a866f02da82c91122014d6f815ba4f1d9c03601c32e3ceb781f721c2b4427b6117d7c9742018af8dbb26566faf018595c70b50f8db3f08 -include ../../download-files.include +include ../../Makefile.include FREETYPE2-NOHARFBUZZ-VERSION ../../download-files.include +DEPS = ../../Makefile.include Makefile FREETYPE2-NOHARFBUZZ-VERSION ../../download-files.include \ + 01-darwinembedded-incorrecttoolchain.patch # Freetype has a circular dependency with harfbuzz. # To enable harfbuzz support in freetype, we build this first to bootstrap harfbuzz # and then build freetype2 again with harfbuzz support -# configuration settings -# force using internal libtool -export LIBTOOL=builds/unix/libtool -CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) builds/unix; \ - ./configure --prefix=$(PREFIX) --disable-shared --with-png=no --with-harfbuzz=no +CMAKE_OPTIONS=-DBUILD_SHARED_LIBS=OFF \ + -DFT_DISABLE_ZLIB=ON \ + -DFT_DISABLE_BZIP2=ON \ + -DFT_DISABLE_PNG=ON \ + -DFT_DISABLE_HARFBUZZ=ON \ + -DFT_DISABLE_BROTLI=ON -LIBDYLIB=$(PLATFORM)/objs/.libs/lib$(LIBNAME).a +ifeq ($(OS), darwin_embedded) + # We need SDKROOT without the /SDKs/*.sdk for IOS_DEVELOPER_ROOT + DEV_ROOT=$(shell awk -v sdk=$(SDKROOT) 'BEGIN{ split(sdk, a, /\/SDKs/); print a[1]}') -all: .installed-$(PLATFORM) + CMAKE_OPTIONS+= -DIOS_PLATFORM=OS \ + -DCMAKE_AR=$(AR) \ + -DCMAKE_OSX_ARCHITECTURES=$(CPU) \ + -DCMAKE_IOS_DEVELOPER_ROOT=$(DEV_ROOT) \ + -DCMAKE_IOS_SDK_ROOT=$(SDKROOT) +endif +LIBDYLIB=$(PLATFORM)/build/$(BYPRODUCT) + +all: .installed-$(PLATFORM) $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE) $(DEPS) - rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM) + rm -rf $(PLATFORM); mkdir -p $(PLATFORM)/build cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - cd $(PLATFORM); $(CONFIGURE) +ifeq ($(OS),darwin_embedded) + cd $(PLATFORM); patch -p1 -i ../01-darwinembedded-incorrecttoolchain.patch +endif + cd $(PLATFORM)/build; $(CMAKE) $(CMAKE_OPTIONS) .. $(LIBDYLIB): $(PLATFORM) - $(MAKE) -C $(PLATFORM) + $(MAKE) -C $(PLATFORM)/build -.installed-$(PLATFORM): $(LIBDYLIB) - $(MAKE) -C $(PLATFORM) install +.installed-$(PLATFORM): $(PLATFORM) + $(MAKE) -C $(PLATFORM)/build install touch $@ clean: - $(MAKE) -C $(PLATFORM) clean + $(MAKE) -C $(PLATFORM)/build clean rm -f .installed-$(PLATFORM) distclean:: |