robbiehanson / CocoaAsyncSocket

Asynchronous socket networking library for Mac and iOS
Other
12.45k stars 3k forks source link

GNUstep consideration #156

Closed xcvista closed 10 years ago

xcvista commented 11 years ago

Can you consider read a little about and incorporate this into GNUstep as well? GNUstep does not have a complete CoreFoundation, but they implemented most of the functions Apple implemented as CoreFoundation-only as extensions of Foundation. Something that may interest you:

1) With GNUstep you can drop libssl dependency - GNUstep Base (Foundation) itself links to it. 2) You can safely (and forced into) drop the Run Loop based ones - GNUstep's Objective-C runtime library, libobjc2 have blocks built in, while if you build it properly it will link against libdispatch (GCD for GNUstep) 3) GNUstep implemented sockets and server streams as GSSocket and GSServerStream, which themselves are Objective-C classes, and more interestingly: 4) GNUstep can be backported to OS X and iOS by building only extensions and link against Apple's runtime and Foundation kit.

xcvista commented 11 years ago

Here is the proper sequence of building the GNUstep trunk version on a Linux box:

1) Build trunk LLVM/clang with cmake. libobjc2 depend on this. 1.1) Optionally after this you can also build libc++ (LLVM's C++11 standard library) and rebuild LLVM/clang with C++11 and libc++, with the freshly-built clang. Install it. 2) Build GNUstep make with clang and install it. 3) Build libobjc2 with cmake and clang. Install it. 4) Make some symlinks, allowing libobjc2 take over what should be libBlocksRuntime (usually lib/libobjc.so -> lib/libBlocksRuntime.so, include/objc/blocks_runtime.h -> include/Block.h and include/objc/blocks_private.h -> include/Block_private.h) 5) Build libdispatch. With previous symlinks, it should build out of the box, and it will link against libobjc2. Install it 6) Rebuild libobjc2, This time it will detect libdispatch and link against it. This will also enable some GCD-based optimisation to be built. Install it. 7) Rebuild GNUstep make. It will now detect the intertwined libobjc2-libdispatch structure and include all needed files. Install it. (this libobjc2-libdispatch structure is somewhat like Apple's libSystem.) 8) Build GNUstep Base. This is what GNUstep team call their Foundation. 9) Build GNUstep GUI. This is their AppKit. 10) Build GNUstep Back. This is essentially the Display PostScript engine. Now you have what is essentially an OpenStep with some modern Cocoa features running on your Linux kernel.