libast: add dependency on libpcre (#7137), add conditionnal dependencies on libX11...
authorNicolas Thill <nico@openwrt.org>
Fri, 16 Apr 2010 02:31:52 +0000 (02:31 +0000)
committerNicolas Thill <nico@openwrt.org>
Fri, 16 Apr 2010 02:31:52 +0000 (02:31 +0000)
SVN-Revision: 20899

Xorg/lib/libast/Makefile

index 6cc0ca180c83fe703551202deb493f2748ef47b9..fea8fbf0d864eaee1f621f5911f2a2706c4b9007 100644 (file)
@@ -10,12 +10,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libast
 PKG_VERSION:=0.7
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.eterm.org/download/
 PKG_MD5SUM:=a9ec3b2da317f35869316e6d9571d296
+
 PKG_FIXUP:=libtool
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -24,35 +26,36 @@ define Package/libast
   CATEGORY:=Xorg
   SUBMENU:=libraries
   TITLE:=libast
-  DEPENDS:=+libX11
+  DEPENDS:=+libpcre \
+       +FEATURE_drawing-backend_libX11:libX11 \
+       +FEATURE_drawing-backend_libX11:libXt
 endef
 
-CONFIGURE_ARGS+=dps_cv_snprintf_bug=0 dps_cv_vsnprintf_bug=0 --without-imlib
+CONFIGURE_ARGS+= \
+       --with-regexp="pcre" \
+       --without-imlib \
 
-define Build/Configure
-       (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
-               if [ -x $(CONFIGURE_CMD) ]; then \
-                       $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
-                       $(CONFIGURE_VARS) \
-                       $(CONFIGURE_CMD) \
-                               $(CONFIGURE_ARGS_XTRA) \
-                               $(CONFIGURE_ARGS) ;\
-               fi \
-       )
-endef
+ifneq ($(CONFIG_FEATURE_drawing-backend_libX11),)
+  CONFIGURE_ARGS+= \
+       --with-x \
+       --x-includes="$(STAGING_DIR)/usr/include" \
+       --x-libraries="$(STAGING_DIR)/usr/lib"
+else
+  CONFIGURE_ARGS+= \
+       --without-x
+endif
 
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               CPPFLAGS="$(TARGET_CPPFLAGS)" \
-               LDFLAGS="$(TARGET_LDFLAGS)"
-       $(MAKE) -C $(PKG_BUILD_DIR) install DESTDIR=$(PKG_INSTALL_DIR)
-endef
+CONFIGURE_VARS+= \
+       dps_cv_snprintf_bug=0 \
+       dps_cv_vsnprintf_bug=0 \
+
+EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/lib $(1)/usr/include $(2)/bin
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*{la,so}* $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libast.{la,so*} $(1)/usr/lib/
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(2)/bin/
-       $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
        $(SED) "s,-I/usr/include,,g" $(2)/bin/libast-config
        $(SED) "s,-L/usr/lib,,g" $(2)/bin/libast-config
        $(SED) "s,-L/usr/X11R6/lib,,g" $(2)/bin/libast-config
@@ -60,7 +63,7 @@ endef
 
 define Package/libast/install
        $(INSTALL_DIR) $(1)/usr/lib
-       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libast.so.* $(1)/usr/lib/
 endef
 
 $(eval $(call BuildPackage,libast))