blob: adee8878cc25b897699fa8fa9afa3e8c3b048593 (
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/snavigator/snavigator-5.0.ebuild,v 1.8 2002/12/09 04:21:16 manson Exp $
S=${WORKDIR}/build
DESCRIPTION="Source-Navigator is a source code analysis tool"
SRC_URI="http://mirrors.rcn.com/pub/sourceware/sourcenav/releases/SN50-010322-source.tar.gz"
HOMEPAGE="http://sources.redhat.com/sourcenav/"
SLOT="0"
LICENSE="GPL-2 LGPL-2"
KEYWORDS="x86 sparc "
DEPEND=">=sys-libs/glibc-2.2.4"
SN="/usr/snavigator"
src_unpack() {
mkdir build
unpack ${A}
}
src_compile() {
../source/configure \
--host=${CHOST} \
--prefix=${SN} \
--mandir=${SN}/share/man \
--infodir=${SN}/share/info \
--datadir=${SN}/share || die
make all-snavigator || die
}
fix_makefile() {
mv ${S}/$1/Makefile ${S}/$1/Makefile_orig
sed -e "s:$2:$3:" \
${S}/$1/Makefile_orig \
> ${S}/$1/Makefile
}
fix_destdir() {
fix_makefile "$1" "DESTDIR =" "DESTDIR = ${D}"
}
fix_destdir_bindir() {
fix_makefile "$1" "\$(DESTDIR)\$(bindir)" "${D}${SN}/bin"
}
src_install() {
# don't know why the DESTDIR var isn't propagated
fix_destdir snavigator/misc/libutils
fix_destdir snavigator/db
fix_destdir snavigator/sdk/api/tcl/misc
fix_destdir snavigator/sdk/api/c/database/examples
fix_destdir snavigator/sdk/api/tcl/database/examples
fix_destdir snavigator/sdk/parsers/examples/assembly
fix_destdir snavigator/sdk/parsers/examples/elf
fix_destdir snavigator/parsers/toolbox
fix_destdir snavigator/demo
fix_destdir snavigator/etc/sn_toolchains
fix_destdir snavigator/etc
# some strange propagation goes on here, just replacing it away
fix_destdir_bindir snavigator/db
fix_destdir_bindir snavigator/snavigator/unix
fix_destdir_bindir snavigator/parsers/assembly/ppc601-eabi
fix_destdir_bindir snavigator/parsers/cpp
fix_destdir_bindir snavigator/parsers/fortran
fix_destdir_bindir snavigator/hyper
fix_destdir_bindir snavigator/parsers/java
fix_destdir_bindir snavigator/parsers/m4
fix_destdir_bindir snavigator/parsers/cobol
fix_destdir_bindir snavigator/parsers/python
fix_destdir_bindir snavigator/parsers/tcl
fix_makefile snavigator/sdk/api/c/database/examples "\$(DESTDIR)\$(cdbdir)" "${D}/usr/snavigator/share/sdk/api/c/database/examples"
fix_makefile snavigator/sdk/api/tcl/database/examples "\$(DESTDIR)\$(tcldbdir)" "${D}/usr/snavigator/share/sdk/api/tcl/database/examples"
fix_makefile snavigator/sdk/api/tcl/misc "\$(DESTDIR)\$(misctcldir)" "${D}/usr/snavigator/share/sdk/api/tcl/misc"
fix_makefile snavigator/sdk/parsers/examples/assembly "\$(DESTDIR)\$(assemblydir)" "${D}/usr/snavigator/share/sdk/parsers/examples/assembly"
fix_makefile snavigator/sdk/parsers/examples/elf "\$(DESTDIR)\$(elfdir)" "${D}/usr/snavigator/share/sdk/parsers/examples/elf"
fix_makefile snavigator/parsers/toolbox "\$(DESTDIR)\$(sdkincludedir)" "${D}/usr/snavigator/share/sdk/include"
fix_makefile snavigator/etc/sn_toolchains "\$(DESTDIR)\$(sn_toolchainsdir)" "${D}/usr/snavigator/share/etc/sn_toolchains"
fix_makefile snavigator/etc "\$(DESTDIR)\$(etcdir)" "${D}/usr/snavigator/share/etc"
# other required fixes and vars that aren't propagated
fix_makefile / "${SN}" "${D}${SN}"
fix_makefile snavigator/db "NONE" "${D}${SN}"
fix_makefile snavigator/db "\$(sdkdir)/libpafdb.a" "${D}/\$(sdkdir)/libpafdb.a"
fix_makefile snavigator/sdk/api/c "\$(datadir)/sdk/include" "${D}${SN}/share/sdk/include"
fix_makefile snavigator/sdk "${SN}/share/sdk/lib" "${D}${SN}/share/sdk/lib"
fix_makefile snavigator/packages "progdir = \$(datadir)" "progdir = ${D}${SN}/share"
fix_makefile snavigator/gui "progdir = \$(datadir)" "progdir = ${D}${SN}/share"
fix_makefile snavigator/doc/html "htmldir = \$(prefix)/html" "htmldir = ${D}/usr/share/doc/${P}/html"
fix_makefile snavigator/doc/html "create_index_file \$(srchtmldir) \$(prefix)" "create_index_file \$(srchtmldir) ${D}/usr/share/doc/${P}"
fix_makefile snavigator/demo "demosdir = \$(datadir)" "demosdir = ${D}/usr/share/doc/${P}"
fix_makefile snavigator/bitmaps "imagedir = \$(datadir)" "imagedir = ${D}${SN}/share"
fix_makefile snavigator/snavigator/unix "\$(bindir)/snavigator" "${D}${SN}/bin/snavigator"
fix_makefile snavigator/install "\$(DESTDIR)\$(rootdir)" "${D}/usr/share/doc/${P}/"
fix_makefile snavigator "\$(prefix)" "${D}/usr/share/doc/${P}/"
fix_makefile tcl8.1/unix "${SN}/share" "${D}${SN}/share"
fix_makefile tcl8.1/unix "\$(INCLUDE_INSTALL_DIR)" "${D}${SN}/include"
fix_makefile tk8.1/unix "${SN}/share" "${D}${SN}/share"
fix_makefile tk8.1/unix "\$(INCLUDE_INSTALL_DIR)" "${D}${SN}/include"
fix_makefile tix/unix "\$(prefix)/share/tix" "${D}${SN}/share/tix"
fix_makefile itcl/itcl/unix "\$(INCLUDE_INSTALL_DIR)" "${D}${SN}/include"
fix_makefile itcl/itcl/unix "\$(prefix)/share/itcl" "${D}${SN}/share/itcl"
fix_makefile itcl/itk/unix "\$(INCLUDE_INSTALL_DIR)" "${D}${SN}/include"
fix_makefile itcl/itk/unix "\$(prefix)/share/itk" "${D}${SN}/share/itk"
fix_makefile itcl/iwidgets3.0.0/unix "IWIDGETS_LIBRARY = \$(datadir)" "IWIDGETS_LIBRARY = ${D}${SN}/share"
fix_makefile libgui/src "\$(includedir)" "${D}${SN}/include"
fix_makefile libgui/library "guidir = \$(datadir)" "guidir = ${D}${SN}/share"
make DESTDIR=${D} \
install-snavigator || die
chmod -Rf 755 ${D}/usr/share/doc/${P}/demos
dodir /etc/env.d
echo "PATH=/usr/snavigator/bin" > ${D}/etc/env.d/10snavigator
}
|