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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 441 - (show annotations) (download)
Wed Jun 8 16:59:52 2005 UTC (9 years, 1 month ago) by flameeyes
File size: 3018 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 and gdb
32 cd ${S}/usr.bin
33 epatch ${FILESDIR}/${P}-ubin-makefile_new.patch
34
35
36 # Compilation related patches
37 cd ${S}/usr.bin/groff/contrib/mm
38 epatch ${FILESDIR}/freebsd-contrib-5.3-ubin-groff_mm-makefile.patch
39
40 cd ${S}/usr.bin/groff/tmac
41 epatch ${FILESDIR}/${P}-ubin-groff_tmac-makefile.patch
42
43 cd ${S}/usr.bin/groff/src/utils/indxbib
44 epatch ${FILESDIR}/${P}-ubin-groff_src_indxbib-makefile.patch
45
46 # Installation related patches
47 cd ${S}/lib/csu
48 epatch ${FILESDIR}/${P}-lib_csu-makefile.patch
49
50 cd ${S}/lib/libdialog
51 epatch ${FILESDIR}/${P}-libdialog-makefile.patch
52
53 cd ${S}/usr.bin/groff/font
54 epatch ${FILESDIR}/${P}-ubin-groff_font-makefile.patch
55 }
56
57 src_compile() {
58 # -pg and -fomit-frame-pointer are incompatible
59 filter-flags "-fomit-frame-pointer"
60
61 # Set emake to gmake
62 emake="/usr/bin/gmake"
63
64 # It does not build without this
65 unset CFLAGS
66 unset CXXFLAGS
67
68 bsdmake ojb objlink
69
70 einfo "Building object/headers dependencies for this package"
71 cd ${S}/usr.bin/cc/cc_tools
72 bsdmake || die "make cc_tools failed"
73 einfo "Building binutils static libraries for this package"
74 cd ${S}/usr.bin/binutils
75 bsdmake || die "make binutils failed"
76
77 cd ${S}
78
79 #CXX=c++ gmake -j1 || die "emake failed"
80 einfo "Buiding package now"
81 bsdmake || die "emake failed"
82 }
83
84 src_install() {
85 bsdmake DESTDIR=${D} install || die "Install failed"
86 einfo "Moving headers to standard format"
87 move_headers
88 move_headers ${D}/usr/include/c++/3.4/bits ${D}/tmp/include/bits/
89
90 sleep 5
91
92 }
93
94 # This function removes the files installed inside directories in
95 # /usr/include/c++/3.4 and install them as files inside the same dir (like
96 # FreeBSD does)
97 move_headers() {
98 if [ $# -lt 2 ] ; then
99 HEADERPATH=${D}/usr/include/c++/3.4/
100 HEADERTMP=${D}/tmp/include
101 else
102 HEADERPATH=$1
103 HEADERTMP=$2
104 fi
105 einfo HEADERPATH = ${HEADERPATH}
106 einfo HEADERTMP = ${HEADERTMP}
107 sleep 5
108
109 cd $HEADERPATH
110 mkdir -p $HEADERTMP
111 for FILE in * ; do
112 if [ -d $FILE ] ; then
113 if [ $FILE != "bits" ] && [ $FILE != "ext" ] &&
114 [ $FILE != "debug" ] && [ $FILE != "backward" ] ; then
115 cd $FILE
116 for i in * ; do
117 einfo "Moving $i to $HEADERTMP/$FILE"
118 mv $i $HEADERTMP/$FILE
119 done
120 cd ..
121 rm -rf $FILE
122 fi
123 fi
124 done
125
126 cd $HEADERTMP
127 ls
128 mv * $HEADERPATH
129 rm -rf $HEADERTMP
130 sleep 5
131 }

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.20