drop rapidjson headers from packages and use rapidjson from the system
This commit is contained in:
parent
f98d5caed3
commit
34c449feab
8
.github/workflows/linux-build-scripts.yml
vendored
8
.github/workflows/linux-build-scripts.yml
vendored
|
@ -31,6 +31,8 @@ jobs:
|
|||
shell: bash
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: prerequisites
|
||||
run: sudo apt-get install clang llvm lld libclang-11-dev libstdc++6 autoconf automake libtool pkg-config curl git doxygen rapidjson-dev
|
||||
- name: run the build script
|
||||
run: ./linux.sh -d
|
||||
- name: print build logs
|
||||
|
@ -47,6 +49,8 @@ jobs:
|
|||
shell: bash
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: prerequisites
|
||||
run: sudo apt-get install clang llvm lld libclang-11-dev libstdc++6 autoconf automake libtool pkg-config curl git doxygen rapidjson-dev
|
||||
- name: run the build script
|
||||
run: ./linux.sh -d --lts
|
||||
- name: print build logs
|
||||
|
@ -63,6 +67,8 @@ jobs:
|
|||
shell: bash
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: prerequisites
|
||||
run: sudo apt-get install clang llvm lld libclang-11-dev libstdc++6 autoconf automake libtool pkg-config curl git doxygen rapidjson-dev
|
||||
- name: run the build script
|
||||
run: ./linux.sh -d
|
||||
- name: print build logs
|
||||
|
@ -79,6 +85,8 @@ jobs:
|
|||
shell: bash
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: prerequisites
|
||||
run: sudo apt-get install clang llvm lld libclang-11-dev libstdc++6 autoconf automake libtool pkg-config curl git doxygen rapidjson-dev
|
||||
- name: run the build script
|
||||
run: ./linux.sh -d --lts
|
||||
- name: print build logs
|
||||
|
|
3
linux.sh
3
linux.sh
|
@ -175,9 +175,6 @@ echo -e "INFO: Downloading the source code of ffmpeg and external libraries.\n"
|
|||
# DOWNLOAD GNU CONFIG
|
||||
download_gnu_config
|
||||
|
||||
# DOWNLOAD RAPIDJSON
|
||||
download_rapidjson
|
||||
|
||||
# DOWNLOAD LIBRARY SOURCES
|
||||
downloaded_library_sources "${ENABLED_LIBRARIES[@]}"
|
||||
|
||||
|
|
|
@ -89,10 +89,10 @@ build_triplet = @build@
|
|||
host_triplet = @host@
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
|
||||
|
@ -233,6 +233,7 @@ EXEEXT = @EXEEXT@
|
|||
FFMPEG_LIBS = @FFMPEG_LIBS@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
HAVE_CXX11 = @HAVE_CXX11@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
|
|
1
linux/aclocal.m4
vendored
1
linux/aclocal.m4
vendored
|
@ -1229,6 +1229,7 @@ AC_SUBST([am__tar])
|
|||
AC_SUBST([am__untar])
|
||||
]) # _AM_PROG_TAR
|
||||
|
||||
m4_include([m4/ax_cxx_compile_stdcxx.m4])
|
||||
m4_include([m4/libtool.m4])
|
||||
m4_include([m4/ltoptions.m4])
|
||||
m4_include([m4/ltsugar.m4])
|
||||
|
|
1285
linux/configure
vendored
1285
linux/configure
vendored
File diff suppressed because it is too large
Load Diff
|
@ -19,8 +19,9 @@ AC_C_BIGENDIAN(AC_DEFINE([HIGHFIRST], [1], [big-endian machine]))
|
|||
|
||||
# Checks for programs.
|
||||
cflags_bckup="$CFLAGS"
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_LANG([C++])
|
||||
AC_PROG_CXX(clang++ llvm-g++ g++)
|
||||
AX_CXX_COMPILE_STDCXX(11, noext)
|
||||
AM_PROG_AR
|
||||
CFLAGS="$cflags_bckup"
|
||||
|
||||
|
@ -36,6 +37,9 @@ LT_INIT
|
|||
AC_CHECK_HEADERS([libavformat/avformat.h libavcodec/avcodec.h libavfilter/avfilter.h libavutil/avutil.h libswresample/swresample.h], [], [
|
||||
AC_MSG_ERROR([unable to find ffmpeg headers])
|
||||
])
|
||||
AC_CHECK_HEADERS([rapidjson/document.h], [], [
|
||||
AC_MSG_ERROR([unable to find rapidjson headers])
|
||||
])
|
||||
AC_CHECK_HEADERS([fcntl.h limits.h stdint.h stdlib.h string.h sys/ioctl.h sys/time.h termios.h unistd.h])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
|
|
|
@ -164,7 +164,7 @@ lock_old_archive_extraction=no
|
|||
LTCC="/bin/clang"
|
||||
|
||||
# LTCC compiler flags.
|
||||
LTCFLAGS="-target x86_64-linux-gnu -march=x86-64 -msse4.2 -mpopcnt -m64 -DFFMPEG_KIT_X86_64 -Wno-unused-function -Wno-pointer-sign -Wno-switch -Wno-deprecated-declarations -fstrict-aliasing -fPIC -DLINUX -I/usr/lib/llvm-10/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Os -ffunction-sections -fdata-sections -I/usr/lib/llvm-10/include -I/home/taner/Projects/ffmpeg-kit/prebuilt/linux-x86_64/ffmpeg/include -I/home/taner/Projects/ffmpeg-kit/.tmp/source/rapidjson/include -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include"
|
||||
LTCFLAGS="-target x86_64-linux-gnu -march=x86-64 -msse4.2 -mpopcnt -m64 -DFFMPEG_KIT_X86_64 -Wno-unused-function -Wno-pointer-sign -Wno-switch -Wno-deprecated-declarations -fstrict-aliasing -fPIC -DLINUX -I/usr/lib/llvm-10/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -g -I/usr/lib/llvm-10/include -I/home/taner/Projects/ffmpeg-kit/prebuilt/linux-x86_64/ffmpeg/include"
|
||||
|
||||
# Take the output of nm and produce a listing of raw symbols and C names.
|
||||
global_symbol_pipe="sed -n -e 's/^.*[ ]\\([BCDEGRST][BCDEGRST]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p' | sed '/ __gnu_lto/d'"
|
||||
|
@ -304,7 +304,7 @@ striplib="/bin/llvm-strip --strip-unneeded"
|
|||
|
||||
|
||||
# The linker used to build libraries.
|
||||
LD="/bin/ld.lld -m elf_x86_64 -m elf_x86_64"
|
||||
LD="/bin/ld.lld -m elf_x86_64"
|
||||
|
||||
# How to create reloadable object files.
|
||||
reload_flag=" -r"
|
||||
|
@ -11764,7 +11764,7 @@ build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
|
|||
# ### BEGIN LIBTOOL TAG CONFIG: CXX
|
||||
|
||||
# The linker used to build libraries.
|
||||
LD="/bin/ld.lld -m elf_x86_64 -m elf_x86_64"
|
||||
LD="/bin/ld.lld -m elf_x86_64"
|
||||
|
||||
# How to create reloadable object files.
|
||||
reload_flag=" -r"
|
||||
|
@ -11774,7 +11774,7 @@ reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
|
|||
old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$tool_oldlib"
|
||||
|
||||
# A language specific compiler.
|
||||
CC="/bin/clang++"
|
||||
CC="/bin/clang++ -std=c++11"
|
||||
|
||||
# Is the compiler the GNU compiler?
|
||||
with_gcc=yes
|
||||
|
|
1009
linux/m4/ax_cxx_compile_stdcxx.m4
Normal file
1009
linux/m4/ax_cxx_compile_stdcxx.m4
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -91,10 +91,10 @@ build_triplet = @build@
|
|||
host_triplet = @host@
|
||||
subdir = src
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \
|
||||
|
@ -295,6 +295,7 @@ EXEEXT = @EXEEXT@
|
|||
FFMPEG_LIBS = @FFMPEG_LIBS@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
HAVE_CXX11 = @HAVE_CXX11@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
|
|
|
@ -140,7 +140,6 @@ create_linux_bundle() {
|
|||
# COPY HEADERS
|
||||
cp -r -P "${LIB_INSTALL_BASE}"/ffmpeg-kit/include/* "${BASEDIR}/prebuilt/$(get_bundle_directory)/ffmpeg-kit/include" 2>>"${BASEDIR}"/build.log
|
||||
cp -r -P "${LIB_INSTALL_BASE}"/ffmpeg/include/* "${BASEDIR}/prebuilt/$(get_bundle_directory)/ffmpeg-kit/include" 2>>"${BASEDIR}"/build.log
|
||||
cp -r -P ${FFMPEG_KIT_TMPDIR}/source/rapidjson/include/rapidjson "${BASEDIR}/prebuilt/$(get_bundle_directory)/ffmpeg-kit/include" 2>>"${BASEDIR}"/build.log
|
||||
|
||||
# COPY LIBS
|
||||
cp -P "${LIB_INSTALL_BASE}"/ffmpeg-kit/lib/lib* "${BASEDIR}/prebuilt/$(get_bundle_directory)/ffmpeg-kit/lib" 2>>"${BASEDIR}"/build.log
|
||||
|
|
|
@ -2226,42 +2226,6 @@ download_gnu_config() {
|
|||
fi
|
||||
}
|
||||
|
||||
download_rapidjson() {
|
||||
local SOURCE_REPO_URL=""
|
||||
local LIB_NAME="rapidjson"
|
||||
local LIB_LOCAL_PATH="${FFMPEG_KIT_TMPDIR}/source/${LIB_NAME}"
|
||||
local SOURCE_ID=""
|
||||
local DOWNLOAD_RC=""
|
||||
local SOURCE_TYPE=""
|
||||
REDOWNLOAD_VARIABLE=$(echo "REDOWNLOAD_$LIB_NAME")
|
||||
|
||||
echo -e "DEBUG: Downloading rapidjson source.\n" 1>>"${BASEDIR}"/build.log 2>&1
|
||||
|
||||
SOURCE_REPO_URL=$(get_library_source "${LIB_NAME}" 1)
|
||||
SOURCE_ID=$(get_library_source "${LIB_NAME}" 2)
|
||||
SOURCE_TYPE=$(get_library_source "${LIB_NAME}" 3)
|
||||
|
||||
if [[ -d "${LIB_LOCAL_PATH}" ]]; then
|
||||
if [[ ${REDOWNLOAD_VARIABLE} -eq 1 ]]; then
|
||||
echo -e "INFO: rapidjson already downloaded but re-download requested\n" 1>>"${BASEDIR}"/build.log 2>&1
|
||||
rm -rf "${LIB_LOCAL_PATH}" 1>>"${BASEDIR}"/build.log 2>&1
|
||||
else
|
||||
echo -e "INFO: rapidjson already downloaded. Source folder found at ${LIB_LOCAL_PATH}\n" 1>>"${BASEDIR}"/build.log 2>&1
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
DOWNLOAD_RC=$(clone_git_repository_with_tag "${SOURCE_REPO_URL}" "${SOURCE_ID}" "${LIB_LOCAL_PATH}")
|
||||
|
||||
if [[ ${DOWNLOAD_RC} -ne 0 ]]; then
|
||||
echo -e "INFO: Downloading rapidjson failed. Can not get source from ${SOURCE_REPO_URL}\n" 1>>"${BASEDIR}"/build.log 2>&1
|
||||
echo -e "failed\n"
|
||||
exit 1
|
||||
else
|
||||
echo -e "\nINFO: rapidjson downloaded successfully\n" 1>>"${BASEDIR}"/build.log 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
is_gnu_config_files_up_to_date() {
|
||||
echo $(grep aarch64-apple-darwin config.guess | wc -l 2>>"${BASEDIR}"/build.log)
|
||||
}
|
||||
|
|
|
@ -21,8 +21,8 @@ set_toolchain_paths "${LIB_NAME}"
|
|||
# SET BUILD FLAGS
|
||||
HOST=$(get_host)
|
||||
export PKG_CONFIG_PATH="${INSTALL_PKG_CONFIG_DIR}"
|
||||
export CFLAGS="$(get_cflags ${LIB_NAME}) -I${LIB_INSTALL_BASE}/ffmpeg/include -I${FFMPEG_KIT_TMPDIR}/source/rapidjson/include"
|
||||
export CXXFLAGS="$(get_cxxflags ${LIB_NAME}) -I${LIB_INSTALL_BASE}/ffmpeg/include -I${FFMPEG_KIT_TMPDIR}/source/rapidjson/include"
|
||||
export CFLAGS="$(get_cflags ${LIB_NAME}) -I${LIB_INSTALL_BASE}/ffmpeg/include"
|
||||
export CXXFLAGS="$(get_cxxflags ${LIB_NAME}) -I${LIB_INSTALL_BASE}/ffmpeg/include"
|
||||
export LDFLAGS="$(get_ldflags ${LIB_NAME}) -L${LIB_INSTALL_BASE}/ffmpeg/lib -lavdevice"
|
||||
|
||||
cd "${BASEDIR}"/linux 1>>"${BASEDIR}"/build.log 2>&1 || return 1
|
||||
|
|
|
@ -192,11 +192,6 @@ get_library_source() {
|
|||
SOURCE_ID="v1.3.1"
|
||||
SOURCE_TYPE="TAG"
|
||||
;;
|
||||
rapidjson)
|
||||
SOURCE_REPO_URL="https://github.com/tanersener/rapidjson"
|
||||
SOURCE_ID="v1.1.0"
|
||||
SOURCE_TYPE="TAG"
|
||||
;;
|
||||
rubberband)
|
||||
SOURCE_REPO_URL="https://github.com/tanersener/rubberband"
|
||||
SOURCE_ID="v1.8.2"
|
||||
|
|
Loading…
Reference in New Issue
Block a user