2007-10-29 22:38:52 +01:00
|
|
|
#!/bin/sh
|
|
|
|
# default, host is empty, no cross compilation
|
2015-04-14 08:04:29 +02:00
|
|
|
# ./compile.sh [ i586-pc-msdosdjgpp | i686-pc-cygwin | i386-pc-mingw32 | powerpc-mac-darwin ]
|
2007-10-29 22:38:52 +01:00
|
|
|
# Comment the version definition to not compile the library
|
|
|
|
VER_E2FSPROGS=
|
2016-09-13 20:05:14 +02:00
|
|
|
#VER_PROGSREISERFS="0.3.1-rc8"
|
|
|
|
VER_PROGSREISERFS=
|
|
|
|
VER_LIBEWF=20140608
|
2010-10-23 20:07:08 +02:00
|
|
|
smp_mflags="-j 2"
|
2007-10-29 22:38:52 +01:00
|
|
|
crosscompile_target=
|
|
|
|
prefix=/usr/
|
|
|
|
if [ -z "$1" ];
|
|
|
|
then
|
|
|
|
compiledir=.
|
|
|
|
else
|
|
|
|
compiledir=$1
|
|
|
|
if [ "$1" != "$CC" ];
|
|
|
|
then
|
|
|
|
crosscompile_target=$1
|
2021-11-05 14:50:15 +01:00
|
|
|
TESTDISKCC="$crosscompile_target"-gcc
|
2012-05-21 08:41:50 +02:00
|
|
|
PKG_CONFIG_PATH=/usr/$crosscompile_target/lib/pkgconfig
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -d "$PKG_CONFIG_PATH" ];
|
2012-06-09 15:35:56 +02:00
|
|
|
then
|
|
|
|
PKG_CONFIG_PATH=/usr/$crosscompile_target/sys-root/mingw/lib/pkgconfig
|
|
|
|
fi
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -d "$PKG_CONFIG_PATH" ];
|
2015-04-14 08:04:29 +02:00
|
|
|
then
|
|
|
|
PKG_CONFIG_PATH=/usr/$crosscompile_target/sys-root/usr/lib/pkgconfig
|
|
|
|
fi
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -d "$PKG_CONFIG_PATH" ];
|
2012-06-09 15:35:56 +02:00
|
|
|
then
|
|
|
|
unset PKG_CONFIG_PATH
|
|
|
|
fi
|
2012-05-21 08:41:50 +02:00
|
|
|
export PKG_CONFIG_PATH
|
2007-10-29 22:38:52 +01:00
|
|
|
fi
|
|
|
|
fi
|
2011-04-06 09:08:26 +02:00
|
|
|
case "$crosscompile_target" in
|
2012-05-18 21:07:39 +02:00
|
|
|
"")
|
2019-07-09 19:28:33 +02:00
|
|
|
VER_LIBEWF=
|
2012-05-18 21:07:39 +02:00
|
|
|
;;
|
|
|
|
*-msdosdjgpp)
|
2015-04-14 08:04:29 +02:00
|
|
|
VER_LIBNTFS3G="2014.2.15"
|
|
|
|
VER_NTFSPROGS=
|
2013-10-20 12:26:19 +02:00
|
|
|
VER_E2FSPROGS="1.42.8"
|
2012-05-18 21:07:39 +02:00
|
|
|
;;
|
2013-05-22 08:07:19 +02:00
|
|
|
*-cygwin)
|
|
|
|
VER_LIBNTFS3G=
|
|
|
|
VER_NTFSPROGS="2.0.0"
|
2013-10-20 12:26:19 +02:00
|
|
|
VER_E2FSPROGS="1.42.8"
|
2013-05-22 08:07:19 +02:00
|
|
|
;;
|
|
|
|
*-mingw32)
|
2012-05-18 21:07:39 +02:00
|
|
|
VER_LIBNTFS3G=
|
|
|
|
VER_NTFSPROGS="2.0.0"
|
2013-09-12 12:19:21 +02:00
|
|
|
VER_E2FSPROGS=
|
2012-05-18 21:07:39 +02:00
|
|
|
;;
|
|
|
|
i686-apple-darwin9|powerpc-apple-darwin)
|
2015-04-14 08:04:29 +02:00
|
|
|
VER_LIBNTFS3G="2014.2.15"
|
2012-05-18 21:07:39 +02:00
|
|
|
VER_NTFSPROGS=
|
2013-10-20 12:26:19 +02:00
|
|
|
VER_E2FSPROGS="1.42.8"
|
2011-04-06 09:08:26 +02:00
|
|
|
;;
|
2021-05-09 08:46:39 +02:00
|
|
|
arm-none-linux-gnueabi|powerpc-linux-gnuspe|aarch64-QNAP-linux-gnu)
|
2019-07-07 17:25:03 +02:00
|
|
|
VER_LIBNTFS3G="2014.2.15"
|
|
|
|
VER_NTFSPROGS=
|
|
|
|
VER_E2FSPROGS="1.42.8"
|
|
|
|
;;
|
2011-04-06 09:08:26 +02:00
|
|
|
*)
|
2015-04-14 08:04:29 +02:00
|
|
|
VER_LIBNTFS3G="2014.2.15"
|
2011-04-06 09:08:26 +02:00
|
|
|
VER_NTFSPROGS=
|
2013-10-20 12:26:19 +02:00
|
|
|
VER_E2FSPROGS="1.42.8"
|
2019-07-07 17:25:03 +02:00
|
|
|
VER_LIBEWF=
|
2011-04-06 09:08:26 +02:00
|
|
|
;;
|
|
|
|
esac
|
2007-10-29 22:38:52 +01:00
|
|
|
prefix=/usr/$crosscompile_target
|
|
|
|
LYNX=links
|
2011-04-06 09:08:26 +02:00
|
|
|
WGET="wget -N"
|
2007-10-29 22:38:52 +01:00
|
|
|
LIBEXT=$compiledir/e2fsprogs-$VER_E2FSPROGS/lib/ext2fs/libext2fs.a
|
2021-11-05 14:50:15 +01:00
|
|
|
LIBNTFS=$compiledir/ntfsprogs-"$VER_NTFSPROGS"/libntfs/.libs/libntfs.a
|
2011-04-06 09:08:26 +02:00
|
|
|
LIBNTFS3G=$compiledir/ntfs-3g_ntfsprogs-$VER_LIBNTFS3G/libntfs-3g/.libs/libntfs-3g.a
|
2021-11-05 14:50:15 +01:00
|
|
|
LIBREISER=$compiledir/progsreiserfs-"$VER_PROGSREISERFS"/libreiserfs/.libs/libreiserfs.a
|
|
|
|
LIBEWF=$compiledir/ewf-"$VER_LIBEWF"/libewf/.libs/libewf.a
|
|
|
|
pwd_saved=$(pwd)
|
|
|
|
confdir=$(dirname "$0" 2>/dev/null)
|
|
|
|
cd "$confdir" || exit 1
|
|
|
|
confdir=$(pwd)
|
|
|
|
cd "$pwd_saved" || exit 1
|
2007-10-29 22:38:52 +01:00
|
|
|
|
2021-11-05 14:50:15 +01:00
|
|
|
PWDSRC=$(pwd|sed 's#^\w:/#/#')/$compiledir
|
2007-10-29 22:38:52 +01:00
|
|
|
|
|
|
|
CONFIGUREOPT=
|
2021-11-05 14:50:15 +01:00
|
|
|
mkdir -p "$compiledir"
|
2007-10-29 22:38:52 +01:00
|
|
|
echo "This script will try to compile e2fsprogs progsreiserfs ntfsprogs libraries"
|
|
|
|
if [ "$VER_E2FSPROGS" != "" ];
|
|
|
|
then
|
|
|
|
CONFIGUREOPT="$CONFIGUREOPT --with-ext2fs-lib=${PWDSRC}/e2fsprogs-${VER_E2FSPROGS}/lib --with-ext2fs-includes=${PWDSRC}/e2fsprogs-${VER_E2FSPROGS}/lib"
|
|
|
|
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -e "$compiledir"/e2fsprogs-$VER_E2FSPROGS/configure ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2008-03-20 22:16:05 +01:00
|
|
|
if [ ! -e e2fsprogs-$VER_E2FSPROGS.tar.gz ];
|
|
|
|
then
|
2007-10-29 22:38:52 +01:00
|
|
|
$LYNX http://prdownloads.sourceforge.net/e2fsprogs/e2fsprogs-$VER_E2FSPROGS.tar.gz
|
2008-03-20 22:16:05 +01:00
|
|
|
fi
|
|
|
|
if [ -e e2fsprogs-$VER_E2FSPROGS.tar.gz ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
tar xzf e2fsprogs-$VER_E2FSPROGS.tar.gz -C "$compiledir"
|
2007-10-29 22:38:52 +01:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -e "$compiledir"/e2fsprogs-$VER_E2FSPROGS/Makefile ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ -e "$compiledir"/e2fsprogs-$VER_E2FSPROGS/configure ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
rm -f "$compiledir"/Makefile
|
|
|
|
cd "$compiledir"/e2fsprogs-$VER_E2FSPROGS || exit 1
|
2010-01-24 13:19:16 +01:00
|
|
|
case "$crosscompile_target" in
|
|
|
|
arm-marvell-linux-gnu)
|
2021-11-05 14:50:15 +01:00
|
|
|
CC=$TESTDISKCC CFLAGS="$CFLAGS -g -O2 -DOMIT_COM_ERR" ./configure --host="$crosscompile_target" --prefix="$prefix" --disable-tls
|
2010-01-24 13:19:16 +01:00
|
|
|
;;
|
|
|
|
*)
|
2021-11-05 14:50:15 +01:00
|
|
|
CC=$TESTDISKCC CFLAGS="$CFLAGS -g -O2 -DOMIT_COM_ERR" ./configure --host="$crosscompile_target" --prefix="$prefix"
|
2010-01-24 13:19:16 +01:00
|
|
|
;;
|
|
|
|
esac
|
2021-11-05 14:50:15 +01:00
|
|
|
cd "$pwd_saved" || exit 1
|
2007-10-29 22:38:52 +01:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -e "$LIBEXT" ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ -e "$compiledir"/e2fsprogs-$VER_E2FSPROGS/Makefile ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
cd "$compiledir"/e2fsprogs-$VER_E2FSPROGS || exit 1
|
2010-10-23 20:07:08 +02:00
|
|
|
make $smp_mflags libs
|
2021-11-05 14:50:15 +01:00
|
|
|
cd "$pwd_saved" || exit 1
|
2007-10-29 22:38:52 +01:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$VER_PROGSREISERFS" != "" ];
|
|
|
|
then
|
|
|
|
CONFIGUREOPT="$CONFIGUREOPT --with-reiserfs-lib=${PWDSRC}/progsreiserfs-${VER_PROGSREISERFS}/libreiserfs/.libs/ --with-reiserfs-includes=${PWDSRC}/progsreiserfs-${VER_PROGSREISERFS}/include/ --with-dal-lib=${PWDSRC}/progsreiserfs-${VER_PROGSREISERFS}/libdal/.libs/"
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -e "$compiledir"/progsreiserfs-"$VER_PROGSREISERFS"/configure ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -e progsreiserfs-"$VER_PROGSREISERFS".tar.gz ];
|
2008-03-20 22:16:05 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
$LYNX http://reiserfs.osdn.org.ua/snapshots/progsreiserfs-"$VER_PROGSREISERFS".tar.gz
|
2008-03-20 22:16:05 +01:00
|
|
|
fi
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ -e progsreiserfs-"$VER_PROGSREISERFS".tar.gz ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
tar xzf progsreiserfs-"$VER_PROGSREISERFS".tar.gz -C "$compiledir"
|
|
|
|
cd "$compiledir"/progsreiserfs-"$VER_PROGSREISERFS" || exit 1
|
|
|
|
patch -p1 < "$pwd_saved"/progsreiserfs-journal.patch
|
|
|
|
patch -p1 < "$pwd_saved"/progsreiserfs-file-read.patch
|
|
|
|
cd "$pwd_saved" || exit 1
|
2007-10-29 22:38:52 +01:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -e "$compiledir"/progsreiserfs-"$VER_PROGSREISERFS"/Makefile ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ -e "$compiledir"/progsreiserfs-"$VER_PROGSREISERFS"/configure ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
# rm -f "$compiledir"/Makefile
|
|
|
|
cd "$compiledir"/progsreiserfs-"$VER_PROGSREISERFS" || exit 1
|
|
|
|
./configure --host="$crosscompile_target" --prefix="$prefix" --disable-nls --disable-Werror
|
|
|
|
cd "$pwd_saved" || exit 1
|
2007-10-29 22:38:52 +01:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
#vim /home/kmaster/src/testdisk/powerpc-apple-darwin/progsreiserfs-0.3.1-rc8/libtool
|
|
|
|
#%s/AR="ar"/AR="powerpc-apple-darwin-ar"/
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -e "$LIBREISER" ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ -e "$compiledir"/progsreiserfs-"$VER_PROGSREISERFS"/Makefile ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
cd "$compiledir"/progsreiserfs-"$VER_PROGSREISERFS" || exit 1
|
2010-10-23 20:07:08 +02:00
|
|
|
make $smp_mflags
|
2021-11-05 14:50:15 +01:00
|
|
|
cd "$pwd_saved" || exit 1
|
2007-10-29 22:38:52 +01:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2011-04-06 09:08:26 +02:00
|
|
|
if [ "$VER_LIBNTFS3G" != "" ];
|
|
|
|
then
|
|
|
|
CONFIGUREOPT="$CONFIGUREOPT --with-ntfs3g-lib=${PWDSRC}/ntfs-3g_ntfsprogs-${VER_LIBNTFS3G}/libntfs-3g/.libs/ --with-ntfs3g-includes=${PWDSRC}/ntfs-3g_ntfsprogs-${VER_LIBNTFS3G}/include/"
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -e "$compiledir"/ntfsprogs-$VER_LIBNTFS3G/configure ];
|
2011-04-06 09:08:26 +02:00
|
|
|
then
|
|
|
|
if [ ! -e ntfs-3g_ntfsprogs-$VER_LIBNTFS3G.tgz ];
|
|
|
|
then
|
|
|
|
$WGET http://tuxera.com/opensource/ntfs-3g_ntfsprogs-$VER_LIBNTFS3G.tgz
|
|
|
|
fi
|
|
|
|
if [ -e ntfs-3g_ntfsprogs-$VER_LIBNTFS3G.tgz ];
|
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
tar xzf ntfs-3g_ntfsprogs-$VER_LIBNTFS3G.tgz -C "$compiledir"
|
2011-04-06 09:08:26 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -e "$compiledir"/ntfs-3g_ntfsprogs-$VER_LIBNTFS3G/Makefile ];
|
2011-04-06 09:08:26 +02:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ -e "$compiledir"/ntfs-3g_ntfsprogs-$VER_LIBNTFS3G/configure ];
|
2011-04-06 09:08:26 +02:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
# rm -f "$compiledir"/Makefile
|
|
|
|
cd "$compiledir"/ntfs-3g_ntfsprogs-$VER_LIBNTFS3G || exit 1
|
2011-04-06 09:08:26 +02:00
|
|
|
case "$crosscompile_target" in
|
|
|
|
powerpc-apple-darwin|i686-apple-darwin9)
|
2021-11-05 14:50:15 +01:00
|
|
|
CC=$TESTDISKCC ./configure --host="$crosscompile_target" --prefix="$prefix" --disable-device-default-io-ops --disable-crypto --disable-ntfs-3g --disable-nfconv
|
2011-04-06 09:08:26 +02:00
|
|
|
;;
|
|
|
|
*)
|
2021-11-05 14:50:15 +01:00
|
|
|
CC=$TESTDISKCC ./configure --host="$crosscompile_target" --prefix="$prefix" --disable-device-default-io-ops --disable-crypto --disable-ntfs-3g
|
2011-04-06 09:08:26 +02:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
# --disable-default-device-io-ops is need for NT 4
|
2021-11-05 14:50:15 +01:00
|
|
|
cd "$pwd_saved" || exit 1
|
2011-04-06 09:08:26 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -e $LIBNTFS3G ];
|
2011-04-06 09:08:26 +02:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ -e "$compiledir"/ntfs-3g_ntfsprogs-$VER_LIBNTFS3G/Makefile ];
|
2011-04-06 09:08:26 +02:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
cd "$compiledir"/ntfs-3g_ntfsprogs-$VER_LIBNTFS3G || exit 1
|
2011-04-06 09:08:26 +02:00
|
|
|
# make $smp_mflags libs
|
|
|
|
make $smp_mflags
|
2021-11-05 14:50:15 +01:00
|
|
|
cd "$pwd_saved" || exit 1
|
2011-04-06 09:08:26 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2007-10-29 22:38:52 +01:00
|
|
|
if [ "$VER_NTFSPROGS" != "" ];
|
|
|
|
then
|
|
|
|
CONFIGUREOPT="$CONFIGUREOPT --with-ntfs-lib=${PWDSRC}/ntfsprogs-${VER_NTFSPROGS}/libntfs/.libs/ --with-ntfs-includes=${PWDSRC}/ntfsprogs-${VER_NTFSPROGS}/include/"
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -e "$compiledir"/ntfsprogs-"$VER_NTFSPROGS"/configure ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -e ntfsprogs-"$VER_NTFSPROGS".tar.gz ];
|
2008-03-20 22:16:05 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
$LYNX http://prdownloads.sourceforge.net/linux-ntfs/ntfsprogs-"$VER_NTFSPROGS".tar.gz
|
2008-03-20 22:16:05 +01:00
|
|
|
fi
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ -e ntfsprogs-"$VER_NTFSPROGS".tar.gz ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
tar xzf ntfsprogs-"$VER_NTFSPROGS".tar.gz -C "$compiledir"
|
2007-10-29 22:38:52 +01:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -e "$compiledir"/ntfsprogs-"$VER_NTFSPROGS"/Makefile ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ -e "$compiledir"/ntfsprogs-"$VER_NTFSPROGS"/configure ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
# rm -f "$compiledir"/Makefile
|
|
|
|
cd "$compiledir"/ntfsprogs-"$VER_NTFSPROGS" || exit 1
|
2007-10-29 22:38:52 +01:00
|
|
|
# --disable-default-device-io-ops is need for NT 4
|
2021-11-05 14:50:15 +01:00
|
|
|
./configure --host="$crosscompile_target" --prefix="$prefix" --disable-default-device-io-ops --disable-crypto
|
|
|
|
cd "$pwd_saved" || exit 1
|
2007-10-29 22:38:52 +01:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -e "$LIBNTFS" ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ -e "$compiledir"/ntfsprogs-"$VER_NTFSPROGS"/Makefile ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
cd "$compiledir"/ntfsprogs-"$VER_NTFSPROGS" || exit 1
|
2010-10-23 20:07:08 +02:00
|
|
|
make $smp_mflags libs
|
2021-11-05 14:50:15 +01:00
|
|
|
cd "$pwd_saved" || exit 1
|
2007-10-29 22:38:52 +01:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$VER_LIBEWF" != "" ];
|
|
|
|
then
|
|
|
|
CONFIGUREOPT="$CONFIGUREOPT --with-ewf-lib=${PWDSRC}/libewf-${VER_LIBEWF}/libewf/.libs/ --with-ewf-includes=${PWDSRC}/libewf-${VER_LIBEWF}/include/"
|
|
|
|
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -e "$compiledir"/libewf-"$VER_LIBEWF"/configure ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -e libewf-"$VER_LIBEWF".tar.gz ] && [ ! -e libewf-alpha-"$VER_LIBEWF".tar.gz ] && [ ! -e libewf-beta-"$VER_LIBEWF".tar.gz ];
|
2011-04-03 17:42:18 +02:00
|
|
|
then
|
2011-03-19 13:58:05 +01:00
|
|
|
$LYNX "http://sourceforge.net/project/platformdownload.php?group_id=167783"
|
2008-03-20 22:16:05 +01:00
|
|
|
fi
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ -e libewf-"$VER_LIBEWF".tar.gz ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
tar xzf libewf-"$VER_LIBEWF".tar.gz -C "$compiledir"
|
2007-10-29 22:38:52 +01:00
|
|
|
fi
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ -e libewf-alpha-"$VER_LIBEWF".tar.gz ];
|
2011-03-19 13:58:05 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
tar xzf libewf-alpha-"$VER_LIBEWF".tar.gz -C "$compiledir"
|
2011-03-19 13:58:05 +01:00
|
|
|
fi
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ -e libewf-beta-"$VER_LIBEWF".tar.gz ];
|
2008-03-20 22:16:05 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
tar xzf libewf-beta-"$VER_LIBEWF".tar.gz -C "$compiledir"
|
2008-03-20 22:16:05 +01:00
|
|
|
fi
|
2007-10-29 22:38:52 +01:00
|
|
|
fi
|
|
|
|
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -e "$compiledir"/libewf-"$VER_LIBEWF"/Makefile ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ -e "$compiledir"/libewf-"$VER_LIBEWF"/configure ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
# rm -f "$compiledir"/Makefile
|
|
|
|
cd "$compiledir"/libewf-"$VER_LIBEWF" || exit 1
|
|
|
|
CC=$TESTDISKCC ./configure --host="$crosscompile_target" --prefix="$prefix"
|
|
|
|
cd "$pwd_saved" || exit 1
|
2007-10-29 22:38:52 +01:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -e "$LIBEWF" ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ -e "$compiledir"/libewf-"$VER_LIBEWF"/Makefile ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
cd "$compiledir"/libewf-"$VER_LIBEWF" || exit 1
|
2010-10-23 20:07:08 +02:00
|
|
|
make $smp_mflags lib
|
2021-11-05 14:50:15 +01:00
|
|
|
cd "$pwd_saved" || exit 1
|
2007-10-29 22:38:52 +01:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Try to compile TestDisk"
|
|
|
|
CC=$TESTDISKCC
|
|
|
|
export CC
|
|
|
|
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ -d "$compiledir" ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ ! -e "$compiledir"/Makefile ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
cd "$compiledir" || exit 1
|
2007-11-28 22:42:36 +01:00
|
|
|
case "$crosscompile_target" in
|
|
|
|
powerpc-apple-darwin)
|
2007-10-29 22:38:52 +01:00
|
|
|
# libewf should work under MacOSX but it hasn't been tested
|
2021-11-05 14:50:15 +01:00
|
|
|
# use --with-ncurses-lib="$prefix"/usr/lib to get binaries that don't need libncurses
|
2008-06-30 07:53:31 +02:00
|
|
|
# but users may be unable to navigate...
|
2021-11-05 14:50:15 +01:00
|
|
|
"$confdir"/configure --host="$crosscompile_target" --prefix="$prefix" $CONFIGUREOPT --without-ewf --enable-sudo --with-sudo-bin=/usr/bin/sudo --disable-qt --disable-assert --enable-record-compilation-date
|
2007-11-28 22:42:36 +01:00
|
|
|
;;
|
2009-12-11 08:56:51 +01:00
|
|
|
i686-apple-darwin9)
|
2021-11-05 14:50:15 +01:00
|
|
|
"$confdir"/configure --host="$crosscompile_target" --prefix="$prefix" $CONFIGUREOPT --enable-sudo --with-sudo-bin=/usr/bin/sudo --disable-qt --disable-stack-protector --enable-record-compilation-date
|
2009-12-11 08:56:51 +01:00
|
|
|
;;
|
2007-11-28 22:42:36 +01:00
|
|
|
i586-pc-msdosdjgpp)
|
2021-11-05 14:50:15 +01:00
|
|
|
"$confdir"/configure --host="$crosscompile_target" --prefix="$prefix" $CONFIGUREOPT --without-ewf --without-iconv --disable-qt --enable-record-compilation-date
|
2007-11-28 22:42:36 +01:00
|
|
|
;;
|
2008-04-02 23:47:50 +02:00
|
|
|
i386-mingw32)
|
2021-11-05 14:50:15 +01:00
|
|
|
"$confdir"/configure --host="$crosscompile_target" --prefix="$prefix" $CONFIGUREOPT --without-iconv --enable-missing-uuid-ok --enable-record-compilation-date
|
2008-04-02 23:47:50 +02:00
|
|
|
;;
|
2012-05-21 08:41:50 +02:00
|
|
|
i686-pc-mingw32|x86_64-pc-mingw32|i686-w64-mingw32|x86_64-w64-mingw32)
|
2021-11-05 14:50:15 +01:00
|
|
|
"$confdir"/configure --host="$crosscompile_target" --prefix="$prefix" $CONFIGUREOPT --enable-missing-uuid-ok --enable-qt --enable-record-compilation-date
|
2010-09-11 17:58:22 +02:00
|
|
|
;;
|
2010-01-24 13:19:16 +01:00
|
|
|
arm-marvell-linux-gnu)
|
2021-11-05 14:50:15 +01:00
|
|
|
"$confdir"/configure --host="$crosscompile_target" --prefix="$prefix" $CONFIGUREOPT --without-ewf --without-ntfs --disable-qt --enable-record-compilation-date
|
2013-10-20 12:26:19 +02:00
|
|
|
;;
|
2021-05-09 08:46:39 +02:00
|
|
|
arm-none-linux-gnueabi|powerpc-linux-gnuspe|aarch64-QNAP-linux-gnu)
|
2021-11-05 14:50:15 +01:00
|
|
|
"$confdir"/configure --host="$crosscompile_target" --prefix="$prefix" $CONFIGUREOPT --without-ntfs --disable-qt --enable-record-compilation-date
|
2010-01-24 13:19:16 +01:00
|
|
|
;;
|
2016-09-13 20:05:14 +02:00
|
|
|
*cygwin*)
|
2021-11-05 14:50:15 +01:00
|
|
|
"$confdir"/configure --host="$crosscompile_target" --prefix="$prefix" $CONFIGUREOPT --enable-missing-uuid-ok --enable-record-compilation-date
|
2016-09-13 20:05:14 +02:00
|
|
|
;;
|
2007-11-28 22:42:36 +01:00
|
|
|
*)
|
2021-11-05 14:50:15 +01:00
|
|
|
"$confdir"/configure --host="$crosscompile_target" --prefix="$prefix" $CONFIGUREOPT --enable-record-compilation-date
|
2007-11-28 22:42:36 +01:00
|
|
|
;;
|
|
|
|
esac
|
2021-11-05 14:50:15 +01:00
|
|
|
cd "$pwd_saved" || exit 1
|
2007-10-29 22:38:52 +01:00
|
|
|
fi
|
2021-11-05 14:50:15 +01:00
|
|
|
if [ -e "$compiledir"/Makefile ];
|
2007-10-29 22:38:52 +01:00
|
|
|
then
|
2021-11-05 14:50:15 +01:00
|
|
|
cd "$compiledir" || exit 1
|
2010-10-23 20:07:08 +02:00
|
|
|
make $smp_mflags
|
2021-11-05 14:50:15 +01:00
|
|
|
cd "$pwd_saved" || exit 1
|
2007-10-29 22:38:52 +01:00
|
|
|
fi
|
|
|
|
fi
|