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

Diff of /eclass/vdr-plugin-2.eclass

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

Revision 1.14 Revision 1.15
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 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-2.eclass,v 1.14 2012/12/29 17:47:53 hd_brummy Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/vdr-plugin-2.eclass,v 1.15 2012/12/31 09:27:00 hd_brummy Exp $
4 4
5# @ECLASS: vdr-plugin-2.eclass 5# @ECLASS: vdr-plugin-2.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# vdr@gentoo.org 7# vdr@gentoo.org
8# @BLURB: common vdr plugin ebuild functions 8# @BLURB: common vdr plugin ebuild functions
224} 224}
225 225
226# Begin new vdr-plugin-2.eclass content 226# Begin new vdr-plugin-2.eclass content
227dev_check() { 227dev_check() {
228 # A lot useful debug infos 228 # A lot useful debug infos
229 # set VDR_MAINTAINER_MODE="1" in /etc/make.conf 229 # set VDR_MAINTAINER_MODE="1" in make.conf
230 if [[ -n ${VDR_MAINTAINER_MODE} ]]; then 230 if [[ -n ${VDR_MAINTAINER_MODE} ]]; then
231 eerror "\t Maintainer Info: $@" 231 eerror "\t Maintainer Info: $@"
232 fi 232 fi
233} 233}
234 234
334 334
335 dev_check "removed i18n.h for ${@}" 335 dev_check "removed i18n.h for ${@}"
336} 336}
337# end new vdr-plugin-2.eclass content 337# end new vdr-plugin-2.eclass content
338 338
339# we don't support included plugins from vdr source for install in this way !!! 339# ToDo: we don't support included plugins from vdr source for install in this way !!!
340# obsolet, remove it, later... 340# obsolet, remove it, later...
341#vdr-plugin-2_copy_source_tree() { 341#vdr-plugin-2_copy_source_tree() {
342# pushd . >/dev/null 342# pushd . >/dev/null
343# cp -r "${S}" "${T}"/source-tree 343# cp -r "${S}" "${T}"/source-tree
344# cd "${T}"/source-tree 344# cd "${T}"/source-tree
383} 383}
384 384
385## exported functions 385## exported functions
386 386
387vdr-plugin-2_pkg_setup() { 387vdr-plugin-2_pkg_setup() {
388 # missing ${chost}- tag
389 tc-export CC CXX
390
388 # -fPIC is needed for shared objects on some platforms (amd64 and others) 391 # -fPIC is needed for shared objects on some platforms (amd64 and others)
389 append-flags -fPIC 392 append-flags -fPIC
390 393
391 # Plugins need to be compiled with position independent code, otherwise linking 394 # Plugins need to be compiled with position independent code, otherwise linking
392 # VDR against it will fail 395 # VDR against it will fail
393 if has_version ">=media-video/vdr-1.7.13"; then 396 if has_version ">=media-video/vdr-1.7.13"; then
394 append-lfs-flags 397 append-cxxlags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
395 fi 398 fi
396
397 # missing ${chost}- tag
398 tc-export CC CXX
399 399
400 # Where should the plugins live in the filesystem 400 # Where should the plugins live in the filesystem
401 if has_version ">=media-video/vdr-1.7.34"; then 401 if has_version ">=media-video/vdr-1.7.34"; then
402 VDR_PLUGIN_DIR=$(pkg-config --variable=libdir vdr) 402 VDR_PLUGIN_DIR=$(pkg-config --variable=libdir vdr)
403 else 403 else
443 APIVERSION=$(awk -F'"' '/define APIVERSION/ {print $2}' "${VDR_INCLUDE_DIR}"/config.h) 443 APIVERSION=$(awk -F'"' '/define APIVERSION/ {print $2}' "${VDR_INCLUDE_DIR}"/config.h)
444 [[ -z ${APIVERSION} ]] && APIVERSION="${VDRVERSION}" 444 [[ -z ${APIVERSION} ]] && APIVERSION="${VDRVERSION}"
445 fi 445 fi
446 446
447 einfo "Compiling against" 447 einfo "Compiling against"
448 einfo "\tvdr-${VDRVERSION} [API version ${APIVERSION}]" 448 einfo "\tvdr-${VDRVERSION}} [API version ${APIVERSION}]"
449 449
450 if [[ -n "${VDR_LOCAL_PATCHES_DIR}" ]]; then 450 if [[ -n "${VDR_LOCAL_PATCHES_DIR}" ]]; then
451 eerror "Using VDR_LOCAL_PATCHES_DIR is deprecated!" 451 eerror "Using VDR_LOCAL_PATCHES_DIR is deprecated!"
452 eerror "Please move all your patches into" 452 eerror "Please move all your patches into"
453 eerror "${EROOT}/etc/portage/patches/${CATEGORY}/${P}" 453 eerror "${EROOT}/etc/portage/patches/${CATEGORY}/${P}"
521 [ -z "$1" ] && vdr-plugin-2_src_compile copy_source compile 521 [ -z "$1" ] && vdr-plugin-2_src_compile copy_source compile
522 522
523 while [ "$1" ]; do 523 while [ "$1" ]; do
524 case "$1" in 524 case "$1" in
525 copy_source) 525 copy_source)
526# [[ -n "${VDRSOURCE_DIR}" ]] && vdr-plugin-2_copy_source_tree 526 [[ -n "${VDRSOURCE_DIR}" ]] && vdr-plugin-2_copy_source_tree
527 eerror "obsoleted handling, vdr-plugin-2_copy_source_tree" 527 dev_check "ToDo: obsoleted handling, vdr-plugin-2_copy_source_tree"
528 ;; 528 ;;
529 compile) 529 compile)
530 if [[ ! -f ${WORKDIR}/.vdr-plugin_makefile_patched ]]; then 530 if [[ ! -f ${WORKDIR}/.vdr-plugin_makefile_patched ]]; then
531 eerror "Wrong use of vdr-plugin-2.eclass." 531 eerror "Wrong use of vdr-plugin-2.eclass."
532 eerror "An ebuild for a vdr-plugin will not work without" 532 eerror "An ebuild for a vdr-plugin will not work without"
535 eerror "Please report this at bugs.gentoo.org." 535 eerror "Please report this at bugs.gentoo.org."
536 die "vdr-plugin-2_src_compile not called!" 536 die "vdr-plugin-2_src_compile not called!"
537 fi 537 fi
538 cd "${S}" 538 cd "${S}"
539 539
540 540 local SOFILE_STRING=$(grep SOFILE Makefile)
541 if has_version ">=media-video/vdr-1.7.34"; then 541 if [[ -n ${SOFILE_STRING} ]]; then
542 dev_check "compiling with new Makefile handling"
542 BUILD_TARGETS=${BUILD_TARGETS:-${VDRPLUGIN_MAKE_TARGET:-install }} 543 BUILD_TARGETS=${BUILD_TARGETS:-${VDRPLUGIN_MAKE_TARGET:-install }}
543 emake ${BUILD_PARAMS} \ 544 emake ${BUILD_PARAMS} \
544 ${BUILD_TARGETS} \ 545 ${BUILD_TARGETS} \
545 LOCDIR="${TMP_LOCALE_DIR}" \ 546 LOCDIR="${TMP_LOCALE_DIR}" \
546 LIBDIR="${S}" \ 547 LIBDIR="${S}" \
547 TMPDIR="${T}" \ 548 TMPDIR="${T}" \
548 || die "emake failed" 549 || die "emake failed"
549 else 550 else
551 dev_check "compiling with old Makefile handling"
550 BUILD_TARGETS=${BUILD_TARGETS:-${VDRPLUGIN_MAKE_TARGET:-all }} 552 BUILD_TARGETS=${BUILD_TARGETS:-${VDRPLUGIN_MAKE_TARGET:-all }}
551 emake ${BUILD_PARAMS} \ 553 emake ${BUILD_PARAMS} \
552 ${BUILD_TARGETS} \ 554 ${BUILD_TARGETS} \
553 LOCALEDIR="${TMP_LOCALE_DIR}" \ 555 LOCALEDIR="${TMP_LOCALE_DIR}" \
554 LIBDIR="${S}" \ 556 LIBDIR="${S}" \
569 echo 571 echo
570 eerror "Please report this at bugs.gentoo.org." 572 eerror "Please report this at bugs.gentoo.org."
571 die "vdr-plugin-2_src_install not called!" 573 die "vdr-plugin-2_src_install not called!"
572 fi 574 fi
573 575
574# obsolet, remove it, later... 576# ToDo: obsolet, remove it, later...
575# [[ -n "${VDRSOURCE_DIR}" ]] && vdr-plugin-2_install_source_tree 577# [[ -n "${VDRSOURCE_DIR}" ]] && vdr-plugin-2_install_source_tree
576 cd "${WORKDIR}" 578 cd "${WORKDIR}"
577 579
578 if [[ -n ${VDR_MAINTAINER_MODE} ]]; then 580 if [[ -n ${VDR_MAINTAINER_MODE} ]]; then
579 local mname="${P}-Makefile" 581 local mname="${P}-Makefile"

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.20