Opened 11 years ago

Closed 10 years ago

#37328 closed defect (fixed)

nethack @3.4.3 +x11 Build failure

Reported by: nurblieh@… Owned by: yeled@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc:
Port: nethack

Description

nethack with the x11 variant selecetd fails to build, as the X11 headers can not be found.

The bug is that the build.args-appends directive in the Portfile overrides the Makefile's CFLAGS that the x11 variant patches in.

Removing the build.args-apend directive from the Portfile fixes the issue and is, largely unnecessary. (O vs O2 though...)

This is from the x11 Makefile patch,

-CFLAGS = -O -I../include
+CFLAGS = -O -I../include -I/usr/X11R6/include

This is what exists in build.args-append,

build.args-append       CFLAGS="-O2 -I../include"

So the -I/usr/X11R6/include never gets respected.

Attached is a working diff.

Xcode 4.4; Mac OS X 10.8.2

Attachments (1)

nethack-Portfile.patch (312 bytes) - added by nurblieh@… 11 years ago.

Download all attachments as: .zip

Change History (8)

Changed 11 years ago by nurblieh@…

Attachment: nethack-Portfile.patch added

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

We don't want to use /usr/X11R6 for X11; we want to use ${prefix} for that.

comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to yeled@…
Port: nethack added

comment:3 Changed 11 years ago by nurblieh@…

Ah, then potentially there is something wrong with my install or my brain. I have no X11 headers under ${prefix}. The headers do however exist under /usr/X11R6/include , which the x11 variant uses in its patch files.

My understanding is that ${prefix} expands to /opt/local in most cases. The default macports install location.

comment:4 Changed 11 years ago by jmroot (Joshua Root)

Yeah, the x11 variant also needs a dependency on one or more xorg ports.

comment:5 in reply to:  4 Changed 11 years ago by nurblieh@…

Replying to jmr@…:

Yeah, the x11 variant also needs a dependency on one or more xorg ports.

Ah, that makes perfect sense, thanks much. With that intel, here's another patch. Tested on my install.

Index: dports/games/nethack/Portfile
===================================================================
--- dports/games/nethack/Portfile       (revision 100595)
+++ dports/games/nethack/Portfile       (working copy)
@@ -66,6 +66,7 @@
                x11/patch-include__config.h \
                x11/patch-sys__unix__Makefile.src \
                x11/patch-sys__unix__Makefile.top
+       depends_lib-append port:xorg-libXaw
 }
 
 variant autopickup_exceptions {

comment:6 Changed 11 years ago by nurblieh@…

I should mention the above patch is stand-alone. The previously attached patch is obsolete and unnecessary.

comment:7 Changed 10 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.