/[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.4 Revision 1.24
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.4 2005/08/14 23:45:52 spyderous Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/x-modular.eclass,v 1.24 2005/12/06 02:22: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.
10# If the ebuild installs fonts, set FONT="yes" at the top and set FONT_DIRS to 10# If the ebuild installs fonts, set FONT="yes" at the top and set FONT_DIRS to
11# the subdirectories within /usr/share/fonts to which it installs fonts. 11# the subdirectories within /usr/share/fonts to which it installs fonts.
12 12
13EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_preinst pkg_postinst 13EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_preinst pkg_postinst
14 14
15inherit eutils 15inherit eutils libtool
16 16
17# Directory prefix to use for everything 17# Directory prefix to use for everything
18# Change to /usr/X11R6 once it's standard
19XDIR="/usr" 18XDIR="/usr"
20 19
21IUSE="" 20IUSE=""
22HOMEPAGE="http://xorg.freedesktop.org/" 21HOMEPAGE="http://xorg.freedesktop.org/"
23SRC_URI="http://xorg.freedesktop.org/X11R7.0-RC0/everything/${P}.tar.bz2" 22SRC_URI="http://xorg.freedesktop.org/releases/X11R7.0-RC3/everything/${P}.tar.bz2
23 http://xorg.freedesktop.org/releases/X11R7.0-RC2/everything/${P}.tar.bz2
24 http://xorg.freedesktop.org/releases/X11R7.0-RC1/everything/${P}.tar.bz2
25 http://xorg.freedesktop.org/releases/X11R7.0-RC0/everything/${P}.tar.bz2"
24LICENSE="X11" 26LICENSE="X11"
25SLOT="0" 27SLOT="0"
26 28
27# Set up shared dependencies 29# Set up shared dependencies
28if [ -n "${SNAPSHOT}" ]; then 30if [ -n "${SNAPSHOT}" ]; then
33 >=sys-devel/libtool-1.5 35 >=sys-devel/libtool-1.5
34 >=sys-devel/m4-1.4" 36 >=sys-devel/m4-1.4"
35fi 37fi
36 38
37# If we're a font package, but not the font.alias one 39# If we're a font package, but not the font.alias one
38if [[ "${PN/#font}" != "${PN}" ]] && [[ "${PN}" != "font-alias" ]]; then 40if [[ "${PN/#font-}" != "${PN}" ]] && [[ "${PN}" != "font-alias" ]]; then
39 # Activate font code in the rest of the eclass 41 # Activate font code in the rest of the eclass
40 FONT="yes" 42 FONT="yes"
41 43
42 RDEPEND="${RDEPEND} 44 RDEPEND="${RDEPEND}
43 media-fonts/encodings" 45 media-fonts/encodings"
44 PDEPEND="${PDEPEND} 46 PDEPEND="${PDEPEND}
45 media-fonts/font-alias" 47 media-fonts/font-alias"
46fi 48fi
47 49
50# If we're a driver package
51if [[ "${PN/#xf86-video}" != "${PN}" ]] || [[ "${PN/#xf86-input}" != "${PN}" ]]; then
52 # Don't build static driver modules
53 DRIVER_OPTIONS="--disable-static"
54fi
55
48DEPEND="${DEPEND} 56DEPEND="${DEPEND}
49 dev-util/pkgconfig 57 >=dev-util/pkgconfig-0.18
50 x11-misc/util-macros" 58 >=x11-misc/util-macros-0.99.2"
51 59
60# >=sys-apps/man-1.6b-r2 required to look in [0-8]x/ directories
52RDEPEND="${RDEPEND}" 61RDEPEND="${RDEPEND}
53# Shouldn't be necessary once we're in a standard location 62 !<=x11-base/xorg-x11-6.9
63 >=sys-apps/man-1.6b-r2"
64# Provides virtual/x11 for temporary use until packages are ported
54# x11-base/x11-env" 65# x11-base/x11-env"
55# FIXME: Uncomment once it's in portage
56# !x11-base/xorg-x11"
57 66
58x-modular_unpack_source() { 67x-modular_unpack_source() {
59 unpack ${A} 68 unpack ${A}
60 cd ${S} 69 cd ${S}
70
71 # Joshua Baergen - October 23, 2005
72 # Fix shared lib issues on MIPS, FBSD, etc etc
73 elibtoolize
61} 74}
62 75
63x-modular_patch_source() { 76x-modular_patch_source() {
64 # Use standardized names and locations with bulk patching 77 # Use standardized names and locations with bulk patching
65 # Patch directory is ${WORKDIR}/patch 78 # Patch directory is ${WORKDIR}/patch
89 then 102 then
90 # If possible, generate configure if it doesn't exist 103 # If possible, generate configure if it doesn't exist
91 if [ -f "${S}/configure.ac" ] 104 if [ -f "${S}/configure.ac" ]
92 then 105 then
93 einfo "Running autoreconf..." 106 einfo "Running autoreconf..."
94 autoreconf -v --install 107 autoreconf -v --force --install
95 fi 108 fi
96 fi 109 fi
97 110
98} 111}
99 112
101 x-modular_unpack_source 114 x-modular_unpack_source
102 x-modular_patch_source 115 x-modular_patch_source
103 x-modular_reconf_source 116 x-modular_reconf_source
104} 117}
105 118
106x-modular_src_compile() { 119x-modular_src_configure() {
107 # If prefix isn't set here, .pc files cause problems 120 # If prefix isn't set here, .pc files cause problems
108 if [ -x ./configure ]; then 121 if [ -x ./configure ]; then
109 econf --prefix=${XDIR} \ 122 econf --prefix=${XDIR} \
110 --datadir=${XDIR}/share \ 123 --datadir=${XDIR}/share \
124 ${DRIVER_OPTIONS} \
111 ${CONFIGURE_OPTIONS} 125 ${CONFIGURE_OPTIONS}
112 fi 126 fi
127}
128
129x-modular_src_make() {
113 emake || die "emake failed" 130 emake || die "emake failed"
131}
132
133x-modular_src_compile() {
134 x-modular_src_configure
135 x-modular_src_make
114} 136}
115 137
116x-modular_src_install() { 138x-modular_src_install() {
117 # Install everything to ${XDIR} 139 # Install everything to ${XDIR}
118 make \ 140 make \
120 install 142 install
121# Shouldn't be necessary in XDIR=/usr 143# Shouldn't be necessary in XDIR=/usr
122# einstall forces datadir, so we need to re-force it 144# einstall forces datadir, so we need to re-force it
123# datadir=${XDIR}/share \ 145# datadir=${XDIR}/share \
124# mandir=${XDIR}/share/man \ 146# mandir=${XDIR}/share/man \
147
148 # Don't install libtool archives for server modules
149 if [[ -e ${D}/usr/lib/xorg/modules ]]; then
150 find ${D}/usr/lib/xorg/modules -name '*.la' \
151 | xargs rm -f
152 fi
125} 153}
126 154
127x-modular_pkg_preinst() { 155x-modular_pkg_preinst() {
128 if [[ -n "${FONT}" ]]; then 156 if [[ -n "${FONT}" ]]; then
129 discover_font_dirs 157 discover_font_dirs

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.20