/[gentoo-x86]/eclass/xorg-2.eclass
Gentoo

Diff of /eclass/xorg-2.eclass

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

Revision 1.11 Revision 1.18
1# Copyright 1999-2010 Gentoo Foundation 1# Copyright 1999-2010 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/xorg-2.eclass,v 1.11 2010/08/22 08:25:26 scarabeus Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/xorg-2.eclass,v 1.18 2010/11/01 12:37:58 scarabeus Exp $
4# 4#
5# @ECLASS: xorg-2.eclass 5# @ECLASS: xorg-2.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# x11@gentoo.org 7# x11@gentoo.org
8# @BLURB: Reduces code duplication in the modularized X11 ebuilds. 8# @BLURB: Reduces code duplication in the modularized X11 ebuilds.
42 ${FONT_ECLASS} ${GIT_ECLASS} 42 ${FONT_ECLASS} ${GIT_ECLASS}
43 43
44EXPORTED_FUNCTIONS="src_unpack src_compile src_install pkg_postinst pkg_postrm" 44EXPORTED_FUNCTIONS="src_unpack src_compile src_install pkg_postinst pkg_postrm"
45case "${EAPI:-0}" in 45case "${EAPI:-0}" in
46 3) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure" ;; 46 3) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure" ;;
47 *) DEPEND="EAPI-UNSUPPORTED" ;; 47 *) die "EAPI-UNSUPPORTED" ;;
48esac 48esac
49 49
50# exports must be ALWAYS after inherit 50# exports must be ALWAYS after inherit
51EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS} 51EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
52 52
98 DEPEND+=" 98 DEPEND+="
99 >=sys-devel/libtool-2.2.6a 99 >=sys-devel/libtool-2.2.6a
100 sys-devel/m4" 100 sys-devel/m4"
101 # This MUST BE STABLE 101 # This MUST BE STABLE
102 if [[ ${PN} != util-macros ]] ; then 102 if [[ ${PN} != util-macros ]] ; then
103 DEPEND+=" >=x11-misc/util-macros-1.8.0" 103 DEPEND+=" >=x11-misc/util-macros-1.11.0"
104 # Required even by xorg-server 104 # Required even by xorg-server
105 [[ ${PN} == "font-util" ]] || DEPEND+=" >=media-fonts/font-util-1.1.1-r1" 105 [[ ${PN} == "font-util" ]] || DEPEND+=" >=media-fonts/font-util-1.1.1-r1"
106 fi 106 fi
107 WANT_AUTOCONF="latest" 107 WANT_AUTOCONF="latest"
108 WANT_AUTOMAKE="latest" 108 WANT_AUTOMAKE="latest"
111if [[ ${FONT} == yes ]]; then 111if [[ ${FONT} == yes ]]; then
112 RDEPEND+=" media-fonts/encodings 112 RDEPEND+=" media-fonts/encodings
113 x11-apps/mkfontscale 113 x11-apps/mkfontscale
114 x11-apps/mkfontdir" 114 x11-apps/mkfontdir"
115 PDEPEND+=" media-fonts/font-alias" 115 PDEPEND+=" media-fonts/font-alias"
116 DEPEND+=" >=media-fonts/font-util-1.1.1-r1"
116 117
117 # @ECLASS-VARIABLE: FONT_DIR 118 # @ECLASS-VARIABLE: FONT_DIR
118 # @DESCRIPTION: 119 # @DESCRIPTION:
119 # If you're creating a font package and the suffix of PN is not equal to 120 # If you're creating a font package and the suffix of PN is not equal to
120 # the subdirectory of /usr/share/fonts/ it should install into, set 121 # the subdirectory of /usr/share/fonts/ it should install into, set
146 147
147# Add static-libs useflag where usefull. 148# Add static-libs useflag where usefull.
148if [[ ${XORG_STATIC} == yes \ 149if [[ ${XORG_STATIC} == yes \
149 && ${FONT} != yes \ 150 && ${FONT} != yes \
150 && ${CATEGORY} != app-doc \ 151 && ${CATEGORY} != app-doc \
152 && ${CATEGORY} != x11-apps \
151 && ${CATEGORY} != x11-proto \ 153 && ${CATEGORY} != x11-proto \
152 && ${CATEGORY} != x11-drivers \ 154 && ${CATEGORY} != x11-drivers \
153 && ${CATEGORY} != media-fonts \ 155 && ${CATEGORY} != media-fonts \
154 && ${PN} != util-macros \ 156 && ${PN} != util-macros \
155 && ${PN} != xbitmaps \ 157 && ${PN} != xbitmaps \
254xorg-2_flags_setup() { 256xorg-2_flags_setup() {
255 # Win32 require special define 257 # Win32 require special define
256 [[ ${CHOST} == *-winnt* ]] && append-cppflags -DWIN32 -D__STDC__ 258 [[ ${CHOST} == *-winnt* ]] && append-cppflags -DWIN32 -D__STDC__
257 # hardened ldflags 259 # hardened ldflags
258 [[ ${PN} = xorg-server || -n ${DRIVER} ]] && append-ldflags -Wl,-z,lazy 260 [[ ${PN} = xorg-server || -n ${DRIVER} ]] && append-ldflags -Wl,-z,lazy
261
262 # Quite few libraries fail on runtime without these:
263 if has static-libs ${IUSE//+}; then
264 filter-flags -Wl,-Bdirect
265 filter-ldflags -Bdirect
266 filter-ldflags -Wl,-Bdirect
267 fi
259} 268}
260 269
261# @FUNCTION: xorg-2_src_configure 270# @FUNCTION: xorg-2_src_configure
262# @DESCRIPTION: 271# @DESCRIPTION:
263# Perform any necessary pre-configuration steps, then run configure 272# Perform any necessary pre-configuration steps, then run configure
308 install || die "emake install failed" 317 install || die "emake install failed"
309 fi 318 fi
310 319
311 if [[ -n ${GIT_ECLASS} ]]; then 320 if [[ -n ${GIT_ECLASS} ]]; then
312 pushd "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" > /dev/null 321 pushd "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" > /dev/null
313 git log ${GIT_TREE} > "${S}"/ChangeLog 322 git log ${EGIT_COMMIT} > "${S}"/ChangeLog
314 popd > /dev/null 323 popd > /dev/null
315 fi 324 fi
316 325
317 if [[ -e "${S}"/ChangeLog ]]; then 326 if [[ -e "${S}"/ChangeLog ]]; then
318 dodoc "${S}"/ChangeLog 327 dodoc "${S}"/ChangeLog

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.20