summaryrefslogtreecommitdiff
path: root/package/ruby/Makefile
blob: d8d5f061a39ba943f9c04b70f7451e64eecdff4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

include ${TOPDIR}/rules.mk

PKG_NAME:=		ruby
PKG_VERSION:=		1.9.3
PKG_EXTRAVER:=		0
PKG_RELEASE:=		1
PKG_MD5SUM:=		8e2fef56185cfbaf29d0c8329fc77c05
PKG_DESCR:=		interpreter for the ruby language
PKG_SECTION:=		lang
PKG_URL:=		http://www.ruby-lang.org/
PKG_SITES:=		http://ftp.ruby-lang.org/pub/ruby/1.9/
PKG_NOPARALLEL:=	1

PKG_HOST_DEPENDS:=	!freebsd !cygwin

DISTFILES:= 		${PKG_NAME}-${PKG_VERSION}-p${PKG_EXTRAVER}.tar.gz
WRKDIST=		${WRKDIR}/${PKG_NAME}-${PKG_VERSION}-p${PKG_EXTRAVER}

include ${TOPDIR}/mk/package.mk

$(eval $(call PKG_template,RUBY,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))

MAKE_FILE:=		GNUmakefile
XAKE_FLAGS+=		optflags='' debugflags='' dldflags="$(TARGET_LDFLAGS)" 
# uClibc setpgrp does not take arguments
CONFIGURE_ENV+=         ac_cv_func_setpgrp_void=yes rb_cv_binary_elf=yes
CONFIGURE_ARGS+=	--disable-install-doc --with-baseruby=${STAGING_DIR}/bin/ruby
ALL_TARGET:=		main
INSTALL_TARGET:=	install-nodoc

pre-configure:
	(cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
		rb_cv_binary_elf=yes ./configure --prefix=$(STAGING_HOST_DIR) --disable-install-doc \
	);
	-$(MAKE) -C ${WRKBUILD} main Q=""
	cp ${WRKBUILD}/ruby ${STAGING_DIR}/bin/ruby
	$(MAKE) -C ${WRKBUILD} install-nodoc
	$(MAKE) -C ${WRKBUILD} clean

post-install:
	${INSTALL_DIR} ${IDIR_RUBY}/usr/lib/ruby
	${INSTALL_DIR} ${IDIR_RUBY}/usr/bin
	${CP} ${WRKINST}/usr/lib/libruby.so* ${IDIR_RUBY}/usr/lib
	${CP} ${WRKINST}/usr/lib/ruby/* ${IDIR_RUBY}/usr/lib/ruby
	${INSTALL_BIN} ${WRKINST}/usr/bin/* ${IDIR_RUBY}/usr/bin

include ${TOPDIR}/mk/pkg-bottom.mk