diff options
author | Slawomir Lis <slis@gentoo.org> | 2018-01-24 11:12:43 +0100 |
---|---|---|
committer | Slawomir Lis <slis@gentoo.org> | 2018-01-24 11:12:55 +0100 |
commit | 8b1b556348dd386b205af3359510a169091f8c6b (patch) | |
tree | 73da2478baf09ab20f53fb5415695bf918608f98 /sci-libs | |
parent | app-admin/eselect: Version bump. (diff) | |
download | gentoo-8b1b556348dd386b205af3359510a169091f8c6b.tar.gz gentoo-8b1b556348dd386b205af3359510a169091f8c6b.tar.bz2 gentoo-8b1b556348dd386b205af3359510a169091f8c6b.zip |
sci-libs/silo: created patches to build with qt5
As there is no recent version available upstream, I've created
a patch to build with qt5.
Reported-In: https://bugs.gentoo.org/645434
Package-Manager: Portage-2.3.20, Repoman-2.3.6
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/silo/files/silo-4.10.2-qt5.patch | 44 | ||||
-rw-r--r-- | sci-libs/silo/files/silo-4.10.2-qtlibs.patch | 48 | ||||
-rw-r--r-- | sci-libs/silo/silo-4.10.2-r1.ebuild | 40 |
3 files changed, 114 insertions, 18 deletions
diff --git a/sci-libs/silo/files/silo-4.10.2-qt5.patch b/sci-libs/silo/files/silo-4.10.2-qt5.patch new file mode 100644 index 000000000000..1e1fe8803a37 --- /dev/null +++ b/sci-libs/silo/files/silo-4.10.2-qt5.patch @@ -0,0 +1,44 @@ +--- tools/silex/SiloFile.h.orig 2018-01-24 11:01:23.354705068 +0100 ++++ tools/silex/SiloFile.h 2018-01-24 11:01:34.843705761 +0100 +@@ -61,6 +61,8 @@ + #include <vector> + using std::vector; + ++#define toAscii toLatin1 ++ + // **************************************************************************** + // Class: SiloDir + // +--- tools/silex/main.cpp.orig 2018-01-24 11:02:21.201708556 +0100 ++++ tools/silex/main.cpp 2018-01-24 11:02:34.146709336 +0100 +@@ -58,7 +58,7 @@ + #include <cstdlib> + + #ifndef Q_WS_MACX +-#include "qwindowsstyle.h" ++//#include "qwindowsstyle.h" + #endif + #include "qfiledialog.h" + #include "qstring.h" +@@ -91,7 +91,7 @@ + QApplication::setColorSpec(QApplication::ManyColor); + QApplication a(argc, argv); + #ifndef Q_WS_MACX +- a.setStyle(new QWindowsStyle); ++// a.setStyle(new QWindowsStyle); + #endif + Explorer *w = 0; + if (argc > 1) +--- tools/silex/SiloView.cpp.orig 2018-01-24 11:03:13.775711725 +0100 ++++ tools/silex/SiloView.cpp 2018-01-24 11:03:30.032712706 +0100 +@@ -109,8 +109,8 @@ + dirTreeView->OpenRootDir(); + dirView->Set(silo->root); + +- dirTreeView->header()->setResizeMode(QHeaderView::Interactive); +- dirView->header()->setResizeMode(QHeaderView::Interactive); ++ dirTreeView->header()->setSectionResizeMode(QHeaderView::Interactive); ++ dirView->header()->setSectionResizeMode(QHeaderView::Interactive); + } + } + diff --git a/sci-libs/silo/files/silo-4.10.2-qtlibs.patch b/sci-libs/silo/files/silo-4.10.2-qtlibs.patch index e8fc4284cac0..ecd5297c281f 100644 --- a/sci-libs/silo/files/silo-4.10.2-qtlibs.patch +++ b/sci-libs/silo/files/silo-4.10.2-qtlibs.patch @@ -1,66 +1,78 @@ -diff -ru silo-4.9.1-old/configure silo-4.9.1-new/configure ---- silo-4.9.1-old/configure 2014-01-18 23:19:15.755030306 +0100 -+++ silo-4.9.1-new/configure 2014-01-18 23:20:52.595031159 +0100 -@@ -27503,7 +27503,7 @@ +--- configure.orig 2018-01-24 10:50:10.458664501 +0100 ++++ configure 2018-01-24 10:50:42.967666461 +0100 +@@ -27541,7 +27541,7 @@ ax_qt_lib="`ls $ax_qt_lib_dir/libQt* | sed -n 1p | sed s@$ax_qt_lib_dir/lib@@ | sed s@[.].*@@`" fi - ax_qt_LIBS="-L$ax_qt_lib_dir -l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" -+ ax_qt_LIBS="-L$ax_qt_lib_dir -l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lQtCore -lQtGui -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" ++ ax_qt_LIBS="-L$ax_qt_lib_dir -l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lQt5Core -lQt5Gui -lQt5Widgets -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" else # Use cached value or do search, starting with suggestions from # the command line -@@ -27577,7 +27577,7 @@ +@@ -27615,7 +27615,7 @@ ax_qt_lib="`ls $ax_qt_lib_dir/libQt* | sed -n 1p | sed s@$ax_qt_lib_dir/lib@@ | sed s@[.].*@@`" fi - ax_qt_LIBS="-L$ax_qt_lib_dir -l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" -+ ax_qt_LIBS="-L$ax_qt_lib_dir -l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lQtCore -lQtGui -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" ++ ax_qt_LIBS="-L$ax_qt_lib_dir -l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lQt5Core -lQt5Gui -lQt5Widgets -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" else # There is no valid definition for $QTDIR as Trolltech likes to see it ax_qt_dir= -@@ -27589,7 +27589,7 @@ +@@ -27627,7 +27627,7 @@ ax_qt_lib="`ls $ax_qt_lib_dir/libQt* | sed -n 1p | sed s@$ax_qt_lib_dir/lib@@ | sed s@[.].*@@`" fi - ax_qt_LIBS="-L$ax_qt_lib_dir -l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" -+ ax_qt_LIBS="-L$ax_qt_lib_dir -l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lQtCore -lQtGui -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" ++ ax_qt_LIBS="-L$ax_qt_lib_dir -l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lQt5Core -lQt5Gui -lQt5Widgets -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" else # Normally, when there is no traditional Trolltech installation, # the library is installed in a place where the linker finds it -@@ -27607,7 +27607,7 @@ +@@ -27645,10 +27645,10 @@ # See if we find the library without any special options. # Don't add top $LIBS permanently yet ax_save_LIBS="$LIBS" - LIBS="-l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" -+ LIBS="-l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lQtCore -lQtGui -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" ++ LIBS="-l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lQt5Core -lQt5Gui -lQt5Widgets -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" ax_qt_LIBS="$LIBS" ax_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="-I$ax_qt_include_dir -I$ax_qt_include_dir/Qt -I$ax_qt_include_dir/QtCore -I$ax_qt_include_dir/QtGui" -@@ -27668,7 +27668,7 @@ +- CXXFLAGS="-I$ax_qt_include_dir -I$ax_qt_include_dir/Qt -I$ax_qt_include_dir/QtCore -I$ax_qt_include_dir/QtGui" ++ CXXFLAGS="-I$ax_qt_include_dir -I$ax_qt_include_dir/Qt -I$ax_qt_include_dir/QtCore -I$ax_qt_include_dir/QtGui -I$ax_qt_include_dir/QtWidgets -fPIC" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -27706,7 +27706,7 @@ # That did not work. Try the multi-threaded version echo "Non-critical error, please neglect the above." >&5 ax_qt_lib=qt-mt - LIBS="-l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" -+ LIBS="-l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lQtCore -lQtGui -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" ++ LIBS="-l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lQt5Core -lQt5Gui -lQt5Widgets -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -27726,7 +27726,7 @@ +@@ -27764,7 +27764,7 @@ # That did not work. Try the OpenGL version echo "Non-critical error, please neglect the above." >&5 ax_qt_lib=qt-gl - LIBS="-l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" -+ LIBS="-l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lQtCore -lQtGui -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" ++ LIBS="-l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lQt5Core -lQt5Gui -lQt5Widgets -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -27809,7 +27809,7 @@ +@@ -27847,7 +27847,7 @@ fi done # Try with that one - LIBS="-l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" -+ LIBS="-l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lQtCore -lQtGui -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" ++ LIBS="-l$ax_qt_lib $X_PRE_LIBS $X_LIBS -lQt5Core -lQt5Gui -lQt5Widgets -lX11 -lXext -lXmu -lXt -lXi $X_EXTRA_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF +@@ -27955,7 +27955,7 @@ + fi # all $ax_qt_* are set + fi # $have_qt reflects the system status + if test x"$have_qt" = xyes; then +- QT_CXXFLAGS="-I$ax_qt_include_dir -I$ax_qt_include_dir/Qt -I$ax_qt_include_dir/QtCore -I$ax_qt_include_dir/QtGui" ++ QT_CXXFLAGS="-I$ax_qt_include_dir -I$ax_qt_include_dir/Qt -I$ax_qt_include_dir/QtCore -I$ax_qt_include_dir/QtGui -I$ax_qt_include_dir/QtWidgets -fPIC" + if test x"$ax_qt_lib" = xqt-mt; then + QT_CXXFLAGS="$QT_CXXFLAGS -DQT_THREAD_SUPPORT" + fi diff --git a/sci-libs/silo/silo-4.10.2-r1.ebuild b/sci-libs/silo/silo-4.10.2-r1.ebuild new file mode 100644 index 000000000000..b8c03cde0cde --- /dev/null +++ b/sci-libs/silo/silo-4.10.2-r1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils fortran-2 + +DESCRIPTION="A mesh and field I/O library and scientific database" +HOMEPAGE="https://wci.llnl.gov/simulation/computer-codes/silo" +SRC_URI="https://wci.llnl.gov/content/assets/docs/simulation/computer-codes/${PN}/${P}/${P}.tar.gz" +SLOT="0" +LICENSE="BSD" +KEYWORDS="~amd64 ~x86" +IUSE="hdf5 +silex static-libs qt5 test" + +REQUIRED_USE="silex? ( qt5 )" + +RDEPEND=" + hdf5? ( sci-libs/hdf5 ) + qt5? ( dev-qt/qtgui:5 )" +DEPEND="${RDEPEND}" + +src_prepare() { + epatch "${FILESDIR}/${P}-qtlibs.patch" + epatch "${FILESDIR}/${P}-qt5.patch" + epatch "${FILESDIR}/${P}-tests.patch" + epatch "${FILESDIR}/${P}-mpiposix.patch" +} + +src_configure() { + econf \ + --enable-install-lite-headers \ + --enable-shared \ + $(use_enable silex silex ) \ + $(use_enable static-libs static ) \ + $(use_with qt5 Qt-lib-dir "${EPREFIX}"/usr/$(get_libdir) ) \ + $(use_with qt5 Qt-include-dir "${EPREFIX}"/usr/include/qt5 ) \ + $(use_with qt5 Qt-bin-dir "${EPREFIX}"/usr/$(get_libdir)/qt5/bin ) \ + $(use_with hdf5 hdf5 ${EPREFIX}"/usr/include,${EPREFIX}"/usr/$(get_libdir) ) +} |