mirror of
https://github.com/videolan/vlc.git
synced 2025-01-21 07:08:35 +08:00
contrib: Allow multiple contribs install for multiple hosts.
And make sure we really use the host to check what contrib to use in the configure. You don't have to re-run bootstrap from contrib after make from contrib when building for x86_64-darwin.
This commit is contained in:
parent
0b80cf464a
commit
43dc8a8d99
16
bootstrap
16
bootstrap
@ -31,19 +31,19 @@ cd "$(dirname "$0")"
|
||||
ACLOCAL_ARGS="-I m4 ${ACLOCAL_ARGS}"
|
||||
|
||||
# Check for contrib directory
|
||||
if test -d extras/contrib/bin; then
|
||||
PATH="`pwd`/extras/contrib/bin:$PATH"
|
||||
if test -d extras/contrib/share/aclocal; then
|
||||
ACLOCAL_ARGS="${ACLOCAL_ARGS} -I extras/contrib/share/aclocal"
|
||||
if test -d extras/contrib/build/bin; then
|
||||
PATH="`pwd`/extras/contrib/build/bin:$PATH"
|
||||
if test -d extras/contrib/build/share/aclocal; then
|
||||
ACLOCAL_ARGS="${ACLOCAL_ARGS} -I extras/contrib/build/share/aclocal"
|
||||
fi
|
||||
if test ".`uname -s`" = ".Darwin"; then
|
||||
LD_LIBRARY_PATH=./extras/contrib/lib:$LD_LIBRARY_PATH
|
||||
DYLD_LIBRARY_PATH=./extras/contrib/lib:$DYLD_LIBRARY_PATH
|
||||
LD_LIBRARY_PATH=./extras/contrib/build/lib:$LD_LIBRARY_PATH
|
||||
DYLD_LIBRARY_PATH=./extras/contrib/build/lib:$DYLD_LIBRARY_PATH
|
||||
export LD_LIBRARY_PATH
|
||||
export DYLD_LIBRARY_PATH
|
||||
elif test ".`uname -s`" = ".BeOS"; then
|
||||
LIBRARY_PATH=./extras/contrib/lib:$LIBRARY_PATH
|
||||
BELIBRARIES=./extras/contrib/lib:$BELIBRARIES
|
||||
LIBRARY_PATH=./extras/contrib/build/lib:$LIBRARY_PATH
|
||||
BELIBRARIES=./extras/contrib/build/lib:$BELIBRARIES
|
||||
export LIBRARY_PATH
|
||||
export BELIBRARIES
|
||||
fi
|
||||
|
16
configure.ac
16
configure.ac
@ -125,19 +125,10 @@ AC_ARG_WITH(contrib,
|
||||
if test "`echo \"$topdir\" | cut -c 1`" != "/"; then
|
||||
topdir="`pwd`/$topdir"
|
||||
fi
|
||||
CONTRIB_DIR=${topdir}/extras/contrib
|
||||
CONTRIB_DIR=${topdir}/extras/contrib/hosts/${host}
|
||||
fi
|
||||
AC_MSG_CHECKING([for libs in ${CONTRIB_DIR}])
|
||||
AS_IF([test -d ${CONTRIB_DIR}/lib],[
|
||||
AS_IF([test "`grep HOST ${CONTRIB_DIR}/config.mak 2>/dev/null|awk '{print $3}'`" != "`$CC -dumpmachine`"],[
|
||||
if test "${with_contrib}" = "yes"; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([ not using the libs in extras/contrib as it is not the same host])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_WARN([ not using the libs in extras/contrib as it is not the same host])
|
||||
fi
|
||||
],[
|
||||
AC_MSG_RESULT([yes])
|
||||
export PATH=${CONTRIB_DIR}/bin:$PATH
|
||||
CPPFLAGS="${CPPFLAGS} -I${CONTRIB_DIR}/include"
|
||||
@ -170,10 +161,9 @@ AC_ARG_WITH(contrib,
|
||||
export LIBRARY_PATH=${CONTRIB_DIR}/lib:$LIBRARY_PATH
|
||||
export BELIBRARIES=${CONTRIB_DIR}/lib:$BELIBRARIES
|
||||
fi
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
],[
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
])
|
||||
dnl
|
||||
dnl Set default values
|
||||
|
13
extras/contrib/.gitignore
vendored
13
extras/contrib/.gitignore
vendored
@ -1,4 +1,6 @@
|
||||
# Ignore install path
|
||||
build
|
||||
hosts
|
||||
translations
|
||||
demos
|
||||
examples
|
||||
@ -6,17 +8,6 @@ mkspecs
|
||||
phrasebooks
|
||||
*.xml
|
||||
*.tar.bz2
|
||||
share
|
||||
bin
|
||||
lib
|
||||
include
|
||||
man
|
||||
sbin
|
||||
etc
|
||||
gecko-sdk
|
||||
doc
|
||||
info
|
||||
Sparkle
|
||||
*.bak
|
||||
toolchain.cmake
|
||||
# Ignore fetched contrib
|
||||
|
@ -58,16 +58,17 @@ using-bin: contrib-macosx-$(ARCH)-$(CONTRIBREV).tar.bz2
|
||||
exit 1 ; \
|
||||
fi
|
||||
mkdir tmp
|
||||
mkdir -p $(PREFIX)
|
||||
(cd tmp && tar jxvf ../$<)
|
||||
./change_prefix.sh tmp @@CONTRIB_PREFIX@@ $(PREFIX)
|
||||
(cd tmp && find . -type d) | while read dir; do mkdir -p -- "$$dir"; done
|
||||
(cd tmp && find . -not -type d) | while read i; do mv -f -- tmp/"$$i" "$$i"; done
|
||||
(cd tmp && find . -type d) | while read dir; do mkdir -p -- "$(PREFIX)/$$dir"; done
|
||||
(cd tmp && find . -not -type d) | while read i; do mv -f -- tmp/"$$i" "$(PREFIX)/$$i"; done
|
||||
rm -rf tmp
|
||||
# libiconv.la is no longer present on Snow Leopard, so fix possible references to it, which would
|
||||
# result in linking issues
|
||||
ifdef HAVE_DARWIN_10
|
||||
(cd $(PREFIX)/lib && sed -e 's%/usr/lib/libiconv.la%$(PREFIX)/lib/libiconv.la%g' -i.orig *.la && rm -f *.la.orig)
|
||||
(cd $(PREFIX)/src && $(MAKE) .iconv)
|
||||
(cd src && $(MAKE) .iconv)
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -91,9 +92,7 @@ package-macosx:
|
||||
exit 1 ; \
|
||||
fi
|
||||
mkdir tmp
|
||||
tar cf - bin sbin include lib share/aclocal* share/autoconf* \
|
||||
share/automake* share/gettext* share/libtool* gecko-sdk Sparkle \
|
||||
| (cd tmp; tar xf -)
|
||||
(cd $(PREFIX); tar cf - *) | (cd tmp; tar xf -)
|
||||
./change_prefix.sh tmp $(PREFIX) @@CONTRIB_PREFIX@@
|
||||
(cd tmp; tar cf - .) | bzip2 -c > contrib-macosx.tar.bz2
|
||||
rm -rf tmp
|
||||
@ -108,9 +107,9 @@ package-win%:
|
||||
exit 1 ; \
|
||||
fi
|
||||
mkdir -p tmp/$(DISTDIR)
|
||||
tar cf - --dereference bin sbin include lib share/aclocal*\
|
||||
(cd $(PREFIX); tar cf - --dereference bin sbin include lib share/aclocal*\
|
||||
share/autoconf* share/qt4* \
|
||||
share/automake* share/gettext* gecko-sdk\
|
||||
share/automake* share/gettext* gecko-sdk)\
|
||||
| (cd tmp/$(DISTDIR); tar xpf -)
|
||||
#kludge for live.com
|
||||
mkdir -p tmp/$(DISTDIR)/live.com
|
||||
|
@ -290,7 +290,9 @@ cat src/Distributions/"${DISTRO}".mak >> distro.mak
|
||||
echo "BUILD = $BUILD" >> config.mak
|
||||
echo "HOST = $HOST" >> config.mak
|
||||
|
||||
echo "PREFIX = `pwd`" >> config.mak
|
||||
echo "PREFIX = `pwd`/hosts/$HOST" >> config.mak
|
||||
|
||||
ln -sfn hosts/$HOST build
|
||||
|
||||
echo "CC = ${CC}" >> config.mak
|
||||
echo "CXX = ${CXX}" >> config.mak
|
||||
|
Loading…
Reference in New Issue
Block a user