- up to 1.2.0
authorJan Rękorajski <baggins@pld-linux.org>
Thu, 13 Apr 2017 10:51:43 +0000 (12:51 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Thu, 13 Apr 2017 10:51:43 +0000 (12:51 +0200)
avogadro-cmake.patch
avogadro.spec
gcc6.patch [new file with mode: 0644]

index 63f8904..91239b3 100644 (file)
@@ -1,18 +1,15 @@
 diff -ur avogadro-1.0.3/CMakeLists.txt avogadro-1.0.3-mkspecs-dir/CMakeLists.txt
 --- avogadro-1.0.3/CMakeLists.txt      2011-04-25 07:29:58.000000000 +0200
 +++ avogadro-1.0.3-mkspecs-dir/CMakeLists.txt  2011-04-27 02:42:26.000000000 +0200
-@@ -491,7 +491,7 @@
- if(QT_MKSPECS_DIR AND INSTALL_QMAKE_PRF)
-     install(FILES
-       "${CMAKE_CURRENT_BINARY_DIR}/avogadro.prf"
--      DESTINATION "${CMAKE_INSTALL_PREFIX}/${QT_MKSPECS_RELATIVE}/features"
-+      DESTINATION "${QT_MKSPECS_DIR}/features"
-     )
- else(QT_MKSPECS_DIR AND INSTALL_QMAKE_PRF)
-   message(WARNING "Qt mkspecs directory not found. File 'avogadro.prf' will be installed to ${SHARE_INSTALL_PREFIX}/avogadro/qmake.")
-diff -ur avogadro-1.0.3/CMakeLists.txt avogadro-1.0.3-no-strip/CMakeLists.txt
---- avogadro-1.0.3/CMakeLists.txt      2011-04-25 07:29:58.000000000 +0200
-+++ avogadro-1.0.3-no-strip/CMakeLists.txt     2011-04-27 18:44:02.000000000 +0200
+@@ -95,8 +95,6 @@
+   if(NOT APPLE) # Mac GCC42 compiler has bug
+     check_cxx_compiler_flag(-fvisibility=hidden HAVE_GCC_VISIBILITY)
+     set(HAVE_GCC_VISIBILITY ${HAVE_GCC_VISIBILITY} CACHE BOOL "GCC support for hidden visibility")
+-    macro_ensure_version("4.1.0" "${_gcc_version}" GCC_IS_NEWER_THAN_4_1)
+-    macro_ensure_version("4.2.0" "${_gcc_version}" GCC_IS_NEWER_THAN_4_2)
+     set(_GCC_COMPILED_WITH_BAD_ALLOCATOR FALSE)
+     if (GCC_IS_NEWER_THAN_4_1)
+       exec_program(${CMAKE_C_COMPILER} ARGS -v OUTPUT_VARIABLE _gcc_alloc_info)
 @@ -98,7 +98,7 @@
        endif (NOT APPLE)
    # Set up additional build flags for particular build types. These will be added to CMAKE_CXX_FLAGS,
@@ -22,3 +19,23 @@ diff -ur avogadro-1.0.3/CMakeLists.txt avogadro-1.0.3-no-strip/CMakeLists.txt
    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
      "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${CMAKE_CXX_FLAGS_WARN}")
    set(CMAKE_CXX_FLAGS_DEBUG   "-g3 -fno-inline ${CMAKE_CXX_FLAGS_WARN}")
+@@ -491,7 +491,7 @@
+ if(QT_MKSPECS_DIR AND INSTALL_QMAKE_PRF)
+     install(FILES
+       "${CMAKE_CURRENT_BINARY_DIR}/avogadro.prf"
+-      DESTINATION "${CMAKE_INSTALL_PREFIX}/${QT_MKSPECS_RELATIVE}/features"
++      DESTINATION "${QT_MKSPECS_DIR}/features"
+     )
+ else(QT_MKSPECS_DIR AND INSTALL_QMAKE_PRF)
+   message(WARNING "Qt mkspecs directory not found. File 'avogadro.prf' will be installed to ${SHARE_INSTALL_PREFIX}/avogadro/qmake.")
+diff -ur avogadro-1.2.0/libavogadro/src/extensions/symmetry/libmsym/CMakeLists.txt avogadro-1.2.0.build/libavogadro/src/extensions/symmetry/libmsym/CMakeLists.txt
+--- avogadro-1.2.0/libavogadro/src/extensions/symmetry/libmsym/CMakeLists.txt  2016-06-08 16:19:45.000000000 +0200
++++ avogadro-1.2.0.build/libavogadro/src/extensions/symmetry/libmsym/CMakeLists.txt    2017-04-13 11:58:44.627114834 +0200
+@@ -38,6 +38,7 @@
+ #        C_STANDARD_REQUIRED ON)
+ set_target_properties(msym PROPERTIES PUBLIC_HEADER "src/msym.h;src/msym_error.h")
++target_link_libraries(msym m)
+ export(TARGETS msym FILE "${PROJECT_BINARY_DIR}/libmsymTargets.cmake")
index 1fe786e..c0157cc 100644 (file)
@@ -1,15 +1,15 @@
 Summary:       An advanced molecular editor for chemical purposes
 Name:          avogadro
-Version:       1.0.3
+Version:       1.2.0
 Release:       17
 License:       GPL v2
 Group:         Applications/Editors
-Source0:       http://downloads.sourceforge.net/avogadro/%{name}-%{version}.tar.bz2
-# Source0-md5: 92c2702c1980f70fb6d87a1a58147911
+Source0:       http://downloads.sourceforge.net/avogadro/%{name}-%{version}.tar.gz
+# Source0-md5: 3206068fc27bd3b717c568ee72f1e5ec
 Patch0:                %{name}-linguist.patch
 Patch1:                %{name}-cmake.patch
 Patch2:                %{name}-moc-boost.patch
-Patch3:                link-X11.patch
+Patch3:                gcc6.patch
 Patch4:                python-install.patch
 URL:           http://avogadro.openmolecules.net/
 BuildRequires: QtNetwork-devel
@@ -74,7 +74,7 @@ cd build
        -DCMAKE_BUILD_TYPE=Release \
        ..
 
-%{__make}
+%{__make} -j1
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -91,9 +91,10 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog COPYING
+%doc AUTHORS COPYING
 %attr(755,root,root) %{_bindir}/%{name}
 %attr(755,root,root) %{_bindir}/avopkg
+%attr(755,root,root) %{_bindir}/qube
 %{_datadir}/%{name}
 %{_pixmapsdir}/%{name}-icon.png
 %{_desktopdir}/%{name}.desktop
@@ -106,6 +107,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/%{name}
 %{_libdir}/*.so
 %{_datadir}/qt4/mkspecs/features/avogadro.prf
+%{_pkgconfigdir}/avogadro.pc
 
 %files libs
 %defattr(644,root,root,755)
diff --git a/gcc6.patch b/gcc6.patch
new file mode 100644 (file)
index 0000000..25628f0
--- /dev/null
@@ -0,0 +1,19 @@
+diff -ur avogadro-1.2.0/libavogadro/src/extensions/symmetry/libmsym/src/orbital.c avogadro-1.2.0.build/libavogadro/src/extensions/symmetry/libmsym/src/orbital.c
+--- avogadro-1.2.0/libavogadro/src/extensions/symmetry/libmsym/src/orbital.c   2016-06-08 16:19:45.000000000 +0200
++++ avogadro-1.2.0.build/libavogadro/src/extensions/symmetry/libmsym/src/orbital.c     2017-04-13 11:56:21.795761712 +0200
+@@ -67,13 +67,13 @@
+         }
+         case 2 : {
+             //o->v = dpolynomial[m+l];
+-            char *d = (signbit(m) == 1 ? "-" : "+");
++            char *d = (m < 0 ? "-" : "+");
+             snprintf(o->name, sizeof(o->name), "%dd%d%s",n,abs(m),d);
+             break;
+         }
+         default : {
+             char t = 'f' - 3 + l;
+-            char *d = (signbit(m) == 1 ? "-" : "+");
++            char *d = (m < 0 ? "-" : "+");
+             snprintf(o->name, sizeof(o->name), "%d%c%d%s",n,t,abs(m),d);
+         }
+     }
This page took 0.088544 seconds and 4 git commands to generate.