[portmidi] - Update to 217

Orcan Ogetbil oget at fedoraproject.org
Sat Oct 9 06:37:35 UTC 2010


commit f6ea614413febb99347fb06e0018fdedc9243625
Author: Orcan Ogetbil <oget.fedora at gmail.com>
Date:   Sat Oct 9 02:37:42 2010 -0400

    - Update to 217

 .gitignore           |    1 +
 portmidi-cmake.patch |   43 ++++++++++++++-----------------------------
 portmidi.spec        |   45 +++++++++++++++++++++++++++++----------------
 sources              |    2 +-
 4 files changed, 45 insertions(+), 46 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 2405ba3..a3f2b98 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 portmidi-src-200.zip
+/portmidi-src-217.zip
diff --git a/portmidi-cmake.patch b/portmidi-cmake.patch
index e677d6e..149de6d 100644
--- a/portmidi-cmake.patch
+++ b/portmidi-cmake.patch
@@ -1,20 +1,7 @@
-diff -rupN portmidi.old/pm_common/CMakeLists.txt portmidi.new/pm_common/CMakeLists.txt
---- portmidi.old/pm_common/CMakeLists.txt	2009-11-20 01:18:06.000000000 -0500
-+++ portmidi.new/pm_common/CMakeLists.txt	2010-01-30 00:22:50.000000000 -0500
-@@ -72,11 +72,7 @@ if(UNIX)
-     # JAVA_INCLUDE_PATH2; if no, then we need to make both JAVA_INCLUDE_PATH
-     # and JAVA_INCLUDE_PATH2 set by user (will need clear documentation
-     # because JAVA_INCLUDE_PATH2 is pretty obscure)
--    set(JAVA_INCLUDE_PATH  ${JAVA_INCLUDE_PATH-UNKNOWN}
--        CACHE STRING "where to find Java SDK include directory")
--    set(JAVA_INCLUDE_PATHS ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH}/linux)
--    # libjvm.so is found relative to JAVA_INCLUDE_PATH:
--    set(JAVAVM_LIB ${JAVA_INCLUDE_PATH}/../jre/lib/i386/client/libjvm.so)
-+    set(JAVAVM_LIB ${JAVA_JVM_LIBRARY})
- 
-     set(LINUXSRC pmlinuxalsa pmlinux finddefault)
-     prepend_path(LIBSRC ../pm_linux/ ${LINUXSRC})
-@@ -125,9 +121,9 @@ set_target_properties(pmjni PROPERTIES E
+diff -rupN portmidi.old/pm_common/CMakeLists.txt portmidi/pm_common/CMakeLists.txt
+--- portmidi.old/pm_common/CMakeLists.txt	2010-09-20 15:57:48.000000000 -0400
++++ portmidi/pm_common/CMakeLists.txt	2010-10-09 01:14:53.000000000 -0400
+@@ -120,8 +120,8 @@ set_target_properties(pmjni PROPERTIES E
  # install the libraries (Linux and Mac OS X command line)
  if(UNIX)
    INSTALL(TARGETS portmidi-static pmjni
@@ -24,12 +11,10 @@ diff -rupN portmidi.old/pm_common/CMakeLists.txt portmidi.new/pm_common/CMakeLis
 +    ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
  # .h files installed by pm_dylib/CMakeLists.txt, so don't need them here
  #  INSTALL(FILES portmidi.h ../porttime/porttime.h
--#    DESTINATION /usr/local/include)
-+#    DESTINATION ${INCLUDE_INSTALL_DIR})
- endif(UNIX)
-diff -rupN portmidi.old/pm_dylib/CMakeLists.txt portmidi.new/pm_dylib/CMakeLists.txt
+ #    DESTINATION /usr/local/include)
+diff -rupN portmidi.old/pm_dylib/CMakeLists.txt portmidi/pm_dylib/CMakeLists.txt
 --- portmidi.old/pm_dylib/CMakeLists.txt	2009-11-20 00:41:09.000000000 -0500
-+++ portmidi.new/pm_dylib/CMakeLists.txt	2010-01-30 00:26:15.000000000 -0500
++++ portmidi/pm_dylib/CMakeLists.txt	2010-10-09 01:17:32.000000000 -0400
 @@ -59,7 +59,7 @@ if(UNIX)
  
      set(JAVAVM_LIB "${FRAMEWORK_PATH}/JavaVM.framework")
@@ -71,9 +56,9 @@ diff -rupN portmidi.old/pm_dylib/CMakeLists.txt portmidi.new/pm_dylib/CMakeLists
 -    DESTINATION /usr/local/include)
 +    DESTINATION ${INCLUDE_INSTALL_DIR})
  endif(UNIX)
-diff -rupN portmidi.old/pm_java/CMakeLists.txt portmidi.new/pm_java/CMakeLists.txt
+diff -rupN portmidi.old/pm_java/CMakeLists.txt portmidi/pm_java/CMakeLists.txt
 --- portmidi.old/pm_java/CMakeLists.txt	2009-11-04 10:20:44.000000000 -0500
-+++ portmidi.new/pm_java/CMakeLists.txt	2010-01-30 00:28:35.000000000 -0500
++++ portmidi/pm_java/CMakeLists.txt	2010-10-09 01:18:10.000000000 -0400
 @@ -41,7 +41,7 @@ if(UNIX)
      INSTALL(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pmdefaults.jar
        DESTINATION /usr/share/java)
@@ -83,15 +68,15 @@ diff -rupN portmidi.old/pm_java/CMakeLists.txt portmidi.new/pm_java/CMakeLists.t
    endif(APPLE)
  endif(UNIX)
  # In windows, use pm_java/make.bat
-diff -rupN portmidi.old/pm_test/CMakeLists.txt portmidi.new/pm_test/CMakeLists.txt
---- portmidi.old/pm_test/CMakeLists.txt	2009-11-04 10:20:44.000000000 -0500
-+++ portmidi.new/pm_test/CMakeLists.txt	2010-01-30 00:41:56.000000000 -0500
+diff -rupN portmidi.old/pm_test/CMakeLists.txt portmidi/pm_test/CMakeLists.txt
+--- portmidi.old/pm_test/CMakeLists.txt	2010-09-20 15:57:48.000000000 -0400
++++ portmidi/pm_test/CMakeLists.txt	2010-10-09 02:36:31.000000000 -0400
 @@ -12,7 +12,7 @@ endif(WIN32)
  
  macro(make_a_test name)
    add_executable(${name} ${name}.c)
 -  target_link_libraries(${name} portmidi-static ${PM_NEEDED_LIBS})
-+  target_link_libraries(${name} portmidi-dynamic ${PM_NEEDED_LIBS})
++  target_link_libraries(${name} portmidi-dynamic)
+   add_dependencies(${name} portmidi-static)
  endmacro(make_a_test)
  
- make_a_test(test)
diff --git a/portmidi.spec b/portmidi.spec
index 6be8df4..c8d8581 100644
--- a/portmidi.spec
+++ b/portmidi.spec
@@ -2,8 +2,8 @@
 %global with_gcj %{!?_without_gcj:1}%{?_without_gcj:0}
 Summary:        Real-time Midi I/O Library
 Name:           portmidi
-Version:        200
-Release:        4%{?dist}
+Version:        217
+Release:        1%{?dist}
 License:        MIT
 Group:          System Environment/Libraries
 URL:            http://portmedia.sourceforge.net/
@@ -17,7 +17,7 @@ BuildRequires:  cmake
 BuildRequires:  desktop-file-utils
 BuildRequires:  java-devel >= 1.5
 BuildRequires:  jpackage-utils
-BuildRequires:  python-devel
+BuildRequires:  python2-devel
 BuildRequires:  doxygen
 BuildRequires:  tex(latex)
 BuildRequires:    java-gcj-compat-devel >= 1.0.31
@@ -26,7 +26,7 @@ Requires(postun): java-gcj-compat >= 1.0.31
 
 %description
 PortMedia is a set of simple clean APIs and cross-platform library
-implementations for music and other media. PortMidi subproject provides a
+implementations for music and other media. PortMidi sub-project provides a
 real-time MIDI input/output library. This package contains the PortMidi
 libraries.
 
@@ -37,7 +37,7 @@ Requires:       %{name} = %{version}-%{release}
 
 %description devel
 PortMedia is a set of simple clean APIs and cross-platform library
-implementations for music and other media. PortMidi subproject provides a
+implementations for music and other media. PortMidi sub-project provides a
 real-time MIDI input/output library. This package contains the header files
 and the documentation of PortMidi libraries.
 
@@ -48,7 +48,7 @@ Requires:       %{name} = %{version}-%{release}
 
 %description -n python-%{name}
 PortMedia is a set of simple clean APIs and cross-platform library
-implementations for music and other media. PortMidi subproject provides a
+implementations for music and other media. PortMidi sub-project provides a
 real-time MIDI input/output library. This package contains the python
 bindings of PortMidi libraries. It can send and receive MIDI data in
 real-time from Python.
@@ -63,7 +63,7 @@ Requires:       %{name} = %{version}-%{release}
 
 %description tools
 PortMedia is a set of simple clean APIs and cross-platform library
-implementations for music and other media. PortMidi subproject provides a
+implementations for music and other media. PortMidi sub-project provides a
 real-time MIDI input/output library. This package contains the PortMidi
 configuration utility "pmdefaults" and some test applications.
 
@@ -97,7 +97,7 @@ sed -i -e 's|^java|#!/bin/sh\njava \\\
 
 %build
 export JAVA_HOME=%{java_home}
-%cmake -DCMAKE_CACHEFILE_DIR=%{_builddir}/%{name}/build -DVERSION=%{version} .
+%cmake -DCMAKE_SKIP_BUILD_RPATH=1 -DCMAKE_CACHEFILE_DIR=%{_builddir}/%{name}/build -DVERSION=%{version} .
 make %{?_smp_flags}
 
 # Build the doxygen documentation:
@@ -109,10 +109,11 @@ popd
 # Build python modules
 PYTHON_VER=$(python -c "from sys import version; print (version[:3])")
 PYTHON_INC=$(python -c "from distutils.sysconfig import get_python_inc; print get_python_inc()")
-pushd pm_python
-   gcc %{optflags} -fPIC -c -o pypm.o -I../pm_common \
-       -I../porttime -I$PYTHON_INC pypm.c
-   gcc -shared -o pypm.so  pypm.o -lportmidi -lpython$PYTHON_VER -L../build/Release
+pushd pm_python/pyportmidi
+   gcc %{optflags} -pthread -fPIC -c -o _pyportmidi.o -I../../pm_common \
+       -I../../porttime -I$PYTHON_INC _pyportmidi.c
+   gcc -shared -o _pyportmidi.so _pyportmidi.o -lportmidi -lpython$PYTHON_VER \
+       -L../../build/Release
 popd
 
 %install
@@ -146,8 +147,17 @@ desktop-file-install \
 install -pm 644 pm_common/pmutil.h %{buildroot}%{_includedir}/
 
 # Install python modules
-mkdir -p %{buildroot}%{python_sitearch}
-install -pm 755 pm_python/pypm.so %{buildroot}%{python_sitearch}/
+mkdir -p %{buildroot}%{python_sitearch}/pyportmidi
+pushd pm_python/pyportmidi
+   install -pm 755 _pyportmidi.so %{buildroot}%{python_sitearch}/pyportmidi/
+   install -pm 644 *.py %{buildroot}%{python_sitearch}/pyportmidi/
+popd
+
+# we don't want to provide private python extension libs
+%{?filter_setup:
+%filter_provides_in %{python_sitearch}/.*\.so$ 
+%filter_setup
+}
 
 # Remove duplicate library
 rm -f %{buildroot}%{_libdir}/libportmidi_s.so
@@ -198,8 +208,8 @@ rm -rf %{buildroot}
 
 %files -n python-%{name}
 %defattr(-,root,root,-)
-%doc pm_python/README.txt pm_python/test.py pm_python/miniTest.py
-%{python_sitearch}/pypm.so
+%doc pm_python/README_PYTHON.txt
+%{python_sitearch}/pyportmidi/
 
 %files devel
 %defattr(-,root,root,-)
@@ -209,6 +219,9 @@ rm -rf %{buildroot}
 %{_libdir}/lib*.so
 
 %changelog
+* Sat Oct 09 2010 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 217-1
+- Update to 217
+
 * Fri Jul 23 2010 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 200-4
 - Fix python module build
 
diff --git a/sources b/sources
index 72c553d..06b5962 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-26053a105d938395227bb6ae1d78643b  portmidi-src-200.zip
+03f46fd3947e2ef4c8c465baaf832241  portmidi-src-217.zip


More information about the scm-commits mailing list