Bug 169078 - Fix for ports-mgmt/psearch to compile with lang/gcc46
Summary: Fix for ports-mgmt/psearch to compile with lang/gcc46
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Wesley Shields
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-14 19:40 UTC by Kimmo Paasiala
Modified: 2012-06-25 17:44 UTC (History)
0 users

See Also:


Attachments
file.diff (305 bytes, patch)
2012-06-14 19:40 UTC, Kimmo Paasiala
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 freebsd_triage 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:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/169078

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 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!

Cheers,
Benjamin

===== 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
-PORTVERSION=	2.0.1
+PORTVERSION=	2.0.2
  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) = 
a18a45733c85f164d1a9687d02d23e84d36e291dacb3338e99b6956a960e94d7
-SIZE (psearch-2.0.1.tar.gz) = 6563
+SHA256 (psearch-2.0.2.tar.gz) = 
6d2177a83197e3823f1b777acb03a2bceba74100eccce540a1b8dc0ebadee231
+SIZE (psearch-2.0.2.tar.gz) = 6549
===== END OF DIFF =====
Comment 4 Kimmo Paasiala 2012-06-15 19:32:11 UTC
Hi,

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 freebsd_triage 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 freebsd_triage 2012-06-25 17:44:35 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!