diff options
| author | mrg <mrg@NetBSD.org> | 2023-01-29 07:54:11 +0000 |
|---|---|---|
| committer | mrg <mrg@NetBSD.org> | 2023-01-29 07:54:11 +0000 |
| commit | 783b4984f4d993aacc802099ee78f69639f5a102 (patch) | |
| tree | c330e40ed79d2ff09188c0089157429a62ef4aea /external/mit | |
| parent | 2a22376e2a0626c82f329a67a3a5f5b55ec8ed5d (diff) | |
build framework for embedded brotli.
need to figure out a way to handle tools build vs installed build
before we can enable it in freetype itself.
Diffstat (limited to 'external/mit')
| -rw-r--r-- | external/mit/xorg/lib/brotli/brotli-rename.mk | 41 | ||||
| -rw-r--r-- | external/mit/xorg/lib/brotli/brotli.mk | 24 |
2 files changed, 65 insertions, 0 deletions
diff --git a/external/mit/xorg/lib/brotli/brotli-rename.mk b/external/mit/xorg/lib/brotli/brotli-rename.mk new file mode 100644 index 00000000000..5dff4e79a9a --- /dev/null +++ b/external/mit/xorg/lib/brotli/brotli-rename.mk @@ -0,0 +1,41 @@ +# $NetBSD: brotli-rename.mk,v 1.1 2023/01/29 07:54:11 mrg Exp $ + +# +# functions exported by freetype's private brotli copy are renamed to have +# a "nbft_" prefix. +# + +RENAME_FUNCS= \ + BrotliBuildCodeLengthsHuffmanTable \ + BrotliBuildHuffmanTable \ + BrotliBuildSimpleHuffmanTable \ + BrotliDecoderCreateInstance \ + BrotliDecoderDecompress \ + BrotliDecoderDecompressStream \ + BrotliDecoderDestroyInstance \ + BrotliDecoderErrorString \ + BrotliDecoderGetErrorCode \ + BrotliDecoderHasMoreOutput \ + BrotliDecoderHuffmanTreeGroupInit \ + BrotliDecoderIsFinished \ + BrotliDecoderIsUsed \ + BrotliDecoderSetParameter \ + BrotliDecoderStateCleanup \ + BrotliDecoderStateCleanupAfterMetablock \ + BrotliDecoderStateInit \ + BrotliDecoderStateMetablockBegin \ + BrotliDecoderTakeOutput \ + BrotliDecoderVersion \ + BrotliDefaultAllocFunc \ + BrotliDefaultFreeFunc \ + BrotliGetDictionary \ + BrotliGetTransforms \ + BrotliInitBitReader \ + BrotliSafeReadBits32Slow \ + BrotliSetDictionaryData \ + BrotliTransformDictionaryWord \ + BrotliWarmupBitReader \ + +.for _f in ${RENAME_FUNCS} +CPPFLAGS+= -D${_f}=nbft_${_f} +.endfor diff --git a/external/mit/xorg/lib/brotli/brotli.mk b/external/mit/xorg/lib/brotli/brotli.mk new file mode 100644 index 00000000000..707a1088569 --- /dev/null +++ b/external/mit/xorg/lib/brotli/brotli.mk @@ -0,0 +1,24 @@ +# $NetBSD: brotli.mk,v 1.1 2023/01/29 07:54:11 mrg Exp $ + +# makefile fragment to build brotlidec for freetype2 + +.include "bsd.own.mk" + +BROTLI_SRCS= bit_reader.c decode.c huffman.c state.c +BROTLI_SRCS+= constants.c context.c dictionary.c platform.c transform.c + +SRCS+= ${BROTLI_SRCS} + +.for _f in ${BROTLI_SRCS} +CFLAGS.${_f}+= -fcommon +CPPFLAGS+${_f}= -DBROTLIDEC_SHARED_COMPILATION \ + -DBROTLI_HAVE_LOG2=1 \ + -DBROTLI_SHARED_COMPILATION \ + -DNDEBUG \ + -I${X11SRCDIR.brotli}/c/include +.endfor + +.include "brotli-rename.mk" + +.PATH: ${X11SRCDIR.brotli}/c/dec +.PATH: ${X11SRCDIR.brotli}/c/common |
