]> git.sesse.net Git - vlc/commitdiff
contrib: Allow multiple contribs install for multiple hosts.
authorPierre d'Herbemont <pdherbemont@free.fr>
Fri, 18 Dec 2009 01:13:23 +0000 (02:13 +0100)
committerPierre d'Herbemont <pdherbemont@free.fr>
Fri, 18 Dec 2009 01:22:45 +0000 (02:22 +0100)
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.

bootstrap
configure.ac
extras/contrib/.gitignore
extras/contrib/Makefile
extras/contrib/bootstrap

index c32c18316b7896b95935f699529ea971b9f40d45..ac4934cc001aeaab02336bf9721b9d7d75816cc2 100755 (executable)
--- a/bootstrap
+++ b/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
index 566a0e0a424fd9343b03abbe35addbca4f144f58..90f75729b3e1a9fb835e586d19bc5316d50caf52 100644 (file)
@@ -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
index 072b2ce2ef9721f7b38a1d77536cf91528038819..89435baa9d7e1d559e7f72148bec6800090a9a18 100644 (file)
@@ -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
index 25f6838307b54ce994e8a7d2b7fb0b3982655bd3..243128ef31bb0c7def7f26efbcd3c6b67fa9f4e2 100644 (file)
@@ -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
index bb0337f2de410646909bdafa05fd2f41555c031e..798daf5906ae716e08028eac32499e929243f092 100755 (executable)
@@ -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