public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in eclass: portability.eclass
@ 2009-03-22 11:26 Fabian Groffen (grobian)
  0 siblings, 0 replies; 7+ messages in thread
From: Fabian Groffen (grobian) @ 2009-03-22 11:26 UTC (permalink / raw
  To: gentoo-commits

grobian     09/03/22 11:26:45

  Modified:             portability.eclass
  Log:
  make dlopen_lib work in a non-"BSD is the only other thing in the world" setting

Revision  Changes    Path
1.12                 eclass/portability.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/portability.eclass?rev=1.12&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/portability.eclass?rev=1.12&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/portability.eclass?r1=1.11&r2=1.12

Index: portability.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- portability.eclass	1 Jan 2007 22:27:01 -0000	1.11
+++ portability.eclass	22 Mar 2009 11:26:45 -0000	1.12
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.11 2007/01/01 22:27:01 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.12 2009/03/22 11:26:45 grobian Exp $
 #
 # Author: Diego Pettenò <flameeyes@gentoo.org>
 #
@@ -54,7 +54,12 @@
 
 # Gets the linker flag to link to dlopen() function
 dlopen_lib() {
-	if [[ ${ELIBC} != *BSD ]]; then
+	# this might need a proper case statement, so far this seems to work as is
+	# - Solaris needs nothing
+	# - Darwin needs nothing
+	# - *BSD needs nothing
+	# - Linux needs -ldl
+	if [[ ${CHOST} == *-linux-gnu ]]; then
 		echo "-ldl"
 	fi
 }






^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: portability.eclass
@ 2009-03-27  8:00 Timothy Redaelli (drizzt)
  0 siblings, 0 replies; 7+ messages in thread
From: Timothy Redaelli (drizzt) @ 2009-03-27  8:00 UTC (permalink / raw
  To: gentoo-commits

drizzt      09/03/27 08:00:56

  Modified:             portability.eclass
  Log:
  uclibc also wants -ldl

Revision  Changes    Path
1.13                 eclass/portability.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/portability.eclass?rev=1.13&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/portability.eclass?rev=1.13&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/portability.eclass?r1=1.12&r2=1.13

Index: portability.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- portability.eclass	22 Mar 2009 11:26:45 -0000	1.12
+++ portability.eclass	27 Mar 2009 08:00:56 -0000	1.13
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.12 2009/03/22 11:26:45 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.13 2009/03/27 08:00:56 drizzt Exp $
 #
 # Author: Diego Pettenò <flameeyes@gentoo.org>
 #
@@ -58,8 +58,8 @@
 	# - Solaris needs nothing
 	# - Darwin needs nothing
 	# - *BSD needs nothing
-	# - Linux needs -ldl
-	if [[ ${CHOST} == *-linux-gnu ]]; then
+	# - Linux needs -ldl (glibc and uclibc)
+	if [[ ${CHOST} == *-linux-gnu || ${CHOST} == *-linux-uclibc ]]; then
 		echo "-ldl"
 	fi
 }






^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: portability.eclass
@ 2009-10-31 15:35 Fabian Groffen (grobian)
  0 siblings, 0 replies; 7+ messages in thread
From: Fabian Groffen (grobian) @ 2009-10-31 15:35 UTC (permalink / raw
  To: gentoo-commits

grobian     09/10/31 15:35:00

  Modified:             portability.eclass
  Log:
  fix CHOST match for arm-boxes, thanks Markus Meier in bug #291289

Revision  Changes    Path
1.14                 eclass/portability.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/portability.eclass?rev=1.14&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/portability.eclass?rev=1.14&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/portability.eclass?r1=1.13&r2=1.14

Index: portability.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- portability.eclass	27 Mar 2009 08:00:56 -0000	1.13
+++ portability.eclass	31 Oct 2009 15:34:59 -0000	1.14
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.13 2009/03/27 08:00:56 drizzt Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.14 2009/10/31 15:34:59 grobian Exp $
 #
 # Author: Diego Pettenò <flameeyes@gentoo.org>
 #
@@ -59,7 +59,7 @@
 	# - Darwin needs nothing
 	# - *BSD needs nothing
 	# - Linux needs -ldl (glibc and uclibc)
-	if [[ ${CHOST} == *-linux-gnu || ${CHOST} == *-linux-uclibc ]]; then
+	if [[ ${CHOST} == *-linux-gnu* || ${CHOST} == *-linux-uclibc ]]; then
 		echo "-ldl"
 	fi
 }






^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: portability.eclass
@ 2010-02-26 18:09 Fabian Groffen (grobian)
  0 siblings, 0 replies; 7+ messages in thread
From: Fabian Groffen (grobian) @ 2010-02-26 18:09 UTC (permalink / raw
  To: gentoo-commits

grobian     10/02/26 18:09:43

  Modified:             portability.eclass
  Log:
  add support for Interix in dlopen_lib, bug #302575

Revision  Changes    Path
1.15                 eclass/portability.eclass

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/portability.eclass?rev=1.15&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/portability.eclass?rev=1.15&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/portability.eclass?r1=1.14&r2=1.15

Index: portability.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- portability.eclass	31 Oct 2009 15:34:59 -0000	1.14
+++ portability.eclass	26 Feb 2010 18:09:43 -0000	1.15
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.14 2009/10/31 15:34:59 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.15 2010/02/26 18:09:43 grobian Exp $
 #
 # Author: Diego Pettenò <flameeyes@gentoo.org>
 #
@@ -54,14 +54,16 @@
 
 # Gets the linker flag to link to dlopen() function
 dlopen_lib() {
-	# this might need a proper case statement, so far this seems to work as is
 	# - Solaris needs nothing
 	# - Darwin needs nothing
 	# - *BSD needs nothing
 	# - Linux needs -ldl (glibc and uclibc)
-	if [[ ${CHOST} == *-linux-gnu* || ${CHOST} == *-linux-uclibc ]]; then
-		echo "-ldl"
-	fi
+	# - Interix needs -ldl
+	case "${CHOST}" in
+		*-linux-gnu*|*-linux-uclibc|*-interix*)
+			echo "-ldl"
+		;;
+	esac
 }
 
 # Gets the home directory for the specified user






^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: portability.eclass
@ 2010-09-24  2:22 Mike Frysinger (vapier)
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Frysinger (vapier) @ 2010-09-24  2:22 UTC (permalink / raw
  To: gentoo-commits

vapier      10/09/24 02:22:08

  Modified:             portability.eclass
  Log:
  seq: dont parse args if `seq` is available, and add a shell fall back if `jot` is not available either

Revision  Changes    Path
1.16                 eclass/portability.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/portability.eclass?rev=1.16&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/portability.eclass?rev=1.16&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/portability.eclass?r1=1.15&r2=1.16

Index: portability.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- portability.eclass	26 Feb 2010 18:09:43 -0000	1.15
+++ portability.eclass	24 Sep 2010 02:22:08 -0000	1.16
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.15 2010/02/26 18:09:43 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.16 2010/09/24 02:22:08 vapier Exp $
 #
 # Author: Diego Pettenò <flameeyes@gentoo.org>
 #
@@ -28,7 +28,12 @@
 #
 # compatibility function that mimes seq command if not available
 seq() {
-	local p=$(type -P seq)
+	# First try `seq`
+	local p=$(type -P seqf)
+	if [[ -n ${p} ]] ; then
+		"${p}" "$@"
+		return $?
+	fi
 
 	case $# in
 		1) min=1  max=$1 step=1  ;;
@@ -37,19 +42,29 @@
 		*) die "seq called with wrong number of arguments" ;;
 	esac
 
-	if [[ -z ${p} ]] ; then
+	# Then try `jot`
+	p=$(type -P jot)
+	if [[ -n ${p} ]] ; then
 		local reps
 		# BSD userland
-		if [[ ${step} != 0 ]]; then
-			reps=$(( ($max-$min) / $step +1 ))
+		if [[ ${step} != 0 ]] ; then
+			reps=$(( (max - min) / step + 1 ))
 		else
 			reps=0
 		fi
 
 		jot $reps $min $max $step
-	else
-		"${p}" $min $step $max
+		return $?
 	fi
+
+	# Screw it, do the output ourselves
+	while :; do
+		[[ $max < $min && $step > 0 ]] && break
+		[[ $min < $max && $step < 0 ]] && break
+		echo $min
+		: $(( min += step ))
+	done
+	return 0
 }
 
 # Gets the linker flag to link to dlopen() function






^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: portability.eclass
@ 2010-09-24 14:29 Mike Frysinger (vapier)
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Frysinger (vapier) @ 2010-09-24 14:29 UTC (permalink / raw
  To: gentoo-commits

vapier      10/09/24 14:29:49

  Modified:             portability.eclass
  Log:
  seq: fix debug typo pointed out by Torsten

Revision  Changes    Path
1.17                 eclass/portability.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/portability.eclass?rev=1.17&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/portability.eclass?rev=1.17&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/portability.eclass?r1=1.16&r2=1.17

Index: portability.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- portability.eclass	24 Sep 2010 02:22:08 -0000	1.16
+++ portability.eclass	24 Sep 2010 14:29:49 -0000	1.17
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.16 2010/09/24 02:22:08 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.17 2010/09/24 14:29:49 vapier Exp $
 #
 # Author: Diego Pettenò <flameeyes@gentoo.org>
 #
@@ -29,7 +29,7 @@
 # compatibility function that mimes seq command if not available
 seq() {
 	# First try `seq`
-	local p=$(type -P seqf)
+	local p=$(type -P seq)
 	if [[ -n ${p} ]] ; then
 		"${p}" "$@"
 		return $?






^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: portability.eclass
@ 2012-01-04  5:57 Mike Frysinger (vapier)
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Frysinger (vapier) @ 2012-01-04  5:57 UTC (permalink / raw
  To: gentoo-commits

vapier      12/01/04 05:57:19

  Modified:             portability.eclass
  Log:
  add missing "local" markings for variables

Revision  Changes    Path
1.24                 eclass/portability.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/portability.eclass?rev=1.24&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/portability.eclass?rev=1.24&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/portability.eclass?r1=1.23&r2=1.24

Index: portability.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- portability.eclass	27 Dec 2011 17:55:12 -0000	1.23
+++ portability.eclass	4 Jan 2012 05:57:19 -0000	1.24
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.23 2011/12/27 17:55:12 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/portability.eclass,v 1.24 2012/01/04 05:57:19 vapier Exp $
 #
 # Author: Diego Pettenò <flameeyes@gentoo.org>
 #
@@ -15,11 +15,11 @@
 #
 # mimic cp --parents copy, but working on BSD userland as well
 treecopy() {
-	dest=${!#}
-	files_count=$#
+	local dest=${!#}
+	local files_count=$#
 
-	while(( $# > 1 )); do
-		dirstruct=$(dirname "$1")
+	while (( $# > 1 )); do
+		local dirstruct=$(dirname "$1")
 		mkdir -p "${dest}/${dirstruct}"
 		cp -pPR "$1" "${dest}/${dirstruct}"
 
@@ -38,6 +38,7 @@
 		return $?
 	fi
 
+	local min max step
 	case $# in
 		1) min=1  max=$1 step=1  ;;
 		2) min=$1 max=$2 step=1  ;;






^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-01-04  5:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-22 11:26 [gentoo-commits] gentoo-x86 commit in eclass: portability.eclass Fabian Groffen (grobian)
  -- strict thread matches above, loose matches on Subject: below --
2009-03-27  8:00 Timothy Redaelli (drizzt)
2009-10-31 15:35 Fabian Groffen (grobian)
2010-02-26 18:09 Fabian Groffen (grobian)
2010-09-24  2:22 Mike Frysinger (vapier)
2010-09-24 14:29 Mike Frysinger (vapier)
2012-01-04  5:57 Mike Frysinger (vapier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox