[packages] use xorg-libraries as the section definition for Xorg libraries
[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 PKG_FIXUP:=libtool
20
21 include $(INCLUDE_DIR)/host-build.mk
22 include $(INCLUDE_DIR)/package.mk
23
24 PKG_INSTALL:=1
25
26 HOST_BUILD_DEPENDS:=libIDL2/host
27 PKG_BUILD_DEPENDS:=orbit2/host
28
29 TARGET_CFLAGS+= \
30         -I$(STAGING_DIR)/usr/lib/libintl/include \
31         -I$(STAGING_DIR)/usr/libiconv/include
32
33 TARGET_LDFLAGS+= \
34         -L$(STAGING_DIR)/usr/lib/libintl/lib \
35         -L$(STAGING_DIR)/usr/lib/libiconv/lib
36
37 BIGENDIAN=no
38 ifeq ($(CONFIG_BIG_ENDIAN),y)
39         BIGENDIAN:=yes
40 endif
41
42 CONFIGURE_VARS += \
43         ac_cv_c_bigendian=$(BIGENDIAN) \
44         ac_cv_alignof_CORBA_octet=1 \
45         ac_cv_alignof_CORBA_boolean=1 \
46         ac_cv_alignof_CORBA_char=1 \
47         ac_cv_alignof_CORBA_wchar=2 \
48         ac_cv_alignof_CORBA_short=2 \
49         ac_cv_alignof_CORBA_long=4 \
50         ac_cv_alignof_CORBA_long_long=4 \
51         ac_cv_alignof_CORBA_float=4 \
52         ac_cv_alignof_CORBA_double=4 \
53         ac_cv_alignof_CORBA_long_double=4 \
54         ac_cv_alignof_CORBA_struct=1 \
55         ac_cv_alignof_CORBA_pointer=4
56
57 define Package/orbit2
58   SECTION:=xorg-libraries
59   CATEGORY:=Xorg
60   SUBMENU:=libraries
61   TITLE:=ORBit2
62   URL:=http://www.gnome.org/projects/ORBit2/
63   DEPENDS:=+glib2 +libIDL2
64 endef
65
66 define Package/orbit2/description
67 ORBit2 is a CORBA 2.4-compliant Object Request Broker (ORB).
68 endef
69
70 define Build/Configure
71         $(call Build/Configure/Default)
72         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
73 endef
74
75 define Build/InstallDev
76         $(INSTALL_DIR) $(1)/usr/{include/orbit-2.0,lib/pkgconfig}
77
78         $(CP) \
79                 $(PKG_INSTALL_DIR)/usr/lib/*.{so*,a,la} \
80                 $(1)/usr/lib/
81
82         $(INSTALL_DATA) \
83                 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
84                 $(1)/usr/lib/pkgconfig/
85
86         $(CP) \
87                 $(PKG_INSTALL_DIR)/usr/include/orbit-2.0/* \
88                 $(1)/usr/include/orbit-2.0/
89
90         $(INSTALL_DIR) $(1)/usr/share/aclocal
91         $(INSTALL_DATA) \
92                 $(PKG_INSTALL_DIR)/usr/share/aclocal/* \
93                 $(1)/usr/share/aclocal/
94
95         $(INSTALL_DIR) $(1)/usr/share/idl/orbit-2.0
96         $(INSTALL_DATA) \
97                 $(PKG_INSTALL_DIR)/usr/share/idl/orbit-2.0/* \
98                 $(1)/usr/share/idl/orbit-2.0/
99 endef
100
101 define Package/orbit2/install
102         $(INSTALL_DIR) $(1)/usr/lib
103         $(CP) \
104                 $(PKG_INSTALL_DIR)/usr/lib/libORBit*.so* \
105                 $(1)/usr/lib/
106 endef
107
108 $(eval $(call HostBuild))
109 $(eval $(call BuildPackage,orbit2))