[proaudio] [1102] added support for amd64 pls test

[ Thread Index | Date Index | More lists.tuxfamily.org/proaudio Archives ]


Revision: 1102
Author:   evermind
Date:     2008-01-11 00:25:47 +0000 (Fri, 11 Jan 2008)

Log Message:
-----------
added support for amd64 pls test

Modified Paths:
--------------
    trunk/overlays/proaudio/eclass/exteutils.eclass
    trunk/overlays/proaudio/media-libs/libdsp/ChangeLog
    trunk/overlays/proaudio/media-libs/libdsp/Manifest
    trunk/overlays/proaudio/media-libs/libdsp/libdsp-5.0.2.ebuild


Modified: trunk/overlays/proaudio/eclass/exteutils.eclass
===================================================================
--- trunk/overlays/proaudio/eclass/exteutils.eclass	2008-01-09 22:39:45 UTC (rev 1101)
+++ trunk/overlays/proaudio/eclass/exteutils.eclass	2008-01-11 00:25:47 UTC (rev 1102)
@@ -62,10 +62,10 @@
 }
 
 # using sed and test if sed changed the file
-# WARNING: it's only tested to work if it's called inside the
-# dir which contains the file to patch
+# WARNING: don't pass the same file twice while using the same regexp
 # syntax same as sed
 # ESED=1 emerge pkg # will show the differences produced whith esed_check
+# and placed the pkg in ${S}/esed_patches
 CNT="0"
 esed_check() {
 #	set -x
@@ -78,38 +78,61 @@
 
 	local cnt=0
 	local args=("$@")
+	local uniq_backup="esed_bac${RANDOM}" # needed to find modified files
 	for i in ${args[@]};do
 		if [ "$i" == "-i" ];then
-			args[$cnt]="-iesed_bac"
+			args[$cnt]="-i${uniq_backup}"
 		fi
 		let "cnt+=1"
 	done
 	LC_ALL=C sed "${args[@]}"
 	if [ "${?}" -ne "0" ] ;then
-		die_msg 
+		die_msg "retval not zero"
 	fi
 
-	local backup="`find -name '*esed_bac' -printf '%f\n'`"
-	local original="${backup/esed_bac/}"
-	einfo "patching: ${original}  (using sed)"
-	if diff --brief "${original}" "${backup}" &>/dev/null;then
-		die_msg "${original}"
-	fi
+	local old_ifs="$IFS"
+IFS="
+"
+	local patch_file_exists="0"
+	local patch_name=""
+	local patch_dir="${S}/esed_patches"
 
-	# check the differences produces with esed_check
-	local patch_dir="${S}/esed_patches"
+	# find backup'd files
+	for backup in $(find -name "*${uniq_backup}");do
+		local patched="${backup/${uniq_backup}/}"
+		einfo "Patched with esed: ${patched#*/}"
+		if diff --brief "${patched}" "${backup}" &>/dev/null;then
+			die_msg "while diff ${patched}"
+		fi
+
+		# check the differences produces with esed_check
+		if [ "${ESED}" == "1" ];then
+			# display diff 
+			einfo "In file ${patched} esed changed:"
+			diff -u "${backup}" "${patched}"
+
+			# save the sed geneated patches to $patch_dir
+			[ ! -e "${patch_dir}" ] && mkdir "${patch_dir}" &>/dev/null
+			if [ "${patch_file_exists}" == "0" ];then
+				patch_name="${CNT}-esed_${patched##*/}"
+				patch_file_exists="1"
+				echo -e"\nesed generated patch for ${patch_name##/*}\n" \
+					> "${patch_dir}/${patch_name}.patch"
+			fi
+			diff -u "${backup}" "${patched}" \
+				>> "${patch_dir}/${patch_name}.patch"
+		fi
+
+		rm -f "${backup}"
+	done
+	
+	IFS="$old_ifs"
+	patch_file_exists="0"
+	let CNT+=1
 	if [ "${ESED}" == "1" ];then
-		# display diff 
-		einfo "In file ${original} esed changed:"
-		diff -u "${backup}" "${original}"
-
-		# save the sed geneated patches to $patch_dir
-		[ ! -e ${patch_dir} ] && mkdir ${patch_dir} &>/dev/null
-		echo "esed generated patch for ${original}" \
-			> "${patch_dir}/${CNT}-${original}.patch"
-		diff -u "${backup}" "${original}" \
-			>> "${patch_dir}/${CNT}-${original}.patch"
-		let CNT+=1
+		einfo
+		einfo "esed_check generated patches are located in:"
+		einfo "${patch_dir}"
+		einfo
 	fi
-	rm -f "${backup}"
 }

Modified: trunk/overlays/proaudio/media-libs/libdsp/ChangeLog
===================================================================
--- trunk/overlays/proaudio/media-libs/libdsp/ChangeLog	2008-01-09 22:39:45 UTC (rev 1101)
+++ trunk/overlays/proaudio/media-libs/libdsp/ChangeLog	2008-01-11 00:25:47 UTC (rev 1102)
@@ -1,7 +1,10 @@
 # ChangeLog for media-libs/libdsp
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  11 Jan 2008; Frieder Buerzele <evermind@xxxxxxxxxxxxx> ChangeLog:
+  add support for amd64
+
   17 Dec 2007; Thomas Kuther <gimpel@xxxxxxxxxxxxxxxx> ChangeLog:
   added a changelog
 

Modified: trunk/overlays/proaudio/media-libs/libdsp/Manifest
===================================================================
--- trunk/overlays/proaudio/media-libs/libdsp/Manifest	2008-01-09 22:39:45 UTC (rev 1101)
+++ trunk/overlays/proaudio/media-libs/libdsp/Manifest	2008-01-11 00:25:47 UTC (rev 1102)
@@ -1,6 +1,6 @@
 AUX libdsp-5.0.2-Makefile.patch 3275 RMD160 0920b3e8a54fb762732f62d8eb84957710935244 SHA1 8538368daf6054cc0360c574d807a6493f26865e SHA256 cb405558701b4e0799374f605fd812b1348a996a3c5df5767790157bf5109aea
 DIST libdsp-doc-html.tar.gz 1202736 RMD160 8da583b0f5483eb0e904ad0712bc86296cefbe40 SHA1 9204f1964abf3fb9f73c946f71ed95fc6614a635 SHA256 35060d3c658686d67cd434dc09548da8288f81d108e5d3bed8a3a76bac4fb32d
 DIST libdsp-src-5.0.2.tar.gz 218725 RMD160 6d38dc7acfdeed7626923f4d8ac2be362f6ff873 SHA1 6745d42465df7637e0527380df7d722786837acc SHA256 0bb084e02d0d460b7d78b6d3512c9ed23577d834d472cf5569bba0b4e7c09efe
-EBUILD libdsp-5.0.2.ebuild 1777 RMD160 836c427ca21d5be1b41ea1b9a4519ffefbcbc309 SHA1 ea81e8f5077997748a33e8383c8bf697afc3463b SHA256 e730e86ff8db3a764b00e3d5eb3728a2f01dc1a5149d93098e3be368e47e5564
-MISC ChangeLog 205 RMD160 40a8fec95b7a9888aeae7abb3c0fb65587008048 SHA1 f246dc497dc65d4dd8761a455a66c8bbdadd588a SHA256 e9641b967a027dbc40c193da42b301e11615c3374024520ad9811c9592681c47
+EBUILD libdsp-5.0.2.ebuild 2664 RMD160 4ef4dcc16d3d1057ff043b36b52432e8bdd1458f SHA1 e3e4edb3f125b6b7a509fde951742063fe4cf5c6 SHA256 563c4ac5b9c81517d4d5f13685f369e98b43122a6214d40e6658039d09bae0f3
+MISC ChangeLog 298 RMD160 8a5cd5023e83dbd2cb5ae6500e88054c3dc2e963 SHA1 0e3ebf11e3595311ece8b7f6c4c53cdcf991ad30 SHA256 26ccffb8ac9a81234cc13614649e8c235cf460c2dd37004c0c25005c47a27dd8
 MISC metadata.xml 268 RMD160 facc07bd885f20615a1f2555069329c642e1a566 SHA1 2456bdb8a218c9d477d2d6ee4bf158de070c7be4 SHA256 96629b266b743f566c29158d4498edeeb1cd6b1f0cd9629e42d4f10b4da82f89

Modified: trunk/overlays/proaudio/media-libs/libdsp/libdsp-5.0.2.ebuild
===================================================================
--- trunk/overlays/proaudio/media-libs/libdsp/libdsp-5.0.2.ebuild	2008-01-09 22:39:45 UTC (rev 1101)
+++ trunk/overlays/proaudio/media-libs/libdsp/libdsp-5.0.2.ebuild	2008-01-11 00:25:47 UTC (rev 1102)
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
-inherit eutils
+inherit exteutils toolchain-funcs
 
 DESCRIPTION="C++ class library of common digital signal processing functions."
 HOMEPAGE="http://libdsp.sf.net";
@@ -12,7 +12,7 @@
 LICENSE="GPL-2"
 SLOT="0"
 
-KEYWORDS="x86 -amd64 -sparc"
+KEYWORDS="x86 ~amd64 -sparc"
 IUSE="doc"
 DEPEND=""
 
@@ -30,27 +30,52 @@
 	sed -e "s:^CXXFLAGS.*:CXXFLAGS = ${CXXFLAGS}:" -i DynThreads/Makefile
 
 	# use our PREFIX too
-	sed -e "s:^PREFIX.*:PREFIX = ${D}/usr:" -i Inlines/Makefile
-	sed -e "s:^PREFIX.*:PREFIX = ${D}/usr:" -i libDSP/Makefile
-	sed -e "s:^PREFIX.*:PREFIX = ${D}/usr:" -i DynThreads/Makefile
+	esed_check -i -e "s:^PREFIX.*:PREFIX = ${D}/usr:" Inlines/Makefile \
+		libDSP/Makefile DynThreads/Makefile
 
+	if use amd64;then
+		esed_check -i -e "1iCFLAGS = ${CFLAGS}" \
+			-e "s:\(^CFLAGS.*\):#\1:" \
+			-e "s:\(^INCS.*\):INCS = -I. -I../Inlines -I/usr/include:" \
+			libDSP/Makefile.x86-64
+
+		esed_check -i -e "1iCXXFLAGS = ${CXXFLAGS}" \
+			-e "s:\(^CXXFLAGS.*\):#\1:" \
+			-e "s:\(^INCS.*\):INCS = -I. -I../Inlines -I/usr/include:" \
+			DynThreads/Makefile.x86-64
+
+		esed_check -i -e "s:^PREFIX.*:PREFIX = ${D}/usr:" \
+			libDSP/Makefile.x86-64 DynThreads/Makefile.x86-64
+
+	fi
+	tc-export CC CXX
+	# use our CC / CXX variables
+	esed_check -i -e "s:^CC\ *=.*:CC = ${CC}:g" \
+		-e "s:^CXX\ *=.*:CXX = ${CXX}:g" \
+		libDSP/Makefile libDSP/Makefile.x86-64 \
+		DynThreads/Makefile DynThreads/Makefile.x86-64
+
 	# fix NPTL includes
-	for filename in $(grep -rl nptl/pthread *); do
-		sed -e "s:nptl/pthread.h:pthread.h:g" -i $filename
+	for filename in $(grep -rl nptl/pthread libDSP/* Inlines/* DynThreads/*); do
+		esed_check -i -e "s:nptl/pthread.h:pthread.h:g"  $filename
 	done
 
 	# libtool only supports the --tag option from v1.5 onwards
 	if ! has_version ">=sys-devel/libtool-1.5.0"; then
-		sed -e "s/^LIBTOOL = libtool --tag=CXX/LIBTOOL = libtool/" -i libDSP/Makefile
+		esed_check -i -e "s/^LIBTOOL = libtool --tag=CXX/LIBTOOL = libtool/" libDSP/Makefile
+		use amd64 && esed_check -i -e \
+			"s/^LIBTOOL = libtool --tag=CXX/LIBTOOL = libtool/" libDSP/Makefile.x86_64
 	fi
 }
 
 src_compile() {
+	myconf=""
+	use amd64 myconf="-f Makefile.x86-64"
 	cd ${S}/DynThreads
-	emake || die "DynThreads make failed!"
+	emake ${myconf} || die "DynThreads make failed!"
 
 	cd ${S}/libDSP
-	emake || die "libDSP make failed!"
+	emake ${myconf} || die "libDSP make failed!"
 }
 
 src_install() {
@@ -60,10 +85,10 @@
 	make install || die "Inlines install failed!"
 
 	cd ${S}/DynThreads
-	make install || die "DynThreads install failed!"
+	make ${myconf} install || die "DynThreads install failed!"
 
 	cd ${S}/libDSP
-	make install || die "libDSP install failed!"
+	make ${myconf} install || die "libDSP install failed!"
 
 	if use doc; then
 		dohtml ${WORKDIR}/${PN}-doc-html/*


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/