Skip to content

Commit

Permalink
add verbose option
Browse files Browse the repository at this point in the history
  • Loading branch information
vtorri committed Jun 11, 2019
1 parent 87c0c4e commit 237283e
Show file tree
Hide file tree
Showing 62 changed files with 109 additions and 81 deletions.
12 changes: 12 additions & 0 deletions common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# $5 : jobopt
# $6 : verbose

verbose=$6

set -e

unset PKG_CONFIG_PATH
Expand All @@ -29,6 +31,16 @@ export CFLAGS="-O2 -pipe -march=$1"
export CXXFLAGS="-O2 -pipe -march=$1"
export LDFLAGS="-L$3/lib -s"

if test "x${verbose}" = "xyes" ; then
verbmake="V=1"
verbcmake="ON"
verbninja="-v"
verbff="V=1"
else
verbmake="V=0"
verbcmake="OFF"
fi

case $2 in
*.git)
bn=`basename $2`
Expand Down
58 changes: 37 additions & 21 deletions ewpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ typedef struct
int vrev;
char *url;
char *tarname;
const char *taropt;
int deps_count;
char **deps;
unsigned int downloaded : 1;
Expand Down Expand Up @@ -116,6 +115,7 @@ _ew_usage(const char *argv0)
printf(" [default=x86_64-w64-mingw32]\n");
printf(" --arch=VAL value passed to -march and -mtune gcc options\n");
printf(" [default=i686|x86-64], depending on host value\n");
printf(" --verbose verbose mode\n");
printf(" --efl install the EFL\n");
printf(" --jobs=VAL maximum number of used jobs [default=maximum]\n");
printf(" --clean remove the archives and the created directories\n");
Expand Down Expand Up @@ -454,12 +454,6 @@ _ew_packages_fill(Map *map, Package *pkg)
tarname++;
if (strcmp(tarname, "git") == 0)
pkg->is_git = 1;
else if ((strcmp(tarname, "gz") == 0) || (strcmp(tarname, "tgz") == 0))
pkg->taropt = "zf";
else if (strcmp(tarname, "bz2") == 0)
pkg->taropt = "jf";
else
pkg->taropt = "Jf";
}
else if (EWPI_DEPS(iter))
{
Expand Down Expand Up @@ -1014,7 +1008,7 @@ _ew_packages_status_disp(int i, int count, const char *name, const char* version
}

static void
_ew_packages_extract(void)
_ew_packages_extract(int verbose)
{
char buf[4096];
Package *iter;
Expand Down Expand Up @@ -1046,7 +1040,9 @@ _ew_packages_extract(void)
{
const char *name;
const char *tarname;
const char *taropt;
const char *ext;
char taropt[5];
int idx;
int ret;

iter = _ewpi_pkgs + _ew_package_index[i];
Expand All @@ -1055,7 +1051,23 @@ _ew_packages_extract(void)

name = iter->name;
tarname = iter->tarname;
taropt = iter->taropt;
ext = strrchr(tarname, '.');
ext++;

idx = 0;
if (verbose)
taropt[idx++] = 'v';
if ((strcmp(ext, "gz") == 0) || (strcmp(ext, "tgz") == 0))
taropt[idx++] = 'z';
else if (strcmp(ext, "bz2") == 0)
taropt[idx++] = 'j';
else
{
taropt[idx++] = 'J';
taropt[idx++] = 'h';
}
taropt[idx++] = 'f';
taropt[idx++] = '\0';

_ew_packages_status_disp(c, count, name, iter->version);

Expand Down Expand Up @@ -1088,7 +1100,7 @@ _ew_packages_extract(void)
}

static void
_ew_packages_install(const char *prefix, const char *host, const char *arch, const char *jobopt)
_ew_packages_install(const char *prefix, const char *host, const char *arch, const char *jobopt, int verbose)
{
char buf[4096];
Package *iter;
Expand All @@ -1105,7 +1117,6 @@ _ew_packages_install(const char *prefix, const char *host, const char *arch, con
{
const char *name;
const char *tarname;
const char *taropt;
int ret;

iter = _ewpi_pkgs + _ew_package_index[i];
Expand All @@ -1114,14 +1125,13 @@ _ew_packages_install(const char *prefix, const char *host, const char *arch, con

name = iter->name;
tarname = iter->tarname;
taropt = iter->taropt;

_ew_packages_status_disp(c, _ew_package_count_not_installed, name, iter->version);

snprintf(buf, 4095,
"cd %s/%s && sh ./install.sh %s %s %s %s %s %s",
_ew_package_dir_dst, name,
arch, tarname, prefix, host, jobopt, "1");
arch, tarname, prefix, host, jobopt, verbose ? "yes" : "no");
ret = system(buf);
if (ret != 0)
{
Expand Down Expand Up @@ -1248,6 +1258,7 @@ int main(int argc, char *argv[])
char *host = "x86_64-w64-mingw32";
char *arch = NULL;;
char *jobopt = "";
int verbose = 0;
int efl = 0;
int cleaning = 0;
int ret;
Expand Down Expand Up @@ -1282,6 +1293,10 @@ int main(int argc, char *argv[])
{
arch = argv[i] + strlen("--arch=");
}
else if (strcmp(argv[i], "--verbose") == 0)
{
verbose = 1;
}
else if (strcmp(argv[i], "--efl") == 0)
{
efl = 1;
Expand Down Expand Up @@ -1339,11 +1354,12 @@ int main(int argc, char *argv[])
}

printf(":: Configuration...\n");
printf(" prefix: %s\n", prefix);
printf(" host: %s\n", host);
printf(" arch: %s\n", arch);
printf(" efl: %s\n", efl ? "yes" : "no");
printf(" jobs: %s\n", jobopt);
printf(" prefix: %s\n", prefix);
printf(" host: %s\n", host);
printf(" arch: %s\n", arch);
printf(" verbose: %s\n", verbose ? "yes" : "no");
printf(" efl: %s\n", efl ? "yes" : "no");
printf(" jobs: %s\n", jobopt);
printf("\n");
fflush(stdout);

Expand Down Expand Up @@ -1381,8 +1397,8 @@ int main(int argc, char *argv[])
_ew_packages_not_installed_disp();
_ew_packages_download();
_ew_packages_longest_name();
_ew_packages_extract();
_ew_packages_install(prefix, host, arch, jobopt);
_ew_packages_extract(verbose);
_ew_packages_install(prefix, host, arch, jobopt, verbose);
if (cleaning)
_ew_packages_clean();

Expand Down
2 changes: 1 addition & 1 deletion packages/bullet/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export LDFLAGS="$machine $LDFLAGS"
cmake \
-DCMAKE_TOOLCHAIN_FILE=cross_toolchain.txt \
-DCMAKE_INSTALL_PREFIX=$prefix_unix \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=$verbcmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS="-I$EWPI_PWD/src -I.. -O2 -pipe -march=$1" \
-DCMAKE_CXX_FLAGS="-I$EWPI_PWD/src -I.. -O2 -pipe -march=$1" \
Expand Down
2 changes: 1 addition & 1 deletion packages/cairo/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source ../../common.sh

./configure --prefix=$3 --host=$4 --disable-static --disable-xlib --disable-quartz --disable-png --enable-ft --disable-gtk-doc-html --disable-ps --disable-pdf --disable-svg > ../config.log 2>&1

make -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/cares/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export CPPFLAGS="-D_WIN32_WINNT=0x0600 $CPPFLAGS"

./configure --prefix=$3 --host=$4 --disable-static > ../config.log 2>&1

make V=0 -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/check/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source ../../common.sh

./configure --prefix=$3 --host=$4 --disable-static --disable-subunit > ../config.log 2>&1

make -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/curl/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source ../../common.sh

./configure --prefix=$3 --host=$4 --disable-static --with-zlib --with-openssl --with-libssh2 > ../config.log 2>&1

make -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/dbus/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ sed -i -e 's/-m 700//g' test/Makefile.in

./configure --prefix=$3 --host=$4 --disable-static --disable-embedded-tests --disable-modular-tests --disable-tests --with-dbus-session-bus-default-address=autolaunch: > ../config.log 2>&1

make -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/expat/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source ../../common.sh

./configure --prefix=$3 --host=$4 --disable-static --with-docbook=no --without-xmlwf > ../config.log 2>&1

make -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/ffmpeg/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ fi
--enable-libxml2 \
> ../config.log 2>&1

make -j $5 install > ../make.log 2>&1
make -j $5 $verbff install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/flac/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export LIBS="-L$3/lib -liconv"

./configure --prefix=$3 --host=$4 --disable-static --with-libiconv-prefix=$3 --disable-cpplibs > ../config.log 2>&1

make -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
3 changes: 1 addition & 2 deletions packages/fontconfig/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

source ../../common.sh

sed -i -e 's/@INTLLIBS@/@LTLIBINTL@/g' src/Makefile.in
sed -i -e 's/po-conf test/po-conf/g' Makefile.in

# for fontconfig DLL
export PATH=${EWPI_PWD}/src/.libs:$PATH

./configure --prefix=$3 --host=$4 --disable-static --enable-iconv --with-libiconv=$3 --with-expat=$3 --disable-docs > ../config.log 2>&1

make -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/freetype/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source ../../common.sh

./configure --prefix=$3 --host=$4 --disable-static > ../config.log 2>&1

make -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/freetype_bootstrap/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source ../../common.sh

./configure --prefix=$3 --host=$4 --disable-static --with-harfbuzz=no --with-bzip2=no > ../config.log 2>&1

make -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/fribidi/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export CPPFLAGS="-DFRIBIDI_ENTRY='__declspec(dllexport)'"

./configure --prefix=$3 --host=$4 --disable-static --disable-debug --disable-deprecated > ../config.log 2>&1

make -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/gettext/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ cd gettext-runtime

./configure --prefix=$3 --host=$4 --disable-static --disable-c++ --disable-java --disable-native-java --enable-threads=windows --disable-rpath --disable-libasprintf --disable-curses --disable-acl --with-libiconv-prefix=$3 --with-libunistring-prefix=$3 > ../../config.log 2>&1

make -j $5 install > ../../make.log 2>&1
make -j $5 $verbmake install > ../../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/giflib/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source ../../common.sh

./configure --prefix=$3 --host=$4 --disable-static > ../config.log 2>&1

make -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/glib2/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ meson .. \
--default-library shared \
-Dinternal_pcre=true > ../../config.log 2>&1

ninja install > ../../make.log 2>&1
ninja $verbninja install > ../../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/graphene/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ meson .. \
--default-library shared \
-Dintrospection=false > ../../config.log 2>&1

ninja -v install > ../../make.log 2>&1
ninja $verbninja install > ../../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/graphite2/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export LDFLAGS="$machine $LDFLAGS"
cmake \
-DCMAKE_TOOLCHAIN_FILE=cross_toolchain.txt \
-DCMAKE_INSTALL_PREFIX=$prefix_unix \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=$verbcmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS="-I../src -I../include -O2 -pipe -march=$1" \
-DCMAKE_CXX_FLAGS="-I../src -I../include -O2 -pipe -march=$1" \
Expand Down
2 changes: 1 addition & 1 deletion packages/gst-plugins-base/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ meson .. \
--cross-file ../cross_toolchain.txt \
--default-library shared > ../../config.log 2>&1

ninja install > ../../make.log 2>&1
ninja $verbninja install > ../../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/gst-plugins-good/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ meson .. \
--cross-file ../cross_toolchain.txt \
--default-library shared > ../../config.log 2>&1

ninja install > ../../make.log 2>&1
ninja $verbninja install > ../../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/gstreamer/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ meson .. \
--default-library shared \
-Ddisable_gst_debug=true > ../../config.log 2>&1

ninja install > ../../make.log 2>&1
ninja $verbninja install > ../../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/harfbuzz/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source ../../common.sh

./configure --prefix=$3 --host=$4 --disable-static --with-glib=no --disable-gtk-doc-html --disable-gtk-doc-pdf --with-cairo=no --with-fontconfig=no --with-freetype=yes --with-graphite2=yes --with-icu=yes > ../config.log 2>&1

make -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/lcms2/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source ../../common.sh

./configure --prefix=$3 --host=$4 --disable-static > ../config.log 2>&1

make -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/libaacs/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source ../../common.sh

./configure --prefix=$3 --host=$4 --disable-static > ../config.log 2>&1

make V=0 -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/libbdplus/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source ../../common.sh

./configure --prefix=$3 --host=$4 --disable-static > ../config.log 2>&1

make V=0 -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/libbluray/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source ../../common.sh

./configure --prefix=$3 --host=$4 --disable-static --disable-bdjava-jar > ../config.log 2>&1

make -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/libgcrypt/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source ../../common.sh

./configure --prefix=$3 --host=$4 --disable-static > ../config.log 2>&1

make V=0 -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
1 change: 1 addition & 0 deletions packages/libgme/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ echo $prefix_unix>../config.log 2>&1
cmake \
-DCMAKE_TOOLCHAIN_FILE=cross_toolchain.txt \
-DCMAKE_INSTALL_PREFIX=$prefix_unix \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=$verbcmake \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS="-I.. -O2 -pipe -march=$1" \
Expand Down
2 changes: 1 addition & 1 deletion packages/libgpg-error/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source ../../common.sh

./configure --prefix=$3 --host=$4 --disable-static > ../config.log 2>&1

make V=0 -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/libidn2/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source ../../common.sh

./configure --prefix=$3 --host=$4 --disable-static --with-libunistring-prefix=$3 --with-libiconv-prefix=$3 --disable-doc > ../config.log 2>&1

make -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/libjpeg/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export LDFLAGS="$machine $LDFLAGS"
cmake \
-DCMAKE_TOOLCHAIN_FILE=cross_toolchain.txt \
-DCMAKE_INSTALL_PREFIX=$prefix_unix \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=$verbcmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS="-I.. -O2 -pipe -march=$1" \
-DCMAKE_EXE_LINKER_FLAGS="-s" \
Expand Down
2 changes: 1 addition & 1 deletion packages/libogg/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source ../../common.sh

./configure --prefix=$3 --host=$4 --disable-static >> ../config.log 2>&1

make -j $5 install > ../make.log 2>&1
make -j $5 $verbmake install > ../make.log 2>&1
2 changes: 1 addition & 1 deletion packages/libopenh264/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ meson .. \
--cross-file ../cross_toolchain.txt \
--default-library shared > ../../config.log 2>&1

ninja install > ../../make.log 2>&1
ninja $verbninja install > ../../make.log 2>&1
Loading

0 comments on commit 237283e

Please sign in to comment.