pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/48980: cad/kicad needs newer GCC, build fails on netbsd-5/i386

The following reply was made to PR pkg/48980; it has been noted by GNATS.

From: "John D. Baker" <>
Subject: Re: pkg/48980: cad/kicad needs newer GCC, build fails on netbsd-5/i386
Date: Sun, 27 Jul 2014 08:16:23 -0500 (CDT)

 On Sun, 27 Jul 2014, David Holland wrote:
 >  Unless it's someplace where the extra precision is critical, stuffing
 >  in #define fabsl fabs should make it build. In cad/ it might be
 >  something where it's critical, though. (Most of the time, people just
 >  stuff in long double because they think more precision must be good.)
 There's only two uses in the entire kicad source tree and both are used
 on variable of type "double" (not "long double"), so it's probably
 not necessary.  The first instance also includes an explanation in a
 comment block in the "else" clause of the comparison in which it's found.
 So changing "fabsl" to "fabs" will likely not hurt anything.  I limited
 the change to "NetBSD-5.*" with:
 +Index: cad/kicad/Makefile
 +RCS file: /cvsroot/pkgsrc/cad/kicad/Makefile,v
 +retrieving revision 1.2
 +diff -u -p -r1.2 Makefile
 +--- cad/kicad/Makefile        5 May 2014 00:47:40 -0000       1.2
 ++++ cad/kicad/Makefile        27 Jul 2014 13:14:37 -0000
 +@@ -13,6 +13,7 @@ HOMEPAGE=
 + COMMENT=     Schematic and PCB CAD software (stable branch)
 + LICENSE=     gnu-gpl-v2
 ++.include "../../mk/"
 + USE_LANGUAGES=               c c++
 + USE_CMAKE=           yes
 +@@ -37,6 +38,15 @@ SUBST_FILES.macosx=        bitmap2component/CMa
 +                      pcbnew/CMakeLists.txt
 + SUBST_SED.macosx=    -e 's/[[:<:]]MACOSX_BUNDLE[[:>:]]//'
 ++.if !empty(MACHINE_PLATFORM:MNetBSD-5.*)
 ++SUBST_CLASSES+=              netbsd5
 ++SUBST_STAGE.netbsd5= post-patch
 ++SUBST_MESSAGE.netbsd5=       Substituting fabs() for fabsl() for NetBSD-5
 ++SUBST_FILES.netbsd5= pcbnew/legacy_plugin.cpp        \
 ++                     tools/test-nm-biu-to-ascii-mm-round-tripping.cpp
 ++SUBST_SED.netbsd5=   -e 's/fabsl/fabs/g'
 + .include "../../devel/boost-libs/"
 + .include "../../devel/cmake/"
 + .include "../../devel/zlib/"
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

Home | Main Index | Thread Index | Old Index