1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-11-26 00:35:21 +02:00

Merge branch 'master' of git@projects.qi-hardware.com:openwrt-packages

This commit is contained in:
Xiangfu Liu 2010-02-17 20:42:20 +08:00
commit 2f54020861
8 changed files with 303 additions and 26 deletions

View File

@ -20,11 +20,12 @@ UNPACK_CMD=unzip -d $(1) $(DL_DIR)/$(PKG_SOURCE)
include $(INCLUDE_DIR)/package.mk
TARGET_CFLAGS+=\
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/lib/libintl/include/ \
-I$(STAGING_DIR)/usr/lib/libiconv/include/
-I$(STAGING_DIR)/usr/lib/libiconv/include/ \
-I$(STAGING_DIR)/usr/include/SDL
TARGET_LDFLAGS+=\
TARGET_LDFLAGS += \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-L$(STAGING_DIR)/usr/lib/libintl/lib/ \
-L$(STAGING_DIR)/usr/lib/libiconv/lib/
@ -41,22 +42,29 @@ define Package/dgclock/description
Clock and date in sdl
endef
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/SDL
define Build/Compile
$(call Build/Compile/Default, \
A320=1\
A320=1 \
)
endef
define Package/dgclock/install
$(INSTALL_DIR) \
$(1)/usr/bin
$(1)/usr/bin \
$(1)/usr/share/icons \
$(1)/usr/share/applications
$(INSTALL_BIN) \
$(PKG_BUILD_DIR)/bin/a320/dgclock \
$(1)/usr/bin/
$(INSTALL_DATA) \
$(PKG_BUILD_DIR)/dgclock/dgclock.png \
$(1)/usr/share/icons/
$(INSTALL_DATA) \
./files/dglock.desktop \
$(1)/usr/share/applications/
endef
$(eval $(call BuildPackage,dgclock))

View File

@ -0,0 +1,11 @@
[Desktop Entry]
Name=dgclock
Comment=sdl based date/time displayer
Encoding=UTF-8
Version=1.0
Type=Application
Exec=dgclock
Icon=dgclock
Terminal=false
Categories=Application
SingleInstance=false

81
gmenu2x/Makefile Normal file
View File

@ -0,0 +1,81 @@
#
# Copyright (C) 2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=gmenu2x
PKG_VERSION:=20100215-2
PKG_REV:=630fdd5de9bc4c6f601d0aea1b6ccbc22f9d8bdf
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=git://projects.qi-hardware.com/gmenu2x.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
TARGET_CFLAGS+= \
-I$(STAGING_DIR)/usr/include/SDL \
-I$(STAGING_DIR)/usr/include/google/sparsehash \
-I$(PKG_BUILD_DIR)/src/tinyxml \
TARGET_CPPFLAGS+= \
-I$(STAGING_DIR)/usr/include/SDL \
-I$(STAGING_DIR)/usr/include/google/sparsehash \
-I$(PKG_BUILD_DIR)/src/tinyxml \
# -I$(STAGING_DIR)/usr/lib/libintl/include \
# -I$(STAGING_DIR)/usr/libiconv/include
#
TARGET_LDFLAGS+= \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-L$(STAGING_DIR)/usr/lib/SDL \
define Package/gmenu2x
SECTION:=xorg-apps
CATEGORY:=Xorg
SUBMENU:=app
TITLE:=Gmenu2x
URL:=http://projects.qi-hardware.com/index.php/p/gmenu2x/
DEPENDS:=+libsdl +libsdl-image +libsdl-gfx +sparsehash
endef
define Build/Configure
( cd $(PKG_BUILD_DIR); ./autogen.sh );
$(call Build/Configure/Default)
endef
define Package/gmenu2x/install
$(INSTALL_DIR) \
$(1)/usr/bin/ \
$(1)/usr/share/gmenu2x/ \
$(INSTALL_BIN) \
$(PKG_INSTALL_DIR)/usr/bin/gmenu2x \
$(1)/usr/share/gmenu2x/
$(CP) \
$(PKG_BUILD_DIR)/gmenu2x.sh \
$(1)/usr/bin/gmenu2x
$(CP) \
$(PKG_BUILD_DIR)/pandora/* \
$(1)/usr/share/gmenu2x/
#
# $(INSTALL_DATA) \
# $(PKG_INSTALL_DIR)/usr/share/gmenu2x/* \
# $(1)/usr/share/gmenu2x/
#
# $(PKG_INSTALL_DIR)/usr/bin/gmenu2x \
# $(1)/usr/bin
endef
$(eval $(call BuildPackage,gmenu2x))

View File

@ -1,4 +1,4 @@
#
#
# Copyright (C) 2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
@ -16,6 +16,8 @@ PKG_SOURCE_URL:=http://www.libsdl.org/projects/SDL_image/release/
PKG_MD5SUM:=6c06584b31559e2b59f2b982d0d1f628
PKG_BUILD_DIR:=$(BUILD_DIR)/SDL_image-$(PKG_VERSION)
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/libsdl-image
@ -38,21 +40,17 @@ CONFIGURE_ARGS += \
CONFIGURE_VARS += \
LIBS="-lSDL -ldirect -ldirectfb -lfusion"
define Build/Compile
rm -rf $(PKG_INSTALL_DIR)
$(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" \
all install
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/SDL $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include/SDL $(1)/usr/lib/pkgconfig
$(CP) \
$(PKG_INSTALL_DIR)/usr/include/SDL/SDL_image.h \
$(1)/usr/include/SDL/
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/libSDL_image*.{a,so*} \
$(1)/usr/lib/
$(INSTALL_DATA) \
$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
$(1)/usr/lib/pkgconfig/
endef
define Package/libsdl-image/install

View File

@ -19,15 +19,20 @@ define Package/pygame
CATEGORY:=Languages
TITLE:=pygame
URL:=http://pygame.org
DEPENDS:=+python-mini +libsdl
DEPENDS:=+python-mini +libsdl +libpng +libjpeg +libsdl-image +libsdl-mixer
endef
define Package/pygame/description
serial port python bindings
endef
define Build/Compile
$(call Build/Compile/PyMod,,install --prefix="$(PKG_INSTALL_DIR)/usr")
$(call Build/Compile/PyMod,,\
install \
--prefix="$(PKG_INSTALL_DIR)/usr" \
, \
LOCALBASE="$(STAGING_DIR)/usr" \
NO_SCRAP=1 \
)
endef
define Package/pygame/install

View File

@ -0,0 +1,106 @@
diff --git a/config_unix.py b/config_unix.py
index 1cece2a..0fec7e0 100644
--- a/config_unix.py
+++ b/config_unix.py
@@ -69,6 +69,39 @@ class DependencyProg:
else:
print (self.name + ' '[len(self.name):] + ': not found')
+class DependencyPkgConfig:
+ def __init__(self, name, lib):
+ self.name = name
+ self.lib_dir = ''
+ self.inc_dir = ''
+ self.libs = []
+ self.cflags = ''
+ command = os.environ.get('PKG_CONFIG', 'pkg-config')
+ try:
+ version = os.popen('%s %s --modversion 2> /dev/null' % (command, lib)).readline()
+ if not version.strip():
+ self.found = 0
+ return
+
+ 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
+
+ self.cflags = '%s %s' % (cflags, libs)
+ except Exception, e:
+ print e
+ print ('WARNING: "pkg-config" failed!')
+ self.found = 0
+ self.ver = '0'
+
+ def configure(self, incdirs, libdir):
+ if self.found:
+ print (self.name + ' '[len(self.name):] + ': found ' + self.ver)
+ else:
+ print (self.name + ' '[len(self.name):] + ': not found')
+
class Dependency:
def __init__(self, name, checkhead, checklib, libs):
self.name = name
@@ -137,18 +170,22 @@ sdl_lib_name = 'SDL'
def main():
print ('\nHunting dependencies...')
DEPS = [
- DependencyProg('SDL', 'SDL_CONFIG', 'sdl-config', '1.2', ['sdl']),
+ DependencyPkgConfig('SDL', 'sdl'),
Dependency('FONT', 'SDL_ttf.h', 'libSDL_ttf.so', ['SDL_ttf']),
- Dependency('IMAGE', 'SDL_image.h', 'libSDL_image.so', ['SDL_image']),
+ DependencyPkgConfig('IMAGE', 'SDL_image'),
Dependency('MIXER', 'SDL_mixer.h', 'libSDL_mixer.so', ['SDL_mixer']),
DependencyProg('SMPEG', 'SMPEG_CONFIG', 'smpeg-config', '0.4.3', ['smpeg']),
- Dependency('PNG', 'png.h', 'libpng', ['png']),
+ DependencyPkgConfig('PNG', 'libpng'),
Dependency('JPEG', 'jpeglib.h', 'libjpeg', ['jpeg']),
- Dependency('SCRAP', '', 'libX11', ['X11']),
Dependency('PORTMIDI', 'portmidi.h', 'libportmidi.so', ['portmidi']),
Dependency('PORTTIME', 'porttime.h', 'libporttime.so', ['porttime']),
#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 = []
- incdirs += ["/usr"+d for d in origincdirs]
- libdirs += ["/usr"+d for d in origlibdirs]
- incdirs += ["/usr/local"+d for d in origincdirs]
- libdirs += ["/usr/local"+d for d in origlibdirs]
+# incdirs += ["/usr"+d for d in origincdirs]
+# libdirs += ["/usr"+d for d in origlibdirs]
+# incdirs += ["/usr/local"+d for d in origincdirs]
+# libdirs += ["/usr/local"+d for d in origlibdirs]
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__':

View 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;
+}

View File

@ -46,15 +46,15 @@ define Build/Compile
all install
endef
# define Build/InstallDev
# $(INSTALL_DIR) $(1)/usr/include/SDL $(1)/usr/lib
# $(CP) \
# $(PKG_INSTALL_DIR)/usr/include/SDL/SDL_image.h \
# $(1)/usr/include/SDL/
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/google $(1)/usr/lib
$(CP) \
$(PKG_INSTALL_DIR)/usr/include/google/* \
$(1)/usr/include/google/
# $(CP) \
# $(PKG_INSTALL_DIR)/usr/lib/libSDL_image*.{a,so*} \
# $(1)/usr/lib/
# endef
endef
define Package/sparsehash/install
$(INSTALL_DIR) $(1)/usr/lib