2 # Copyright (C) 2008 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
11 PKG_VERSION
:=1.6.20070208
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=ftp
://ftp.ossp.org
/pkg
/lib
/js
/
16 PKG_MD5SUM
:=07f6cad7e03fd74a949588c3d4b333de
19 PKG_REMOVE_FILES
:=aclocal.m4 libtool.m4
21 include $(INCLUDE_DIR
)/package.mk
25 define Package
/js
/Default
26 TITLE
:=Mozilla JavaScript Engine
27 URL
:=http
://www.ossp.org
/pkg
/lib
/js
/
31 $(call Package
/js
/Default
)
36 DEPENDS
+= +libjs
+libreadline
+libncurses
40 $(call Package
/js
/Default
)
46 TARGET_CFLAGS
+= $(FPIC
)
56 define Build
/Configure
57 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
62 --datadir=/usr
/share \
63 --includedir=/usr
/include \
64 --infodir=/usr
/share
/info \
66 --libexecdir
=/usr
/lib \
67 --localstatedir
=/var \
68 --mandir=/usr
/share
/man \
75 $(MAKE
) -C
$(PKG_BUILD_DIR
) src
/jsautocfg.h
76 $(call Build
/Configure
/Default
)
79 define Build
/InstallDev
80 $(INSTALL_DIR
) $(2)/bin
82 $(PKG_INSTALL_DIR
)/usr
/bin
/js-config \
85 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
88 $(INSTALL_DIR
) $(1)/usr
/include
90 $(PKG_INSTALL_DIR
)/usr
/include/js \
93 $(INSTALL_DIR
) $(1)/usr
/lib
95 $(PKG_INSTALL_DIR
)/usr
/lib
/libjs.
{la
,so
*} \
98 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
100 $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/js.
pc \
101 $(1)/usr
/lib
/pkgconfig
/
104 define Package
/js
/install
105 $(INSTALL_DIR
) $(1)/usr
/bin
107 $(PKG_INSTALL_DIR
)/usr
/bin
/js \
111 define Package
/libjs
/install
112 $(INSTALL_DIR
) $(1)/usr
/lib
114 $(PKG_INSTALL_DIR
)/usr
/lib
/libjs.so.
* \
118 $(eval
$(call BuildPackage
,js
))
119 $(eval
$(call BuildPackage
,libjs
))