[arch-commits] Commit in lyx/repos (12 files)

Bartłomiej Piotrowski bpiotrowski at archlinux.org
Thu Oct 15 12:34:02 UTC 2015


    Date: Thursday, October 15, 2015 @ 14:34:02
  Author: bpiotrowski
Revision: 249369

archrelease: copy trunk to staging-i686, staging-x86_64

Added:
  lyx/repos/staging-i686/
  lyx/repos/staging-i686/PKGBUILD
    (from rev 249368, lyx/trunk/PKGBUILD)
  lyx/repos/staging-i686/lyx-C-11.patch
    (from rev 249368, lyx/trunk/lyx-C-11.patch)
  lyx/repos/staging-i686/lyx.desktop
    (from rev 249368, lyx/trunk/lyx.desktop)
  lyx/repos/staging-i686/lyx.install
    (from rev 249368, lyx/trunk/lyx.install)
  lyx/repos/staging-i686/lyxrc.dist
    (from rev 249368, lyx/trunk/lyxrc.dist)
  lyx/repos/staging-x86_64/
  lyx/repos/staging-x86_64/PKGBUILD
    (from rev 249368, lyx/trunk/PKGBUILD)
  lyx/repos/staging-x86_64/lyx-C-11.patch
    (from rev 249368, lyx/trunk/lyx-C-11.patch)
  lyx/repos/staging-x86_64/lyx.desktop
    (from rev 249368, lyx/trunk/lyx.desktop)
  lyx/repos/staging-x86_64/lyx.install
    (from rev 249368, lyx/trunk/lyx.install)
  lyx/repos/staging-x86_64/lyxrc.dist
    (from rev 249368, lyx/trunk/lyxrc.dist)

-------------------------------+
 staging-i686/PKGBUILD         |   56 ++++++++++
 staging-i686/lyx-C-11.patch   |  222 ++++++++++++++++++++++++++++++++++++++++
 staging-i686/lyx.desktop      |   14 ++
 staging-i686/lyx.install      |   15 ++
 staging-i686/lyxrc.dist       |   14 ++
 staging-x86_64/PKGBUILD       |   56 ++++++++++
 staging-x86_64/lyx-C-11.patch |  222 ++++++++++++++++++++++++++++++++++++++++
 staging-x86_64/lyx.desktop    |   14 ++
 staging-x86_64/lyx.install    |   15 ++
 staging-x86_64/lyxrc.dist     |   14 ++
 10 files changed, 642 insertions(+)

Copied: lyx/repos/staging-i686/PKGBUILD (from rev 249368, lyx/trunk/PKGBUILD)
===================================================================
--- staging-i686/PKGBUILD	                        (rev 0)
+++ staging-i686/PKGBUILD	2015-10-15 12:34:02 UTC (rev 249369)
@@ -0,0 +1,56 @@
+# $Id$
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Jason Chu <jason at archlinux.org>
+
+pkgname=lyx
+pkgver=2.1.3
+pkgrel=3
+pkgdesc="An advanced WYSIWYM document processor & LaTeX front-end"
+arch=('i686' 'x86_64')
+url="http://www.lyx.org"
+depends=('qt4' 'texlive-core' 'python2' 'imagemagick' 'enchant' 'boost-libs' 'libmythes' 'file')
+makedepends=('boost' 'bc')
+optdepends=('rcs: built-in version control system'
+            'texlive-latexextra: float wrap support')
+license=('GPL')
+backup=('etc/lyx/lyxrc.dist')
+install=lyx.install
+options=('emptydirs')
+source=(ftp://ftp.lyx.org/pub/lyx/stable/2.1.x/$pkgname-$pkgver.tar.xz
+        lyx.desktop lyxrc.dist lyx-C-11.patch)
+sha1sums=('eba2e3476967cb33a59b9f7331df472d98d635bf'
+          'e2b8f6d6cdeec41e1d5795167f5557e4a6ea28ad'
+          '56416642cc3da2a13b87b84e6b87c1a239f3d09a'
+          'ca8358890bb425a1ad13b462f974c2be501d601e')
+
+prepare() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  find . -type f -exec sed -i 's|#!.*python|#!/usr/bin/env python2|' {} +
+  sed -i 's|"python|"python2|' lib/configure.py src/support/os.cpp
+
+  # Fix build with C++11
+  patch -p1 -i "$srcdir"/lyx-C-11.patch
+  autoreconf -vi
+}
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  export CXXFLAGS="$CXXFLAGS -fpermissive"
+  ./configure --prefix=/usr \
+    --with-frontend=qt4 --without-included-boost \
+    --without-included-mythes
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+  # install desktop entry
+  install -Dm644 "${srcdir}/lyx.desktop" \
+    "${pkgdir}/usr/share/applications/lyx.desktop"
+  install -Dm644 "lib/images/lyx.png" \
+    "${pkgdir}/usr/share/pixmaps/lyx.png"
+  # install default config file
+  install -Dm644 "${srcdir}/lyxrc.dist" "${pkgdir}/etc/lyx/lyxrc.dist"
+  ln -sf /etc/lyx/lyxrc.dist "${pkgdir}/usr/share/lyx/lyxrc.dist"
+}

Copied: lyx/repos/staging-i686/lyx-C-11.patch (from rev 249368, lyx/trunk/lyx-C-11.patch)
===================================================================
--- staging-i686/lyx-C-11.patch	                        (rev 0)
+++ staging-i686/lyx-C-11.patch	2015-10-15 12:34:02 UTC (rev 249369)
@@ -0,0 +1,222 @@
+From be41e2d16f551103a9b7c5d22cb774eb5bfcb0d9 Mon Sep 17 00:00:00 2001
+From: Georg Baum <baum at lyx.org>
+Date: Tue, 12 May 2015 21:23:06 +0200
+Subject: [PATCH 153/163] Fix build with GNU libstdc++ C++11 ABI
+
+The GNU libstdc++ that ships witch gcc 5 can be used with the same ABI as
+older versions, or with a new ABI which is conformant to the C++11 standard.
+LyX did not build if the latter was used:
+https://kojipkgs.fedoraproject.org//work/tasks/1267/9651267/build.log
+
+This is now fixed by detecting the ABI version and disabling the wrong forward
+declarations. At the same time, STD_STRING_USES_COW is switched off for the
+C++11 ABI version, because the std::basic_string implementation is now C++11
+conformant. Since the GNU libstdc++ can also used by other compilers such as
+clang, we must not test for the compiler version.
+---
+ config/lyxinclude.m4                    | 80 ++++++++++++++++++++++-----------
+ development/cmake/ConfigureChecks.cmake | 46 +++++++++++++++++++
+ development/cmake/config.h.cmake        |  3 ++
+ src/support/strfwd.h                    | 14 ++----
+ status.21x                              |  3 ++
+ 5 files changed, 110 insertions(+), 36 deletions(-)
+
+diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4
+index 61ea48d..a0094c1 100644
+--- a/config/lyxinclude.m4
++++ b/config/lyxinclude.m4
+@@ -120,37 +120,65 @@ done
+ ])dnl
+ 
+ 
+-AC_DEFUN([LYX_PROG_CXX_WORKS],
+-[rm -f conftest.C
+-cat >conftest.C <<EOF
+-class foo {
+-   // we require the mutable keyword
+-   mutable int bar;
+- };
+- // we require namespace support
+- namespace baz {
+-   int bar;
+- }
+- int main() {
+-   return(0);
+- }
+-EOF
+-$CXX -c $CXXFLAGS $CPPFLAGS conftest.C >&5 || CXX=
+-rm -f conftest.C conftest.o conftest.obj || true
++dnl Usage: LYX_PROG_CLANG: set lyx_cv_prog_clang to yes if the compiler is clang.
++AC_DEFUN([LYX_PROG_CLANG],
++[AC_CACHE_CHECK([whether the compiler is clang],
++               [lyx_cv_prog_clang],
++[AC_TRY_COMPILE([], [
++#ifndef __clang__
++	    this is not clang
++#endif
++],
++[lyx_cv_prog_clang=yes ; CLANG=yes], [lyx_cv_prog_clang=no ; CLANG=no])])
+ ])
+ 
+ 
+-AC_DEFUN([LYX_PROG_CXX],
+-[AC_MSG_CHECKING([for a good enough C++ compiler])
+-LYX_SEARCH_PROG(CXX, $CXX $CCC g++ gcc c++ CC cxx xlC cc++, [LYX_PROG_CXX_WORKS])
++dnl Usage: LYX_LIB_STDCXX: set lyx_cv_lib_stdcxx to yes if the STL library is libstdc++.
++AC_DEFUN([LYX_LIB_STDCXX],
++[AC_CACHE_CHECK([whether STL is libstdc++],
++               [lyx_cv_lib_stdcxx],
++[AC_TRY_COMPILE([#include<vector>], [
++#if ! defined(__GLIBCXX__) && ! defined(__GLIBCPP__)
++	    this is not libstdc++
++#endif
++],
++[lyx_cv_lib_stdcxx=yes], [lyx_cv_lib_stdcxx=no])])
++])
+ 
+-if test -z "$CXX" ; then
+-  AC_MSG_ERROR([Unable to find a good enough C++ compiler])
+-fi
+-AC_MSG_RESULT($CXX)
+ 
+-AC_PROG_CXX
+-AC_PROG_CXXCPP
++dnl Usage: LYX_LIB_STDCXX_CXX11_ABI: set lyx_cv_lib_stdcxx_cxx11_abi to yes
++dnl        if the STL library is GNU libstdc++ and the C++11 ABI is used.
++AC_DEFUN([LYX_LIB_STDCXX_CXX11_ABI],
++[AC_CACHE_CHECK([whether STL is libstdc++ using the C++11 ABI],
++               [lyx_cv_lib_stdcxx_cxx11_abi],
++[AC_TRY_COMPILE([#include<vector>], [
++#if ! defined(_GLIBCXX_USE_CXX11_ABI) || ! _GLIBCXX_USE_CXX11_ABI
++	    this is not libstdc++ using the C++11 ABI
++#endif
++],
++[lyx_cv_lib_stdcxx_cxx11_abi=yes], [lyx_cv_lib_stdcxx_cxx11_abi=no])])
++])
++
++
++AC_DEFUN([LYX_PROG_CXX],
++[AC_REQUIRE([AC_PROG_CXX])
++AC_REQUIRE([AC_PROG_CXXCPP])
++
++AC_LANG_PUSH(C++)
++LYX_PROG_CLANG
++LYX_LIB_STDCXX
++LYX_LIB_STDCXX_CXX11_ABI
++AC_LANG_POP(C++)
++
++if test $lyx_cv_lib_stdcxx = "yes" ; then
++  if test $lyx_cv_lib_stdcxx_cxx11_abi = "yes" ; then
++    AC_DEFINE(USE_GLIBCXX_CXX11_ABI, 1, [use GNU libstdc++ with C++11 ABI])
++  fi
++else
++  if test $lyx_cv_prog_clang = "yes" ; then
++    AC_DEFINE(USE_LLVM_LIBCPP, 1, [use libc++ provided by llvm instead of GNU libstdc++])
++  fi
++fi
+ 
+ ### We might want to get or shut warnings.
+ AC_ARG_ENABLE(warnings,
+diff --git a/development/cmake/ConfigureChecks.cmake b/development/cmake/ConfigureChecks.cmake
+index 71291a5..a738160 100644
+--- a/development/cmake/ConfigureChecks.cmake
++++ b/development/cmake/ConfigureChecks.cmake
+@@ -112,3 +112,49 @@ check_cxx_source_compiles(
+ 	"
+ SIZEOF_WCHAR_T_IS_4)
+ 
++# Check whether STL is libstdc++
++check_cxx_source_compiles(
++	"
++	#include <vector>
++	int main() {
++	#if ! defined(__GLIBCXX__) && ! defined(__GLIBCPP__)
++		this is not libstdc++
++	#endif
++		return(0);
++	}
++	"
++lyx_cv_lib_stdcxx)
++
++# Check whether STL is libstdc++ with C++11 ABI
++check_cxx_source_compiles(
++	"
++	#include <vector>
++	int main() {
++	#if ! defined(_GLIBCXX_USE_CXX11_ABI) || ! _GLIBCXX_USE_CXX11_ABI
++		this is not libstdc++ using the C++11 ABI
++	#endif
++		return(0);
++	}
++	"
++USE_GLIBCXX_CXX11_ABI)
++
++check_cxx_source_compiles(
++	"
++	#ifndef __clang__
++		this is not clang
++	#endif
++	int main() {
++	  return(0);
++	}
++	"
++lyx_cv_prog_clang)
++
++set(USE_LLVM_LIBCPP)
++set(USE_GLIBCXX_CXX11_ABI)
++if(NOT lyx_cv_lib_stdcxx)
++  if(lyx_cv_prog_clang)
++    # use libc++ provided by llvm instead of GNU libstdc++
++    set(USE_LLVM_LIBCPP 1)
++  endif()
++endif()
++
+diff --git a/development/cmake/config.h.cmake b/development/cmake/config.h.cmake
+index 7bbe09e..a392b51 100644
+--- a/development/cmake/config.h.cmake
++++ b/development/cmake/config.h.cmake
+@@ -57,6 +57,9 @@
+ #cmakedefine LYX_USE_TR1 1
+ #cmakedefine LYX_USE_TR1_REGEX 1
+ 
++// use GNU libstdc++ with C++11 ABI
++#cmakedefine USE_GLIBCXX_CXX11_ABI 1
++
+ #cmakedefine Z_PREFIX 1
+ 
+ #cmakedefine ASPELL_FOUND 1
+diff --git a/src/support/strfwd.h b/src/support/strfwd.h
+index de8588c..f39426e 100644
+--- a/src/support/strfwd.h
++++ b/src/support/strfwd.h
+@@ -13,14 +13,6 @@
+ #ifndef STRFWD_H
+ #define STRFWD_H
+ 
+-// This includes does nothing but defining _LIBCPP_VERSION
+-// if libc++ is used (rather than libstdc++) - we first
+-// check if we have at least a c++03 standard before
+-// including the file
+-#if (__cplusplus > 19971L)
+-#include <ciso646>
+-#endif
+-
+ #ifdef USE_WCHAR_T
+ 
+ // Prefer this if possible because GNU libstdc++ has usable
+@@ -36,8 +28,10 @@ namespace lyx { typedef boost::uint32_t char_type; }
+ 
+ #endif
+ 
+-// Forward definitions do not work with libc++
+-#ifdef  _LIBCPP_VERSION
++// For gcc5 with the new std::string ABI forward declarations would work in
++// principle, but I am not sure whether we want non-standard
++// "namespace __cxx11" in our sources.
++#if defined(USE_LLVM_LIBCPP) || defined(USE_GLIBCXX_CXX11_ABI)
+ #include <string>
+ #else
+ 
+-- 
+1.9.3
+

Copied: lyx/repos/staging-i686/lyx.desktop (from rev 249368, lyx/trunk/lyx.desktop)
===================================================================
--- staging-i686/lyx.desktop	                        (rev 0)
+++ staging-i686/lyx.desktop	2015-10-15 12:34:02 UTC (rev 249369)
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=LyX Document Processor
+GenericName=Document Processor
+Comment=High level LaTeX frontend
+Exec=lyx %F
+TryExec=lyx
+Icon=lyx
+StartupNotify=false
+StartupWMClass=Lyx
+Terminal=false
+Categories=Office;WordProcessor;Qt;
+MimeType=text/x-lyx;application/x-lyx;

Copied: lyx/repos/staging-i686/lyx.install (from rev 249368, lyx/trunk/lyx.install)
===================================================================
--- staging-i686/lyx.install	                        (rev 0)
+++ staging-i686/lyx.install	2015-10-15 12:34:02 UTC (rev 249369)
@@ -0,0 +1,15 @@
+post_install() {
+  update-desktop-database -q
+  xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+  post_install
+}
+
+post_remove () {
+  post_install
+}
+
+
+

Copied: lyx/repos/staging-i686/lyxrc.dist (from rev 249368, lyx/trunk/lyxrc.dist)
===================================================================
--- staging-i686/lyxrc.dist	                        (rev 0)
+++ staging-i686/lyxrc.dist	2015-10-15 12:34:02 UTC (rev 249369)
@@ -0,0 +1,14 @@
+### This file is part of
+### ========================================================
+###          LyX, The Document Processor
+###
+###          Copyright 1995 Matthias Ettrich
+###          Copyright 1995-2011 The LyX Team.
+###
+### ========================================================
+
+# The file lyxrc.dist gives initial global options for all LyX users.
+# Almost all settings here can be overridden through the preferences in LyX.
+
+\thesaurusdir_path "/usr/share/mythes"
+\hunspelldir_path "/usr/share/myspell"

Copied: lyx/repos/staging-x86_64/PKGBUILD (from rev 249368, lyx/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD	                        (rev 0)
+++ staging-x86_64/PKGBUILD	2015-10-15 12:34:02 UTC (rev 249369)
@@ -0,0 +1,56 @@
+# $Id$
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Jason Chu <jason at archlinux.org>
+
+pkgname=lyx
+pkgver=2.1.3
+pkgrel=3
+pkgdesc="An advanced WYSIWYM document processor & LaTeX front-end"
+arch=('i686' 'x86_64')
+url="http://www.lyx.org"
+depends=('qt4' 'texlive-core' 'python2' 'imagemagick' 'enchant' 'boost-libs' 'libmythes' 'file')
+makedepends=('boost' 'bc')
+optdepends=('rcs: built-in version control system'
+            'texlive-latexextra: float wrap support')
+license=('GPL')
+backup=('etc/lyx/lyxrc.dist')
+install=lyx.install
+options=('emptydirs')
+source=(ftp://ftp.lyx.org/pub/lyx/stable/2.1.x/$pkgname-$pkgver.tar.xz
+        lyx.desktop lyxrc.dist lyx-C-11.patch)
+sha1sums=('eba2e3476967cb33a59b9f7331df472d98d635bf'
+          'e2b8f6d6cdeec41e1d5795167f5557e4a6ea28ad'
+          '56416642cc3da2a13b87b84e6b87c1a239f3d09a'
+          'ca8358890bb425a1ad13b462f974c2be501d601e')
+
+prepare() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  find . -type f -exec sed -i 's|#!.*python|#!/usr/bin/env python2|' {} +
+  sed -i 's|"python|"python2|' lib/configure.py src/support/os.cpp
+
+  # Fix build with C++11
+  patch -p1 -i "$srcdir"/lyx-C-11.patch
+  autoreconf -vi
+}
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  export CXXFLAGS="$CXXFLAGS -fpermissive"
+  ./configure --prefix=/usr \
+    --with-frontend=qt4 --without-included-boost \
+    --without-included-mythes
+  make
+}
+
+package() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+  # install desktop entry
+  install -Dm644 "${srcdir}/lyx.desktop" \
+    "${pkgdir}/usr/share/applications/lyx.desktop"
+  install -Dm644 "lib/images/lyx.png" \
+    "${pkgdir}/usr/share/pixmaps/lyx.png"
+  # install default config file
+  install -Dm644 "${srcdir}/lyxrc.dist" "${pkgdir}/etc/lyx/lyxrc.dist"
+  ln -sf /etc/lyx/lyxrc.dist "${pkgdir}/usr/share/lyx/lyxrc.dist"
+}

Copied: lyx/repos/staging-x86_64/lyx-C-11.patch (from rev 249368, lyx/trunk/lyx-C-11.patch)
===================================================================
--- staging-x86_64/lyx-C-11.patch	                        (rev 0)
+++ staging-x86_64/lyx-C-11.patch	2015-10-15 12:34:02 UTC (rev 249369)
@@ -0,0 +1,222 @@
+From be41e2d16f551103a9b7c5d22cb774eb5bfcb0d9 Mon Sep 17 00:00:00 2001
+From: Georg Baum <baum at lyx.org>
+Date: Tue, 12 May 2015 21:23:06 +0200
+Subject: [PATCH 153/163] Fix build with GNU libstdc++ C++11 ABI
+
+The GNU libstdc++ that ships witch gcc 5 can be used with the same ABI as
+older versions, or with a new ABI which is conformant to the C++11 standard.
+LyX did not build if the latter was used:
+https://kojipkgs.fedoraproject.org//work/tasks/1267/9651267/build.log
+
+This is now fixed by detecting the ABI version and disabling the wrong forward
+declarations. At the same time, STD_STRING_USES_COW is switched off for the
+C++11 ABI version, because the std::basic_string implementation is now C++11
+conformant. Since the GNU libstdc++ can also used by other compilers such as
+clang, we must not test for the compiler version.
+---
+ config/lyxinclude.m4                    | 80 ++++++++++++++++++++++-----------
+ development/cmake/ConfigureChecks.cmake | 46 +++++++++++++++++++
+ development/cmake/config.h.cmake        |  3 ++
+ src/support/strfwd.h                    | 14 ++----
+ status.21x                              |  3 ++
+ 5 files changed, 110 insertions(+), 36 deletions(-)
+
+diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4
+index 61ea48d..a0094c1 100644
+--- a/config/lyxinclude.m4
++++ b/config/lyxinclude.m4
+@@ -120,37 +120,65 @@ done
+ ])dnl
+ 
+ 
+-AC_DEFUN([LYX_PROG_CXX_WORKS],
+-[rm -f conftest.C
+-cat >conftest.C <<EOF
+-class foo {
+-   // we require the mutable keyword
+-   mutable int bar;
+- };
+- // we require namespace support
+- namespace baz {
+-   int bar;
+- }
+- int main() {
+-   return(0);
+- }
+-EOF
+-$CXX -c $CXXFLAGS $CPPFLAGS conftest.C >&5 || CXX=
+-rm -f conftest.C conftest.o conftest.obj || true
++dnl Usage: LYX_PROG_CLANG: set lyx_cv_prog_clang to yes if the compiler is clang.
++AC_DEFUN([LYX_PROG_CLANG],
++[AC_CACHE_CHECK([whether the compiler is clang],
++               [lyx_cv_prog_clang],
++[AC_TRY_COMPILE([], [
++#ifndef __clang__
++	    this is not clang
++#endif
++],
++[lyx_cv_prog_clang=yes ; CLANG=yes], [lyx_cv_prog_clang=no ; CLANG=no])])
+ ])
+ 
+ 
+-AC_DEFUN([LYX_PROG_CXX],
+-[AC_MSG_CHECKING([for a good enough C++ compiler])
+-LYX_SEARCH_PROG(CXX, $CXX $CCC g++ gcc c++ CC cxx xlC cc++, [LYX_PROG_CXX_WORKS])
++dnl Usage: LYX_LIB_STDCXX: set lyx_cv_lib_stdcxx to yes if the STL library is libstdc++.
++AC_DEFUN([LYX_LIB_STDCXX],
++[AC_CACHE_CHECK([whether STL is libstdc++],
++               [lyx_cv_lib_stdcxx],
++[AC_TRY_COMPILE([#include<vector>], [
++#if ! defined(__GLIBCXX__) && ! defined(__GLIBCPP__)
++	    this is not libstdc++
++#endif
++],
++[lyx_cv_lib_stdcxx=yes], [lyx_cv_lib_stdcxx=no])])
++])
+ 
+-if test -z "$CXX" ; then
+-  AC_MSG_ERROR([Unable to find a good enough C++ compiler])
+-fi
+-AC_MSG_RESULT($CXX)
+ 
+-AC_PROG_CXX
+-AC_PROG_CXXCPP
++dnl Usage: LYX_LIB_STDCXX_CXX11_ABI: set lyx_cv_lib_stdcxx_cxx11_abi to yes
++dnl        if the STL library is GNU libstdc++ and the C++11 ABI is used.
++AC_DEFUN([LYX_LIB_STDCXX_CXX11_ABI],
++[AC_CACHE_CHECK([whether STL is libstdc++ using the C++11 ABI],
++               [lyx_cv_lib_stdcxx_cxx11_abi],
++[AC_TRY_COMPILE([#include<vector>], [
++#if ! defined(_GLIBCXX_USE_CXX11_ABI) || ! _GLIBCXX_USE_CXX11_ABI
++	    this is not libstdc++ using the C++11 ABI
++#endif
++],
++[lyx_cv_lib_stdcxx_cxx11_abi=yes], [lyx_cv_lib_stdcxx_cxx11_abi=no])])
++])
++
++
++AC_DEFUN([LYX_PROG_CXX],
++[AC_REQUIRE([AC_PROG_CXX])
++AC_REQUIRE([AC_PROG_CXXCPP])
++
++AC_LANG_PUSH(C++)
++LYX_PROG_CLANG
++LYX_LIB_STDCXX
++LYX_LIB_STDCXX_CXX11_ABI
++AC_LANG_POP(C++)
++
++if test $lyx_cv_lib_stdcxx = "yes" ; then
++  if test $lyx_cv_lib_stdcxx_cxx11_abi = "yes" ; then
++    AC_DEFINE(USE_GLIBCXX_CXX11_ABI, 1, [use GNU libstdc++ with C++11 ABI])
++  fi
++else
++  if test $lyx_cv_prog_clang = "yes" ; then
++    AC_DEFINE(USE_LLVM_LIBCPP, 1, [use libc++ provided by llvm instead of GNU libstdc++])
++  fi
++fi
+ 
+ ### We might want to get or shut warnings.
+ AC_ARG_ENABLE(warnings,
+diff --git a/development/cmake/ConfigureChecks.cmake b/development/cmake/ConfigureChecks.cmake
+index 71291a5..a738160 100644
+--- a/development/cmake/ConfigureChecks.cmake
++++ b/development/cmake/ConfigureChecks.cmake
+@@ -112,3 +112,49 @@ check_cxx_source_compiles(
+ 	"
+ SIZEOF_WCHAR_T_IS_4)
+ 
++# Check whether STL is libstdc++
++check_cxx_source_compiles(
++	"
++	#include <vector>
++	int main() {
++	#if ! defined(__GLIBCXX__) && ! defined(__GLIBCPP__)
++		this is not libstdc++
++	#endif
++		return(0);
++	}
++	"
++lyx_cv_lib_stdcxx)
++
++# Check whether STL is libstdc++ with C++11 ABI
++check_cxx_source_compiles(
++	"
++	#include <vector>
++	int main() {
++	#if ! defined(_GLIBCXX_USE_CXX11_ABI) || ! _GLIBCXX_USE_CXX11_ABI
++		this is not libstdc++ using the C++11 ABI
++	#endif
++		return(0);
++	}
++	"
++USE_GLIBCXX_CXX11_ABI)
++
++check_cxx_source_compiles(
++	"
++	#ifndef __clang__
++		this is not clang
++	#endif
++	int main() {
++	  return(0);
++	}
++	"
++lyx_cv_prog_clang)
++
++set(USE_LLVM_LIBCPP)
++set(USE_GLIBCXX_CXX11_ABI)
++if(NOT lyx_cv_lib_stdcxx)
++  if(lyx_cv_prog_clang)
++    # use libc++ provided by llvm instead of GNU libstdc++
++    set(USE_LLVM_LIBCPP 1)
++  endif()
++endif()
++
+diff --git a/development/cmake/config.h.cmake b/development/cmake/config.h.cmake
+index 7bbe09e..a392b51 100644
+--- a/development/cmake/config.h.cmake
++++ b/development/cmake/config.h.cmake
+@@ -57,6 +57,9 @@
+ #cmakedefine LYX_USE_TR1 1
+ #cmakedefine LYX_USE_TR1_REGEX 1
+ 
++// use GNU libstdc++ with C++11 ABI
++#cmakedefine USE_GLIBCXX_CXX11_ABI 1
++
+ #cmakedefine Z_PREFIX 1
+ 
+ #cmakedefine ASPELL_FOUND 1
+diff --git a/src/support/strfwd.h b/src/support/strfwd.h
+index de8588c..f39426e 100644
+--- a/src/support/strfwd.h
++++ b/src/support/strfwd.h
+@@ -13,14 +13,6 @@
+ #ifndef STRFWD_H
+ #define STRFWD_H
+ 
+-// This includes does nothing but defining _LIBCPP_VERSION
+-// if libc++ is used (rather than libstdc++) - we first
+-// check if we have at least a c++03 standard before
+-// including the file
+-#if (__cplusplus > 19971L)
+-#include <ciso646>
+-#endif
+-
+ #ifdef USE_WCHAR_T
+ 
+ // Prefer this if possible because GNU libstdc++ has usable
+@@ -36,8 +28,10 @@ namespace lyx { typedef boost::uint32_t char_type; }
+ 
+ #endif
+ 
+-// Forward definitions do not work with libc++
+-#ifdef  _LIBCPP_VERSION
++// For gcc5 with the new std::string ABI forward declarations would work in
++// principle, but I am not sure whether we want non-standard
++// "namespace __cxx11" in our sources.
++#if defined(USE_LLVM_LIBCPP) || defined(USE_GLIBCXX_CXX11_ABI)
+ #include <string>
+ #else
+ 
+-- 
+1.9.3
+

Copied: lyx/repos/staging-x86_64/lyx.desktop (from rev 249368, lyx/trunk/lyx.desktop)
===================================================================
--- staging-x86_64/lyx.desktop	                        (rev 0)
+++ staging-x86_64/lyx.desktop	2015-10-15 12:34:02 UTC (rev 249369)
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=LyX Document Processor
+GenericName=Document Processor
+Comment=High level LaTeX frontend
+Exec=lyx %F
+TryExec=lyx
+Icon=lyx
+StartupNotify=false
+StartupWMClass=Lyx
+Terminal=false
+Categories=Office;WordProcessor;Qt;
+MimeType=text/x-lyx;application/x-lyx;

Copied: lyx/repos/staging-x86_64/lyx.install (from rev 249368, lyx/trunk/lyx.install)
===================================================================
--- staging-x86_64/lyx.install	                        (rev 0)
+++ staging-x86_64/lyx.install	2015-10-15 12:34:02 UTC (rev 249369)
@@ -0,0 +1,15 @@
+post_install() {
+  update-desktop-database -q
+  xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+  post_install
+}
+
+post_remove () {
+  post_install
+}
+
+
+

Copied: lyx/repos/staging-x86_64/lyxrc.dist (from rev 249368, lyx/trunk/lyxrc.dist)
===================================================================
--- staging-x86_64/lyxrc.dist	                        (rev 0)
+++ staging-x86_64/lyxrc.dist	2015-10-15 12:34:02 UTC (rev 249369)
@@ -0,0 +1,14 @@
+### This file is part of
+### ========================================================
+###          LyX, The Document Processor
+###
+###          Copyright 1995 Matthias Ettrich
+###          Copyright 1995-2011 The LyX Team.
+###
+### ========================================================
+
+# The file lyxrc.dist gives initial global options for all LyX users.
+# Almost all settings here can be overridden through the preferences in LyX.
+
+\thesaurusdir_path "/usr/share/mythes"
+\hunspelldir_path "/usr/share/myspell"



More information about the arch-commits mailing list