Arduino 1.5.x libs - handle new library layout (issue #275) and hardware/vendor specific libs (issue #276)  

My 3 cents for full arduino 1.5.x support (issue #45):
- (issue #276) when arduino 1.5.x is detected, additional path is searched for hardware/vendor specific libraries (aka $(ARDUINO_PLATFORM_LIB_PATH) ) - defaults to $(ARDUINO_DIR)/hardware/arduine/$(ARCHITECTURE)

- (issue #275) support for new arduino library layout, as specified in https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification .
New layout is assumed when there are library.properties file and src subdirectory in library directory.
In new layout mode src subdirectory is searched recursively for library sources (using rwildcard)

- additional small thing allowing compiling 1.5.x libraries - define ARDUINO_ARCH_XXX when compiling (needed for system libraries in 1.5.x)

(Tested in arduino 1.0.5 and current ide-1.5.x branch )

Just checked the source again - when ARDUINO_PLATFORM_LIB_PATH is set explicitly it will be used even with arduino 1.0.x, so your initial proposition seems the most sensible here.
So it would be:

    ifndef ARDUINO_PLATFORM_LIB_PATH
        ifeq ($(shell expr $(ARDUINO_VERSION) '>' 150), 1)
            # only for 1.5
            ARDUINO_PLATFORM_LIB_PATH = $(ARDUINO_DIR)/hardware/$(VENDOR)/$(ARCHITECTURE)/libraries
            $(call show_config_variable,ARDUINO_PLATFORM_LIB_PATH,[COMPUTED],(from ARDUINO_DIR))
        endif
    else
        $(call show_config_variable,ARDUINO_PLATFORM_LIB_PATH,[USER])
    endif

If no other ideas appear I will correct it this way.