prepare sope to build with upcoming libobjc2 update

OK landry@
This commit is contained in:
sebastia 2013-10-19 09:48:22 +00:00
parent cb2bcb0a81
commit 191d19dce5
16 changed files with 287 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.34 2013/08/24 11:09:07 sebastia Exp $
# $OpenBSD: Makefile,v 1.35 2013/10/19 09:48:22 sebastia Exp $
COMMENT-main= Skyrix Object Publishing Environment
COMMENT-mysql= SOPE MySQL adaptor
@ -9,6 +9,9 @@ DISTNAME = SOPE-${VERSION}
PKGNAME-main = sope-${VERSION}
PKGNAME-mysql = sope-mysql-${VERSION}
PKGNAME-postgres = sope-postgres-${VERSION}
REVISION-main = 0
REVISION-mysql = 0
REVISION-postgres = 0
SO_MAJOR= 2
SO_MINOR= 0

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-sope-appserver_NGObjWeb_DynamicElements_WOComponentContent_m,v 1.1 2013/10/19 09:48:22 sebastia Exp $
fix build with libobjc2-1.7
--- sope-appserver/NGObjWeb/DynamicElements/WOComponentContent.m.orig Sun Oct 13 16:59:47 2013
+++ sope-appserver/NGObjWeb/DynamicElements/WOComponentContent.m Sun Oct 13 17:00:20 2013
@@ -75,11 +75,7 @@ static Class NSDateClass = Nil;
printf(" ");
printf("content: [%s %s]: %0.3fs\n",
[[component name] cString],
-#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
- sel_getName(_cmd),
-#else
sel_get_name(_cmd),
-#endif
diff);
}

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-sope-appserver_NGObjWeb_DynamicElements_decommon_h,v 1.1 2013/10/19 09:48:22 sebastia Exp $
fix build with libobjc2-1.7
--- sope-appserver/NGObjWeb/DynamicElements/decommon.h.orig Mon Jul 22 15:03:07 2013
+++ sope-appserver/NGObjWeb/DynamicElements/decommon.h Sun Oct 13 17:48:51 2013
@@ -35,6 +35,10 @@
@end
#endif
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
+# define sel_get_name(__XXX__) sel_getName(__XXX__)
+#endif
+
#include <NGExtensions/NGExtensions.h>
#include "WOResponse+private.h"
#include <NGObjWeb/WOContext.h>

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-sope-appserver_NGObjWeb_NSObject+WO_m,v 1.1 2013/10/19 09:48:23 sebastia Exp $
fix for build with libobjc2-1.7
patch from David Chisnall
--- sope-appserver/NGObjWeb/NSObject+WO.m.orig Thu Oct 17 12:25:53 2013
+++ sope-appserver/NGObjWeb/NSObject+WO.m Thu Oct 17 12:25:53 2013
@@ -259,7 +259,7 @@ IMP WOGetKVCGetMethod(id object, NSString *_key) {
if (object == nil) return NULL;
if (_key == nil) return NULL;
-#if GNU_RUNTIME && !(defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911))
+#if GNU_RUNTIME && !(defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) && !defined(__GNUSTEP_RUNTIME__)
{
unsigned keyLen;
char *buf;
@@ -313,7 +313,9 @@ id WOGetKVCValueUsingMethod(id object, NSString *_key)
return nil;
free(buf); buf = NULL;
}
-#if GNUSTEP_BASE_LIBRARY
+// This appears to be a work around for an old version of GNUstep-base not
+// correctly handling the case where there is no method.
+#if GNUSTEP_BASE_LIBRARY && !defined(__GNUSTEP_RUNTIME__)
if (!__objc_responds_to(object, getSel))
return nil;
#endif

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-sope-appserver_NGObjWeb_WOSession_m,v 1.1 2013/10/19 09:48:23 sebastia Exp $
fix build with libobc2-1.7
--- sope-appserver/NGObjWeb/WOSession.m.orig Sun Oct 13 16:36:40 2013
+++ sope-appserver/NGObjWeb/WOSession.m Sun Oct 13 16:36:51 2013
@@ -33,10 +33,6 @@
#include "common.h"
#include <string.h>
-#if !defined(sel_get_name) && ((defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__))
-# define sel_get_name sel_getName
-#endif
-
#if APPLE_FOUNDATION_LIBRARY || NeXT_Foundation_LIBRARY
@interface NSObject(Miss)
- (id)notImplemented:(SEL)cmd;

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-sope-appserver_NGObjWeb_common_h,v 1.1 2013/10/19 09:48:23 sebastia Exp $
fix for build with libobjc2-1.7
--- sope-appserver/NGObjWeb/common.h.orig Sun Oct 13 10:18:46 2013
+++ sope-appserver/NGObjWeb/common.h Sun Oct 13 10:24:47 2013
@@ -51,11 +51,15 @@
#include <NGExtensions/NGLogging.h>
#include <NGStreams/NGStreams.h>
-#if NeXT_RUNTIME || APPLE_RUNTIME || (__GNU_LIBOBJC__ >= 20100911)
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
# ifndef sel_get_name
# define sel_get_name(__XXX__) sel_getName(__XXX__)
# define sel_get_any_uid(__XXX__) sel_getUid(__XXX__)
# endif
+#endif
+
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
+# define sel_get_uid(__XXX__) sel_getUid(__XXX__);
#endif
#define IS_DEPRECATED \

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-sope-core_EOControl_EOKeyValueCoding_m,v 1.1 2013/10/19 09:48:23 sebastia Exp $
fix build with libobjc2-1.7
--- sope-core/EOControl/EOKeyValueCoding.m.orig Sun Oct 13 15:46:37 2013
+++ sope-core/EOControl/EOKeyValueCoding.m Sun Oct 13 15:46:47 2013
@@ -26,7 +26,6 @@
#if GNU_RUNTIME
#if __GNU_LIBOBJC__ >= 20100911
-# define sel_get_any_uid sel_getUid
# include <objc/runtime.h>
#else
# include <objc/encoding.h>

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-sope-core_EOControl_EOSortOrdering_m,v 1.1 2013/10/19 09:48:23 sebastia Exp $
fix build with libobjc2-1.7
--- sope-core/EOControl/EOSortOrdering.m.orig Sun Oct 13 15:43:30 2013
+++ sope-core/EOControl/EOSortOrdering.m Sun Oct 13 15:43:55 2013
@@ -28,14 +28,6 @@
# include <objc/objc.h>
#endif
-#ifndef SEL_EQ
-# if GNU_RUNTIME
-# define SEL_EQ(sel1,sel2) sel_eq(sel1,sel2)
-# else
-# define SEL_EQ(sel1,sel2) (sel1 == sel2)
-# endif
-#endif
-
@implementation EOSortOrdering
/*"
This class specifies a sort-ordering as used with
@@ -83,7 +75,7 @@
/* equality */
- (BOOL)isEqualToSortOrdering:(EOSortOrdering *)_sortOrdering {
- if (!SEL_EQ([_sortOrdering selector], [self selector]))
+ if (!sel_eq([_sortOrdering selector], [self selector]))
return NO;
if (![[_sortOrdering key] isEqualToString:[self key]])
return NO;

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-sope-core_EOControl_EOValidation_m,v 1.1 2013/10/19 09:48:23 sebastia Exp $
fix build with libobjc2-1.7
--- sope-core/EOControl/EOValidation.m.orig Sun Oct 13 15:44:43 2013
+++ sope-core/EOControl/EOValidation.m Sun Oct 13 15:45:01 2013
@@ -24,10 +24,6 @@
#include "EONull.h"
#include "common.h"
-#if __GNU_LIBOBJC__ >= 20100911
-# define sel_get_any_uid sel_getUid
-#endif
-
#if !LIB_FOUNDATION_LIBRARY
@interface NSException(UsedSetUI) /* does Jaguar allow -setUserInfo: ? */

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-sope-core_EOControl_common_h,v 1.1 2013/10/19 09:48:23 sebastia Exp $
fix build with libobjc2-1.7
--- sope-core/EOControl/common.h.orig Sun Oct 13 15:55:39 2013
+++ sope-core/EOControl/common.h Sun Oct 13 15:55:43 2013
@@ -39,10 +39,11 @@
# endif
#endif
-#if __GNU_LIBOBJC__ >= 20100911
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
# ifndef sel_eq
# define sel_eq(__A__,__B__) sel_isEqual(__A__,__B__)
# endif
+# define sel_get_any_uid(__XXX__) sel_getUid(__XXX__)
#endif
#ifndef ASSIGN

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-sope-core_NGExtensions_EOExt_subproj_EOQualifier+CtxEval_m,v 1.1 2013/10/19 09:48:23 sebastia Exp $
fix build with libobjc2-1.7
--- sope-core/NGExtensions/EOExt.subproj/EOQualifier+CtxEval.m.orig Sun Oct 13 18:08:20 2013
+++ sope-core/NGExtensions/EOExt.subproj/EOQualifier+CtxEval.m Sun Oct 13 18:10:08 2013
@@ -29,7 +29,7 @@
# import <objc/objc.h>
# import <extensions/objc-runtime.h>
#elif GNUSTEP_BASE_LIBRARY
-#if __GNU_LIBOBJC__ >= 20100911
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(__GNUSTEP_RUNTIME__)
# define sel_get_name sel_getName
# import <objc/runtime.h>
#else

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-sope-core_NGStreams_NGStreamCoder_m,v 1.1 2013/10/19 09:48:23 sebastia Exp $
fix build with libobjc2-1.7
--- sope-core/NGStreams/NGStreamCoder.m.orig Sun Oct 13 18:10:47 2013
+++ sope-core/NGStreams/NGStreamCoder.m Sun Oct 13 18:11:35 2013
@@ -28,6 +28,10 @@
# include <objc/objc-class.h>
#endif
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
+# define sel_get_name(__XXX__) sel_getName(__XXX__)
+#endif
+
#define FINAL static inline
extern id nil_method(id, SEL, ...);

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-sope-gdl1_GDLAccess_common_h,v 1.1 2013/10/19 09:48:23 sebastia Exp $
fix building with libobjc2-1.7
--- sope-gdl1/GDLAccess/common.h.orig Sun Oct 13 18:16:32 2013
+++ sope-gdl1/GDLAccess/common.h Sun Oct 13 18:17:48 2013
@@ -55,7 +55,7 @@
# endif
#endif
-#if __GNU_LIBOBJC__ >= 20100911
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(__GNUSTEP_RUNTIME__)
# define sel_eq(__A__,__B__) sel_isEqual(__A__,__B__)
# ifndef SEL_EQ
# define SEL_EQ(__A__,__B__) sel_isEqual(__A__,__B__)

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-sope-ldap_NGLdap_EOQualifier+LDAP_m,v 1.1 2013/10/19 09:48:23 sebastia Exp $
fix build with libobjc2-1.7
--- sope-ldap/NGLdap/EOQualifier+LDAP.m.orig Sun Oct 13 19:19:03 2013
+++ sope-ldap/NGLdap/EOQualifier+LDAP.m Sun Oct 13 19:19:33 2013
@@ -26,7 +26,7 @@
#define sel_eq(sel1, sel2) ((sel1)) == ((sel2))
#endif
-#if __GNU_LIBOBJC__ >= 20100911
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
# define sel_eq(__A__,__B__) sel_isEqual(__A__,__B__)
#endif

View File

@ -0,0 +1,22 @@
$OpenBSD: patch-sope-mime_NGImap4_imCommon_h,v 1.1 2013/10/19 09:48:23 sebastia Exp $
fix build with libobjc2-1.7
--- sope-mime/NGImap4/imCommon.h.orig Sun Oct 13 16:21:42 2013
+++ sope-mime/NGImap4/imCommon.h Sun Oct 13 16:22:35 2013
@@ -37,13 +37,13 @@
#include <NGMime/NGMime.h>
#include <NGMail/NGMail.h>
-#if NeXT_RUNTIME || APPLE_RUNTIME
+#if NeXT_RUNTIME
# ifndef sel_eq
# define sel_eq(__A__,__B__) (__A__==__B__)
# endif
#endif
-#if __GNU_LIBOBJC__ >= 20100911
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
# ifndef sel_eq
# define sel_eq(__A__,__B__) sel_isEqual(__A__,__B__)
# endif

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-sope-mime_NGMime_common_h,v 1.1 2013/10/19 09:48:24 sebastia Exp $
fix build with libobjc2-1.7
--- sope-mime/NGMime/common.h.orig Sun Oct 13 16:18:04 2013
+++ sope-mime/NGMime/common.h Sun Oct 13 16:21:27 2013
@@ -37,7 +37,9 @@
#include "NGMimeType.h"
#if !GNU_RUNTIME
-# ifndef sel_eq
+# if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
+# define sel_eq(__A__,__B__) sel_isEqual(__A__,__B__)
+# else ifndef sel_eq
# define sel_eq(__A__, __B__) (__A__==__B__)
# endif
#endif