summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-02-28 01:58:50 +0000
committerMike Frysinger <vapier@gentoo.org>2006-02-28 01:58:50 +0000
commit61482258b210c43d37c533ab0a509a4341b9add3 (patch)
tree17ef41f7f94e8a87fd648d0d8c6c03885d88e71e /dev-lang/spidermonkey
parentRemove src_compile. (diff)
downloadgentoo-2-61482258b210c43d37c533ab0a509a4341b9add3.tar.gz
gentoo-2-61482258b210c43d37c533ab0a509a4341b9add3.tar.bz2
gentoo-2-61482258b210c43d37c533ab0a509a4341b9add3.zip
Clean up build system to not suck #123564 by Jeroen Roovers.
(Portage version: 2.1_pre5-r1)
Diffstat (limited to 'dev-lang/spidermonkey')
-rw-r--r--dev-lang/spidermonkey/ChangeLog10
-rw-r--r--dev-lang/spidermonkey/files/digest-spidermonkey-1.5-r11
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-1.5-build.patch138
-rw-r--r--dev-lang/spidermonkey/spidermonkey-1.5-r1.ebuild34
4 files changed, 181 insertions, 2 deletions
diff --git a/dev-lang/spidermonkey/ChangeLog b/dev-lang/spidermonkey/ChangeLog
index e95c665639f1..9d5eefaebd28 100644
--- a/dev-lang/spidermonkey/ChangeLog
+++ b/dev-lang/spidermonkey/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-lang/spidermonkey
-# Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/spidermonkey/ChangeLog,v 1.17 2006/02/19 03:46:57 vanquirius Exp $
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/spidermonkey/ChangeLog,v 1.18 2006/02/28 01:58:50 vapier Exp $
+
+*spidermonkey-1.5-r1 (28 Feb 2006)
+
+ 28 Feb 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/spidermonkey-1.5-build.patch, +spidermonkey-1.5-r1.ebuild:
+ Clean up build system to not suck #123564 by Jeroen Roovers.
*spidermonkey-1.5 (19 Feb 2006)
diff --git a/dev-lang/spidermonkey/files/digest-spidermonkey-1.5-r1 b/dev-lang/spidermonkey/files/digest-spidermonkey-1.5-r1
new file mode 100644
index 000000000000..4fa79f7b5b9f
--- /dev/null
+++ b/dev-lang/spidermonkey/files/digest-spidermonkey-1.5-r1
@@ -0,0 +1 @@
+MD5 863bb6462f4ce535399a7c6276ae6776 js-1.5.tar.gz 958135
diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.5-build.patch b/dev-lang/spidermonkey/files/spidermonkey-1.5-build.patch
new file mode 100644
index 000000000000..3328757dd994
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-1.5-build.patch
@@ -0,0 +1,138 @@
+--- js/src/Makefile.ref
++++ js/src/Makefile.ref
+@@ -127,7 +127,7 @@ endif
+ ifdef JS_READLINE
+ # For those platforms with the readline library installed.
+ DEFINES += -DEDITLINE
+-PROG_LIBS += -lreadline -ltermcap
++PROG_LIBS += -lreadline
+ else
+ ifdef JS_EDITLINE
+ # Use the editline library, built locally.
+@@ -370,3 +370,16 @@ TARFILES = files `cat files`
+ SUFFIXES: .i
+ %.i: %.c
+ $(CC) -C -E $(CFLAGS) $< > $*.i
++
++DESTDIR :=
++PREFIX := /usr
++BINDIR := $(PREFIX)/bin
++MY_LIBDIR := $(PREFIX)/$(LIBDIR)
++INCLUDEDIR := $(PREFIX)/include/js
++INSTALL := install -g root -o root
++install:
++ $(INSTALL) -m 755 -d $(DESTDIR)$(INCLUDEDIR) $(DESTDIR)$(MY_LIBDIR) $(DESTDIR)$(BINDIR)
++ $(INSTALL) -m 755 $(SHARED_LIBRARY) $(DESTDIR)$(MY_LIBDIR)
++ $(INSTALL) -m 644 $(LIBRARY) $(DESTDIR)$(MY_LIBDIR)
++ $(INSTALL) -m 755 $(OBJDIR)/js $(OBJDIR)/jscpucfg $(DESTDIR)$(BINDIR)
++ $(INSTALL) -m 644 $(HFILES) $(DESTDIR)$(INCLUDEDIR)
+--- js/src/config/Linux_All.mk
++++ js/src/config/Linux_All.mk
+@@ -41,37 +41,15 @@
+ # Config for all versions of Linux
+ #
+
+-CC = gcc
+-CCC = g++
+ CFLAGS += -Wall -Wno-format
+ OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R
+
+ RANLIB = echo
+-MKSHLIB = $(LD) -shared $(XMKSHLIBOPTS)
++MKSHLIB = $(LD) -shared $(XMKSHLIBOPTS) -soname $(notdir $@)
+
+ #.c.o:
+ # $(CC) -c -MD $*.d $(CFLAGS) $<
+
+-CPU_ARCH = $(shell uname -m)
+-# don't filter in x86-64 architecture
+-ifneq (x86_64,$(CPU_ARCH))
+-ifeq (86,$(findstring 86,$(CPU_ARCH)))
+-CPU_ARCH = x86
+-OS_CFLAGS+= -DX86_LINUX
+-
+-ifeq (gcc, $(CC))
+-# if using gcc on x86, check version for opt bug
+-# (http://bugzilla.mozilla.org/show_bug.cgi?id=24892)
+-GCC_VERSION := $(shell gcc -v 2>&1 | grep version | awk '{ print $$3 }')
+-GCC_LIST:=$(sort 2.91.66 $(GCC_VERSION) )
+-
+-ifeq (2.91.66, $(firstword $(GCC_LIST)))
+-CFLAGS+= -DGCC_OPT_BUG
+-endif
+-endif
+-endif
+-endif
+-
+ GFX_ARCH = x
+
+ OS_LIBS = -lm -lc
+@@ -88,16 +66,6 @@
+ endif
+
+ # Use the editline library to provide line-editing support.
+-JS_EDITLINE = 1
++JS_READLINE = 1
+
+-ifeq ($(CPU_ARCH),x86_64)
+-# Use VA_COPY() standard macro on x86-64
+-# FIXME: better use it everywhere
+ OS_CFLAGS += -DHAVE_VA_COPY -DVA_COPY=va_copy
+-endif
+-
+-ifeq ($(CPU_ARCH),x86_64)
+-# We need PIC code for shared libraries
+-# FIXME: better patch rules.mk & fdlibm/Makefile*
+-OS_CFLAGS += -DPIC -fPIC
+-endif
+--- js/src/rules.mk
++++ js/src/rules.mk
+@@ -82,6 +82,10 @@ $(OBJDIR)/%.o: %.c
+ @$(MAKE_OBJDIR)
+ $(CC) -o $@ -c $(CFLAGS) $*.c
+
++$(OBJDIR)/%.lo: %.c
++ @$(MAKE_OBJDIR)
++ $(CC) -o $@ -c $(CFLAGS) $*.c -fPIC
++
+ $(OBJDIR)/%.o: %.s
+ @$(MAKE_OBJDIR)
+ $(AS) -o $@ $(ASFLAGS) $*.s
+@@ -111,11 +115,12 @@ $(SHARED_LIBRARY): $(LIB_OBJS)
+ /implib:"$(OBJDIR)/$(@F:.dll=.lib)" $^
+ else
+ $(LIBRARY): $(LIB_OBJS)
+- $(AR) rv $@ $?
++ $(AR) cr $@ $?
+ $(RANLIB) $@
+
+-$(SHARED_LIBRARY): $(LIB_OBJS)
+- $(MKSHLIB) -o $@ $(LIB_OBJS) $(LDFLAGS) $(OTHER_LIBS)
++SHARED_LIB_OBJS := $(LIB_OBJS:.o=.lo)
++$(SHARED_LIBRARY): $(SHARED_LIB_OBJS)
++ $(MKSHLIB) -o $@ $(SHARED_LIB_OBJS) $(LDFLAGS) $(OTHER_LIBS)
+ endif
+ endif
+
+--- js/src/fdlibm/Makefile.ref
++++ js/src/fdlibm/Makefile.ref
+@@ -151,7 +151,7 @@
+
+ $(OBJDIR)/%.o: %.c
+ @$(MAKE_OBJDIR)
+- $(CC) -o $@ -c $(CFLAGS) $*.c
++ $(CC) -o $@ -c $(CFLAGS) $*.c -fPIC
+
+ $(OBJDIR)/%.o: %.s
+ @$(MAKE_OBJDIR)
+--- js/src/config.mk
++++ js/src/config.mk
+@@ -112,6 +112,8 @@
+ CP = cp
+ endif
+
++BUILD_OPT := 1
++
+ ifdef BUILD_OPT
+ OPTIMIZER = -O
+ DEFINES += -UDEBUG -DNDEBUG -UDEBUG_$(shell whoami)
diff --git a/dev-lang/spidermonkey/spidermonkey-1.5-r1.ebuild b/dev-lang/spidermonkey/spidermonkey-1.5-r1.ebuild
new file mode 100644
index 000000000000..fc8a8293a9ce
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-1.5-r1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/spidermonkey/spidermonkey-1.5-r1.ebuild,v 1.1 2006/02/28 01:58:50 vapier Exp $
+
+inherit eutils toolchain-funcs
+
+MY_P="js-${PV}"
+DESCRIPTION="Stand-alone JavaScript C library"
+HOMEPAGE="http://www.mozilla.org/js/spidermonkey/"
+SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/js/${MY_P}.tar.gz"
+
+LICENSE="NPL-1.1"
+SLOT="0"
+KEYWORDS="-*" #~amd64 ~hppa ~ppc ~ppc64 ~x86"
+IUSE=""
+
+S=${WORKDIR}/js/src
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-1.5-build.patch
+}
+
+src_compile() {
+ tc-export CC LD AR
+ emake -j1 -f Makefile.ref || die
+}
+
+src_install() {
+ make -f Makefile.ref install DESTDIR="${D}" || die
+ dodoc ../jsd/README
+ dohtml README.html
+}