2005-05-13 00:22:29 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# xorg X Window System
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
|
|
|
ifneq ($(strip $(BR2_PACKAGE_TINYX)),y)
|
2005-06-24 11:39:45 +02:00
|
|
|
ifeq ($(strip $(BR2_PACKAGE_XORG)),y)
|
2005-05-13 00:22:29 +02:00
|
|
|
|
2005-07-15 10:39:09 +02:00
|
|
|
XORG_APPS:=xlsfonts/xlsfonts xmodmap/xmodmap xinit/startx \
|
|
|
|
xauth/xauth xinit/xinit xsetroot/xsetroot xset/xset \
|
2006-07-21 00:46:15 +02:00
|
|
|
mkfontscale/mkfontscale mkfontdir/mkfontdir \
|
2007-01-25 21:34:10 +01:00
|
|
|
setxkbmap/setxkbmap #xterm/xterm
|
2005-05-13 00:22:29 +02:00
|
|
|
|
2007-01-15 23:33:55 +01:00
|
|
|
XORG_LIBS:= Xft Xrender Xaw Xmu Xt Xcursor Xrandr Xi Xinerama Xfixes \
|
2007-01-25 21:34:10 +01:00
|
|
|
SM ICE Xpm Xp Xext X11 Xmuu Xxf86misc fontenc xkbfile
|
2006-07-21 00:46:15 +02:00
|
|
|
|
2005-05-13 00:22:29 +02:00
|
|
|
|
|
|
|
#############################################################
|
|
|
|
# Stuff below this line shouldn't need changes.
|
|
|
|
# if you do change, look in rxvt & matchbox for the impact!
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Where resources are found.
|
|
|
|
#
|
|
|
|
XORG_SOURCE:=X11R6.8.2-src.tar.bz2
|
|
|
|
XORG_SITE:=http://xorg.freedesktop.org/X11R6.8.2/src-single/
|
2006-11-17 16:43:51 +01:00
|
|
|
XORG_CAT:=$(BZCAT)
|
2005-05-13 00:22:29 +02:00
|
|
|
XORG_DIR:=$(BUILD_DIR)/xc
|
|
|
|
XORG_LDIR:=$(XORG_DIR)/lib
|
|
|
|
XORG_PROGS:=$(XORG_DIR)/programs
|
2006-07-18 09:19:10 +02:00
|
|
|
TARGET_BINX:=/usr/X11R6/bin
|
|
|
|
TARGET_LIBX:=/usr/X11R6/lib
|
2005-07-13 12:29:18 +02:00
|
|
|
XORG_BINX:=$(TARGET_DIR)$(TARGET_BINX)
|
2005-07-15 01:34:47 +02:00
|
|
|
XORG_LIBX:=$(TARGET_DIR)$(TARGET_LIBX)
|
2005-05-13 00:22:29 +02:00
|
|
|
XORG_CF:=$(XORG_DIR)/config/cf/cross.def
|
2005-09-08 02:25:27 +02:00
|
|
|
XORG_HOST_DEF:=$(XORG_DIR)/config/cf/host.def
|
2005-05-13 00:22:29 +02:00
|
|
|
|
2007-01-15 23:33:55 +01:00
|
|
|
|
2007-01-25 21:34:10 +01:00
|
|
|
DEJAVU_VERSION=2.14
|
2007-01-15 23:33:55 +01:00
|
|
|
DEJAVU_SOURCE=dejavu-ttf-$(DEJAVU_VERSION).tar.bz2
|
|
|
|
DEJAVU_CAT:=$(BZCAT)
|
|
|
|
DEJAVU_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/dejavu
|
|
|
|
DEJAVU_DIR:=$(BUILD_DIR)/dejavu-ttf-$(DEJAVU_VERSION)
|
|
|
|
|
2005-07-15 01:34:47 +02:00
|
|
|
# Install Xorg xserver
|
2007-02-04 20:47:41 +01:00
|
|
|
XSERVER_BINARY:=Xorg
|
|
|
|
XORG_XSERVER:=$(XORG_DIR)/programs/Xserver/$(XSERVER_BINARY)
|
|
|
|
TARGET_XSERVER:=$(XORG_BINX)/$(XSERVER_BINARY)
|
2005-05-13 00:22:29 +02:00
|
|
|
|
2006-09-26 14:48:43 +02:00
|
|
|
# figure out Xorg's idea of corresponding architecture name
|
|
|
|
ifeq ($(BR2_alpha),y)
|
|
|
|
XARCH=Alpha
|
2006-09-27 20:17:31 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_arm),y)
|
2006-09-26 14:48:43 +02:00
|
|
|
XARCH=Arm32
|
2006-09-27 20:17:31 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_armeb),y)
|
2006-09-26 14:48:43 +02:00
|
|
|
XARCH=Arm32
|
2006-09-27 20:17:31 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_i386),y)
|
2006-10-02 20:25:37 +02:00
|
|
|
XARCH=i386
|
2006-09-27 20:17:31 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_mips),y)
|
2006-09-26 14:48:43 +02:00
|
|
|
XARCH=Mips
|
2006-09-27 20:17:31 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_mipsel),y)
|
2006-09-26 14:48:43 +02:00
|
|
|
XARCH=Mips
|
2006-09-27 20:17:31 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_powerpc),y)
|
2006-09-26 14:48:43 +02:00
|
|
|
XARCH=Ppc
|
2006-09-27 20:17:31 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_sparc),y)
|
2006-09-26 14:48:43 +02:00
|
|
|
XARCH=Sparc
|
2006-09-27 20:17:31 +02:00
|
|
|
endif
|
|
|
|
ifeq ($(BR2_x86_64),y)
|
2006-09-26 14:48:43 +02:00
|
|
|
XARCH=AMD64
|
|
|
|
endif
|
|
|
|
|
2005-05-13 00:22:29 +02:00
|
|
|
$(DL_DIR)/$(XORG_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(XORG_SITE)/$(XORG_SOURCE)
|
|
|
|
|
2007-01-14 04:52:21 +01:00
|
|
|
$(XORG_DIR)/.unpacked: $(DL_DIR)/$(XORG_SOURCE)
|
2005-05-13 00:22:29 +02:00
|
|
|
$(XORG_CAT) $(DL_DIR)/$(XORG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2006-07-09 01:58:02 +02:00
|
|
|
toolchain/patch-kernel.sh $(XORG_DIR) package/xorg/ \*.patch
|
2007-01-14 04:52:21 +01:00
|
|
|
touch $(XORG_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(XORG_DIR)/.configured: $(XORG_DIR)/.unpacked
|
2005-09-08 02:25:27 +02:00
|
|
|
$(SED) 's:REPLACE_STAGING_DIR:$(STAGING_DIR):g' $(XORG_HOST_DEF)
|
2005-07-13 09:36:40 +02:00
|
|
|
$(SED) 's:REPLACE_GCCINC_DIR:$(shell $(TARGET_CROSS)gcc -print-file-name=include):g' $(XORG_CF)
|
2005-05-13 00:22:29 +02:00
|
|
|
$(SED) 's:REPLACE_STAGING_DIR:$(STAGING_DIR):g' $(XORG_CF)
|
|
|
|
$(SED) 's:REPLACE_ARCH:$(ARCH):g' $(XORG_CF)
|
2007-08-15 11:46:29 +02:00
|
|
|
$(SED) 's:#define StdIncDir.*:#define StdIncDir $(STAGING_DIR)/usr/include:g' $(XORG_CF)
|
2005-05-13 00:22:29 +02:00
|
|
|
$(SED) 's:#define CcCmd.*:#define CcCmd $(TARGET_CROSS)gcc:g' $(XORG_CF)
|
|
|
|
$(SED) 's:#define RanlibCmd.*:#define RanlibCmd $(TARGET_CROSS)ranlib:g' $(XORG_CF)
|
|
|
|
$(SED) 's:#define LdCmd.*:#define LdCmd $(TARGET_CROSS)ld:g' $(XORG_CF)
|
2005-07-13 09:36:40 +02:00
|
|
|
$(SED) 's:#.*define.*HasPam.*YES::g' $(XORG_DIR)/config/cf/linux.cf
|
|
|
|
$(SED) 's:#.*define.*CrossCompiling.*NO:#define CrossCompiling YES:g' $(XORG_DIR)/config/cf/Imake.tmpl
|
2006-10-14 13:34:14 +02:00
|
|
|
$(SED) 's:#.*undef.*CrossCompileDir.*:#define CrossCompileDir $(STAGING_DIR)/bin:g' $(XORG_DIR)/config/cf/Imake.tmpl
|
2006-09-26 14:48:43 +02:00
|
|
|
$(SED) 's:REPLACE_XORG_ARCH:$(XARCH):g' $(XORG_DIR)/config/cf/cross.def
|
2006-07-18 09:19:10 +02:00
|
|
|
touch $(XORG_DIR)/.configured
|
2005-05-13 00:22:29 +02:00
|
|
|
|
2006-07-18 09:19:10 +02:00
|
|
|
$(XORG_XSERVER): $(XORG_DIR)/.configured
|
2005-07-13 12:29:18 +02:00
|
|
|
rm -f $(TARGET_XSERVER) $(XORG_XSERVER)
|
2007-08-22 11:56:41 +02:00
|
|
|
( cd $(XORG_DIR); $(MAKE) \
|
2006-07-09 01:58:02 +02:00
|
|
|
PKG_CONFIG=$(STAGING_DIR)/$(PKGCONFIG_TARGET_BINARY) \
|
|
|
|
World XCURSORGEN=xcursorgen MKFONTSCALE=mkfontscale )
|
2006-07-18 09:19:10 +02:00
|
|
|
touch -c $(XORG_XSERVER)
|
2005-05-13 00:22:29 +02:00
|
|
|
|
2006-07-21 00:46:15 +02:00
|
|
|
$(STAGING_DIR)$(TARGET_LIBX)/libX11.so.6.2: $(XORG_XSERVER)
|
2007-08-21 13:25:30 +02:00
|
|
|
mkdir -p $(STAGING_DIR)/usr/X11R6
|
2007-01-14 04:52:21 +01:00
|
|
|
ln -fs ../../include $(STAGING_DIR)/usr/X11R6/include
|
2007-01-11 07:17:04 +01:00
|
|
|
ln -fs ../../lib $(STAGING_DIR)$(TARGET_LIBX)
|
2006-07-21 00:46:15 +02:00
|
|
|
( cd $(XORG_DIR); $(MAKE) \
|
|
|
|
DESTDIR=$(STAGING_DIR) install XCURSORGEN=xcursorgen MKFONTSCALE=mkfontscale )
|
2007-01-15 00:25:05 +01:00
|
|
|
cp package/xorg/x11.pc package/xorg/xext.pc \
|
|
|
|
package/xorg/xproto.pc package/xorg/kbproto.pc \
|
|
|
|
package/xorg/xau.pc package/xorg/xdmcp.pc \
|
|
|
|
package/xorg/xextproto.pc package/xorg/xrandr.pc \
|
|
|
|
package/xorg/xinerama.pc $(STAGING_DIR)/lib/pkgconfig
|
2006-07-21 00:46:15 +02:00
|
|
|
touch -c $(STAGING_DIR)$(TARGET_LIBX)/libX11.so.6.2
|
|
|
|
|
2005-07-13 12:29:18 +02:00
|
|
|
$(TARGET_XSERVER): $(XORG_XSERVER)
|
2007-08-21 13:25:30 +02:00
|
|
|
mkdir -p $(XORG_BINX)
|
2007-08-22 11:56:41 +02:00
|
|
|
for file in $(XORG_APPS); do \
|
|
|
|
cp -f $(XORG_DIR)/programs/$$file $(XORG_BINX); \
|
|
|
|
chmod a+x $(XORG_PROGS)/$$file; \
|
|
|
|
$(STRIP) $(XORG_PROGS)/$$file || /bin/true; \
|
2005-05-13 00:22:29 +02:00
|
|
|
done
|
2005-07-13 12:29:18 +02:00
|
|
|
cp $(XORG_XSERVER) $(TARGET_XSERVER)
|
2007-02-04 20:47:41 +01:00
|
|
|
(cd $(XORG_BINX); ln -snf $(XSERVER_BINARY) X)
|
2005-07-13 12:29:18 +02:00
|
|
|
$(STRIP) $(TARGET_XSERVER)
|
2005-07-15 01:34:47 +02:00
|
|
|
mkdir -p $(XORG_LIBX)/modules
|
2005-07-15 09:07:44 +02:00
|
|
|
cp -LRf $(XORG_DIR)/exports/lib/modules/ $(XORG_LIBX)/
|
2007-08-22 11:56:41 +02:00
|
|
|
( cd $(XORG_DIR)/fonts; $(MAKE) \
|
2006-07-09 01:58:02 +02:00
|
|
|
DESTDIR=$(TARGET_DIR) install XCURSORGEN=xcursorgen MKFONTSCALE=mkfontscale )
|
2007-01-15 23:33:55 +01:00
|
|
|
cp -LRf $(XORG_DIR)/fonts/bdf/misc/7x14.bdf $(XORG_LIBX)/X11/fonts/misc/
|
|
|
|
cp -LRf $(XORG_DIR)/fonts/bdf/misc/7x14-L1.bdf $(XORG_LIBX)/X11/fonts/misc/
|
|
|
|
cp -LRf $(XORG_DIR)/fonts/bdf/misc/7x14B.bdf $(XORG_LIBX)/X11/fonts/misc/
|
|
|
|
cp -LRf $(XORG_DIR)/fonts/bdf/misc/7x14B-L1.bdf $(XORG_LIBX)/X11/fonts/misc/
|
|
|
|
cp -LRf $(XORG_DIR)/fonts/bdf/misc/cursor.bdf $(XORG_LIBX)/X11/fonts/misc/
|
|
|
|
cp -f package/xorg/fonts.alias $(XORG_LIBX)/X11/fonts/misc/
|
2005-07-15 10:39:09 +02:00
|
|
|
( cd $(XORG_LIBX)/X11/fonts/misc/; mkfontdir )
|
2007-01-25 21:34:10 +01:00
|
|
|
rm -rf $(XORG_LIBX)/X11/fonts/100dpi
|
|
|
|
rm -rf $(XORG_LIBX)/X11/fonts/75dpi
|
|
|
|
rm -rf $(XORG_LIBX)/X11/fonts/cyrillic
|
|
|
|
rm -rf $(XORG_LIBX)/X11/fonts/local
|
2005-07-15 01:34:47 +02:00
|
|
|
(cd $(TARGET_DIR)/usr/bin; ln -snf $(TARGET_BINX) X11)
|
2007-01-25 21:34:10 +01:00
|
|
|
cp -LRf $(STAGING_DIR)$(TARGET_LIBX)/X11/xkb $(XORG_LIBX)/X11/
|
|
|
|
mv $(XORG_LIBX)/X11/xkb/xkbcomp $(XORG_BINX)/
|
|
|
|
(cd $(XORG_LIBX)/X11/xkb; ln -s ../../../bin/xkbcomp)
|
|
|
|
rm -rf $(XORG_LIBX)/X11/xkb/compiled
|
|
|
|
(cd $(XORG_LIBX)/X11/xkb; ln -s /tmp compiled)
|
|
|
|
cp -LRf $(STAGING_DIR)$(TARGET_LIBX)/X11/icons $(XORG_LIBX)/X11/
|
|
|
|
-cp -LRf $(STAGING_DIR)$(TARGET_LIBX)/X11/locale $(XORG_LIBX)/X11/
|
|
|
|
cp -LRf $(STAGING_DIR)$(TARGET_LIBX)/X11/rgb.txt $(XORG_LIBX)/X11/
|
|
|
|
cp -LRf $(STAGING_DIR)$(TARGET_LIBX)/X11/XKeysymDB $(XORG_LIBX)/X11/
|
|
|
|
cp -LRf $(STAGING_DIR)$(TARGET_LIBX)/X11/XErrorDB $(XORG_LIBX)/X11/
|
2006-07-21 00:46:15 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/etc/X11/
|
2007-01-15 23:33:55 +01:00
|
|
|
$(SED) "s,^sysclientrc=.*,sysclientrc=/etc/X11/Xsession,g" $(XORG_BINX)/startx
|
|
|
|
$(SED) "s,^sysserverrc=.*,sysserverrc=/etc/X11/Xserver,g" $(XORG_BINX)/startx
|
|
|
|
cp -LRf package/xorg/xorg.conf $(TARGET_DIR)/etc/X11/
|
|
|
|
cp -LRf package/xorg/Xsession $(TARGET_DIR)/etc/X11/
|
|
|
|
cp -LRf package/xorg/Xserver $(TARGET_DIR)/etc/X11/
|
2006-07-18 09:19:10 +02:00
|
|
|
touch -c $(TARGET_XSERVER)
|
2005-05-13 00:22:29 +02:00
|
|
|
|
2007-01-15 23:33:55 +01:00
|
|
|
$(DL_DIR)/$(DEJAVU_SOURCE):
|
|
|
|
$(WGET) -P $(DL_DIR) $(DEJAVU_SITE)/$(DEJAVU_SOURCE)
|
|
|
|
|
|
|
|
$(DEJAVU_DIR)/.unpacked: $(DL_DIR)/$(DEJAVU_SOURCE)
|
|
|
|
$(DEJAVU_CAT) $(DL_DIR)/$(DEJAVU_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
touch $(DEJAVU_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(XORG_LIBX)/X11/fonts/ttf-dejavu/DejaVuSansMono.ttf: $(DEJAVU_DIR)/.unpacked
|
|
|
|
mkdir -p $(XORG_LIBX)/X11/fonts/ttf-dejavu
|
2007-01-25 21:34:10 +01:00
|
|
|
rm -f $(DEJAVU_DIR)/*Condensed*.ttf
|
|
|
|
rm -f $(DEJAVU_DIR)/*ExtraLight*.ttf
|
2007-01-15 23:33:55 +01:00
|
|
|
cp -LRf $(DEJAVU_DIR)/DejaVu*-Bold.ttf $(XORG_LIBX)/X11/fonts/ttf-dejavu/
|
|
|
|
cp -LRf $(DEJAVU_DIR)/DejaVu*-BoldOblique.ttf $(XORG_LIBX)/X11/fonts/ttf-dejavu/
|
|
|
|
cp -LRf $(DEJAVU_DIR)/DejaVu*-Oblique.ttf $(XORG_LIBX)/X11/fonts/ttf-dejavu/
|
|
|
|
cp -LRf $(DEJAVU_DIR)/DejaVuSans.ttf $(XORG_LIBX)/X11/fonts/ttf-dejavu/
|
|
|
|
cp -LRf $(DEJAVU_DIR)/DejaVuSansMono.ttf $(XORG_LIBX)/X11/fonts/ttf-dejavu/
|
|
|
|
cp -LRf $(DEJAVU_DIR)/DejaVuSerif.ttf $(XORG_LIBX)/X11/fonts/ttf-dejavu/
|
|
|
|
cp -LRf $(DEJAVU_DIR)/DejaVuSerif.ttf $(XORG_LIBX)/X11/fonts/ttf-dejavu/
|
|
|
|
cp package/xorg/fonts.cache-1 $(XORG_LIBX)/X11/fonts/ttf-dejavu/
|
|
|
|
( cd $(XORG_LIBX)/X11/fonts/ttf-dejavu/; mkfontdir )
|
|
|
|
touch -c $(XORG_LIBX)/X11/fonts/ttf-dejavu/DejaVuSansMono.ttf
|
|
|
|
|
|
|
|
$(XORG_LIBX)/libX11.so.6.2: $(TARGET_XSERVER) $(XORG_LIBX)/X11/fonts/ttf-dejavu/DejaVuSansMono.ttf
|
2007-08-21 13:25:30 +02:00
|
|
|
mkdir -p $(XORG_LIBX)
|
2007-08-22 11:56:41 +02:00
|
|
|
set -e; for dirs in $(XORG_LIBS); do \
|
|
|
|
file=`find $(XORG_LDIR)/$$dirs -type f -iname "*$$dirs.so*"`; \
|
|
|
|
$(STRIP) $(STRIP_STRIP_UNNEEDED) $$file; \
|
|
|
|
cp -f $$file $(XORG_LIBX); \
|
|
|
|
file=`find $(XORG_LDIR)/$$dirs -type l -iname "*$$dirs.so*"`; \
|
|
|
|
cp -pRf $$file $(XORG_LIBX); \
|
2005-05-13 00:22:29 +02:00
|
|
|
done
|
2005-07-15 01:34:47 +02:00
|
|
|
(cd $(TARGET_DIR)/usr/lib; ln -snf $(TARGET_LIBX) X11)
|
2006-07-21 00:46:15 +02:00
|
|
|
touch $(TARGET_DIR)/etc/ld.so.conf
|
2007-08-22 11:56:41 +02:00
|
|
|
if [ "`grep -c '$(TARGET_LIBX)' $(TARGET_DIR)/etc/ld.so.conf`" = "0" ]; then \
|
2006-07-18 09:19:10 +02:00
|
|
|
echo "$(TARGET_LIBX)" >> $(TARGET_DIR)/etc/ld.so.conf; \
|
2007-08-21 21:20:18 +02:00
|
|
|
fi
|
2006-07-18 09:19:10 +02:00
|
|
|
touch -c $(XORG_LIBX)/libX11.so.6.2
|
2005-07-15 01:34:47 +02:00
|
|
|
|
2007-01-11 11:38:10 +01:00
|
|
|
$(TARGET_DIR)/usr/bin/mcookie: package/xorg/mcookie.c
|
|
|
|
$(TARGET_CROSS)gcc -Wall -Os -s package/xorg/mcookie.c -o $(TARGET_DIR)/usr/bin/mcookie
|
|
|
|
|
2007-08-10 21:07:51 +02:00
|
|
|
xorg: zlib png pkgconfig expat fontconfig libdrm $(STAGING_DIR)$(TARGET_LIBX)/libX11.so.6.2 \
|
2007-01-11 11:38:10 +01:00
|
|
|
$(XORG_LIBX)/libX11.so.6.2 $(TARGET_DIR)/usr/bin/mcookie
|
2005-05-13 00:22:29 +02:00
|
|
|
|
2007-01-15 23:33:55 +01:00
|
|
|
xorg-source: $(DL_DIR)/$(XORG_SOURCE) $(DL_DIR)/$(DEJAVU_SOURCE)
|
2005-05-13 00:22:29 +02:00
|
|
|
|
|
|
|
xorg-clean:
|
|
|
|
-rm -rf $(TARGET_DIR)/usr/X11R6
|
|
|
|
-$(MAKE) -C $(XORG_DIR) clean
|
|
|
|
|
|
|
|
xorg-dirclean:
|
|
|
|
-rm -rf $(XORG_DIR)
|
|
|
|
-rm -rf $(TARGET_DIR)/usr/X11R6
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
TARGETS+=xorg
|
|
|
|
endif
|
|
|
|
endif
|