From owner-freebsd-ports@FreeBSD.ORG Thu Feb 9 08:15:55 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A84A16A420 for ; Thu, 9 Feb 2006 08:15:55 +0000 (GMT) (envelope-from jrhett@mail.meer.net) Received: from outbound0.sv.meer.net (outbound0.sv.meer.net [205.217.152.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2288A43D49 for ; Thu, 9 Feb 2006 08:15:55 +0000 (GMT) (envelope-from jrhett@mail.meer.net) Received: from mail.meer.net (mail.meer.net [209.157.152.14]) by outbound0.sv.meer.net (8.12.10/8.12.6) with ESMTP id k198Fs5I099111; Thu, 9 Feb 2006 00:15:54 -0800 (PST) (envelope-from jrhett@mail.meer.net) Received: from mail.meer.net (localhost [127.0.0.1]) by mail.meer.net (8.13.3/8.13.3/meer) with ESMTP id k198F7Gx056180; Thu, 9 Feb 2006 00:15:07 -0800 (PST) (envelope-from jrhett@mail.meer.net) Received: (from jrhett@localhost) by mail.meer.net (8.13.3/8.13.3/Submit) id k198F7VH056178; Thu, 9 Feb 2006 00:15:07 -0800 (PST) (envelope-from jrhett) Date: Thu, 9 Feb 2006 00:15:07 -0800 From: Jo Rhett To: glennrp@users.sourceforge.net Message-ID: <20060209081507.GA53606@svcolo.com> Mail-Followup-To: glennrp@users.sourceforge.net, freebsd-ports@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i Cc: freebsd-ports@freebsd.org Subject: bug in libpng-config / makefile.freebsd 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: Thu, 09 Feb 2006 08:15:55 -0000 libpng compiles and works fine on FreeBSD but libpng-config returns the wrong information arran:[1141] libpng-config --cflags -I/usr/local/usr/local/include/libpng -DPNG_USE_PNGGCCRD -O2 -fno-strict-aliasing -pipe arran:[1142] libpng-config --ldflags -L/usr/local/usr/local/lib -lpng -lz -lm arran:[1145] libpng-config --I_opts -I/usr/local/usr/local/include/libpng This bug is due to adding PREFIX twice to these variables: arran:[1053] diff makefile.freebsd.orig makefile.freebsd 15,16c15 < DESTDIR= ${PREFIX} < LIBDIR= /lib --- > LIBDIR= ${PREFIX}/lib 18c17 < INCSDIR= /include/libpng --- > INCSDIR= ${PREFIX}/include/libpng 21c20 < MANDIR= /man/man --- > MANDIR= ${PREFIX}/man/man 46a47,64 > libpng-config: > ( cat scripts/libpng-config-head.in; \ > echo prefix=\"${PREFIX}\"; \ > echo libdir=\"${PREFIX}${LIBDIR}\"; \ > echo ccopts=\"${ccopts}\"; \ > echo cppflags=\"${cppflags}\"; \ > echo I_opts=\"-I${PREFIX}${INCSDIR}\"; \ > echo L_opts=\"-L${PREFIX}${LIBDIR}\"; \ You can either remove the PREFIX in the top lines or the bottom lines. Since it appears necessary for the top lines, I believe the proper patch is this: --- makefile.freebsd_orig Thu Feb 9 00:12:57 2006 +++ makefile.freebsd Thu Feb 9 00:13:20 2006 @@ -48,11 +48,11 @@ libpng-config: ( cat scripts/libpng-config-head.in; \ echo prefix=\"${PREFIX}\"; \ - echo libdir=\"${PREFIX}${LIBDIR}\"; \ + echo libdir=\"${LIBDIR}\"; \ echo ccopts=\"${ccopts}\"; \ echo cppflags=\"${cppflags}\"; \ - echo I_opts=\"-I${PREFIX}${INCSDIR}\"; \ - echo L_opts=\"-L${PREFIX}${LIBDIR}\"; \ + echo I_opts=\"-I${INCSDIR}\"; \ + echo L_opts=\"-L${LIBDIR}\"; \ echo libs=\"-lpng -lz -lm\"; \ echo ldopts=\"${ldopts}\"; \ cat scripts/libpng-config-body.in ) > libpng-config -- Jo Rhett senior geek SVcolo : Silicon Valley Colocation