| 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.53 2008/02/13 19:44:44 zzam Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/vdr-plugin.eclass,v 1.54 2008/03/22 18:04:51 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 | |
| … | |
… | |
| 232 | -e 's:$(LIBDIR)/$@.$(VDRVERSION):$(LIBDIR)/$@.$(APIVERSION):' \ |
232 | -e 's:$(LIBDIR)/$@.$(VDRVERSION):$(LIBDIR)/$@.$(APIVERSION):' \ |
| 233 | -e '2i\APIVERSION = '"${APIVERSION}" |
233 | -e '2i\APIVERSION = '"${APIVERSION}" |
| 234 | eend $? |
234 | eend $? |
| 235 | |
235 | |
| 236 | ebegin " Correcting Compile-Flags" |
236 | ebegin " Correcting Compile-Flags" |
|
|
237 | # Do not overwrite CXXFLAGS, add LDFLAGS if missing |
| 237 | sed -i Makefile \ |
238 | sed -i Makefile \ |
| 238 | -e 's:^CXXFLAGS:#CXXFLAGS:' \ |
239 | -e '/^CXXFLAGS[[:space:]]*=/s/=/?=/' \ |
| 239 | -e '/LDFLAGS/!s:-shared:$(LDFLAGS) -shared:' |
240 | -e '/LDFLAGS/!s:-shared:$(LDFLAGS) -shared:' |
| 240 | eend $? |
241 | eend $? |
| 241 | |
242 | |
| 242 | ebegin " Disabling file stripping" |
243 | ebegin " Disabling file stripping" |
| 243 | sed -i Makefile \ |
244 | sed -i Makefile \ |
| … | |
… | |
| 266 | if [[ ${USE_GETTEXT} = 0 ]]; then |
267 | if [[ ${USE_GETTEXT} = 0 ]]; then |
| 267 | # Remove i18n Target if using older vdr |
268 | # Remove i18n Target if using older vdr |
| 268 | sed -i Makefile \ |
269 | sed -i Makefile \ |
| 269 | -e '/^all:/s/ i18n//' |
270 | -e '/^all:/s/ i18n//' |
| 270 | elif [[ ${USE_GETTEXT} = 1 && ! -d po && ${NO_GETTEXT_HACK} != 1 ]]; then |
271 | elif [[ ${USE_GETTEXT} = 1 && ! -d po && ${NO_GETTEXT_HACK} != 1 ]]; then |
|
|
272 | einfo "Plugin is not yet changed for new translation system." |
| 271 | einfo "Converting translations to gettext" |
273 | einfo "Auto converting translations to gettext" |
| 272 | |
274 | |
| 273 | local i18n_tool="${ROOT}/usr/share/vdr/bin/i18n-to-gettext.pl" |
275 | local i18n_tool="${ROOT}/usr/share/vdr/bin/i18n-to-gettext.pl" |
| 274 | if [[ ! -x ${i18n_tool} ]]; then |
276 | if [[ ! -x ${i18n_tool} ]]; then |
| 275 | eerror "Missing ${i18n_tool}" |
277 | eerror "Missing ${i18n_tool}" |
| 276 | eerror "Please re-emerge vdr" |
278 | eerror "Please re-emerge vdr" |
| … | |
… | |
| 291 | if [[ -s dummy-translations-trNOOP.c ]]; then |
293 | if [[ -s dummy-translations-trNOOP.c ]]; then |
| 292 | "${i18n_tool}" &>/dev/null |
294 | "${i18n_tool}" &>/dev/null |
| 293 | fi |
295 | fi |
| 294 | |
296 | |
| 295 | # now use the modified Makefile |
297 | # now use the modified Makefile |
|
|
298 | if [[ -f Makefile.new ]]; then |
| 296 | mv Makefile.new Makefile |
299 | mv Makefile.new Makefile |
|
|
300 | else |
|
|
301 | ewarn "Conversion to gettext failed. Plugin needs fixing." |
|
|
302 | fi |
| 297 | fi |
303 | fi |
| 298 | esac |
304 | esac |
| 299 | |
305 | |
| 300 | shift |
306 | shift |
| 301 | done |
307 | done |
| … | |
… | |
| 412 | create_header_checksum_file |
418 | create_header_checksum_file |
| 413 | create_plugindb_file |
419 | create_plugindb_file |
| 414 | } |
420 | } |
| 415 | |
421 | |
| 416 | vdr-plugin_print_enable_command() { |
422 | vdr-plugin_print_enable_command() { |
| 417 | ewarn "emerge --config ${PN} is deprecated" |
|
|
| 418 | elog |
423 | elog |
| 419 | elog "To activate this vdr-plugin execute the following command:" |
424 | elog "To activate this vdr-plugin execute the following command:" |
| 420 | elog "\teselect vdr-plugin enable ${PN#vdr-}" |
425 | elog "\teselect vdr-plugin enable ${PN#vdr-}" |
| 421 | elog |
426 | elog |
| 422 | } |
427 | } |
| … | |
… | |
| 472 | sed -i "${conf}" -e "/^[[:space:]]*${INSTALLPLUGIN}[[:space:]]*\$/d" |
477 | sed -i "${conf}" -e "/^[[:space:]]*${INSTALLPLUGIN}[[:space:]]*\$/d" |
| 473 | fi |
478 | fi |
| 474 | } |
479 | } |
| 475 | |
480 | |
| 476 | vdr-plugin_pkg_config() { |
481 | vdr-plugin_pkg_config() { |
|
|
482 | ewarn "emerge --config ${PN} is no longer supported" |
| 477 | vdr-plugin_print_enable_command |
483 | vdr-plugin_print_enable_command |
| 478 | |
|
|
| 479 | einfo "Calling this now" |
|
|
| 480 | eselect vdr-plugin enable "${PN#vdr-}" |
|
|
| 481 | } |
484 | } |
| 482 | |
485 | |
| 483 | fix_vdr_libsi_include() |
486 | fix_vdr_libsi_include() |
| 484 | { |
487 | { |
| 485 | einfo "Fixing include of libsi-headers" |
488 | einfo "Fixing include of libsi-headers" |