From nobody@FreeBSD.org  Sun Nov 29 06:51:49 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2767E1065745
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 29 Nov 2009 06:51:49 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id F0FD58FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 29 Nov 2009 06:51:48 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nAT6pmas043765
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 29 Nov 2009 06:51:48 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id nAT6pmIS043764;
	Sun, 29 Nov 2009 06:51:48 GMT
	(envelope-from nobody)
Message-Id: <200911290651.nAT6pmIS043764@www.freebsd.org>
Date: Sun, 29 Nov 2009 06:51:48 GMT
From: "David G. Johns" <dgjohns@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [maintainer update] patch converters/libutf-8 for CFLAGS
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         140992
>Category:       ports
>Synopsis:       [maintainer update] patch converters/libutf-8 for CFLAGS
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 29 07:00:05 UTC 2009
>Closed-Date:    Fri Dec 18 19:38:01 UTC 2009
>Last-Modified:  Fri Dec 18 19:40:07 UTC 2009
>Originator:     David G. Johns
>Release:        7.2-STABLE
>Organization:
>Environment:
FreeBSD freebsd-dev.local.lan 7.2-STABLE FreeBSD 7.2-STABLE #6: Fri Nov 27 04:02:07 UTC 2009     root@freebsd-dev.local.lan:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Small patch to fix 'CFLAGS+= -fPIC' not being properly added during compilation. 
>How-To-Repeat:
Have CFLAGS set in /etc/make.conf, compile current converters/libutf-8 on amd64.

Fails with the following:

ld: fget.utf-8.o: relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
fget.utf-8.o: could not read symbols: Bad value
>Fix:
The included patch, tested on i386 and amd64.

Patch attached with submission follows:

diff -ruN libutf-8.bak/Makefile libutf-8/Makefile
--- libutf-8.bak/Makefile	2007-05-30 15:04:33.000000000 +0000
+++ libutf-8/Makefile	2009-11-28 23:42:35.000000000 +0000
@@ -7,16 +7,16 @@
 
 PORTNAME=	libutf-8
 PORTVERSION=	1.0
+PORTREVISION=   1
 PORTEPOCH=	1
 CATEGORIES=	converters
 MASTER_SITES=	http://www.whizkidtech.redprince.net/i18n/ \
 		ftp://ftp.whizkidtech.redprince.net/unix/
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	dgjohns@gmail.com
 COMMENT=	Unicode conversion routines between UCS-4 and UTF-8
 
 USE_LDCONFIG=	yes
-CFLAGS+=	-fPIC
 
 MAN3=		libutf-8.3 fgetu8.3 fputu8.3 sgetu8.3 sputu8.3
 
diff -ruN libutf-8.bak/files/patch-aa libutf-8/files/patch-aa
--- libutf-8.bak/files/patch-aa	1999-04-16 23:34:30.000000000 +0000
+++ libutf-8/files/patch-aa	2009-11-28 23:42:35.000000000 +0000
@@ -1,6 +1,11 @@
---- Makefile.orig	Thu Apr  1 01:00:12 1999
-+++ Makefile	Fri Apr 16 18:11:12 1999
-@@ -29,5 +29,5 @@
+--- Makefile.orig	1999-04-01 11:00:12.000000000 +0400
++++ Makefile		2009-11-28 18:08:54.000000000 -0800
+@@ -26,8 +26,10 @@
+ #	 Makefile for libutf-8 library
+ #
+ 
++CFLAGS+=-fPIC
++
  all: libutf-8.so.1
  
  libutf-8.so.1: fget.utf-8.o sget.utf-8.o fput.utf-8.o sput.utf-8.o nomacros.o


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Fri Dec 18 19:33:53 UTC 2009 
State-Changed-Why:  
Committed except the PORTREVISION change. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=140992 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/140992: commit references a PR
Date: Fri, 18 Dec 2009 19:37:58 +0000 (UTC)

 pav         2009-12-18 19:37:44 UTC
 
   FreeBSD ports repository
 
   Modified files:
     converters/libutf-8  Makefile 
     converters/libutf-8/files patch-aa 
   Log:
   - Fix CFLAGS modification to survive CFLAGS set in make.conf
   - Take maintainership
   
   PR:             ports/140992
   Submitted by:   David G. Johns <dgjohns@gmail.com>
   
   Revision  Changes    Path
   1.16      +1 -2      ports/converters/libutf-8/Makefile
   1.2       +8 -3      ports/converters/libutf-8/files/patch-aa
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
