/[gentoo-x86]/eclass/x-modular.eclass
Gentoo

Diff of /eclass/x-modular.eclass

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

Revision 1.5 Revision 1.13
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.5 2005/08/15 00:33:31 spyderous Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.13 2005/09/12 21:44:16 spyderous Exp $
4# 4#
5# Author: Donnie Berkholz <spyderous@gentoo.org> 5# Author: Donnie Berkholz <spyderous@gentoo.org>
6# 6#
7# This eclass is designed to reduce code duplication in the modularized X11 7# This eclass is designed to reduce code duplication in the modularized X11
8# ebuilds. 8# ebuilds.
42 media-fonts/encodings" 42 media-fonts/encodings"
43 PDEPEND="${PDEPEND} 43 PDEPEND="${PDEPEND}
44 media-fonts/font-alias" 44 media-fonts/font-alias"
45fi 45fi
46 46
47# If we're a driver package
48if [[ "${PN/#xf86-video}" != "${PN}" ]] || [[ "${PN/#xf86-input}" != "${PN}" ]]; then
49 # Don't build static driver modules
50 DRIVER_OPTIONS="--disable-static"
51fi
52
47DEPEND="${DEPEND} 53DEPEND="${DEPEND}
48 dev-util/pkgconfig 54 >=dev-util/pkgconfig-0.18
49 x11-misc/util-macros" 55 x11-misc/util-macros"
50 56
51RDEPEND="${RDEPEND}" 57RDEPEND="${RDEPEND}
52# Shouldn't be necessary once we're in a standard location 58 !<x11-base/xorg-x11-7"
59# Provides virtual/x11 for temporary use until packages are ported
53# x11-base/x11-env" 60# x11-base/x11-env"
54# FIXME: Uncomment once it's in portage
55# !x11-base/xorg-x11"
56 61
57x-modular_unpack_source() { 62x-modular_unpack_source() {
58 unpack ${A} 63 unpack ${A}
59 cd ${S} 64 cd ${S}
60} 65}
88 then 93 then
89 # If possible, generate configure if it doesn't exist 94 # If possible, generate configure if it doesn't exist
90 if [ -f "${S}/configure.ac" ] 95 if [ -f "${S}/configure.ac" ]
91 then 96 then
92 einfo "Running autoreconf..." 97 einfo "Running autoreconf..."
93 autoreconf -v --install 98 autoreconf -v --force --install
94 fi 99 fi
95 fi 100 fi
96 101
97} 102}
98 103
100 x-modular_unpack_source 105 x-modular_unpack_source
101 x-modular_patch_source 106 x-modular_patch_source
102 x-modular_reconf_source 107 x-modular_reconf_source
103} 108}
104 109
105x-modular_src_compile() { 110x-modular_src_configure() {
106 # If prefix isn't set here, .pc files cause problems 111 # If prefix isn't set here, .pc files cause problems
107 if [ -x ./configure ]; then 112 if [ -x ./configure ]; then
108 econf --prefix=${XDIR} \ 113 econf --prefix=${XDIR} \
109 --datadir=${XDIR}/share \ 114 --datadir=${XDIR}/share \
115 ${DRIVER_OPTIONS} \
110 ${CONFIGURE_OPTIONS} 116 ${CONFIGURE_OPTIONS}
111 fi 117 fi
118}
119
120x-modular_src_make() {
112 emake || die "emake failed" 121 emake || die "emake failed"
122}
123
124x-modular_src_compile() {
125 x-modular_src_configure
126 x-modular_src_make
113} 127}
114 128
115x-modular_src_install() { 129x-modular_src_install() {
116 # Install everything to ${XDIR} 130 # Install everything to ${XDIR}
117 make \ 131 make \
119 install 133 install
120# Shouldn't be necessary in XDIR=/usr 134# Shouldn't be necessary in XDIR=/usr
121# einstall forces datadir, so we need to re-force it 135# einstall forces datadir, so we need to re-force it
122# datadir=${XDIR}/share \ 136# datadir=${XDIR}/share \
123# mandir=${XDIR}/share/man \ 137# mandir=${XDIR}/share/man \
138
139 # Don't install libtool archives for server modules
140 if [[ -e ${D}/usr/lib/xorg/modules ]]; then
141 find ${D}/usr/lib/xorg/modules -name '*.la' \
142 | xargs rm -f
143 fi
124} 144}
125 145
126x-modular_pkg_preinst() { 146x-modular_pkg_preinst() {
127 if [[ -n "${FONT}" ]]; then 147 if [[ -n "${FONT}" ]]; then
128 discover_font_dirs 148 discover_font_dirs

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.20