--- CMakeLists.txt.orig	2012-12-21 21:18:18.000000000 -0200
+++ CMakeLists.txt	2013-03-11 08:20:10.000000000 -0300
@@ -95,7 +95,7 @@
 if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
     set_target_properties(${PROJECT_AWE_NAME}
         PROPERTIES
-        LINK_FLAGS -export-dynamic)
+        LINK_FLAGS -Wl,--export-dynamic)
 endif()
 
 target_link_libraries(${PROJECT_AWE_NAME}
@@ -317,7 +317,9 @@
     PATTERN "*.in" EXCLUDE)
 install(DIRECTORY ${SOURCE_DIR}/themes DESTINATION ${AWESOME_DATA_PATH}
     PATTERN "*.in" EXCLUDE)
-install(FILES ${AWE_DOC_FILES} DESTINATION ${AWESOME_DOC_PATH})
+if(INSTALL_PORTDOCS)
+    install(FILES ${AWE_DOC_FILES} DESTINATION ${AWESOME_DOC_PATH})
+endif()
 install(FILES "awesome.desktop" DESTINATION ${AWESOME_XSESSION_PATH})
 if(GENERATE_DOC)
     install(DIRECTORY ${BUILD_DIR}/doc DESTINATION ${AWESOME_DOC_PATH})
