bison flex: update and build on darwin

This commit is contained in:
Tony Theodore 2018-03-01 15:54:57 +11:00
parent f217236aff
commit 50ba42cce4
7 changed files with 46 additions and 18 deletions

View File

@ -918,9 +918,7 @@ USE_OSGPLUGIN(<plugin2>)
<pre>sudo port install \
autoconf \
automake \
bison \
coreutils \
flex \
gdk-pixbuf2 \
gettext \
gnutar \

View File

@ -0,0 +1,30 @@
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Thu, 1 Mar 2018 15:42:14 +1100
Subject: [PATCH 1/1] fix for crash on High Sierra due to usage of %n in
dynamic format strings
taken from:
https://github.com/macports/macports-ports/commit/14451f57e899ba3bd8672830944209cf0bbb87a7
With format string strictness, High Sierra also enforces that %n isn't used
in dynamic format strings, but we should just disable its use on darwin in
general.
diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
index 1111111..2222222 100644
--- a/lib/vasnprintf.c
+++ b/lib/vasnprintf.c
@@ -4858,7 +4858,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
#endif
*fbp = dp->conversion;
#if USE_SNPRINTF
-# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+# if !defined(__APPLE__) && !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
fbp[1] = '%';
fbp[2] = 'n';
fbp[3] = '\0';

View File

@ -1,9 +1,9 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := bison
$(PKG)_IGNORE := 3%
$(PKG)_VERSION := 2.7.1
$(PKG)_CHECKSUM := b409adcbf245baadb68d2f66accf6fdca5e282cafec1b865f4b5e963ba8ea7fb
$(PKG)_IGNORE :=
$(PKG)_VERSION := 3.0.4
$(PKG)_CHECKSUM := a72428c7917bdf9fa93cb8181c971b6e22834125848cf1d03ce10b1bb0716fe1
$(PKG)_SUBDIR := bison-$($(PKG)_VERSION)
$(PKG)_FILE := bison-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://ftp.gnu.org/gnu/bison/$($(PKG)_FILE)
@ -13,6 +13,9 @@ $(PKG)_OWNER := https://github.com/tonytheodore
$(PKG)_TARGETS := $(BUILD)
$(PKG)_DEPS := flex
# recursive variable so always use literal instead of $(PKG)
MXE_REQS_PKGS += $(BUILD)~bison
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://ftp.gnu.org/gnu/bison/?C=M;O=D' | \
$(SED) -n 's,.*<a href="bison-\([0-9][^"]*\)\.tar.*,\1,p' | \
@ -21,9 +24,5 @@ define $(PKG)_UPDATE
endef
define $(PKG)_BUILD_$(BUILD)
mkdir '$(1).build'
cd '$(1).build' && '$(1)/configure' \
--prefix='$(PREFIX)/$(TARGET)'
$(MAKE) -C '$(1).build' -j '$(JOBS)'
$(MAKE) -C '$(1).build' -j 1 install
$(AUTOTOOLS_BUILD)
endef

View File

@ -0,0 +1 @@
../bison-1-fixes.patch

View File

@ -0,0 +1 @@
../bison.mk

View File

@ -0,0 +1 @@
../flex.mk

View File

@ -2,8 +2,8 @@
PKG := flex
$(PKG)_IGNORE :=
$(PKG)_VERSION := 2.5.39
$(PKG)_CHECKSUM := add2b55f3bc38cb512b48fad7d72f43b11ef244487ff25fc00aabec1e32b617f
$(PKG)_VERSION := 2.6.0
$(PKG)_CHECKSUM := 24e611ef5a4703a191012f80c1027dc9d12555183ce0ecd46f3636e587e9b8e9
$(PKG)_SUBDIR := flex-$($(PKG)_VERSION)
$(PKG)_FILE := flex-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/flex/$($(PKG)_FILE)
@ -12,6 +12,9 @@ $(PKG)_OWNER := https://github.com/tonytheodore
$(PKG)_TARGETS := $(BUILD)
$(PKG)_DEPS :=
# recursive variable so always use literal instead of $(PKG)
MXE_REQS_PKGS += $(BUILD)~flex
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://sourceforge.net/projects/flex/files/' | \
grep -i 'flex/files/' | \
@ -20,10 +23,5 @@ define $(PKG)_UPDATE
endef
define $(PKG)_BUILD_$(BUILD)
mkdir '$(1).build'
cd '$(1).build' && '$(1)/configure' \
--prefix='$(PREFIX)/$(TARGET)' \
--disable-shared
$(MAKE) -C '$(1).build' -j '$(JOBS)'
$(MAKE) -C '$(1).build' -j 1 install
$(AUTOTOOLS_BUILD)
endef