From: Rick Farina Date: Thu, 19 Mar 2020 16:38:25 +0000 (-0400) Subject: media-libs/portmidi: fix bug #706272 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7f49b9978387b34586265986466bfd48cdc3b26d;p=gentoo.git media-libs/portmidi: fix bug #706272 Package-Manager: Portage-2.3.94, Repoman-2.3.21 Signed-off-by: Rick Farina --- diff --git a/media-libs/portmidi/files/portmidi-217-python.patch b/media-libs/portmidi/files/portmidi-217-python.patch deleted file mode 100644 index 5682c3344358..000000000000 --- a/media-libs/portmidi/files/portmidi-217-python.patch +++ /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"] - ) - ] diff --git a/media-libs/portmidi/files/portmidi-217-r3-python.patch b/media-libs/portmidi/files/portmidi-217-r4-python.patch 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 d4024710fa39..23ef6c3add1e 100644 --- a/media-libs/portmidi/files/portmidi-217-r3-python.patch +++ b/media-libs/portmidi/files/portmidi-217-r4-python.patch @@ -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"] ) diff --git a/media-libs/portmidi/portmidi-217-r3.ebuild b/media-libs/portmidi/portmidi-217-r3.ebuild index 00f5c0691159..eb76338eb2ff 100644 --- a/media-libs/portmidi/portmidi-217-r3.ebuild +++ b/media-libs/portmidi/portmidi-217-r3.ebuild @@ -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