[assimp] Changed upstream source to Github

rmattes rmattes at fedoraproject.org
Mon Mar 3 01:00:58 UTC 2014


commit ed7b0207e3b6059834ab30fe4d2b87eb2d695b0a
Author: Rich Mattes <richmattes at gmail.com>
Date:   Sun Mar 2 20:00:18 2014 -0500

    Changed upstream source to Github
    
    - Un-commented assimp-python, added python-devel to build deps
    - Added assimp-python3 subpackage

 .gitignore                     |    2 +
 assimp-3.0.1270-unbundle.patch |    6 ++--
 assimp-pythonpath.patch        |   20 ++++++++++++
 assimp.spec                    |   68 ++++++++++++++++++++++++++++------------
 assimp_generate_tarball.sh     |    8 +++--
 sources                        |    2 +-
 6 files changed, 79 insertions(+), 27 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 2971ebb..5a58404 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
 /assimp-1071.tar.bz2
 /assimp--3.0.1270-source-only.zip
+/assimp-3.0.1270-f849f6d.tar.gz
+/assimp-f849f6d9bd21efe802fa456184b1c3173e74a050-free.tar.bz2
diff --git a/assimp-3.0.1270-unbundle.patch b/assimp-3.0.1270-unbundle.patch
index 1f2af6d..e6ccf99 100644
--- a/assimp-3.0.1270-unbundle.patch
+++ b/assimp-3.0.1270-unbundle.patch
@@ -140,7 +140,7 @@ diff -ruN assimp--3.0.1270-source-only/code/CMakeLists.txt assimp--3.0.1270-sour
  	# Necessary to show the headers in the project when using the VC++ generator:
  	${Boost_SRCS}
  
-@@ -672,6 +672,26 @@
+@@ -670,6 +670,26 @@
  	INCLUDE_DIRECTORIES("../contrib/unzip")
  endif (UNZIP_FOUND)
  
@@ -165,8 +165,8 @@ diff -ruN assimp--3.0.1270-source-only/code/CMakeLists.txt assimp--3.0.1270-sour
 +
 +
  INSTALL( TARGETS assimp DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${LIBASSIMP_COMPONENT})
- INSTALL( FILES ${PUBLIC_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/assimp COMPONENT ${LIBASSIMP-DEV_COMPONENT})
- INSTALL( FILES ${COMPILER_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/assimp/Compiler COMPONENT ${LIBASSIMP-DEV_COMPONENT})
+ INSTALL( FILES ${PUBLIC_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/assimp COMPONENT assimp-dev)
+ INSTALL( FILES ${COMPILER_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/assimp/Compiler COMPONENT assimp-dev)
 diff -ruN assimp--3.0.1270-source-only/code/COBLoader.cpp assimp--3.0.1270-source-only-fedora/code/COBLoader.cpp
 --- assimp--3.0.1270-source-only/code/COBLoader.cpp	2012-04-23 00:26:28.000000000 -0400
 +++ assimp--3.0.1270-source-only-fedora/code/COBLoader.cpp	2013-05-01 19:28:57.627185100 -0400
diff --git a/assimp-pythonpath.patch b/assimp-pythonpath.patch
index 0da87d7..6b63466 100644
--- a/assimp-pythonpath.patch
+++ b/assimp-pythonpath.patch
@@ -16,3 +16,23 @@ diff -up ./port/PyAssimp/pyassimp/helper.py.pythonpath ./port/PyAssimp/pyassimp/
      ext_whitelist.append('.so')
  
  elif os.name=='nt':
+diff -up ./port/PyAssimp3/pyassimp/helper.py.pythonpath ./port/PyAssimp3/pyassimp/helper.py
+--- ./port/PyAssimp3/pyassimp/helper.py.pythonpath	2012-07-11 06:53:04.000000000 -0600
++++ ./port/PyAssimp3/pyassimp/helper.py	2014-03-02 02:50:14.253038683 -0700
+ # populate search directories and lists of allowed file extensions
+ # depending on the platform we're running on.
+ if os.name=='posix':
+-    additional_dirs.append('/usr/local/lib/')
++    additional_dirs.append('/usr/lib/')
++    additional_dirs.append('/usr/lib64/')
+ 
+     if sys.platform.lower() == 'darwin':
+         ext_whitelist.append('.dylib')
+@@ -25,6 +26,7 @@
+     # note - this won't catch libassimp.so.N.n, but 
+     # currently there's always a symlink called
+     # libassimp.so in /usr/local/lib.
++    ext_whitelist.append('.0')
+     ext_whitelist.append('.so')
+ 
+ elif os.name=='nt':
diff --git a/assimp.spec b/assimp.spec
index 2fd9fbc..b74fdf1 100644
--- a/assimp.spec
+++ b/assimp.spec
@@ -1,17 +1,20 @@
-%global svnrev 1270
+%global commit f849f6d9bd21efe802fa456184b1c3173e74a050
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
 
 Name:           assimp
 Version:        3.0.1270
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Library to import various 3D model formats into applications
 
 Group:          Development/Libraries
 License:        BSD
 URL:            http://assimp.sourceforge.net
-# Used 'assimp_generate_tarball svnrev' to generate source
-Source0:        http://downloads.sourceforge.net/%{name}/%{name}-3.0/%{name}--%{version}-source-only.zip
+# This is the source location, but use assimp_generate_tarball to remove the non-free
+# model files from the source distribution.
+#Source0:        https://github.com/%{name}/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
+Source0:	%{name}-%{commit}-free.tar.bz2
+# Assimp tarball comes with non-free models which must be removed from the source distribution
 Source1:        assimp_generate_tarball.sh
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 # Strips bundled irrXML out of build files, and allows project to build
 # against system versions of the libraries (not yet submitted upstream) 
@@ -31,6 +34,9 @@ BuildRequires:  doxygen
 BuildRequires:  minizip-devel
 BuildRequires:  poly2tri-devel
 BuildRequires:  polyclipping-devel
+BuildRequires:  python-devel
+BuildRequires:  python3-devel
+
 %description
 Assimp, the Open Asset Import Library, is a free library to import 
 various well-known 3D model formats into applications.  Assimp aims 
@@ -48,18 +54,28 @@ This package contains the header files and libraries
 for assimp. If you would like to develop programs using assimp,
 you will need to install assimp-devel.
 
-#%package python
-#Summary: Python bindings for assimp
-#Group: Development/Libraries
-#BuildArch: noarch
-#Requires: %{name} = %{version}-%{release}
-#Requires: python
+%package python
+Summary: Python bindings for assimp
+Group: Development/Libraries
+BuildArch: noarch
+Requires: %{name} = %{version}-%{release}
+Requires: python
 
-#%description python
-#This package contains the PyAssimp python bindings
+%description python
+This package contains the PyAssimp python bindings
+
+%package python3
+Summary: Python 3 bindings for assimp
+Group: Development/Libraries
+BuildArch: noarch
+Requires: %{name} = %{version}-%{release}
+Requires: python3
+
+%description python3
+This package contains the PyAssimp3 python bindings
 
 %prep
-%setup -q -n %{name}--%{version}-source-only
+%setup -q -n %{name}-%{commit}
 # Get rid of bundled libs so we can't accidently build against them
 rm -rf contrib/cppunit-1.12.1
 rm -rf contrib/irrXML
@@ -70,7 +86,7 @@ rm -rf contrib/poly2tri
 %patch1 -p1
 %patch2 -p1
 #%patch3 -p0
-#%patch4 -p0
+%patch4 -p0
 
 %build
 mkdir build
@@ -86,14 +102,16 @@ cp AssimpDoc_Html/dragonsplash.png html/dragonsplash.png
 popd
 
 # Fix file encoding
-dos2unix README LICENSE CREDITS
+dos2unix README LICENSE CREDITS port/PyAssimp/README port/PyAssimp3/README
 iconv -f iso8859-1 -t utf-8 CREDITS > CREDITS.conv && mv -f CREDITS.conv CREDITS
 
 %install
 rm -rf %{buildroot}
 make -C build install DESTDIR=%{buildroot}
-mkdir -p %{buildroot}%{python_sitelib}/pyassimp/
-#install -p  port/PyAssimp/pyassimp/*.py %{buildroot}%{python_sitelib}/pyassimp/
+mkdir -p %{buildroot}%{python2_sitelib}/pyassimp/
+install -m0644 port/PyAssimp/pyassimp/*.py %{buildroot}%{python2_sitelib}/pyassimp/
+mkdir -p %{buildroot}%{python3_sitelib}/pyassimp/
+install -m0644 port/PyAssimp3/pyassimp/*.py %{buildroot}%{python3_sitelib}/pyassimp/
 
 %clean
 rm -rf %{buildroot}
@@ -117,10 +135,20 @@ rm -rf %{buildroot}
 %{_libdir}/pkgconfig/*.pc
 %{_libdir}/cmake/%{name}-3.0
 
-#%files python
-#%{python_sitelib}/pyassimp
+%files python
+%doc port/PyAssimp/README
+%{python_sitelib}/pyassimp
+
+%files python3
+%doc port/PyAssimp3/README
+%{python3_sitelib}/pyassimp
 
 %changelog
+* Sun Mar 02 2014 Scott K Logan <logans at cottsay.net> - 3.0.1270-4
+- Changed upstream source to Github
+- Un-commented assimp-python, added python-devel to build deps
+- Added assimp-python3 subpackage
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.0.1270-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 
diff --git a/assimp_generate_tarball.sh b/assimp_generate_tarball.sh
index c16af7e..fc0ea1d 100644
--- a/assimp_generate_tarball.sh
+++ b/assimp_generate_tarball.sh
@@ -1,7 +1,9 @@
 #!/bin/bash
-svn export -r $1 http://assimp.svn.sourceforge.net/svnroot/assimp/trunk assimp
-pushd assimp
+COMMIT=f849f6d9bd21efe802fa456184b1c3173e74a050
+wget --content-disposition https://github.com/assimp/assimp/archive/$COMMIT/assimp-$COMMIT.tar.gz
+tar xvf assimp-$COMMIT.tar.gz
+pushd assimp-$COMMIT
 find ./ -name "*.dll" -exec rm -r {} \;
 rm -rf test/models-nonbsd
 popd
-tar cjf assimp-$1.tar.bz2 assimp/
+tar cjf assimp-$COMMIT-free.tar.bz2 assimp-$COMMIT/
diff --git a/sources b/sources
index f92e335..5d604ec 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-52aa4cf4e34e6b2a9c5f6c0b3c319af1  assimp--3.0.1270-source-only.zip
+30a97f5b249a3f74a869fea1b81874ab  assimp-f849f6d9bd21efe802fa456184b1c3173e74a050-free.tar.bz2


More information about the scm-commits mailing list