From d3838576ebffa12d6bf3a1d7f63082e35db1e36d Mon Sep 17 00:00:00 2001 From: Richard Shaw Date: Sep 14 2019 18:15:13 +0000 Subject: Update for Coin4 and dependencies. Move to FreeCAD fork since it is supported. Move examples to a subpackage. --- diff --git a/.gitignore b/.gitignore index a4f0047..f7817cb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /Pivy-0.5.0-hg609.tar.gz /Pivy-db2e64a4a880.tar.gz +/pivy-0.6.5a2.tar.gz diff --git a/pivy-cmake.patch b/pivy-cmake.patch index ecdb5ac..9bc5206 100644 --- a/pivy-cmake.patch +++ b/pivy-cmake.patch @@ -1,26 +1,26 @@ ---- a/CMakeLists.txt 2018-08-11 14:28:26.000000000 +0300 -+++ b/CMakeLists.txt 2018-12-28 12:20:14.564717047 +0200 -@@ -2,7 +2,10 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,7 +2,10 @@ project(pivy_cmake_setup NONE) cmake_minimum_required(VERSION 3.5) -find_package(Coin CONFIG REQUIRED) +#find_package(Coin CONFIG REQUIRED) -+set(Coin_INCLUDE_DIR "/usr/include/Coin3") ++set(Coin_INCLUDE_DIR "/usr/include/Coin4") +set(Coin_LIB_DIR "/usr/lib64/") -+set(Coin_VERSION "2.5.0") ++set(Coin_VERSION "4.0.0") if (Coin_INCLUDE_DIR) - MESSAGE(STATUS "COIN_FOUND: " true) -@@ -16,7 +19,10 @@ + MESSAGE(STATUS "COIN_FOUND: true") +@@ -16,7 +19,10 @@ MESSAGE(STATUS "COIN_VERSION: ${Coin_VER -find_package(soqt CONFIG QUIET) +#find_package(soqt CONFIG QUIET) -+set(SoQt_INCLUDE_DIRS "/usr/include/Coin3/") ++set(SoQt_INCLUDE_DIRS "/usr/include/Coin4") +set(SoQt_LIBRARY_DIRS "/usr/lib64") -+set(SoQt_VERSION "1.5.0") ++set(SoQt_VERSION "1.6.0") if (SoQt_INCLUDE_DIRS) - MESSAGE(STATUS "SOQT_FOUND: " true) + MESSAGE(STATUS "SOQT_FOUND: true") diff --git a/pivy-setup_py.patch b/pivy-setup_py.patch new file mode 100644 index 0000000..1935e76 --- /dev/null +++ b/pivy-setup_py.patch @@ -0,0 +1,28 @@ +--- a/setup.py ++++ b/setup.py +@@ -144,7 +144,7 @@ class pivy_build(build): + SWIG = ((sys.platform == "win32" and "swig.exe") or "swig") + + SWIG_SUPPRESS_WARNINGS = "-w302,306,307,312,314,325,361,362,467,389,503,509,510" +- SWIG_PARAMS = "-c++ -python -includeall -modern -D__PIVY__ " + \ ++ SWIG_PARAMS = "-c++ -python -includeall -D__PIVY__ " + \ + "-I. -Ifake_headers -I\"%s\" %s -o %s_wrap.cpp " + \ + "interfaces" + os.sep + "%s.i" + if sys.version_info.major >= 3: +--- a/interfaces/coin.i ++++ b/interfaces/coin.i +@@ -38,6 +38,7 @@ applications." + + #undef ANY + ++#include + #include "coin_header_includes.h" + + /* make GLState in SoGLLazyElement known to SWIG */ +@@ -106,4 +107,4 @@ for x in list(locals()): + except NameError: + # value == SoSearchAction_duringSearchAll ??? + pass +-%} +\ No newline at end of file ++%} diff --git a/python-pivy.spec b/python-pivy.spec index 08ef1e7..30d6e27 100644 --- a/python-pivy.spec +++ b/python-pivy.spec @@ -1,21 +1,20 @@ -%global realname Pivy -%global checkout db2e64a4a880 +%global alpha a2 Name: python-pivy Version: 0.6.5 -Release: 0.3%{?dist} -Summary: Python binding for Coin +Release: 0.4%{?dist} +Summary: Python binding for Coin3D License: ISC -URL: https://bitbucket.org/Coin3D/pivy/downloads/ +URL: https://github.com/FreeCAD/pivy + +# Move to FreeCAD fork as it is being supported. +Source0: https://github.com/FreeCAD/pivy/archive/pivy-%{version}%{alpha}.tar.gz -# No release for some time. Source is a mecurial checkout -# hg clone https://bitbucket.org/Coin3D/pivy/src Pivy -# hg archive Pivy-db2e64a4a880.tar.gz -Source0: Pivy-%{checkout}.tar.gz Patch0: pivy-cmake.patch +Patch1: pivy-setup_py.patch -BuildRequires: gcc cmake swig +BuildRequires: gcc gcc-c++ cmake swig BuildRequires: python3-devel BuildRequires: Coin4-devel BuildRequires: SoQt-devel @@ -30,24 +29,31 @@ a C++ Application Programming Interface. Coin uses scene-graph data structures\ to render real-time graphics suitable for mostly all kinds of scientific and\ engineering visualization applications.\ - %description %_description + %package -n python3-pivy Summary: %summary %{?python_provide:%python_provide python3-pivy} %description -n python3-pivy %_description + +%package examples +Summary: Pivy example files + +%description examples +%{summary} + %prep -%autosetup -p1 -n %{realname}-%{checkout} +%autosetup -p1 -n pivy-%{version}%{alpha} # Examples in the docs folder should not be set executable. find ./docs -name "*.py" -exec chmod -x {} \; %build -sed -i -e 's|QtInfo()|QtInfo(qmake_command=["qmake-qt4"])|g' setup.py +sed -i -e 's|QtInfo()|QtInfo(qmake_command=["qmake-qt5"])|g' setup.py export CFLAGS="%{optflags} -fpermissive" %py3_build @@ -67,12 +73,20 @@ find %{buildroot}%{python3_sitearch} -name "*.py" -exec sed -i "s|#!/usr/bin/env %files -n python3-pivy %license LICENSE -%doc AUTHORS examples NEWS README.md THANKS docs/* HACKING +%doc AUTHORS NEWS README.md THANKS docs/* HACKING %{python3_sitearch}/pivy/ %{python3_sitearch}/*.egg-info +%files examples +%doc examples + %changelog +* Thu Sep 05 2019 Richard Shaw - 0.6.5-0.4 +- Update for Coin4 and dependencies. +- Move to FreeCAD fork since it is supported. +- Move examples to a subpackage. + * Mon Aug 19 2019 Miro HronĨok - 0.6.5-0.3 - Rebuilt for Python 3.8 diff --git a/sources b/sources index 220b2cc..4a38a84 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Pivy-db2e64a4a880.tar.gz) = a623413d0f31403bb9fd6a44fa44a8391c1c6ab6f3818b766e06b90be54c4c0bfcc40b626dc05661dfd869e188a91b39af5ef133b4e32a3a4c8fa408f9060ef7 +SHA512 (pivy-0.6.5a2.tar.gz) = 677fcba5ec5f48845a61391342507446b8c1b52266918d07cd1d47f57bc4cbceb47f44eec262ca993f5dc394881367019c283a78fc3ba7c72eac426b9a741bd5