[packages] orbit2:
[packages.git] / libs / orbit2 / Makefile
1 #
2 # Copyright (C) 2009-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=orbit2
11 PKG_VERSION:=2.14.16
12 PKG_RELEASE:=1
13
14 PKG_BUILD_DIR:=$(BUILD_DIR)/ORBit2-$(PKG_VERSION)
15 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/ORBit2-$(PKG_VERSION)
16 PKG_SOURCE:=ORBit2-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=@GNOME/ORBit2/2.14
18 #PKG_MD5SUM:=d7fb9eb41e8196f1aacf2f08375ae555
19
20 PKG_FIXUP:=libtool
21 PKG_REMOVE_FILES:=ltmain.sh
22
23 include $(INCLUDE_DIR)/host-build.mk
24 include $(INCLUDE_DIR)/package.mk
25
26 PKG_INSTALL:=1
27
28 HOST_BUILD_DEPENDS:=libIDL2/host
29 PKG_BUILD_DEPENDS:=orbit2/host
30
31 TARGET_CFLAGS+= \
32         -I$(STAGING_DIR)/usr/lib/libintl/include \
33         -I$(STAGING_DIR)/usr/libiconv/include
34
35 TARGET_LDFLAGS+= \
36         -L$(STAGING_DIR)/usr/lib/libintl/lib \
37         -L$(STAGING_DIR)/usr/lib/libiconv/lib
38
39 BIGENDIAN=no
40 ifeq ($(CONFIG_BIG_ENDIAN),y)
41         BIGENDIAN:=yes
42 endif
43
44 CONFIGURE_VARS += \
45         ac_cv_c_bigendian=$(BIGENDIAN) \
46         ac_cv_alignof_CORBA_octet=1 \
47         ac_cv_alignof_CORBA_boolean=1 \
48         ac_cv_alignof_CORBA_char=1 \
49         ac_cv_alignof_CORBA_wchar=2 \
50         ac_cv_alignof_CORBA_short=2 \
51         ac_cv_alignof_CORBA_long=4 \
52         ac_cv_alignof_CORBA_long_long=4 \
53         ac_cv_alignof_CORBA_float=4 \
54         ac_cv_alignof_CORBA_double=4 \
55         ac_cv_alignof_CORBA_long_double=4 \
56         ac_cv_alignof_CORBA_struct=1 \
57         ac_cv_alignof_CORBA_pointer=4
58
59 define Package/orbit2
60   SECTION:=xorg-libraries
61   CATEGORY:=Xorg
62   SUBMENU:=libraries
63   TITLE:=ORBit2
64   URL:=http://www.gnome.org/projects/ORBit2/
65   DEPENDS:=+glib2 +libIDL2
66 endef
67
68 define Package/orbit2/description
69 ORBit2 is a CORBA 2.4-compliant Object Request Broker (ORB).
70 endef
71
72 define Build/Configure
73         $(call Build/Configure/Default)
74         find $(PKG_BUILD_DIR) -name Makefile -exec sed -i 's,IDL_COMPILER.*orbit-idl-2,IDL_COMPILER = $(STAGING_DIR_HOST)/bin/orbit-idl-2,g' {} \; # tell orbit2 to use the host-built idl-compiler
75 endef
76
77 define Build/InstallDev
78         $(INSTALL_DIR) $(1)/usr/{include/orbit-2.0,lib/pkgconfig}
79
80         $(CP) \
81                 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
82                 $(1)/usr/lib/
83
84         $(INSTALL_DATA) \
85                 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
86                 $(1)/usr/lib/pkgconfig/
87
88         $(CP) \
89                 $(PKG_INSTALL_DIR)/usr/include/orbit-2.0/* \
90                 $(1)/usr/include/orbit-2.0/
91
92         $(INSTALL_DIR) $(1)/usr/share/aclocal
93         $(INSTALL_DATA) \
94                 $(PKG_INSTALL_DIR)/usr/share/aclocal/* \
95                 $(1)/usr/share/aclocal/
96
97         $(INSTALL_DIR) $(1)/usr/share/idl/orbit-2.0
98         $(INSTALL_DATA) \
99                 $(PKG_INSTALL_DIR)/usr/share/idl/orbit-2.0/* \
100                 $(1)/usr/share/idl/orbit-2.0/
101 endef
102
103 define Package/orbit2/install
104         $(INSTALL_DIR) $(1)/usr/lib
105         $(CP) \
106                 $(PKG_INSTALL_DIR)/usr/lib/libORBit*.so* \
107                 $(1)/usr/lib/
108 endef
109
110 $(eval $(call HostBuild))
111 $(eval $(call BuildPackage,orbit2))