about summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-02-23 00:01:24 +0000
committerLudovic Courtès <ludo@gnu.org>2012-02-23 00:01:24 +0000
commitc6210ec36dbf752d979cb8d842ef7d9bd4d87af7 (patch)
treebbac6ffe91bd86f759ea708817ecb23b577dbca6 /pkgs/servers
parent98cdc2ae35b691e4c739c893b8a6a3d82c2c5233 (diff)
downloadnixlib-c6210ec36dbf752d979cb8d842ef7d9bd4d87af7.tar
nixlib-c6210ec36dbf752d979cb8d842ef7d9bd4d87af7.tar.gz
nixlib-c6210ec36dbf752d979cb8d842ef7d9bd4d87af7.tar.bz2
nixlib-c6210ec36dbf752d979cb8d842ef7d9bd4d87af7.tar.lz
nixlib-c6210ec36dbf752d979cb8d842ef7d9bd4d87af7.tar.xz
nixlib-c6210ec36dbf752d979cb8d842ef7d9bd4d87af7.tar.zst
nixlib-c6210ec36dbf752d979cb8d842ef7d9bd4d87af7.zip
Samba: Fix compilation for GNU/Hurd; add to Hydra.
svn path=/nixpkgs/trunk/; revision=32498
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/samba/default.nix5
-rw-r--r--pkgs/servers/samba/libnss-wins-pthread.patch15
2 files changed, 19 insertions, 1 deletions
diff --git a/pkgs/servers/samba/default.nix b/pkgs/servers/samba/default.nix
index 42d577c55fa8..037fa14491c2 100644
--- a/pkgs/servers/samba/default.nix
+++ b/pkgs/servers/samba/default.nix
@@ -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
diff --git a/pkgs/servers/samba/libnss-wins-pthread.patch b/pkgs/servers/samba/libnss-wins-pthread.patch
new file mode 100644
index 000000000000..63e1485c20dc
--- /dev/null
+++ b/pkgs/servers/samba/libnss-wins-pthread.patch
@@ -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)