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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 259 - (show annotations) (download)
Fri Mar 11 18:56:10 2005 UTC (9 years, 5 months ago) by angusyoung
File size: 3090 byte(s)
New ebuild with updated sources

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 BASE_VER="5.3"
8 MY_PATCH=${PN}-${BASE_VER}
9 GNU="freebsd-gnu-${PV}"
10 GCC="freebsd-gcc-3.4.2"
11 BINUTILS="freebsd-binutils-2.15"
12
13 DESCRIPTION="Contributed sources for FreeBSD. Includes programs and libraries"
14 SRC_URI="${BASE_SRC_URI}${P}.tar.bz2
15 ${BASE_SRC_URI}${GNU}.tar.bz2
16 ${BASE_SRC_URI}${GCC}.tar.bz2
17 ${BASE_SRC_URI}${BINUTILS}.tar.bz2"
18
19 # Must be checked
20 LICENSE="BSD GPL-2 AS-IS"
21 KEYWORDS="~x86-fbsd"
22 DEPEND=""
23 PROVIDE="virtual/gzip"
24
25 S=${WORKDIR}/gnu
26
27 src_unpack() {
28 unpack ${P}.tar.bz2
29 unpack ${GNU}.tar.bz2
30 unpack ${GCC}.tar.bz2
31 unpack ${BINUTILS}.tar.bz2
32
33 # Patch to avoid compilation of gcc, binutils and gdb
34 cd ${S}/usr.bin
35 epatch ${FILESDIR}/${MY_PATCH}-ubin-makefile_new.patch
36
37
38 # Compilation related patches
39 cd ${S}/usr.bin/groff/contrib/mm
40 epatch ${FILESDIR}/${MY_PATCH}-ubin-groff_mm-makefile.patch
41
42 cd ${S}/usr.bin/groff/tmac
43 epatch ${FILESDIR}/${MY_PATCH}-ubin-groff_tmac-makefile.patch
44
45 cd ${S}/usr.bin/groff/src/utils/indxbib
46 epatch ${FILESDIR}/${MY_PATCH}-ubin-groff_src_indxbib-makefile.patch
47
48 # Installation related patches
49 cd ${S}/lib/csu
50 epatch ${FILESDIR}/${MY_PATCH}-lib_csu-makefile.patch
51
52 cd ${S}/lib/libdialog
53 epatch ${FILESDIR}/${MY_PATCH}-libdialog-makefile.patch
54
55 cd ${S}/usr.bin/groff/font
56 epatch ${FILESDIR}/${MY_PATCH}-ubin-groff_font-makefile.patch
57 }
58
59 src_compile() {
60 # -pg and -fomit-frame-pointer are incompatible
61 filter-flags "-fomit-frame-pointer"
62
63 # Set emake to gmake
64 emake="/usr/bin/gmake"
65
66 # It does not build without this
67 unset CFLAGS
68 unset CXXFLAGS
69
70 make ojb objlink
71
72 einfo "Building object/headers dependencies for this package"
73 cd ${S}/usr.bin/cc/cc_tools
74 emake || die "make cc_tools failed"
75 einfo "Building binutils static libraries for this package"
76 cd ${S}/usr.bin/binutils
77 emake || die "make binutils failed"
78
79 cd ${S}
80
81 #CXX=c++ gmake -j1 || die "emake failed"
82 einfo "Buiding package now"
83 emake || die "emake failed"
84 }
85
86 src_install() {
87 make DESTDIR=${D} install || die "Install failed"
88 einfo "Moving headers to standard format"
89 move_headers
90 move_headers ${D}/usr/include/c++/3.4/bits ${D}/tmp/include/bits/
91
92 sleep 5
93
94 }
95
96 # This function removes the files installed inside directories in
97 # /usr/include/c++/3.4 and install them as files inside the same dir (like
98 # FreeBSD does)
99 move_headers() {
100 if [ $# -lt 2 ] ; then
101 HEADERPATH=${D}/usr/include/c++/3.4/
102 HEADERTMP=${D}/tmp/include
103 else
104 HEADERPATH=$1
105 HEADERTMP=$2
106 fi
107 einfo HEADERPATH = ${HEADERPATH}
108 einfo HEADERTMP = ${HEADERTMP}
109 sleep 5
110
111 cd $HEADERPATH
112 mkdir -p $HEADERTMP
113 for FILE in * ; do
114 if [ -d $FILE ] ; then
115 if [ $FILE != "bits" ] && [ $FILE != "ext" ] &&
116 [ $FILE != "debug" ] && [ $FILE != "backward" ] ; then
117 cd $FILE
118 for i in * ; do
119 einfo "Moving $i to $HEADERTMP/$FILE"
120 mv $i $HEADERTMP/$FILE
121 done
122 cd ..
123 rm -rf $FILE
124 fi
125 fi
126 done
127
128 cd $HEADERTMP
129 ls
130 mv * $HEADERPATH
131 rm -rf $HEADERTMP
132 sleep 5
133 }

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.20