.ci/fail.sh | 12 ++++++++++++ .circleci/config.yml | 13 +++++++++---- .collect_logs | 6 ------ .travis.yml | 6 +++--- RELEASING.md | 28 +--------------------------- appveyor.yml | 2 +- mingw32.sh | 22 ++++++++++++++++++++++ mingw64.sh | 22 ++++++++++++++++++++++ src/hb-private.hh | 11 +++++++++++ 9 files changed, 81 insertions(+), 41 deletions(-)
New commits: commit b1f186df78ed14cbc8be919e7f552df2bd7561e0 Author: Behdad Esfahbod <[email protected]> Date: Fri Feb 16 14:13:38 2018 -0800 Add mingw32.sh and mingw64.sh diff --git a/RELEASING.md b/RELEASING.md index 1863c6e3..47d82ba1 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -35,7 +35,7 @@ HarfBuzz release walk-through checklist: a. Put contents of [this](https://drive.google.com/open?id=0B3_fQkxDZZXXbWltRGd5bjVrUDQ) on your `~/.local/i686-w64-mingw32`, - b. Run `./MING32 --with-uniscribe` script (available below) to configure harfbuzz with mingw in a subdirector (eg. winbuild/), + b. Run `../[mingw32.sh](./mingw32.sh) --with-uniscribe` script (available below) to configure harfbuzz with mingw in a subdirector (eg. winbuild/), c. make @@ -63,32 +63,6 @@ HarfBuzz release walk-through checklist: edit the tag, upload artefacts and NEWS entry and save. -## MING32 -```bash -#!/bin/bash - -target=i686-w64-mingw32 - -unset CC -unset CXX -unset CPP -unset LD -unset LDFLAGS -unset CFLAGS -unset CXXFLAGS -unset PKG_CONFIG_PATH - -# Removed -static from the following -export CFLAGS="-static-libgcc" -export CXXFLAGS="-static-libgcc -static-libstdc++" -export CPPFLAGS=-I$HOME/.local/$target/include -export LDFLAGS=-L$HOME/.local/$target/lib -export PKG_CONFIG_LIBDIR=$HOME/.local/$target/lib/pkgconfig -export PATH=$HOME/.local/$target/bin:$PATH - -../configure --build=`../config.guess` --host=$target --prefix=$HOME/.local/$target "$@" -``` - ## UPDATE.sh ```bash #!/bin/bash diff --git a/mingw32.sh b/mingw32.sh new file mode 100755 index 00000000..67744051 --- /dev/null +++ b/mingw32.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +target=i686-w64-mingw32 + +unset CC +unset CXX +unset CPP +unset LD +unset LDFLAGS +unset CFLAGS +unset CXXFLAGS +unset PKG_CONFIG_PATH + +# Removed -static from the following +export CFLAGS="-static-libgcc" +export CXXFLAGS="-static-libgcc -static-libstdc++" +export CPPFLAGS="-I$HOME/.local/$target/include -O2" +export LDFLAGS=-L$HOME/.local/$target/lib +export PKG_CONFIG_LIBDIR=$HOME/.local/$target/lib/pkgconfig +export PATH=$HOME/.local/$target/bin:$PATH + +../configure --build=`../config.guess` --host=$target --prefix=$HOME/.local/$target "$@" diff --git a/mingw64.sh b/mingw64.sh new file mode 100755 index 00000000..49a14317 --- /dev/null +++ b/mingw64.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +target=x86_64-w64-mingw32 + +unset CC +unset CXX +unset CPP +unset LD +unset LDFLAGS +unset CFLAGS +unset CXXFLAGS +unset PKG_CONFIG_PATH + +# Removed -static from the following +export CFLAGS="-static-libgcc" +export CXXFLAGS="-static-libgcc -static-libstdc++" +export CPPFLAGS="-I$HOME/.local/$target/include -O2" +export LDFLAGS=-L$HOME/.local/$target/lib +export PKG_CONFIG_LIBDIR=$HOME/.local/$target/lib/pkgconfig +export PATH=$HOME/.local/$target/bin:$PATH + +../configure --build=`../config.guess` --host=$target --prefix=$HOME/.local/$target "$@" commit d37310ac5d5f8a3fd1ce1e535647e7c6bb0d7926 Author: Arkady Shapkin <[email protected]> Date: Fri Feb 16 21:45:08 2018 +0300 Remove checking macros __OPTIMIZE__ for MSVC Visual C++ compiler doesn't define macros __OPTIMIZE__ when optimizations enabled diff --git a/src/hb-private.hh b/src/hb-private.hh index 0738b995..aeed58ae 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -355,9 +355,9 @@ _hb_bit_storage (unsigned int number) { #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__) return likely (number) ? (sizeof (unsigned int) * 8 - __builtin_clz (number)) : 0; -#elif defined(_MSC_VER) && defined(__OPTIMIZE__) +#elif defined(_MSC_VER) unsigned long where; - if (_BitScanReverse(&where, number)) return 1 + where; + if (_BitScanReverse (&where, number)) return 1 + where; return 0; #else unsigned int n_bits = 0; @@ -375,11 +375,10 @@ _hb_ctz (unsigned int number) { #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__) return likely (number) ? __builtin_ctz (number) : 0; -#elif defined(_MSC_VER) && defined(__OPTIMIZE__) +#elif defined(_MSC_VER) unsigned long where; - if (_BitScanForward(&where, n)) return where; + if (_BitScanForward (&where, number)) return where; return 0; -} #else unsigned int n_bits = 0; if (unlikely (!number)) return 0; commit 4eff0fc5b87084765ac2e36ba9f09d7d257f32fb Author: Khaled Hosny <[email protected]> Date: Fri Feb 16 20:22:52 2018 +0200 Make this work for old versions of automake diff --git a/.ci/fail.sh b/.ci/fail.sh index c4687108..91701d33 100755 --- a/.ci/fail.sh +++ b/.ci/fail.sh @@ -1,7 +1,8 @@ #!/bin/bash for f in $(find . -name '*.log' -not -name 'config.log'); do - if [[ $(tail -1 $f) = FAIL* ]]; then + last=$(tail -1 $f) + if [[ $last = FAIL* || $last = *failed* ]]; then echo '====' $f '====' cat $f fi commit f8077c97909778c117d37773c9da570d831dacd2 Author: Khaled Hosny <[email protected]> Date: Thu Feb 15 11:47:08 2018 +0200 Print only the failed log diff --git a/.ci/fail.sh b/.ci/fail.sh index 5f4b6415..c4687108 100755 --- a/.ci/fail.sh +++ b/.ci/fail.sh @@ -1,8 +1,10 @@ #!/bin/bash for f in $(find . -name '*.log' -not -name 'config.log'); do - echo '====' $f '====' - cat $f + if [[ $(tail -1 $f) = FAIL* ]]; then + echo '====' $f '====' + cat $f + fi done # Intentionally exiting with non-zero. commit 8e3b4c0e11642470069b866a73768a866ac3fdb3 Author: Khaled Hosny <[email protected]> Date: Thu Feb 15 11:25:24 2018 +0200 Simplify calls to collect-logs.sh diff --git a/.ci/collect-logs.sh b/.ci/fail.sh similarity index 71% rename from .ci/collect-logs.sh rename to .ci/fail.sh index a3d46a48..5f4b6415 100755 --- a/.ci/collect-logs.sh +++ b/.ci/fail.sh @@ -4,3 +4,6 @@ for f in $(find . -name '*.log' -not -name 'config.log'); do echo '====' $f '====' cat $f done + +# Intentionally exiting with non-zero. +exit 1 diff --git a/.circleci/config.yml b/.circleci/config.yml index 28b63160..28b5f7ce 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,10 @@ jobs: - checkout - run: apt update && apt install -y ninja-build binutils libtool autoconf automake make cmake gcc g++ pkg-config ragel gtk-doc-tools libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip - run: pip install fonttools - - run: ./autogen.sh && (make distcheck || (cd harfbuzz-* && ../.ci/collect-logs.sh && false)) && rm -rf harfbuzz-* + - run: ./autogen.sh + - run: make + - run: make distcheck || .ci/fail.sh + - run: rm -rf harfbuzz-* - run: make distdir && cd harfbuzz-* && cmake -DHB_CHECK=ON -Bbuild -H. -GNinja && ninja -Cbuild && CTEST_OUTPUT_ON_FAILURE=1 ninja -Cbuild test && ninja -Cbuild install alpine: @@ -19,7 +22,8 @@ jobs: - checkout - run: apk update && apk add ragel make pkgconfig libtool autoconf automake gettext gcc g++ glib-dev freetype-dev cairo-dev - run: ./autogen.sh - - run: make && (make check || (.ci/collect-logs.sh && false)) + - run: make + - run: make check || .ci/fail.sh archlinux: docker: @@ -28,7 +32,8 @@ jobs: - checkout - run: pacman --noconfirm -Syu freetype2 cairo icu gettext gobject-introspection gcc gcc-libs glib2 graphite pkg-config ragel python - run: ./autogen.sh --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2 - - run: make && (make check || (.ci/collect-logs.sh && false)) + - run: make + - run: make check || .ci/fail.sh fedora-outoftreebuild: docker: @@ -37,7 +42,7 @@ jobs: - checkout - run: dnf install -y pkg-config ragel gcc gcc-c++ automake autoconf libtool make which glib2-devel freetype-devel cairo-devel libicu-devel gobject-introspection-devel graphite2-devel redhat-rpm-config python || true - run: NOCONFIGURE=1 ./autogen.sh --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2 - - run: mkdir build && cd build && ../configure && make && (make check || (.ci/collect-logs.sh && false)) + - run: mkdir build && cd build && ../configure && make && (make check || ../.ci/fail.sh) cmake-gcc: docker: diff --git a/.travis.yml b/.travis.yml index a68ef7dc..04f1cdcb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ matrix: - ./autogen.sh - ./configure $CONFIGURE_OPTS --enable-gtk-doc - make - - make check || (.ci/collect-logs.sh && false) + - make check || .ci/fail.sh after_success: - bash .ci/run-coveralls.sh # for coveralls.io code coverage tracking - bash .ci/deploy-docs.sh @@ -43,7 +43,7 @@ matrix: - ./autogen.sh - ./configure $CONFIGURE_OPTS - make - - make check || (.ci/collect-logs.sh && false) + - make check || .ci/fail.sh - os: osx compiler: clang @@ -59,7 +59,7 @@ matrix: - ./autogen.sh - ./configure $CONFIGURE_OPTS --with-coretext - make - - make check || (.ci/collect-logs.sh && false) + - make check || .ci/fail.sh notifications: irc: "irc.freenode.org#harfbuzz" diff --git a/appveyor.yml b/appveyor.yml index 63e711fe..9bed1247 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -44,7 +44,7 @@ build_script: - 'if "%compiler%"=="msvc" if not "%platform%"=="ARM" ctest --output-on-failure -C %configuration%' - 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-$MSYS2_ARCH-{freetype,cairo,icu,gettext,gobject-introspection,gcc,gcc-libs,glib2,graphite2,pkg-config,python2}"' - - 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; PATH=$PATH:/mingw64/bin:/mingw32/bin; ./autogen.sh --with-uniscribe --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2 --build=%MINGW_CHOST% --host=%MINGW_CHOST% --prefix=%MINGW_PREFIX%; make; make check || (.ci/collect-logs.sh && false)"' + - 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; PATH=$PATH:/mingw64/bin:/mingw32/bin; ./autogen.sh --with-uniscribe --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2 --build=%MINGW_CHOST% --host=%MINGW_CHOST% --prefix=%MINGW_PREFIX%; make; make check || .ci/fail.sh"' cache: - c:\tools\vcpkg\installed\ commit 139c9928f6152088fa6eee0279e33cb821aeb541 Author: Ebrahim Byagowi <[email protected]> Date: Fri Feb 16 13:27:26 2018 +0330 Fix hb-private.hh compile issue diff --git a/src/hb-private.hh b/src/hb-private.hh index 22948ae5..0738b995 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -355,7 +355,7 @@ _hb_bit_storage (unsigned int number) { #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__) return likely (number) ? (sizeof (unsigned int) * 8 - __builtin_clz (number)) : 0; -#elif defined_MSC_VER) && defined(__OPTIMIZE__) +#elif defined(_MSC_VER) && defined(__OPTIMIZE__) unsigned long where; if (_BitScanReverse(&where, number)) return 1 + where; return 0; @@ -375,7 +375,7 @@ _hb_ctz (unsigned int number) { #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__) return likely (number) ? __builtin_ctz (number) : 0; -#elif defined_MSC_VER) && defined(__OPTIMIZE__) +#elif defined(_MSC_VER) && defined(__OPTIMIZE__) unsigned long where; if (_BitScanForward(&where, n)) return where; return 0; commit 6c10328eb88b0641586f31a782b63f45eada5609 Author: Arkady Shapkin <[email protected]> Date: Thu Feb 15 23:17:46 2018 +0300 Use _BitScanForward and _BitScanReverse on MSVC diff --git a/src/hb-private.hh b/src/hb-private.hh index 6430ba8e..22948ae5 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -51,6 +51,9 @@ #include <stdio.h> #include <stdarg.h> +#if defined(_MSC_VER) +#include <intrin.h> +#endif #define HB_PASTE1(a,b) a##b #define HB_PASTE(a,b) HB_PASTE1(a,b) @@ -352,6 +355,10 @@ _hb_bit_storage (unsigned int number) { #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__) return likely (number) ? (sizeof (unsigned int) * 8 - __builtin_clz (number)) : 0; +#elif defined_MSC_VER) && defined(__OPTIMIZE__) + unsigned long where; + if (_BitScanReverse(&where, number)) return 1 + where; + return 0; #else unsigned int n_bits = 0; while (number) { @@ -368,6 +375,11 @@ _hb_ctz (unsigned int number) { #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__) return likely (number) ? __builtin_ctz (number) : 0; +#elif defined_MSC_VER) && defined(__OPTIMIZE__) + unsigned long where; + if (_BitScanForward(&where, n)) return where; + return 0; +} #else unsigned int n_bits = 0; if (unlikely (!number)) return 0; commit 23d21a74b55eaf6d6d367097099e6b3bb78bae37 Author: Khaled Hosny <[email protected]> Date: Thu Feb 15 02:52:15 2018 +0200 Move collect_logs to .ci dir Next to other CI scripts. diff --git a/.collect_logs b/.ci/collect-logs.sh similarity index 100% rename from .collect_logs rename to .ci/collect-logs.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 4788f0b0..28b63160 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ jobs: - checkout - run: apt update && apt install -y ninja-build binutils libtool autoconf automake make cmake gcc g++ pkg-config ragel gtk-doc-tools libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip - run: pip install fonttools - - run: ./autogen.sh && (make distcheck || (cd harfbuzz-* && ../.collect_logs && false)) && rm -rf harfbuzz-* + - run: ./autogen.sh && (make distcheck || (cd harfbuzz-* && ../.ci/collect-logs.sh && false)) && rm -rf harfbuzz-* - run: make distdir && cd harfbuzz-* && cmake -DHB_CHECK=ON -Bbuild -H. -GNinja && ninja -Cbuild && CTEST_OUTPUT_ON_FAILURE=1 ninja -Cbuild test && ninja -Cbuild install alpine: @@ -19,7 +19,7 @@ jobs: - checkout - run: apk update && apk add ragel make pkgconfig libtool autoconf automake gettext gcc g++ glib-dev freetype-dev cairo-dev - run: ./autogen.sh - - run: make && (make check || (./.collect_logs && false)) + - run: make && (make check || (.ci/collect-logs.sh && false)) archlinux: docker: @@ -28,7 +28,7 @@ jobs: - checkout - run: pacman --noconfirm -Syu freetype2 cairo icu gettext gobject-introspection gcc gcc-libs glib2 graphite pkg-config ragel python - run: ./autogen.sh --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2 - - run: make && (make check || (./.collect_logs && false)) + - run: make && (make check || (.ci/collect-logs.sh && false)) fedora-outoftreebuild: docker: @@ -37,7 +37,7 @@ jobs: - checkout - run: dnf install -y pkg-config ragel gcc gcc-c++ automake autoconf libtool make which glib2-devel freetype-devel cairo-devel libicu-devel gobject-introspection-devel graphite2-devel redhat-rpm-config python || true - run: NOCONFIGURE=1 ./autogen.sh --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2 - - run: mkdir build && cd build && ../configure && make && (make check || (./.collect_logs && false)) + - run: mkdir build && cd build && ../configure && make && (make check || (.ci/collect-logs.sh && false)) cmake-gcc: docker: diff --git a/.travis.yml b/.travis.yml index bbffda67..a68ef7dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ matrix: - ./autogen.sh - ./configure $CONFIGURE_OPTS --enable-gtk-doc - make - - make check || (./.collect_logs && false) + - make check || (.ci/collect-logs.sh && false) after_success: - bash .ci/run-coveralls.sh # for coveralls.io code coverage tracking - bash .ci/deploy-docs.sh @@ -43,7 +43,7 @@ matrix: - ./autogen.sh - ./configure $CONFIGURE_OPTS - make - - make check || (./.collect_logs && false) + - make check || (.ci/collect-logs.sh && false) - os: osx compiler: clang @@ -59,7 +59,7 @@ matrix: - ./autogen.sh - ./configure $CONFIGURE_OPTS --with-coretext - make - - make check || (./.collect_logs && false) + - make check || (.ci/collect-logs.sh && false) notifications: irc: "irc.freenode.org#harfbuzz" diff --git a/appveyor.yml b/appveyor.yml index c3caa318..63e711fe 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -44,7 +44,7 @@ build_script: - 'if "%compiler%"=="msvc" if not "%platform%"=="ARM" ctest --output-on-failure -C %configuration%' - 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S mingw-w64-$MSYS2_ARCH-{freetype,cairo,icu,gettext,gobject-introspection,gcc,gcc-libs,glib2,graphite2,pkg-config,python2}"' - - 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; PATH=$PATH:/mingw64/bin:/mingw32/bin; ./autogen.sh --with-uniscribe --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2 --build=%MINGW_CHOST% --host=%MINGW_CHOST% --prefix=%MINGW_PREFIX%; make; make check || (./.collect_logs && false)"' + - 'if "%compiler%"=="msys2" C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER; PATH=$PATH:/mingw64/bin:/mingw32/bin; ./autogen.sh --with-uniscribe --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-graphite2 --build=%MINGW_CHOST% --host=%MINGW_CHOST% --prefix=%MINGW_PREFIX%; make; make check || (.ci/collect-logs.sh && false)"' cache: - c:\tools\vcpkg\installed\ _______________________________________________ HarfBuzz mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/harfbuzz
