all:
$(MAKE) -C src
-contrib-macosx.tar.bz2:
- $(WGET) $(CONTRIB_URL)
+ifdef HAVE_DARWIN_OS
+
+CONTRIBREV=20080922
+contrib-macosx-$(ARCH)-$(CONTRIBREV).tar.bz2:
+ $(WGET) ftp://ftp.videolan.org/pub/videolan/testing/contrib/contrib-macosx-$(ARCH)-$(CONTRIBREV).tar.bz2
+
+using-bin: contrib-macosx-$(ARCH)-$(CONTRIBREV).tar.bz2
+ @if test -d tmp; then \
+ echo "Move away ./tmp, it's in the way" ; \
+ exit 1 ; \
+ fi
+ mkdir tmp
+ (cd tmp && tar jxvf ../contrib-macosx.tar.bz2)
+ ./change_prefix.sh tmp @@CONTRIB_PREFIX@@ $(PREFIX)
+ for dir in `(cd tmp && find . -type d)`; do mkdir -p -- $$dir; done
+ for i in `(cd tmp && find . -not -type d)`; do mv -f tmp/$$i $$i; done
+ rm -rf tmp
+endif
clean-src:
rm -rf $(BUILDDIRS)
$(MAKE) clean-src
rm -rf config.mak distro.mak
+bin: using-bin
+
package-macosx:
@if test -d tmp; then \
echo "Move away ./tmp, it's in the way" ; \
share/automake* share/gettext* \
| (cd tmp; tar xf -)
./change_prefix.sh tmp $(PREFIX) @@CONTRIB_PREFIX@@
- (cd tmp; tar cf - .) | bzip2 -c > contrib-macosx.tar.bz2
rm -rf tmp
DISTDIR = usr/win32
cd $top_dir
pwd
files=`find . -type f`
-for file in $files; do
- if test ".`file $file | grep Mach-O`" != "." ; then
+for file in $files; do
+ if test ".`file $file | grep Mach-O`" != "." ; then
+ echo "Changing prefixes of '$file'"
libs=`otool -L $file 2>/dev/null | grep $prefix | cut -d\ -f 1`
- echo $libs
+ WD=`pwd`
+ first=y
for i in "" $libs; do
- echo $i
- if ! test -z $i; then
- install_name_tool -change $i \
- `echo $i | sed -e "s,$prefix,$new_prefix,"` \
- $file
+ if ! test -z $i; then
+ if test $first = y; then
+ install_name_tool -id `echo $i | sed -e "s,$prefix,$new_prefix,"` $file
+ first=n
+ else
+ install_name_tool -change $i `echo $i | sed -e "s,$prefix,$new_prefix,"` $file
+ fi
fi
done
elif test ".`file $file | grep \"text\|shell\"`" != "." ; then
-
+ echo "Fixing up shell/text file "$file""
sed -e "s,$prefix,$new_prefix,g" < $file > $file.tmp
mv -f $file.tmp $file
fi
pwd
files=` ls -1 *.la`
for file in $files; do
- echo $file
+ echo "Fixing up .la $file"
sed -e "s,$prefix,$new_prefix,g" < $file > $file.tmp
mv -f $file.tmp $file
done