samba3: remove rpc support, fix various compile errors
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 28 Feb 2011 00:52:11 +0000 (00:52 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 28 Feb 2011 00:52:11 +0000 (00:52 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@25783 3c298f89-4303-0410-b956-a3cf2f4a3e73

net/samba3/Makefile
net/samba3/patches/170-no_rpc.patch [new file with mode: 0644]
net/samba3/patches/180-fix_duplicate_define.patch [new file with mode: 0644]

index 3ff3ec5..672a820 100644 (file)
@@ -41,12 +41,20 @@ define Package/samba3/config
 endef
 
 define Build/Prepare/LFS
-       cat ./files/config-lfs.h >> $(PKG_BUILD_DIR)/source/include/config.h
 endef
 
 define Build/Prepare
 $(call Build/Prepare/Default)
-$(call Build/Prepare/LFS)
+endef
+
+define Build/Configure
+       [ -f "$(PKG_BUILD_DIR)/source/include/config.h.save" ] || \
+               $(CP) $(PKG_BUILD_DIR)/source/include/config.h \
+                       $(PKG_BUILD_DIR)/source/include/config.h.save
+       cat \
+               $(PKG_BUILD_DIR)/source/include/config.h.save \
+               ./files/config-lfs.h >> $(PKG_BUILD_DIR)/source/include/config.h
+       $(Build/Configure/Default)
 endef
 
 define Build/Compile
@@ -55,6 +63,7 @@ define Build/Compile
        CPPFLAGS="$(TARGET_CPPFLAGS)" \
        LDFLAGS="$(TARGET_LDFLAGS)" \
        $(MAKE) -C $(PKG_BUILD_DIR)/source \
+               $(TARGET_CONFIGURE_OPTS) \
                all bin/smbpasswd
 endef
 
diff --git a/net/samba3/patches/170-no_rpc.patch b/net/samba3/patches/170-no_rpc.patch
new file mode 100644 (file)
index 0000000..ae1d6c7
--- /dev/null
@@ -0,0 +1,28 @@
+--- a/source/include/config.h
++++ b/source/include/config.h
+@@ -986,13 +986,13 @@
+ /* #undef HAVE_ROOT */
+ /* Define to 1 if you have the <rpcsvc/nis.h> header file. */
+-#define HAVE_RPCSVC_NIS_H 1
++/* #define HAVE_RPCSVC_NIS_H 1 */
+ /* Define to 1 if you have the <rpcsvc/ypclnt.h> header file. */
+-#define HAVE_RPCSVC_YPCLNT_H 1
++/* #define HAVE_RPCSVC_YPCLNT_H 1 */
+ /* Define to 1 if you have the <rpcsvc/yp_prot.h> header file. */
+-#define HAVE_RPCSVC_YP_PROT_H 1
++/* #define HAVE_RPCSVC_YP_PROT_H 1 */
+ /* Whether there is a conflicting AUTH_ERROR define in rpc/rpc.h */
+ /* #undef HAVE_RPC_AUTH_ERROR_CONFLICT */
+@@ -1001,7 +1001,7 @@
+ /* #undef HAVE_RPC_NETTYPE_H */
+ /* Define to 1 if you have the <rpc/rpc.h> header file. */
+-#define HAVE_RPC_RPC_H 1
++/* #define HAVE_RPC_RPC_H 1 */
+ /* Whether mkstemp is secure */
+ #define HAVE_SECURE_MKSTEMP 1
diff --git a/net/samba3/patches/180-fix_duplicate_define.patch b/net/samba3/patches/180-fix_duplicate_define.patch
new file mode 100644 (file)
index 0000000..e436226
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/source/include/config.h
++++ b/source/include/config.h
+@@ -1848,8 +1848,7 @@
+ #define SIZEOF_LONG 4
+ /* The size of the 'off_t' type */
+-/* AR7 #define SIZEOF_OFF_T 8 */
+-#define SIZEOF_OFF_T 4 /* AR7 */
++/* #define SIZEOF_OFF_T 8 */
+ /* The size of a `short', as computed by sizeof. */
+ #define SIZEOF_SHORT 2