Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/mit/xorg/lib/brotli build framework for embedded br...



details:   https://anonhg.NetBSD.org/src/rev/c5885169df16
branches:  trunk
changeset: 373274:c5885169df16
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Jan 29 07:54:11 2023 +0000

description:
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:

 external/mit/xorg/lib/brotli/brotli-rename.mk |  41 +++++++++++++++++++++++++++
 external/mit/xorg/lib/brotli/brotli.mk        |  24 +++++++++++++++
 2 files changed, 65 insertions(+), 0 deletions(-)

diffs (73 lines):

diff -r faa9924e04f0 -r c5885169df16 external/mit/xorg/lib/brotli/brotli-rename.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/xorg/lib/brotli/brotli-rename.mk     Sun Jan 29 07:54:11 2023 +0000
@@ -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 -r faa9924e04f0 -r c5885169df16 external/mit/xorg/lib/brotli/brotli.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/mit/xorg/lib/brotli/brotli.mk    Sun Jan 29 07:54:11 2023 +0000
@@ -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



Home | Main Index | Thread Index | Old Index