Skip to content

Commit

Permalink
misc/free42: Fix build on armv7
Browse files Browse the repository at this point in the history
PR:		260255
  • Loading branch information
clausecker authored and yurivict committed Dec 6, 2021
1 parent b7b98bc commit 1d7c16f
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 27 deletions.
12 changes: 9 additions & 3 deletions misc/free42/Makefile
@@ -1,5 +1,6 @@
PORTNAME= free42
DISTVERSION= 3.0.7
PORTREVISION= 1
CATEGORIES= misc
MASTER_SITES= http://thomasokken.com/free42/upstream/
DISTNAME= ${PORTNAME}-nologo-${DISTVERSION}
Expand All @@ -11,12 +12,17 @@ LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING

LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \
libfreetype.so:print/freetype2
libfreetype.so:print/freetype2 \
libharfbuzz.so:print/harfbuzz

USES= compiler dos2unix gmake gnome localbase pkgconfig tar:tgz xorg
USE_GNOME= atk cairo gdkpixbuf2 gtk30 pango
USE_XORG= x11 xmu
DOS2UNIX_FILES= gtk/IntelRDFPMathLib20U1/LIBRARY/float128/op_system.h gtk/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h gtk/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h common/bid_functions.h gtk/IntelRDFPMathLib20U1/TESTS/test_bid_functions.h
DOS2UNIX_FILES= gtk/IntelRDFPMathLib20U1/LIBRARY/float128/op_system.h \
gtk/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h \
gtk/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h \
common/bid_functions.h \
gtk/IntelRDFPMathLib20U1/TESTS/test_bid_functions.h

CXXFLAGS+= ${CXXFLAGS_${CHOSEN_COMPILER_TYPE}}
CXXFLAGS_clang= -Wno-c++11-narrowing -Wno-constant-conversion # to accommodate some code breaking with clang-50
Expand All @@ -30,7 +36,7 @@ PLIST_FILES+= bin/${PORTNAME}${v}
.endfor

post-extract:
@cd ${BUILD_WRKSRC} && tar xvfz ../inteldecimal/IntelRDFPMathLib20U1.tar.gz
@cd ${BUILD_WRKSRC} && tar xfz ../inteldecimal/IntelRDFPMathLib20U1.tar.gz

post-patch:
@${REINPLACE_CMD} -e 's|(free42dirname)|("${DATADIR}/skins")|' \
Expand Down
@@ -1,6 +1,24 @@
--- gtk/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h.orig 2021-03-25 17:43:14 UTC
--- gtk/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h.orig 2021-12-06 09:51:34 UTC
+++ gtk/IntelRDFPMathLib20U1/LIBRARY/src/bid_functions.h
@@ -159,11 +159,7 @@ typedef unsigned long fexcept_t;
@@ -36,17 +36,9 @@
#ifndef _BID_FUNCTIONS_H
#define _BID_FUNCTIONS_H

-#if !defined (__GNUC__) || defined(__QNX__)
#include <wchar.h>
-#endif
#include <ctype.h>

-// Fix system header issue on Sun solaris and define required type by ourselves
-#if !defined(_WCHAR_T) && !defined(_WCHAR_T_DEFINED) && !defined(__QNX__)
-typedef int wchar_t;
-#endif
-
-
#ifdef IN_LIBGCC2
// When we are built as the part of the gcc runtime library, libgcc,
// we will use gcc types defined in bid_gcc_intrinsics.h.
@@ -159,11 +151,7 @@ typedef unsigned long fexcept_t;
typedef unsigned bid__int64 fexcept_t;
#endif
#else
Expand Down
11 changes: 6 additions & 5 deletions misc/free42/files/patch-gtk_build-intel-lib.sh
@@ -1,15 +1,16 @@
--- gtk/build-intel-lib.sh.orig 2021-03-30 03:08:43 UTC
--- gtk/build-intel-lib.sh.orig 2021-11-07 11:36:24 UTC
+++ gtk/build-intel-lib.sh
@@ -43,6 +43,8 @@ fi
@@ -41,8 +41,8 @@ else
ENDIAN_ARG=
fi

tar xvfz ../inteldecimal/IntelRDFPMathLib20U1.tar.gz
-tar xvfz ../inteldecimal/IntelRDFPMathLib20U1.tar.gz
cd IntelRDFPMathLib20U1
+sed -i '' -e 's/\r//g' LIBRARY/src/bid_functions.h
+patch -p0 <../intel-lib-freebsd.patch
patch -p0 <../intel-lib-linux.patch

# When building for architectures other than x86 or x86_64, I remove the
@@ -55,11 +57,11 @@ patch -p0 <../intel-lib-linux.patch
@@ -55,11 +55,11 @@ patch -p0 <../intel-lib-linux.patch
# it to x86_64 works when targeting arm64, a 64-bit platform.
# Of course, proceed with caution. Your mileage may vary.

Expand Down
17 changes: 0 additions & 17 deletions misc/free42/files/patch-gtk_intel-lib-freebsd.patch

This file was deleted.

0 comments on commit 1d7c16f

Please sign in to comment.