Updated collectd to 4.4.4
[packages.git] / XOrg / server / xorg-server-X11R7.3 / 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:=xorg-server
12 PKG_RELEASE:=1
13 PKG_VERSION:=1.4
14 PKG_SOURCE_URL:=http://xorg.freedesktop.org/releases/X11R7.3/src/xserver/
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_BUILD_DIR=$(BUILD_DIR)/Xorg/server/xorg-server-$(PKG_VERSION)/
17
18 include $(INCLUDE_DIR)/package.mk
19
20 EXTRA_CFLAGS+= -I${STAGING_DIR}/usr/include/X11/GL -I${STAGING_DIR}/usr/include/X11/dri/ -I${STAGING_DIR}/usr/include/X11/ -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
21
22 #CONFIGURE_ARGS_KDRIVE=--enable-composite --enable-kdrive \
23 #               --disable-dga --disable-dri --disable-xinerama \
24 #               --disable-xf86misc --disable-xf86vidmode \
25 #               --disable-xorg --disable-xorgcfg \
26 #               --disable-xkb --disable-xnest --disable-xvfb \
27 #               --disable-xevie --disable-xprint --disable-xtrap \
28 #               --disable-dmx --disable-w100 \
29 #               --with-default-font-path=built-ins \
30 #               --enable-tslib --enable-xcalibrate
31
32 CONFIGURE_VARS+=ac_cv_file__usr_share_sgml_X11_defs_ent=yes
33 #CONFIGURE_ARGS+=$(if $(CONFIG_XORG_BUILD_KDRIVE), $(CONFIGURE_ARGS_KDRIVE))
34
35 DEPENDS_SERVER:=+calibrateproto \
36                 +compositeproto \
37                 +damageproto \
38                 +fixesproto \
39                 +recordproto \
40                 +resourceproto \
41                 +scrnsaverproto \
42                 +videoproto \
43                 +xextproto \
44                 +xproto \
45                 +libXext \
46                 +libXdmcp \
47                 +libXfont \
48                 +libXrandr \
49                 +xtrans \
50                 +libX11 \
51                 +glproto \
52                 +xf86driproto \
53                 +applewmproto \
54                 +dmxproto \
55                 +printproto \
56                 +windowswmproto \
57                 +xf86rushproto \
58                 +xproxymanagementprotocol \
59                 +libdrm \
60                 +xf86miscproto \
61                 +xf86vidmodeproto \
62                 +xf86dgaproto \
63                 +trapproto \
64                 +xineramaproto \
65                 +evieext \
66                 +libxkbfile \
67                 +libXt \
68                 +libSM \
69                 +libxkbui \
70                 +libXxf86misc \
71                 +libXxf86vm \
72                 +libXaw \
73                 +libXmu \
74                 +libXpm \
75                 +libnotimpl \
76                 +Mesa \
77                 +pixman \
78                 @DISPLAY_SUPPORT
79
80 #DEPENDS_KDRIVE:=+calibrateproto \
81 #               +compositeproto \
82 #               +damageproto \
83 #               +fixesproto \
84 #               +recordproto \
85 #               +resourceproto \
86 #               +scrnsaverproto \
87 #               +videoproto \
88 #               +xextproto \
89 #               +xproto \
90 #               +libXext \
91 #               +libXdmcp \
92 #               +libXfont \
93 #               +libXrandr \
94 #               +xtrans \
95 #               +libX11 \
96 #               @DISPLAY_SUPPORT
97
98
99 ifeq ($(CONFIG_TARGET_olpc),y)
100   XORG_CONFIG_FILE=xorg-olpc.conf
101 else
102   XORG_CONFIG_FILE=xorg.conf
103 endif
104
105 #define Package/xorg-server/config
106 #       config XORG_BUILD_KDRIVE
107 #               bool "Build kdrive instead of xserver"
108 #               depends PACKAGE_xorg-server || BROKEN
109 #endef
110
111 STAMP_CONFIGURED:=$(STAMP_CONFIGURED)_$(BOARD)
112
113 define Package/xorg-server/Default
114   SECTION:=xorg-server
115   CATEGORY:=Xorg
116   URL:=http://xorg.freedesktop.org/
117 endef
118
119 define Package/xorg-server
120 $(call Package/xorg-server/Default) 
121   TITLE:=Xorg server
122   MENU:=1
123   DEPENDS:=$(if $(CONFIG_XORG_BUILD_KDRIVE), $(DEPENDS_KDRIVE), $(DEPENDS_SERVER))
124 endef
125
126 define Package/xorg-server-config
127 $(call Package/xorg-server/Default) 
128   TITLE:=Xorg server configuration tools 
129   DEPENDS:=xorg-server
130 endef
131
132 define Build/Configure
133         (cd $(PKG_BUILD_DIR) \
134                 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
135                 $(CONFIGURE_VARS) \
136                 $(CONFIGURE_CMD) \
137                 $(CONFIGURE_ARGS_XTRA) \
138                 $(CONFIGURE_ARGS) \
139                 --with-default-font-path=built-ins \
140                 );
141 endef
142
143 define Build/Compile
144         $(MAKE) -C $(PKG_BUILD_DIR)
145         $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
146
147 endef
148
149 define Package/xorg-server/install
150         $(INSTALL_DIR) $(1)/usr/bin
151         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/Xorg $(1)/usr/bin/
152         cd $(1)/usr/bin; ln -sf Xorg X
153         $(INSTALL_DIR) $(1)/usr/share
154         $(CP) $(PKG_INSTALL_DIR)/usr/share/* $(1)/usr/share/
155         $(INSTALL_DIR) $(1)/usr/lib/xserver
156         $(CP) $(PKG_INSTALL_DIR)/usr/lib/xserver/* $(1)/usr/lib/xserver
157         $(INSTALL_DIR) $(1)/usr/lib/xorg/
158         $(CP) -r $(PKG_INSTALL_DIR)/usr/lib/xorg/* $(1)/usr/lib/xorg/
159         find $(1)/usr/lib/xorg/ -name *.la | xargs rm -rf
160         $(INSTALL_DIR) $(1)/usr/lib/X11/
161         $(CP) -r $(PKG_INSTALL_DIR)/usr/lib/X11/* $(1)/usr/lib/X11/
162         rm -rf $(1)/usr/share/X11 $(1)/usr/lib/X11/xserver      
163         $(INSTALL_DIR) $(1)/var/log/
164         $(INSTALL_DIR) $(1)/etc/X11/
165         $(CP) files/$(XORG_CONFIG_FILE) $(1)/etc/X11/xorg.conf
166 endef
167
168 define Packages/xorg-server-config/install
169         $(INSTALL_DIR) $(1)/usr/bin
170     $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xorgconfig $(1)/usr/bin/
171 endef
172
173 define Build/InstallDev
174         $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib/pkgconfig
175         $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
176         $(CP) $(PKG_BUILD_DIR)/xorg-server.pc $(1)/usr/lib/pkgconfig/
177 endef
178
179 $(eval $(call BuildPackage,xorg-server))
180 $(eval $(call BuildPackage,xorg-server-config))