/[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.26
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.22 2006/06/17 14:51:32 zzam Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/vdr-plugin.eclass,v 1.26 2006/07/08 15:28:15 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:'
162 eend $?
163
164 ebegin " Disabling file stripping"
165 sed -i Makefile \
166 -e '/@.*strip/d' \
167 -e '/strip \$(LIBDIR)\/\$@/d' \
168 -e '/^STRIP =/d' \
169 -e '/@.*\$(STRIP)/d'
149 eend $? 170 eend $?
150 ;; 171 ;;
151 esac 172 esac
152 173
153 shift 174 shift
216 237
217 fi 238 fi
218 239
219 insinto "${VDR_PLUGIN_DIR}" 240 insinto "${VDR_PLUGIN_DIR}"
220 doins libvdr-*.so.* 241 doins libvdr-*.so.*
242 local docfile
221 dodoc README* HISTORY CHANGELOG 243 for docfile in README* HISTORY CHANGELOG; do
222 244 [[ -f ${docfile} ]] && dodoc ${docfile}
245 done
223 246
224 # if VDR_CONFD_FILE is empty and ${FILESDIR}/confd exists take it 247 # 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 248 [[ -z ${VDR_CONFD_FILE} ]] && [[ -e ${FILESDIR}/confd ]] && VDR_CONFD_FILE=${FILESDIR}/confd
226 249
227 if [[ -n ${VDR_CONFD_FILE} ]]; then 250 if [[ -n ${VDR_CONFD_FILE} ]]; then

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

  ViewVC Help
Powered by ViewVC 1.1.20