--- freebsd-lib-6.2-r2.ebuild 2007-09-14 01:50:40 -0600 +++ freebsd-lib-6.2-r3.ebuild 2007-09-24 19:49:27 -0600 @@ -8,7 +8,7 @@ SLOT="6.0" KEYWORDS="~sparc-fbsd ~x86-fbsd" -IUSE="atm bluetooth ssl ipv6 kerberos nis gpib build bootstrap" +IUSE="atm bluetooth ssl ipv6 kerberos nis gpib build bootstrap crosscompile_opts_headers-only" # Crypto is needed to have an internal OpenSSL header # sys is needed for libalias, probably we can just extract that instead of @@ -66,7 +66,7 @@ use nis || mymakeopts="${mymakeopts} NO_NIS= " use gpib || mymakeopts="${mymakeopts} NO_GPIB= " - mymakeopts="${mymakeopts} NO_OPENSSH= NO_BIND= NO_SENDMAIL= " + mymakeopts="${mymakeopts} NO_OPENSSH= NO_BIND= NO_SENDMAIL= NO_LIBC_R= NO_LIBPTHREAD=" if [[ ${CTARGET} != ${CHOST} ]]; then mymakeopts="${mymakeopts} MACHINE=$(tc-arch-kernel ${CTARGET})" @@ -245,6 +245,17 @@ mkinstall || die "Install failed" fi + # Add symlinks (-> libthr) for legacy threading libraries, since these are + # not built for two reasons: + # 1) Symbols from multiple threading libraries can get mixed, even though + # libmap.conf remaps them, causing insidious bugs and crashes. + # 2) FreeBSD 7.0-CURRENT uses symlinks in a similar manner, since libthr + # has been adopted as the default threading library. + dosym libthr.a /usr/lib/libpthread.a + dosym libthr.so /usr/lib/libpthread.so + dosym libthr.a /usr/lib/libc_r.a + dosym libthr.so /usr/lib/libc_r.so + # Don't install the rest of the configuration files if crosscompiling [[ ${CTARGET} != ${CHOST} ]] && return 0