Bug 170626 - x11-toolkits/open-motif: X11/extensions/XPrint.h is not detected by configure
Summary: x11-toolkits/open-motif: X11/extensions/XPrint.h is not detected by configure
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: Ruslan Makhmatkhanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-14 07:10 UTC by Marcin Cieślak
Modified: 2012-09-13 09:10 UTC (History)
1 user (show)

See Also:


Attachments
patch.txt (676 bytes, text/plain; charset=US-ASCII)
2012-08-25 20:14 UTC, m.tsatsenko
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Cieślak 2012-08-14 07:10:10 UTC
Although I have

/usr/local/include/X11/extensions/Print.h

and

/usr/local/lib/libXp.a		/usr/local/lib/libXp.so
/usr/local/lib/libXp.la		/usr/local/lib/libXp.so.6

installed (they also look sane), configure fails t
detect them properly.

From config.log:

configure:18905: cc -o conftest -O2 -pipe -march=nocona -fno-strict-aliasing -st
d=gnu89 -Wall -g -fno-strict-aliasing -Wno-unused -Wno-comment -fno-tree-ter -DC
SRG_BASED -DXNO_MTSAFE_API -DXNO_MTSAFE_PWDAPI -DCSRG_BASED -DXUSE_MTSAFE_API -D
XNO_MTSAFE_PWDAPI  -L/usr/local/lib conftest.c -liconv   >&5
configure:18912: $? = 0
configure:18943: result: -liconv
configure:19054: checking for libXp
configure:19072: checking X11/extensions/Print.h usability
configure:19089: cc -c -O2 -pipe -march=nocona -fno-strict-aliasing -std=gnu89 -Wall -g -fno-strict-aliasing -Wno-unused -Wno-comment -fno-tree-ter -DCSRG_BASED -DXNO_MTSAFE_API -DXNO_MTSAFE_PWDAPI -DCSRG_BASED -DXUSE_MTSAFE_API -DXNO_MTSAFE_PWDAPI conftest.c >&5
conftest.c:109:34: error: X11/extensions/Print.h: No such file or directory

What happens is that at some point configure gets lost in saving/restoring
CFLAGS/LDFLAGS and forgets to use -I/usr/local/include and -L/usr/local/lib

it looks like that 

checking for XmuNCopyISOLatin1Lowered  in -lXmu... 

still has our custom flags, while the next test

checking for dirent.h that defines DIR... 

forgets the flags.

How-To-Repeat: 
Below is full output of configure running with -x:
[bugmeister note: contents moved to http://people.freebsd.org/~linimon/tmp/open-motif-log.txt]
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-08-14 07:10:19 UTC
Maintainer of x11-toolkits/open-motif,

Please note that PR ports/170626 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/170626

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2012-08-14 07:10:21 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Marcin Cieślak 2012-08-14 13:53:12 UTC
The following patch seems to address this issue:

--- configure.orig	2010-03-12 15:44:09.000000000 +0100
+++ configure	2012-08-12 18:33:49.000000000 +0200
@@ -19054,6 +19054,7 @@
   { $as_echo "$as_me:$LINENO: checking for libXp" >&5
 $as_echo_n "checking for libXp... " >&6; }
 
+CPPFLAGS="$CPPFLAGS -I$x_includes"
 for ac_header in X11/extensions/Print.h
 do
 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
Comment 4 m.tsatsenko 2012-08-15 14:56:01 UTC
To submitter: please try the following line for CPPFLAGS in port
Makefile and let me know if it works:
CPPFLAGS+=      -DCSRG_BASED -DXUSE_MTSAFE_API -DXNO_MTSAFE_PWDAPI
-I${LOCALBASE}/include

I think it will be better approach than patching configure script.
--
 Mikhail
Comment 5 Marcin Cieślak 2012-08-16 17:29:00 UTC
On Wed, 15 Aug 2012, Mikhail Tsatsenko wrote:

> To submitter: please try the following line for CPPFLAGS in port
> Makefile and let me know if it works:
> CPPFLAGS+=      -DCSRG_BASED -DXUSE_MTSAFE_API -DXNO_MTSAFE_PWDAPI
> -I${LOCALBASE}/include
> 
> I think it will be better approach than patching configure script.

Yes, I can confirm that this fixes the problem mentioned:

#ifndef PRINTING_SUPPORTED
#define PRINTING_SUPPORTED 1
#endif

Thanks!

//Marcin
Comment 6 m.tsatsenko 2012-08-25 20:14:05 UTC
Patch is attached.
Could anybody commit it into ports tree pls

- fix X11/extensions/XPrint.h detection. Reported by: Marcin Cieslak
- Bump PORTREVISION
Comment 7 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2012-09-13 09:00:41 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rm

I will take it.
Comment 8 dfilter service freebsd_committer freebsd_triage 2012-09-13 09:05:47 UTC
Author: rm
Date: Thu Sep 13 08:05:31 2012
New Revision: 304183
URL: http://svn.freebsd.org/changeset/ports/304183

Log:
  - fix detection of X11/extensions/XPrint.h
  - bump PORTREVISION
  
  PR:		170626
  Submitted by:	Mikhail Tsatsenko <m.tsatsenko at gmail dot com> (maintainer)
  Reported by:	Marcin Cieslak <saper at saper dot info>

Modified:
  head/x11-toolkits/open-motif/Makefile

Modified: head/x11-toolkits/open-motif/Makefile
==============================================================================
--- head/x11-toolkits/open-motif/Makefile	Thu Sep 13 07:12:30 2012	(r304182)
+++ head/x11-toolkits/open-motif/Makefile	Thu Sep 13 08:05:31 2012	(r304183)
@@ -8,7 +8,7 @@
 
 PORTNAME=	open-motif
 PORTVERSION=	2.3.3
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	x11-toolkits
 MASTER_SITES=	ftp://ftp.ics.com/openmotif/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}/${PORTVERSION}/
 DISTNAME=	openmotif-${PORTVERSION}
@@ -30,7 +30,7 @@ USE_XORG=	xaw xbitmaps xft
 GNU_CONFIGURE=	yes
 USE_LDCONFIG=	yes
 MAKE_ENV=	LANG=C
-CPPFLAGS+=	-DCSRG_BASED -DXUSE_MTSAFE_API -DXNO_MTSAFE_PWDAPI
+CPPFLAGS+=	-DCSRG_BASED -DXUSE_MTSAFE_API -DXNO_MTSAFE_PWDAPI -I${PREFIX}/include
 USE_CSTD=	gnu89
 
 DEMOS_SRC=	${WRKSRC}/demos/programs
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 9 Ruslan Makhmatkhanov freebsd_committer freebsd_triage 2012-09-13 09:05:57 UTC
State Changed
From-To: feedback->closed

Committed, thank you!