1bf729355ada73ca07fa50f2a3f67f3a70693f27
[packages.git] / XOrg / lib / libX11 / Makefile
1
2 # Copyright (C) 2007 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 include $(TOPDIR)/rules.mk
9
10 PKG_BASE_NAME:=libX11
11 PKG_NAME:=libX11
12 PKG_RELEASE:=1
13 PKG_VERSION:=X11R7.2-1.1.1
14 PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.2/src/lib/
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/$(_CATEGORY)/${PKG_NAME}-$(PKG_VERSION)/
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/libX11
21   SECTION:=xorg-libraries
22   CATEGORY:=Xorg
23   SUBMENU:=libraries
24   DEPENDS:=+xorg-headers-native +util-macros  +bigreqsproto +xproto +xextproto +libXau +xtrans +xcmiscproto +libXdmcp +xf86bigfontproto +kbproto +inputproto @DISPLAY_SUPPORT
25   TITLE:=libX11
26   URL:=http://xorg.freedesktop.org/
27 endef
28
29 define Build/InstallDev
30         DESTDIR=$(1) $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install
31 endef
32
33 ifeq (libX11,libX11)
34  CONFIGURE_ARGS_XTRA=--without-xcb
35 endif
36
37 define libX11/Compile
38         $(MAKE_VARS) \
39                 $(MAKE) -C $(PKG_BUILD_DIR)/src/util CFLAGS="" LDFLAGS="" CC="cc" makekeys 
40 endef
41
42 define libXt/Compile
43         $(MAKE_VARS) \
44                 $(MAKE) -C $(PKG_BUILD_DIR)/util CFLAGS="" LDFLAGS="" CC="cc" 
45 endef
46
47 define Build/Compile
48         $(call $(PKG_NAME)/Compile)
49         make -C $(PKG_BUILD_DIR)
50         mkdir -p $(PKG_INSTALL_DIR)
51         DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install
52         $(call libtool_fixup_libdir,$(PKG_INSTALL_DIR))
53 endef
54
55 define Build/Configure
56         (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
57         if [ -x $(CONFIGURE_CMD) ]; then \
58                 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
59                 $(CONFIGURE_VARS) \
60                 $(CONFIGURE_CMD) \
61                 $(CONFIGURE_ARGS_XTRA) \
62                 $(CONFIGURE_ARGS) \
63                 --enable-malloc0returnsnull; \
64         fi \
65         )
66         $(call libtool_disable_rpath)
67 endef
68
69 define Package/libX11/install/Default
70         $(INSTALL_DIR) $(1)/usr/lib
71         find $(PKG_INSTALL_DIR)/usr/lib/ -name lib*so* | $(XARGS) -I % -t cp -P % $(1)/usr/lib 
72 endef
73
74 define Package/libX11/install
75         $(call Package/libX11/install/Default,$(1))
76 endef
77
78 define Package/libXaw/install
79         $(call Package/libX11/install/Default,$(1))
80         cd $(1)/usr/lib; rm -f libXaw.so.7 libXaw.so.6; ln -s libXaw7.so.7.0.0 libXaw.so.7; ln -s libXaw6.so.6.0.1 libXaw.so.6
81 endef
82
83 define Build/InstallDev
84         $(INSTALL_DIR) $(1)
85         $(CP) $(PKG_INSTALL_DIR)/* $(1)/
86 endef
87
88 $(eval $(call BuildPackage,libX11))