a3104b8ee8d41edf9881578bde4a57250dd4689e
[openwrt/svn-archive/archive.git] / libs / libsigc++ / Makefile
1 #
2 # Copyright (C) 2006,2007 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:=libsigc++
12 PKG_VERSION:=2.0.17
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.0/
17 PKG_MD5SUM:=fde0ee69e3125e982746d9fe005763e1
18
19 PKG_BUILD_DEPENDS:=libtool
20
21 PKG_FIXUP = libtool
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libsigcxx
26 NAME:=libsigc++
27 SECTION:=libs
28 CATEGORY:=Libraries
29 TITLE:=typesafe callback system for standard C++
30 URL:=http://libsigc++.sourceforge.net/
31 DEPENDS:=+uclibcxx
32 endef
33
34 define Package/libsigcxx/description
35 It allows you to define signals and to connect those signals to any
36 callback function, either global or a member function, regardless of
37 whether it is static or virtual.
38 endef
39
40 CONFIGURE_ARGS += \
41 --enable-shared \
42 --enable-static \
43
44 CONFIGURE_VARS += \
45 CXX="g++-uc+std" \
46 CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \
47
48 define Build/Configure
49 $(call Build/Configure/Default,)
50 $(SED) 's|^sys_lib_dlsearch_path_spec=.*|sys_lib_dlsearch_path_spec="$(STAGING_DIR)/usr/lib"|g' \
51 $(PKG_BUILD_DIR)/libtool
52 $(SED) 's|^postdeps=.*|postdeps=|g' $(PKG_BUILD_DIR)/libtool
53 endef
54
55 define Build/Compile
56 $(MAKE) -C $(PKG_BUILD_DIR) all
57 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
58 endef
59
60 define Build/InstallDev
61 mkdir -p $(1)/usr/include
62 $(CP) $(PKG_INSTALL_DIR)/usr/include/sigc++-2.0 $(1)/usr/include/
63 mkdir -p $(1)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsigc-2.0.{a,so*} $(1)/usr/lib/
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/sigc++-2.0 $(1)/usr/lib/
66 mkdir -p $(1)/usr/lib/pkgconfig
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sigc++-2.0.pc $(1)/usr/lib/pkgconfig/
68 $(SED) 's,$(TARGET_LDFLAGS),,g' $(1)/usr/lib/pkgconfig/sigc++-2.0.pc
69 endef
70
71 define Package/libsigcxx/install
72 $(INSTALL_DIR) $(1)/usr/lib
73 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsigc-2.0.so.* $(1)/usr/lib/
74 endef
75
76 $(eval $(call BuildPackage,libsigcxx))
77