[Android] compile: Remove dummy .pc files
Hugo Beauzée-Luyssen
git at videolan.org
Fri Feb 1 10:27:25 CET 2019
vlc-android | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Dec 18 13:01:12 2018 +0100| [016611e24ed1e2bfb7d8bef189cd456381344e1c] | committer: Hugo Beauzée-Luyssen
compile: Remove dummy .pc files
This installs VLC to a per-target prefix, and use that prefix as the
base for .pc files & headers
The static module list is generated in the said prefix, based on the
modules from the build folder
> https://code.videolan.org/videolan/vlc-android/commit/016611e24ed1e2bfb7d8bef189cd456381344e1c
---
compile-libvlc.sh | 10 +++++++---
compile-medialibrary.sh | 9 +--------
pkgs/libvlc.pc.in | 8 --------
pkgs/libvlcpp.pc.in | 8 --------
4 files changed, 8 insertions(+), 27 deletions(-)
diff --git a/compile-libvlc.sh b/compile-libvlc.sh
index 0602e1b8a..977996c2d 100755
--- a/compile-libvlc.sh
+++ b/compile-libvlc.sh
@@ -331,6 +331,7 @@ fi
if [ "${ASAN}" = 1 ];then
VLC_BUILD_DIR=${VLC_BUILD_DIR}-asan
fi
+VLC_BUILD_DIR=`realpath ${VLC_BUILD_DIR}`
mkdir -p $VLC_BUILD_DIR && cd $VLC_BUILD_DIR
#############
@@ -381,6 +382,7 @@ PKG_CONFIG_PATH=$VLC_SRC_DIR/contrib/$TARGET_TUPLE/lib/pkgconfig \
PATH=../contrib/bin:$PATH \
sh ../configure --host=$TARGET_TUPLE --build=x86_64-unknown-linux \
--with-contrib=${VLC_SRC_DIR}/contrib/${TARGET_TUPLE} \
+ --prefix=${VLC_BUILD_DIR}/install/ \
${EXTRA_PARAMS} ${VLC_CONFIGURE_ARGS} ${OPTS}
checkfail "vlc: configure failed"
fi
@@ -392,6 +394,8 @@ fi
echo "Building"
make $MAKEFLAGS
checkfail "vlc: make failed"
+make install
+checkfail "vlc: make install failed"
cd $SRC_DIR
@@ -402,7 +406,7 @@ echo ok
# libVLC modules #
##################
-REDEFINED_VLC_MODULES_DIR=$SRC_DIR/.modules/${VLC_BUILD_DIR}
+REDEFINED_VLC_MODULES_DIR=${VLC_BUILD_DIR}/install/lib/vlc/plugins
rm -rf ${REDEFINED_VLC_MODULES_DIR}
mkdir -p ${REDEFINED_VLC_MODULES_DIR}
@@ -428,7 +432,7 @@ get_symbol()
echo "$1" | grep vlc_entry_$2|cut -d" " -f 3
}
-VLC_MODULES=$(find_modules vlc/$VLC_BUILD_DIR/modules)
+VLC_MODULES=$(find_modules ${VLC_BUILD_DIR}/modules)
DEFINITION="";
BUILTINS="const void *vlc_static_modules[] = {\n";
for file in $VLC_MODULES; do
@@ -490,7 +494,7 @@ $ANDROID_NDK/ndk-build$OSCMD -C libvlc \
APP_STL="c++_shared" \
APP_CPPFLAGS="-frtti -fexceptions" \
VLC_SRC_DIR="$VLC_SRC_DIR" \
- VLC_BUILD_DIR="$VLC_SRC_DIR/$VLC_BUILD_DIR" \
+ VLC_BUILD_DIR="$VLC_BUILD_DIR" \
VLC_CONTRIB="$VLC_CONTRIB" \
VLC_CONTRIB_LDFLAGS="$VLC_CONTRIB_LDFLAGS" \
VLC_MODULES="$VLC_MODULES" \
diff --git a/compile-medialibrary.sh b/compile-medialibrary.sh
index d5a483432..f346d43cc 100755
--- a/compile-medialibrary.sh
+++ b/compile-medialibrary.sh
@@ -149,13 +149,6 @@ echo -e "\e[1m\e[36mEXTRA_CFLAGS: ${EXTRA_CFLAGS}\e[0m"
cd ${MEDIALIBRARY_BUILD_DIR}
-sed "s#@prefix@#${MEDIALIBRARY_MODULE_DIR}/medialibrary/libvlcpp#g" $SRC_DIR/pkgs/libvlcpp.pc.in > \
- $SRC_DIR/pkgs/libvlcpp.pc;
-sed "s#@libdir@#$SRC_DIR/libvlc/jni/libs/$ANDROID_ABI#g" $SRC_DIR/pkgs/libvlc.pc.in > \
- $SRC_DIR/pkgs/libvlc.pc;
-sed -i".backup" "s#@includedirs@#-I${SRC_DIR}/vlc/include \
--I${SRC_DIR}/vlc/build-android-$TARGET_TUPLE/include#g" $SRC_DIR/pkgs/libvlc.pc;
-
if [ ! -d "build-android-$ANDROID_ABI/" ]; then
mkdir "build-android-$ANDROID_ABI/";
fi;
@@ -177,7 +170,7 @@ if [ ! -e ./config.h -o "$RELEASE" = 1 ]; then
NM="${CROSS_TOOLS}nm" \
STRIP="${CROSS_TOOLS}strip" \
RANLIB="${CROSS_TOOLS}ranlib" \
- PKG_CONFIG_LIBDIR="$SRC_DIR/pkgs/" \
+ PKG_CONFIG_LIBDIR="$SRC_DIR/vlc/build-android-${TARGET_TUPLE}/install/lib/pkgconfig" \
LIBJPEG_LIBS="-L$SRC_DIR/vlc/contrib/contrib-android-$TARGET_TUPLE/jpeg/.libs -ljpeg" \
LIBJPEG_CFLAGS="-I$SRC_DIR/vlc/contrib/$TARGET_TUPLE/include/" \
SQLITE_LIBS="-L$MEDIALIBRARY_MODULE_DIR/$SQLITE_RELEASE/build-$ANDROID_ABI/.libs -lsqlite3" \
diff --git a/pkgs/libvlc.pc.in b/pkgs/libvlc.pc.in
deleted file mode 100644
index c0cfc0070..000000000
--- a/pkgs/libvlc.pc.in
+++ /dev/null
@@ -1,8 +0,0 @@
-libdir=@libdir@
-
-Name: LibVLC control API
-Description: VLC media player external control library
-Version: 3.0.0-git
-Cflags: @includedirs@
-Libs: -L${libdir} -lvlc
-Libs.private: -lvlccore
diff --git a/pkgs/libvlcpp.pc.in b/pkgs/libvlcpp.pc.in
deleted file mode 100644
index c9d05a973..000000000
--- a/pkgs/libvlcpp.pc.in
+++ /dev/null
@@ -1,8 +0,0 @@
-prefix=@prefix@
-libdir=${prefix}
-includedir=${prefix}
-
-Name: libvlcpp
-Description: libvlc C++ bindings
-Version: 0.1.0
-Cflags: -I${includedir}
More information about the Android
mailing list