mirror of
git://projects.qi-hardware.com/openwrt-packages.git
synced 2024-12-22 09:12:24 +02:00
More pygame cleanups. It at least compiles now.
This commit is contained in:
parent
2402b14d17
commit
f6d705bc8d
@ -26,7 +26,13 @@ define Package/pygame/description
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(call Build/Compile/PyMod,,install --prefix="$(PKG_INSTALL_DIR)/usr",LOCALBASE="$(STAGING_DIR)/usr")
|
||||
$(call Build/Compile/PyMod,,\
|
||||
install \
|
||||
--prefix="$(PKG_INSTALL_DIR)/usr" \
|
||||
, \
|
||||
LOCALBASE="$(STAGING_DIR)/usr" \
|
||||
NO_SCRAP=1 \
|
||||
)
|
||||
endef
|
||||
|
||||
define Package/pygame/install
|
||||
|
@ -20,8 +20,8 @@ index 1cece2a..0fec7e0 100644
|
||||
+ self.found = 0
|
||||
+ return
|
||||
+
|
||||
+ cflags = os.popen('%s %s --cflags 2> /dev/null' % (command, lib)).readline()
|
||||
+ libs = os.popen('%s %s --libs 2> /dev/null' % (command, lib)).readline()
|
||||
+ cflags = os.popen('%s %s --cflags 2> /dev/null' % (command, lib)).readline().strip()
|
||||
+ libs = os.popen('%s %s --libs 2> /dev/null' % (command, lib)).readline().strip()
|
||||
+
|
||||
+ self.ver = version
|
||||
+ self.found = 1
|
||||
@ -42,7 +42,7 @@ index 1cece2a..0fec7e0 100644
|
||||
class Dependency:
|
||||
def __init__(self, name, checkhead, checklib, libs):
|
||||
self.name = name
|
||||
@@ -137,13 +170,13 @@ sdl_lib_name = 'SDL'
|
||||
@@ -137,18 +170,22 @@ sdl_lib_name = 'SDL'
|
||||
def main():
|
||||
print ('\nHunting dependencies...')
|
||||
DEPS = [
|
||||
@ -56,10 +56,20 @@ index 1cece2a..0fec7e0 100644
|
||||
- Dependency('PNG', 'png.h', 'libpng', ['png']),
|
||||
+ DependencyPkgConfig('PNG', 'libpng'),
|
||||
Dependency('JPEG', 'jpeglib.h', 'libjpeg', ['jpeg']),
|
||||
Dependency('SCRAP', '', 'libX11', ['X11']),
|
||||
- Dependency('SCRAP', '', 'libX11', ['X11']),
|
||||
Dependency('PORTMIDI', 'portmidi.h', 'libportmidi.so', ['portmidi']),
|
||||
Dependency('PORTTIME', 'porttime.h', 'libporttime.so', ['porttime']),
|
||||
@@ -159,10 +182,10 @@ def main():
|
||||
#Dependency('GFX', 'SDL_gfxPrimitives.h', 'libSDL_gfx.so', ['SDL_gfx']),
|
||||
]
|
||||
+ if not os.environ.get('NO_SCRAP', None):
|
||||
+ DEPS += Dependency('SCRAP', '', 'libX11', ['X11']),
|
||||
+ else:
|
||||
+ DEPS += Dependency('SCRAP', '', '', []),
|
||||
+
|
||||
if not DEPS[0].found:
|
||||
print ('Unable to run "sdl-config". Please make sure a development version of SDL is installed.')
|
||||
raise SystemExit
|
||||
@@ -159,10 +186,10 @@ def main():
|
||||
else:
|
||||
incdirs = []
|
||||
libdirs = []
|
||||
@ -75,3 +85,22 @@ index 1cece2a..0fec7e0 100644
|
||||
for arg in DEPS[0].cflags.split():
|
||||
if arg[:2] == '-I':
|
||||
|
||||
|
||||
--- a/config_unix.py
|
||||
+++ b/config_unix.py
|
||||
@@ -182,15 +209,6 @@ def main():
|
||||
for d in DEPS:
|
||||
d.configure(incdirs, libdirs)
|
||||
|
||||
- for d in DEPS[1:]:
|
||||
- if not d.found:
|
||||
- if not confirm("""
|
||||
-Warning, some of the pygame dependencies were not found. Pygame can still
|
||||
-compile and install, but games that depend on those missing dependencies
|
||||
-will not run. Would you like to continue the configuration?"""):
|
||||
- raise SystemExit
|
||||
- break
|
||||
-
|
||||
return DEPS
|
||||
|
||||
if __name__ == '__main__':
|
68
pygame/patches/020-scrup-stub.patch
Normal file
68
pygame/patches/020-scrup-stub.patch
Normal file
@ -0,0 +1,68 @@
|
||||
--- a/src/scrap.c
|
||||
+++ b/src/scrap.c
|
||||
@@ -70,7 +70,7 @@ static uint32_t _cliptype = 0;
|
||||
#define MAC_SCRAP
|
||||
#include "scrap_mac.c"
|
||||
#else
|
||||
- #error Unknown window manager for clipboard handling
|
||||
+ #include "scrap_stub.c"
|
||||
#endif /* scrap type */
|
||||
|
||||
/**
|
||||
--- /dev/null
|
||||
+++ b/src/scrap_stub.c
|
||||
@@ -0,0 +1,54 @@
|
||||
+/*
|
||||
+ pygame - Python Game Library
|
||||
+
|
||||
+ This library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Library General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ This library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Library General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Library General Public
|
||||
+ License along with this library; if not, write to the Free
|
||||
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
+*/
|
||||
+
|
||||
+
|
||||
+int
|
||||
+pygame_scrap_init (void)
|
||||
+{
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+pygame_scrap_lost (void)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+pygame_scrap_put (char *type, int srclen, char *src)
|
||||
+{
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+char*
|
||||
+pygame_scrap_get (char *type, unsigned long *count)
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+pygame_scrap_contains (char *type)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+char**
|
||||
+pygame_scrap_get_types (void)
|
||||
+{
|
||||
+ return NULL;
|
||||
+}
|
Loading…
Reference in New Issue
Block a user