summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/xorg/xorg-config.patch5
-rw-r--r--package/xorg/xorg.mk10
2 files changed, 13 insertions, 2 deletions
diff --git a/package/xorg/xorg-config.patch b/package/xorg/xorg-config.patch
index 9c92ed12c..b5a4b2353 100644
--- a/package/xorg/xorg-config.patch
+++ b/package/xorg/xorg-config.patch
@@ -5,10 +5,11 @@
+#define TinyXServer YES
+#define XfbdevServer YES
+#define CrossCompiling YES
-+#define ProjectRoot /usr/X11R6
++#define ProjectRoot /usr/X11R6
+#define NothingOutsideProjectRoot YES
+
-+#define HasFreetype2 NO
++#define HasFreetype2 REPLACE_HAS_FREETYPE2
++#define Freetype2Dir REPLACE_STAGING_DIR/usr
+#define HasFontconfig NO
+#define HasLibpng YES
+#define HasZlib YES
diff --git a/package/xorg/xorg.mk b/package/xorg/xorg.mk
index 558d4cb0b..7d98b0e87 100644
--- a/package/xorg/xorg.mk
+++ b/package/xorg/xorg.mk
@@ -32,18 +32,28 @@ TARGET_LIBX:=/usr/X11R6/lib/
XORG_BINX:=$(TARGET_DIR)$(TARGET_BINX)
XORG_LIBX:=$(TARGET_DIR)$(TARGET_LIBX)
XORG_CF:=$(XORG_DIR)/config/cf/cross.def
+XORG_HOST_DEF:=$(XORG_DIR)/config/cf/host.def
# Install Xorg xserver
XSERVER:=Xorg
XORG_XSERVER:=$(XORG_DIR)/programs/Xserver/$(XSERVER)
TARGET_XSERVER:=$(XORG_BINX)/$(XSERVER)
+# Check if we should use FreeType2.
+ifeq ($(BR2_PACKAGE_FREETYPE),y)
+HAS_FREETYPE2=YES
+else
+HAS_FREETYPE2=NO
+endif
+
$(DL_DIR)/$(XORG_SOURCE):
$(WGET) -P $(DL_DIR) $(XORG_SITE)/$(XORG_SOURCE)
$(XORG_DIR)/.configure: $(DL_DIR)/$(XORG_SOURCE)
$(XORG_CAT) $(DL_DIR)/$(XORG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
toolchain/patch-kernel.sh $(XORG_DIR) package/xorg/ xorg\*.patch
+ $(SED) 's:REPLACE_STAGING_DIR:$(STAGING_DIR):g' $(XORG_HOST_DEF)
+ $(SED) 's:REPLACE_HAS_FREETYPE2:$(HAS_FREETYPE2):g' $(XORG_HOST_DEF)
$(SED) 's:REPLACE_GCCINC_DIR:$(shell $(TARGET_CROSS)gcc -print-file-name=include):g' $(XORG_CF)
$(SED) 's:REPLACE_STAGING_DIR:$(STAGING_DIR):g' $(XORG_CF)
$(SED) 's:REPLACE_ARCH:$(ARCH):g' $(XORG_CF)