The revenue derived from the tax, together with all money acquired by gift, devise, bequest, or otherwise, for the purposes of the library, shall be paid into the county treasury, to the credit of the library fund of the district in which the tax is collected, subject only to the order of the library trustees of the district. If payment into the treasury is inconsistent with the terms or conditions of any gift, devise, or bequest, the board of library trustees shall provide for the safety and preservation of the fund, and the application thereof to the use of the library, in accordance with the terms and conditions of the gift, devise, or bequest.