From owner-freebsd-ports@freebsd.org Thu Jul 21 19:25:19 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE542BA0FF6 for ; Thu, 21 Jul 2016 19:25:19 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: from mail-vk0-x22e.google.com (mail-vk0-x22e.google.com [IPv6:2607:f8b0:400c:c05::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 71E7315D5 for ; Thu, 21 Jul 2016 19:25:19 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: by mail-vk0-x22e.google.com with SMTP id n129so82199938vke.3 for ; Thu, 21 Jul 2016 12:25:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=65D8mnIYlnOLx8DOBtjpNA1D6nXchAU8hjfgCqplgoo=; b=lIGWtv2Bk40M0FM88gtJ3/mQecWKvfbLL21sV/d5oG6HtPybHEj1eEA3JnwzKSSFzP nlS8HfdX6AkBJ2Tfo3AG2shi3l7DtyE276alTXetyc9ZrlekrvNFdr4X+Tg6JorNJKVy LA/4fXkGdHLxMGCtsjB/wrrzNKsjfJ+c45gbHCgdWiG3pf9I5XzNVqsSa56RDJpYh5Ej osRLtJEydcS0SBaPibu4BdOr8D4pzQ6xjm9mlhIhi1cyaW0SC2vBJcjw/0AsFT4zj1Xn Tfa0JyI55b6kZLxH6IzUBxQMAABbGicVRCJB1mEhE57ms9kPlJIx4VvXGGsYM5V5ErHG dgTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=65D8mnIYlnOLx8DOBtjpNA1D6nXchAU8hjfgCqplgoo=; b=N1YkR3A6xDs2qzNqcwZRSc6Wbt9djtnneQGDgcWWwx2m3d5Ve4/YK4NMdTKeVlo58j m593wOe7XFdFcY+/4/p792tZmFiCqfIbYVHhjzcNiy2UtAsLlyt4taT8FlNMYMu2U5nk M3pTg+aQgY5E21nnbEcKtrT6V2dbGjnkZ0jVSll7iE6vMNm3HPHyBfj+M4NsCYrL6jZz F5KHjdaGJNp2xw2aLEXmC2qBkJFywdkM+Bz9WNISZ699PhBcy8gTVU6N9vmMgMDouS+x SpkmyImKwrvm5NnihkOzm00JkCH4iSMy9MEHHubO5c/fidNpyJeZ+kTqbmF3MW5zhAIC 8cLw== X-Gm-Message-State: ALyK8tKV5rvNTpkxO6VTOi1pnxs/plxdTXZA6BAU9ycGL/X9eC4KVVJfSN0NSjb1a6OJl29XYbr+mSzi/X6hkA== X-Received: by 10.159.33.5 with SMTP id 5mr26462682uab.36.1469129118324; Thu, 21 Jul 2016 12:25:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.54.75 with HTTP; Thu, 21 Jul 2016 12:25:17 -0700 (PDT) In-Reply-To: <3b9c2f92-ef57-3e06-c110-8148dce16ba5@gmx.de> References: <3b9c2f92-ef57-3e06-c110-8148dce16ba5@gmx.de> From: Russell Haley Date: Thu, 21 Jul 2016 13:25:17 -0600 Message-ID: Subject: Re: Passing target to source Makefile To: olli hauer , freebsd-ports@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2016 19:25:19 -0000 On Thu, Jul 21, 2016 at 2:55 AM, olli hauer wrote: > On 2016-07-21 08:03, Russell Haley wrote: >> Hi there, >> >> I've been able to hack up the Makefile for an update of lua53 but the >> one thing still missing is the ability to pass a target for the source >> Makefile (i.e. lua's Makefile, not the ports Makefile). I need to pass >> in "freebsd" as per the build instructions for lua. >> >> Also, I can't seem to get make makeplist to work, but I think that's >> because the lua makefile is defaulting to install the files (due to >> the lack of target) and overriding the makeplist output? >> >> Thanks, >> >> Russell > > Hi Russel, > > it is not clear if you try to hack the lag/lua53 port or a different one. > > There are perhaps two ways, during configure or as make arg > CONFIGURE_ARGS+= target=freebsd > or > MAKE_ARGS+= target=freebsd > > Perhaps you can give the list some more information? Yes, of course. TLDR; I think the Lua port needs some love so I'm trying to update it to the most recent version. I am trying to develop a cross platform Lua application that will run in both FreeBSD and Debian. I have had to abandon the FreeBSD lua53 port for the following reasons: 1) It does not use the recommended "freebsd" target. While the port overlays many of the same options, the system doesn't seem to respect the targets and also performs the installation without specifically calling the "install" target. This is from memory and *could* be incorrect, but this is my anecdotal experience. In the end, we will lose the benefit of any changes made upstream (more on that in a bit). 2) There seems to be lost of "stuff" going on in the port file that seems unnecessary as the Lua Makefile takes care of most of the extras. 3) By forcing all Lua installation to use luaXX naming conventions, it forces the user to have to create work arounds or links to get the standard interpreter to work by calling "lua" (which is the expected use case in my opinion). The current supported version of Lua is 5.3. While I can see the need to install past versions using explicit naming, it is my opinion that the current version should be installed as Lua, not luaXX. 4) The current Makefile applies -fPIC to some of the platforms, but not armv6. I require that switch for all platforms and it seems to work fine on my ARM board (Solid-Run Hummingboard, iMX6/cortex A9). While it's an easy patch, it adds to the list of reasons to build Lua myself. So with that in mind, I have been building and running Lua from git with no patches. While I can continue in this manner, I thought I would try to give back to the community if there is interest. Lua is now on version 5.3.3. I have been able to hack up the ports Makefile to run "successfully" but it still only calls the default target that assumes an installation. So, my goals in terms of a ports upgrade are as follows: - Update to the latest Lua revision - Get ports to call the correct targets (the makeargs above looks promising) - Remove the Lua53 naming convention. Once Lua move to a new major version, this can be re-implemented and the new Lua version can become the standard interpreter. - Add -fPIC to all platforms in FreeBSD - Use clang and bmake instead of forcing gcc/gmake. The last item I think is the most difficult as it will require others to test. However, I have successfully built and run Lua 5.3.2 (testing 5.3.3) using clang and bmake (as well as other libraries such as luasys and luaxml). All input is welcome. Again, if this is not where the community wants to go, it's no big deal. Please also note that I have made an upstream request to the Lua community to consider applying a patch to the freebsd target in their source/Makefile. The patch can be found here: http://pastebin.com/cUCtWb1w. I don't expect this to happen quickly however. Most Sincerely, Russell