lots of package cleanups/fixes
[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:=@SF/enlightenment
17 PKG_FIXUP = libtool
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/imlib2
22 SECTION:=xorg-libraries
23 CATEGORY:=Xorg
24 SUBMENU:=libraries
25 TITLE:=Image library
26 DEPENDS:=+xorg-server-essentials +giflib +libtiff +libjpeg +gtk-1.2.10 +libnotimpl +libfreetype
27 endef
28
29 CONFIGURE_ARGS+=--disable-gtktest LIBS="-Wl,-rpath-link=$(STAGING_DIR)/usr/lib"
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 $(CP) $(PKG_BUILD_DIR)/src/modules/loaders/.libs/*.so $(1)/usr/lib/imlib2/loaders/
53 $(INSTALL_DIR) $(2)/bin
54 mv $(1)/usr/bin/imlib2-config $(2)/bin/
55 $(SED) "s,prefix.*,prefix=$(STAGING_DIR)/usr,g" $(2)/bin/imlib2-config
56 $(SED) "s,exec_prefix.*,exec_prefix=$(STAGING_DIR)/usr,g" $(2)/bin/imlib2-config
57 endef
58
59 define Package/imlib2/install
60 $(INSTALL_DIR) $(1)/usr/lib/imlib2/loaders/
61 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*so* $(1)/usr/lib/
62 $(CP) $(PKG_BUILD_DIR)/src/modules/loaders/.libs/*.so $(1)/usr/lib/imlib2/loaders/
63 endef
64
65 $(eval $(call BuildPackage,imlib2))