added our own pkg-config wrapper, making the sed foo on *.pc files obselete 2/2
[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 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libsigcxx
24 NAME:=libsigc++
25 SECTION:=libs
26 CATEGORY:=Libraries
27 TITLE:=typesafe callback system for standard C++
28 URL:=http://libsigc++.sourceforge.net/
29 DEPENDS:=+uclibcxx
30 endef
31
32 define Package/libsigcxx/description
33 It allows you to define signals and to connect those signals to any
34 callback function, either global or a member function, regardless of
35 whether it is static or virtual.
36 endef
37
38 CONFIGURE_ARGS += \
39 --enable-shared \
40 --enable-static \
41
42 CONFIGURE_VARS += \
43 CXX="g++-uc+std" \
44 CXXFLAGS="$$$$CXXFLAGS -fno-rtti" \
45
46 define Build/Configure
47 $(call Build/Configure/Default,)
48 $(call libtool_disable_rpath)
49 $(SED) 's|^sys_lib_dlsearch_path_spec=.*|sys_lib_dlsearch_path_spec="$(STAGING_DIR)/usr/lib"|g' \
50 $(PKG_BUILD_DIR)/libtool
51 $(SED) 's|^postdeps=.*|postdeps=|g' $(PKG_BUILD_DIR)/libtool
52 endef
53
54 define Build/Compile
55 $(MAKE) -C $(PKG_BUILD_DIR) all
56 $(call libtool_fixup_libdir,$(PKG_INSTALL_DIR))
57 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
58 endef
59
60 define Build/InstallDev
61 mkdir -p $(STAGING_DIR)/usr/include
62 $(CP) $(PKG_INSTALL_DIR)/usr/include/sigc++-2.0 $(STAGING_DIR)/usr/include/
63 mkdir -p $(STAGING_DIR)/usr/lib
64 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsigc-2.0.{a,so*} $(STAGING_DIR)/usr/lib/
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/sigc++-2.0 $(STAGING_DIR)/usr/lib/
66 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sigc++-2.0.pc $(STAGING_DIR)/usr/lib/pkgconfig/
68 $(SED) 's,$(TARGET_LDFLAGS),,g' $(STAGING_DIR)/usr/lib/pkgconfig/sigc++-2.0.pc
69 endef
70
71 define Build/UninstallDev
72 rm -rf $(STAGING_DIR)/usr/include/sigc++-2.0 \
73 $(STAGING_DIR)/usr/lib/libsigc-2.0.{a,so*} \
74 $(STAGING_DIR)/usr/lib/sigc++-2.0 \
75 $(STAGING_DIR)/usr/lib/pkgconfig/sigc++-2.0.pc
76
77 endef
78
79 define Package/libsigcxx/install
80 $(INSTALL_DIR) $(1)/usr/lib
81 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsigc-2.0.so.* $(1)/usr/lib/
82 endef
83
84 $(eval $(call BuildPackage,libsigcxx))
85