5288b630a46bd0b8acc516d6145a5e5bb6213ba4
[openwrt/svn-archive/archive.git] / libs / libart / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libart
12 PKG_VERSION:=2.3.17
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_lgpl-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)_lgpl-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://ftp.gnome.org/pub/gnome/sources/libart_lgpl/2.3
18 PKG_MD5SUM:=f1f6b3e5490f382535dccb288f5d8b14
19 PKG_CAT:=zcat
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libart
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=An high-performance 2D graphics library
29 DESCRIPTION:=An high-performance 2D graphics library.\\\
30 A library of functions for 2D graphics supporting a superset of the \\\
31 PostScript imaging model, designed to be integrated with graphics, artwork, \\\
32 and illustration programs. It is written in optimized C, and is fully \\\
33 compatible with C++. With a small footprint of 10,000 lines of code, it is \\\
34 especially suitable for embedded applications.
35 URL:=http://www.levien.com/libart/
36 endef
37
38 define Build/Configure
39 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
40 CFLAGS="$(TARGET_CFLAGS)" \
41 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
42 LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \
43 $(TARGET_CONFIGURE_OPTS) \
44 ./configure \
45 --target=$(GNU_TARGET_NAME) \
46 --host=$(GNU_TARGET_NAME) \
47 --build=$(GNU_HOST_NAME) \
48 --program-prefix="" \
49 --program-suffix="" \
50 --prefix=/usr \
51 --exec-prefix=/usr \
52 --bindir=/usr/bin \
53 --sbindir=/usr/sbin \
54 --libexecdir=/usr/lib \
55 --sysconfdir=/etc \
56 --datadir=/usr/share \
57 --localstatedir=/var \
58 --mandir=/usr/man \
59 --infodir=/usr/info \
60 $(DISABLE_NLS) \
61 $(DISABLE_LARGEFILE) \
62 --enable-shared=yes \
63 --enable-static=yes \
64 --disable-rpath \
65 );
66 endef
67
68 define Build/Compile
69 rm -rf $(PKG_INSTALL_DIR)
70 mkdir -p $(PKG_INSTALL_DIR)
71 $(MAKE) -C $(PKG_BUILD_DIR) \
72 HOSTCC="$(HOSTCC)" \
73 DESTDIR="$(PKG_INSTALL_DIR)" \
74 all install
75 endef
76
77 define Package/libart/install
78 install -d -m0755 $(1)/usr/lib
79 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libart_lgpl_2.so.* $(1)/usr/lib/
80 endef
81
82 define Build/InstallDev
83 mkdir -p $(STAGING_DIR)/usr/bin
84 $(CP) $(PKG_INSTALL_DIR)/usr/bin/libart2-config $(STAGING_DIR)/usr/bin/
85 mkdir -p $(STAGING_DIR)/usr/include
86 $(CP) $(PKG_INSTALL_DIR)/usr/include/libart-2.0 $(STAGING_DIR)/usr/include/
87 mkdir -p $(STAGING_DIR)/usr/lib
88 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libart_lgpl_2.{a,so*} $(STAGING_DIR)/usr/lib/
89 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
90 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libart-2.0.pc $(STAGING_DIR)/usr/lib/pkgconfig/
91 $(SED) 's,-I$$$${includedir}/libart-2.0,,g' $(STAGING_DIR)/usr/lib/pkgconfig/libart-2.0.pc
92 $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/libart-2.0.pc
93 endef
94
95 define Build/UninstallDev
96 rm -rf \
97 $(STAGING_DIR)/usr/bin/libart2-config \
98 $(STAGING_DIR)/usr/include/libart-2.0 \
99 $(STAGING_DIR)/usr/lib/libart_lgpl_2.{a,so*} \
100 $(STAGING_DIR)/usr/lib/pkgconfig/libart-2.0.pc
101 endef
102
103 $(eval $(call BuildPackage,libart))