add & fix python modules
authorJohn Crispin <john@openwrt.org>
Sat, 24 May 2008 18:01:46 +0000 (18:01 +0000)
committerJohn Crispin <john@openwrt.org>
Sat, 24 May 2008 18:01:46 +0000 (18:01 +0000)
SVN-Revision: 11263

lang/pycairo/Makefile
lang/pygobject/Makefile [new file with mode: 0644]
lang/pygobject/patches/100-compile.patch [new file with mode: 0644]
lang/pygtk/Makefile

index 79e52a6..903e40c 100644 (file)
@@ -19,6 +19,7 @@ PKG_FIXUP:=libtool
 include $(INCLUDE_DIR)/package.mk
 
 define Package/pycairo
+  SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=Cairo bindings to python
@@ -42,17 +43,17 @@ define Build/Configure
 endef
 
 define Build/Compile
-       cd $(PKG_BUILD_DIR) ; $(MAKE) $(MAKE_FLAGS) $(MAKE_VARS)
+       cd $(PKG_BUILD_DIR) ; DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) all install
 endef
 
 define Build/InstallDev
-       cd $(PKG_BUILD_DIR) ; DESTDIR=$(1) $(MAKE) $(MAKE_FLAGS) install
-#      rm $(1)/usr/lib/pkgconfig/pycairo.pc
+       mkdir -p $(1)
+       cp -r $(PKG_INSTALL_DIR)/* $(1)
 endef
 
-define Package/pycairo/install
-       cd $(PKG_BUILD_DIR) ; DESTDIR=$(1) $(MAKE) $(MAKE_FLAGS) install
-#      rm $(1)/usr/lib/pkgconfig/pycairo.pc
+define Package/python-gtk/install
+       mkdir -p $(1)
+       cp -r $(PKG_INSTALL_DIR)/* $(1)
 endef
 
 $(eval $(call BuildPackage,pycairo))
diff --git a/lang/pygobject/Makefile b/lang/pygobject/Makefile
new file mode 100644 (file)
index 0000000..a5fc107
--- /dev/null
@@ -0,0 +1,59 @@
+#
+# Copyright (C) 2008 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:=pygobject
+PKG_VERSION:=2.14.0
+PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.14
+
+EXTRA_LDFLAGS=-L$(STAGING_DIR)/usr/lib/libintl/lib/ -L$(STAGING_DIR)/usr/lib/libiconv/lib/
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/python-gobject
+  SUBMENU:=Python
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=python gobjects
+  URL:=http://www.pygtk.org/
+  DEPENDS:=python-core 
+endef
+
+define Package/python-gobject/description
+  API to GTK and glade library from python
+endef
+
+define Build/Configure
+       (cd $(PKG_BUILD_DIR); \
+               if [ -x $(CONFIGURE_CMD) ]; then \
+                       $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
+                       $(CONFIGURE_VARS) \
+                       $(CONFIGURE_CMD) \
+                       $(CONFIGURE_ARGS) ;\
+               fi \
+       )
+endef
+
+define Build/Compile
+       cd $(PKG_BUILD_DIR)/gobject ; gcc -I$(STAGING_DIR)/usr/lib/glib-2.0/include/ -I$(STAGING_DIR)/usr/include/glib-2.0/ generate-constants.c -o generate-constants
+       cd $(PKG_BUILD_DIR) ; DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) all install
+endef
+
+define Build/InstallDev
+       mkdir -p $(1)
+       cp -r $(PKG_INSTALL_DIR)/* $(1)
+endef
+
+define Package/python-gtk/install
+       mkdir -p $(1)
+       cp -r $(PKG_INSTALL_DIR)/* $(1)
+endef
+
+$(eval $(call BuildPackage,python-gobject))
diff --git a/lang/pygobject/patches/100-compile.patch b/lang/pygobject/patches/100-compile.patch
new file mode 100644 (file)
index 0000000..0490aba
--- /dev/null
@@ -0,0 +1,11 @@
+diff -urN pygobject-2.14.0.orig/gobject/Makefile.in pygobject-2.14.0/gobject/Makefile.in
+--- pygobject-2.14.0.orig/gobject/Makefile.in  2008-05-22 21:54:05.000000000 +0100
++++ pygobject-2.14.0/gobject/Makefile.in       2008-05-22 21:58:47.000000000 +0100
+@@ -1040,6 +1040,7 @@
+       rm -f constants.py
+       cp $(srcdir)/constants.py.in constants.py
+       chmod 644 constants.py
++      gcc $(GLIB_CFLAGS) generate-constants.c -o generate-constants
+       $(top_builddir)/gobject/generate-constants$(EXEEXT) >> constants.py
+       chmod 444 constants.py
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
index 2974699..472e143 100644 (file)
@@ -18,8 +18,9 @@ PKG_FIXUP:=libtool
 include $(INCLUDE_DIR)/package.mk
 
 EXTRA_CFLAGS:=-I$(STAGING_DIR)/usr/include/pycairo/ -I$(STAGING_DIR)/usr/lib/libintl/include/ -I$(STAGING_DIR)/usr/lib/libiconv/include/
-RSTRIP:=true
+
 define Package/python-gtk
+  SUBMENU:=Python
   SECTION:=lang
   CATEGORY:=Languages
   TITLE:=GTK bindings to python