Snippet #151

TTL: forever — WordwrapView raw

on 2019/07/14 20:47:08 (UTC) by eht16 as Bash

  1. #!/bin/bash
  2.  
  3. set -e
  4.  
  5. builddir_geany="/tmp/_build_/geany_win32"
  6. builddir_plugins="/tmp/_build_/plugins_win32"
  7. workdir_geany="/tmp/_build_/geany_win32_build"
  8. workdir_plugins="/tmp/_build_/plugins_win32_build"
  9. installdir="/home/enrico/build/geany_win32"
  10.  
  11. export CFLAGS="\
  12. -Wall \
  13. -Wextra \
  14. -O2 \
  15. -Wunused \
  16. -Wno-unused-parameter \
  17. -Wunreachable-code \
  18. -Wformat=2 \
  19. -Wundef \
  20. -Wpointer-arith \
  21. -Wwrite-strings \
  22. -Waggregate-return \
  23. -Wmissing-prototypes \
  24. -Wmissing-declarations \
  25. -Wmissing-noreturn \
  26. -Wmissing-format-attribute \
  27. -Wredundant-decls \
  28. -Wnested-externs \
  29. -Wno-deprecated-declarations"
  30.  
  31. export CCACHE_DIR="/tmp/ccache"
  32. export NOCONFIGURE=1
  33.  
  34. export WINRC="i686-w64-mingw32-windres"
  35. export PKG_CONFIG_PATH="/home/enrico/build/gtk2_mingw64/lib/pkgconfig:/home/enrico/build/geany_win32/lib/pkgconfig"
  36. export CPPFLAGS="-I/home/enrico/build/gtk2_mingw64/include"
  37. export LDFLAGS="-L/home/enrico/build/gtk2_mingw64/lib"
  38. export HOST=i686-w64-mingw32
  39.  
  40. export CC="/usr/bin/ccache /usr/bin/i686-w64-mingw32-gcc"
  41. export CXX="/usr/bin/ccache /usr/bin/i686-w64-mingw32-g++"
  42.  
  43.  
  44. cd /home/enrico/build
  45.  
  46. echo "PATH: $PATH"
  47. echo "CC: $CC"
  48. echo "CFLAGS: $CFLAGS"
  49.  
  50. rm -rf $workdir_geany $workdir_plugins $builddir_geany $builddir_plugins
  51. mkdir -p $workdir_geany $workdir_plugins $builddir_geany $builddir_plugins
  52.  
  53. # build Geany
  54. git clone --depth 1 https://github.com/geany/geany.git $workdir_geany
  55. cd $workdir_geany
  56. ./autogen.sh
  57. cd $builddir_geany
  58. $workdir_geany/configure --host=$HOST --prefix=$installdir --disable-silent-rules
  59. make
  60. make install
  61.  
  62.  
  63. # build Plugins
  64. git clone --depth 1 https://github.com/geany/geany-plugins.git $workdir_plugins
  65. cd $workdir_plugins
  66. ./autogen.sh
  67. cd $builddir_plugins
  68. $workdir_plugins/configure --host=${HOST} --target=${HOST} --disable-silent-rules --disable-markdown --enable-cppcheck
  69. make

Recent Snippets