Bug 84299

Summary: A (possible) bug in ports/Mk/bsd.ruby.mk
Product: Ports & Packages Reporter: Alexander Usov <usov>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Alexander Usov 2005-07-29 13:50:19 UTC
bsd.ruby.mk unconditionally overwrites CONFIGURE_TARGET variable.
This breaks for example devel/root.

How-To-Repeat: $ cd /usr/ports/devel/root
$ grep CONFIGURE_TARGET Makefile
CONFIGURE_TARGET=       freebsd5
$ make -V CONFIGURE_TARGET WITHOUT_RUBY=yes
freebsd5
$ make -V CONFIGURE_TARGET WITH_RUBY=yes
i386-portbld-freebsd5

The later breaks "make configure" for this port.
Comment 1 Vsevolod Stakhov 2005-07-30 11:47:52 UTC
Here is possible workaround as bsd.ruby.mk is included before 
setting CONFIGURE_TARGET variable:

--- bsd.ruby.mk.orig	Sat Jul 30 14:42:26 2005
+++ bsd.ruby.mk	Sat Jul 30 14:42:58 2005
@@ -154,7 +154,7 @@
 .endif
 #      defined(RUBY_VER) && ${RUBY_VER} == 1.8
 
-CONFIGURE_TARGET=	${ARCH}-portbld-freebsd${OSREL:C/\..*//}
+CONFIGURE_TARGET?=	${ARCH}-portbld-freebsd${OSREL:C/\..*//}
 
 RUBY_ARCH?=		${ARCH}-freebsd${OSREL:C/\..*//}
 RUBY_NAME?=		ruby${RUBY_SUFFIX}
Comment 2 Vsevolod Stakhov freebsd_committer freebsd_triage 2005-07-30 11:48:18 UTC
Responsible Changed
From-To: freebsd-ports-bugs->knu

Over to maintainer.
Comment 3 Alexander S. Usov 2005-07-30 16:55:29 UTC
On Saturday 30 July 2005 12:47, Vsevolod Stakhov wrote:
> Here is possible workaround as bsd.ruby.mk is included before
> setting CONFIGURE_TARGET variable:

You mean after?

BTW, is CONFIGURE_TARGET variable inherited from the parent make?
It can cause problems with building ruby as a dependency.

-- 
Best regards,
  Alexander.
Comment 4 Sergey Matveychuk freebsd_committer freebsd_triage 2005-10-14 23:35:44 UTC
I'm afraid setting CONFIGURE_TARGET with ?= in bsd.ruby.mk makes it 
complete useless. IT because of bsd.ruby.mk included _after_ 
CONFIGURE_TARGET defined.

-- 
Sem.
Comment 5 Mark Linimon freebsd_committer freebsd_triage 2005-11-11 01:20:40 UTC
Responsible Changed
From-To: knu->freebsd-ports-bugs

Maintainer was reset.
Comment 6 Edwin Groothuis freebsd_committer freebsd_triage 2006-01-02 10:06:41 UTC
State Changed
From-To: open->closed

Feedback suggested that this implementation was a bad one and that 
there is not a good solution for it.