/[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 441 - (hide annotations) (download)
Wed Jun 8 16:59:52 2005 UTC (13 years, 11 months ago) by flameeyes
File size: 3880 byte(s)
Updated to use gentoo's mirrors and freebsd-utils eclass.

1 angusyoung 272 # Copyright 1999-2005 Gentoo Foundation
2 angusyoung 259 # 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 flameeyes 441 SRC_URI="mirror://gentoo/${GNU}.tar.bz2
15     mirror://gentoo/${GCC}.tar.bz2
16     mirror://gentoo/${BINUTILS}.tar.bz2
17     mirror://gentoo/${P}.tar.bz2"
18 angusyoung 259
19     # Must be checked
20     LICENSE="BSD GPL-2 AS-IS"
21     KEYWORDS="~x86-fbsd"
22 angusyoung 272
23     DEPEND="virtual/libc
24     kerberos? ( virtual/krb5 )
25     ssl? ( =freebsd-crypto-5.3* )"
26    
27 angusyoung 259 PROVIDE="virtual/gzip"
28    
29     S=${WORKDIR}/gnu
30    
31 angusyoung 272 IUSE="nocxx objc ssl kerberos"
32    
33     pkg_setup() {
34     if use kerberos && ! use ssl; then
35     error "You can't install with kerberos support and no ssl support"
36     fi
37    
38     use nocxx && mymakeopts="${mymakeopts} NO_CXX= "
39     use objc || mymakeopts="${mymakeopts} NO_OBJC= "
40     # Fortran support seems not to be enable in any case
41     # use fortran || mymakeopts="${mymakeopts} NO_FORTRAN= "
42    
43     #Placeholder to disable cvs compilation, as we can't disable
44    
45     # it for now else it will broke everything.
46     # Same for gdb
47     # use cvs || mymakeopts="${mymakeopts} NO_CVS= "
48     # use gdb || mymakeopts="${mymakeopts} NO_GDB= "
49    
50     use ssl || mymakeopts="${mymakeopts} NO_OPENSSL= NOCRYPT= "
51     use kerberos || mymakeopts="${mymakeopts} NO_KERBEROS= "
52     }
53    
54    
55    
56 flameeyes 441 src_unpack() {
57 angusyoung 259 unpack ${P}.tar.bz2
58     unpack ${GNU}.tar.bz2
59     unpack ${GCC}.tar.bz2
60     unpack ${BINUTILS}.tar.bz2
61    
62     # Patch to avoid compilation of gcc, binutils and gdb
63     cd ${S}/usr.bin
64     epatch ${FILESDIR}/${MY_PATCH}-ubin-makefile_new.patch
65    
66 flameeyes 441
67 angusyoung 259 # Compilation related patches
68     cd ${S}/usr.bin/groff/contrib/mm
69     epatch ${FILESDIR}/${MY_PATCH}-ubin-groff_mm-makefile.patch
70    
71     cd ${S}/usr.bin/groff/tmac
72     epatch ${FILESDIR}/${MY_PATCH}-ubin-groff_tmac-makefile.patch
73    
74     cd ${S}/usr.bin/groff/src/utils/indxbib
75     epatch ${FILESDIR}/${MY_PATCH}-ubin-groff_src_indxbib-makefile.patch
76    
77     # Installation related patches
78     cd ${S}/lib/csu
79     epatch ${FILESDIR}/${MY_PATCH}-lib_csu-makefile.patch
80    
81     cd ${S}/lib/libdialog
82     epatch ${FILESDIR}/${MY_PATCH}-libdialog-makefile.patch
83    
84     cd ${S}/usr.bin/groff/font
85     epatch ${FILESDIR}/${MY_PATCH}-ubin-groff_font-makefile.patch
86     }
87    
88     src_compile() {
89     # -pg and -fomit-frame-pointer are incompatible
90     filter-flags "-fomit-frame-pointer"
91    
92     # Set emake to gmake
93 angusyoung 272 #emake="/usr/bin/gmake"
94 angusyoung 259
95     # It does not build without this
96     unset CFLAGS
97     unset CXXFLAGS
98    
99 flameeyes 441 bsdmake ojb objlink
100 angusyoung 259
101     einfo "Building object/headers dependencies for this package"
102     cd ${S}/usr.bin/cc/cc_tools
103 flameeyes 441 bsdmake || die "make cc_tools failed"
104 angusyoung 259 einfo "Building binutils static libraries for this package"
105     cd ${S}/usr.bin/binutils
106 angusyoung 272 fmake || die "make binutils failed"
107 angusyoung 259
108     cd ${S}
109    
110     #CXX=c++ gmake -j1 || die "emake failed"
111     einfo "Buiding package now"
112 angusyoung 272 fmake || die "emake failed"
113 angusyoung 259 }
114    
115     src_install() {
116 angusyoung 272 fmake DESTDIR=${D} install || die "Install failed"
117 angusyoung 259 einfo "Moving headers to standard format"
118     move_headers
119     move_headers ${D}/usr/include/c++/3.4/bits ${D}/tmp/include/bits/
120    
121     sleep 5
122    
123     }
124    
125 flameeyes 441 # This function removes the files installed inside directories in
126 angusyoung 259 # /usr/include/c++/3.4 and install them as files inside the same dir (like
127     # FreeBSD does)
128 flameeyes 441 move_headers() {
129 angusyoung 259 if [ $# -lt 2 ] ; then
130     HEADERPATH=${D}/usr/include/c++/3.4/
131     HEADERTMP=${D}/tmp/include
132     else
133     HEADERPATH=$1
134     HEADERTMP=$2
135     fi
136     einfo HEADERPATH = ${HEADERPATH}
137     einfo HEADERTMP = ${HEADERTMP}
138     sleep 5
139    
140     cd $HEADERPATH
141     mkdir -p $HEADERTMP
142     for FILE in * ; do
143     if [ -d $FILE ] ; then
144     if [ $FILE != "bits" ] && [ $FILE != "ext" ] &&
145     [ $FILE != "debug" ] && [ $FILE != "backward" ] ; then
146     cd $FILE
147     for i in * ; do
148     einfo "Moving $i to $HEADERTMP/$FILE"
149     mv $i $HEADERTMP/$FILE
150     done
151     cd ..
152     rm -rf $FILE
153 flameeyes 441 fi
154 angusyoung 259 fi
155     done
156    
157     cd $HEADERTMP
158     ls
159     mv * $HEADERPATH
160     rm -rf $HEADERTMP
161 flameeyes 441 sleep 5
162 angusyoung 259 }

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.20