2faa7386d24e3d52d234d59f25a0d40d03fdf94c
[openwrt/svn-archive/archive.git] / XOrg / lib / libXrender / 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:=libXrender
11 PKG_NAME:=libXrender
12 PKG_RELEASE:=1
13 PKG_VERSION:=X11R7.2-0.9.2
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/libXrender
21 SECTION:=xorg-libraries
22 CATEGORY:=Xorg
23 SUBMENU:=libraries
24 DEPENDS:=+xorg-headers-native +util-macros +freetype +zlib +xproto +libfontenc +xtrans +fontsproto +renderproto @TARGET_x86
25 TITLE:=libXrender
26 URL:=http://xorg.freedesktop.org/
27 endef
28
29 define Build/InstallDev
30 DESTDIR=$(STAGING_DIR) $(MAKE) -C $(PKG_BUILD_DIR)/ $(MAKE_FLAGS) install
31 endef
32
33 ifeq (libXrender,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 find $(PKG_INSTALL_DIR) -name *.la | xargs rm -rf
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 endef
67
68 define Package/libXrender/install/Default
69 $(INSTALL_DIR) $(1)/usr/lib
70 find $(PKG_INSTALL_DIR)/usr/lib/ -name lib*so* | $(XARGS) -i -t cp -P {} $(1)/usr/lib
71 endef
72
73 define Package/libXrender/install
74 $(call Package/libXrender/install/Default,$(1))
75 endef
76
77 define Package/libXaw/install
78 $(call Package/libXrender/install/Default,$(1))
79 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
80 endef
81
82 define Build/InstallDev
83 $(CP) $(PKG_INSTALL_DIR)/* $(STAGING_DIR)
84 endef
85
86 $(eval $(call BuildPackage,libXrender))