/[gentoo-x86]/eclass/vdr-plugin.eclass
Gentoo

Diff of /eclass/vdr-plugin.eclass

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

Revision 1.29 Revision 1.32
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/Attic/vdr-plugin.eclass,v 1.29 2006/08/29 10:33:19 zzam Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/vdr-plugin.eclass,v 1.32 2006/09/10 10:29:21 zzam Exp $
4# 4#
5# Author: 5# Author:
6# Matthias Schwarzott <zzam@gentoo.org> 6# Matthias Schwarzott <zzam@gentoo.org>
7# Joerg Bornkessel <hd_brummy@gentoo.org> 7# Joerg Bornkessel <hd_brummy@gentoo.org>
8 8
124 einfo "Building ${PF} against vdr-${VDRVERSION}" 124 einfo "Building ${PF} against vdr-${VDRVERSION}"
125 einfo "APIVERSION: ${APIVERSION}" 125 einfo "APIVERSION: ${APIVERSION}"
126} 126}
127 127
128vdr-plugin_src_unpack() { 128vdr-plugin_src_unpack() {
129 if [[ -z ${VDR_INCLUDE_DIR} ]]; then
130 eerror "Wrong use of vdr-plugin.eclass."
131 eerror "An ebuild for a vdr-plugin will not work without calling vdr-plugin_pkg_setup."
132 echo
133 eerror "Please report this at bugs.gentoo.org."
134 die "vdr-plugin_pkg_setup not called!"
135 fi
129 [ -z "$1" ] && vdr-plugin_src_unpack unpack add_local_patch patchmakefile 136 [ -z "$1" ] && vdr-plugin_src_unpack unpack add_local_patch patchmakefile
130 137
131 while [ "$1" ]; do 138 while [ "$1" ]; do
132 139
133 case "$1" in 140 case "$1" in
178 -e '/@.*strip/d' \ 185 -e '/@.*strip/d' \
179 -e '/strip \$(LIBDIR)\/\$@/d' \ 186 -e '/strip \$(LIBDIR)\/\$@/d' \
180 -e '/^STRIP =/d' \ 187 -e '/^STRIP =/d' \
181 -e '/@.*\$(STRIP)/d' 188 -e '/@.*\$(STRIP)/d'
182 eend $? 189 eend $?
190 PLUGIN_MAKEFILE_PATCHED=1
183 ;; 191 ;;
184 add_local_patch) 192 add_local_patch)
185 cd ${S} 193 cd ${S}
186 if test -d "${VDR_LOCAL_PATCHES_DIR}/${PN}"; then 194 if test -d "${VDR_LOCAL_PATCHES_DIR}/${PN}"; then
187 echo 195 echo
196 shift 204 shift
197 done 205 done
198} 206}
199 207
200vdr-plugin_copy_source_tree() { 208vdr-plugin_copy_source_tree() {
209 pushd . >/dev/null
201 cp -r ${S} ${T}/source-tree 210 cp -r ${S} ${T}/source-tree
202 cd ${T}/source-tree 211 cd ${T}/source-tree
203 mv Makefile.orig Makefile 212 mv Makefile.orig Makefile
204 sed -i Makefile \ 213 sed -i Makefile \
205 -e "s:^DVBDIR.*$:DVBDIR = ${DVB_INCLUDE_DIR}:" \ 214 -e "s:^DVBDIR.*$:DVBDIR = ${DVB_INCLUDE_DIR}:" \
206 -e 's:^CXXFLAGS:#CXXFLAGS:' \ 215 -e 's:^CXXFLAGS:#CXXFLAGS:' \
207 -e 's:-I$(DVBDIR)/include:-I$(DVBDIR):' \ 216 -e 's:-I$(DVBDIR)/include:-I$(DVBDIR):' \
208 -e 's:-I$(VDRDIR) -I$(DVBDIR):-I$(DVBDIR) -I$(VDRDIR):' 217 -e 's:-I$(VDRDIR) -I$(DVBDIR):-I$(DVBDIR) -I$(VDRDIR):'
218 popd >/dev/null
209} 219}
210 220
211vdr-plugin_install_source_tree() { 221vdr-plugin_install_source_tree() {
212 einfo "Installing sources" 222 einfo "Installing sources"
213 destdir=${VDRSOURCE_DIR}/vdr-${VDRVERSION}/PLUGINS/src/${VDRPLUGIN} 223 destdir=${VDRSOURCE_DIR}/vdr-${VDRVERSION}/PLUGINS/src/${VDRPLUGIN}
225 case "$1" in 235 case "$1" in
226 prepare) 236 prepare)
227 [[ -n "${VDRSOURCE_DIR}" ]] && vdr-plugin_copy_source_tree 237 [[ -n "${VDRSOURCE_DIR}" ]] && vdr-plugin_copy_source_tree
228 ;; 238 ;;
229 compile) 239 compile)
240 if [[ -z ${PLUGIN_MAKEFILE_PATCHED} ]]; then
241 eerror "Wrong use of vdr-plugin.eclass."
242 eerror "An ebuild for a vdr-plugin will not work without"
243 eerror "calling vdr-plugin_src_unpack to patch the Makefile."
244 echo
245 eerror "Please report this at bugs.gentoo.org."
246 die "vdr-plugin_src_unpack not called!"
247 fi
230 cd ${S} 248 cd ${S}
231 249
232 emake ${VDRPLUGIN_MAKE_TARGET:-all} || die "emake failed" 250 emake ${BUILD_PARAMS} ${VDRPLUGIN_MAKE_TARGET:-all} || die "emake failed"
233 ;; 251 ;;
234 esac 252 esac
235 253
236 shift 254 shift
237 done 255 done

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.32

  ViewVC Help
Powered by ViewVC 1.1.20