--- src/Makevars	2016-10-12 18:25:26.000000000 -0500
+++ src/Makevars	2017-03-10 13:34:07.000000000 -0600
@@ -1,6 +1,2 @@
-RHTSLIB_LIBS=`echo 'Rhtslib::pkgconfig("PKG_LIBS")'|\
-    "${R_HOME}/bin/R" --vanilla --slave`
-PKG_LIBS=$(RHTSLIB_LIBS)
-CXX?=g++-4.8		
-CC?=gcc-4.8
-CXX_STD= CXX11
\ No newline at end of file
+PKG_LIBS= ${PREFIX}/lib/R/library/Rhtslib/lib/libhts.a -lz -pthread
+PKG_CXXFLAGS+= -std=c++11 -stdlib=libc++
