| 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.eclass,v 1.83 2012/03/09 23:14:46 hd_brummy Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/vdr-plugin.eclass,v 1.89 2012/09/19 17:54:46 hd_brummy Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: vdr-plugin.eclass |
5 | # @ECLASS: vdr-plugin.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 |
| … | |
… | |
| 292 | ewarn "Please remove unneeded NO_GETTEXT_HACK from ebuild." |
292 | ewarn "Please remove unneeded NO_GETTEXT_HACK from ebuild." |
| 293 | fi |
293 | fi |
| 294 | else |
294 | else |
| 295 | vdr_i18n_convert_to_gettext |
295 | vdr_i18n_convert_to_gettext |
| 296 | if [[ $? != 0 ]]; then |
296 | if [[ $? != 0 ]]; then |
| 297 | eerror "" |
|
|
| 298 | eerror "Plugin will have only english OSD texts" |
297 | einfo "Plugin has no OSD texts or will have only english OSD texts" |
| 299 | eerror "it needs manual fixing." |
|
|
| 300 | fi |
298 | fi |
| 301 | fi |
299 | fi |
| 302 | else |
300 | else |
| 303 | #einfo "VDR has no gettext support" |
301 | #einfo "VDR has no gettext support" |
| 304 | if plugin_has_gettext; then |
302 | if plugin_has_gettext; then |
| … | |
… | |
| 358 | append-flags -fPIC |
356 | append-flags -fPIC |
| 359 | |
357 | |
| 360 | # Plugins need to be compiled with position independent code, otherwise linking |
358 | # Plugins need to be compiled with position independent code, otherwise linking |
| 361 | # VDR against it will fail |
359 | # VDR against it will fail |
| 362 | if has_version ">=media-video/vdr-1.7.13"; then |
360 | if has_version ">=media-video/vdr-1.7.13"; then |
| 363 | append-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE |
361 | append-lfs-flags |
| 364 | fi |
362 | fi |
| 365 | |
363 | |
| 366 | # Where should the plugins live in the filesystem |
364 | # Where should the plugins live in the filesystem |
| 367 | VDR_PLUGIN_DIR="/usr/$(get_libdir)/vdr/plugins" |
365 | VDR_PLUGIN_DIR="/usr/$(get_libdir)/vdr/plugins" |
| 368 | VDR_CHECKSUM_DIR="${VDR_PLUGIN_DIR%/plugins}/checksums" |
366 | VDR_CHECKSUM_DIR="${VDR_PLUGIN_DIR%/plugins}/checksums" |
| … | |
… | |
| 374 | # Pathes to includes |
372 | # Pathes to includes |
| 375 | VDR_INCLUDE_DIR="/usr/include/vdr" |
373 | VDR_INCLUDE_DIR="/usr/include/vdr" |
| 376 | DVB_INCLUDE_DIR="/usr/include" |
374 | DVB_INCLUDE_DIR="/usr/include" |
| 377 | |
375 | |
| 378 | TMP_LOCALE_DIR="${WORKDIR}/tmp-locale" |
376 | TMP_LOCALE_DIR="${WORKDIR}/tmp-locale" |
| 379 | if has_version ">=media-video/vdr-1.6.0_p2-r7"; then |
|
|
| 380 | LOCDIR="/usr/share/locale" |
377 | LOCDIR="/usr/share/locale" |
| 381 | else |
|
|
| 382 | LOCDIR="/usr/share/vdr/locale" |
|
|
| 383 | fi |
|
|
| 384 | |
378 | |
| 385 | if ! has_vdr; then |
379 | if ! has_vdr; then |
| 386 | # set to invalid values to detect abuses |
380 | # set to invalid values to detect abuses |
| 387 | VDRVERSION="eclass_no_vdr_installed" |
381 | VDRVERSION="eclass_no_vdr_installed" |
| 388 | APIVERSION="eclass_no_vdr_installed" |
382 | APIVERSION="eclass_no_vdr_installed" |
| … | |
… | |
| 432 | patchmakefile) |
426 | patchmakefile) |
| 433 | cd "${S}" || die "Could not change to plugin-source-directory!" |
427 | cd "${S}" || die "Could not change to plugin-source-directory!" |
| 434 | vdr_patchmakefile |
428 | vdr_patchmakefile |
| 435 | ;; |
429 | ;; |
| 436 | i18n) |
430 | i18n) |
|
|
431 | # i18n-to-gettext tool removed starting with version 1.7.27 |
|
|
432 | if has_version "<media-video/vdr-1.7.27"; then |
| 437 | cd "${S}" || die "Could not change to plugin-source-directory!" |
433 | cd "${S}" || die "Could not change to plugin-source-directory!" |
| 438 | vdr_i18n |
434 | vdr_i18n |
|
|
435 | fi |
| 439 | ;; |
436 | ;; |
| 440 | esac |
437 | esac |
| 441 | |
438 | |
| 442 | shift |
439 | shift |
| 443 | done |
440 | done |