Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 104064 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/dev-libs/pwlib/pwlib-1.8.4.ebuild (-37 / +55 lines)
Lines 1-6 Link Here
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/dev-libs/pwlib/pwlib-1.8.4.ebuild,v 1.5 2005/08/26 16:01:13 seemant Exp $
3
# $Header: /var/cvsroot/gentoo-x86/dev-libs/pwlib/pwlib-1.8.4.ebuild,v 1.2 2005/07/10 01:11:05 swegener Exp $
4
4
5
inherit eutils flag-o-matic multilib
5
inherit eutils flag-o-matic multilib
6
6
Lines 12-18 Link Here
12
12
13
LICENSE="MPL-1.1"
13
LICENSE="MPL-1.1"
14
SLOT="0"
14
SLOT="0"
15
KEYWORDS="~x86 ~sparc ~alpha ppc ~amd64"
15
KEYWORDS="~x86 ~sparc ~alpha ~ppc ~amd64"
16
16
17
DEPEND=">=sys-devel/bison-1.28
17
DEPEND=">=sys-devel/bison-1.28
18
	>=sys-devel/flex-2.5.4a
18
	>=sys-devel/flex-2.5.4a
Lines 25-31 Link Here
25
	ieee1394? ( media-libs/libdv
25
	ieee1394? ( media-libs/libdv
26
		sys-libs/libavc1394
26
		sys-libs/libavc1394
27
		sys-libs/libraw1394
27
		sys-libs/libraw1394
28
		media-libs/libdc1394 )
28
		media-plugins/libdc1394 )
29
	esd? ( media-sound/esound )"
29
	esd? ( media-sound/esound )"
30
30
31
src_unpack() {
31
src_unpack() {
Lines 38-52 Link Here
38
		-e "s:-mcpu=\$(CPUTYPE)::" \
38
		-e "s:-mcpu=\$(CPUTYPE)::" \
39
		-e "s:-O3 -DNDEBUG:-DNDEBUG:" \
39
		-e "s:-O3 -DNDEBUG:-DNDEBUG:" \
40
		unix.mak
40
		unix.mak
41
42
	# newer esound package doesn't install libesd.a anymore,
43
	# use dynamic library instead (fixes #100432)
44
	epatch ${FILESDIR}/pwlib-1.6.3-dyn-esd.patch
45
}
41
}
46
42
47
src_compile() {
43
src_compile() {
48
	local plugins
44
	local plugins myconf
49
	local myconf
50
45
51
	# may cause ICE (bug #70638)
46
	# may cause ICE (bug #70638)
52
	filter-flags -fstack-protector
47
	filter-flags -fstack-protector
Lines 62-68 Link Here
62
	#use ipv6 \
57
	#use ipv6 \
63
	#	&& myconf="${myconf} --enable-ipv6" \
58
	#	&& myconf="${myconf} --enable-ipv6" \
64
	#	|| myconf="${myconf} --disable-ipv6"
59
	#	|| myconf="${myconf} --disable-ipv6"
65
	myconf="${myconf} --enable-ipv6"
60
	myconf="--enable-ipv6"
66
61
67
	# plugins, oss and v4l are default
62
	# plugins, oss and v4l are default
68
	plugins="oss v4l"
63
	plugins="oss v4l"
Lines 98-107 Link Here
98
	# Horrible hack to strip out -L/usr/lib to allow upgrades
93
	# Horrible hack to strip out -L/usr/lib to allow upgrades
99
	# problem is it adds -L/usr/lib before -L${S} when SSL is
94
	# problem is it adds -L/usr/lib before -L${S} when SSL is
100
	# enabled.  Same thing for -I/usr/include.
95
	# enabled.  Same thing for -I/usr/include.
101
	sed -i -e "s:^\(LDFLAGS.*\)-L/usr/lib:\1:" \
96
	sed -i  -e "s:^\(LDFLAGS.*\)-L/usr/lib:\1:" \
102
		-e "s:^\(STDCCFLAGS.*\)-I/usr/include:\1:" \
97
		-e "s:^\(STDCCFLAGS.*\)-I/usr/include:\1:" \
103
		${S}/make/ptbuildopts.mak
98
		${S}/make/ptbuildopts.mak
104
	sed -i -e "s:^\(LDFLAGS[\s]*=.*\) -L/usr/lib:\1:" \
99
100
	sed -i  -e "s:^\(LDFLAGS[\s]*=.*\) -L/usr/lib:\1:" \
105
		-e "s:^\(LDFLAGS[\s]*=.*\) -I/usr/include:\1:" \
101
		-e "s:^\(LDFLAGS[\s]*=.*\) -I/usr/include:\1:" \
106
		-e "s:^\(CCFLAGS[\s]*=.*\) -I/usr/include:\1:" \
102
		-e "s:^\(CCFLAGS[\s]*=.*\) -I/usr/include:\1:" \
107
		${S}/make/ptlib-config
103
		${S}/make/ptlib-config
Lines 109-154 Link Here
109
	emake -j1 opt || die "make failed"
105
	emake -j1 opt || die "make failed"
110
}
106
}
111
107
108
#pkg_preinst() {
109
#	# remove {lib,include} directories in /usr/share/pwlib
110
#	# they are getting replaced by symlinks in src_install
111
#
112
#	if [[ -d ${ROOT}usr/share/pwlib/include ]]; then
113
#		rm -rf ${ROOT}usr/share/pwlib/include
114
#	fi
115
#	if [[ -d ${ROOT}usr/share/pwlib/$(get_libdir) ]]; then
116
#		rm -rf ${ROOT}usr/share/pwlib/$(get_libdir)
117
#	fi
118
#}
119
112
src_install() {
120
src_install() {
121
	local libdir libname
122
123
	libdir=$(get_libdir)
124
113
	# makefile doesn't create ${D}/usr/bin
125
	# makefile doesn't create ${D}/usr/bin
114
	dodir /usr/bin
126
	dodir /usr/bin
115
	make PREFIX=/usr DESTDIR=${D} install || die "install failed"
127
	make PREFIX=/usr DESTDIR=${D} install || die "install failed"
116
128
117
	## vv will try to fix the mess below, requires a lot of patching though...
129
	## vv will try to fix the mess below, requires a lot of patching though...
118
130
119
	# these are for compiling openh323
131
	# update 2005/08/22:
120
	# NOTE: symlinks don't work when upgrading
132
	#
121
	# FIXME: probably should fix this with ptlib-config
133
	# locations in *.mak files haven been fixed
122
	dodir /usr/share/pwlib/include
134
	# directories have been replaced w/ symlinks
123
	cp -r ${D}/usr/include/* ${D}/usr/share/pwlib/include
135
	# (left to not break things, doing some testing atm)
124
136
125
	dodir /usr/share/pwlib/$(get_libdir)
137
#	dosym /usr/include /usr/share/pwlib/include
126
	for x in ${D}/usr/$(get_libdir)/*; do
138
#	dosym /usr/${libdir} /usr/share/pwlib/${libdir}
127
		dosym /usr/$(get_libdir)/`basename ${x}` /usr/share/pwlib/$(get_libdir)/`basename ${x}`
139
#
128
	done
140
#	# just in case...
129
141
#	if [[ "${libdir}" = "lib64" ]]; then
130
	# just in case...
142
#		dosym /usr/share/pwlib/lib64 /usr/share/pwlib/lib
131
	if [[ "$(get_libdir)" = "lib64" ]]; then
143
#	fi
132
		dosym /usr/share/pwlib/$(get_libdir) /usr/share/pwlib/lib
133
	fi
134
144
135
	## ^^ bad stuff
145
	## ^^ bad stuff
136
146
137
	# fix symlink
147
	# fix symlink
138
	# only amd64 needs special handling, afaics
148
	rm ${D}/usr/${libdir}/libpt.so
139
	rm ${D}/usr/$(get_libdir)/libpt.so
149
140
	if use amd64; then
150
	libname=$(basename `ls ${D}/usr/${libdir}/libpt_*_*_r.so.${PV}`)
141
		dosym /usr/$(get_libdir)/libpt_linux_x86_64_r.so.${PV} /usr/$(get_libdir)/libpt.so
151
	dosym /usr/${libdir}/${libname} /usr/${libdir}/libpt.so
142
	else
143
		dosym /usr/$(get_libdir)/libpt_linux_${ARCH}_r.so.${PV} /usr/$(get_libdir)/libpt.so
144
	fi
145
152
146
	# strip ${S} stuff
153
	# strip ${S} stuff
147
	dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/bin/ptlib-config
154
	sed -i -e "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" \
148
	dosed "s:^PWLIBDIR.*:PWLIBDIR=/usr/share/pwlib:" /usr/share/pwlib/make/ptbuildopts.mak
155
		${D}/usr/bin/ptlib-config \
156
		${D}/usr/share/pwlib/make/ptlib-config \
157
		${D}/usr/share/pwlib/make/ptbuildopts.mak
158
159
	# fix makefiles to use headers from /usr/include and libs from /usr/lib
160
	# instead of /usr/share/pwlib
161
	sed -i  -e "s:-I\$(PWLIBDIR)\(/include[a-zA-Z0-9_/-]\+\):-I/usr/include\1:g" \
162
		-e "s:-I\$(PWLIBDIR)/include::g" \
163
		-e "s:^\(PW_LIBDIR[ \t]\+=\).*:\1 /usr/${libdir}:" \
164
		${D}/usr/share/pwlib/make/*.mak
149
165
150
	# dodgy configure/makefiles forget to expand this
166
	# dodgy configure/makefiles forget to expand this
151
	dosed 's:${exec_prefix}:/usr:' /usr/bin/ptlib-config
167
	sed -i -e "s:\${exec_prefix}:/usr:" \
168
		${D}/usr/bin/ptlib-config \
169
		${D}/usr/share/pwlib/make/ptlib-config
152
170
153
	# copy version.h
171
	# copy version.h
154
	insinto /usr/share/pwlib
172
	insinto /usr/share/pwlib

Return to bug 104064