Skip to content
Permalink
Browse files

py-game: update to 1.9.5

  • Loading branch information
jmroot committed Apr 8, 2019
1 parent cb4803f commit 98fa4ac18784081ec04873989b96f5afdc2a2a59
@@ -4,8 +4,7 @@ PortSystem 1.0
PortGroup python 1.0

name py-game
version 1.9.4
revision 1
version 1.9.5
categories-append devel multimedia graphics
platforms darwin
license LGPL-2.1+
@@ -22,34 +21,45 @@ homepage http://www.pygame.org/
python.rootname Pygame
master_sites pypi:P/Pygame
distname pygame-${version}
checksums rmd160 8ff2ae8d1846cf7df237cf2350b1652be097d337 \
sha256 700d1781c999af25d11bfd1f3e158ebb660f72ebccb2040ecafe5069d0b2c0b6
checksums rmd160 07b56c042e99558b1f0fbba1c44eea7920f4f786 \
sha256 d15e7238015095a12c19379565a66285e989fdcb3807ec360b27338cd8bdaf05

python.versions 26 27 35 36 37
python.versions 27 35 36 37

if {$subport ne $name} {
patchfiles patch-config_darwin.py.diff \
patch-disable_portmidi.diff

depends_lib port:py${python.version}-numpy \
port:libsdl_mixer \
port:libsdl_image \
port:libsdl_ttf
depends_lib port:py${python.version}-numpy
if {[variant_isset sdl2]} {
depends_lib-append port:libsdl2_mixer \
port:libsdl2_image \
port:libsdl2_ttf
} else {
depends_lib-append port:libsdl_mixer \
port:libsdl_image \
port:libsdl_ttf
}

use_configure yes
configure.env-append LOCALBASE=${prefix}
configure.cmd ${python.bin} config.py
configure.cmd ${python.bin} setup.py
configure.args -config

post-destroot {
copy {*}[glob ${worksrcpath}/docs/*] ${destroot}${prefix}/share/doc/${subport}
xinstall -m 644 -W ${worksrcpath} install.html LGPL WHATSNEW \
readme.html README.rst ${destroot}${prefix}/share/doc/${subport}
xinstall -m 644 -W ${worksrcpath} README.rst \
${destroot}${prefix}/share/doc/${subport}
}

variant portmidi description {Enable MIDI support using portmidi} {
depends_lib-append port:portmidi
patchfiles-delete patch-disable_portmidi.diff
}

variant sdl2 description {Use SDL 2 (experimental)} {
configure.args-append -sdl2
}

livecheck.type none
}
@@ -1,33 +1,43 @@
--- config_darwin.py.orig 2016-08-21 06:28:55.000000000 +1000
+++ config_darwin.py 2017-07-08 16:04:22.000000000 +1000
@@ -5,6 +5,7 @@
from distutils.sysconfig import get_python_inc
from config_unix import DependencyProg
--- buildconfig/config_darwin.py.orig 2019-03-29 19:24:30.000000000 +1100
+++ buildconfig/config_darwin.py 2019-04-09 04:37:02.000000000 +1000
@@ -10,6 +10,7 @@
except:
from buildconfig.config_unix import DependencyProg

+localbase = os.environ.get('LOCALBASE', '')

try:
basestring_ = basestring
@@ -107,7 +108,7 @@
FrameworkDependency('IMAGE', 'SDL_image.h', 'libSDL_image', 'SDL_image')],
[Dependency('MIXER', ['SDL_mixer.h', 'SDL/SDL_mixer.h'], 'libSDL_mixer', ['SDL_mixer']),
FrameworkDependency('MIXER', 'SDL_mixer.h', 'libSDL_mixer', 'SDL_mixer')],
- FrameworkDependency('PORTTIME', 'CoreMidi.h', 'CoreMidi', 'CoreMIDI'),
+ FrameworkDependency('PORTTIME', 'CoreMIDI.h', 'CoreMIDI', 'CoreMIDI'),
FrameworkDependency('QUICKTIME', 'QuickTime.h', 'QuickTime', 'QuickTime'),
Dependency('PNG', 'png.h', 'libpng', ['png']),
Dependency('JPEG', 'jpeglib.h', 'libjpeg', ['jpeg']),
@@ -124,12 +125,8 @@
global DEPS
@@ -148,7 +149,7 @@


DEPS.extend([
- FrameworkDependency('PORTTIME', 'CoreMidi.h', 'CoreMidi', 'CoreMIDI'),
+ FrameworkDependency('PORTTIME', 'CoreMIDI.h', 'CoreMIDI', 'CoreMIDI'),
FrameworkDependency('QUICKTIME', 'QuickTime.h', 'QuickTime', 'QuickTime'),
Dependency('PNG', 'png.h', 'libpng', ['png']),
Dependency('JPEG', 'jpeglib.h', 'libjpeg', ['jpeg']),
@@ -159,19 +160,16 @@
])

print ('Hunting dependencies...')
- incdirs = ['/usr/local/include', '/usr/local/include/SDL',
- #'/usr/X11/include',
- '/opt/local/include',
- '/opt/local/include/freetype2/freetype']
- incdirs = ['/usr/local/include']
+ incdirs = [localbase+'/include']
if sdl2:
- incdirs.append('/usr/local/include/SDL2')
+ incdirs.append(localbase+'/include/SDL2')
else:
- incdirs.append('/usr/local/include/SDL')
+ incdirs.append(localbase+'/include/SDL')

incdirs.extend([
- #'/usr/X11/include',
- '/opt/local/include',
- '/opt/local/include/freetype2/freetype']
+ localbase+'/include/freetype2/freetype']
)
- #libdirs = ['/usr/local/lib', '/usr/X11/lib', '/opt/local/lib']
- libdirs = ['/usr/local/lib', '/opt/local/lib']
+ incdirs = [localbase+'/include']
+ libdirs = [localbase+'/lib']

for d in DEPS:
@@ -1,11 +1,11 @@
--- config_darwin.py.orig 2018-07-17 23:28:16.000000000 +1000
+++ config_darwin.py 2018-07-21 13:20:12.000000000 +1000
@@ -130,7 +130,7 @@
FrameworkDependency('QUICKTIME', 'QuickTime.h', 'QuickTime', 'QuickTime'),
Dependency('PNG', 'png.h', 'libpng', ['png']),
Dependency('JPEG', 'jpeglib.h', 'libjpeg', ['jpeg']),
- Dependency('PORTMIDI', 'portmidi.h', 'libportmidi', ['portmidi']),
+ Dependency('PORTMIDI', '', '', []),
find_freetype(),
# Scrap is included in sdlmain_osx, there is nothing to look at.
# Dependency('SCRAP', '','',[]),
--- buildconfig/config_darwin.py.orig 2019-04-09 04:37:02.000000000 +1000
+++ buildconfig/config_darwin.py 2019-04-09 04:39:53.000000000 +1000
@@ -153,7 +153,7 @@
FrameworkDependency('QUICKTIME', 'QuickTime.h', 'QuickTime', 'QuickTime'),
Dependency('PNG', 'png.h', 'libpng', ['png']),
Dependency('JPEG', 'jpeglib.h', 'libjpeg', ['jpeg']),
- Dependency('PORTMIDI', 'portmidi.h', 'libportmidi', ['portmidi']),
+ Dependency('PORTMIDI', '', '', []),
find_freetype(),
# Scrap is included in sdlmain_osx, there is nothing to look at.
# Dependency('SCRAP', '','',[]),

0 comments on commit 98fa4ac

Please sign in to comment.
You can’t perform that action at this time.