summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2005-09-04 18:40:48 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2005-09-04 18:40:48 +0000
commit9b77627c5bfdb95521beb6aa00cc8797218320d1 (patch)
treecab244b64ba86ef78ccb4b9d9a1cf2d87ce44a2b /eclass
parentUpdates from java experimental. (diff)
downloadgentoo-2-9b77627c5bfdb95521beb6aa00cc8797218320d1.tar.gz
gentoo-2-9b77627c5bfdb95521beb6aa00cc8797218320d1.tar.bz2
gentoo-2-9b77627c5bfdb95521beb6aa00cc8797218320d1.zip
Added elibtoolize patch for Gentoo/FreeBSD, to use linux-style link versioning.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ELT-patches/fbsd-conf/1.4.0120
-rw-r--r--eclass/libtool.eclass22
2 files changed, 141 insertions, 1 deletions
diff --git a/eclass/ELT-patches/fbsd-conf/1.4.0 b/eclass/ELT-patches/fbsd-conf/1.4.0
new file mode 100644
index 000000000000..90c63475bcce
--- /dev/null
+++ b/eclass/ELT-patches/fbsd-conf/1.4.0
@@ -0,0 +1,120 @@
+Index: libiconv-1.10/configure
+===================================================================
+--- libiconv-1.10.orig/configure
++++ libiconv-1.10/configure
+@@ -8902,7 +8902,14 @@ kfreebsd*-gnu)
+
+ freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+- version_type=freebsd-$objformat
++ # Gentoo/FreeBSD uses linux-style versioning to be user-friendly.
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -8913,6 +8920,12 @@ freebsd*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+@@ -12620,7 +12633,14 @@ kfreebsd*-gnu)
+
+ freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+- version_type=freebsd-$objformat
++ # Gentoo/FreeBSD uses linux-style versioning to be user-friendly.
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -12631,6 +12651,12 @@ freebsd*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+@@ -15784,7 +15810,14 @@ kfreebsd*-gnu)
+
+ freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+- version_type=freebsd-$objformat
++ # Gentoo/FreeBSD uses linux-style versioning to be user-friendly.
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -15795,6 +15828,12 @@ freebsd*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+@@ -18150,7 +18189,14 @@ kfreebsd*-gnu)
+
+ freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+- version_type=freebsd-$objformat
++ # Gentoo/FreeBSD uses linux-style versioning to be user-friendly.
++ case $host_vendor in
++ gentoo)
++ version_type=linux ;;
++ *)
++ version_type=freebsd-$objformat ;;
++ esac
++
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+@@ -18161,6 +18207,12 @@ freebsd*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
++ linux)
++ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++ soname_spec='${libname}${release}${shared_ext}$major'
++ need_lib_prefix=no
++ need_version=no
++ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
diff --git a/eclass/libtool.eclass b/eclass/libtool.eclass
index d95b82bcc898..13d21c9bebf6 100644
--- a/eclass/libtool.eclass
+++ b/eclass/libtool.eclass
@@ -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/libtool.eclass,v 1.54 2005/09/04 15:15:37 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.55 2005/09/04 18:40:48 flameeyes Exp $
#
# Author: Martin Schlemmer <azarah@gentoo.org>
#
@@ -129,6 +129,9 @@ elibtoolize() {
my_dirlist="$(ELT_find_ltmain_sh)"
+ [[ ${CHOST} == *"-freebsd"* ]] && \
+ elt_patches="${elt_patches} fbsd-conf"
+
for x in "$@" ; do
case "${x}" in
"--portage")
@@ -229,6 +232,18 @@ elibtoolize() {
ret=$?
fi
;;
+ "fbsd-conf")
+ if [[ -e ${x}/configure ]] && \
+ grep 'version_type=freebsd-' "${x}/configure" > /dev/null ; then
+ ELT_walk_patches "${x}/configure" "${y}"
+ ret=$?
+ # ltmain.sh and co might be in a subdirectory ...
+ elif [[ ! -e ${x}/configure && -e ${x}/../configure ]] && \
+ grep 'version_type=freebsd-' "${x}/../configure" > /dev/null ; then
+ ELT_walk_patches "${x}/../configure" "${y}"
+ ret=$?
+ fi
+ ;;
*)
ELT_walk_patches "${x}/ltmain.sh" "${y}"
ret=$?
@@ -275,6 +290,11 @@ elibtoolize() {
[[ ${CHOST} == *"-uclibc" ]] && \
ewarn " uClibc patch set '${y}' failed to apply!"
;;
+ "fbsd-"*)
+ [[ ${CHOST} == *"-freebsd"* ]] && \
+ eerror " FreeBSD patch set '${y}' failed to apply!"
+ die "FreeBSD patch set '${y}' failed to apply!"
+ ;;
esac
fi
done