From owner-freebsd-ports@FreeBSD.ORG Sat Oct 23 01:55:28 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA890106566C for ; Sat, 23 Oct 2010 01:55:28 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id AAECC8FC0C for ; Sat, 23 Oct 2010 01:55:28 +0000 (UTC) Received: by iwn39 with SMTP id 39so1441332iwn.13 for ; Fri, 22 Oct 2010 18:55:28 -0700 (PDT) Received: by 10.231.183.136 with SMTP id cg8mr1380329ibb.114.1287798927383; Fri, 22 Oct 2010 18:55:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.59.195 with HTTP; Fri, 22 Oct 2010 18:55:07 -0700 (PDT) From: Eitan Adler Date: Fri, 22 Oct 2010 21:55:07 -0400 Message-ID: To: freebsd ports Content-Type: multipart/mixed; boundary=0016364ecd069bdd0604933f0d5d Subject: legacy code in bsd.ports.mk X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Oct 2010 01:55:28 -0000 --0016364ecd069bdd0604933f0d5d Content-Type: text/plain; charset=UTF-8 I was going through bsd.port.mk to learn how the ports system works. It seems quite complex - partly due to all the different configurations that need to be supported. 1) I noticed some hacks that were in place in 2004 and I was curious if they were fixed by now, and if so if the hacks should be changed. The attached patch just follows the comments - although I don't know if the specific bug in question is fixed yet 2) revision 1.618 adds code to drop bsd.port.options.mk into /usr/share/mk if it's missing - which seems to be supporting users using 6.2 and before. Since these versions are already EOL now - is it worth it to clutter bsd.port.mk with code to support them? I'm not saying that we should drop support just because they are EOL - but I think that bsd.port.mk is quite complicated already - and the less code the better. 3) revision 1.581 added the following code # XXX to remain undefined until all ports that require Perl are fixed # to set one of the conditionals that force the inclusion of bsd.perl.mk .if !defined(_PERL_REFACTORING_COMPLETE) Is this complete yet? If so could we just remove the .if !defined code? 4) The code that converts from USE_BISON=yes to USE_BISON=build seems to only affect two ports (based on my grepping) and could be fixed using the attached patch 5) I'm sure there is more that could be done to clean up the ports system. These are only things that I found going through bsd.port.mk - if I look at some of the other files I think I'll find more :-( --0016364ecd069bdd0604933f0d5d Content-Type: application/octet-stream; name="remove-2004-hack.patch" Content-Disposition: attachment; filename="remove-2004-hack.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gflt4vk80 SW5kZXg6IGJzZC5wb3J0Lm1rCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9ob21lL25jdnMvcG9ydHMv TWsvYnNkLnBvcnQubWssdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEuNjUwCmRpZmYgLXUgLXIxLjY1 MCBic2QucG9ydC5tawotLS0gYnNkLnBvcnQubWsJMTMgT2N0IDIwMTAgMDk6MDQ6MzAgLTAwMDAJ MS42NTAKKysrIGJzZC5wb3J0Lm1rCTIzIE9jdCAyMDEwIDAxOjE2OjA1IC0wMDAwCkBAIC0zMDc2 LDEyICszMDc2LDggQEAKIAlAJHtGQUxTRX0KIC5lbmRpZgogX01MSU5LUz0JJHtfTUxJTktTX1BS RVBFTkR9Ci0jIFhYWCAyMDA0MDExOSBUaGlzIG5leHQgbGluZSBzaG91bGQgcmVhZDoKLSMgLmZv ciBsYW5nIGluICR7TUFOTEFORzpTJV4lbWFuLyU6UyVebWFuLyIiJCVtYW4lfQotIyBidXQgdGhl cmUgaXMgY3VycmVudGx5IGEgYnVnIGluIG1ha2UoMSkgdGhhdCBwcmV2ZW50cyB0aGUgZG91Ymxl LXF1b3RlCi0jIHN1YnN0aXR1dGlvbiBmcm9tIHdvcmtpbmc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AuZm9yIHNlY3QgaW4g MSAyIDMgNCA1IDYgNyA4IDkgTCBOCiAjIE1BTiR7c2VjdH0gaXMgZm9yIG1hbiBwYWdlcyBpbnN0 YWxsZWQgZm9yIGFsbCBsYW5ndWFnZXMgaW4gTUFOTEFORyBmb3IgYSBnaXZlbgo= --0016364ecd069bdd0604933f0d5d Content-Type: application/octet-stream; name="remove-use-bison-yes.patch" Content-Disposition: attachment; filename="remove-use-bison-yes.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gflu4ujo1 SW5kZXg6IE1rL2JzZC5wb3J0Lm1rCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9ob21lL25jdnMvcG9y dHMvTWsvYnNkLnBvcnQubWssdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEuNjUwCmRpZmYgLXUgLXIx LjY1MCBic2QucG9ydC5tawotLS0gTWsvYnNkLnBvcnQubWsJMTMgT2N0IDIwMTAgMDk6MDQ6MzAg LTAwMDAJMS42NTAKKysrIE1rL2JzZC5wb3J0Lm1rCTIzIE9jdCAyMDEwIDAxOjQ0OjE5IC0wMDAw CkBAIC0zNzEsOCArMzcxLDcgQEAKICMJCQkJICBzaG91bGQgbm90IGJlIHVzZWQgaW4gTWFrZWZp bGUuCiAjIwogIyBVU0VfQklTT04JCS0gSW1wbGllcyB0aGF0IHRoZSBwb3J0IHVzZXMgYmlzb24g aW4gb25lIHdheSBvciBhbm90aGVyOgotIwkJCQkgICd5ZXMnIChiYWNrd2FyZHMgY29tcGF0aWJp bGl0eSkgLSB1c2UgYmlzb24gZm9yIGJ1aWxkaW5nCi0jCQkJCSAgbmV3IGZlYXR1cmVzOiAnYnVp bGQnLCAncnVuJywgJ2JvdGgnLCBpbXBseWluZyBidWlsZCwKKyMJCQkJICAnYnVpbGQnLCAncnVu JywgJ2JvdGgnLCBpbXBseWluZyBidWlsZCwKICMJCQkJICByd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