diff -uNr rstudio-0.99.902.orig/CMakeGlobals.txt rstudio-0.99.902/CMakeGlobals.txt
--- rstudio-0.99.902.orig/CMakeGlobals.txt	2016-05-11 12:03:49.000000000 -0400
+++ rstudio-0.99.902/CMakeGlobals.txt	2016-06-16 12:12:39.000000000 -0400
@@ -15,18 +15,18 @@
 
 # version info
 if ("$ENV{RSTUDIO_VERSION_MAJOR}" STREQUAL "")
-  set(CPACK_PACKAGE_VERSION_MAJOR "99")
+  set(CPACK_PACKAGE_VERSION_MAJOR "0")
   set(RSTUDIO_UNVERSIONED_BUILD TRUE)
 else()
   set(CPACK_PACKAGE_VERSION_MAJOR $ENV{RSTUDIO_VERSION_MAJOR})
 endif()
 if ("$ENV{RSTUDIO_VERSION_MINOR}" STREQUAL "")
-  set(CPACK_PACKAGE_VERSION_MINOR "9")
+  set(CPACK_PACKAGE_VERSION_MINOR "@MAJOR@")
 else()
   set(CPACK_PACKAGE_VERSION_MINOR $ENV{RSTUDIO_VERSION_MINOR})
 endif()
 if ("$ENV{RSTUDIO_VERSION_PATCH}" STREQUAL "")
-  set(CPACK_PACKAGE_VERSION_PATCH "9")
+  set(CPACK_PACKAGE_VERSION_PATCH "@MINOR@")
 else()
   set(CPACK_PACKAGE_VERSION_PATCH $ENV{RSTUDIO_VERSION_PATCH})
 endif()
diff -uNr rstudio-0.99.902.orig/cmake/modules/FindLibR.cmake rstudio-0.99.902/cmake/modules/FindLibR.cmake
--- rstudio-0.99.902.orig/cmake/modules/FindLibR.cmake	2016-05-11 12:03:49.000000000 -0400
+++ rstudio-0.99.902/cmake/modules/FindLibR.cmake	2016-06-16 12:12:39.000000000 -0400
@@ -22,7 +22,7 @@
 
    find_library(LIBR_LIBRARIES R)
    if(LIBR_LIBRARIES)
-      set(LIBR_HOME "${LIBR_LIBRARIES}/Resources" CACHE PATH "R home directory")
+      set(LIBR_HOME "@PREFIX@/Library/Frameworks/R.framework/Versions/@FINK_RVERSION@/Resources" CACHE PATH "R home directory")
       set(LIBR_INCLUDE_DIRS "${LIBR_HOME}/include" CACHE PATH "R include directory")
       set(LIBR_DOC_DIR "${LIBR_HOME}/doc" CACHE PATH "R doc directory")
       set(LIBR_EXECUTABLE "${LIBR_HOME}/R" CACHE PATH "R executable")
diff -uNr rstudio-0.99.902.orig/src/cpp/CMakeLists.txt rstudio-0.99.902/src/cpp/CMakeLists.txt
--- rstudio-0.99.902.orig/src/cpp/CMakeLists.txt	2016-05-11 12:03:49.000000000 -0400
+++ rstudio-0.99.902/src/cpp/CMakeLists.txt	2016-06-16 12:12:39.000000000 -0400
@@ -115,7 +115,9 @@
 # unless we are building a non-packaged build on linux (in which case
 # boost dynamic libraries are presumed to be installed on the system ldpath)
 if(APPLE OR WIN32 OR RSTUDIO_PACKAGE_BUILD)
-   set(Boost_USE_STATIC_LIBS ON)
+# not for fink...
+#   set(Boost_USE_STATIC_LIBS ON)
+# ...bloats the build and fink no longer supplies most static libs
 endif()
 
 # require boost 1.50
diff -uNr rstudio-0.99.902.orig/src/cpp/core/CMakeLists.txt rstudio-0.99.902/src/cpp/core/CMakeLists.txt
--- rstudio-0.99.902.orig/src/cpp/core/CMakeLists.txt	2016-05-11 12:03:49.000000000 -0400
+++ rstudio-0.99.902/src/cpp/core/CMakeLists.txt	2016-06-16 12:12:39.000000000 -0400
@@ -177,22 +177,14 @@
 
    # handle El Capitan moving OpenSSL away
    if(APPLE)
-      if(${MACOSX_VERSION} VERSION_GREATER "10.10"
-            AND EXISTS "/usr/local/opt/openssl")
-   
          set(CORE_SYSTEM_LIBRARIES
             ${CORE_SYSTEM_LIBRARIES}
-            -lssl -lcrypto)
+            @PREFIX@/lib/libssl.dylib @PREFIX@/lib/libcrypto.dylib)
    
          set(CORE_INCLUDE_DIRS
             ${CORE_INCLUDE_DIRS}
-            /usr/local/opt/openssl/include)
+            @PREFIX@/include)
 
-         if(NOT DEFINED OPENSSL_ROOT_DIR)
-            set(OPENSSL_ROOT_DIR
-               /usr/local/opt/openssl)
-         endif()
-      endif()
    endif()
 
    if(RSTUDIO_SERVER)
diff -uNr rstudio-0.99.902.orig/src/cpp/core/r_util/REnvironmentPosix.cpp rstudio-0.99.902/src/cpp/core/r_util/REnvironmentPosix.cpp
--- rstudio-0.99.902.orig/src/cpp/core/r_util/REnvironmentPosix.cpp	2016-05-11 12:03:49.000000000 -0400
+++ rstudio-0.99.902/src/cpp/core/r_util/REnvironmentPosix.cpp	2016-06-16 12:12:39.000000000 -0400
@@ -86,10 +86,7 @@
 {
    // define potential paths
    std::vector<std::string> rScriptPaths;
-   rScriptPaths.push_back("/usr/bin/R");
-   rScriptPaths.push_back("/usr/local/bin/R");
-   rScriptPaths.push_back("/opt/local/bin/R");
-   rScriptPaths.push_back("/Library/Frameworks/R.framework/Resources/bin/R");
+   rScriptPaths.push_back("@PREFIX@/Library/Frameworks/R.framework/Versions/@FINK_RVERSION@/Resources/bin/R");
    return scanForRScript(rScriptPaths, pErrMsg);
 }
 
@@ -149,7 +146,7 @@
                                     std::string* pErrMsg)
 {
    // home path
-   *pHomePath = FilePath("/Library/Frameworks/R.framework/Resources");
+   *pHomePath = FilePath("@PREFIX@/Library/Frameworks/R.framework/Versions/@FINK_RVERSION@/Resources");
 
    // lib path
    std::string rLibPath;
diff -uNr rstudio-0.99.902.orig/src/cpp/desktop/CMakeLists.txt rstudio-0.99.902/src/cpp/desktop/CMakeLists.txt
--- rstudio-0.99.902.orig/src/cpp/desktop/CMakeLists.txt	2016-05-11 12:03:49.000000000 -0400
+++ rstudio-0.99.902/src/cpp/desktop/CMakeLists.txt	2016-06-16 12:12:39.000000000 -0400
@@ -449,7 +449,7 @@
           file(REMOVE \"\${CMAKE_INSTALL_PREFIX}/RStudio.app/Contents/MacOS/rsession\")
           file(REMOVE \"\${CMAKE_INSTALL_PREFIX}/RStudio.app/Contents/MacOS/rserver\")
           file(REMOVE \"\${CMAKE_INSTALL_PREFIX}/RStudio.app/Contents/MacOS/rserver-pam\")
-          fixup_bundle(\"${APPS}\" \"\${QTPLUGINS}\" \"${DIRS}\")
+          # fixup_bundle(\"${APPS}\" \"\${QTPLUGINS}\" \"${DIRS}\")
           ")
 
    # copy qt shared objects directly to bin on unix (fixed up rpath above)
diff -uNr rstudio-0.99.902.orig/src/cpp/desktop-mac/GwtCallbacks.mm rstudio-0.99.902/src/cpp/desktop-mac/GwtCallbacks.mm
--- rstudio-0.99.902.orig/src/cpp/desktop-mac/GwtCallbacks.mm	2016-05-11 12:03:49.000000000 -0400
+++ rstudio-0.99.902/src/cpp/desktop-mac/GwtCallbacks.mm	2016-06-16 12:12:46.000000000 -0400
@@ -297,8 +297,8 @@
       event4 = CGEventCreateKeyboardEvent (NULL, (CGKeyCode)6, false);
       event5 = CGEventCreateKeyboardEvent (NULL, (CGKeyCode)56, false);
       event6 = CGEventCreateKeyboardEvent (NULL, (CGKeyCode)55, false);
-      CGEventSetFlags(event3, kCGEventFlagMaskCommand | kCGEventFlagMaskShift);
-      CGEventSetFlags(event4, kCGEventFlagMaskCommand | kCGEventFlagMaskShift);
+      CGEventSetFlags(event3, (CGEventFlags)(kCGEventFlagMaskCommand | kCGEventFlagMaskShift));
+      CGEventSetFlags(event4, (CGEventFlags)(kCGEventFlagMaskCommand | kCGEventFlagMaskShift));
       CGEventPost(kCGHIDEventTap, event1);
       CGEventPost(kCGHIDEventTap, event2);
       CGEventPost(kCGHIDEventTap, event3);
@@ -327,7 +327,7 @@
    typedef WebView RSWebView;
 #endif
    
-   RSWebView* view = [[[NSApp mainWindow] windowController] webView];
+   RSWebView* view = (RSWebView *)[[[NSApp mainWindow] windowController] webView];
    if (view == nil) {
       NSString* errorMsg = [NSString stringWithFormat: @"nil webView on clipboard action %@", NSStringFromSelector(selector)];
       LOG_ERROR_MESSAGE([errorMsg UTF8String]);
