| 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.24 2006/07/05 17:08:54 zzam Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/vdr-plugin.eclass,v 1.25 2006/07/08 14:31:35 zzam Exp $ |
| 4 | # |
4 | # |
| 5 | # Author: |
5 | # Author: |
| 6 | # Matthias Schwarzott <zzam@gentoo.org> |
6 | # Matthias Schwarzott <zzam@gentoo.org> |
| 7 | |
7 | |
| 8 | # vdr-plugin.eclass |
8 | # vdr-plugin.eclass |
| … | |
… | |
| 128 | cd "${WORKDIR}" |
128 | cd "${WORKDIR}" |
| 129 | einfo "$(/bin/ls -1 ${WORKDIR})" |
129 | einfo "$(/bin/ls -1 ${WORKDIR})" |
| 130 | die "Could not change to plugin-source-directory!" |
130 | die "Could not change to plugin-source-directory!" |
| 131 | fi |
131 | fi |
| 132 | |
132 | |
| 133 | ebegin "Patching Makefile" |
133 | einfo "Patching Makefile" |
| 134 | [[ -e Makefile ]] || die "Makefile of plugin can not be found!" |
134 | [[ -e Makefile ]] || die "Makefile of plugin can not be found!" |
| 135 | cp Makefile Makefile.orig |
135 | cp Makefile Makefile.orig |
|
|
136 | |
| 136 | sed -i.orig Makefile \ |
137 | sed -i Makefile \ |
|
|
138 | -e '1i\#Makefile was patched by vdr-plugin.eclass' |
|
|
139 | |
|
|
140 | ebegin " Setting Pathes" |
|
|
141 | sed -i Makefile \ |
| 137 | -e "s:^VDRDIR.*$:VDRDIR = ${VDR_INCLUDE_DIR}:" \ |
142 | -e "s:^VDRDIR.*$:VDRDIR = ${VDR_INCLUDE_DIR}:" \ |
| 138 | -e "s:^DVBDIR.*$:DVBDIR = ${DVB_INCLUDE_DIR}:" \ |
143 | -e "s:^DVBDIR.*$:DVBDIR = ${DVB_INCLUDE_DIR}:" \ |
| 139 | -e "s:^LIBDIR.*$:LIBDIR = ${S}:" \ |
144 | -e "s:^LIBDIR.*$:LIBDIR = ${S}:" \ |
| 140 | -e "s:^TMPDIR.*$:TMPDIR = ${T}:" \ |
145 | -e "s:^TMPDIR.*$:TMPDIR = ${T}:" \ |
| 141 | -e 's:^CXXFLAGS:#CXXFLAGS:' \ |
|
|
| 142 | -e 's:-I$(VDRDIR)/include:-I$(VDRDIR):' \ |
146 | -e 's:-I$(VDRDIR)/include:-I$(VDRDIR):' \ |
| 143 | -e 's:-I$(DVBDIR)/include:-I$(DVBDIR):' \ |
147 | -e 's:-I$(DVBDIR)/include:-I$(DVBDIR):' \ |
| 144 | -e 's:-I$(VDRDIR) -I$(DVBDIR):-I$(DVBDIR) -I$(VDRDIR):' \ |
148 | -e 's:-I$(VDRDIR) -I$(DVBDIR):-I$(DVBDIR) -I$(VDRDIR):' \ |
| 145 | -e 's:$(VDRDIR)/\([a-z]*\.h\|Make.config\):$(VDRDIR)/vdr/\1:' \ |
149 | -e 's:$(VDRDIR)/\([a-z]*\.h\|Make.config\):$(VDRDIR)/vdr/\1:' |
|
|
150 | eend $? |
|
|
151 | |
|
|
152 | ebegin " Converting to APIVERSION" |
|
|
153 | sed -i Makefile \ |
| 146 | -e 's:^APIVERSION = :APIVERSION ?= :' \ |
154 | -e 's:^APIVERSION = :APIVERSION ?= :' \ |
| 147 | -e 's:$(LIBDIR)/$@.$(VDRVERSION):$(LIBDIR)/$@.$(APIVERSION):' \ |
155 | -e 's:$(LIBDIR)/$@.$(VDRVERSION):$(LIBDIR)/$@.$(APIVERSION):' \ |
| 148 | -e '1i\APIVERSION = '"${APIVERSION}" |
156 | -e '2i\APIVERSION = '"${APIVERSION}" |
|
|
157 | eend $? |
|
|
158 | |
|
|
159 | ebegin " Correcting CXXFLAGS" |
|
|
160 | sed -i Makefile \ |
|
|
161 | -e 's:^CXXFLAGS:#CXXFLAGS:' |
| 149 | eend $? |
162 | eend $? |
| 150 | ;; |
163 | ;; |
| 151 | esac |
164 | esac |
| 152 | |
165 | |
| 153 | shift |
166 | shift |