media-libs/portmidi: fix bug #706272
authorRick Farina <zerochaos@gentoo.org>
Thu, 19 Mar 2020 16:38:25 +0000 (12:38 -0400)
committerRick Farina <zerochaos@gentoo.org>
Thu, 19 Mar 2020 16:38:33 +0000 (12:38 -0400)
Package-Manager: Portage-2.3.94, Repoman-2.3.21
Signed-off-by: Rick Farina <zerochaos@gentoo.org>
media-libs/portmidi/files/portmidi-217-python.patch [deleted file]
media-libs/portmidi/files/portmidi-217-r4-python.patch [moved from media-libs/portmidi/files/portmidi-217-r3-python.patch with 76% similarity]
media-libs/portmidi/portmidi-217-r3.ebuild

diff --git a/media-libs/portmidi/files/portmidi-217-python.patch b/media-libs/portmidi/files/portmidi-217-python.patch
deleted file mode 100644 (file)
index 5682c33..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
---- portmidi/pm_python/setup.py
-+++ portmidi/pm_python/setup.py
-@@ -15,12 +15,10 @@
- DESCRIPTION = open('README_PYTHON.txt').read()
--CHANGES = open('CHANGES.txt').read()
--TODO = open('TODO.txt').read()
- EXTRAS = {}
--long_description = DESCRIPTION + CHANGES + TODO
-+long_description = DESCRIPTION
- #import sys
- #if "checkdocs" in sys.argv:
- #    print long_description
-@@ -173,7 +171,8 @@
-     EXTENSION = dict(
-         ext_modules=[ 
-             Extension("pyportmidi._pyportmidi", [os.path.join("pyportmidi", "_pyportmidi.pyx")],
-                       library_dirs=["./linux"],
-+                      include_dirs=["../pm_common", "../porttime"],
-                       libraries = ["portmidi", "asound", "pthread"]
-                       )
-         ]
similarity index 76%
rename from media-libs/portmidi/files/portmidi-217-r3-python.patch
rename to media-libs/portmidi/files/portmidi-217-r4-python.patch
index d4024710fa390b556cad66b993589384e5d31bf2..23ef6c3add1ef793232c29b5937403554f23f089 100644 (file)
@@ -1,8 +1,7 @@
-diff --git a/pm_python/setup.py b/pm_python/setup.py
-index 14ab1c7..5b1e7c0 100644
---- a/pm_python/setup.py
-+++ b/pm_python/setup.py
-@@ -15,12 +15,10 @@ except ImportError:
+diff -Naur portmidi-a/pm_python/setup.py portmidi-b/pm_python/setup.py
+--- portmidi-a/pm_python/setup.py      2010-09-26 15:32:44.000000000 -0400
++++ portmidi-b/pm_python/setup.py      2020-03-19 12:34:34.398365103 -0400
+@@ -15,12 +15,10 @@
  
  
  DESCRIPTION = open('README_PYTHON.txt').read()
@@ -16,7 +15,7 @@ index 14ab1c7..5b1e7c0 100644
  #import sys
  #if "checkdocs" in sys.argv:
  #    print long_description
-@@ -142,7 +140,7 @@ PACKAGEDATA.update(EXTRAS)
+@@ -142,7 +140,7 @@
  
  
  if sys.platform == 'win32':
@@ -25,7 +24,7 @@ index 14ab1c7..5b1e7c0 100644
      EXTENSION = dict(
          ext_modules=[ 
              Extension("pyportmidi._pyportmidi", [os.path.join("pyportmidi", "_pyportmidi.pyx")],
-@@ -154,7 +152,7 @@ if sys.platform == 'win32':
+@@ -154,7 +152,7 @@
          ]
      )
  elif sys.platform == 'darwin':
@@ -34,7 +33,7 @@ index 14ab1c7..5b1e7c0 100644
      library_dirs = ["/usr/local/lib"]
      include_dirs = ["/usr/local/include"]
      EXTENSION = dict(
-@@ -169,11 +167,12 @@ elif sys.platform == 'darwin':
+@@ -169,11 +167,11 @@
          ]
      )
  else:
@@ -44,7 +43,6 @@ index 14ab1c7..5b1e7c0 100644
          ext_modules=[ 
              Extension("pyportmidi._pyportmidi", [os.path.join("pyportmidi", "_pyportmidi.pyx")],
 -                      library_dirs=["./linux"],
-+                      library_dirs=["../../portmidi*build"],
 +                      include_dirs=["../pm_common", "../porttime"],
                        libraries = ["portmidi", "asound", "pthread"]
                        )
index 00f5c0691159a755617d34538a619c33d20d24e1..eb76338eb2ff506d9ee6dceba2defa32d1c2987f 100644 (file)
@@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{6,7,8} )
 DISTUTILS_OPTIONAL=1
 # ninja: error: build.ninja:521: multiple rules generate pm_java/pmdefaults.jar [-w dupbuild=err]
 CMAKE_MAKEFILE_GENERATOR="emake"
-inherit cmake desktop xdg distutils-r1 java-pkg-opt-2
+inherit cmake desktop xdg distutils-r1 java-pkg-opt-2 flag-o-matic
 
 DESCRIPTION="Library for real time MIDI input and output"
 HOMEPAGE="http://portmedia.sourceforge.net/"
@@ -50,7 +50,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-cmake.patch
 
        # add include directories and remove references to missing files
-       "${FILESDIR}"/${PF}-python.patch
+       "${FILESDIR}"/${P}-r4-python.patch
 )
 
 pkg_setup() {
@@ -97,6 +97,7 @@ src_compile() {
        if use python ; then
                sed -i -e "/library_dirs=.*linux/s#./linux#${CMAKE_BUILD_DIR}#" pm_python/setup.py || die
                pushd pm_python > /dev/null
+               append-ldflags -L"${BUILD_DIR}"
                distutils-r1_src_compile
                popd > /dev/null
        fi