Opened 12 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)
Change History (8)
Changed 12 years ago by nurblieh@…
Attachment: | nethack-Portfile.patch added |
---|
comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | changed from macports-tickets@… to yeled@… |
---|---|
Port: | nethack added |
comment:3 Changed 12 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 follow-up: 5 Changed 12 years ago by jmroot (Joshua Root)
Yeah, the x11 variant also needs a dependency on one or more xorg ports.
comment:5 Changed 12 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 12 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: | new → closed |
We don't want to use /usr/X11R6 for X11; we want to use ${prefix} for that.