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

Collapse All | Expand All

(-)/usr/portage/sys-devel/libperl/libperl-5.8.4-r1.ebuild (-16 / +32 lines)
Lines 79-88 Link Here
79
	SLOT="0"
79
	SLOT="0"
80
fi
80
fi
81
81
82
LIBPERL="libperl.so.${PERLSLOT}.${SHORT_PV}"
82
if useq ppc-macos || useq macos; then
83
	LPNAME="libperl.dylib"
84
	LPSLOT="libperl.${PERLSLOT}.dylib"
85
	LPFIND="libperl.?.*.dylib"
86
	LIBPERL="libperl.${PERLSLOT}.${SHORT_PV}.dylib"
87
else
88
	LPNAME="libperl.so"
89
	LPSLOT="libperl.so.${PERLSLOT}"
90
	LPFIND="libperl.so.?.*"
91
	LIBPERL="${LPSLOT}.${SHORT_PV}"
92
fi
83
93
84
LICENSE="Artistic GPL-2"
94
LICENSE="Artistic GPL-2"
85
KEYWORDS="x86 ~ppc sparc mips alpha arm hppa amd64 ~ia64 ~ppc64 s390"
95
KEYWORDS="x86 ~ppc sparc mips alpha arm hppa amd64 ~ia64 ~ppc64 s390 ppc-macos"
86
96
87
DEPEND="!uclibc? ( sys-apps/groff )
97
DEPEND="!uclibc? ( sys-apps/groff )
88
	berkdb? ( sys-libs/db )
98
	berkdb? ( sys-libs/db )
Lines 135-141 Link Here
135
	#
145
	#
136
	#   LIBPERL=libperl.so.${SLOT}.`echo ${PV} | cut -d. -f1,2`
146
	#   LIBPERL=libperl.so.${SLOT}.`echo ${PV} | cut -d. -f1,2`
137
	#
147
	#
138
	cd ${S}; epatch ${FILESDIR}/${P}-create-libperl-soname.patch
148
	if ! (useq ppc-macos || useq macos) ; then
149
		cd ${S}; epatch ${FILESDIR}/${P}-create-libperl-soname.patch
150
	fi
139
151
140
	# uclibc support - dragonheart 2004.06.16
152
	# uclibc support - dragonheart 2004.06.16
141
	cd ${S}; epatch ${FILESDIR}/${P}-uclibc.patch
153
	cd ${S}; epatch ${FILESDIR}/${P}-uclibc.patch
Lines 215-222 Link Here
215
			-Ud_csh \
227
			-Ud_csh \
216
			${myconf} || die
228
			${myconf} || die
217
229
218
		emake -f Makefile depend || die "Couldn't make libperl.so depends"
230
		emake -f Makefile depend || die "Couldn't make ${LPNAME} depends"
219
		emake -f Makefile ${LIBPERL} || die "Unable to make libperl.so"
231
		emake -f Makefile ${LIBPERL} || die "Unable to make ${LPNAME}"
220
		mv ${LIBPERL} ${WORKDIR}
232
		mv ${LIBPERL} ${WORKDIR}
221
	else
233
	else
222
cat > config.over <<EOF
234
cat > config.over <<EOF
Lines 274-281 Link Here
274
		local coredir="/usr/lib/perl5/${PV}/${myarch}${mythreading}/CORE"
286
		local coredir="/usr/lib/perl5/${PV}/${myarch}${mythreading}/CORE"
275
		dodir ${coredir}
287
		dodir ${coredir}
276
		dosym ../../../../${LIBPERL} ${coredir}/${LIBPERL}
288
		dosym ../../../../${LIBPERL} ${coredir}/${LIBPERL}
277
		dosym ../../../../${LIBPERL} ${coredir}/libperl.so.${PERLSLOT}
289
		dosym ../../../../${LIBPERL} ${coredir}/${LPSLOT}
278
		dosym ../../../../${LIBPERL} ${coredir}/libperl.so
290
		dosym ../../../../${LIBPERL} ${coredir}/${LPNAME}
279
291
280
		# Fix for "stupid" modules and programs
292
		# Fix for "stupid" modules and programs
281
		dodir /usr/lib/perl5/site_perl/${PV}/${myarch}${mythreading}
293
		dodir /usr/lib/perl5/site_perl/${PV}/${myarch}${mythreading}
Lines 345-363 Link Here
345
pkg_postinst() {
357
pkg_postinst() {
346
358
347
	# Make sure we do not have stale/invalid libperl.so 's ...
359
	# Make sure we do not have stale/invalid libperl.so 's ...
348
	if [ -f "${ROOT}usr/lib/libperl.so" -a ! -L "${ROOT}usr/lib/libperl.so" ]
360
	if [ -f "${ROOT}usr/lib/${LPNAME}" -a ! -L "${ROOT}usr/lib/${LPNAME}" ]
349
	then
361
	then
350
		mv -f ${ROOT}usr/lib/libperl.so ${ROOT}usr/lib/libperl.so.old
362
		mv -f ${ROOT}usr/lib/${LPNAME} ${ROOT}usr/lib/${LPNAME}.old
351
	fi
363
	fi
352
364
353
	# Next bit is to try and setup the /usr/lib/libperl.so symlink
365
	# Next bit is to try and setup the /usr/lib/libperl.so symlink
354
	# properly ...
366
	# properly ...
355
	local libnumber="`ls -1 ${ROOT}usr/lib/libperl.so.?.* | grep -v '\.old' | wc -l`"
367
	local libnumber="`ls -1 ${ROOT}usr/lib/${LPFIND} | grep -v '\.old' | wc -l`"
356
	if [ "${libnumber}" -eq 1 ]
368
	if [ "${libnumber}" -eq 1 ]
357
	then
369
	then
358
		# Only this version of libperl is installed, so just link libperl.so
370
		# Only this version of libperl is installed, so just link libperl.so
359
		# to the *soname* version of it ...
371
		# to the *soname* version of it ...
360
		ln -snf libperl.so.${PERLSLOT} ${ROOT}usr/lib/libperl.so
372
		ln -snf ${LPSLOT} ${ROOT}usr/lib/${LPNAME}
361
	else
373
	else
362
		if [ -x "${ROOT}/usr/bin/perl" ]
374
		if [ -x "${ROOT}/usr/bin/perl" ]
363
		then
375
		then
Lines 365-387 Link Here
365
			# if there are already a perl installed, if so, link libperl.so
377
			# if there are already a perl installed, if so, link libperl.so
366
			# to that *soname* version of libperl.so ...
378
			# to that *soname* version of libperl.so ...
367
			local perlversion="`${ROOT}/usr/bin/perl -V:version | cut -d\' -f2 | cut -d. -f1,2`"
379
			local perlversion="`${ROOT}/usr/bin/perl -V:version | cut -d\' -f2 | cut -d. -f1,2`"
368
380
		
369
			cd ${ROOT}usr/lib
381
			cd ${ROOT}usr/lib
370
			# Link libperl.so to the *soname* versioned lib ...
382
			# Link libperl.so to the *soname* versioned lib ...
371
			ln -snf `echo libperl.so.?.${perlversion} | cut -d. -f1,2,3` libperl.so
383
			if useq ppc-macos || useq macos; then
384
				ln -snf `echo libperl.?.${perlversion}.dylib | cut -d. -f1,2,3` ${LPNAME}
385
			else
386
				ln -snf `echo libperl.so.?.${perlversion} | cut -d. -f1,2,3` ${LPNAME}
387
			fi
372
		else
388
		else
373
			local x latest
389
			local x latest
374
390
			
375
			# Nope, we are not so lucky ... try to figure out what version
391
			# Nope, we are not so lucky ... try to figure out what version
376
			# is the latest, and keep fingers crossed ...
392
			# is the latest, and keep fingers crossed ...
377
			for x in `ls -1 ${ROOT}usr/lib/libperl.so.?.*`
393
			for x in `ls -1 ${ROOT}usr/lib/${LPFIND}`
378
			do
394
			do
379
				latest="${x}"
395
				latest="${x}"
380
			done
396
			done
381
397
382
			cd ${ROOT}usr/lib
398
			cd ${ROOT}usr/lib
383
			# Link libperl.so to the *soname* versioned lib ...
399
			# Link libperl.so to the *soname* versioned lib ...
384
			ln -snf `echo ${latest##*/} | cut -d. -f1,2,3` libperl.so
400
			ln -snf `echo ${latest##*/} | cut -d. -f1,2,3` ${LPNAME} 
385
		fi
401
		fi
386
	fi
402
	fi
387
}
403
}

Return to bug 58931