Bug 169078

Summary: Fix for ports-mgmt/psearch to compile with lang/gcc46
Product: Ports & Packages Reporter: Kimmo Paasiala <kpaasial>
Component: Individual Port(s)Assignee: Wesley Shields <wxs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
file.diff none

Description Kimmo Paasiala 2012-06-14 19:40:01 UTC
I've written a small patch for ports-mgmt/psearch to make it compile it with lang/gcc46. GCC g++ 4.6 seems to require <cstring> and <cstdlib> headers to put the C functions in std namespace where other compilers put them to std namespace with both <string.h> and <cstring> (same for <stdlib.h>) headers.
I have tested the patch with g++46, the standard base g++ and clang++ on FreeBSD 9-STABLE and it seems to work on all of them.

Fix: See the attached patch.

Patch attached with submission follows:
How-To-Repeat: Install lang/gcc46 and compile ports-mgmt/psearch using it as the C++ compiler.
Comment 1 Edwin Groothuis freebsd_committer 2012-06-14 21:38:12 UTC
Maintainer of ports-mgmt/psearch,

Please note that PR ports/169078 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:

Edwin Groothuis via the GNATS Auto Assign Tool
Comment 2 Edwin Groothuis freebsd_committer 2012-06-14 21:38:16 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Benjamin Lutz 2012-06-14 22:33:01 UTC
I've rolled the patch into the distfile. Please apply the diff below to 
update the port. A commit message containing something like
"Update to make gcc 4.6 compatible, thanks to Kimmo Paasiala" would be 
nice. Thanks!


===== START OF DIFF =====
diff -ruN psearch.old/Makefile psearch/Makefile
--- psearch.old/Makefile	2008-06-04 05:25:35.000000000 +0200
+++ psearch/Makefile	2012-06-14 23:25:04.751696140 +0200
@@ -6,7 +6,7 @@

  PORTNAME=	psearch
  CATEGORIES=	ports-mgmt
  MASTER_SITES=	http://www.maxlor.com/files/

diff -ruN psearch.old/distinfo psearch/distinfo
--- psearch.old/distinfo	2011-03-18 18:58:51.000000000 +0100
+++ psearch/distinfo	2012-06-14 23:27:43.220690707 +0200
@@ -1,2 +1,2 @@
-SHA256 (psearch-2.0.1.tar.gz) = 
-SIZE (psearch-2.0.1.tar.gz) = 6563
+SHA256 (psearch-2.0.2.tar.gz) = 
+SIZE (psearch-2.0.2.tar.gz) = 6549
===== END OF DIFF =====
Comment 4 Kimmo Paasiala 2012-06-15 19:32:11 UTC

Thank you Benjamin, version 2.0.2 of the port fetches, patches, builds
and installs correctly now with g++46 (of course works as well). There
are some linewrap (the SHA256 lines) and indentation (leading spaces
missing) problems in your patch so it doesn't apply cleanly as it is
but it's so short that it's easy to apply manually.
Comment 5 Wesley Shields freebsd_committer 2012-06-25 17:27:24 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wxs

I'll take it.
Comment 6 Wesley Shields freebsd_committer 2012-06-25 17:44:35 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!