/[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.22 Revision 1.25
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/vdr-plugin.eclass,v 1.22 2006/06/17 14:51:32 zzam Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/vdr-plugin.eclass,v 1.25 2006/07/08 14:31:35 zzam Exp $
4# 4#
5# Author: 5# Author:
6# Matthias Schwarzott <zzam@gentoo.org> 6# Matthias Schwarzott <zzam@gentoo.org>
7 7
8# vdr-plugin.eclass 8# vdr-plugin.eclass
58 58
59# works in most cases 59# works in most cases
60S="${WORKDIR}/${VDRPLUGIN}-${PV}" 60S="${WORKDIR}/${VDRPLUGIN}-${PV}"
61 61
62# depend on headers for DVB-driver 62# depend on headers for DVB-driver
63RDEPEND="" 63RDEPEND=">=media-tv/gentoo-vdr-scripts-0.3.4-r1"
64DEPEND="media-tv/linuxtv-dvb-headers" 64DEPEND="media-tv/linuxtv-dvb-headers"
65 65
66 66
67# this code is from linux-mod.eclass 67# this code is from linux-mod.eclass
68update_vdrplugindb() { 68update_vdrplugindb() {
128 cd "${WORKDIR}" 128 cd "${WORKDIR}"
129 einfo "$(/bin/ls -1 ${WORKDIR})" 129 einfo "$(/bin/ls -1 ${WORKDIR})"
130 die "Could not change to plugin-source-directory!" 130 die "Could not change to plugin-source-directory!"
131 fi 131 fi
132 132
133 ebegin "Patching Makefile" 133 einfo "Patching Makefile"
134 [[ -e Makefile ]] || die "Makefile of plugin can not be found!" 134 [[ -e Makefile ]] || die "Makefile of plugin can not be found!"
135 cp Makefile Makefile.orig 135 cp Makefile Makefile.orig
136
136 sed -i.orig Makefile \ 137 sed -i Makefile \
138 -e '1i\#Makefile was patched by vdr-plugin.eclass'
139
140 ebegin " Setting Pathes"
141 sed -i Makefile \
137 -e "s:^VDRDIR.*$:VDRDIR = ${VDR_INCLUDE_DIR}:" \ 142 -e "s:^VDRDIR.*$:VDRDIR = ${VDR_INCLUDE_DIR}:" \
138 -e "s:^DVBDIR.*$:DVBDIR = ${DVB_INCLUDE_DIR}:" \ 143 -e "s:^DVBDIR.*$:DVBDIR = ${DVB_INCLUDE_DIR}:" \
139 -e "s:^LIBDIR.*$:LIBDIR = ${S}:" \ 144 -e "s:^LIBDIR.*$:LIBDIR = ${S}:" \
140 -e "s:^TMPDIR.*$:TMPDIR = ${T}:" \ 145 -e "s:^TMPDIR.*$:TMPDIR = ${T}:" \
141 -e 's:^CXXFLAGS:#CXXFLAGS:' \
142 -e 's:-I$(VDRDIR)/include:-I$(VDRDIR):' \ 146 -e 's:-I$(VDRDIR)/include:-I$(VDRDIR):' \
143 -e 's:-I$(DVBDIR)/include:-I$(DVBDIR):' \ 147 -e 's:-I$(DVBDIR)/include:-I$(DVBDIR):' \
144 -e 's:-I$(VDRDIR) -I$(DVBDIR):-I$(DVBDIR) -I$(VDRDIR):' \ 148 -e 's:-I$(VDRDIR) -I$(DVBDIR):-I$(DVBDIR) -I$(VDRDIR):' \
145 -e 's:$(VDRDIR)/\([a-z]*\.h\|Make.config\):$(VDRDIR)/vdr/\1:' \ 149 -e 's:$(VDRDIR)/\([a-z]*\.h\|Make.config\):$(VDRDIR)/vdr/\1:'
150 eend $?
151
152 ebegin " Converting to APIVERSION"
153 sed -i Makefile \
146 -e 's:^APIVERSION = :APIVERSION ?= :' \ 154 -e 's:^APIVERSION = :APIVERSION ?= :' \
147 -e 's:$(LIBDIR)/$@.$(VDRVERSION):$(LIBDIR)/$@.$(APIVERSION):' \ 155 -e 's:$(LIBDIR)/$@.$(VDRVERSION):$(LIBDIR)/$@.$(APIVERSION):' \
148 -e '1i\APIVERSION = '"${APIVERSION}" 156 -e '2i\APIVERSION = '"${APIVERSION}"
157 eend $?
158
159 ebegin " Correcting CXXFLAGS"
160 sed -i Makefile \
161 -e 's:^CXXFLAGS:#CXXFLAGS:'
149 eend $? 162 eend $?
150 ;; 163 ;;
151 esac 164 esac
152 165
153 shift 166 shift
216 229
217 fi 230 fi
218 231
219 insinto "${VDR_PLUGIN_DIR}" 232 insinto "${VDR_PLUGIN_DIR}"
220 doins libvdr-*.so.* 233 doins libvdr-*.so.*
234 local docfile
221 dodoc README* HISTORY CHANGELOG 235 for docfile in README* HISTORY CHANGELOG; do
222 236 [[ -f ${docfile} ]] && dodoc ${docfile}
237 done
223 238
224 # if VDR_CONFD_FILE is empty and ${FILESDIR}/confd exists take it 239 # if VDR_CONFD_FILE is empty and ${FILESDIR}/confd exists take it
225 [[ -z ${VDR_CONFD_FILE} ]] && [[ -e ${FILESDIR}/confd ]] && VDR_CONFD_FILE=${FILESDIR}/confd 240 [[ -z ${VDR_CONFD_FILE} ]] && [[ -e ${FILESDIR}/confd ]] && VDR_CONFD_FILE=${FILESDIR}/confd
226 241
227 if [[ -n ${VDR_CONFD_FILE} ]]; then 242 if [[ -n ${VDR_CONFD_FILE} ]]; then

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.25

  ViewVC Help
Powered by ViewVC 1.1.20