mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-04 05:44:53 +00:00
Build with Bazel (#1316)
Initial Bazel build files Co-authored-by: Willem <github@canihavesome.coffee> Co-authored-by: Divyam Ahuja <39771050+DivyamAhuja@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
acb55470f6
commit
fa8b0a3023
3
.gitignore
vendored
3
.gitignore
vendored
@@ -137,3 +137,6 @@ mac/cmake_install.cmake
|
|||||||
mac/CMakeFiles/
|
mac/CMakeFiles/
|
||||||
mac/CMakeCache.txt
|
mac/CMakeCache.txt
|
||||||
*.py.bak
|
*.py.bak
|
||||||
|
|
||||||
|
# Bazel
|
||||||
|
bazel*
|
||||||
|
|||||||
16
src/BUILD
Normal file
16
src/BUILD
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
cc_binary(
|
||||||
|
name = "ccextractor",
|
||||||
|
srcs = ["ccextractor.c",
|
||||||
|
"ccextractor.h"],
|
||||||
|
deps = [
|
||||||
|
"//src/lib_ccx:lib_ccx",
|
||||||
|
"//src/thirdparty/protobuf-c:protobuf-c",
|
||||||
|
"//src/thirdparty/gpacmp4:gpacmp4",
|
||||||
|
"//src/thirdparty/zlib:zlib",
|
||||||
|
"//src/thirdparty/freetype:freetype"
|
||||||
|
],
|
||||||
|
copts = [ "-Isrc/thirdparty/protobuf-c", "-Isrc/thirdparty/libpng", "-Isrc" ]
|
||||||
|
)
|
||||||
|
|
||||||
|
exports_files (["ccextractor.h"], ["//src/lib_ccx:__pkg__"])
|
||||||
|
|
||||||
30
src/lib_ccx/BUILD
Normal file
30
src/lib_ccx/BUILD
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
cc_library(
|
||||||
|
name = "lib_ccx",
|
||||||
|
# zvbi has been modified a lot (it has a decoder context) so we can't
|
||||||
|
# really treat as a 3rd party library
|
||||||
|
srcs = glob (["*.c", "zvbi/*.c"]),
|
||||||
|
hdrs = glob (["*.h", "zvbi/*.h", "*.xbm"]) + [ "//src:ccextractor.h" ],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [
|
||||||
|
"//src/thirdparty/protobuf-c:protobuf-c",
|
||||||
|
"//src/thirdparty/libpng:libpng",
|
||||||
|
"//src/thirdparty/freetype:freetype",
|
||||||
|
"//src/thirdparty/gpacmp4:gpacmp4",
|
||||||
|
"//src/thirdparty/lib_hash:lib_hash",
|
||||||
|
"//src/thirdparty/utf8proc:utf8proc",
|
||||||
|
],
|
||||||
|
includes = [ "thirdparty/protobuf-c", "thirdparty/libpng", "thirdparty/gpacmp4" , "." ,
|
||||||
|
"thirdparty/freetype/include" ],
|
||||||
|
copts = [ "-Isrc/thirdparty/protobuf-c",
|
||||||
|
"-Isrc/thirdparty/libpng",
|
||||||
|
"-Isrc/",
|
||||||
|
"-Isrc/thirdparty/gpacmp4",
|
||||||
|
"-Isrc/thirdparty/freetype",
|
||||||
|
"-Isrc/thirdparty/lib_hash",
|
||||||
|
"-Isrc/thirdparty/freetype/include",
|
||||||
|
"-Isrc/thirdparty/"
|
||||||
|
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#ifndef CCX_DECODER_VBI
|
#ifndef CCX_DECODER_VBI
|
||||||
#define CCX_DECODER_VBI
|
#define CCX_DECODER_VBI
|
||||||
|
|
||||||
#include <zvbi/zvbi_decoder.h>
|
#include "zvbi/zvbi_decoder.h"
|
||||||
#define VBI_DEBUG
|
#define VBI_DEBUG
|
||||||
|
|
||||||
#include "ccx_decoders_structs.h"
|
#include "ccx_decoders_structs.h"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include "ccx_decoders_708_output.h"
|
#include "ccx_decoders_708_output.h"
|
||||||
#include "ccx_encoders_xds.h"
|
#include "ccx_encoders_xds.h"
|
||||||
#include "ccx_encoders_helpers.h"
|
#include "ccx_encoders_helpers.h"
|
||||||
#include "../ccextractor.h"
|
#include "ccextractor.h"
|
||||||
#ifdef ENABLE_SHARING
|
#ifdef ENABLE_SHARING
|
||||||
#include "ccx_share.h"
|
#include "ccx_share.h"
|
||||||
#endif //ENABLE_SHARING
|
#endif //ENABLE_SHARING
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "lib_ccx.h"
|
#include "lib_ccx.h"
|
||||||
#include "../ccextractor.h"
|
#include "ccextractor.h"
|
||||||
#include "ccx_common_option.h"
|
#include "ccx_common_option.h"
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#ifndef BCD_H
|
#ifndef BCD_H
|
||||||
#define BCD_H
|
#define BCD_H
|
||||||
|
|
||||||
#include "ccx_common_platform.h"
|
#include "../ccx_common_platform.h"
|
||||||
/**
|
/**
|
||||||
* @addtogroup BCD BCD arithmetic for Teletext page numbers
|
* @addtogroup BCD BCD arithmetic for Teletext page numbers
|
||||||
* @ingroup HiDec
|
* @ingroup HiDec
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "bit_slicer.h"
|
#include "bit_slicer.h"
|
||||||
#include "ccx_common_common.h"
|
#include "../ccx_common_common.h"
|
||||||
|
|
||||||
#define VBI_PIXFMT_Y8 VBI_PIXFMT_YUV420
|
#define VBI_PIXFMT_Y8 VBI_PIXFMT_YUV420
|
||||||
#define VBI_PIXFMT_RGB24_LE VBI_PIXFMT_RGB24
|
#define VBI_PIXFMT_RGB24_LE VBI_PIXFMT_RGB24
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "zvbi_decoder.h"
|
#include "zvbi_decoder.h"
|
||||||
#include "raw_decoder.h"
|
#include "raw_decoder.h"
|
||||||
#include "ccx_common_common.h"
|
#include "../ccx_common_common.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @addtogroup Rawdec Raw VBI decoder
|
* @addtogroup Rawdec Raw VBI decoder
|
||||||
|
|||||||
@@ -37,9 +37,9 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "macros.h"
|
#include "macros.h"
|
||||||
#include "ccx_common_platform.h"
|
#include "../ccx_common_platform.h"
|
||||||
#include "ccx_common_constants.h"
|
#include "../ccx_common_constants.h"
|
||||||
#include "ccx_common_structs.h"
|
#include "../ccx_common_structs.h"
|
||||||
|
|
||||||
#define N_ELEMENTS(array) (sizeof (array) / sizeof (*(array)))
|
#define N_ELEMENTS(array) (sizeof (array) / sizeof (*(array)))
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "raw_decoder.h"
|
#include "raw_decoder.h"
|
||||||
#include "ccx_common_common.h"
|
#include "../ccx_common_common.h"
|
||||||
#ifndef RAW_DECODER_PATTERN_DUMP
|
#ifndef RAW_DECODER_PATTERN_DUMP
|
||||||
# define RAW_DECODER_PATTERN_DUMP 0
|
# define RAW_DECODER_PATTERN_DUMP 0
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
#include "raw_decoder.h"
|
#include "raw_decoder.h"
|
||||||
#include "sampling_par.h"
|
#include "sampling_par.h"
|
||||||
#include "sliced.h"
|
#include "sliced.h"
|
||||||
#include "ccx_common_common.h"
|
#include "../ccx_common_common.h"
|
||||||
|
|
||||||
#define vbi_pixfmt_bytes_per_pixel VBI_PIXFMT_BPP
|
#define vbi_pixfmt_bytes_per_pixel VBI_PIXFMT_BPP
|
||||||
#define sp_sample_format sampling_format
|
#define sp_sample_format sampling_format
|
||||||
|
|||||||
59
src/thirdparty/freetype/BUILD
vendored
Normal file
59
src/thirdparty/freetype/BUILD
vendored
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
cc_library(
|
||||||
|
name = "freetype",
|
||||||
|
srcs = [
|
||||||
|
"autofit/autofit.c",
|
||||||
|
"base/ftbase.c",
|
||||||
|
"base/ftbbox.c",
|
||||||
|
"base/ftbdf.c",
|
||||||
|
"base/ftbitmap.c",
|
||||||
|
"base/ftcid.c",
|
||||||
|
"base/ftfntfmt.c",
|
||||||
|
"base/ftfstype.c",
|
||||||
|
"base/ftgasp.c",
|
||||||
|
"base/ftglyph.c",
|
||||||
|
"base/ftgxval.c",
|
||||||
|
"base/ftinit.c",
|
||||||
|
"base/ftlcdfil.c",
|
||||||
|
"base/ftmm.c",
|
||||||
|
"base/ftotval.c",
|
||||||
|
"base/ftpatent.c",
|
||||||
|
"base/ftpfr.c",
|
||||||
|
"base/ftstroke.c",
|
||||||
|
"base/ftsynth.c",
|
||||||
|
"base/ftsystem.c",
|
||||||
|
"base/fttype1.c",
|
||||||
|
"base/ftwinfnt.c",
|
||||||
|
"bdf/bdf.c",
|
||||||
|
"bzip2/ftbzip2.c",
|
||||||
|
"cache/ftcache.c",
|
||||||
|
"cff/cff.c",
|
||||||
|
"cid/type1cid.c",
|
||||||
|
"gzip/ftgzip.c",
|
||||||
|
"lzw/ftlzw.c",
|
||||||
|
"pcf/pcf.c",
|
||||||
|
"pfr/pfr.c",
|
||||||
|
"psaux/psaux.c",
|
||||||
|
"pshinter/pshinter.c",
|
||||||
|
"psnames/psnames.c",
|
||||||
|
"raster/raster.c",
|
||||||
|
"sfnt/sfnt.c",
|
||||||
|
"smooth/smooth.c",
|
||||||
|
"truetype/truetype.c",
|
||||||
|
"type1/type1.c",
|
||||||
|
"type42/type42.c",
|
||||||
|
"winfonts/winfnt.c"
|
||||||
|
],
|
||||||
|
hdrs = glob([
|
||||||
|
"**/*.h",
|
||||||
|
]),
|
||||||
|
textual_hdrs = glob(["**/*.c"]),
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
copts = [
|
||||||
|
"-DFT2_BUILD_LIBRARY",
|
||||||
|
"-Isrc/thirdparty/freetype/include",
|
||||||
|
"-Isrc/thirdparty/freetype/include/freetype/internal",
|
||||||
|
"-Isrc/thirdparty/freetype/include/freetype/internal/services",
|
||||||
|
"-Isrc/thirdparty/freetype/include/freetype/config"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
8
src/thirdparty/gpacmp4/BUILD
vendored
Normal file
8
src/thirdparty/gpacmp4/BUILD
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
cc_library(
|
||||||
|
name = "gpacmp4",
|
||||||
|
srcs = glob(["*.c"]),
|
||||||
|
hdrs = glob(["*.h", "gpac/*.h", "gpac/internal/*.h" ]),
|
||||||
|
copts = [ "-I src/thirdparty/gpacmp4/" , "-DGPAC_CONFIG_LINUX -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -DENABLE_OCR -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP" ],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
7
src/thirdparty/lib_hash/BUILD
vendored
Normal file
7
src/thirdparty/lib_hash/BUILD
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
cc_library(
|
||||||
|
name = "lib_hash",
|
||||||
|
srcs = glob(["*.c"]),
|
||||||
|
hdrs = glob(["*.h"]),
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
7
src/thirdparty/libpng/BUILD
vendored
Normal file
7
src/thirdparty/libpng/BUILD
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
cc_library(
|
||||||
|
name = "libpng",
|
||||||
|
srcs = glob(["*.c"]),
|
||||||
|
hdrs = glob(["*.h"]),
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
16
src/thirdparty/protobuf-c/BUILD
vendored
Normal file
16
src/thirdparty/protobuf-c/BUILD
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
cc_library(
|
||||||
|
name = "protobuf-c",
|
||||||
|
srcs = ["protobuf-c.c"],
|
||||||
|
hdrs = ["protobuf-c.h"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
|
cc_test(
|
||||||
|
name = "protobuf-c_test",
|
||||||
|
srcs = ["protobuf-c_test.cc"],
|
||||||
|
deps = [":protobuf-c"]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
7
src/thirdparty/utf8proc/BUILD
vendored
Normal file
7
src/thirdparty/utf8proc/BUILD
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
cc_library(
|
||||||
|
name = "utf8proc",
|
||||||
|
srcs = glob(["utf8proc.c"]),
|
||||||
|
hdrs = glob(["*.h", "utf8proc_data.c"]),
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
7
src/thirdparty/win_iconv/BUILD
vendored
Normal file
7
src/thirdparty/win_iconv/BUILD
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
cc_library(
|
||||||
|
name = "win_iconv",
|
||||||
|
srcs = glob(["win_iconv.c"]),
|
||||||
|
hdrs = glob(["iconv.h"]),
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
7
src/thirdparty/zlib/BUILD
vendored
Normal file
7
src/thirdparty/zlib/BUILD
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
cc_library(
|
||||||
|
name = "zlib",
|
||||||
|
srcs = glob(["*.c"]),
|
||||||
|
hdrs = glob(["*.h"]),
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
||||||
|
|
||||||
Reference in New Issue
Block a user