summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorM. Scholz2018-10-18 15:44:53 +0200
committerM. Scholz2018-10-18 15:44:53 +0200
commitde8441606845d1373090143f2be57cabb4361dc1 (patch)
tree8fea488a3deeaa4298dbefead96774bd15e89818
downloadaur-de8441606845d1373090143f2be57cabb4361dc1.tar.gz
initial
-rw-r--r--.SRCINFO28
-rw-r--r--Fox.desktop11
-rw-r--r--FoxServerThread.patch26
-rw-r--r--PKGBUILD65
-rw-r--r--boost_C++0x.patch76
5 files changed, 206 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..798c0d200eb
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,28 @@
+pkgbase = objcryst-fox
+ pkgdesc = A program for the ab initio structure determination from powder diffraction
+ pkgver = 2017.2
+ pkgrel = 1
+ url = http://fox.vincefn.net/FoxWiki
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = libmariadbclient
+ makedepends = newmat
+ depends = glu
+ depends = freeglut
+ depends = wxgtk2
+ depends = fftw
+ noextract = cctbx.tar.bz2
+ source = Fox.desktop
+ source = boost_C++0x.patch
+ source = FoxServerThread.patch
+ source = https://github.com/vincefn/objcryst/archive/v2017.2.tar.gz
+ source = http://downloads.sourceforge.net/project/objcryst/3rdPartyLibraries/cctbx.tar.bz2
+ sha1sums = 6d8bb12fe1add4481ac1733e9cf6aea57aedee61
+ sha1sums = bb4543680a8fb9a7752811ffe12df15f0704903b
+ sha1sums = 8347e418458816e7b5875433690ed58dd198d6b7
+ sha1sums = 767480573e16cc75d0f81db29e6acc380fe81643
+ sha1sums = 1aa2d033d45a86e928ee58196fe5916da9376c18
+
+pkgname = objcryst-fox
+
diff --git a/Fox.desktop b/Fox.desktop
new file mode 100644
index 00000000000..17259aa1f41
--- /dev/null
+++ b/Fox.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Type=Application
+Encoding=UTF-8
+Name=Fox
+Comment=Crystal structure determination
+GenericName=Diffraction Analysis
+Icon=/usr/share/pixmaps/Fox.xpm
+Exec=Fox %F
+Terminal=False
+StartupNotify=true
+Categories=Education;Science;DataVisualization;
diff --git a/FoxServerThread.patch b/FoxServerThread.patch
new file mode 100644
index 00000000000..2865c1ff1d4
--- /dev/null
+++ b/FoxServerThread.patch
@@ -0,0 +1,26 @@
+diff -u10 -r objcryst-2017.2/Fox/src/FoxServerThread.cpp objcryst-2017.2.patched/Fox/src/FoxServerThread.cpp
+--- objcryst-2017.2/Fox/src/FoxServerThread.cpp 2017-06-28 22:21:21.000000000 +0200
++++ objcryst-2017.2.patched/Fox/src/FoxServerThread.cpp 2018-10-18 14:59:57.640722872 +0200
+@@ -63,21 +63,21 @@
+
+ //is still connected?
+ if(!m_pSocket->IsConnected()) {
+ CloseConnection();
+ wxThread::Sleep(1000);
+ break;
+ }
+
+ if(m_tThreadMutex->Lock()!=wxMUTEX_NO_ERROR) {
+ WriteLogMessage(_T("m_tThreadMutex locking error (Entry)"));
+- return false;
++ return 0;
+ }
+
+ WriteLogMessage(_T("Looping"));
+
+ if(m_newEvt){
+ m_newEvt=false;
+ switch(m_sckt_ntf)
+ {
+ case INPUT_MSG:
+ {
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..6a9c7e0b4f9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,65 @@
+# Maintainer: Mirko Scholz <srtlg>
+pkgname=objcryst-fox
+pkgver=2017.2
+pkgrel=1
+pkgdesc='A program for the ab initio structure determination from powder diffraction'
+arch=('i686' 'x86_64')
+url='http://fox.vincefn.net/FoxWiki'
+depends=('glu' 'freeglut' 'wxgtk2' 'fftw')
+makedepends=('libmariadbclient' 'newmat')
+license=('GPL2')
+source=(
+"Fox.desktop"
+"boost_C++0x.patch"
+"FoxServerThread.patch"
+"https://github.com/vincefn/objcryst/archive/v${pkgver}.tar.gz"
+"http://downloads.sourceforge.net/project/objcryst/3rdPartyLibraries/cctbx.tar.bz2")
+noextract=("cctbx.tar.bz2")
+sha1sums=('6d8bb12fe1add4481ac1733e9cf6aea57aedee61'
+ 'bb4543680a8fb9a7752811ffe12df15f0704903b'
+ '8347e418458816e7b5875433690ed58dd198d6b7'
+ '767480573e16cc75d0f81db29e6acc380fe81643'
+ '1aa2d033d45a86e928ee58196fe5916da9376c18')
+
+prepare() {
+ cd "${srcdir}/objcryst-${pkgver}"
+ # from Debian package
+ sed -i -e 's?install -m 755 src/Fox /usr/local/bin?install -Dm 755 src/Fox $(DESTDIR)/usr/bin/Fox?' Fox/gnu.mak
+ cd "${srcdir}/objcryst-${pkgver}"
+
+ cd "${srcdir}/objcryst-${pkgver}"
+ # http://fox.vincefn.net/Compile/Linux
+ cd ObjCryst
+ ln -sf rules-gnu.mak rules.mak
+ cd ../Fox
+ ln -sf gnu.mak Makefile
+
+ cd "${srcdir}/objcryst-${pkgver}"
+ # patch the faulty boost
+ # prevent it from beeing overwritten
+ sed -i -e 's/cd $(BUILD_DIR) && tar -xjf cctbx.tar.bz2/#/g' ObjCryst/rules-gnu.mak
+ # https://stackoverflow.com/questions/18900730/boostshared-ptrshared-ptrconst-boostshared-ptr-is-implicitly-declared
+ if [ ! -e cctbx.tar.bz2 ]; then
+ ln -s ../cctbx.tar.bz2
+ tar -xjf cctbx.tar.bz2
+ fgrep 'BOOST_LIB_VERSION "1_47"' cctbx/include/boost/version.hpp || exit 1
+ cd cctbx/include
+ patch -p2 < "${srcdir}/boost_C++0x.patch"
+
+ cd "${srcdir}/objcryst-${pkgver}"
+ patch -p1 < "${srcdir}/FoxServerThread.patch"
+ # else assume already patched
+ fi
+}
+
+build() {
+ cd "${srcdir}/objcryst-${pkgver}"
+ make shared=1 "RPM_OPT_FLAGS=${CXXFLAGS}" -C Fox
+}
+
+package() {
+ cd "${srcdir}/objcryst-${pkgver}"
+ make install -C Fox "DESTDIR=${pkgdir}"
+ install -Dm644 ${srcdir}/Fox.desktop "${pkgdir}/usr/share/applications/Fox.desktop"
+ install -Dm644 Fox/src/Fox.xpm "${pkgdir}/usr/share/pixmaps/Fox.xpm"
+}
diff --git a/boost_C++0x.patch b/boost_C++0x.patch
new file mode 100644
index 00000000000..2746d7f6259
--- /dev/null
+++ b/boost_C++0x.patch
@@ -0,0 +1,76 @@
+===================================================================
+--- a/trunk/boost/smart_ptr/shared_ptr.hpp
++++ b/trunk/boost/smart_ptr/shared_ptr.hpp
+@@ -198,5 +198,15 @@
+ }
+
+-// generated copy constructor, destructor are fine
++// generated copy constructor, destructor are fine...
++
++#if defined( BOOST_HAS_RVALUE_REFS )
++
++// ... except in C++0x, move disables the implicit copy
++
++ shared_ptr( shared_ptr const & r ): px( r.px ), pn( r.pn ) // never throws
++ {
++ }
++
++#endif
+
+ template<class Y>
+===================================================================
+--- a/trunk/boost/smart_ptr/weak_ptr.hpp
++++ b/trunk/boost/smart_ptr/weak_ptr.hpp
+@@ -41,6 +41,22 @@
+ }
+
+-// generated copy constructor, assignment, destructor are fine
+-
++// generated copy constructor, assignment, destructor are fine...
++
++#if defined( BOOST_HAS_RVALUE_REFS )
++
++// ... except in C++0x, move disables the implicit copy
++
++ weak_ptr( weak_ptr const & r ): px( r.px ), pn( r.pn ) // never throws
++ {
++ }
++
++ weak_ptr & operator=( weak_ptr const & r ) // never throws
++ {
++ px = r.px;
++ pn = r.pn;
++ return *this;
++ }
++
++#endif
+
+ //
+===================================================================
+--- a/trunk/boost/smart_ptr/shared_array.hpp
++++ b/trunk/boost/smart_ptr/shared_array.hpp
+@@ -70,5 +70,23 @@
+ }
+
+-// generated copy constructor, assignment, destructor are fine
++// generated copy constructor, destructor are fine...
++
++#if defined( BOOST_HAS_RVALUE_REFS )
++
++// ... except in C++0x, move disables the implicit copy
++
++ shared_array( shared_array const & r ): px( r.px ), pn( r.pn ) // never throws
++ {
++ }
++
++#endif
++
++ // assignment
++
++ shared_array & operator=( shared_array const & r ) // never throws
++ {
++ this_type( r ).swap( *this );
++ return *this;
++ }
+
+ void reset(T * p = 0)