Gentoo Archives: gentoo-dev

From: Joerg Bornkessel <hd_brummy@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] eclass/vdr-plugin-2.eclass EAPI=6 changes, plz review
Date: Mon, 16 May 2016 09:39:50
Message-Id: 5739954B.4030102@astrali.lan
1 Hallo,
2 after my last commit disaster,
3 i bring my changes to review before i break some things again.
4
5 - Added changes to make it work with eapi=6
6 - removed some unneeded code parts (never they was used in any
7 ebuilds, i though they was integrated to make the eclass more
8 flexibel,...)
9
10 <snipp .diff>
11 -- vdr-plugin-2.eclass 2016-05-15 22:03:21.807417485 +0200
12 +++ vdr-plugin-2.eclass.new 2016-05-15 22:01:10.000000000 +0200
13 @@ -1,4 +1,4 @@
14 -# Copyright 1999-2015 Gentoo Foundation
15 +# Copyright 1999-2016 Gentoo Foundation
16 # Distributed under the terms of the GNU General Public License v2
17 # $Id$
18
19 @@ -90,7 +90,7 @@
20 # @CODE
21
22 # Applying your own local/user patches:
23 -# This is done by using the
24 +# This is done by using the
25 # (EAPI = 4,5) epatch_user() function of the eutils.eclass,
26 # (EAPI = 6) eapply_user function integrated in EAPI = 6.
27 # Simply add your patches into one of these directories:
28 @@ -104,10 +104,7 @@
29 inherit flag-o-matic toolchain-funcs unpacker
30
31 case ${EAPI:-0} in
32 - 4|5)
33 - ;;
34 - 6)
35 - ewarn "EAPI 6 support for test purpose only, plz report bugs to
36 vdr@g.o"
37 + 4|5|6)
38 ;;
39 *) die "EAPI ${EAPI} unsupported."
40 ;;
41 @@ -156,6 +153,7 @@
42 # EBUILD=${CATEGORY}/${PN}
43 # EBUILD_V=${PVR}
44 # EOT
45 +# obsolet? fix me later...
46 {
47 echo "VDRPLUGIN_DB=1"
48 echo "CREATOR=ECLASS"
49 @@ -232,6 +230,7 @@
50 #sed -i Makefile \
51 # -e "s:^DVBDIR.*$:DVBDIR = ${DVB_INCLUDE_DIR}:" \
52 # -e 's:-I$(DVBDIR)/include:-I$(DVBDIR):'
53 + # obsolet? fix me later...
54
55 if ! grep -q APIVERSION Makefile; then
56 ebegin " Converting to APIVERSION"
57 @@ -289,7 +288,7 @@
58 linguas_support() {
59 # Patching Makefile for linguas support.
60 # Only locales, enabled through the LINGUAS (make.conf) variable will be
61 -# "compiled" and installed.
62 +# compiled and installed.
63
64 einfo "Patching for Linguas support"
65 einfo "available Languages for ${P} are:"
66 @@ -311,12 +310,9 @@
67 vdr_i18n() {
68 # i18n handling was deprecated since >=media-video/vdr-1.5.9,
69 # finally with >=media-video/vdr-1.7.27 it has been dropped entirely
70 and some
71 -# plugins will fail to "compile" because they're still using the old
72 variant.
73 +# plugins will fail to compile because they're still using the old
74 variant.
75 # Simply remove the i18n.o object from Makefile (OBJECT) and
76 # remove "static const tI18nPhrase*" from i18n.h.
77 -#
78 -# Plugins that are still using the old method will be pmasked until
79 they're
80 -# fixed or in case of maintainer timeout they'll be masked for removal.
81
82 gettext_missing
83
84 @@ -391,6 +387,7 @@
85
86 # Plugins need to be compiled with position independent code,
87 otherwise linking
88 # VDR against it will fail
89 + # depricated if fi, as we have only >=vdr-2 in the tree, fix me
90 later...
91 if has_version ">=media-video/vdr-1.7.13"; then
92 append-cxxflags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
93 -D_LARGEFILE64_SOURCE
94 fi
95 @@ -500,7 +497,9 @@
96 die "vdr-plugin-2_src_prepare not called!"
97 fi
98
99 - [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
100 + [[ ${EAPI} == [45] ]] && [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
101 + [[ ${EAPI} == "6" ]] && [[ ${PATCHES[@]} ]] && eapply "${PATCHES[@]}"
102 +
103 debug-print "$FUNCNAME: applying user patches"
104
105 vdr-plugin-2_src_util prepare
106 @@ -522,14 +521,12 @@
107 fi
108 cd "${S}"
109
110 - BUILD_TARGETS=${BUILD_TARGETS:-${VDRPLUGIN_MAKE_TARGET:-all }}
111 - emake ${BUILD_PARAMS} \
112 - ${BUILD_TARGETS} \
113 - LOCALEDIR="${TMP_LOCALE_DIR}" \
114 - LOCDIR="${TMP_LOCALE_DIR}" \
115 - LIBDIR="${S}" \
116 - TMPDIR="${T}" \
117 - || die "emake failed"
118 + emake all ${BUILD_PARAMS} \
119 + LOCALEDIR="${TMP_LOCALE_DIR}" \
120 + LOCDIR="${TMP_LOCALE_DIR}" \
121 + LIBDIR="${S}" \
122 + TMPDIR="${T}" \
123 + || die "emake all failed"
124 ;;
125 esac
126
127 @@ -570,12 +567,11 @@
128
129 local SOFILE_STRING=$(grep SOFILE Makefile)
130 if [[ -n ${SOFILE_STRING} ]]; then
131 - BUILD_TARGETS=${BUILD_TARGETS:-${VDRPLUGIN_MAKE_TARGET:-install }}
132 - einstall ${BUILD_PARAMS} \
133 - ${BUILD_TARGETS} \
134 - TMPDIR="${T}" \
135 - DESTDIR="${D}" \
136 - || die "einstall (makefile target) failed"
137 + emake install \
138 + ${BUILD_PARAMS} \
139 + TMPDIR="${T}" \
140 + DESTDIR="${D}" \
141 + || die "emake install (makefile target) failed"
142 else
143 dev_check "Plugin use still the old Makefile handling"
144 insinto "${VDR_PLUGIN_DIR}"
145 @@ -609,9 +605,14 @@
146 create_header_checksum_file ${vdr_plugin_list}
147 create_plugindb_file ${vdr_plugin_list}
148
149 - local docfile
150 - for docfile in README* HISTORY CHANGELOG; do
151 - [[ -f ${docfile} ]] && dodoc ${docfile}
152 + local commondoc=( README* HISTORY CHANGELOG )
153 + for docfile in "${commondoc[@]}"; do
154 + if [[ ${EAPI} == "6" ]]; then
155 + local DOCS="${DOCS} ${docfile}"
156 + [[ -f ${docfile} ]] && einstalldocs "${DOCS[@]}"
157 + else
158 + [[ -f ${docfile} ]] && dodoc ${docfile}
159 + fi
160 done
161
162 # if VDR_CONFD_FILE is empty and ${FILESDIR}/confd exists take it
163 </snapp>
164
165 Attached:
166 vdr-plugin-2.eclass
167 vdr-plugin-2.eclass.diff
168 vdr-plugin-2.eclass.new
169
170
171 Cheers
172 /dev/joerg
173 --
174 Joerg Bornkessel <hd_brummy@g.o>
175 GnuPG Key: 0x93EB5F4DAA5832A1
176 Fingerprint: 0E0A A1EE 1DF4 41D7 A3F5 21C2 93EB 5F4D AA58 32A1

Attachments

File name MIME type
vdr-plugin-2.eclass text/plain
vdr-plugin-2.eclass.diff text/plain
vdr-plugin-2.eclass.new text/plain

Replies

Subject Author
Re: [gentoo-dev] eclass/vdr-plugin-2.eclass EAPI=6 changes, plz review "Michał Górny" <mgorny@g.o>