links: Fix X detection

Closes: https://trac.macports.org/ticket/70504
This commit is contained in:
Ryan Carsten Schmidt
2024-11-14 18:39:16 -06:00
parent cba472c31a
commit 0b9b0e0461
3 changed files with 36 additions and 16 deletions
+3 -2
View File
@@ -24,7 +24,8 @@ checksums rmd160 e90763c244fc0e79f0e9ad4ce3d138be3cdc57bb \
maintainers nomaintainer
use_bzip2 yes
depends_build port:pkgconfig
depends_build path:bin/pkg-config:pkgconfig
depends_lib port:bzip2 \
port:libevent \
port:xz \
@@ -32,7 +33,7 @@ depends_lib port:bzip2 \
openssl.branch 3
patchfiles implicit.patch
patchfiles X.patch
configure.args --disable-graphics \
--disable-javascript \
+33
View File
@@ -0,0 +1,33 @@
Fix X detection to work properly.
--- configure.orig 2024-07-27 08:25:08.000000000 -0500
+++ configure 2024-11-14 18:14:04.000000000 -0600
@@ -8941,7 +8941,7 @@
# Check for the libraries.
test -z "$x_direct_test_library" && x_direct_test_library=Xt
- test -z "$x_direct_test_function" && x_direct_test_function='int XtMalloc'
+ test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
# See if we find them without any special options.
# Don't add to $LIBS permanently.
@@ -8951,8 +8951,9 @@
#line 8943 "configure"
#include "confdefs.h"
+#include <${x_direct_test_include}>
int main() {
-${x_direct_test_function}()
+${x_direct_test_function}(0)
; return 0; }
EOF
if { (eval echo configure:8950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
--- rebuild.orig 2024-07-22 15:47:06.000000000 -0500
+++ rebuild 2024-11-14 18:47:14.000000000 -0600
@@ -124,7 +124,6 @@
/DELETE1/-1,/DELETE1/d
/DELETE2/-1,/DELETE2/d
,s/^main/int main/
-,s/XtMalloc/'int XtMalloc'/
,s/foo()/int foo()/
w
q
-14
View File
@@ -1,14 +0,0 @@
Fix implicit declaration of functions.
--- configure
+++ configure
@@ -8951,8 +8951,9 @@
#line 8943 "configure"
#include "confdefs.h"
+#include <X11/Intrinsic.h>
int main() {
-${x_direct_test_function}()
+${x_direct_test_function}(0)
; return 0; }
EOF
if { (eval echo configure:8950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then