File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,9 +121,18 @@ def configure
121121 end
122122 end
123123
124+ # We build a libpq library file which static links OpenSSL and krb5.
125+ # Our builtin libpq is referenced in different ways depending on the OS:
126+ # - Window: Add the ports directory at runtime per RubyInstaller::Runtime.add_dll_directory
127+ # The file is called "libpq.dll"
128+ # - Linux: Add a rpath to pg_ext.so which references the ports directory.
129+ # The file is called "libpq-ruby-pg.so.1" to avoid loading of system libpq by accident.
130+ # - Macos: Add a reference with relative path in pg_ext.so to the ports directory.
131+ # The file is called "libpq-ruby-pg.1.dylib" to avoid loading of other libpq by accident.
124132 libpq_orig , libpq_rubypg = case RUBY_PLATFORM
125133 when /linux/ then [ "libpq.so.5" , "libpq-ruby-pg.so.1" ]
126134 when /darwin/ then [ "libpq.5.dylib" , "libpq-ruby-pg.1.dylib" ]
135+ # when /mingw/ then ["libpq.dll", "libpq.dll"] # renaming not needed
127136 end
128137
129138 postgresql_recipe = BuildRecipe . new ( "postgresql" , POSTGRESQL_VERSION , [ POSTGRESQL_SOURCE_URI ] ) . tap do |recipe |
You can’t perform that action at this time.
0 commit comments