lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [6491] Add C++11 cross-compiling instructions


From: Greg Chicares
Subject: [lmi-commits] [6491] Add C++11 cross-compiling instructions
Date: Tue, 26 Jan 2016 15:13:29 +0000

Revision: 6491
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6491
Author:   chicares
Date:     2016-01-26 15:13:29 +0000 (Tue, 26 Jan 2016)
Log Message:
-----------
Add C++11 cross-compiling instructions

Added Paths:
-----------
    lmi/trunk/gwc/xc11

Added: lmi/trunk/gwc/xc11
===================================================================
--- lmi/trunk/gwc/xc11                          (rev 0)
+++ lmi/trunk/gwc/xc11  2016-01-26 15:13:29 UTC (rev 6491)
@@ -0,0 +1,204 @@
+# prerequisites
+
+apt-get update
+apt-get install g++-mingw-w64-i686 automake libtool make pkg-config
+apt-get install subversion git
+# optional--personal preferences only:
+apt-get install zsh gnome-system-monitor geany
+# only for VM clipboard support
+apt-get install spice-vdagent
+# ...in VM...apparently not needed
+# update-rc.d spice-vdagent defaults
+
+chsh -s /bin/zsh greg
+
+cat >~/.zshrc <<EOF
+# 
PATH="/opt/lmi/local/bin:/opt/lmi/local/lib:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH"
+
+export coefficiency="--jobs=`nproc`"
+
+# export TZ=UCT
+# export LC_COLLATE=C.UTF-8
+
+# bindkey "\e[3~" delete-char      # Del
+# bindkey '\e[H' beginning-of-line # Home
+# bindkey '\e[F' end-of-line       # End
+bindkey "^[[1;5D" backward-word  # Ctrl-left
+bindkey "^[[1;5C" forward-word   # Ctrl-right
+bindkey '\e[1;3D' backward-word  # Alt-left
+bindkey '\e[1;3C' forward-word   # Alt-right
+
+prompt='%d[%?]%(!.#.$)'
+
+HISTSIZE=1000
+SAVEHIST=1000
+HISTFILE=~/.history
+setopt HIST_IGNORE_DUPS
+
+autoload -U compinit
+compinit -u
+
+# The following lines were added by compinstall
+
+# zstyle ':completion:*' completer _complete _ignored
+# zstyle :compinstall filename '/home/greg/.zshrc'
+
+# autoload -Uz compinit
+# compinit
+# End of lines added by compinstall
+EOF
+
+# fix libtool breakage (needs work)
+
+Adapted from:
+  http://lists.gnu.org/archive/html/libtool-patches/2011-06/msg00001.html
+
+--- /usr/share/libtool/config/ltmain.sh.original 2016-01-25 03:43:07.768000000 
+0000
++++ /usr/share/libtool/config/ltmain.sh 2016-01-25 03:44:17.100000000 +0000
+@@ -4178,7 +4178,8 @@
+ /* declarations of non-ANSI functions */
+ #if defined(__MINGW32__)
+ # ifdef __STRICT_ANSI__
+-int _putenv (const char *);
++     /* int _putenv (const char *); */
++_CRTIMP int _putenv (const char *);
+ # endif
+ #elif defined(__CYGWIN__)
+ # ifdef __STRICT_ANSI__
+
+# downloads: once only
+
+mkdir --parents ~/src
+cd ~/src
+svn checkout http://svn.sv.nongnu.org/svn/lmi/lmi/trunk lmi 2>&1 |less
+
+mkdir --parents ~/src/3rdparty
+
+cd ~/src/3rdparty
+wget http://downloads.sourceforge.net/boost/boost_1_33_1.tar.bz2
+tar xf boost_1_33_1.tar.bz2
+patch --strip=1 < ~/src/lmi/boost_1_33_1.patch
+
+cd ~/src/3rdparty
+wget ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/libxml2-2.6.26.tar.bz2
+tar xf libxml2-2.6.26.tar.bz2
+
+cd ~/src/3rdparty
+wget ftp://ftp.gnome.org/pub/GNOME/sources/libxslt/1.1/libxslt-1.1.17.tar.bz2
+tar xf libxslt-1.1.17.tar.bz2
+patch --strip=1 <~/src/lmi/libxslt-1.1.17-lmi.patch
+
+cd ~/src/3rdparty
+git clone https://github.com/vadz/xmlwrapp.git
+cd xmlwrapp
+
+cd ~/src/3rdparty
+git clone https://github.com/wxWidgets/wxWidgets.git
+
+cd ~/src/3rdparty
+git clone https://github.com/vadz/wxpdfdoc.git
+
+# updates: only after initial download
+
+# [svn update; git too; we can flesh this step out later]
+
+# build
+
+mkdir ~/build
+mkdir --parents ~/msw/i686-w64-mingw32/lib
+cd ~/src/3rdparty/boost_1_33_1
+# it would seem nicer not to build in the source directories
+for z in regex filesystem; \
+  do (cd libs/$z/src && \
+  i686-w64-mingw32-g++ -std=c++11 -I../../.. -c *.cpp && \
+  i686-w64-mingw32-ar rc ~/msw/i686-w64-mingw32/lib/libboost_$z.a *.o); done
+mkdir --parents ~/msw/i686-w64-mingw32/include
+cp -a boost ~/msw/i686-w64-mingw32/include/
+
+cd ~/src/3rdparty
+mkdir ~/build/libxml2-msw
+cd $_
+~/src/3rdparty/libxml2-2.6.26/configure \
+  --disable-static --enable-shared \
+  --with-{debug,schemas} --without-{iconv,modules,python,schematron} \
+  --prefix=$HOME/msw/i686-w64-mingw32 \
+  --build=x86_64-unknown-linux-gnu \
+  --host=i686-w64-mingw32 \
+  --without-threads
+make $coefficiency --quiet install
+
+cd ~/src/3rdparty
+mkdir ~/build/libxslt-msw
+cd $_
+~/src/3rdparty/libxslt-1.1.17/configure \
+  --disable-static --enable-shared \
+  --with-debug --without-{crypto,python} \
+  --prefix=$HOME/msw/i686-w64-mingw32 \
+  --build=x86_64-unknown-linux-gnu \
+  --host=i686-w64-mingw32 \
+  --with-libxml-prefix=$HOME/msw/i686-w64-mingw32
+# repair this packaging mistake before invoking 'make':
+rm ~/src/3rdparty/libxslt-1.1.17/libxslt/xsltconfig.h
+make $coefficiency --quiet install
+
+cd ~/src/3rdparty/xmlwrapp
+./bootstrap
+mkdir ~/build/xmlwrapp-msw
+cd $_
+~/src/3rdparty/xmlwrapp/configure \
+  --disable-shared --disable-tests --disable-docs \
+  --with-boost=$HOME/msw/i686-w64-mingw32 \
+  --prefix=$HOME/msw/i686-w64-mingw32 \
+  --host=i686-w64-mingw32 \
+  PKG_CONFIG_LIBDIR=$HOME/msw/i686-w64-mingw32/lib/pkgconfig \
+  CXXFLAGS='-std=c++11'
+make $coefficiency install
+
+mkdir ~/build/wx-msw
+cd $_
+# same options as lmi production, sans --build and --enable-vendor:
+~/src/3rdparty/wxWidgets/configure \
+  --prefix=$HOME/msw/i686-w64-mingw32 \
+  --host=i686-w64-mingw32 \
+  --disable-apple_ieee \
+  --disable-aui \
+  --disable-compat24 \
+  --disable-fswatcher \
+  --disable-gif \
+  --disable-mediactrl \
+  --disable-propgrid \
+  --disable-ribbon \
+  --disable-richtext \
+  --disable-stc \
+  --disable-threads \
+  --disable-webview \
+  --enable-monolithic \
+  --enable-shared \
+  --enable-std_iostreams \
+  --enable-stl \
+  --without-libjpeg \
+  --without-libtiff \
+  --without-opengl \
+  --without-subdirs \
+  CXXFLAGS='-std=c++11'
+make $coefficiency install
+
+mkdir ~/build/wxpdfdoc-msw
+cd $_
+~/src/3rdparty/wxpdfdoc/configure \
+  --prefix=$HOME/msw/i686-w64-mingw32 --host=i686-w64-mingw32 \
+  --with-wx-config=$HOME/msw/i686-w64-mingw32/bin/wx-config \
+  CXXFLAGS='-std=c++11'
+make $coefficiency install
+
+cd ~/src/lmi
+./autogen.sh
+mkdir ~/build/lmi-msw
+cd $_
+PATH=$HOME/msw/i686-w64-mingw32/bin:$PATH ~/src/lmi/configure \
+  --prefix=$HOME/msw/i686-w64-mingw32 --host=i686-w64-mingw32 \
+  CPPFLAGS=-I$HOME/msw/i686-w64-mingw32/include \
+  LDFLAGS=-L$HOME/msw/i686-w64-mingw32/lib \
+  CXXFLAGS='-Wno-unused-local-typedefs -Wno-unused-variable -std=c++11'
+make $coefficiency install
+


Property changes on: lmi/trunk/gwc/xc11
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:keywords
   + Id




reply via email to

[Prev in Thread] Current Thread [Next in Thread]