Subject: converters/libiconv breaks on Linux (PR-35937)
To: None <tech-pkg@netbsd.org>
From: Ulrich Habel <uli@habel.name>
List: tech-pkg
Date: 03/07/2007 02:12:11
--CUfgB8w4ZwR/yMy5
Content-Type: multipart/mixed; boundary="tThc/1wpZn/ma/RB"
Content-Disposition: inline


--tThc/1wpZn/ma/RB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable


Platform: Debian Linux Sarge 2.4
pkgsrc: 2006Q4


I already filed a pr about this. The problem with this package is that
in the Makefile a "USE_LANGUAGES+=3D  c99 c++" has been set. The gcc which
is built when you bootstrap pkgsrc on Linux is a gcc 2.95.3 which
doesn't have the switch -std=3Dgnu99 no c99.

This is the reason why this package fails in the configure phase with
the error "C compiler cannot create executables".

(see:
http://habel.name/~uli/NetBSD/pkgsrc-bulk-2007-02-27/converters/libiconv/.b=
roken.html)

The uni diff patch attached fixes this problem for the Linux platform
as I test if the platform is running Linux and set

USE_LANGUAGES+=3D c c++=20

and leave the setting for the other platforms.=20


Jeremy wanted me to post about this in here - is the c99 switch needed
on any platform or is 'c' just sufficient. This obsoletes the patch and
converts the USE_LANGUAGES+=3D to 'c c++'

Regards

Uli


--=20
Ulrich Habel
http://habel.name
irc: Rhaen

--tThc/1wpZn/ma/RB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="libiconv.patch"
Content-Transfer-Encoding: quoted-printable

--- Makefile.orig	2007-03-06 21:17:13.000000000 +0100
+++ Makefile	2007-03-06 21:17:32.000000000 +0100
@@ -15,8 +15,7 @@
=20
 PKG_INSTALLATION_TYPES=3D	overwrite pkgviews
 PKG_DESTDIR_SUPPORT=3D	user-destdir
-
-USE_LANGUAGES+=3D		c99 c++
+USE_LANGUAGES+=3D		c++
 USE_LIBTOOL=3D		yes
 GNU_CONFIGURE=3D		yes
=20
@@ -45,4 +44,13 @@
 	cd ${WRKSRC}/libcharset/lib && ${MAKE} libdir=3D${EGDIR} DESTDIR=3D${DEST=
DIR:Q} \
 		install-charset-alias
=20
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} !=3D "Linux"
+ USE_LANGUAGES+=3D	c99
+.else
+ USE_LANGUAGES+=3D	c
+.endif
+
 .include "../../mk/bsd.pkg.mk"
+

--tThc/1wpZn/ma/RB--

--CUfgB8w4ZwR/yMy5
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFF7hFrKLusNOvI6a4RAplRAKCyTR70IUzodUcpfpmMP+iCGdVq1gCg+cYe
aV7JT48DS8JzwtYrQwkMhlk=
=1lqR
-----END PGP SIGNATURE-----

--CUfgB8w4ZwR/yMy5--