ports/58545: devel/avr-gcc: fix libintl and libiconv depedencies => avoid conflicts with other ports

Simon Barner barner at in.tum.de
Sun Oct 26 01:50:24 UTC 2003


>Number:         58545
>Category:       ports
>Synopsis:       devel/avr-gcc: fix libintl and libiconv depedencies => avoid conflicts with other ports
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 25 18:50:20 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Simon Barner
>Release:        FreeBSD 4.9-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD zi025.glhnet.mhn.de 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #1: Thu Sep 4 20:49:53 CEST 2003 simon at zi025.glhnet.mhn.de:/usr/src/sys/compile/KISTE i386

>Description:

Warning: I did not build the port since this would take several hours on
my slow machine. I created the patch by looking at the configure messages
and based on my experiences from fixing ~ 15 ports with similar
problems.

In detail, this patch fixes the following issues:
The port did not pick up the two libraries mentioned.

One possitive side effect of getting the libintl dependency right, is
that the port does not build its included version of the gettext library and
does not install those two .alias that were conflicting with other ports
(have a look at the pkg-plist diff and you'll see what I mean)
        
http://freebsd.rambler.ru/bsdmail/freebsd-ports_2003/msg08919.html

>How-To-Repeat:
>Fix:

diff -ruN avr-gcc/Makefile avr-gcc.patched/Makefile
--- avr-gcc/Makefile	Wed Sep 10 14:57:47 2003
+++ avr-gcc.patched/Makefile	Sun Oct 26 00:29:26 2003
@@ -25,6 +25,8 @@
 		avr-ld:${PORTSDIR}/devel/avr-binutils \
 		autoheader:${PORTSDIR}/devel/autoconf \
 		gettext:${PORTSDIR}/devel/gettext
+LIB_DEPENDS=	intl.5:${PORTSDIR}/devel/gettext \
+		iconv.3:${PORTSDIR}/converters/libiconv
 RUN_DEPENDS=	avr-as:${PORTSDIR}/devel/avr-binutils \
 		avr-ld:${PORTSDIR}/devel/avr-binutils
 
@@ -32,14 +34,15 @@
 
 # Unfortunately, only some mirrors have it as a .bz2 file, while
 # the original master site still uses .gz.
+USE_REINPLACE=	yes
 USE_PERL5_BUILD=	yes
 USE_BZIP2=	yes
 USE_GMAKE=	yes
 USE_BISON=	yes
 GNU_CONFIGURE=	yes
-
 CONFIGURE_ARGS=	--target=avr
-
+CONFIGURE_ENV=	CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
+		LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
 MAN_AUX=	gcc-man.2003.09.09.tar.gz
 
 MAKE_FLAGS=	LANGUAGES="c c++"
@@ -49,6 +52,9 @@
 MAN1=		cpp.1 avr-gcc.1 avr-g++.1 gcov.1
 MAN7=		fsf-funding.7 gfdl.7 gpl.7
 INFO=		cpp gcc gccint cppinternals
+
+pre-configure:
+	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/gcc/configure
 
 # Since the pod2man in FreeBSD 4-stable's /usr/bin cannot be used, we
 # help out by extracting precompiled manpages there.
diff -ruN avr-gcc/files/patch-gcc::configure avr-gcc.patched/files/patch-gcc::configure
--- avr-gcc/files/patch-gcc::configure	Thu Jan  1 01:00:00 1970
+++ avr-gcc.patched/files/patch-gcc::configure	Sun Oct 26 00:24:03 2003
@@ -0,0 +1,11 @@
+--- gcc/configure.orig	Sun Oct 26 00:23:14 2003
++++ gcc/configure	Sun Oct 26 00:23:45 2003
+@@ -5920,7 +5920,7 @@
+   cat > conftest.$ac_ext <<EOF
+ #line 5922 "configure"
+ #include "confdefs.h"
+-#include <libintl.h>
++#include "%%LOCALBASE%%/include/libintl.h"
+ EOF
+ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ { (eval echo configure:5927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
diff -ruN avr-gcc/pkg-plist avr-gcc.patched/pkg-plist
--- avr-gcc/pkg-plist	Wed Sep 10 14:57:47 2003
+++ avr-gcc.patched/pkg-plist	Sun Oct 26 00:06:49 2003
@@ -7,7 +7,6 @@
 bin/avr-gcc
 bin/avr-gcc-3.3.1
 bin/avr-gccbug
-lib/charset.alias
 lib/gcc-lib/avr/3.3.1/avr3/libgcc.a
 lib/gcc-lib/avr/3.3.1/avr4/libgcc.a
 lib/gcc-lib/avr/3.3.1/avr5/libgcc.a
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list