From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Feb 6 07:50:01 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54A581FD for ; Thu, 6 Feb 2014 07:50:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3E1B61124 for ; Thu, 6 Feb 2014 07:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s167o1No081282 for ; Thu, 6 Feb 2014 07:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s167o10q081265; Thu, 6 Feb 2014 07:50:01 GMT (envelope-from gnats) Date: Thu, 6 Feb 2014 07:50:01 GMT Message-Id: <201402060750.s167o10q081265@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org Cc: From: "Ganael LAPLANCHE" Subject: Re: ports/184540: emulators/dolphin-emu: New options framework + DEBUG option set = wrong INSTALL_TARGET X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Ganael LAPLANCHE List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Feb 2014 07:50:01 -0000 The following reply was made to PR ports/184540; it has been noted by GNATS. From: "Ganael LAPLANCHE" To: bug-followup@FreeBSD.org Cc: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/184540: emulators/dolphin-emu: New options framework + DEBUG option set = wrong INSTALL_TARGET Date: Thu, 06 Feb 14 07:50:00 UTC This is a multi-part message in MIME format. ------=OPENWEBMAIL_ATT_0.499544649458588 Content-Type: text/plain; charset=iso-8859-15 (the original patch included in this PR is no more useful, as Dolphin has now been updated and includes a fix for the described problem. Anyway, the problem still exists, so here is a more detailed explanation) Well, here is what happens : - ${STRIP} is set by default to '-s' by /usr/share/mk/bsd.own.mk - ${INSTALL_TARGET} is defined by Mk/Uses/cmake.mk:70 given ${STRIP} value : if ${STRIP} is not empty, ${INSTALL_TARGET} is forced to 'install/strip'. In my case, the problem is that ${STRIP} is never empty, even when DEBUG is on (through PORT_OPTIONS) - Mk/Uses/cmake.mk is included by Mk/bsd.ports.mk:1518 (within pre-makefile section) - ${STRIP} can be unset by Mk/bsd.ports.mk:1312 (within options section) if DEBUG is on (it currently only handles WITH_DEBUG, not DEBUG through PORT_OPTIONS) This means that if I want to handle DEBUG as a standard PORT_OPTIONS, I can : - patch line 1311 of bsd.ports.mk to handle PORT_OPTIONS, i.e. : -.if defined(WITH_DEBUG) && !defined(WITHOUT_DEBUG) +.if (defined(WITH_DEBUG) || !empty(PORT_OPTIONS:MDEBUG)) && !defined(WITHOUT_DEBUG) - include before or else ${STRIP} will never be set properly when used by Mk/Uses/cmake.mk The port currently fixes the problem by manually resetting ${INSTALL_TARGET} to 'install' if DEBUG is set. The fix described above would also have worked, but required to patch bsd.ports.mk and include before , which seems weird, just to handle the DEBUG option. Find attached a patch that removes the need for a fix within the port itself. It handles PORT_OPTIONS as well as moves the section that unsets ${STRIP} (Mk/bsd.ports.mk:1312) from the options section to the beginning of the pre-makefile section. That fixes the problem for emulators/dolphin-emu but I don't know if it can have side-effects for other ports or usage. Also note that handling DEBUG as a standard PORT_OPTIONS will probably need more code, see for example : http://lists.freebsd.org/pipermail/freebsd-ports/2013-November/088064.html -- Ganael LAPLANCHE http://www.martymac.org | http://contribs.martymac.org FreeBSD: martymac , http://www.FreeBSD.org ------=OPENWEBMAIL_ATT_0.499544649458588 Content-Type: text/plain; name="patch-INSTALL_TARGET.txt" Content-Disposition: attachment; filename="patch-INSTALL_TARGET.txt" Content-Transfer-Encoding: base64 LS0tIGJzZC5wb3J0Lm1rLm9yaWcJMjAxNC0wMi0wMyAwODozOTozOS4wMDAwMDAwMDAgKzAxMDAK KysrIGJzZC5wb3J0Lm1rCTIwMTQtMDItMDUgMTg6MTk6MzMuNzg5NDU0MDQxICswMTAwCkBAIC0x MzAxLDYgKzEzMDEsMTUgQEAKIENPTkZJR1VSRV9FTlYrPQlUTVBESVI9IiR7VE1QRElSfSIKIC5l bmRpZiAjIGRlZmluZWQoVE1QRElSKQogCisuaW5jbHVkZSAiJHtQT1JUU0RJUn0vTWsvYnNkLm9w dGlvbnMubWsiCisKKyMgU3RhcnQgb2YgcHJlLW1ha2VmaWxlIHNlY3Rpb24uCisuaWYgIWRlZmlu ZWQoQUZURVJQT1JUTUspICYmICFkZWZpbmVkKElOT1BUSU9OU01LKQorCisuaW5jbHVkZSAiJHtQ T1JUU0RJUn0vTWsvYnNkLnNhbml0eS5tayIKKworX1BSRU1LSU5DTFVERUQ9CXllcworCiAuaWYg ZGVmaW5lZChXSVRIX0RFQlVHX1BPUlRTKQogLmlmICR7V0lUSF9ERUJVR19QT1JUUzpNJHtQS0dP UklHSU59fQogV0lUSF9ERUJVRz0JeWVzCkBAIC0xMzA4LDIwICsxMzE3LDExIEBACiAuZW5kaWYK IAogIyBSZXNldCB2YWx1ZSBmcm9tIGJzZC5vd24ubWsuCi0uaWYgZGVmaW5lZChXSVRIX0RFQlVH KSAmJiAhZGVmaW5lZChXSVRIT1VUX0RFQlVHKQorLmlmIChkZWZpbmVkKFdJVEhfREVCVUcpIHx8 ICFlbXB0eShQT1JUX09QVElPTlM6TURFQlVHKSkgJiYgIWRlZmluZWQoV0lUSE9VVF9ERUJVRykK IFNUUklQPQkjbm9uZQogTUFLRV9FTlYrPQlET05UU1RSSVA9eWVzCiAuZW5kaWYKIAotLmluY2x1 ZGUgIiR7UE9SV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