From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 1AA0D1F466 for ; Sun, 19 Jan 2020 06:30:08 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 1E1A912097D; Sun, 19 Jan 2020 15:29:51 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id 92ACE120936 for ; Sun, 19 Jan 2020 15:29:48 +0900 (JST) Received: by filterdrecv-p3iad2-57f487d66-78j5x with SMTP id filterdrecv-p3iad2-57f487d66-78j5x-18-5E23F75F-26 2020-01-19 06:29:51.428365319 +0000 UTC m=+2871788.649009055 Received: from herokuapp.com (unknown [3.81.21.207]) by ismtpd0035p1iad2.sendgrid.net (SG) with ESMTP id nzx9-wg5QSSAuMMLCS0BPg for ; Sun, 19 Jan 2020 06:29:51.335 +0000 (UTC) Date: Sun, 19 Jan 2020 06:29:51 +0000 (UTC) From: duerst@it.aoyama.ac.jp Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 72606 X-Redmine-Project: ruby-master X-Redmine-Issue-Id: 16517 X-Redmine-Issue-Author: MSP-Greg X-Redmine-Sender: duerst X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?uQY=2F2xNrNfHHTWbKn6MBvvzfU5Pqk9I4lnOVb0CFDuvxdXChvxrduS=2FQ5StRKC?= =?us-ascii?Q?ek+7P=2FtDZFs8uckZqXCxMsG7ZrwRekrQPHppUq8?= =?us-ascii?Q?JkQ8=2FwWKp79LDWWxjnyTMK=2FtEvGSz0EE2UxbC95?= =?us-ascii?Q?XZQ+RXtElpeXZSu99qaj0FpvpkS97Qj7sSFht1x?= =?us-ascii?Q?zzjTh6ATGxaVCS2Cjakz320S1afydmZ2PPKJ7KE?= =?us-ascii?Q?6co7KHG22RM++G=2FjQ=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 96941 Subject: [ruby-core:96941] [Ruby master Feature#16517] mkmf.rb - changes for Windows ? X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #16517 has been updated by duerst (Martin D=FCrst). nobu (Nobuyoshi Nakada) wrote: > What is `devkit`? > Is it https://rubygems.org/gems/devkit ? I don't think so. Please have a look at https://github.com/oneclick/rubyins= taller/wiki/Development-Kit. ---------------------------------------- Feature #16517: mkmf.rb - changes for Windows ? https://bugs.ruby-lang.org/issues/16517#change-83968 * Author: MSP-Greg (Greg L) * Status: Open * Priority: Normal * Assignee: = * Target version: = ---------------------------------------- I propose two changes to mkmf.rb to make it more Windows friendly. 1) mingw - `devkit` has been the standard for 'enabling' compile tools in p= ublicly available MinGW builds for quite a while. Could something like the= following be added? Not sure whether to rescue on LoadError or not, or wh= ether to output anything if it doesn't load. ```ruby if $mingw begin require 'devkit' rescue end end ``` 2) mswin - most compile tools other than msvc will find libraries without a= lib prefix. Note the following code in extconf.rb for OpenSSL: ```ruby ret =3D have_library("crypto", "CRYPTO_malloc") && have_library("ssl", "SSL_new") return ret if ret if $mswin # OpenSSL >=3D 1.1.0: libcrypto.lib and libssl.lib. if have_library("libcrypto", "CRYPTO_malloc") && have_library("libssl", "SSL_new") return true end ``` If something like the following was added, the above wouldn't be needed: ```ruby if $mswin alias_method :orig_find_library, :find_library = def find_library(lib, func, *paths, &b) orig_find_library(lib, func, *paths, b) || orig_find_library("lib#{lib}= ", func, *paths, b) end alias_method :orig_have_library, :have_library def have_library(lib, func =3D nil, headers =3D nil, opt =3D "", &b) orig_have_library(lib, func, headers, opt, b) || orig_have_library("lib= #{lib}", func, headers, opt, b) end end ``` Adding something similar to above two items would remove the need for Windo= ws specific build code in many extension gems. -- = https://bugs.ruby-lang.org/ Unsubscribe: