/[gentoo-alt]/trunk/sys-apps/freebsd-contrib/freebsd-contrib-5.3.ebuild
Gentoo

Contents of /trunk/sys-apps/freebsd-contrib/freebsd-contrib-5.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 441 - (show annotations) (download)
Wed Jun 8 16:59:52 2005 UTC (9 years, 3 months ago) by flameeyes
File size: 2528 byte(s)
Updated to use gentoo's mirrors and freebsd-utils eclass.

1 # Copyright 1999-2004 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header$
4
5 inherit freebsd-utils flag-o-matic
6
7 GNU="freebsd-gnu-${PV}"
8 GCC="freebsd-gcc-3.4.2"
9 BINUTILS="freebsd-binutils-2.15"
10
11 DESCRIPTION="Contributed sources for FreeBSD. Includes programs and libraries"
12 SRC_URI="mirror://gentoo/${GNU}.tar.bz2
13 mirror://gentoo/${GCC}.tar.bz2
14 mirror://gentoo/${BINUTILS}.tar.bz2
15 mirror://gentoo/${P}.tar.bz2"
16
17 # Must be checked
18 LICENSE="BSD GPL-2 AS-IS"
19 KEYWORDS="~x86-fbsd"
20 DEPEND=""
21 PROVIDE="virtual/gzip"
22
23 S=${WORKDIR}/gnu
24
25 src_unpack() {
26 unpack ${P}.tar.bz2
27 unpack ${GNU}.tar.bz2
28 unpack ${GCC}.tar.bz2
29 unpack ${BINUTILS}.tar.bz2
30
31 # Patch to avoid compilation of gcc, binutils, gdb and groff
32 cd ${S}/usr.bin
33 epatch ${FILESDIR}/${P}-ubin-makefile.patch
34
35 # Installation related patches
36 cd ${S}/lib/csu
37 epatch ${FILESDIR}/${P}-lib_csu-makefile.patch
38 cd ${S}/lib/libdialog
39 epatch ${FILESDIR}/${P}-libdialog-makefile.patch
40 }
41
42 src_compile() {
43 # -pg and -fomit-frame-pointer are incompatible
44 filter-flags "-fomit-frame-pointer"
45
46 unset CFLAGS
47 unset CXXFLAGS
48
49 bsdmake ojb objlink
50
51 einfo "Building object/headers dependencies for this package"
52 cd ${S}/usr.bin/cc/cc_tools
53 bsdmake || die "make cc_tools failed"
54 einfo "Building binutils static libraries for this package"
55 cd ${S}/usr.bin/binutils
56 bsdmake || die "make binutils failed"
57
58 cd ${S}
59
60 #CXX=c++ gmake -j1 || die "emake failed"
61 einfo "Buiding package now"
62 bsdmake || die "emake failed"
63 }
64
65 src_install() {
66 bsdmake DESTDIR=${D} install || die "Install failed"
67 einfo "Moving headers to standard format"
68 move_headers
69 move_headers ${D}/usr/include/c++/3.4/bits ${D}/tmp/include/bits/
70
71 sleep 5
72
73 }
74
75 # This function removes the files installed inside directories in
76 # /usr/include/c++/3.4 and install them as files inside the same dir (like
77 # FreeBSD does)
78 move_headers() {
79 if [ $# -lt 2 ] ; then
80 HEADERPATH=${D}/usr/include/c++/3.4/
81 HEADERTMP=${D}/tmp/include
82 else
83 HEADERPATH=$1
84 HEADERTMP=$2
85 fi
86 einfo HEADERPATH = ${HEADERPATH}
87 einfo HEADERTMP = ${HEADERTMP}
88 sleep 5
89
90 cd $HEADERPATH
91 mkdir -p $HEADERTMP
92 for FILE in * ; do
93 if [ -d $FILE ] ; then
94 if [ $FILE != "bits" ] && [ $FILE != "ext" ] &&
95 [ $FILE != "debug" ] && [ $FILE != "backward" ] ; then
96 cd $FILE
97 for i in * ; do
98 einfo "Moving $i to $HEADERTMP/$FILE"
99 mv $i $HEADERTMP/$FILE
100 done
101 cd ..
102 rm -rf $FILE
103 fi
104 fi
105 done
106
107 cd $HEADERTMP
108 ls
109 mv * $HEADERPATH
110 rm -rf $HEADERTMP
111 sleep 5
112 }

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20