/[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.40 Revision 1.41
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.40 2007/01/05 17:24:19 hd_brummy Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/vdr-plugin.eclass,v 1.41 2007/01/06 14:47:04 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
84 if [[ ! -f ${VDRPLUGINDB_DIR}/vdrplugindb ]]; then 84 if [[ ! -f ${VDRPLUGINDB_DIR}/vdrplugindb ]]; then
85 [[ ! -d ${VDRPLUGINDB_DIR} ]] && mkdir -p ${VDRPLUGINDB_DIR} 85 [[ ! -d ${VDRPLUGINDB_DIR} ]] && mkdir -p ${VDRPLUGINDB_DIR}
86 touch ${VDRPLUGINDB_DIR}/vdrplugindb 86 touch ${VDRPLUGINDB_DIR}/vdrplugindb
87 fi 87 fi
88 if [[ -z $(grep ${CATEGORY}/${PN}-${PVR} ${VDRPLUGINDB_DIR}/vdrplugindb) ]]; then 88 if [[ -z $(grep ${CATEGORY}/${PN}-${PVR} ${VDRPLUGINDB_DIR}/vdrplugindb) ]]; then
89 elog "Adding plugin to vdrplugindb." 89 einfo "Adding plugin to vdrplugindb."
90 echo "a:1:${CATEGORY}/${PN}-${PVR}" >> ${VDRPLUGINDB_DIR}/vdrplugindb 90 echo "a:1:${CATEGORY}/${PN}-${PVR}" >> ${VDRPLUGINDB_DIR}/vdrplugindb
91 fi 91 fi
92} 92}
93 93
94remove_vdrplugindb() { 94remove_vdrplugindb() {
95 local VDRPLUGINDB_DIR=${ROOT}/var/lib/vdrplugin-rebuild/ 95 local VDRPLUGINDB_DIR=${ROOT}/var/lib/vdrplugin-rebuild/
96 96
97 if [[ -n $(grep ${CATEGORY}/${PN}-${PVR} ${VDRPLUGINDB_DIR}/vdrplugindb) ]]; then 97 if [[ -n $(grep ${CATEGORY}/${PN}-${PVR} ${VDRPLUGINDB_DIR}/vdrplugindb) ]]; then
98 elog "Removing ${CATEGORY}/${PN}-${PVR} from vdrplugindb." 98 einfo "Removing ${CATEGORY}/${PN}-${PVR} from vdrplugindb."
99 sed -ie "/.*${CATEGORY}\/${P}.*/d" ${VDRPLUGINDB_DIR}/vdrplugindb 99 sed -ie "/.*${CATEGORY}\/${P}.*/d" ${VDRPLUGINDB_DIR}/vdrplugindb
100 fi 100 fi
101} 101}
102 102
103# New method of storing plugindb 103# New method of storing plugindb
133 #elog file owned by eclass - don't touch it 133 #elog file owned by eclass - don't touch it
134 return 134 return
135 fi 135 fi
136 136
137 elog "Removing orphaned plugindb-file." 137 elog "Removing orphaned plugindb-file."
138 elog "#rm ${DB_FILE}" 138 elog "\t#rm ${DB_FILE}"
139 rm ${DB_FILE} 139 rm ${DB_FILE}
140} 140}
141 141
142vdr-plugin_pkg_setup() { 142vdr-plugin_pkg_setup() {
143 # -fPIC is needed for shared objects on some platforms (amd64 and others) 143 # -fPIC is needed for shared objects on some platforms (amd64 and others)
158 158
159 VDRVERSION=$(awk -F'"' '/define VDRVERSION/ {print $2}' ${VDR_INCLUDE_DIR}/config.h) 159 VDRVERSION=$(awk -F'"' '/define VDRVERSION/ {print $2}' ${VDR_INCLUDE_DIR}/config.h)
160 APIVERSION=$(awk -F'"' '/define APIVERSION/ {print $2}' ${VDR_INCLUDE_DIR}/config.h) 160 APIVERSION=$(awk -F'"' '/define APIVERSION/ {print $2}' ${VDR_INCLUDE_DIR}/config.h)
161 [[ -z ${APIVERSION} ]] && APIVERSION="${VDRVERSION}" 161 [[ -z ${APIVERSION} ]] && APIVERSION="${VDRVERSION}"
162 162
163 elog "Building ${PF} against vdr-${VDRVERSION}" 163 einfo "Building ${PF} against vdr-${VDRVERSION}"
164 elog "APIVERSION: ${APIVERSION}" 164 einfo "APIVERSION: ${APIVERSION}"
165} 165}
166 166
167vdr-plugin_src_unpack() { 167vdr-plugin_src_unpack() {
168 if [[ -z ${VDR_INCLUDE_DIR} ]]; then 168 if [[ -z ${VDR_INCLUDE_DIR} ]]; then
169 eerror "Wrong use of vdr-plugin.eclass." 169 eerror "Wrong use of vdr-plugin.eclass."
186 patchmakefile) 186 patchmakefile)
187 if ! cd ${S}; then 187 if ! cd ${S}; then
188 ewarn "There seems to be no plugin-directory with the name ${S##*/}" 188 ewarn "There seems to be no plugin-directory with the name ${S##*/}"
189 ewarn "Perhaps you find one among these:" 189 ewarn "Perhaps you find one among these:"
190 cd "${WORKDIR}" 190 cd "${WORKDIR}"
191 elog "$(/bin/ls -1 ${WORKDIR})" 191 ewarn "$(/bin/ls -1 ${WORKDIR})"
192 die "Could not change to plugin-source-directory!" 192 die "Could not change to plugin-source-directory!"
193 fi 193 fi
194 194
195 elog "Patching Makefile" 195 einfo "Patching Makefile"
196 [[ -e Makefile ]] || die "Makefile of plugin can not be found!" 196 [[ -e Makefile ]] || die "Makefile of plugin can not be found!"
197 cp Makefile Makefile.orig 197 cp Makefile Makefile.orig
198 198
199 sed -i Makefile \ 199 sed -i Makefile \
200 -e '1i\#Makefile was patched by vdr-plugin.eclass' 200 -e '1i\#Makefile was patched by vdr-plugin.eclass'
237 ;; 237 ;;
238 add_local_patch) 238 add_local_patch)
239 cd ${S} 239 cd ${S}
240 if test -d "${VDR_LOCAL_PATCHES_DIR}/${PN}"; then 240 if test -d "${VDR_LOCAL_PATCHES_DIR}/${PN}"; then
241 echo 241 echo
242 elog "Applying local patches" 242 einfo "Applying local patches"
243 for LOCALPATCH in ${VDR_LOCAL_PATCHES_DIR}/${PN}/${PV}/*.{diff,patch}; do 243 for LOCALPATCH in ${VDR_LOCAL_PATCHES_DIR}/${PN}/${PV}/*.{diff,patch}; do
244 test -f "${LOCALPATCH}" && epatch "${LOCALPATCH}" 244 test -f "${LOCALPATCH}" && epatch "${LOCALPATCH}"
245 done 245 done
246 fi 246 fi
247 ;; 247 ;;
263 -e 's:-I$(VDRDIR) -I$(DVBDIR):-I$(DVBDIR) -I$(VDRDIR):' 263 -e 's:-I$(VDRDIR) -I$(DVBDIR):-I$(DVBDIR) -I$(VDRDIR):'
264 popd >/dev/null 264 popd >/dev/null
265} 265}
266 266
267vdr-plugin_install_source_tree() { 267vdr-plugin_install_source_tree() {
268 elog "Installing sources" 268 einfo "Installing sources"
269 destdir=${VDRSOURCE_DIR}/vdr-${VDRVERSION}/PLUGINS/src/${VDRPLUGIN} 269 destdir=${VDRSOURCE_DIR}/vdr-${VDRVERSION}/PLUGINS/src/${VDRPLUGIN}
270 insinto ${destdir}-${PV} 270 insinto ${destdir}-${PV}
271 doins -r ${T}/source-tree/* 271 doins -r ${T}/source-tree/*
272 272
273 dosym ${VDRPLUGIN}-${PV} ${destdir} 273 dosym ${VDRPLUGIN}-${PV} ${destdir}
503 fi 503 fi
504} 504}
505 505
506fix_vdr_libsi_include() 506fix_vdr_libsi_include()
507{ 507{
508 elog "Fixing include of libsi-headers" 508 einfo "Fixing include of libsi-headers"
509 local f 509 local f
510 for f; do 510 for f; do
511 sed -i "${f}" \ 511 sed -i "${f}" \
512 -e '/#include/s:"\(.*libsi.*\)":<\1>:' \ 512 -e '/#include/s:"\(.*libsi.*\)":<\1>:' \
513 -e '/#include/s:<.*\(libsi/.*\)>:<vdr/\1>:' 513 -e '/#include/s:<.*\(libsi/.*\)>:<vdr/\1>:'

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

  ViewVC Help
Powered by ViewVC 1.1.20