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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 440 Revision 441
7GNU="freebsd-gnu-${PV}" 7GNU="freebsd-gnu-${PV}"
8GCC="freebsd-gcc-3.4.2" 8GCC="freebsd-gcc-3.4.2"
9BINUTILS="freebsd-binutils-2.15" 9BINUTILS="freebsd-binutils-2.15"
10 10
11DESCRIPTION="Contributed sources for FreeBSD. Includes programs and libraries" 11DESCRIPTION="Contributed sources for FreeBSD. Includes programs and libraries"
12SRC_URI="${BASE_SRC_URI}${P}.tar.bz2 12SRC_URI="mirror://gentoo/${GNU}.tar.bz2
13 ${BASE_SRC_URI}${GNU}.tar.bz2 13 mirror://gentoo/${GCC}.tar.bz2
14 ${BASE_SRC_URI}${GCC}.tar.bz2 14 mirror://gentoo/${BINUTILS}.tar.bz2
15 ${BASE_SRC_URI}${BINUTILS}.tar.bz2" 15 mirror://gentoo/${P}.tar.bz2"
16 16
17# Must be checked 17# Must be checked
18LICENSE="BSD GPL-2 AS-IS" 18LICENSE="BSD GPL-2 AS-IS"
19KEYWORDS="~x86-fbsd" 19KEYWORDS="~x86-fbsd"
20DEPEND="" 20DEPEND=""
21PROVIDE="virtual/gzip" 21PROVIDE="virtual/gzip"
22 22
23S=${WORKDIR}/gnu 23S=${WORKDIR}/gnu
24 24
25src_unpack() { 25src_unpack() {
26 unpack ${P}.tar.bz2 26 unpack ${P}.tar.bz2
27 unpack ${GNU}.tar.bz2 27 unpack ${GNU}.tar.bz2
28 unpack ${GCC}.tar.bz2 28 unpack ${GCC}.tar.bz2
29 unpack ${BINUTILS}.tar.bz2 29 unpack ${BINUTILS}.tar.bz2
30 30
41 41
42src_compile() { 42src_compile() {
43 # -pg and -fomit-frame-pointer are incompatible 43 # -pg and -fomit-frame-pointer are incompatible
44 filter-flags "-fomit-frame-pointer" 44 filter-flags "-fomit-frame-pointer"
45 45
46 # Set emake to gmake
47 emake="/usr/bin/gmake"
48
49 # It does not build without this
50 unset CFLAGS 46 unset CFLAGS
51 unset CXXFLAGS 47 unset CXXFLAGS
52 48
53 make ojb objlink 49 bsdmake ojb objlink
54 50
55 einfo "Building object/headers dependencies for this package" 51 einfo "Building object/headers dependencies for this package"
56 cd ${S}/usr.bin/cc/cc_tools 52 cd ${S}/usr.bin/cc/cc_tools
57 emake || die "make cc_tools failed" 53 bsdmake || die "make cc_tools failed"
58 einfo "Building binutils static libraries for this package" 54 einfo "Building binutils static libraries for this package"
59 cd ${S}/usr.bin/binutils 55 cd ${S}/usr.bin/binutils
60 emake || die "make binutils failed" 56 bsdmake || die "make binutils failed"
61 57
62 cd ${S} 58 cd ${S}
63 59
64 #CXX=c++ gmake -j1 || die "emake failed" 60 #CXX=c++ gmake -j1 || die "emake failed"
65 einfo "Buiding package now" 61 einfo "Buiding package now"
66 emake || die "emake failed" 62 bsdmake || die "emake failed"
67} 63}
68 64
69src_install() { 65src_install() {
70 make DESTDIR=${D} install || die "Install failed" 66 bsdmake DESTDIR=${D} install || die "Install failed"
71 einfo "Moving headers to standard format" 67 einfo "Moving headers to standard format"
72 move_headers 68 move_headers
73 move_headers ${D}/usr/include/c++/3.4/bits ${D}/tmp/include/bits/ 69 move_headers ${D}/usr/include/c++/3.4/bits ${D}/tmp/include/bits/
74 70
75 sleep 5 71 sleep 5
76 72
77} 73}
78 74
79# This function removes the files installed inside directories in 75# This function removes the files installed inside directories in
80# /usr/include/c++/3.4 and install them as files inside the same dir (like 76# /usr/include/c++/3.4 and install them as files inside the same dir (like
81# FreeBSD does) 77# FreeBSD does)
82move_headers() { 78move_headers() {
83 if [ $# -lt 2 ] ; then 79 if [ $# -lt 2 ] ; then
84 HEADERPATH=${D}/usr/include/c++/3.4/ 80 HEADERPATH=${D}/usr/include/c++/3.4/
85 HEADERTMP=${D}/tmp/include 81 HEADERTMP=${D}/tmp/include
86 else 82 else
87 HEADERPATH=$1 83 HEADERPATH=$1
102 einfo "Moving $i to $HEADERTMP/$FILE" 98 einfo "Moving $i to $HEADERTMP/$FILE"
103 mv $i $HEADERTMP/$FILE 99 mv $i $HEADERTMP/$FILE
104 done 100 done
105 cd .. 101 cd ..
106 rm -rf $FILE 102 rm -rf $FILE
107 fi 103 fi
108 fi 104 fi
109 done 105 done
110 106
111 cd $HEADERTMP 107 cd $HEADERTMP
112 ls 108 ls
113 mv * $HEADERPATH 109 mv * $HEADERPATH
114 rm -rf $HEADERTMP 110 rm -rf $HEADERTMP
115 sleep 5 111 sleep 5
116} 112}

Legend:
Removed from v.440  
changed lines
  Added in v.441

  ViewVC Help
Powered by ViewVC 1.1.20