bfb6a1f70e810ed29e2852d9c0f14399c00365ff
[openwrt/svn-archive/archive.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 PKG_FIXUP = libtool
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/libX11
23 SECTION:=xorg-libraries
24 CATEGORY:=Xorg
25 SUBMENU:=libraries
26 DEPENDS:=+xorg-headers-native +util-macros +bigreqsproto +xproto +xextproto +libXau +xtrans +xcmiscproto +libXdmcp +xf86bigfontproto +kbproto +inputproto @DISPLAY_SUPPORT
27 TITLE:=libX11
28 URL:=http://xorg.freedesktop.org/
29 endef
30
31 define Build/InstallDev
32 DESTDIR=$(1) $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install
33 endef
34
35 ifeq (libX11,libX11)
36 CONFIGURE_ARGS_XTRA=--without-xcb
37 endif
38
39 define libX11/Compile
40 $(MAKE_VARS) \
41 $(MAKE) -C $(PKG_BUILD_DIR)/src/util CFLAGS="" LDFLAGS="" CC="cc" makekeys
42 endef
43
44 define libXt/Compile
45 $(MAKE_VARS) \
46 $(MAKE) -C $(PKG_BUILD_DIR)/util CFLAGS="" LDFLAGS="" CC="cc"
47 endef
48
49 define Build/Compile
50 $(call $(PKG_NAME)/Compile)
51 make -C $(PKG_BUILD_DIR)
52 mkdir -p $(PKG_INSTALL_DIR)
53 DESTDIR=$(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) install
54 endef
55
56 define Build/Configure
57 (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
58 if [ -x $(CONFIGURE_CMD) ]; then \
59 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
60 $(CONFIGURE_VARS) \
61 $(CONFIGURE_CMD) \
62 $(CONFIGURE_ARGS_XTRA) \
63 $(CONFIGURE_ARGS) \
64 --enable-malloc0returnsnull; \
65 fi \
66 )
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))