Samba: Fix compilation for GNU/Hurd; add to Hydra.

svn path=/nixpkgs/trunk/; revision=32498
This commit is contained in:
Ludovic Courtès 2012-02-23 00:01:24 +00:00
parent 98cdc2ae35
commit c6210ec36d
3 changed files with 20 additions and 1 deletions

View File

@ -28,6 +28,9 @@ stdenv.mkDerivation rec {
patches =
[ # Fix for https://bugzilla.samba.org/show_bug.cgi?id=8541.
./readlink.patch
# Allow cross-builds for GNU/Hurd.
./libnss-wins-pthread.patch
];
buildInputs = [ readline pam openldap popt iniparser libunwind fam acl cups ]
@ -39,7 +42,7 @@ stdenv.mkDerivation rec {
# XXX: Awful hack to allow cross-compilation.
'' sed -i source3/configure \
-e 's/^as_fn_error \("cannot run test program while cross compiling\)/$as_echo \1/g'
'';
''; # "
preConfigure =
'' cd source3

View File

@ -0,0 +1,15 @@
`libnss_wins' uses pthreads but is built without `-pthread'. This is
not a problem when building natively on GNU/Linux, but causes troubles
when cross-building for GNU/Hurd (undefined references to libpthread
functions.)
--- samba-3.6.1/source3/Makefile.in 2012-02-22 15:25:15.000000000 +0100
+++ samba-3.6.1/source3/Makefile.in 2012-02-22 15:25:47.000000000 +0100
@@ -2760,6 +2760,7 @@ bin/vlp@EXEEXT@: $(BINARY_PREREQS) $(VLP
@echo "Linking $@"
@$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_WINS_NSS_OBJ) \
$(LDAP_LIBS) $(KRB5LIBS) $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS) \
+ $(PTHREAD_LDFLAGS) \
@SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@
bin/winbind_krb5_locator.@SHLIBEXT@: $(BINARY_PREREQS) $(WINBIND_KRB5_LOCATOR_OBJ) $(LIBWBCLIENT)

View File

@ -205,6 +205,7 @@ in {
nixUnstable.hostDrv = nativePlatforms;
openssl.hostDrv = nativePlatforms; # dependency of Nix
patch.hostDrv = nativePlatforms;
samba_light.hostDrv = nativePlatforms; # needed for `runInGenericVM'
zile.hostDrv = nativePlatforms;
};
}) // (