summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2009-09-22 02:02:10 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2009-09-22 02:02:10 +0000
commit4a4a8a54f070026921cfd8aaa57512459dfc7fb4 (patch)
treee536fc2c9539e21b980d8a0667e777c8d4fd5d73 /dev-util/sgb
parentstable x86, security bug 285370 (diff)
downloadgentoo-2-4a4a8a54f070026921cfd8aaa57512459dfc7fb4.tar.gz
gentoo-2-4a4a8a54f070026921cfd8aaa57512459dfc7fb4.tar.bz2
gentoo-2-4a4a8a54f070026921cfd8aaa57512459dfc7fb4.zip
Cleanup of build process for bug #248373.
(Portage version: 2.2_rc40/cvs/Linux x86_64)
Diffstat (limited to 'dev-util/sgb')
-rw-r--r--dev-util/sgb/ChangeLog9
-rw-r--r--dev-util/sgb/files/sgb-20030623-destdir.patch76
-rw-r--r--dev-util/sgb/files/sgb-20030623-parallel-make-fix.patch47
-rw-r--r--dev-util/sgb/sgb-20030623.ebuild45
4 files changed, 160 insertions, 17 deletions
diff --git a/dev-util/sgb/ChangeLog b/dev-util/sgb/ChangeLog
index e56c72cc0031..5878394ae03b 100644
--- a/dev-util/sgb/ChangeLog
+++ b/dev-util/sgb/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-util/sgb
-# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/sgb/ChangeLog,v 1.7 2008/09/03 09:53:30 opfer Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/sgb/ChangeLog,v 1.8 2009/09/22 02:02:10 robbat2 Exp $
+
+ 22 Sep 2009; Robin H. Johnson <robbat2@gentoo.org> sgb-20030623.ebuild,
+ +files/sgb-20030623-destdir.patch,
+ +files/sgb-20030623-parallel-make-fix.patch:
+ Cleanup of build process for bug #248373.
03 Sep 2008; Christian Faulhammer <opfer@gentoo.org> sgb-20030623.ebuild:
extend dependency to allow virtual/tex-base and quote variables
diff --git a/dev-util/sgb/files/sgb-20030623-destdir.patch b/dev-util/sgb/files/sgb-20030623-destdir.patch
new file mode 100644
index 000000000000..0517d0ce46a3
--- /dev/null
+++ b/dev-util/sgb/files/sgb-20030623-destdir.patch
@@ -0,0 +1,76 @@
+diff -Nuar -Nuar work.orig/Makefile work/Makefile
+--- work.orig/Makefile 2009-09-22 01:59:32.521217030 +0000
++++ work/Makefile 2009-09-22 01:58:42.494972535 +0000
+@@ -93,50 +93,48 @@
+ $(CC) $(CFLAGS) -DDATA_DIRECTORY=\"$(DATADIR)/\" -c gb_io.c
+
+ test_io: gb_io.o
+- $(CC) $(CFLAGS) test_io.c gb_io.o -o test_io
++ $(CC) $(CFLAGS) $(LDFLAGS) test_io.c gb_io.o -o test_io
+
+ test_graph: gb_graph.o
+- $(CC) $(CFLAGS) test_graph.c gb_graph.o -o test_graph
++ $(CC) $(CFLAGS) $(LDFLAGS) test_graph.c gb_graph.o -o test_graph
+
+ test_flip: gb_flip.o
+- $(CC) $(CFLAGS) test_flip.c gb_flip.o -o test_flip
++ $(CC) $(CFLAGS) $(LDFLAGS) test_flip.c gb_flip.o -o test_flip
+
+-tests: test_io test_graph test_flip
++tests: certified
++
++tests_phase1: test_io test_graph test_flip
+ ./test_io
+ ./test_graph
+ ./test_flip
+- make gb_sort.o
+- make lib
+- make test_sample
++
++certified tests_phase2: tests_phase1 gb_sort.o lib test_sample
+ - ./test_sample > sample.out
+ diff test.gb test.correct
+ diff sample.out sample.correct
+- rm test.gb sample.out test_io test_graph test_flip test_sample
++ echo rm test.gb sample.out test_io test_graph test_flip test_sample
+ echo "Congratulations --- the tests have all been passed."
+ touch certified
+
+-install: lib
+- if test ! -r certified; then echo "Please run 'make tests' first!"; fi
+- test -r certified
+- make installdata
+- - mkdir $(LIBDIR)
+- - cp libgb.a $(LIBDIR)
+- - mkdir $(CWEBINPUTS)
+- - cp -p boilerplate.w gb_types.w $(CWEBINPUTS)
+- - mkdir $(INCLUDEDIR)
+- - cp -p $(HEADERS) Makefile $(INCLUDEDIR)
++install: lib certified installdata
++ - mkdir -p $(DESTDIR)$(LIBDIR)
++ - cp libgb.a $(DESTDIR)$(LIBDIR)
++ - mkdir -p $(DESTDIR)$(CWEBINPUTS)
++ - cp -p boilerplate.w gb_types.w $(DESTDIR)$(CWEBINPUTS)
++ - mkdir -p $(DESTDIR)$(INCLUDEDIR)
++ - cp -p $(HEADERS) Makefile $(DESTDIR)$(INCLUDEDIR)
+
+ installdata: $(DATAFILES)
+- - mkdir $(SGBDIR)
+- - mkdir $(DATADIR)
+- - cp -p $(DATAFILES) $(DATADIR)
++ - mkdir -p $(DESTDIR)$(SGBDIR)
++ - mkdir -p $(DESTDIR)$(DATADIR)
++ - cp -p $(DATAFILES) $(DESTDIR)$(DATADIR)
+
+ installdemos: lib $(DEMOS)
+- - mkdir $(BINDIR)
+- - mv $(DEMOS) $(BINDIR)
++ - mkdir -p $(DESTDIR)$(BINDIR)
++ - mv $(DEMOS) $(DESTDIR)$(BINDIR)
+
+ uninstalldemos:
+- - cd $(BINDIR); rm -f $(DEMOS)
++ - cd $(DESTDIR)$(BINDIR); rm -f $(DEMOS)
+
+ doc:
+ tex abstract.plaintex
diff --git a/dev-util/sgb/files/sgb-20030623-parallel-make-fix.patch b/dev-util/sgb/files/sgb-20030623-parallel-make-fix.patch
new file mode 100644
index 000000000000..4a96742f24eb
--- /dev/null
+++ b/dev-util/sgb/files/sgb-20030623-parallel-make-fix.patch
@@ -0,0 +1,47 @@
+diff -Nuar b/Makefile a/Makefile
+--- b/Makefile 1999-12-27 22:27:24.000000000 +0000
++++ a/Makefile 2009-09-21 11:49:40.000000000 +0000
+@@ -46,26 +46,14 @@
+
+ .SUFFIXES: .dvi .tex .w
+
+-.tex.dvi:
+- tex $*.tex
++all: libgb.a test_io test_graph test_flip demos
+
+-.w.c:
+- if test -r $*.ch; then ctangle $*.w $*.ch; else ctangle $*.w; fi
+-
+-.w.tex:
+- if test -r $*.ch; then cweave $*.w $*.ch; else cweave $*.w; fi
+-
+-.w.o:
+- make $*.c
+- make $*.o
+-
+-.w:
+- make $*.c
+- make $*
+-
+-.w.dvi:
+- make $*.tex
+- make $*.dvi
++%.dvi: %.tex
++ tex $^
++%.c: %.w
++ ctangle $^
++%.tex: %.w
++ cweave $^
+
+ DATAFILES = anna.dat david.dat econ.dat games.dat homer.dat huck.dat \
+ jean.dat lisa.dat miles.dat roget.dat words.dat
+@@ -175,3 +163,9 @@
+
+ fulltar: $(ALL) ERRATA ANSI AMIGA PROTOTYPES MSVC
+ tar cvf sgb.tar $(ALL) ERRATA ANSI AMIGA PROTOTYPES MSVC
++
++$(DEMOS) lib tests test_io test_graph test_flip: libgb.a
++
++demos: $(DEMOS)
++
++.PRECIOUS: .o .c .tex
diff --git a/dev-util/sgb/sgb-20030623.ebuild b/dev-util/sgb/sgb-20030623.ebuild
index 57a41a740612..c28f34f631e0 100644
--- a/dev-util/sgb/sgb-20030623.ebuild
+++ b/dev-util/sgb/sgb-20030623.ebuild
@@ -1,6 +1,8 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/sgb/sgb-20030623.ebuild,v 1.6 2008/09/03 09:53:30 opfer Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/sgb/sgb-20030623.ebuild,v 1.7 2009/09/22 02:02:10 robbat2 Exp $
+
+inherit eutils
DESCRIPTION="Stanford GraphBase"
HOMEPAGE="ftp://labrea.stanford.edu/pub/sgb/"
@@ -10,34 +12,47 @@ SLOT="0"
KEYWORDS="~ppc x86"
IUSE=""
DEPEND="|| ( >=dev-util/cweb-3.00 virtual/tex-base )"
+S="${WORKDIR}"
src_unpack() {
- cd "${S}"
unpack ${A}
- echo >>Makefile
- echo 'demos: $(DEMOS)' >>Makefile
+ epatch "${FILESDIR}"/sgb-20030623-parallel-make-fix.patch
+ epatch "${FILESDIR}"/sgb-20030623-destdir.patch
}
src_compile() {
- emake SGBDIR=/usr/share/${PN} \
+ emake \
+ CFLAGS="${CFLAGS}" \
+ SGBDIR=/usr/share/${PN} \
INCLUDEDIR=/usr/include/sgb \
- LIBDIR=/usr/lib \
+ LIBDIR=/usr/$(get_libdir) \
BINDIR=/usr/bin \
- CWEBINPUTS=/usr/share/${PN}/cweb \
- CFLAGS="${CFLAGS}" tests lib demos
+ CFLAGS="${CFLAGS}" \
+ lib demos tests || die "Failed to build"
+ #CWEBINPUTS=/usr/share/${PN}/cweb \
+ #LDFLAGS="${LDFLAGS}" \
}
src_install() {
dodir /usr/share/${PN} /usr/include/sgb /usr/lib /usr/bin /usr/share/${PN}/cweb
- emake SGBDIR="${D}"/usr/share/${PN} \
- INCLUDEDIR="${D}"/usr/include/sgb \
- LIBDIR="${D}"/usr/lib \
- BINDIR="${D}"/usr/bin \
- CWEBINPUTS="${D}"/usr/share/${PN}/cweb \
- CFLAGS="${CFLAGS}" install installdata installdemos
+ emake \
+ DESTDIR="${D}" \
+ SGBDIR=/usr/share/${PN} \
+ INCLUDEDIR=/usr/include/sgb \
+ LIBDIR=/usr/$(get_libdir) \
+ BINDIR=/usr/bin \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ CWEBINPUTS=/usr/share/${PN}/cweb \
+ install \
+ || die "Failed to install"
+
# we don't need no makefile
rm "${D}"/usr/include/sgb/Makefile
dodoc ERRATA README
+}
+src_test() {
+ emake tests
}