summaryrefslogtreecommitdiffstats
path: root/contrib/harfbuzz/module.defs
blob: 9cd5369b4d858cca724c400139cbd8b6d1fe2c03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
__deps__ := FREETYPE

$(eval $(call import.MODULE.defs,HARFBUZZ,harfbuzz,$(__deps__)))
$(eval $(call import.CONTRIB.defs,HARFBUZZ))

HARFBUZZ.FETCH.url     = https://download.handbrake.fr/handbrake/contrib/harfbuzz-2.6.1.tar.xz
HARFBUZZ.FETCH.url    += https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-2.6.1.tar.xz
HARFBUZZ.FETCH.sha256  = c651fb3faaa338aeb280726837c2384064cdc17ef40539228d88a1260960844f

HARFBUZZ.build_dir             = build
HARFBUZZ.CONFIGURE.exe         = cmake
HARFBUZZ.CONFIGURE.args.prefix = -DCMAKE_INSTALL_PREFIX="$(HARFBUZZ.CONFIGURE.prefix)"
HARFBUZZ.CONFIGURE.deps        =
HARFBUZZ.CONFIGURE.static      =
HARFBUZZ.CONFIGURE.shared      = -DBUILD_SHARED_LIBS=OFF
HARFBUZZ.CONFIGURE.extra       = -DHB_BUILD_UTILS=OFF -DHB_BUILD_TESTS=OFF
HARFBUZZ.CONFIGURE.extra      += -DHB_HAVE_FREETYPE=ON \
                                 -DFREETYPE_LIBRARIES="$(call fn.ABSOLUTE,$(CONTRIB.build/))lib" \
                                 -DFREETYPE_INCLUDE_DIRS="$(call fn.ABSOLUTE,$(CONTRIB.build/))include/freetype2" \
                                 -DFREETYPE_INCLUDE_DIR_freetype2="$(call fn.ABSOLUTE,$(CONTRIB.build/))include/freetype2" \
                                 -DFREETYPE_INCLUDE_DIR_ft2build="$(call fn.ABSOLUTE,$(CONTRIB.build/))include/freetype2"

ifeq (1,$(HOST.cross))
    ifeq (mingw,$(HOST.system))
        HARFBUZZ.CONFIGURE.extra += -DWIN32=ON -DMINGW=ON
        HARFBUZZ.CONFIGURE.extra += -DCMAKE_SYSTEM_NAME=Windows
        HARFBUZZ.CONFIGURE.extra += -DCMAKE_C_COMPILER=$(HARFBUZZ.GCC.gcc)
        HARFBUZZ.CONFIGURE.extra += -DCMAKE_C_FLAGS="-static-libgcc -static-libstdc++ -static"
        HARFBUZZ.CONFIGURE.extra += -DCMAKE_SHARED_LIBRARY_LINK_C_FLAGS="-static-libgcc -static-libstdc++ -static"
        HARFBUZZ.CONFIGURE.extra += -DCMAKE_CXX_COMPILER=$(HARFBUZZ.GCC.gxx)
        HARFBUZZ.CONFIGURE.extra += -DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++ -static"
        HARFBUZZ.CONFIGURE.extra += -DCMAKE_RC_COMPILER=$(HOST.cross.prefix)windres
        HARFBUZZ.CONFIGURE.extra += -DHB_HAVE_DIRECTWRITE=OFF \
                                    -DHB_HAVE_GLIB=OFF \
                                    -DHB_HAVE_GOBJECT=OFF \
                                    -DHB_HAVE_GRAPHITE2=OFF \
                                    -DHB_HAVE_ICU=OFF \
                                    -DHB_HAVE_UNISCRIBE=OFF
    endif
    HARFBUZZ.CONFIGURE.args.host  = -DCMAKE_SYSTEM_NAME="$(HARFBUZZ.CONFIGURE.host)"
    HARFBUZZ.CONFIGURE.args.build = -DCMAKE_HOST_SYSTEM="$(HARFBUZZ.CONFIGURE.build)"
else
    HARFBUZZ.CONFIGURE.args.host  = -DCMAKE_HOST_SYSTEM="$(HARFBUZZ.CONFIGURE.host)"
endif

ifeq ($(HOST.system),darwin)
    HARFBUZZ.CONFIGURE.extra += -DHB_HAVE_CORETEXT=OFF -DHB_HAVE_GLIB=OFF
endif

## find CMakeLists.txt
HARFBUZZ.CONFIGURE.extra += "$(call fn.ABSOLUTE,$(HARFBUZZ.EXTRACT.dir/))"