LinuxVLC

vlc-3.0.8在飞凌开发板上需要的插件库交叉编译

2020-03-05  本文已影响0人  小桥流水啦啦啦

1、编译脚本

#! /bin/bash
## DO NOT EDIT - This file generated from ../libtool-2.4.6/build-aux/ltmain.in
##               by inline-source v2014-01-03.01

# libtool (GNU libtool) 2.4.6
# Provide generalized library-building support services.
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996

# Copyright (C) 1996-2015 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions.  There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# GNU Libtool is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# As a special exception to the GNU General Public License,
# if you distribute this file as part of a program or library that
# is built using GNU Libtool, you may include this file under the
# same distribution terms that you use for the rest of that program.
#
# GNU Libtool is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
# 
#

if [ "$1" = "" ];then
    echo "\n Get Error! Please input the vlc version! \n"
    exit
fi

#!/bin/sh


echo "========================================================"
make clean
make distclean
echo "========================================================"


# export PKG_CONFIG_PATH="\
# /opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/lib/pkgconfig:\
# /opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/share/pkgconfig:\
# $PLUG_LIB_DIR/ffmpeg/lib/pkgconfig "

# export CFLAGS="-ggdb3 -O0 -O2 -pipe -g -feliminate-unused-debug-types \
# -fdebug-prefix-map=/data/fsl-release-bsp/build-x11/tmp/work/x86_64-nativesdk-pokysdk-linux/meta-environment-imx6qsabresd/1.0-r8=/usr/src/debug/meta-environment-imx6qsabresd/1.0-r8 \
# -fdebug-prefix-map=/data/fsl-release-bsp/build-x11/tmp/sysroots/x86_64-linux= \
# -fdebug-prefix-map=/data/fsl-release-bsp/build-x11/tmp/sysroots/x86_64-nativesdk-pokysdk-linux= \
# -I/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/cortexa9hf-neon-poky-linux-gnueabi/usr/include \
# -I$PLUG_LIB_DIR/ffmpeg/include "

export SDKTARGETSYSROOT=/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/cortexa9hf-neon-poky-linux-gnueabi
export PATH=/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/sbin:/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/bin:/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/sbin:/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/../x86_64-pokysdk-linux/bin:/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi:/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-uclibc:/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-musl:$PATH
export CCACHE_PATH=/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/../x86_64-pokysdk-linux/bin:/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi:/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-uclibc:/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-musl:$CCACHE_PATH
export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT
#export PKG_CONFIG_PATH=$SDKTARGETSYSROOT/usr/lib/pkgconfig
export CONFIG_SITE=/opt/fsl-imx-x11/4.1.15-2.1.0/site-config-cortexa9hf-neon-poky-linux-gnueabi
export OECORE_NATIVE_SYSROOT="/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux"
export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"
export OECORE_ACLOCAL_OPTS="-I /opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/x86_64-pokysdk-linux/usr/share/aclocal"

export CC="arm-poky-linux-gnueabi-gcc  -march=armv7-a -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=$SDKTARGETSYSROOT"
export CXX="arm-poky-linux-gnueabi-g++  -march=armv7-a -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=$SDKTARGETSYSROOT"
export CPP="arm-poky-linux-gnueabi-gcc -E  -march=armv7-a -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=$SDKTARGETSYSROOT"
export AS="arm-poky-linux-gnueabi-as "
export LD="arm-poky-linux-gnueabi-ld  --sysroot=$SDKTARGETSYSROOT"
export GDB=arm-poky-linux-gnueabi-gdb
export STRIP=arm-poky-linux-gnueabi-strip
export RANLIB=arm-poky-linux-gnueabi-ranlib
export OBJCOPY=arm-poky-linux-gnueabi-objcopy
export OBJDUMP=arm-poky-linux-gnueabi-objdump
export AR=arm-poky-linux-gnueabi-ar
export NM=arm-poky-linux-gnueabi-nm
export M4=m4
export TARGET_PREFIX=arm-poky-linux-gnueabi-
export CONFIGURE_FLAGS="--target=arm-poky-linux-gnueabi --host=arm-poky-linux-gnueabi --build=x86_64-linux --with-libtool-sysroot=$SDKTARGETSYSROOT"
#export CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/data/fsl-release-bsp/build-x11/tmp/work/x86_64-nativesdk-pokysdk-linux/meta-environment-imx6qsabresd/1.0-r8=/usr/src/debug/meta-environment-imx6qsabresd/1.0-r8 -fdebug-prefix-map=/data/fsl-release-bsp/build-x11/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/data/fsl-release-bsp/build-x11/tmp/sysroots/x86_64-nativesdk-pokysdk-linux= "
#export CXXFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/data/fsl-release-bsp/build-x11/tmp/work/x86_64-nativesdk-pokysdk-linux/meta-environment-imx6qsabresd/1.0-r8=/usr/src/debug/meta-environment-imx6qsabresd/1.0-r8 -fdebug-prefix-map=/data/fsl-release-bsp/build-x11/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/data/fsl-release-bsp/build-x11/tmp/sysroots/x86_64-nativesdk-pokysdk-linux= "
#export LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
export CPPFLAGS=""
export KCFLAGS="--sysroot=$SDKTARGETSYSROOT"
export OECORE_DISTRO_VERSION="4.1.15-2.1.0"
export OECORE_SDK_VERSION="4.1.15-2.1.0"
export ARCH=arm
export CROSS_COMPILE=arm-poky-linux-gnueabi-

PLUG_LIB_DIR="/home/imhqq/share/huqiqiao/vlc-3.0.8-plugin/lib"
PLUG_SRC_DIR="/home/imhqq/share/huqiqiao/vlc-3.0.8-plugin/src"
VLC_SRC_DIR="/home/imhqq/share/huqiqiao/vlc-3.0.8"

export PKG_CONFIG_PATH="\
$SDKTARGETSYSROOT/usr/lib/pkgconfig:\
${SDKTARGETSYSROOT}/usr/share/pkgconfig:\
${PLUG_LIB_DIR}/x264/lib/pkgconfig:\
${PLUG_LIB_DIR}/SDL1/lib/pkgconfig "

export CFLAGS=" -ggdb3 -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/data/fsl-release-bsp/build-x11/tmp/work/x86_64-nativesdk-pokysdk-linux/meta-environment-imx6qsabresd/1.0-r8=/usr/src/debug/meta-environment-imx6qsabresd/1.0-r8 -fdebug-prefix-map=/data/fsl-release-bsp/build-x11/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/data/fsl-release-bsp/build-x11/tmp/sysroots/x86_64-nativesdk-pokysdk-linux= \
-I${SDKTARGETSYSROOT}/usr/include \
-I${PLUG_LIB_DIR}/x264/include \
-I${PLUG_LIB_DIR}/SDL1/include \
-I${PLUG_LIB_DIR}/libgpg-error/include "

export CXXFLAGS=" -ggdb3 -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/data/fsl-release-bsp/build-x11/tmp/work/x86_64-nativesdk-pokysdk-linux/meta-environment-imx6qsabresd/1.0-r8=/usr/src/debug/meta-environment-imx6qsabresd/1.0-r8 -fdebug-prefix-map=/data/fsl-release-bsp/build-x11/tmp/sysroots/x86_64-linux= -fdebug-prefix-map=/data/fsl-release-bsp/build-x11/tmp/sysroots/x86_64-nativesdk-pokysdk-linux= \
-I${SDKTARGETSYSROOT}/usr/include \
-I${PLUG_LIB_DIR}/x264/include \
-I${PLUG_LIB_DIR}/SDL1/include \
-I${PLUG_LIB_DIR}/libgpg-error/include "

export LDFLAGS=" -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed \
-L${SDKTARGETSYSROOT}/usr/lib \
-L${SDKTARGETSYSROOT}/lib -lm -lgcc \
-L${PLUG_LIB_DIR}/x264/lib -lx264 \
-L${PLUG_LIB_DIR}/SDL1/lib -lSDL \
-L${PLUG_LIB_DIR}/libgpg-error/lib -lgpg-error "

export dependency_libs="$dependency_libs \
-L${SDKTARGETSYSROOT}/usr/lib \
-L${SDKTARGETSYSROOT}/lib \
-L${PLUG_LIB_DIR}/x264/lib -lx264 \
-L${PLUG_LIB_DIR}/SDL1/lib -lSDL \
-L${PLUG_LIB_DIR}/libgpg-error/lib -lgpg-error "

# ------------------------------------------------------------------------------------------------------------
# dependency_libs填写的方式:
# ------------------------------------------------------------------------------------------------------------
# 1、-L/home/imhqq/share/huqiqiao/vlc-2.2.1-plugin/lib/live/lib -lBasicUsageEnvironment -lgroupsock -lliveMedia -lUsageEnvironment
# 2、/home/imhqq/share/huqiqiao/vlc-2.2.1-plugin/lib/liba52/lib/liba52.la'
# ------------------------------------------------------------------------------------------------------------

#arm-poky-linux-gnueabi-g++ -march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=/opt/fsl-imx-fb/4.1.15-2.1.0/sysroots/cortexa9hf-neon-poky-linux-gnueabi -c -pipe -g -std=gnu++0x -Wall -W -fPIC -I. -I../rootfs/usr/lib/glib-2.0/include

##/home/imhqq/share/huqiqiao/$1/src/libvlccore.la -lrt -ldl -lm

if [ $1 = vlc-3.0.8 ];then

VLC308_CONFIG=" -C --build=x86_64-linux-gnu \
--target=arm-poky-linux-gnueabi \
--host=arm-poky-linux-gnueabi \
--prefix=/home/imhqq/share/huqiqiao/vlc-3.0.8/arm_vlc_build  \
--enable-run-as-root  \
--enable-vlc  --enable-avformat --enable-realrtsp --enable-sout --enable-libass  \
--disable-lua --enable-ncurses --enable-ogg --enable-libgcrypt --enable-debug --enable-merge-ffmpeg  \
--enable-avformat  --enable-mpc --enable-qt --enable-xvideo  --enable-xcb --enable-libxml2 --enable-x264 --enable-pulse \
--enable-mpc --enable-a52 --disable-libgcrypt --enable-freetype  --disable-postproc  --disable-mod \
--disable-sdl-image --enable-swscale  --disable-screen  --disable-macosx --disable-macosx-qtkit \
--disable-altivec --disable-coverage --disable-taglib --disable-dvdread --disable-dvdnav \
--disable-dvbpsi --disable-v4l2 --disable-vcd --disable-dca --disable-tremor --disable-gme --disable-faad --disable-flac \
--disable-speex --disable-theora --disable-schroedinger --disable-png --disable-telx --disable-kate --disable-fribidi --disable-fontconfig   \
--disable-gnutls  --disable-lirc  --disable-silent-rules --disable-neon --disable-dc1394 --disable-vlm \
--disable-twolame --disable-sftp --disable-notify --disable-shout --disable-aa --disable-caca --disable-jack --disable-libva --disable-dxva2 \
--disable-shine --disable-zvbi --disable-tiger --disable-maintainer-mode --disable-dependency-tracking --disable-gprof --disable-cprof \
--disable-libcddb --disable-wma-fixed  --disable-omxil --disable-fluidsynth --disable-svg --disable-upnp \
--disable-goom --disable-projectm --disable-mtp --disable-update-check --disable-linsys --disable-bluray --disable-smbclient --disable-decklink \
--disable-vnc --disable-freerdp --disable-macosx-avfoundation --disable-asdcp --disable-udev --disable-gst-decode --enable-live555 \
--enable-vdpau --enable-a52 --enable-jpeg --with-gnu-ld \
--disable-optimizations --disable-opencv --disable-vpx \
--disable-avcodec --disable-avformat --disable-swscale \
--disable-a52 --disable-x264 --disable-vdpau "
       
VLC308_CONFIG1=" -C --build=x86_64-linux-gnu \
--target=arm-poky-linux-gnueabi \
--host=arm-poky-linux-gnueabi \
--prefix=/home/imhqq/share/huqiqiao/vlc-3.0.8/arm_vlc_build \
--enable-run-as-root  \
--enable-optimizations \
--enable-debug \
--enable-vlc  \
--disable-mad \
--disable-postproc \
--disable-a52 \
--disable-glx \
--enable-x264 \
--enable-live555 \
--enable-merge-ffmpeg \
--enable-lua "
fi

#export LC_ALL="C" && cd ${SOURCE_TOP}

case "$1" in
    faad)
        cd ${PLUG_SRC_DIR}/faad2-2.8.8
        ./configure \
        --prefix=${PLUG_LIB_DIR}/faad \
        --host=arm-poky-linux-gnueabi \
        --enable-shared \
        --disable-static
        make -j8
        make install
        ;;
    libmpeg2)
        # http://www.linuxfromscratch.org/blfs/view/svn/multimedia/libmpeg2.html
        cd ${PLUG_SRC_DIR}/libmpeg2-0.5.1
        sed -i 's/static const/static/' libmpeg2/idct_mmx.c
        ./configure \
        --prefix=${PLUG_LIB_DIR}/libmpeg2 \
        --host=arm-poky-linux-gnueabi \
        --enable-shared \
        --disable-static
        make -j8
        make install
        ;;
    libxml2)
        cd ${PLUG_SRC_DIR}/libxml2-2.9.10
        ./configure \
        --prefix=${PLUG_LIB_DIR}/libxml2 \
        --host=arm-poky-linux-gnueabi \
        --enable-shared \
        --with-python=no
        make -j8
        make install
        ;;
    lua-5.3.5)
        # OK 
        cd ${PLUG_SRC_DIR}/lua-5.3.5
        #patch -Np1 -i ../lua-5.3.5-shared_library-1.patch
        #sed -i '/#define LUA_ROOT/s:/usr/local/:/usr/:' src/luaconf.h
        #make MYCFLAGS="-DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" linux        
        ;;
    flac)
        # OK
        cd ${PLUG_SRC_DIR}/flac-1.3.3
        ./configure \
        --prefix=${PLUG_LIB_DIR}/lib/flac \
        --enable-shared \
        --disable-static \
        --host=arm-poky-linux-gnueabi \
        --build=x86_64-linux-gnu
        make -j8
        make install
        ;;
    libsndfile)
        # OK 
        cd ${PLUG_SRC_DIR}/libsndfile-1.0.28
        ./configure \
        --prefix=${PLUG_LIB_DIR}/lib/libsndfile \
        --host=arm-poky-linux-gnueabi \
        --build=x86_64-linux-gnu \
        --target=arm-poky-linux-gnueabi \
        --enable-shared \
        --disable-static
        make -j8
        make install
        ;;
    SDL1)
        # 3-5 OK
        cd ${PLUG_SRC_DIR}/SDL-1.2.15
        sed -e '/_XData32/s:register long:register _Xconst long:' \
        -i src/video/x11/SDL_x11sym.h        
        make distclean
        LIBS="/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/cortexa9hf-neon-poky-linux-gnueabi/lib"
        ./configure \
        --prefix=${PLUG_LIB_DIR}/SDL1 \
        --host=arm-poky-linux-gnueabi \
        --build=x86_64-linux-gnu \
        --disable-static \
        --enable-shared \
        --disable-video-directfb
        make -j8
        make install
        ;;
    dbus)
        # 3-6 OK
        cd ${PLUG_SRC_DIR}/dbus-1.12.16
        ./configure \
        --prefix=${PLUG_LIB_DIR}/dbus \
        --host=arm-poky-linux-gnueabi \
        --build=x86_64-linux-gnu \
        --enable-shared \
        --disable-static
        make -j8
        make install
        ;;
    SDL2)
        # OK
        cd ${PLUG_SRC_DIR}/SDL2-2.0.10
        ./configure \
        --prefix=${PLUG_LIB_DIR}/SDL2 \
        --host=arm-poky-linux-gnueabi \
        --build=x86_64-linux-gnu \
        --enable-shared \
        --disable-static
        make -j8
        make install     
        ;;
    SDL2_image)
        # OK
        cd ${PLUG_SRC_DIR}/SDL2_image-2.0.5
        ./configure \
        --prefix=${PLUG_LIB_DIR}/SDL2_image \
        --host=arm-poky-linux-gnueabi \
        --build=x86_64-linux-gnu \
        --enable-shared \
        --disable-static \
        --with-sdl-prefix=${PLUG_LIB_DIR}/SDL2
        make -j8
        make install     
        ;;        
    pulseaudio)
        # 3-5 未全部完成,实际编译出来部分,且已经安装
        export LC_ALL="C"
        cd ${PLUG_SRC_DIR}/pulseaudio-13.0
        ./configure \
        --prefix=${PLUG_LIB_DIR}/pulseaudio \
        --host=arm-poky-linux-gnueabi \
        --build=x86_64-linux-gnu \
        --enable-shared \
        --disable-static \
        --disable-schannel \
        --disable-avahi \
        --disable-tests \
        --disable-glib2
        make -j8
        make install        
        ;;
    libvpx)
        # 3-5 failed 
        export LC_ALL="C"
        cd ${PLUG_SRC_DIR}/libvpx-1.8.2
        sed -i 's/cp -p/cp/' build/make/Makefile 
        ./configure \
        --prefix=${PLUG_LIB_DIR}/libvpx \
        --enable-shared \
        --disable-static \
        --enable-vp8 \
        --disable-vp9 \
        --disable-runtime-cpu-detect \
        --cpu=cortex-a9 \
        --target=arm-poky-linux-gnueabi \
        --disable-optimizations
        make -j8 
        make install
        ;;
    libvdpau)
        # 比较复杂,未成功
        cd ${PLUG_SRC_DIR}/libvdpau-1.3
        ./configure \
        --prefix=${PLUG_LIB_DIR}/libvdpau \
        --build=x86_64-linux-gnu \
        --host=arm-poky-linux-gnueabi  \
        --enable-shared \
        --disable-static
        make
        make install
        ;;
    libmad)
        # 3-5 OK
        export LC_ALL="C"
        cd /${PLUG_SRC_DIR}/libmad-0.15.1b
        # patch -Np1 -i ../../tar/libmad-0.15.1b-fixes-1.patch
        # sed "s@AM_CONFIG_HEADER@AC_CONFIG_HEADERS@g" -i configure.ac
        # touch NEWS AUTHORS ChangeLog
        # autoreconf -fi
        ./configure \
        --prefix=${PLUG_LIB_DIR}/libmad \
        --host=arm-poky-linux-gnueabi --build=x86_64-linux-gnu \
        --disable-static
        make 
        make install
        ;;
    which)
        # OK
        cd ${PLUG_SRC_DIR}/which-2.21
        ./configure \
        --prefix=${PLUG_LIB_DIR}/which \
        --host=arm-poky-linux-gnueabi \
        --build=x86_64-linux-gnu \
        --target=arm-poky-linux-gnueabi \
        --disable-static
        make -j8
        make install
        ;;
    freetype)
        # OK
        cd ${PLUG_SRC_DIR}/freetype-2.10.1
        ./configure \
        --prefix=${PLUG_LIB_DIR}/freetype \
        --host=arm-poky-linux-gnueabi \
        --build=x86_64-linux-gnu \
        --target=arm-poky-linux-gnueabi \
        --enable-shared --disable-static
        make -j8
        make install
        ;;
    libogg)
        # OK
        cd ${PLUG_SRC_DIR}/libogg-1.3.4
        ./configure  \
        --prefix=${PLUG_LIB_DIR}/libogg \
        --host=arm-poky-linux-gnueabi \
        --disable-static
        make -j8
        make install
        ;;
    libvorbis)
        # OK
        cd ${PLUG_SRC_DIR}/libvorbis-1.3.6
        ./configure  \
        --prefix=${PLUG_LIB_DIR}/libvorbis \
        --host=arm-poky-linux-gnueabi \
        --disable-static
        make -j8
        make install 
        ;;
    live555)
        # OK
        cd ${PLUG_SRC_DIR}/live-2016.02.09
        make distclean
        ./genMakefiles imx.linux-with-shared-libraries
        make
        make install PREFIX=${PLUG_LIB_DIR}/live
        ;;
    libgpg-error-1.36)
        # 3-6 OK
        cd ${PLUG_SRC_DIR}/libgpg-error-1.36
        make clean
        make distclean
        ./configure \
        --prefix=${PLUG_LIB_DIR}/libgpg-error \
        --host=arm-poky-linux-gnueabi \
        --enable-shared=yes \
        --enable-static=no  \
        --disable-libtool-lock     
        #--build=x86_64-linux-gnu
        #--with-libiconv-prefix=/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/cortexa9hf-neon-poky-linux-gnueabi
        make
        make install
        ;;
    libgpg-error-1.37)
        # 3-5 failed 
        cd ${PLUG_SRC_DIR}/libgpg-error-1.37
        make clean
        make distclean
        ./configure \
        --prefix=${PLUG_LIB_DIR}/libgpg-error \
        --host=arm-poky-linux-gnueabi \
        --enable-shared=yes \
        --enable-static=no  \
        --disable-libtool-lock     
        #--build=x86_64-linux-gnu
        #--with-libiconv-prefix=/opt/fsl-imx-x11/4.1.15-2.1.0/sysroots/cortexa9hf-neon-poky-linux-gnueabi
        make
        #make install
        ;;
    libgcrypt)
        # 3-6 OK 
        cd ${PLUG_SRC_DIR}/libgcrypt-1.8.5
        make distclean
        make clean
        ./configure -C \
        --prefix=${PLUG_LIB_DIR}/libgcrypt \
        --enable-shared \
        --disable-static \
        --build=x86_64-linux-gnu \
        --host=arm-poky-linux-gnueabi \
        --with-capabilities \
        --disable-ciphers \
        --with-libgpg-error-prefix=${PLUG_LIB_DIR}/libgpg-error
        make 
        make install
        ;;
    a52)
        # ok (进入目录手动安装)
        cd ${PLUG_SRC_DIR}/a52dec-0.7.4
        make clean
        ./configure \
        --prefix=${PLUG_LIB_DIR}/a52 \
        --build=x86_64-linux-gnu \
        --host=arm-poky-linux-gnueabi \
        --enable-shared \
        --disable-static \
        --with-gnu-ld CFLAGS="-g -O2 $([ $(uname -m) = x86_64 ] && echo -fPIC)" 
        make
        make install 
        cd ${SOURCE_TOP}
        ;;
    alsa)
        # OK
        cd ${PLUG_SRC_DIR}/alsa-lib-1.2.1.2
        ./configure \
        --prefix=${PLUG_LIB_DIR}/alsa \
        --build=x86_64-linux-gnu \
        --host=arm-poky-linux-gnueabi \
        --enable-shared \
        --disable-static \
        --disable-python \
        --with-gnu-ld
        make -j8 
        make install 
        cd ${SOURCE_TOP}
        ;;
    x264)
        # ok
        cd ${PLUG_SRC_DIR}/x264-20200218
        ./configure \
        --host=arm-poky-linux-gnueabi \
        --cross-prefix=arm-poky-linux-gnueabi- \
        --sysroot=${SDKTARGETSYSROOT} \
        --prefix=${PLUG_LIB_DIR}/x264 \
        --disable-cli \
        --disable-asm \
        --enable-shared  \
        --enable-pic \
        --system-libx264 \
        --bit-depth=10 \
        --disable-thread
        make -j8
        make install
        cd ${SOURCE_TOP}
        ;;
    ffmpeg)
        # OK 
        cd ${PLUG_SRC_DIR}/ffmpeg-4.2.2
        export LC_ALL="C"
        make distclean
        ./configure \
        --prefix=${PLUG_LIB_DIR}/ffmpeg \
        --enable-cross-compile  \
        --cc="arm-poky-linux-gnueabi-gcc  -march=armv7-a -mfpu=neon  -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=${SDKTARGETSYSROOT} " \
        --target-os=linux \
        --arch=armv7-a \
        --cpu=cortex-a9 \
        --enable-shared \
        --disable-static \
        --disable-asm  \
        --disable-stripping  \
        --enable-pthreads  \
        --enable-libx264 \
        --enable-nonfree \
        --enable-gpl \
        --enable-avresample \
        --enable-avcodec \
        --enable-avformat \
        --enable-swscale \
        --enable-swresample \
        --enable-swscale \
        --enable-postproc \
        --enable-avfilter \
        --pkgconfigdir=${PKG_CONFIG_PATH} \
        --cross-prefix=arm-poky-linux-gnueabi- \
        --extra-cflags="-O2 -pipe -g -march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 --sysroot=${SDKTARGETSYSROOT} -O0 -fPIC "
        make -j8
        make install
        ;;        
    vlc-3.0.8)
        cd /home/imhqq/share/huqiqiao/vlc-3.0.8
        make distclean
        # sed -i '/vlc_demux.h/a #define LUA_COMPAT_APIINTCASTS' modules/lua/vlc.h
        # sed -i '/LIBSSH2_VERSION_NUM/s/10801/10900/' modules/access/sftp.c 
        ./configure $VLC308_CONFIG1
        make
        # make install
        ;;
    vlc-2.2.1)
        .../vlc-2.2.1/configure -C --build=x86_64-linux-gnu --target=arm-poky-linux-gnueabi --host=arm-poky-linux-gnueabi \
        --prefix=/home/imhqq/share/huqiqiao/vlc-2.2.1/arm_vlc_build \
        --enable-run-as-root --enable-vlc --enable-avformat --enable-mad --enable-httpd --enable-realrtsp \
        --enable-sout --enable-libass --enable-optimizations -enable-lua --enable-ncurses --enable-ogg \
        --enable-mux_ogg --enable-debug --enable-avcodec --enable-merge-ffmpeg  \
        --enable-avformat --enable-mpc --enable-qt --enable-glspectrum --enable-xvideo --enable-xcb \
        --enable-libxml2 --enable-x264 --enable-pulse --disable-postproc \
        --disable-libgcrypt --disable-mod  \
        --disable-screen  --disable-macosx --disable-macosx-dialog-provider --disable-macosx-qtkit \
        --disable-macosx-eyetv --disable-macosx-vlc-app --disable-altivec --disable-coverage --disable-taglib \
        --disable-dvdread --disable-dvdnav --disable-dvbpsi --disable-v4l2 --disable-vcdx --disable-vcd \
        --disable-dca --disable-tremor --disable-gme --disable-faad --disable-flac --disable-speex \
        --disable-theora --disable-schroedinger --disable-png --disable-telx --disable-kate --disable-fribidi \
        --disable-fontconfig   --disable-atmo --disable-gnutls  --disable-lirc  --disable-silent-rules \
        --disable-neon --disable-dc1394 --disable-vlm --disable-gnomevfs --disable-twolame --disable-sftp \
        --disable-notify --disable-shout --disable-aa --disable-caca --disable-jack --disable-libva \
        --disable-dxva2 --disable-shine --disable-zvbi --disable-tiger --disable-maintainer-mode \
        --disable-dependency-tracking --disable-gprof --disable-cprof --disable-libcddb --disable-wma-fixed  \
        --disable-omxil --disable-quicktime --disable-fluidsynth --disable-svg --disable-upnp \
        --disable-goom --disable-projectm --disable-mtp --disable-update-check --disable-linsys --disable-bluray \
        --disable-smbclient --disable-decklink --disable-vnc --disable-freerdp --disable-macosx-avfoundation \
        --disable-asdcp --disable-udev --disable-gst-decode --enable-live555 --enable-gles2  \
        --enable-sdl --enable-sdl-image --disable-bonjour --enable-swscale  --enable-freetype --disable-directfb \
        --disable-gles1 --enable-sdl --enable-sdl-image --enable-vdpau --enable-a52 --enable-jpeg
        make -j8 && make install
        ;;
    *)    
        echo "Un-Supportted Library......" && exit
        ;;

esac

cd ${SOURCE_TOP}


2、插件库源码与编译出来的库

root@imhqq-B360M-D3V:/home/imhqq/share/huqiqiao/vlc-3.0.8-plugin# tree -L 2
.
├── lib
│   ├── a52
│   ├── alsa
│   ├── faad
│   ├── ffmpeg
│   ├── flac
│   ├── freetype
│   ├── libmad
│   ├── libmpeg2
│   ├── libogg
│   ├── libsndfile
│   ├── libvorbis
│   ├── libxml2
│   ├── live
│   ├── lua5.3
│   ├── SDL1
│   ├── SDL2
│   ├── SDL2_image
│   ├── which
│   └── x264
├── src
│   ├── a52dec-0.7.4
│   ├── alsa-lib-1.2.1.2
│   ├── dbus-1.12.16
│   ├── faad2-2.8.8
│   ├── ffmpeg-4.2.2
│   ├── ffmpeg-4.2.2-0304
│   ├── flac-1.3.3
│   ├── freetype-2.10.1
│   ├── glib-2.62.4-cve_2020_6750_fix-1.patch
│   ├── glib-2.62.5-skip_warnings-1.patch
│   ├── goom2
│   ├── libgcrypt-1.8.5
│   ├── libgpg-error-1.37
│   ├── libmad-0.15.1b
│   ├── libmad-0.15.1b-fixes-1.patch
│   ├── libmpeg2-0.5.1
│   ├── libogg-1.3.4
│   ├── libsndfile-1.0.28
│   ├── libvdpau-1.3
│   ├── libvorbis-1.3.6
│   ├── libvpx-1.8.2
│   ├── libxml2-2.9.10
│   ├── live-2016.02.09
│   ├── lua-5.3.5
│   ├── lua-5.3.5-shared_library-1.patch
│   ├── pulseaudio-13.0
│   ├── SDL-1.2.15
│   ├── SDL2-2.0.10
│   ├── SDL2_image-2.0.5
│   ├── which-2.21
│   └── x264-20200218
├── tar
│   ├── a52dec-0.7.4.tar.gz
│   ├── alsa-lib-1.2.1.2.tar.bz2
│   ├── autoconf-2.69.tar.xz
│   ├── automake-1.16.tar.xz
│   ├── dbus-1.12.16.tar.gz
│   ├── faad2-2.8.8.tar.gz
│   ├── ffmpeg-4.2.2.tar.xz
│   ├── flac-1.3.3.tar.xz
│   ├── freetype-2.10.1.tar.xz
│   ├── glib-2.62.5.tar.xz
│   ├── libgcrypt-1.8.5.tar.bz2
│   ├── libgpg-error-1.37.tar.bz2
│   ├── libmad-0.15.1b-fixes-1.patch
│   ├── libmad-0.15.1b.tar.gz
│   ├── libmpeg2-0.5.1.tar.gz
│   ├── libogg-1.3.4.tar.xz
│   ├── libsndfile-1.0.28.tar.gz
│   ├── libtool-2.4.6.tar.gz
│   ├── libvdpau-1.3.tar.bz2
│   ├── libvorbis-1.3.6.tar.xz
│   ├── libvpx-1.8.2.tar.gz
│   ├── libXau-1.0.9.tar.bz2
│   ├── libxml2-2.9.10.tar.gz
│   ├── libxslt-1.1.34.tar.gz
│   ├── live.2016.02.09.tar.gz
│   ├── lua-5.3.5.tar.gz
│   ├── pcre-8.44.tar.bz2
│   ├── pulseaudio-13.0.tar.xz
│   ├── SDL-1.2.15.tar.gz
│   ├── SDL2-2.0.10.tar.gz
│   ├── SDL2_image-2.0.5.zip
│   ├── util-macros-1.19.2.tar.bz2
│   ├── wgoom-1.99-src.zip
│   ├── which-2.21.tar.gz
│   ├── x264-20200218.tar.xz
│   ├── xcb-proto-1.13.tar.bz2
│   └── xorgproto-2019.2.tar.bz2
├── vlc-lib.sh
├── vlc.sh
├── vlc.sh-20200303
└── vlc.sh-bak

49 directories, 45 files

(完)

上一篇下一篇

猜你喜欢

热点阅读