You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
xscorch: Fix build failure
Closes: https://trac.macports.org/ticket/66450
This commit is contained in:
+15
-4
@@ -6,7 +6,6 @@ name xscorch
|
||||
version 0.2.1
|
||||
revision 1
|
||||
categories games
|
||||
platforms darwin
|
||||
maintainers nomaintainer
|
||||
license GPL-2
|
||||
|
||||
@@ -23,21 +22,33 @@ homepage http://www.xscorch.org/
|
||||
master_sites ${homepage}releases/
|
||||
|
||||
checksums rmd160 ac8688e40162834db064c2aa18f904748ef56d0e \
|
||||
sha256 a315f7001a020c6b8f644db1c1dc56ccfbb9e3efcbf12c41ac9eb4e5e75cb5f7
|
||||
sha256 a315f7001a020c6b8f644db1c1dc56ccfbb9e3efcbf12c41ac9eb4e5e75cb5f7 \
|
||||
size 849773
|
||||
|
||||
depends_build port:pkgconfig
|
||||
depends_build path:bin/pkg-config:pkgconfig
|
||||
|
||||
depends_lib path:lib/pkgconfig/gtk+-2.0.pc:gtk2 \
|
||||
port:libmikmod
|
||||
|
||||
patchfiles patch-configure.diff \
|
||||
patchfiles change-echo-n-to-printf.patch \
|
||||
implicit.patch \
|
||||
overlapping-memcpy.diff
|
||||
|
||||
if {![string match *gcc* ${configure.compiler}]} {
|
||||
patchfiles-append \
|
||||
no-thread-jumps.patch
|
||||
}
|
||||
|
||||
configure.args --mandir=${prefix}/share/man \
|
||||
--disable-warn \
|
||||
--disable-network \
|
||||
--enable-opt
|
||||
|
||||
configure.cppflags-append \
|
||||
-D__ALLOW_DEPRECATED_GDK__
|
||||
|
||||
installs_libs no
|
||||
|
||||
livecheck.type regex
|
||||
livecheck.url [lindex ${master_sites} 0]
|
||||
livecheck.regex ${name}-(\[0-9.\]+)${extract.suffix}
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
Use printf instead of echo -n to avoid literal "-n" printed onscreen.
|
||||
--- configure.orig 2011-07-31 19:31:11.000000000 -0500
|
||||
+++ configure 2011-09-12 21:47:50.000000000 -0500
|
||||
@@ -16936,7 +16936,7 @@
|
||||
@@ -0,0 +1,27 @@
|
||||
Fix failure to find libmikmod:
|
||||
|
||||
checking for libmikmod - version >= 3.1.5... no
|
||||
|
||||
Because of:
|
||||
|
||||
error: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-declaration]
|
||||
error: implicitly declaring library function 'strcpy' with type 'char *(char *, const char *)' [-Werror,-Wimplicit-function-declaration]
|
||||
--- configure.orig 2011-07-31 19:31:11.000000000 -0500
|
||||
+++ configure 2024-01-10 02:23:19.000000000 -0600
|
||||
@@ -12947,6 +12947,7 @@
|
||||
#include <mikmod.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
|
||||
char* my_strdup (char *str)
|
||||
{
|
||||
@@ -12961,7 +12962,7 @@
|
||||
return new_str;
|
||||
}
|
||||
|
||||
-int main()
|
||||
+int main(void)
|
||||
{
|
||||
int major,minor,micro;
|
||||
int libmikmod_major_version,libmikmod_minor_version,libmikmod_micro_version;
|
||||
@@ -0,0 +1,20 @@
|
||||
Remove -fthread-jumps which causes compile failure with clang when --enable-opt
|
||||
is used because clang does not understand that flag.
|
||||
|
||||
This patch is applied conditionally, when the compiler is not gcc.
|
||||
|
||||
The flag is probably also pointless for gcc since this optimization is included
|
||||
in -O1 and later and this line already uses -O3.
|
||||
|
||||
https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-fthread-jumps
|
||||
--- configure.orig 2011-07-31 19:31:11.000000000 -0500
|
||||
+++ configure 2024-01-10 01:43:56.000000000 -0600
|
||||
@@ -14422,7 +14422,7 @@
|
||||
if test "x$enable_opt" = "xyes" -o \( "x$enable_opt" = "xmaybe" -a "x$CFLAGS" = "x" \); then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: enabled" >&5
|
||||
$as_echo "enabled" >&6; }
|
||||
- LIBJ_CFLAGS_OPT="-O3 -fomit-frame-pointer -finline-functions -funroll-loops -fthread-jumps -DNDEBUG"
|
||||
+ LIBJ_CFLAGS_OPT="-O3 -fomit-frame-pointer -finline-functions -funroll-loops -DNDEBUG"
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not enabled" >&5
|
||||
$as_echo "not enabled" >&6; }
|
||||
Reference in New Issue
Block a user