eae8f84c2b097db6614ae9fc4672f6ac4037b707
[openwrt/svn-archive/archive.git] / XOrg / lib / imlib2 / 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 # blogic@openwrt.org
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=imlib2
12 PKG_VERSION:=1.2.2
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://downloads.sourceforge.net/enlightenment/
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/imlib2
21 SECTION:=xorg-libraries
22 CATEGORY:=Xorg
23 SUBMENU:=libraries
24 TITLE:=Image library
25 DEPENDS:=+xorg-server-essentials +giflib +libtiff +libjpeg +gtk-1.2.10 +libnotimpl +libfreetype
26 endef
27
28 CONFIGURE_ARGS+=--disable-gtktest LIBS="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib"
29
30 EXTRA_LDFLAGS+=-lnotimpl
31
32 define Build/Configure
33 (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH); \
34 if [ -x $(CONFIGURE_CMD) ]; then \
35 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/ && \
36 $(CONFIGURE_VARS) \
37 $(CONFIGURE_CMD) \
38 $(CONFIGURE_ARGS_XTRA) \
39 $(CONFIGURE_ARGS) ;\
40 fi \
41 )
42 endef
43
44 define Build/Compile
45 $(MAKE) -C $(PKG_BUILD_DIR)
46 $(MAKE) -C $(PKG_BUILD_DIR) install DESTDIR=$(PKG_INSTALL_DIR)
47 endef
48
49 define Build/InstallDev
50 $(INSTALL_DIR) $(1)/
51 $(CP) $(PKG_INSTALL_DIR)/* $(1)/
52 $(SED) "s,"libdir\=\'/usr/lib\'",libdir='$(1)/usr/lib\'," $(1)/usr/lib/libImlib2.la
53 $(SED) "s,prefix.*,prefix=$(STAGING_DIR)/usr,g" $(1)/usr/bin/imlib2-config
54 $(SED) "s,exec_prefix.*,exec_prefix=$(STAGING_DIR)/usr,g" $(1)/usr/bin/imlib2-config
55 $(CP) $(PKG_BUILD_DIR)/src/modules/loaders/.libs/*.so $(1)/usr/lib/imlib2/loaders/
56 endef
57
58 define Package/imlib2/install
59 $(INSTALL_DIR) $(1)/usr/lib/imlib2/loaders/
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib/
61 $(CP) $(PKG_BUILD_DIR)/src/modules/loaders/.libs/*.so $(1)/usr/lib/imlib2/loaders/
62 endef
63
64 $(eval $(call BuildPackage,imlib2))