Root/guile2/Makefile

1#
2# Copyright (C) 2009 Qi Hardware Inc.
3# Author: Xiangfu Liu <xiangfu@qi-hardware.com>
4#
5# This is free software, licensed under the GNU General Public License v2.
6# See /LICENSE for more information.
7#
8
9# modified 16/08/2010
10# author: jmoore@zedstar.org
11
12
13# modified 20/02/2012
14# author: jnbagale@gmail.com
15
16# modified 23/10/2012
17# fix depends
18
19
20# Install libffi-dev on the host computer
21
22include $(TOPDIR)/rules.mk
23
24PKG_NAME:=guile
25PKG_VERSION:=2.0.5
26
27PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
28PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/guile/
29
30PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
31
32PKG_BUILD_PARALLEL:=1
33HOST_BUILD_PARALLEL:=1
34
35PKG_FIXUP:=libtool
36PKG_INSTALL:=1
37
38PKG_BUILD_DEPENDS:=guile2/host
39HOST_BUILD_DEPENDS:=gettext/host libiconv/host gc/host
40
41include $(INCLUDE_DIR)/host-build.mk
42include $(INCLUDE_DIR)/package.mk
43include $(INCLUDE_DIR)/nls.mk
44
45define Package/guile2
46    MAINTAINER:="Xiangfu Liu" <xiangfu@openmobilefree.net>
47    TITLE:=guile2
48    SECTION:=lang
49    CATEGORY:=Languages
50    DEPENDS:=+libgmp +libpthread +libltdl +libncurses +libreadline +libffi +libunistring +gc +librt
51    URL:=http://savannah.gnu.org/projects/guile/
52endef
53
54define Package/guile2/description
55    GNU Guile is an interpreter for Scheme, packaged as a library that you can link into your applications to give them their own scripting language.
56endef
57
58CONFIGURE_ARGS += --with-libgmp-prefix --with-libunistring-prefix --with-libltdl-prefix
59CONFIGURE_VARS += gl_cv_func_duplocale_works=yes guile_cv_use_csqrt="no, Ben NanoNote (cross-compiling)"
60
61HOST_CONFIGURE_ARGS += --disable-shared --with-libgmp-prefix --with-libunistring-prefix --with-libltdl-prefix
62HOST_CONFIGURE_VARS += PKG_CONFIG=true LIBFFI_LIBS=-lffi BDW_GC_LIBS=-lgc
63
64define Build/Prepare
65     $(call Build/Prepare/Default)
66endef
67
68define Host/Configure
69    $(call Host/Configure/Default)
70endef
71
72## On the host, we only compile and install guile2 used for bootstrapping
73define Host/Compile
74    $(call Host/Compile/Default)
75endef
76
77define Host/Install
78    $(call Host/Install/Default)
79endef
80
81define Build/InstallDev
82    $(INSTALL_DIR) \
83        $(1)/usr/include \
84        $(1)/usr/lib \
85        $(1)/usr/lib/pkgconfig
86    $(CP) \
87        $(PKG_INSTALL_DIR)/usr/lib/* \
88        $(1)/usr/lib/
89    $(CP) \
90        $(PKG_INSTALL_DIR)/usr/include/* \
91        $(1)/usr/include/
92    $(CP) \
93        $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* \
94        $(1)/usr/lib/pkgconfig/
95endef
96
97
98
99define Package/guile2/install
100    $(INSTALL_DIR) $(1)/usr/bin
101    $(INSTALL_DIR) $(1)/usr/lib
102    $(INSTALL_DIR) $(1)/usr/lib/guile/2.0
103    $(INSTALL_DIR) $(1)/usr/share/guile/2.0
104
105    $(CP) \
106        $(PKG_INSTALL_DIR)/usr/bin/* \
107        $(1)/usr/bin/
108    $(CP) \
109        $(PKG_INSTALL_DIR)/usr/lib/libguile*.so* \
110        $(1)/usr/lib/
111    $(CP) \
112        $(PKG_INSTALL_DIR)/usr/lib/guile/2.0/* \
113        $(1)/usr/lib/guile/2.0/
114    $(CP) \
115        $(PKG_INSTALL_DIR)/usr/share/guile/2.0/* \
116        $(1)/usr/share/guile/2.0/
117
118endef
119
120$(eval $(call HostBuild))
121$(eval $(call BuildPackage,guile2))
122

Archive Download this file



interactive