mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2025-01-15 06:32:40 +00:00
4875508f70
write_dvb_sub(): Test for out of bounds and report details when this happens. Still doesn't fix the underlying issue but will help figure it out. ocr.c: Solve malloc()/delete[] combinations that happened when operating on tesseract output. Now a malloc()'ed copy is immediately made, tesseract's results are unallocated using tesseract's delete function, and we continue using our own copy which is later free()'d.
63 lines
2.8 KiB
Bash
Executable File
63 lines
2.8 KiB
Bash
Executable File
#!/bin/bash
|
|
BLD_FLAGS="-g -std=gnu99 -Wno-write-strings -DGPAC_CONFIG_LINUX -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -DENABLE_OCR -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP"
|
|
BLD_INCLUDE="-I../src -I /usr/include/leptonica/ -I /usr/include/tesseract/ -I../src/lib_ccx/ -I../src/gpacmp4/ -I../src/libpng/ -I../src/zlib/ -I../src/zvbi -I../src/lib_hash -I../src/protobuf-c -I../src/utf8proc -I../src/freetype/include"
|
|
SRC_LIBPNG="$(find ../src/libpng/ -name '*.c')"
|
|
SRC_ZLIB="$(find ../src/zlib/ -name '*.c')"
|
|
SRC_ZVBI="$(find ../src/zvbi/ -name '*.c')"
|
|
SRC_CCX="$(find ../src/lib_ccx/ -name '*.c')"
|
|
SRC_GPAC="$(find ../src/gpacmp4/ -name '*.c')"
|
|
SRC_HASH="$(find ../src/lib_hash/ -name '*.c')"
|
|
SRC_PROTOBUF="$(find ../src/protobuf-c/ -name '*.c')"
|
|
SRC_UTF8PROC="../src/utf8proc/utf8proc.c"
|
|
SRC_FREETYPE="../src/freetype/autofit/autofit.c
|
|
../src/freetype/base/ftbase.c
|
|
../src/freetype/base/ftbbox.c
|
|
../src/freetype/base/ftbdf.c
|
|
../src/freetype/base/ftbitmap.c
|
|
../src/freetype/base/ftcid.c
|
|
../src/freetype/base/ftfntfmt.c
|
|
../src/freetype/base/ftfstype.c
|
|
../src/freetype/base/ftgasp.c
|
|
../src/freetype/base/ftglyph.c
|
|
../src/freetype/base/ftgxval.c
|
|
../src/freetype/base/ftinit.c
|
|
../src/freetype/base/ftlcdfil.c
|
|
../src/freetype/base/ftmm.c
|
|
../src/freetype/base/ftotval.c
|
|
../src/freetype/base/ftpatent.c
|
|
../src/freetype/base/ftpfr.c
|
|
../src/freetype/base/ftstroke.c
|
|
../src/freetype/base/ftsynth.c
|
|
../src/freetype/base/ftsystem.c
|
|
../src/freetype/base/fttype1.c
|
|
../src/freetype/base/ftwinfnt.c
|
|
../src/freetype/bdf/bdf.c
|
|
../src/freetype/bzip2/ftbzip2.c
|
|
../src/freetype/cache/ftcache.c
|
|
../src/freetype/cff/cff.c
|
|
../src/freetype/cid/type1cid.c
|
|
../src/freetype/gzip/ftgzip.c
|
|
../src/freetype/lzw/ftlzw.c
|
|
../src/freetype/pcf/pcf.c
|
|
../src/freetype/pfr/pfr.c
|
|
../src/freetype/psaux/psaux.c
|
|
../src/freetype/pshinter/pshinter.c
|
|
../src/freetype/psnames/psnames.c
|
|
../src/freetype/raster/raster.c
|
|
../src/freetype/sfnt/sfnt.c
|
|
../src/freetype/smooth/smooth.c
|
|
../src/freetype/truetype/truetype.c
|
|
../src/freetype/type1/type1.c
|
|
../src/freetype/type42/type42.c
|
|
../src/freetype/winfonts/winfnt.c"
|
|
API_WRAPPERS="$(find ../src/wrappers/ -name '*.c')"
|
|
BLD_SOURCES="../src/ccextractor.c $SRC_CCX $SRC_GPAC $SRC_ZLIB $SRC_ZVBI $SRC_LIBPNG $SRC_HASH $SRC_PROTOBUF $SRC_UTF8PROC $API_WRAPPERS $SRC_FREETYPE"
|
|
BLD_LINKER="-lm -zmuldefs -l tesseract -l lept"
|
|
BLD_DEBUG="-g -O1 -fsanitize=address -fno-omit-frame-pointer"
|
|
|
|
echo "Running pre-build script..."
|
|
./pre-build.sh
|
|
echo "Trying to compile..."
|
|
|
|
gcc $BLD_DEBUG $BLD_FLAGS $BLD_INCLUDE -o ccextractor $BLD_SOURCES $BLD_LINKER
|