summaryrefslogtreecommitdiffstats
path: root/contrib/harfbuzz/module.defs
blob: 5d5778a3eaf3dbaa9e275f904fc00a464405515b (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
52
__deps__ := FREETYPE

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

HARFBUZZ.FETCH.url     = https://github.com/HandBrake/HandBrake-contribs/releases/download/contribs/harfbuzz-2.6.4.tar.xz
HARFBUZZ.FETCH.url    += https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-2.6.4.tar.xz
HARFBUZZ.FETCH.sha256  = 9413b8d96132d699687ef914ebb8c50440efc87b3f775d25856d7ec347c03c12

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
    else
        HARFBUZZ.CONFIGURE.args.host  = -DCMAKE_SYSTEM_NAME="$(HARFBUZZ.CONFIGURE.host)"
    endif
    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/))"