lots of package cleanups/fixes
[openwrt/svn-archive/archive.git] / XOrg / lib / gtk-1.2.10 / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # blogic@openwrt.org
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=gtk-1.2.10
12 PKG_VERSION:=1.2.10
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=gtk+-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:= \
17 ftp://ftp.gtk.org/pub/gtk/v1.2/ \
18 http://gd.tuwien.ac.at/graphics/gimp/gtk/v1.2/
19 PKG_BUILD_DIR=$(BUILD_DIR)/gtk+-1.2.10
20
21 include $(INCLUDE_DIR)/package.mk
22
23 CONFIGURE_ARGS_XTRA+=--x-includes=$(STAGING_DIR)/usr/include/ \
24 --x-libraries=$(STAGING_DIR)/usr/lib \
25 --with-glib-prefix=$(STAGING_DIR)/usr/ \
26 --enable-static=yes \
27 --enable-static=yes
28
29 EXTRA_CFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
30 TARGET_CFLAGS+= -I$(STAGING_DIR)/usr/include/glib-1.2 -I$(STAGING_DIR)/usr/lib/glib/include
31 EXTRA_LDFLAGS+=-lnotimpl -lglib -lgmodule
32
33 define Package/gtk-1.2.10
34 SECTION:=xorg-framework
35 CATEGORY:=Xorg
36 SUBMENU:=framework
37 TITLE:=GTK+ 1.2.10 package
38 DEPENDS:=+glib1 @DISPLAY_SUPPORT
39 endef
40
41 define Build/Configure
42 (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
43 if [ -x $(CONFIGURE_CMD) ]; then \
44 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
45 $(CONFIGURE_VARS) \
46 $(CONFIGURE_CMD) \
47 $(CONFIGURE_ARGS_XTRA) \
48 $(CONFIGURE_ARGS) ;\
49 fi \
50 )
51 endef
52
53 define Build/Compile
54 $(MAKE) -C $(PKG_BUILD_DIR)
55 $(MAKE) -C $(PKG_BUILD_DIR)/ install DESTDIR=$(PKG_INSTALL_DIR)
56 endef
57
58 define Build/InstallDev
59 $(INSTALL_DIR) $(1)
60 $(CP) $(PKG_INSTALL_DIR)/* $(1)/
61 $(INSTALL_DIR) $(2)/bin
62 mv $(1)/usr/bin/gtk-config $(2)/bin/
63 $(SED) "s,libdirs=-L.*,libdirs=,g" $(2)/bin/gtk-config
64 endef
65
66 $(eval $(call BuildPackage,gtk-1.2.10))