/[gentoo-alt]/trunk/sys-libs/freebsd-lib/freebsd-lib-5.2.1.ebuild
Gentoo

Contents of /trunk/sys-libs/freebsd-lib/freebsd-lib-5.2.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 80 - (show annotations) (download)
Wed Oct 20 16:17:57 2004 UTC (9 years, 9 months ago) by angusyoung
File size: 4353 byte(s)
Cleanups in ebuild

1 # Copyright 1999-2004 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header$
4 LIBC=freebsd-libc-${PV}
5 USBIN=freebsd-usbin-${PV}
6 CONTRIB=freebsd-contrib-${PV}
7 CRYPTO=freebsd-crypto-sources-${PV}
8 LIBEXEC=freebsd-libexec-${PV}
9
10 inherit freebsd-utils eutils
11 DESCRIPTION="FreeBSD's base system libraries"
12 SLOT="0"
13 IUSE=""
14 SRC_URI="${SRC_URI}
15 http://dev.gentoo.org/~angusyoung/distfiles/${LIBC}.tar.bz2
16 http://dev.gentoo.org/~angusyoung/distfiles/${USBIN}.tar.bz2
17 http://dev.gentoo.org/~angusyoung/distfiles/${CONTRIB}.tar.bz2
18 http://dev.gentoo.org/~angusyoung/distfiles/${CRYPTO}.tar.bz2
19 http://dev.gentoo.org/~angusyoung/distfiles/${LIBEXEC}.tar.bz2"
20
21 DEPEND="=sys-libs/freebsd-libc-5.2*"
22 S=${WORKDIR}/lib
23
24 src_unpack() {
25 unpack ${P}.tar.bz2 || die "Unable to unpack ${P}.tar.bz2"
26 unpack ${USBIN}.tar.bz2 || die "Unable to unpack ${USBIN}.tar.bz2"
27 unpack ${CONTRIB}.tar.bz2 || die "Unable to unpack ${CONTRIB}.tar.bz2"
28 unpack ${CRYPTO}.tar.bz2 || die "Unable to unpack ${CRYPTO}.tar.bz2"
29 unpack ${LIBEXEC}.tar.bz2 || die "Unable to unpack ${LIBEXEC}.tar.bz2"
30
31 # It must be this way 'cause when I created the first tarball
32 # for libc it wasn't in the form <cat>/<pkg>.
33 cd lib
34 unpack ${LIBC}.tar.bz2
35
36 # Massive patching starts here
37
38 # Removes libncurses, libbz2, libc
39 epatch ${FILESDIR}/${PF}-makefile.patch
40
41 # Correct paths
42
43 cd ${S}/libcom_err
44 epatch ${FILESDIR}/libcom_err-${PV}-makefile.patch
45 cd ${S}/libsbuf
46 epatch ${FILESDIR}/freebsd-libsbuf-${PV}-makefile.patch
47 cd ${S}/libypclnt
48 epatch ${FILESDIR}/freebsd-libypclnt-${PV}-makefile.patch
49 cd ${S}/libcam
50 epatch ${FILESDIR}/freebsd-libcam-${PV}-makefile.patch
51
52 # Maybe can be moved to another part of installation
53 # but I'll check that later.
54 copy_headers
55
56 cd ${S}/libngatm
57 epatch ${FILESDIR}/freebsd-libngatm-${PV}-makefile.patch
58
59 # These patches makes libpam/modules/pam_* compile with -O1.
60 # I don't use filter-flags here because it would filter flags
61 # in the whole package.
62
63 cd ${S}/libpam/modules/
64 epatch ${FILESDIR}/fbsd-libpam-${PV}-modules-makefileinc.patch
65 cd ${S}/libpam/libpam
66 epatch ${FILESDIR}/fbsd-libpam-${PV}-libpam-makefile.patch
67 cd ${S}/libstand
68 epatch ${FILESDIR}/freebsd-libstand-${PV}-makefile.patch
69
70 # Installation related patches
71 cd ${S}/csu/i386-elf
72 epatch ${FILESDIR}/freebsd-csu-${PV}-install.patch
73 }
74
75 src_compile() {
76 emake || die "emake failed"
77 }
78
79 pkg_preinst() {
80 unlock-file "${D}/usr/lib/libc_r.so.5" "${D}/usr/lib/libkse.so.1" \
81 "${D}/usr/lib/libthr.so.1" "${D}/lib/libcrypt.so.2"
82 unlock-file "${ROOT}/usr/lib/libc_r.so.5" "${ROOT}/usr/lib/libkse.so.1" \
83 "${ROOT}/usr/lib/libthr.so.1" "${ROOT}/lib/libcrypt.so.2" \
84 "${ROOT}/lib/libutil.so.4"
85 }
86
87 src_install() {
88 emake DESTDIR=${D} install || die "Install failed"
89 unlock-file "${D}/usr/lib/libc_r.so.5" "${D}/usr/lib/libkse.so.1" \
90 "${D}/usr/lib/libthr.so.1" "${D}/lib/libcrypt.so.2" \
91 "${D}/lib/libutil.so.4"
92
93 # Workaround to avoid linking problems
94 # dosym ${D}/lib/libcrypt.so.2 ${D}/usr/lib/libcrypt.so
95 }
96
97 pkg_postinst() {
98 lock-file "${ROOT}/usr/lib/libc_r.so.5" "${ROOT}/usr/lib/libkse.so.1" \
99 "${ROOT}/usr/lib/libthr.so.1" "${ROOT}/lib/libcrypt.so.2" \
100 "${ROOT}/lib/libutil.so.4"
101 }
102
103 # Shouldn't we move this to another place?
104
105 copy_headers() {
106 local INC=${D}/include/netatm
107 ewarn
108 ewarn "Copying headers ..."
109
110 mkdir -p ${INC}
111 mkdir -p ${INC}/saal
112 mkdir -p ${INC}/msg
113 mkdir -p ${INC}/sig
114
115 cp /usr/src/sys/contrib/ngatm/netnatm/unimsg.h \
116 /usr/src/sys/contrib/ngatm/netnatm/addr.h ${INC}
117 cp /usr/src/sys/contrib/ngatm/netnatm/saal/sscfu.h \
118 /usr/src/sys/contrib/ngatm/netnatm/saal/sscfudef.h \
119 /usr/src/sys/contrib/ngatm/netnatm/saal/sscop.h \
120 /usr/src/sys/contrib/ngatm/netnatm/saal/sscopdef.h ${INC}/saal
121 cp /usr/src/sys/contrib/ngatm/netnatm/msg/uni_config.h \
122 /usr/src/sys/contrib/ngatm/netnatm/msg/uni_hdr.h \
123 /usr/src/sys/contrib/ngatm/netnatm/msg/uni_ie.h \
124 /usr/src/sys/contrib/ngatm/netnatm/msg/uni_msg.h \
125 /usr/src/sys/contrib/ngatm/netnatm/msg/unimsglib.h \
126 /usr/src/sys/contrib/ngatm/netnatm/msg/uniprint.h \
127 /usr/src/sys/contrib/ngatm/netnatm/msg/unistruct.h ${INC}/msg
128 cp /usr/src/sys/contrib/ngatm/netnatm/sig/uni.h \
129 /usr/src/sys/contrib/ngatm/netnatm/sig/unidef.h \
130 /usr/src/sys/contrib/ngatm/netnatm/sig/unisig.h ${INC}/sig
131
132 ewarn "Done"
133 ewarn
134 }

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.20