Skip to content

Instantly share code, notes, and snippets.

@lynxluna
Last active December 29, 2015 03:39
Show Gist options
  • Save lynxluna/7609718 to your computer and use it in GitHub Desktop.
Save lynxluna/7609718 to your computer and use it in GitHub Desktop.
How to build HarfBuzz on BlackBerry 10 SDK

How to build harfbuzz on BlackBerry 10

  1. Install BlackBerry 10 SDK
  2. Start the environment variable by sourcing /Applications/Momentics.app/bbndk-env.sh
  3. Set the output dir for device and simulator e.g. $HOME/Projects/qnxlib/arm and $HOME/Projects/qnxlib/x86
  4. Execute gtkdocize
  5. Execute autoreconf --force --install --verbose
  6. Use this shell command to build

For Device

ICU_CFLAGS="-I$QNX_TARGET/usr/include/" \
ICU_LIBS="-L$QNX_TARGET/armle-v7/usr/lib/ -licudata -licui18n -licuuc" \
FREETYPE_CFLAGS="-I$QNX_TARGET/usr/include/ -I$QNX_TARGET/usr/include/freetype2" \
FREETYPE_LIBS="-L$QNX_TARGET/armle-v7/usr/lib/ -lfreetype" ./configure --host=arm-unknown-nto-qnx8.0.0eabi \
--with-glib=no \
--with-gobject=no \
--with-cairo=no \
--with-icu=yes \
--with-graphite2=no \
--with-freetype=yes \
--with-uniscribe=no \
--with-coretext=no \
--prefix=$HOME/Projects/qnxlib/arm/ \
&& make && make install

For Simulator:

ICU_CFLAGS="-I$QNX_TARGET/usr/include/" \
ICU_LIBS="-L$QNX_TARGET/x86/usr/lib/ -licudata -licui18n -licuuc" \
FREETYPE_CFLAGS="-I$QNX_TARGET/usr/include/ -I$QNX_TARGET/usr/include/freetype2" \
FREETYPE_LIBS="-L$QNX_TARGET/x86/usr/lib/ -lfreetype" ./configure --host=i486-pc-nto-qnx8.0.0 \
--with-glib=no \
--with-gobject=no \
--with-cairo=no \
--with-icu=yes \
--with-graphite2=no \
--with-freetype=yes \
--with-uniscribe=no \
--with-coretext=no \
--prefix=$HOME/Projects/qnxlib/x86/ \
&& make && make install

The libraries will be available on your output directories

  • $HOME/Projects/qnxlib/arm/ for device
  • $HOME/Projects/qnxlib/x86/ for simulator

Enjoy!

Notes:

  • You need Mac OSX or Linux to build them. You can use the built SDK and headers on Windows later on.
  • You need to install gtk-doc package on OSX, on macports it's sudo port install gtk-doc before able to build.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment