Commit e34effd0 authored by Brendan Long's avatar Brendan Long

Merge pull request #18 from cablelabs/better-libtool-fix

Replace all of the libtool logic with a sed command which replaces Libs:...
parents 6b2bb1f1 96181fcf
#!/bin/bash -e
function deLibToolize {
echo "Replacing .la references with .so in *-uninstalled.pc files to make WebKit builds possible"
find . -name '*-uninstalled.pc' -exec sed -i -e 's/\(libgst.\+\).la$/\.libs\/\1\.so/' {} \;
}
function libToolize {
echo "Replacing .so references with .la in *-uninstalled.pc files to make CVP2 builds possible"
find . -name '*-uninstalled.pc' -exec sed -i -e 's/\.libs\/\(libgst.\+\).so$/\1\.la/' {} \;
}
function getBranch {
local result
......@@ -30,8 +20,6 @@ function getBranch {
}
unset BRANCH
DELIBTOOLIZE=true
LIBTOOL_CHANGE_ONLY=false
INSTALL_DEPS=true
RECONFIGURE=false
UPDATE_MODULES=true
......@@ -44,23 +32,12 @@ while true; do
case "$1" in
-h | --help )
echo "usage: $0 [-h | --help ] [--branch (branch name)] "
echo " [--disable-libtool | --enable-libtool] [--libtool-only]"
echo " [--no-update] [--no-deps]"
echo " [--reconfigure] [--upstream]"
echo " "
echo " -h | --help Print this help message."
echo " -v | --verbose Verbose build output."
echo " --branch [branch] The branch to check out."
echo " --disable-libtool (the default) - .la references in "
echo " *-uninstalled.pc files are replaced with "
echo " .so references, allowing QtWebKit "
echo " to be built."
echo " --enable-libtool .so references in *-uninstalled.pc files are "
echo " replaced with .la references, allowing CVP2 "
echo " and Rygel to be built."
echo " --libtool-only modify pkg-config files based on "
echo " the --enable-libtool or --disable-libtool "
echo " arguments - will not build or install dependencies"
echo " --no-update Don't pull and rebase before building."
echo " --no-deps Don't install dependencies before building."
echo " --reconfigure Force a reconfigure, even if a Makefile already exists."
......@@ -69,9 +46,6 @@ while true; do
exit;;
-v | --verbose ) VERBOSE=true; shift ;;
--branch ) shift; BRANCH=$1 ; shift ;;
--disable-libtool ) shift; DELIBTOOLIZE=true ;;
--enable-libtool ) shift; DELIBTOOLIZE=false ;;
--libtool-only ) LIBTOOL_CHANGE_ONLY=true ; shift ;;
--no-update ) UPDATE_MODULES=false; shift ;;
--no-deps ) INSTALL_DEPS=false; shift ;;
--reconfigure ) RECONFIGURE=true; shift ;;
......@@ -81,15 +55,6 @@ while true; do
esac
done
if $LIBTOOL_CHANGE_ONLY ; then
if $DELIBTOOLIZE ; then
deLibToolize
else
libToolize
fi
exit
fi
# List all modules to setup
GST_MODULES=(orc gstreamer gst-plugins-{base,good,bad,ugly} gst-libav gst-cablelabs-ruih-test)
......@@ -177,10 +142,6 @@ fi
# Get the name of this gst checkout -- git for ~/gst/git
name=${PWD##*/}
# Restore libtoolized pkgconfig files
echo Restoring libtoolized pkgconfig files
libToolize
for module in ${GST_MODULES[@]} ; do
unset MODULE_BRANCH
if [ "$module" == "orc" ] ; then
......@@ -261,10 +222,8 @@ for module in ${GST_MODULES[@]} ; do
cd ..
done
# De-libtoolize to make these link against WebKit
if $DELIBTOOLIZE ; then
deLibToolize
fi
echo "Fixing GStreamer's pkgconfig files to use -l[libname] instead of the full path to the .la file"
find . -name '*-uninstalled.pc' -exec sed -i -e 's/Libs: \(-L${libdir} \)\?\(.*\)\/lib\(.*\)\.la/Libs: -L\2 -l\3/' {} \;
echo "Build successful!"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment