[packages] fontconfig: fix cross-compilation (closes: #5502), add m5sum, cleanup
authorNicolas Thill <nico@openwrt.org>
Sun, 27 Sep 2009 08:48:34 +0000 (08:48 +0000)
committerNicolas Thill <nico@openwrt.org>
Sun, 27 Sep 2009 08:48:34 +0000 (08:48 +0000)
SVN-Revision: 17756

Xorg/xorg/app/fontconfig/Makefile

index 3707164..f94d279 100644 (file)
@@ -9,11 +9,11 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fontconfig
 PKG_VERSION:=2.6.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://fontconfig.org/release/
-PKG_MD5SUM:=
+PKG_MD5SUM:=ab54ec1d4ddd836313fdbc0cd5299d6d
 PKG_FIXUP:=libtool
 PKG_INSTALL:=1
 
@@ -27,37 +27,49 @@ define Package/fontconfig
   DEPENDS:=+libX11 +libexpat +libfreetype
 endef
 
-define Build/Configure
-       $(call Build/Configure/Default, \
-        --disable-docs \
-        --with-cache-dir=/usr/share/fontconfig/cache \
-        --with-arch=$(ARCH) \
-        , \
-        ac_cv_prog_HASDOCBOOK=no \
+CONFIGURE_ARGS+= \
+       --disable-docs \
+       --with-cache-dir=/usr/share/fontconfig/cache \
+       --with-arch=$(ARCH) \
+
+CONFIGURE_VARS+= \
+       ac_cv_prog_HASDOCBOOK=no \
+
+define Build/Compile
+       # XXX: the following 4 are compiled using CC_FOR_BUILD
+       $(foreach dir,fc-arch fc-case fc-lang fc-glyphname, \
+               $(MAKE) -C $(PKG_BUILD_DIR)/$(dir) \
+                       CC="$(HOSTCC)" \
+                       CFLAGS="$(HOST_CFLAGS)" \
+                       CPPFLAGS="" \
+                       LDFLAGS="$(HOST_LDFLAGS)"\
+               ; \
        )
+       $(MAKE) -C $(PKG_BUILD_DIR) \
+               DESTDIR="$(PKG_INSTALL_DIR)" \
+               DOCSRC="" \
+               install
 endef
 
-define Build/Compile
-       $(foreach dir,fc-arch fc-case fc-lang fc-glyphname src fc-cache fc-list, $(MAKE) -C $(PKG_BUILD_DIR)/$(dir) CFLAGS="$(TARGET_CPPFLAGS)"  \
-                       CPPFLAGS="" LDFLAGS="$(TARGET_LDFLAGS)";)
-       $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" DOCSRC="" install
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/fontconfig $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfontconfig.* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fontconfig.pc $(1)/usr/lib/pkgconfig/
 endef
 
 define Package/fontconfig/install
-       $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfontconfig.so.* $(1)/usr/lib/
+       $(INSTALL_DIR) $(1)/etc/fonts/conf.avail
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/fonts/conf.avail/*.conf $(1)/etc/fonts/conf.avail/
        $(INSTALL_DIR) $(1)/etc/fonts/conf.d
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/fonts/fonts.* $(1)/etc/fonts
-       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/fonts/conf.d/* $(1)/etc/fonts/conf.d
-endef
-
-define Build/InstallDev
-       $(INSTALL_DIR) $(1)/usr/{lib,include}
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/ $(1)/usr/lib/
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+       $(CP) $(PKG_INSTALL_DIR)/etc/fonts/conf.d/*.conf $(1)/etc/fonts/conf.d/
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/fonts/fonts.{conf,dtd} $(1)/etc/fonts/
 endef
 
 $(eval $(call BuildPackage,fontconfig))