On Thu, 11 Jun 2020 15:15:34 +0200
Charlene Wendling wrote:

> Hi,
> 
> > http://build-failures.rhaalovely.net/powerpc/2020-05-09/devel/geany.log
> 
> It's a wild guess, but i think it wants a template with a long
> argument because on macppc:
> 
> $ c++ -dM -E - < /dev/null | grep PTRDIFF_MAX
> #define __PTRDIFF_MAX__ 2147483647L
> $ c++ -dM -E - < /dev/null | grep INT_MAX     
> #define __INT_MAX__ 2147483647
> 
> Either way, the below diff fixes the build on macppc, the runtime is
> fine [0] as well. While here i've moved HOMEPAGE to https.
> 
> [...}
> 
> Charlène.
> 
> 
> [0] https://bsd.network/@julianaito/104325481078218916
> 
> 

Since i386 is impacted as well, here is a variant heavily hinted by
sthen@. This builds fine on macppc.


Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/geany/Makefile,v
retrieving revision 1.63
diff -u -p -u -p -r1.63 Makefile
--- Makefile    16 Oct 2019 06:51:42 -0000      1.63
+++ Makefile    18 Aug 2020 17:49:13 -0000
@@ -3,11 +3,12 @@
 COMMENT=       small and lightweight IDE
 
 DISTNAME =     geany-1.36
+REVISION =     0
 SHARED_LIBS +=  geany                     0.0 # 0.0
 
 CATEGORIES=    devel
 
-HOMEPAGE=      http://www.geany.org/
+HOMEPAGE=      https://www.geany.org/
 
 MAINTAINER=    Victor Kukshiev <andrey0bolkon...@gmail.com>
 
Index: patches/patch-scintilla_src_RunStyles_cxx
===================================================================
RCS file: patches/patch-scintilla_src_RunStyles_cxx
diff -N patches/patch-scintilla_src_RunStyles_cxx
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-scintilla_src_RunStyles_cxx   18 Aug 2020 17:49:13 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+i386/powerpc fix for
+"undefined reference to Scintilla::RunStyles<long, char>::RunStyles()"
+
+Index: scintilla/src/RunStyles.cxx
+--- scintilla/src/RunStyles.cxx.orig
++++ scintilla/src/RunStyles.cxx
+@@ -308,7 +308,8 @@ void RunStyles<DISTANCE, STYLE>::Check() const {
+ 
+ template class Scintilla::RunStyles<int, int>;
+ template class Scintilla::RunStyles<int, char>;
+-#if (PTRDIFF_MAX != INT_MAX) || PLAT_HAIKU
++#if (PTRDIFF_MAX != INT_MAX) || PLAT_HAIKU || \
++    ( defined(__OpenBSD__) && defined(_ILP32) )
+ template class Scintilla::RunStyles<ptrdiff_t, int>;
+ template class Scintilla::RunStyles<ptrdiff_t, char>;
+ #endif

Reply via email to