Wed Oct 28 09:25:23 2009 UTC ()
Fix building on Darwin; allow custom compiler and linker flags; allow universal binary.


(adam)
diff -r1.9 -r1.10 pkgsrc/textproc/xmlrpc-c/Makefile
diff -r1.7 -r1.8 pkgsrc/textproc/xmlrpc-c/distinfo
diff -r0 -r1.3 pkgsrc/textproc/xmlrpc-c/patches/patch-aa
diff -r0 -r1.3 pkgsrc/textproc/xmlrpc-c/patches/patch-ac
diff -r1.6 -r1.7 pkgsrc/textproc/xmlrpc-c/patches/patch-ab

cvs diff -r1.9 -r1.10 pkgsrc/textproc/xmlrpc-c/Makefile (expand / switch to context diff)
--- pkgsrc/textproc/xmlrpc-c/Makefile 2009/10/27 18:50:38 1.9
+++ pkgsrc/textproc/xmlrpc-c/Makefile 2009/10/28 09:25:23 1.10
@@ -1,5 +1,4 @@
-# $NetBSD: Makefile,v 1.9 2009/10/27 18:50:38 drochner Exp $
-#
+# $NetBSD: Makefile,v 1.10 2009/10/28 09:25:23 adam Exp $
 
 DISTNAME=	xmlrpc-c-1.06.38
 CATEGORIES=	textproc devel
@@ -13,14 +12,17 @@
 PKG_DESTDIR_SUPPORT=	user-destdir
 
 # Sometimes can't open ../xmltok/libxmlrpc_xmltok.la
-MAKE_JOBS_SAFE=	no
+MAKE_JOBS_SAFE=		no
 
-GNU_CONFIGURE=	yes
-USE_LIBTOOL=	yes
-USE_LANGUAGES=	c99 c++
-USE_TOOLS+=	gmake
-MAKE_FILE=	GNUmakefile
-TEST_TARGET=	check
+USE_LANGUAGES=		c99 c++
+USE_LIBTOOL=		yes
+USE_TOOLS+=		gmake
+GNU_CONFIGURE=		yes
+MAKE_FILE=		GNUmakefile
+MAKE_ENV=		CFLAGS_COMMON=${CFLAGS:M*:Q}
+MAKE_ENV+=		CXXFLAGS_COMMON=${CXXFLAGS:M*:Q}
+MAKE_ENV+=		LADD=${LDFLAGS:M*:Q}
+TEST_TARGET=		check
 
 SUBST_CLASSES+=	pthread
 SUBST_FILES.pthread=	xmlrpc-c-config.in xmlrpc-c-config.test.in

cvs diff -r1.7 -r1.8 pkgsrc/textproc/xmlrpc-c/distinfo (expand / switch to context diff)
--- pkgsrc/textproc/xmlrpc-c/distinfo 2009/10/27 18:50:39 1.7
+++ pkgsrc/textproc/xmlrpc-c/distinfo 2009/10/28 09:25:23 1.8
@@ -1,9 +1,11 @@
-$NetBSD: distinfo,v 1.7 2009/10/27 18:50:39 drochner Exp $
+$NetBSD: distinfo,v 1.8 2009/10/28 09:25:23 adam Exp $
 
 SHA1 (xmlrpc-c-1.06.38.tgz) = 40332f0f363b9ca79242b28d4cbf13516702dacf
 RMD160 (xmlrpc-c-1.06.38.tgz) = 8d9f85a1b1be91fdc5c8aaab5571d0270ddbdf67
 Size (xmlrpc-c-1.06.38.tgz) = 702092 bytes
-SHA1 (patch-ab) = 711dfddb63089948008becbddbe1484f5124b374
+SHA1 (patch-aa) = 6dc9755b4e883cd55d8914761887fb3cbfff0ef1
+SHA1 (patch-ab) = 34dd91b43385fa4a4893375dc774e0865a79b8fa
+SHA1 (patch-ac) = e553e66662aca6d7c246acc24e960074213320c6
 SHA1 (patch-ae) = 0e56c03e8066bfeb4e9a6330ee160d1ab1d68a11
 SHA1 (patch-af) = fdeabde63338443459d96aca657a3fc402b9fbc4
 SHA1 (patch-ah) = 55558998059c502f46a2bd9141ede7182df0753b

File Added: pkgsrc/textproc/xmlrpc-c/patches/Attic/patch-aa
$NetBSD: patch-aa,v 1.3 2009/10/28 09:25:23 adam Exp $

--- Makefile.common.orig	2007-07-13 02:32:20.000000000 +0200
+++ Makefile.common
@@ -28,15 +28,15 @@ GCC_CXX_WARNINGS = $(GCC_WARNINGS) -Wove
 # assertion and crash the program if it isn't really true.  You can add
 # -UNDEBUG (in any of various ways) to override this.
 #
-CFLAGS_COMMON = -DNDEBUG
-CXXFLAGS_COMMON = -DNDEBUG
+CFLAGS_COMMON += -DNDEBUG
+CXXFLAGS_COMMON += -DNDEBUG
 
 ifeq ($(C_COMPILER_GNU),yes)
-  CFLAGS_COMMON += $(GCC_C_WARNINGS) -fno-common -g -O3
+  CFLAGS_COMMON += $(GCC_C_WARNINGS) -fno-common
 endif
 
 ifeq ($(CXX_COMPILER_GNU),yes)
-  CXXFLAGS_COMMON += $(GCC_CXX_WARNINGS) -g
+  CXXFLAGS_COMMON += $(GCC_CXX_WARNINGS)
 endif
 
 DISTDIR = $(BUILDDIR)/$(PACKAGE)-$(VERSION)/$(SUBDIR)

File Added: pkgsrc/textproc/xmlrpc-c/patches/Attic/patch-ac
$NetBSD: patch-ac,v 1.3 2009/10/28 09:25:23 adam Exp $

--- src/cpp/Makefile.orig	2009-08-30 17:43:48.000000000 +0200
+++ src/cpp/Makefile
@@ -139,7 +139,7 @@ libxmlrpc_client++.a: $(LIBXMLRPC_CLIENT
 #  RULES TO COMPILE OBJECT MODULES FOR LIBRARIES
 #-----------------------------------------------------------------------------
 
-CXXFLAGS = $(CXXFLAGS_COMMON) $(CFLAGS_PERSONAL) $(CADD)
+CXXFLAGS = $(CXXFLAGS_COMMON) $(CFLAGS_SHLIB) $(CFLAGS_PERSONAL) $(CADD)
 
 XmlRpcCpp.o:%.o:%.cpp
 	$(CXX) -c $(BASIC_INCLUDES) $(CXXFLAGS) $<

cvs diff -r1.6 -r1.7 pkgsrc/textproc/xmlrpc-c/patches/Attic/patch-ab (expand / switch to context diff)
--- pkgsrc/textproc/xmlrpc-c/patches/Attic/patch-ab 2009/10/27 18:50:39 1.6
+++ pkgsrc/textproc/xmlrpc-c/patches/Attic/patch-ab 2009/10/28 09:25:23 1.7
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.6 2009/10/27 18:50:39 drochner Exp $
+$NetBSD: patch-ab,v 1.7 2009/10/28 09:25:23 adam Exp $
 
 --- Makefile.config.in.orig	2008-03-25 15:24:58.000000000 +0100
 +++ Makefile.config.in
@@ -18,7 +18,7 @@
  ifeq ($(HOST_OS),aix)
    # This code is not finished; that's why we don't set SHARED_LIB_TYPE.
    # If you can finish it and make it work on AIX, please do.
-@@ -188,11 +197,30 @@ ifeq ($(HOST_OS),osf)
+@@ -188,17 +197,36 @@ ifeq ($(HOST_OS),osf)
  endif
  
  ifeq ($(findstring netbsd,$(HOST_OS)),netbsd)
@@ -53,3 +53,10 @@
  endif
  
  ifeq ($(HOST_OS),darwin)
+   # This code is not finished; that's why we don't set SHARED_LIB_TYPE.
+   # If you can finish it and make it work on AIX, please do.
+-  # SHARED_LIB_TYPE = dylib
++  SHARED_LIB_TYPE = dylib
+   SHLIB_SUFFIX = dylib
+ endif
+