this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Build CoreServices and installer again, compat changes for running mc

+150 -137
+8
cmake/darling_lib.cmake
··· 26 26 set_property(TARGET ${name} APPEND_STRING PROPERTY 27 27 LINK_FLAGS " -Wl,-dylib_install_name,${DYLIB_INSTALL_NAME} ") 28 28 endif (DYLIB_INSTALL_NAME) 29 + if (DYLIB_COMPAT_VERSION) 30 + set_property(TARGET ${name} APPEND_STRING PROPERTY 31 + LINK_FLAGS " -Wl,-compatibility_version,${DYLIB_COMPAT_VERSION} ") 32 + endif (DYLIB_COMPAT_VERSION) 33 + if (DYLIB_CURRENT_VERSION) 34 + set_property(TARGET ${name} APPEND_STRING PROPERTY 35 + LINK_FLAGS " -Wl,-current_version,${DYLIB_CURRENT_VERSION} ") 36 + endif (DYLIB_CURRENT_VERSION) 29 37 30 38 use_ld64(${name}) 31 39 ENDFUNCTION(add_darling_library)
+1 -1
src/AudioUnit/AUComponent.h
··· 1 1 #ifndef AUCOMPONENT_H 2 2 #define AUCOMPONENT_H 3 - #include <CoreServices/MacTypes.h> 3 + #include <MacTypes.h> 4 4 #include <CoreServices/Components.h> 5 5 #include <CoreFoundation/CFString.h> 6 6
+1 -1
src/AudioUnit/AudioUnit.h
··· 1 1 #ifndef AUDIOUNIT_H 2 2 #define AUDIOUNIT_H 3 - #include <CoreServices/MacTypes.h> 3 + #include <MacTypes.h> 4 4 #include <CoreAudio/CoreAudioTypes.h> 5 5 #include "AUComponent.h" 6 6
+26 -29
src/CMakeLists.txt
··· 118 118 add_subdirectory(external/pcre) 119 119 add_subdirectory(external/sqlite) 120 120 add_subdirectory(external/openpam) 121 - #add_subdirectory(CFF) 122 121 #add_subdirectory(SystemConfiguration) 123 - #add_subdirectory(CoreServices) 122 + add_subdirectory(CoreServices) 124 123 #add_subdirectory(ApplicationServices) 125 124 #add_subdirectory(VideoDecodeAcceleration) 126 125 #add_subdirectory(DiskArbitration) ··· 147 146 add_subdirectory(external/libxpc) 148 147 add_subdirectory(external/openssl_certificates) 149 148 150 - if (NOT DARLING_NO_EXECUTABLES) 151 - add_subdirectory(external/shell_cmds) 152 - add_subdirectory(external/file_cmds) 153 - add_subdirectory(external/text_cmds) 154 - add_subdirectory(external/adv_cmds) 155 - # add_subdirectory(external/network_cmds) 156 - add_subdirectory(external/bash) 157 - add_subdirectory(external/less) 158 - add_subdirectory(external/grep) 159 - add_subdirectory(external/awk) 160 - add_subdirectory(external/groff) 161 - add_subdirectory(external/nano) 162 - add_subdirectory(external/man) 163 - add_subdirectory(external/bc) 164 - add_subdirectory(external/zip/zip/zip30) 165 - add_subdirectory(external/zip/unzip/unzip-5.52) 166 - # add_subdirectory(tools) 167 - # add_subdirectory(external/installer) 168 - add_subdirectory(external/gnutar/gnutar) 169 - add_subdirectory(external/gpatch) 170 - add_subdirectory(external/gnudiff) 171 - # add_subdirectory(launchd/src) 172 - # add_subdirectory(launchd/support) 173 - add_subdirectory(external/openssh) 174 - # add_subdirectory(external/top) 175 - # add_subdirectory(external/perl) 176 - endif (NOT DARLING_NO_EXECUTABLES) 149 + add_subdirectory(external/shell_cmds) 150 + add_subdirectory(external/file_cmds) 151 + add_subdirectory(external/text_cmds) 152 + add_subdirectory(external/adv_cmds) 153 + #add_subdirectory(external/network_cmds) 154 + add_subdirectory(external/bash) 155 + add_subdirectory(external/less) 156 + add_subdirectory(external/grep) 157 + add_subdirectory(external/awk) 158 + add_subdirectory(external/groff) 159 + add_subdirectory(external/nano) 160 + add_subdirectory(external/man) 161 + add_subdirectory(external/bc) 162 + add_subdirectory(external/zip/zip/zip30) 163 + add_subdirectory(external/zip/unzip/unzip-5.52) 164 + #add_subdirectory(tools) 165 + add_subdirectory(external/installer) 166 + add_subdirectory(external/gnutar/gnutar) 167 + add_subdirectory(external/gpatch) 168 + add_subdirectory(external/gnudiff) 169 + #add_subdirectory(launchd/src) 170 + #add_subdirectory(launchd/support) 171 + add_subdirectory(external/openssh) 172 + #add_subdirectory(external/top) 173 + #add_subdirectory(external/perl) 177 174 178 175 ###################### 179 176 # libc++ & libc++abi #
+1 -1
src/CoreAudio/CoreAudioTypes.h
··· 1 1 #ifndef COREAUDIOTYPES_H 2 2 #define COREAUDIOTYPES_H 3 - #include <CoreServices/MacTypes.h> 3 + #include <MacTypes.h> 4 4 5 5 struct AudioStreamBasicDescription 6 6 {
+29 -30
src/CoreServices/CMakeLists.txt
··· 5 5 cmake_policy(SET CMP0003 NEW) 6 6 endif(COMMAND cmake_policy) 7 7 8 - #if (NOT "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang") 9 - # message(FATAL_ERROR "Clang is the only supported compiler.") 10 - #endif (NOT "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang") 8 + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -nostdinc -nostdinc++") 11 9 12 - #configure_file(config.h.in config.h) 13 - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -nostdinc -nostdinc++ -ggdb -O0") 14 - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--version-script=${DARLING_TOP_DIRECTORY}/darwin.map -nostdlib -Bsymbolic") 15 - #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fblocks") 16 - 17 - include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 18 - include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) 19 - include_directories(${DARLING_TOP_DIRECTORY}/platform-include) 20 - include_directories(${DARLING_TOP_DIRECTORY}/src/external/libcxx/include) 21 - include_directories(${DARLING_TOP_DIRECTORY}/src/libc/include/FreeBSD) 22 - include_directories(${DARLING_TOP_DIRECTORY}/src/libiconv/include) 23 - include_directories(${DARLING_TOP_DIRECTORY}/src/external/icu/icuSources/common) 24 - include_directories(${DARLING_TOP_DIRECTORY}/src/external/icu/icuSources/i18n) 25 - include_directories(${DARLING_TOP_DIRECTORY}/src/external/corefoundation/Headers) 26 - include_directories(${DARLING_TOP_DIRECTORY}/src/external/foundation/Headers) 27 - include_directories(${CMAKE_BINARY_DIR}/src/external/corefoundation/Headers) 28 - include_directories(${CMAKE_BINARY_DIR}) 29 - # include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../util) 10 + include_directories( 11 + ${CMAKE_CURRENT_SOURCE_DIR} 12 + ${CMAKE_SOURCE_DIR}/src/external/libcxx/include 13 + ${CMAKE_SOURCE_DIR}/src/libc/include/FreeBSD 14 + ${CMAKE_SOURCE_DIR}/src/libiconv/include 15 + ${CMAKE_SOURCE_DIR}/src/external/icu/icuSources/common 16 + ${CMAKE_SOURCE_DIR}/src/external/icu/icuSources/i18n 17 + ${CMAKE_SOURCE_DIR}/src/external/corefoundation 18 + ${CMAKE_SOURCE_DIR}/src/external/foundation/include 19 + ${CMAKE_SOURCE_DIR}/src/external/libclosure 20 + ) 30 21 31 22 set(CoreServices_SRCS 32 23 CoreEndian.cpp ··· 49 40 OpenTransport.cpp 50 41 Timer.cpp 51 42 CoreServicesPriv.cpp 52 - ../external/libcxx/src/dso_handle.c 43 + #../external/libcxx/src/dso_handle.c 53 44 ) 54 45 55 46 if (WITH_COREAUDIO) 56 47 set(EXTRA_LIBS AudioUnit) 57 48 endif (WITH_COREAUDIO) 58 49 59 - SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/darling") 60 - #SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--enable-new-dtags") 61 - SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) 62 - SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) 63 - 64 - add_library(CoreServices SHARED ${CoreServices_SRCS}) 65 - target_link_libraries(CoreServices icucore system ${EXTRA_LIBS} CFF cxx iconv) 50 + set(DYLIB_COMPAT_VERSION "1.0.0") 51 + set(DYLIB_CURRENT_VERSION "1.0.0") 52 + add_framework(CoreServices 53 + FAT 54 + CURRENT_VERSION 55 + VERSION "A" 56 + SOURCES 57 + ${CoreServices_SRCS} 58 + DEPENDENCIES 59 + icucore 60 + system 61 + CoreFoundation 62 + cxx 63 + iconv 64 + ${EXTRA_LIBS} 65 + ) 66 66 67 - install(TARGETS CoreServices DESTINATION "${CMAKE_INSTALL_LIBDIR}/darling") 68 67 install(FILES SystemVersion.plist DESTINATION "libexec/darling/System/Library/CoreServices") 69 68
+5 -3
src/CoreServices/Components.cpp
··· 5 5 #include <AudioUnit/AUComponent.h> 6 6 #include <AudioUnit/AudioUnitBase.h> 7 7 #include <CoreServices/MacErrors.h> 8 - #include <util/debug.h> 8 + 9 + #define TRACE1(x) 10 + #define TRACE2(x,y) 9 11 10 12 Component FindNextComponent(Component prev, ComponentDescription* desc) 11 13 { ··· 59 61 60 62 ComponentInstance OpenComponent(Component comp) 61 63 { 62 - TRACE1(comp); 64 + // TRACE1(comp); 63 65 64 66 ComponentInstance inst; 65 67 OpenAComponent(comp, &inst); ··· 68 70 69 71 OSErr CloseComponent(ComponentInstance inst) 70 72 { 71 - TRACE1(inst); 73 + // TRACE1(inst); 72 74 73 75 delete inst; 74 76 return noErr;
+1 -1
src/CoreServices/Components.h
··· 1 1 #ifndef COMPONENTS_H 2 2 #define COMPONENTS_H 3 - #include <CoreServices/MacTypes.h> 3 + #include <MacTypes.h> 4 4 5 5 #ifdef __cplusplus 6 6 class CarbonComponent;
+12
src/CoreServices/CoreEndian.cpp
··· 62 62 return __builtin_bswap64(value); 63 63 } 64 64 65 + #ifdef __i386__ 66 + template <> long bswap(long value) 67 + { 68 + return __builtin_bswap32(value); 69 + } 70 + 71 + template <> unsigned long bswap(unsigned long value) 72 + { 73 + return __builtin_bswap32(value); 74 + } 75 + #endif 76 + 65 77 template <typename T> T LtoN(T value) 66 78 { 67 79 #if TARGET_RT_LITTLE_ENDIAN
+2 -1
src/CoreServices/CoreEndian.h
··· 19 19 20 20 #ifndef COREENDIAN_H 21 21 #define COREENDIAN_H 22 - #include "MacTypes.h" 22 + #include <MacTypes.h> 23 + #include <stdint.h> 23 24 24 25 #ifdef __cplusplus 25 26 extern "C" {
+33 -2
src/CoreServices/FileManager.cpp
··· 35 35 #include <map> 36 36 #include <regex.h> 37 37 #include <fcntl.h> 38 + #include <vector> 38 39 #include "DateTimeUtils.h" 39 - #include <util/stlutils.h> 40 - #include <util/debug.h> 41 40 #include <errno.h> 41 + 42 + #define STUB() // TODO 42 43 43 44 // Doesn't resolve the last symlink 44 45 // Mallocates a new buffer ··· 47 48 static bool FSRefParamMakePath(const FSRefParam* param, std::string& out); 48 49 // Is the current user member of the specified group? 49 50 static bool hasgid(gid_t gid); 51 + 52 + static bool string_endsWith(const std::string& str, const std::string& what) 53 + { 54 + if (str.size() < what.size()) 55 + return false; 56 + else 57 + return str.compare(str.size()-what.size(), what.size(), what) == 0; 58 + } 59 + 60 + static std::vector<std::string> string_explode(const std::string& str, char delim, bool keepEmpty) 61 + { 62 + std::vector<std::string> rv; 63 + size_t start = 0, end; 64 + 65 + do 66 + { 67 + std::string substr; 68 + 69 + end = str.find(delim, start); 70 + substr = str.substr(start, (end != std::string::npos) ? end-start : std::string::npos); 71 + 72 + if (keepEmpty || !substr.empty()) 73 + rv.push_back(substr); 74 + 75 + start = end+1; 76 + } 77 + while (end != std::string::npos); 78 + 79 + return rv; 80 + } 50 81 51 82 OSStatus FSPathMakeRef(const uint8_t* path, FSRef* fsref, Boolean* isDirectory) 52 83 {
+4 -4
src/CoreServices/LaunchServices.cpp
··· 10 10 #include <unicode/unistr.h> 11 11 #include "UniChar.h" 12 12 13 - extern char** __darwin_environ; 13 + extern char** environ; 14 14 15 15 namespace 16 16 { ··· 102 102 char** orig_env; 103 103 int ret; 104 104 105 - orig_env = __darwin_environ; 106 - __darwin_environ = envp; 105 + orig_env = environ; 106 + environ = envp; 107 107 108 108 ret = execvp(name, argv); 109 109 110 - __darwin_environ = orig_env; 110 + environ = orig_env; 111 111 return ret; 112 112 } 113 113
+4 -4
src/CoreServices/MacLocales.cpp
··· 27 27 #include <cassert> 28 28 #include <string> 29 29 #include <map> 30 - #include "../util/mutex.h" 30 + #include <pthread.h> 31 31 32 32 static std::map<std::string,int> g_mapLocaleString; 33 33 static std::map<int,std::string> g_mapLocaleStringRev; 34 - static Darling::Mutex g_mapLocaleStringMutex; 34 + static pthread_mutex_t g_mapLocaleStringMutex = PTHREAD_MUTEX_INITIALIZER; 35 35 36 36 namespace Darling 37 37 { ··· 43 43 return it->second; 44 44 else 45 45 { 46 - g_mapLocaleStringMutex.lock(); 46 + pthread_mutex_lock(&g_mapLocaleStringMutex); 47 47 size_t id = g_mapLocaleString.size()+1; 48 48 49 49 g_mapLocaleString[str] = id; 50 50 g_mapLocaleStringRev[id] = str; 51 - g_mapLocaleStringMutex.unlock(); 51 + pthread_mutex_unlock(&g_mapLocaleStringMutex); 52 52 53 53 return id; 54 54 }
-56
src/CoreServices/MacTypes.h
··· 1 - #ifndef MACTYPES_H 2 - #define MACTYPES_H 3 - #include <stdint.h> 4 - #include <CoreFoundation/CFBase.h> 5 - 6 - #ifdef __cplusplus 7 - class _StringHandle; 8 - #endif 9 - 10 - #if 0 // declared in CFBase.h 11 - typedef int8_t SInt8; 12 - typedef uint8_t UInt8; 13 - typedef int16_t SInt16; 14 - typedef uint16_t UInt16; 15 - typedef int32_t SInt32; 16 - typedef uint32_t UInt32; 17 - typedef int64_t SInt64; 18 - typedef uint64_t UInt64; 19 - typedef float Float32; 20 - typedef double Float64; 21 - 22 - typedef Fixed* FixedPtr; 23 - typedef Fract* FractPtr; 24 - typedef UnsignedFixed* UnsignedFixedPtr; 25 - typedef short ShortFixed; 26 - typedef ShortFixed * ShortFixedPtr; // 8/8 27 - #endif 28 - //typedef int64_t wide; 29 - //typedef uint64_t UnsignedWide; 30 - //typedef uint64_t AbsoluteTime; 31 - typedef uint8_t Boolean; 32 - 33 - // Pascal strings 34 - typedef unsigned char Str255[256]; 35 - typedef unsigned char Str63[64]; 36 - typedef unsigned char Str32[33]; 37 - typedef unsigned char Str31[32]; 38 - typedef unsigned char Str27[28]; 39 - typedef unsigned char Str15[16]; 40 - 41 - typedef unsigned char* StringPtr; 42 - typedef unsigned char** StringHandle; 43 - typedef char* Ptr; 44 - typedef char** Handle; 45 - 46 - typedef int16_t OSErr; 47 - 48 - enum { 49 - kDurationImmediate = 0, 50 - kDurationForever = 0x7FFFFFFF, 51 - kDurationMillisecond = 1, 52 - kDurationMicrosecond = -1 53 - }; 54 - 55 - #endif 56 -
+2 -1
src/CoreServices/Math64.h
··· 20 20 #ifndef MATH64_H 21 21 #define MATH64_H 22 22 23 - #include "MacTypes.h" 23 + #include <MacTypes.h> 24 + #include <stdint.h> 24 25 25 26 #ifdef __cplusplus 26 27 extern "C" {
+7
src/CoreServices/Multiprocessing.h
··· 6 6 extern "C" { 7 7 #endif 8 8 9 + enum { 10 + kDurationImmediate = 0, 11 + kDurationForever = 0x7FFFFFFF, 12 + kDurationMillisecond = 1, 13 + kDurationMicrosecond = -1 14 + }; 15 + 9 16 typedef void* MPCriticalRegionID; 10 17 11 18 Boolean _MPIsFullyInitialized();
+2 -1
src/CoreServices/OpenTransport.h
··· 1 1 #ifndef OPENTRANSPORT_H 2 2 #define OPENTRANSPORT_H 3 - #include "MacTypes.h" 3 + #include <MacTypes.h> 4 + #include <stdint.h> 4 5 5 6 #ifdef __cplusplus 6 7 extern "C" {
+7 -1
src/CoreServices/Processes.cpp
··· 6 6 #include <fcntl.h> 7 7 #include <dirent.h> 8 8 #include <cstring> 9 - #include <util/debug.h> 10 9 #include <CoreFoundation/CFNumber.h> 11 10 #include <CoreFoundation/CFBundle.h> 11 + #include <stdio.h> 12 + #include <ctype.h> 13 + 14 + #define STUB() // TODO 15 + #ifndef PATH_MAX 16 + # define PATH_MAX 4096 17 + #endif 12 18 13 19 // CFStringRef kCFBundleExecutableKey = CFSTR("kCFBundleExecutableKey"); 14 20 // CFStringRef kCFBundleNameKey = CFSTR("kCFBundleNameKey");
-1
src/CoreServices/UnicodeUtilities.cpp
··· 25 25 #include <cstring> 26 26 #include "UniChar.h" 27 27 #include "MacErrors.h" 28 - #include "util/log.h" 29 28 30 29 namespace Darling 31 30 {
+2
src/libiconv/CMakeLists.txt
··· 51 51 #libcharset/src/relocatable.c 52 52 ) 53 53 54 + set(DYLIB_COMPAT_VERSION "7.0.0") 55 + set(DYLIB_CURRENT_VERSION "7.0.0") 54 56 set(DYLIB_INSTALL_NAME "/usr/lib/libiconv.2.dylib") 55 57 add_darling_library(iconv SHARED ${iconv_SRCS}) 56 58 make_fat(iconv)
+3
src/ncurses/CMakeLists.txt
··· 23 23 -Wno-format-security 24 24 ) 25 25 26 + set(DYLIB_COMPAT_VERSION "5.4.0") 27 + set(DYLIB_CURRENT_VERSION "5.4.0") 28 + 26 29 add_subdirectory(ncurses) 27 30 add_subdirectory(menu) 28 31 add_subdirectory(panel)