[packages] libast: add dependency on libpcre (#7137), add conditionnal dependencies...
[openwrt/svn-archive/archive.git] / Xorg / lib / libast / Makefile
1 #
2 # Copyright (C) 2006-2009 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:=libast
12 PKG_VERSION:=0.7
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.eterm.org/download/
17 PKG_MD5SUM:=a9ec3b2da317f35869316e6d9571d296
18
19 PKG_FIXUP:=libtool
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libast
25 SECTION:=xorg-libraries
26 CATEGORY:=Xorg
27 SUBMENU:=libraries
28 TITLE:=libast
29 DEPENDS:=+libpcre \
30 +FEATURE_drawing-backend_libX11:libX11 \
31 +FEATURE_drawing-backend_libX11:libXt
32 endef
33
34 CONFIGURE_ARGS+= \
35 --with-regexp="pcre" \
36 --without-imlib \
37
38 ifneq ($(CONFIG_FEATURE_drawing-backend_libX11),)
39 CONFIGURE_ARGS+= \
40 --with-x \
41 --x-includes="$(STAGING_DIR)/usr/include" \
42 --x-libraries="$(STAGING_DIR)/usr/lib"
43 else
44 CONFIGURE_ARGS+= \
45 --without-x
46 endif
47
48 CONFIGURE_VARS+= \
49 dps_cv_snprintf_bug=0 \
50 dps_cv_vsnprintf_bug=0 \
51
52 EXTRA_LDFLAGS+= -Wl,-rpath-link,$(STAGING_DIR)/usr/lib
53
54 define Build/InstallDev
55 $(INSTALL_DIR) $(1)/usr/lib $(1)/usr/include $(2)/bin
56 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libast.{la,so*} $(1)/usr/lib/
57 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(2)/bin/
58 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
59 $(SED) "s,-I/usr/include,,g" $(2)/bin/libast-config
60 $(SED) "s,-L/usr/lib,,g" $(2)/bin/libast-config
61 $(SED) "s,-L/usr/X11R6/lib,,g" $(2)/bin/libast-config
62 endef
63
64 define Package/libast/install
65 $(INSTALL_DIR) $(1)/usr/lib
66 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libast.so.* $(1)/usr/lib/
67 endef
68
69 $(eval $(call BuildPackage,libast))