Merge upstream/master changes

pull/984/head
darealshinji 7 years ago
commit bfdb83d725

@ -0,0 +1,2 @@
If a package fails to build, upload the log file to
https://gist.github.com/ and put the link here.

@ -0,0 +1,19 @@
Please read http://mxe.cc/#creating-packages
In particular, make sure that your build rules:
* install .pc file,
* install bin/test-pkg.exe compiled with flags by pkg-config,
* install .dll to bin/ and .a, .dll.a to lib/,
* use $(TARGET)-cmake instead of cmake,
* build in `$(BUILD_DIR)` instead of `$(SOURCE_DIR)`,
* do not run target executables with Wine,
* do not download anything while building,
* do not install documentation,
* do not install .exe files except test and build systems,
and .patch files are generated by tools/patch-tool-mxe.
If you add a package, you can use tool tools/skeleton.py.
Thanks!

1
.gitignore vendored

@ -1,5 +1,4 @@
/settings.mk
/build-matrix.html
/usr*/
/gits/
/log*/

@ -1,18 +1,15 @@
dist: trusty
language: c
sudo: false
script:
- make versions.json
- git config --global user.email 'mxebot@gmail.com'
- git config --global user.name 'MXEBot as Travis CI'
- git config --global push.default simple
- git config credential.helper "store --file=.git/credentials"
- echo "https://${GH_TOKEN}:@github.com" > .git/credentials
- git remote set-url origin 'https://github.com/mxe/mxe.git'
- git commit -a -m 'Update versions.json' || true
- git push origin HEAD:master
- git push origin HEAD:gh-pages
- make docs/build-matrix.html docs/packages.json OS_SHORT_NAME=disable-native-plugins
- if [ "$GH_TOKEN" != "" ]; then ./tools/travis-push.sh; fi
# Package wxwidgets is downloaded for more than 10 minutes,
# Travis failed because of no output for 10 minutes.
- while true; do sleep 60; echo -n ' '; done &
- make download -j 6 -k MXE_PLUGIN_DIRS="$(./tools/plugins-with-additional-packages.sh)"
env:
global:
secure: M3fS92HUV+3PklS3h1CVG+TuhZLYgGEeWVsL0ICvJKnbMSvaqm0/OAxwlXbKLkZ/j6JK2yGgChx8QzffkoRr67tHCaPM7cR7mFRn7GivJcgZcA8UAaL9V4AtEHqFIonat8XEsxruUPJyVHgGiTBQfKphQEGtKtHF8iSUhvIxqC8=
secure: "i8BKOLA0U/zZchCQmnTmK9yCawoWlRJKXlpSvdmSo5w+OyFbWO372CmMFxyAzSa9umC3QLhCDzd9CcpqtDsSZTKPWqCTPZ+HYKMBmFi8jIxqWOuNVn3KTGWOhpWM6az/w7lDqrJ/W30H2wnJBRJFocOiRdkrSOpuLDv0s0loFsU="

@ -1,33 +1,49 @@
The MIT License (MIT)
=====================
MXE is licensed under the MIT Licence. The makefiles and utilities under
`plugins/`, `src/`, and `tools/` all share this licence.
Copyright (c) 2007-2015
> Copyright (c) 2007-2016
>
> * Volker Diels-Grabsch
> * Mark Brand
> * Tony Theodore
> * Martin Gerhardy
> * Tiancheng "Timothy" Gu
> * Boris Nagaev
> * ... and many other [contributors][contributors]
>
> (contact via the [project mailing list][mailing-list] or
> [issue tracker][issue-tracker])
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all
> copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> SOFTWARE.
* Volker Diels-Grabsch
* Mark Brand
* Tony Theodore
* Martin Gerhardy
* Tiancheng "Timothy" Gu
* Boris Nagaev
* ... and many other contributors
MXE distributes code from the following projects in the `ext/` directory:
(contact via the project mailing list)
- [GNU config.guess][config.guess] [GPL3+ with Autoconf exception]
- [GNU Make Standard Library][gmsl] [BSD 3-clause]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The [packages][packages] downloaded by MXE (ending up in `pkg/`) each
have their own licence(s). Please see the individual source trees and/or
websites for further details.
[contributors]: https://github.com/mxe/mxe/graphs/contributors
[mailing-list]: https://lists.nongnu.org/mailman/listinfo/mingw-cross-env-list
[issue-tracker]: https://github.com/mxe/mxe/issues
[config.guess]: https://github.com/mxe/mxe/blob/master/ext/config.guess#L3-L27
[gmsl]: https://github.com/mxe/mxe/blob/master/ext/gmsl#L8-L40
[packages]: http://mxe.cc/#packages

@ -1,24 +1,25 @@
# This file is part of MXE.
# See index.html for further information.
# This file is part of MXE. See LICENSE.md for licensing information.
MAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
TOP_DIR := $(patsubst %/,%,$(dir $(MAKEFILE)))
EXT_DIR := $(TOP_DIR)/ext
# GNU Make Standard Library (http://gmsl.sourceforge.net/)
# See doc/gmsl.html for further information
# GNU Make Standard Library (https://gmsl.sourceforge.io/)
# See docs/gmsl.html for further information
include $(EXT_DIR)/gmsl
MXE_TRIPLETS := i686-w64-mingw32 x86_64-w64-mingw32
MXE_LIB_TYPES := static shared
MXE_TARGET_LIST := $(foreach TRIPLET,$(MXE_TRIPLETS),\
$(addprefix $(TRIPLET).,$(MXE_LIB_TYPES)))
MXE_TARGET_LIST := $(strip $(foreach TRIPLET,$(MXE_TRIPLETS),\
$(addprefix $(TRIPLET).,$(MXE_LIB_TYPES))))
MXE_TARGETS := i686-w64-mingw32.static
.DEFAULT_GOAL := all-filtered
DEFAULT_MAX_JOBS := 6
SOURCEFORGE_MIRROR := downloads.sourceforge.net
PKG_MIRROR := s3.amazonaws.com/mxe-pkg
PKG_CDN := d1yihgixbnrglp.cloudfront.net
PKG_MIRROR := http://s3.amazonaws.com/mxe-pkg
PKG_CDN := http://d1yihgixbnrglp.cloudfront.net
GITLAB_BACKUP := http://gitlab.com/starius/mxe-backup2/raw/master/
PWD := $(shell pwd)
SHELL := bash
@ -34,30 +35,34 @@ LIBTOOLIZE := $(shell glibtoolize --help >/dev/null 2>&1 && echo g)libtoolize
PATCH := $(shell gpatch --help >/dev/null 2>&1 && echo g)patch
SED := $(shell gsed --help >/dev/null 2>&1 && echo g)sed
SORT := $(shell gsort --help >/dev/null 2>&1 && echo g)sort
WGET := wget --no-check-certificate \
--user-agent=$(shell wget --version | \
$(SED) -n 's,GNU \(Wget\) \([0-9.]*\).*,\1/\2,p')
DEFAULT_UA := $(shell wget --version | $(SED) -n 's,GNU \(Wget\) \([0-9.]*\).*,\1/\2,p')
WGET_TOOL = wget
WGET = $(WGET_TOOL) --user-agent='$(or $($(1)_UA),$(DEFAULT_UA))'
REQUIREMENTS := autoconf automake autopoint bash bison bzip2 cmake flex \
REQUIREMENTS := autoconf automake autopoint bash bison bzip2 flex \
$(BUILD_CC) $(BUILD_CXX) gperf intltoolize $(LIBTOOL) \
$(LIBTOOLIZE) $(MAKE) openssl $(PATCH) $(PERL) python \
ruby scons $(SED) $(SORT) unzip wget xz 7za gdk-pixbuf-csource
PREFIX := $(PWD)/usr
LOG_DIR := $(PWD)/log
GITS_DIR := $(PWD)/gits
GIT_HEAD := $(shell git rev-parse HEAD)
TIMESTAMP := $(shell date +%Y%m%d_%H%M%S)
PKG_DIR := $(PWD)/pkg
TMP_DIR = $(MXE_TMP)/tmp-$(1)
PKGS := $(call set_create,\
$(shell $(SED) -n 's/^.* class="package">\([^<]*\)<.*$$/\1/p' '$(TOP_DIR)/index.html'))
BUILD := $(shell '$(EXT_DIR)/config.guess')
PATH := $(PREFIX)/$(BUILD)/bin:$(PREFIX)/bin:$(PATH)
# set to empty or $(false) to disable stripping
STRIP_TOOLCHAIN := $(true)
STRIP_LIB := $(false)
STRIP_EXE := $(true)
# All pkgs have (implied) order-only dependencies on MXE_CONF_PKGS.
# These aren't meaningful to the pkg list in index.html so
# These aren't meaningful to the pkg list in http://mxe.cc/#packages so
# use a list in case we want to separate autotools, cmake etc.
MXE_CONF_PKGS := mxe-conf
PKGS += $(MXE_CONF_PKGS)
MXE_CONF_PKGS := cmake-conf mxe-conf
# define some whitespace variables
define newline
@ -65,8 +70,15 @@ define newline
endef
\n := $(newline)
comma := ,
null :=
space := $(null) $(null)
repeat = $(subst x,$(1),$(subst $(space),,$(call int_encode,$(2))))
MXE_DISABLE_DOC_OPTS = \
ac_cv_prog_HAVE_DOXYGEN="false" \
--disable-doxygen
MXE_CONFIGURE_OPTS = \
--host='$(TARGET)' \
@ -74,10 +86,29 @@ MXE_CONFIGURE_OPTS = \
--prefix='$(PREFIX)/$(TARGET)' \
$(if $(BUILD_STATIC), \
--enable-static --disable-shared , \
--disable-static --enable-shared )
--disable-static --enable-shared ) \
$(MXE_DISABLE_DOC_OPTS)
# GCC threads and exceptions
MXE_GCC_THREADS = \
$(if $(findstring posix,$(TARGET)),posix,win32)
$(if $(findstring posix,$(or $(TARGET),$(1))),posix,win32)
# allowed exception handling for targets
# default (first item) and alternate, revisit if gcc/mingw-w64 change defaults
i686-w64-mingw32_EH := sjlj dw2
x86_64-w64-mingw32_EH := seh sjlj
# functions to determine exception handling from user-specified target
# $(or $(TARGET),$(1)) allows use as both function and inline snippet
TARGET_EH_LIST = $($(firstword $(call split,.,$(or $(TARGET),$(1))))_EH)
DEFAULT_EH = $(firstword $(TARGET_EH_LIST))
GCC_EXCEPTIONS = \
$(lastword $(DEFAULT_EH) \
$(filter $(TARGET_EH_LIST),$(call split,.,$(or $(TARGET),$(1)))))
MXE_GCC_EXCEPTION_OPTS = \
$(if $(call seq,sjlj,$(GCC_EXCEPTIONS)),--enable-sjlj-exceptions) \
$(if $(call seq,dw2,$(GCC_EXCEPTIONS)),--disable-sjlj-exceptions)
# Append these to the "make" and "make install" steps of autotools packages
# in order to neither build nor install unwanted binaries, manpages,
@ -86,6 +117,7 @@ MXE_GCC_THREADS = \
# install files such as pcre-config (which we do want to be installed).
MXE_DISABLE_PROGRAMS = \
dist_bin_SCRIPTS= \
bin_PROGRAMS= \
sbin_PROGRAMS= \
noinst_PROGRAMS= \
@ -112,7 +144,18 @@ MXE_DISABLE_DOCS = \
dist_man7_MANS= \
dist_man8_MANS= \
dist_man9_MANS= \
nodist_man_MANS= \
nodist_man1_MANS= \
nodist_man2_MANS= \
nodist_man3_MANS= \
nodist_man4_MANS= \
nodist_man5_MANS= \
nodist_man6_MANS= \
nodist_man7_MANS= \
nodist_man8_MANS= \
nodist_man9_MANS= \
notrans_dist_man_MANS= \
MANLINKS= \
info_TEXINFOS= \
doc_DATA= \
dist_doc_DATA= \
@ -130,26 +173,42 @@ MAKE_SHARED_FROM_STATIC = \
--libdir '$(PREFIX)/$(TARGET)/lib' \
--bindir '$(PREFIX)/$(TARGET)/bin'
# MXE_GET_GITHUB functions can be removed once all packages use GH_CONF
define MXE_GET_GITHUB_SHA
$(WGET) -q -O- 'https://api.github.com/repos/$(strip $(1))/git/refs/heads/$(strip $(2))' \
| $(SED) -n 's#.*"sha": "\([^"]\{10\}\).*#\1#p' \
| head -1
endef
define MXE_GET_GITHUB_TAGS
define MXE_GET_GITHUB_ALL_TAGS
$(WGET) -q -O- 'https://api.github.com/repos/$(strip $(1))/git/refs/tags/' \
| $(SED) -n 's#.*"ref": "refs/tags/\([^"]*\).*#\1#p' \
| $(SED) -n 's#.*"ref": "refs/tags/\([^"]*\).*#\1#p'
endef
define MXE_GET_GITHUB_TAGS
$(call MXE_GET_GITHUB_ALL_TAGS, $(1)) \
| $(SED) 's,^$(strip $(2)),,g' \
| $(SORT) -V \
| tail -1
endef
# include github related functions
include $(PWD)/github.mk
# shared lib preload to disable networking, enable faketime etc
PRELOAD_VARS := LD_PRELOAD DYLD_FORCE_FLAT_NAMESPACE DYLD_INSERT_LIBRARIES
# use a minimal whitelist of safe environment variables
ENV_WHITELIST := PATH LANG MAKE% MXE% %PROXY %proxy LD_LIBRARY_PATH ACLOCAL_PATH
unexport $(filter-out $(ENV_WHITELIST),$(shell env | cut -d '=' -f1))
# basic working shell environment and mxe variables
# see http://www.linuxfromscratch.org/lfs/view/stable/chapter04/settingenvironment.html
ENV_WHITELIST := EDITOR HOME LANG PATH %PROXY %proxy PS1 TERM
ENV_WHITELIST += MAKE% MXE% $(PRELOAD_VARS) WINEPREFIX
# disable wine with readonly directory (created by mxe-conf)
# see https://github.com/mxe/mxe/issues/841
export WINEPREFIX=$(PREFIX)/readonly
# OS/Distro related issues - "unsafe" but practical
# 1. https://github.com/mxe/mxe/issues/697
ENV_WHITELIST += ACLOCAL_PATH LD_LIBRARY_PATH
unexport $(filter-out $(ENV_WHITELIST),$(shell env | cut -d '=' -f1))
SHORT_PKG_VERSION = \
$(word 1,$(subst ., ,$($(1)_VERSION))).$(word 2,$(subst ., ,$($(1)_VERSION)))
@ -157,6 +216,7 @@ SHORT_PKG_VERSION = \
UNPACK_ARCHIVE = \
$(if $(filter %.tgz, $(1)),tar xzf '$(1)', \
$(if $(filter %.tar.gz, $(1)),tar xzf '$(1)', \
$(if $(filter %.tar.Z, $(1)),tar xzf '$(1)', \
$(if $(filter %.tbz2, $(1)),tar xjf '$(1)', \
$(if $(filter %.tar.bz2, $(1)),tar xjf '$(1)', \
$(if $(filter %.tar.lzma,$(1)),xz -dc -F lzma '$(1)' | tar xf -, \
@ -164,56 +224,86 @@ UNPACK_ARCHIVE = \
$(if $(filter %.tar.xz, $(1)),xz -dc '$(1)' | tar xf -, \
$(if $(filter %.7z, $(1)),7za x '$(1)', \
$(if $(filter %.zip, $(1)),unzip -q '$(1)', \
$(error Unknown archive format: $(1)))))))))))
$(if $(filter %.deb, $(1)),ar x '$(1)' && tar xf data.tar*, \
$(error Unknown archive format: $(1)))))))))))))
UNPACK_PKG_ARCHIVE = \
$(call UNPACK_ARCHIVE,$(PKG_DIR)/$($(1)_FILE))
PATCHES = $(sort $(wildcard $(TOP_DIR)/src/$(1)-[0-9]*.patch))
# some shortcuts for awareness of MXE_PLUGIN_DIRS
# all files for extension plugins will be considered for outdated checks
PKG_MAKEFILES = $(realpath $(sort $(wildcard $(addsuffix /$(1).mk, $(MXE_PLUGIN_DIRS)))))
PKG_TESTFILES = $(realpath $(sort $(wildcard $(addsuffix /$(1)-test*, $(MXE_PLUGIN_DIRS)))))
# allow packages to specify a list of zero or more patches
PKG_PATCHES = $(if $(findstring undefined,$(origin $(1)_PATCHES)), \
$(realpath $(sort $(wildcard $(addsuffix /$(1)-[0-9]*.patch, $(MXE_PLUGIN_DIRS))))) \
$(else), \
$($(1)_PATCHES))
define PREPARE_PKG_SOURCE
cd '$(2)' && $(call UNPACK_PKG_ARCHIVE,$(1))
cd '$(2)/$($(1)_SUBDIR)'
$(foreach PKG_PATCH,$(PATCHES),
(cd '$(2)/$($(1)_SUBDIR)' && $(PATCH) -p1 -u) < $(PKG_PATCH))
$(if $($(1)_SOURCE_TREE),\
ln -si '$(realpath $($(1)_SOURCE_TREE))' '$(2)/$($(1)_SUBDIR)'
$(else),\
cd '$(2)' && $(call UNPACK_PKG_ARCHIVE,$(1))
cd '$(2)/$($(1)_SUBDIR)'
$(foreach PKG_PATCH,$(PKG_PATCHES),
(cd '$(2)/$($(1)_SUBDIR)' && $(PATCH) -p1 -u) < $(PKG_PATCH))
)
endef
PKG_CHECKSUM = \
openssl sha256 '$(PKG_DIR)/$($(1)_FILE)' 2>/dev/null | $(SED) -n 's,^.*\([0-9a-f]\{64\}\)$$,\1,p'
openssl dgst -sha256 '$(PKG_DIR)/$($(1)_FILE)' 2>/dev/null | $(SED) -n 's,^.*\([0-9a-f]\{64\}\)$$,\1,p'
CHECK_PKG_ARCHIVE = \
[ '$($(1)_CHECKSUM)' == "`$$(call PKG_CHECKSUM,$(1))`" ]
$(if $($(1)_SOURCE_TREE),\
$(PRINTF_FMT) '[local]' '$(1)' '$($(1)_SOURCE_TREE)' | $(RTRIM)\
$(else),\
[ '$($(1)_CHECKSUM)' == "`$$(call PKG_CHECKSUM,$(1))`" ]\
)
ESCAPE_PKG = \
echo '$($(1)_FILE)' | perl -lpe 's/([^A-Za-z0-9])/sprintf("%%%02X", ord($$$$1))/seg'
BACKUP_DOWNLOAD = \
(echo "MXE Warning! Downloading $(1) from backup." >&2 && \
($(WGET) -O- $(PKG_MIRROR)/`$(call ESCAPE_PKG,$(1))` || \
$(WGET) -O- $(PKG_CDN)/`$(call ESCAPE_PKG,$(1))`))
($(WGET) --no-check-certificate -O '$(PKG_DIR)/.tmp-$($(1)_FILE)' $(PKG_MIRROR)/`$(call ESCAPE_PKG,$(1))` || \
$(WGET) --no-check-certificate -O '$(PKG_DIR)/.tmp-$($(1)_FILE)' $(PKG_CDN)/`$(call ESCAPE_PKG,$(1))` || \
$(WGET) --no-check-certificate -O '$(PKG_DIR)/.tmp-$($(1)_FILE)' $(GITLAB_BACKUP)/`$(call ESCAPE_PKG,$(1))`_$($(1)_CHECKSUM)))
DOWNLOAD_PKG_ARCHIVE = \
$(if $($(1)_SOURCE_TREE),\
true\
$(else),\
mkdir -p '$(PKG_DIR)' && ( \
$(WGET) -T 30 -t 3 -O- '$($(1)_URL)' \
$(WGET) -T 30 -t 3 -O '$(PKG_DIR)/.tmp-$($(1)_FILE)' '$($(1)_URL)' \
$(if $($(1)_URL_2), \
|| (echo "MXE Warning! Downloading $(1) from second URL." >&2 && \
$(WGET) -T 30 -t 3 -O- '$($(1)_URL_2)')) \
$(WGET) -T 30 -t 3 -O '$(PKG_DIR)/.tmp-$($(1)_FILE)' '$($(1)_URL_2)')) \
$(if $(MXE_NO_BACKUP_DL),, \
|| $(BACKUP_DOWNLOAD)) \
) \
) && cat '$(PKG_DIR)/.tmp-$($(1)_FILE)' \
$(if $($(1)_FIX_GZIP), \
| gzip -d | gzip -9n, \
) \
> '$(PKG_DIR)/$($(1)_FILE)' || \
> '$(PKG_DIR)/$($(1)_FILE)' && \
rm '$(PKG_DIR)/.tmp-$($(1)_FILE)' || \
( echo; \
echo 'Download failed!'; \
echo; \
rm -f '$(PKG_DIR)/$($(1)_FILE)'; )
rm -f '$(PKG_DIR)/$($(1)_FILE)' '$(PKG_DIR)/.tmp-$($(1)_FILE)'; )\
)
# open issue from 2002:
# https://savannah.gnu.org/bugs/?712
ifneq ($(words $(PWD)),1)
$(error GNU Make chokes on paths with spaces)
endif
# dollar signs also cause troubles
ifneq (,$(findstring $$,$(PWD)))
$(error GNU Make chokes on paths with dollar signs)
endif
ifeq ($(IGNORE_SETTINGS),yes)
$(info [ignore settings.mk])
else ifeq ($(wildcard $(PWD)/settings.mk),$(PWD)/settings.mk)
@ -222,7 +312,7 @@ else
$(info [create settings.mk])
$(shell { \
echo '# This is a template of configuration file for MXE. See'; \
echo '# index.html for more extensive documentations.'; \
echo '# docs/index.html for more extensive documentations.'; \
echo; \
echo '# This variable controls the number of compilation processes'; \
echo '# within one package ("intra-package parallelism").'; \
@ -237,6 +327,10 @@ else
echo '# This variable controls the targets that will build.'; \
echo '#MXE_TARGETS := $(MXE_TARGET_LIST)'; \
echo; \
echo '# This variable controls which plugins are in use.'; \
echo '# See plugins/README.md for further information.'; \
echo '#override MXE_PLUGIN_DIRS += plugins/apps plugins/native'; \
echo; \
echo '# This variable controls the download mirror for SourceForge,'; \
echo '# when it is used. Enabling the value below means auto.'; \
echo '#SOURCEFORGE_MIRROR := downloads.sourceforge.net'; \
@ -244,23 +338,22 @@ else
echo '# The three lines below makes `make` build these "local'; \
echo '# packages" instead of all packages.'; \
echo '#LOCAL_PKG_LIST := boost curl file flac lzo pthreads vorbis wxwidgets'; \
echo '#.DEFAULT local-pkg-list:'; \
echo '#.DEFAULT_GOAL := local-pkg-list'; \
echo '#local-pkg-list: $$(LOCAL_PKG_LIST)'; \
} >'$(PWD)/settings.mk')
endif
ifneq ($(LOCAL_PKG_LIST),)
.DEFAULT_GOAL := local-pkg-list
$(info [pkg-list] $(LOCAL_PKG_LIST))
endif
# Numeric min and max list functions
LIST_NMAX = $(shell echo '$(strip $(1))' | tr ' ' '\n' | sort -n | tail -1)
LIST_NMIN = $(shell echo '$(strip $(1))' | tr ' ' '\n' | sort -n | head -1)
NPROCS := $(shell nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 1)
JOBS_AUTO := $(call LIST_NMIN, $(DEFAULT_MAX_JOBS) $(NPROCS))
JOBS := $(strip $(if $(findstring undefined,$(origin JOBS)),\
$(if $(and $(MAKECMDGOALS),$(filter $(MAKECMDGOALS),$(PKGS))), \
$(info [using autodetected $(JOBS_AUTO) job(s)])) \
$(JOBS_AUTO)\
,\
$(JOBS)))
NPROCS := $(shell nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 1)
JOBS := $(call LIST_NMIN, $(DEFAULT_MAX_JOBS) $(NPROCS))
# cache some target string manipulation functions
# `memoize` and `uc` from gmsl
@ -287,12 +380,16 @@ LOOKUP_PKG_RULE = $(strip \
$(call set,LOOKUP_PKG_RULE_,$(1)_$(2)_$(or $(5),$(3)),$(1)_$(2)_$(3))\
$(1)_$(2)_$(3))))
.PHONY: all
all: all-filtered
# Core packages.
override MXE_PLUGIN_DIRS := $(realpath $(TOP_DIR)/src) $(MXE_PLUGIN_DIRS)
# Build native requirements for certain systems
OS_SHORT_NAME := $(call lc,$(shell lsb_release -sc 2>/dev/null || uname -s))
override MXE_PLUGIN_DIRS += $(realpath $(TOP_DIR)/plugins/native/$(OS_SHORT_NAME))
.PHONY: check-requirements
define CHECK_REQUIREMENT
@if ! $(1) --help &>/dev/null; then \
@if ! ( $(1) --help || $(1) help ) &>/dev/null; then \
echo 'Missing requirement: $(1)'; \
touch check-requirements-failed; \
fi
@ -305,17 +402,20 @@ define CHECK_REQUIREMENT_VERSION
fi
endef
$(shell [ -d '$(PREFIX)/installed' ] || mkdir -p '$(PREFIX)/installed')
%/.gitkeep:
+@mkdir -p '$(dir $@)'
@touch '$@'
check-requirements: $(PREFIX)/installed/check-requirements
$(PREFIX)/installed/check-requirements: $(MAKEFILE)
$(PREFIX)/installed/check-requirements: $(MAKEFILE) | $(PREFIX)/installed/.gitkeep
@echo '[check requirements]'
$(foreach REQUIREMENT,$(REQUIREMENTS),$(call CHECK_REQUIREMENT,$(REQUIREMENT)))
$(call CHECK_REQUIREMENT_VERSION,autoconf,2\.6[7-9]\|2\.[7-9][0-9])
$(call CHECK_REQUIREMENT_VERSION,autoconf,2\.6[8-9]\|2\.[7-9][0-9])
$(call CHECK_REQUIREMENT_VERSION,automake,1\.11\.[3-9]\|1\.[1-9][2-9]\(\.[0-9]\+\)\?)
@if [ -e check-requirements-failed ]; then \
echo; \
echo 'Please have a look at "index.html" to ensure'; \
echo 'Please have a look at "docs/index.html" to ensure'; \
echo 'that your system meets all requirements.'; \
echo; \
rm check-requirements-failed; \
@ -323,13 +423,22 @@ $(PREFIX)/installed/check-requirements: $(MAKEFILE)
fi
@touch '$@'
include $(patsubst %,$(TOP_DIR)/src/%.mk,$(PKGS))
.PHONY: print-git-oneline
print-git-oneline: $(PREFIX)/installed/print-git-oneline-$(GIT_HEAD)
$(PREFIX)/installed/print-git-oneline-$(GIT_HEAD): | $(PREFIX)/installed/.gitkeep
@git log --pretty=tformat:'[git-log] %h %s' -1 | cat
@rm -f '$(PREFIX)/installed/print-git-oneline-'*
@touch '$@'
BUILD_PKGS := $(call set_create, \
$(foreach PKG, \
$(shell grep -l 'BUILD_$$(BUILD)' '$(TOP_DIR)/src/'*.mk | \
$(SED) -n 's,.*src/\(.*\)\.mk,\1,p'), \
$(if $(value $(call LOOKUP_PKG_RULE,$(PKG),BUILD,$(BUILD))), $(PKG))))
# include files from MXE_PLUGIN_DIRS, set base filenames and `all-<plugin>` target
PLUGIN_FILES := $(realpath $(wildcard $(addsuffix /*.mk,$(MXE_PLUGIN_DIRS))))
PLUGIN_PKGS := $(basename $(notdir $(PLUGIN_FILES)))
$(foreach FILE,$(PLUGIN_FILES),\
$(eval $(basename $(notdir $(FILE)))_MAKEFILE ?= $(FILE)) \
$(eval $(basename $(notdir $(FILE)))_TEST_FILE ?= $(wildcard $(basename $(FILE))-test.*)) \
$(eval all-$(lastword $(call split,/,$(dir $(FILE)))): $(basename $(notdir $(FILE)))))
include $(PLUGIN_FILES)
PKGS := $(sort $(MXE_CONF_PKGS) $(PLUGIN_PKGS))
# create target sets for PKG_TARGET_RULE loop to avoid creating empty rules
# and having to explicitly disable $(BUILD) for most packages
@ -351,43 +460,53 @@ PKG_COL_WIDTH := $(call plus,2,$(call LIST_NMAX, $(sort $(call map, strlen, $
MAX_TARGET_WIDTH := $(call LIST_NMAX, $(sort $(call map, strlen, $(MXE_TARGETS))))
TARGET_COL_WIDTH := $(call subtract,100,$(call plus,$(PKG_COL_WIDTH),$(MAX_TARGET_WIDTH)))
PRINTF_FMT := printf '%-11s %-$(PKG_COL_WIDTH)s %-$(TARGET_COL_WIDTH)s %-15s %s\n'
RTRIM := $(SED) 's, \+$$$$,,'
WRAP_MESSAGE = $(\n)$(\n)$(call repeat,-,60)$(\n)$(1)$(and $(2),$(\n)$(\n)$(2))$(\n)$(call repeat,-,60)$(\n)
.PHONY: download
download: $(addprefix download-,$(PKGS))
.PHONY: build-requirements
build-requirements:
@$(MAKE) -f '$(MAKEFILE)' $(BUILD_PKGS) MXE_TARGETS=$(BUILD) DONT_CHECK_REQUIREMENTS=true
define TARGET_RULE
$(if $(findstring i686-pc-mingw32,$(1)),
$(error Deprecated target specified: "$(1)". Please use \
i686-w64-mingw32.[$(subst $(space),|,$(MXE_LIB_TYPES))] instead))
$(if $(filter $(addsuffix %,$(MXE_TARGET_LIST) $(BUILD) $(MXE_TRIPLETS)),$(1)),,
$(error Invalid target specified: "$(1)"))
$(if $(findstring 1,$(words $(subst ., ,$(filter-out $(BUILD),$(1))))),
@echo
@echo '------------------------------------------------------------'
@echo 'Warning: Deprecated target name $(1) specified'
@echo
@echo 'Please use $(1).[$(subst $(space),|,$(MXE_LIB_TYPES))] instead'
@echo 'See index.html for further information'
@echo '------------------------------------------------------------'
@echo)
$(if $(findstring i686-pc-mingw32,$(1)),\
$(error $(call WRAP_MESSAGE,\
Obsolete target specified: "$(1)",\
Please use i686-w64-mingw32.[$(subst $(space),|,$(MXE_LIB_TYPES))]$(\n)\
i686-pc-mingw32 removed 2014-10-14 (https://github.com/mxe/mxe/pull/529)\
)))\
$(if $(filter $(addsuffix %,$(MXE_TARGET_LIST) $(BUILD) $(MXE_TRIPLETS)),$(1)),,\
$(error $(call WRAP_MESSAGE,\
Invalid target specified: "$(1)",\
Please use:$(\n)\
$(subst $(space),$(\n) ,$(MXE_TARGET_LIST))\
)))\
$(if $(findstring 1,$(words $(subst ., ,$(filter-out $(BUILD),$(1))))),\
$(warning $(call WRAP_MESSAGE,\
Warning: Deprecated target specified "$(1)",\
Please use $(1).[$(subst $(space),|,$(MXE_LIB_TYPES))]$(\n) \
)))
endef
$(foreach TARGET,$(MXE_TARGETS),$(eval $(call TARGET_RULE,$(TARGET))))
$(foreach TARGET,$(MXE_TARGETS),$(call TARGET_RULE,$(TARGET)))
define PKG_RULE
# configure GitHub metadata if GH_CONF is set
$(if $($(PKG)_GH_CONF),$(eval $(MXE_SETUP_GITHUB)))
.PHONY: download-$(1)
download-$(1): $(addprefix download-,$($(1)_DEPS)) download-only-$(1)
.PHONY: download-only-$(1)
download-only-$(1):
# Packages can share a source archive to build different sets of features
# or dependencies (see bfd/binutils openscenegraph/openthreads qwt/qwt_qt4).
# Use a double-colon rule to allow multiple definitions:
# https://www.gnu.org/software/make/manual/html_node/Double_002dColon.html
download-only-$(1): download-only-$($(1)_FILE)
download-only-$($(1)_FILE)::
$(and $($(1)_URL),
@[ -d '$(LOG_DIR)/$(TIMESTAMP)' ] || mkdir -p '$(LOG_DIR)/$(TIMESTAMP)'
@$$(if $$(REMOVE_DOWNLOAD),rm -f '$(PKG_DIR)/$($(1)_FILE)')
@if ! $(call CHECK_PKG_ARCHIVE,$(1)); then \
$(PRINTF_FMT) '[download]' '$(1)'; \
($(call DOWNLOAD_PKG_ARCHIVE,$(1))) &> '$(LOG_DIR)/$(TIMESTAMP)/$(1)-download'; \
$(PRINTF_FMT) '[download]' '$(1)' | $(RTRIM); \
(set -x; $(call DOWNLOAD_PKG_ARCHIVE,$(1))) &> '$(LOG_DIR)/$(TIMESTAMP)/$(1)-download'; \
grep 'MXE Warning' '$(LOG_DIR)/$(TIMESTAMP)/$(1)-download'; \
ln -sf '$(TIMESTAMP)/$(1)-download' '$(LOG_DIR)/$(1)-download'; \
if ! $(call CHECK_PKG_ARCHIVE,$(1)); then \
@ -403,29 +522,61 @@ download-only-$(1):
exit 1; \
fi; \
fi)
.PHONY: prepare-pkg-source-$(1)
prepare-pkg-source-$(1): download-only-$(1)
rm -rf '$(2)'
mkdir -p '$(2)'
$$(call PREPARE_PKG_SOURCE,$(1),$(2))
endef
$(foreach PKG,$(PKGS),$(eval $(call PKG_RULE,$(PKG))))
$(foreach PKG,$(PKGS),$(eval $(call PKG_RULE,$(PKG),$(call TMP_DIR,$(PKG)))))
# disable networking during build-only rules for reproducibility
ifeq ($(findstring darwin,$(BUILD)),)
NONET_LIB := $(PREFIX)/$(BUILD)/lib/nonetwork.so
PRELOAD := LD_PRELOAD='$(NONET_LIB)'
else
NONET_LIB := $(PREFIX)/$(BUILD)/lib/nonetwork.dylib
PRELOAD := DYLD_FORCE_FLAT_NAMESPACE=1 DYLD_INSERT_LIBRARIES='$(NONET_LIB)'
NONET_CFLAGS := -arch i386 -arch x86_64
endif
$(NONET_LIB): $(TOP_DIR)/tools/nonetwork.c | $(PREFIX)/$(BUILD)/lib/.gitkeep
@echo '[build nonetwork lib]'
@$(BUILD_CC) -shared -fPIC $(NONET_CFLAGS) -o $@ $<
.PHONY: shell
shell: $(NONET_LIB)
$(PRELOAD) $(SHELL)
define PKG_TARGET_RULE
.PHONY: $(1)
$(1): $(PREFIX)/$(3)/installed/$(1)
$(PREFIX)/$(3)/installed/$(1): $(TOP_DIR)/src/$(1).mk \
$(PATCHES) \
$(wildcard $(TOP_DIR)/src/$(1)-test*) \
$(PREFIX)/$(3)/installed/$(1): $(PKG_MAKEFILES) \
$(PKG_PATCHES) \
$(PKG_TESTFILES) \
$($(1)_FILE_DEPS) \
$(addprefix $(PREFIX)/$(3)/installed/,$(value $(call LOOKUP_PKG_RULE,$(1),DEPS,$(3)))) \
$(and $($(3)_DEPS),$(addprefix $(PREFIX)/$($(3)_DEPS)/installed/,$(filter-out $(MXE_CONF_PKGS),$($($(3)_DEPS)_PKGS)))) \
| $(if $(DONT_CHECK_REQUIREMENTS),,check-requirements) \
$(if $(value $(call LOOKUP_PKG_RULE,$(1),URL,$(3))),download-only-$(1)) \
$(addprefix $(PREFIX)/$(3)/installed/,$(if $(call set_is_not_member,$(1),$(MXE_CONF_PKGS)),$(MXE_CONF_PKGS)))
$(addprefix $(PREFIX)/$(3)/installed/,$(if $(call set_is_not_member,$(1),$(MXE_CONF_PKGS)),$(MXE_CONF_PKGS))) \
$(NONET_LIB) \
$(PREFIX)/$(3)/installed/.gitkeep \
print-git-oneline
@[ -d '$(LOG_DIR)/$(TIMESTAMP)' ] || mkdir -p '$(LOG_DIR)/$(TIMESTAMP)'
$(if $(value $(call LOOKUP_PKG_RULE,$(1),BUILD,$(3))),
@$(PRINTF_FMT) '[build]' '$(1)' '$(3)',
@$(PRINTF_FMT) '[no-build]' '$(1)' '$(3)')
@$(PRINTF_FMT) '[build]' '$(1)' '$(3)' | $(RTRIM)
,
@$(PRINTF_FMT) '[no-build]' '$(1)' '$(3)' | $(RTRIM)
)
$(if $(value $(call LOOKUP_PKG_RULE,$(1),MESSAGE,$(3))),
@$(PRINTF_FMT) '[message]' '$(1)' '$(3) $($(call LOOKUP_PKG_RULE,$(1),MESSAGE,$(3)))')
@$(PRINTF_FMT) '[message]' '$(1)' '$(3) $($(call LOOKUP_PKG_RULE,$(1),MESSAGE,$(3)))' \
| $(RTRIM)
)
@touch '$(LOG_DIR)/$(TIMESTAMP)/$(1)_$(3)'
@ln -sf '$(TIMESTAMP)/$(1)_$(3)' '$(LOG_DIR)/$(1)_$(3)'
@if ! (time $(MAKE) -f '$(MAKEFILE)' 'build-only-$(1)_$(3)') &> '$(LOG_DIR)/$(TIMESTAMP)/$(1)_$(3)'; then \
@if ! (time $(PRELOAD) WINEPREFIX='$(2)/readonly' $(MAKE) -f '$(MAKEFILE)' 'build-only-$(1)_$(3)' WGET=false) &> '$(LOG_DIR)/$(TIMESTAMP)/$(1)_$(3)'; then \
echo; \
echo 'Failed to build package $(1) for target $(3)!'; \
echo '------------------------------------------------------------'; \
@ -443,11 +594,24 @@ $(PREFIX)/$(3)/installed/$(1): $(TOP_DIR)/src/$(1).mk \
.PHONY: build-only-$(1)_$(3)
# target-specific variables provide an extra level of scoping so that named
# variables can be used in package build rules:
# https://www.gnu.org/software/make/manual/html_node/Target_002dspecific.html
build-only-$(1)_$(3): PKG = $(1)
build-only-$(1)_$(3): TARGET = $(3)
build-only-$(1)_$(3): BUILD_$(if $(findstring shared,$(3)),SHARED,STATIC) = TRUE
build-only-$(1)_$(3): BUILD_$(if $(call seq,$(TARGET),$(BUILD)),NATIVE,CROSS) = TRUE
build-only-$(1)_$(3): $(if $(findstring posix,$(TARGET)),POSIX,WIN32)_THREADS = TRUE
build-only-$(1)_$(3): LIB_SUFFIX = $(if $(findstring shared,$(3)),dll,a)
build-only-$(1)_$(3): BITS = $(if $(findstring x86_64,$(3)),64,32)
build-only-$(1)_$(3): BUILD_TYPE = $(if $(findstring debug,$(3) $($(1)_CONFIGURE_OPTS)),debug,release)
build-only-$(1)_$(3): BUILD_TYPE_SUFFIX = $(if $(findstring debug,$(3) $($(1)_CONFIGURE_OPTS)),d)
build-only-$(1)_$(3): INSTALL_STRIP_TOOLCHAIN = install$(if $(STRIP_TOOLCHAIN),-strip)
build-only-$(1)_$(3): INSTALL_STRIP_LIB = install$(if $(STRIP_LIB),-strip)
build-only-$(1)_$(3): SOURCE_DIR = $(or $(realpath $($(1)_SOURCE_TREE)),$(2)/$($(1)_SUBDIR))
build-only-$(1)_$(3): BUILD_DIR = $(2)/$(if $($(1)_SOURCE_TREE),local,$($(1)_SUBDIR)).build_
build-only-$(1)_$(3): TEST_FILE = $($(1)_TEST_FILE)
build-only-$(1)_$(3): CMAKE_RUNRESULT_FILE = $(PREFIX)/share/cmake/modules/TryRunResults.cmake
build-only-$(1)_$(3): CMAKE_TOOLCHAIN_FILE = $(PREFIX)/$(3)/share/cmake/mxe-conf.cmake
build-only-$(1)_$(3): CMAKE_TOOLCHAIN_DIR = $(PREFIX)/$(3)/share/cmake/mxe-conf.d
build-only-$(1)_$(3): CMAKE_STATIC_BOOL = $(if $(findstring shared,$(3)),OFF,ON)
@ -455,27 +619,39 @@ build-only-$(1)_$(3): CMAKE_SHARED_BOOL = $(if $(findstring shared,$(3)),ON,OFF)
build-only-$(1)_$(3):
$(if $(value $(call LOOKUP_PKG_RULE,$(1),BUILD,$(3))),
uname -a
git show-branch --list --reflog=1
git log --pretty=tformat:"%H - %s [%ar] [%d]" -1
lsb_release -a 2>/dev/null || sw_vers 2>/dev/null || true
autoconf --version 2>/dev/null | head -1
automake --version 2>/dev/null | head -1
$(BUILD_CC) --version
$(BUILD_CXX) --version
python --version
perl --version 2>&1 | head -3
rm -rf '$(2)'
mkdir -p '$(2)'
mkdir -p '$$(SOURCE_DIR)'
mkdir -p '$$(BUILD_DIR)'
# disable wine with readonly directory
# see https://github.com/mxe/mxe/issues/841
mkdir -p '$(2)/readonly'
chmod 0555 '$(2)/readonly'
$$(if $(value $(call LOOKUP_PKG_RULE,$(1),FILE,$(3))),\
$$(call PREPARE_PKG_SOURCE,$(1),$(2)))
$$(call $(call LOOKUP_PKG_RULE,$(1),BUILD,$(3)),$(2)/$($(1)_SUBDIR),$(TOP_DIR)/src/$(1)-test)
$$(call $(call LOOKUP_PKG_RULE,$(1),BUILD,$(3)),$(2)/$($(1)_SUBDIR))
@echo
@find '$(2)' -name 'config.log' -print -exec cat {} \;
@echo
@echo 'settings.mk'
@cat '$(TOP_DIR)/settings.mk'
$(if $(STRIP_EXE),-$(TARGET)-strip '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe')
(du -k -d 0 '$(2)' 2>/dev/null || du -k --max-depth 0 '$(2)') | $(SED) -n 's/^\(\S*\).*/du: \1 KiB/p'
rm -rfv '$(2)'
)
touch '$(PREFIX)/$(3)/installed/$(1)'
endef
$(foreach TARGET,$(MXE_TARGETS), \
$(shell [ -d '$(PREFIX)/$(TARGET)/installed' ] || mkdir -p '$(PREFIX)/$(TARGET)/installed') \
$(foreach PKG,$($(TARGET)_PKGS), \
$(eval $(call PKG_TARGET_RULE,$(PKG),$(call TMP_DIR,$(PKG)-$(TARGET)),$(TARGET)))))
@ -526,7 +702,7 @@ show-deps-%:
$(newline)$(newline)$* downstream dependents:$(newline)\
$(call WALK_DOWNSTREAM,$*))\
@echo,\
$(error Package $* not found in index.html))
$(error Package $* not found))
# show upstream dependencies and downstream dependents separately
# suitable for usage in shell with: `make show-downstream-deps-foo`
@ -536,14 +712,14 @@ show-downstream-deps-%:
$(call SET_CLEAR,PKGS_VISITED)\
$(info $(call WALK_DOWNSTREAM,$*))\
@echo -n,\
$(error Package $* not found in index.html))
$(error Package $* not found))
show-upstream-deps-%:
$(if $(call set_is_member,$*,$(PKGS)),\
$(call SET_CLEAR,PKGS_VISITED)\
$(info $(call WALK_UPSTREAM,$*))\
@echo -n,\
$(error Package $* not found in index.html))
$(error Package $* not found))
# print first level pkg deps for use in build-pkg.lua
.PHONY: print-deps-for-build-pkg
@ -561,7 +737,7 @@ BUILD_PKG_TMP_FILES := *-*.list mxe-*.tar.xz mxe-*.deb* wheezy jessie
.PHONY: clean
clean:
rm -rf $(call TMP_DIR,*) $(PREFIX) build-matrix.html \
rm -rf $(call TMP_DIR,*) $(PREFIX) \
$(addprefix $(TOP_DIR)/, $(BUILD_PKG_TMP_FILES))
.PHONY: clean-pkg
@ -575,38 +751,48 @@ clean-pkg:
clean-junk: clean-pkg
rm -rf $(LOG_DIR) $(call TMP_DIR,*)
COMPARE_VERSIONS = $(strip \
$(if $($(1)_BRANCH),$(call seq,$($(1)_VERSION),$(2)),\
$(filter $(2),$(shell printf '$($(1)_VERSION)\n$(2)' | $(SORT) -V | head -1))))
.PHONY: update
define UPDATE
$(if $(2),
$(if $(filter $($(1)_IGNORE),$(2)),
$(info IGNORED $(1) $(2)),
$(if $(filter $(2),$(shell printf '$($(1)_VERSION)\n$(2)' | $(SORT) -V | head -1)),
$(if $(COMPARE_VERSIONS),
$(if $(filter $(2),$($(1)_VERSION)),
$(info . $(1) $(2)),
$(info OLD $(1) $($(1)_VERSION) --> $(2) ignoring)),
$(info NEW $(1) $($(1)_VERSION) --> $(2))
$(if $(findstring undefined, $(origin UPDATE_DRYRUN)),
$(SED) -i 's/^\([^ ]*_VERSION *:=\).*/\1 $(2)/' '$(TOP_DIR)/src/$(1).mk'
$(SED) -i 's/^\([^ ]*_VERSION *:=\).*/\1 $(2)/' '$($(1)_MAKEFILE)'
$(MAKE) -f '$(MAKEFILE)' 'update-checksum-$(1)' \
|| { $(SED) -i 's/^\([^ ]*_VERSION *:=\).*/\1 $($(1)_VERSION)/' '$(TOP_DIR)/src/$(1).mk'; \
|| { $(SED) -i 's/^\([^ ]*_VERSION *:=\).*/\1 $($(1)_VERSION)/' '$($(1)_MAKEFILE)'; \
exit 1; }))),
$(info Unable to update version number of package $(1) \
$(newline)$(newline)$($(1)_UPDATE)$(newline)))
endef
update:
$(foreach PKG,$(PKGS),$(call UPDATE,$(PKG),$(shell $($(PKG)_UPDATE))))
$(foreach PKG,$(PKGS),\
$(and $($(PKG)_UPDATE),$(call UPDATE,$(PKG),$(shell $($(PKG)_UPDATE)))))
update-package-%:
$(if $(call set_is_member,$*,$(PKGS)), \
$(call UPDATE,$*,$(shell $($*_UPDATE))), \
$(error Package $* not found in index.html))
$(and $($*_UPDATE),$(call UPDATE,$*,$(shell $($*_UPDATE)))), \
$(error Package $* not found))
@echo -n
check-update-package-%: UPDATE_DRYRUN = true
check-update-package-%: update-package-% ;
update-checksum-%: MXE_NO_BACKUP_DL = true
update-checksum-%:
$(if $(call set_is_member,$*,$(PKGS)), \
$(call DOWNLOAD_PKG_ARCHIVE,$*) && \
$(SED) -i 's/^\([^ ]*_CHECKSUM *:=\).*/\1 '"`$(call PKG_CHECKSUM,$*)`"'/' '$(TOP_DIR)/src/$*.mk', \
$(error Package $* not found in index.html))
$(SED) -i 's/^\([^ ]*_CHECKSUM *:=\).*/\1 '"`$(call PKG_CHECKSUM,$*)`"'/' '$($*_MAKEFILE)', \
$(error Package $* not found))
.PHONY: cleanup-style
define CLEANUP_STYLE
@ -625,22 +811,23 @@ define CLEANUP_STYLE
endef
cleanup-style:
$(foreach FILE,$(wildcard $(addprefix $(TOP_DIR)/,Makefile index.html CNAME src/*.mk src/*test.* tools/*)),$(call CLEANUP_STYLE,$(FILE)))
$(foreach FILE,$(wildcard $(addprefix $(TOP_DIR)/,Makefile docs/index.html docs/CNAME src/*.mk src/*test.* tools/*)),$(call CLEANUP_STYLE,$(FILE)))
.PHONY: cleanup-deps-style
cleanup-deps-style:
@grep '(PKG)_DEPS.*\\' '$(TOP_DIR)'/src/*.mk > $(TOP_DIR)/tmp-$@-pre
@grep '(PKG)_DEPS.*\\' $(foreach 1,$(PKGS),$(PKG_MAKEFILES)) > $(TOP_DIR)/tmp-$@-pre
@$(foreach PKG,$(PKGS), \
$(if $(call lne,$(sort $(filter-out gcc,$($(PKG)_DEPS))),$(filter-out gcc,$($(PKG)_DEPS))), \
$(info [cleanup] $(PKG)) \
$(SED) -i 's/^\([^ ]*_DEPS *:=\).*/\1 '"$(strip $(filter gcc,$($(PKG)_DEPS)) $(sort $(filter-out gcc,$($(PKG)_DEPS))))"'/' '$(TOP_DIR)/src/$(PKG).mk'; \
$(SED) -i 's/^\([^ ]*_DEPS *:=\)[^$$]*$$/\1 '"$(strip $(filter gcc,$($(PKG)_DEPS)) $(sort $(filter-out gcc,$($(PKG)_DEPS))))"'/' '$(call PKG_MAKEFILES,$(PKG))'; \
))
@grep '(PKG)_DEPS.*\\' '$(TOP_DIR)'/src/*.mk > $(TOP_DIR)/tmp-$@-post
@grep '(PKG)_DEPS.*\\' $(foreach 1,$(PKGS),$(PKG_MAKEFILES)) > $(TOP_DIR)/tmp-$@-post
@diff -u $(TOP_DIR)/tmp-$@-pre $(TOP_DIR)/tmp-$@-post >/dev/null \
|| echo '*** Multi-line deps are mangled ***' && comm -3 tmp-$@-pre tmp-$@-post
@rm -f $(TOP_DIR)/tmp-$@-*
build-matrix.html: $(foreach PKG,$(PKGS), $(TOP_DIR)/src/$(PKG).mk)
.PHONY: docs/build-matrix.html
docs/build-matrix.html: $(foreach 1,$(PKGS),$(PKG_MAKEFILES))
@echo '<!DOCTYPE html>' > $@
@echo '<html>' >> $@
@echo '<head>' >> $@
@ -703,7 +890,8 @@ build-matrix.html: $(foreach PKG,$(PKGS), $(TOP_DIR)/src/$(PKG).mk)
$(eval $(PKG)_BUILD_ONLY := $(false)) \
<td class="supported">&#x2713;</td>, \
<td class="unsupported">&#x2717;</td>)\n) \
$(if $(call set_is_member,$(PKG),$(BUILD_PKGS)), \
$(if $(and $(call set_is_member,$(PKG),$($(BUILD)_PKGS)), \
$(value $(call LOOKUP_PKG_RULE,$(PKG),BUILD,$(BUILD)))), \
$(eval $(PKG)_VIRTUAL := $(false)) \
<td class="supported">&#x2713;</td>, \
<td class="unsupported">&#x2717;</td>)\n \
@ -725,18 +913,24 @@ build-matrix.html: $(foreach PKG,$(PKGS), $(TOP_DIR)/src/$(PKG).mk)
@echo '</th>' >> $@
@$(foreach TARGET,$(MXE_TARGET_LIST), \
echo '<th>$(words $($(TARGET)_PKGCOUNT))</th>' >> $@;)
@echo '<th>$(words $(BUILD_PKGS))</th>' >> $@
@echo '<th>$(words $($(BUILD)_PKGS))</th>' >> $@
@echo '</tr>' >> $@
@echo '</tbody>' >> $@
@echo '</table>' >> $@
@echo '</body>' >> $@
@echo '</html>' >> $@
.PHONY: versions.json
versions.json: $(foreach PKG,$(PKGS), $(TOP_DIR)/src/$(PKG).mk)
.PHONY: docs/packages.json
docs/packages.json: $(foreach 1,$(PKGS),$(PKG_MAKEFILES))
@echo '{' > $@
@{$(foreach PKG,$(PKGS), \
echo ' "$(PKG)": \
"$($(PKG)_VERSION)",';)} >> $@
{"version": "$($(PKG)_VERSION)", \
"website": "$($(PKG)_WEBSITE)", \
"description": "$($(PKG)_DESCR)"},';)} >> $@
@echo ' "": null' >> $@
@echo '}' >> $@
# for patch-tool-mxe
include patch.mk

@ -3,7 +3,7 @@
[![License][license-badge]][license-page]
[license-page]: LICENSE.md
[license-badge]: http://img.shields.io/badge/License-MIT-brightgreen.svg
[license-badge]: https://img.shields.io/badge/License-MIT-brightgreen.svg
MXE (M cross environment) is a Makefile that compiles a cross
compiler and cross compiles many free libraries such as SDL and
@ -24,11 +24,21 @@ various target platforms, which:
## Supported Toolchains
* Runtime: MinGW-w64
* Host Triplet:
* Host Triplets:
- `i686-w64-mingw32`
- `x86_64-w64-mingw32`
* Packages:
- static
- shared
* GCC Threading Libraries (`winpthreads` is always available):
- win32
- [posix (experimental)](https://github.com/mxe/mxe/pull/958)
* GCC Exception Handling:
- Default
- i686: sjlj
- x86_64: seh
- [Alternatives (experimental)](https://github.com/mxe/mxe/pull/1664)
- i686: dw2
- x86_64: sjlj
Please see [mxe.cc](http://mxe.cc/) for further information and package support matrix.

@ -1,23 +0,0 @@
- Ensure that your Git repository is configured correctly:
http://mxe.cc/#committers
- Ensure all stable commits have been merged to master
- run `make cleanup-style`
- check html with http://validator.w3.org/
- get list of new packages:
git diff --name-status stable..master | grep 'A.*.mk$' | gsed -n 's,A.*src/\(.*\)\.mk,\1\,,p' | tr '\n' ' '
- call for testers:
github issue
MXE mailing list
use the following to check for new/changed requirements:
http://htmlpreview.github.io/?https://raw.github.com/mxe/mxe/master/index.html
...
- Fast-forward the stable branch to master:
git checkout stable
git merge --ff-only master
git push
- Announce in mailing lists, forums, etc.
MXE mailing list
Freecode.com (formerly Freshmeat.net)
MinGW mailing list
Hacker News (news.ycombinator.com)

@ -1,5 +1,4 @@
/* This file is part of MXE.
* See index.html for further information. */
/* This file is part of MXE. See LICENSE.md for licensing information. */
table.fullscreen {
width: 100%;

@ -1,5 +1,4 @@
/* This file is part of MXE.
* See index.html for further information. */
/* This file is part of MXE. See LICENSE.md for licensing information. */
body {
font-size: 11pt;
margin-top: 0em;

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before

Width:  |  Height:  |  Size: 240 KiB

After

Width:  |  Height:  |  Size: 240 KiB

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 114 KiB

File diff suppressed because it is too large Load Diff

@ -22,7 +22,7 @@ include the GMSL in your Makefile do<br>
you have the right version of <span style="font-family: monospace;">gmsl</span>
use the <span style="font-family: monospace;">gmsl_compatible</span>
function (see
below). The current version is <span style="font-family: monospace;">1 1 6</span>.<br>
below). The current version is <span style="font-family: monospace;">1 1 7</span>.<br>
<br>
The GMSL package also includes a test suite for GMSL.&nbsp; Just run <span style="font-family: monospace;">make -f gmsl-tests</span>.<br>
<h2>Logical Operators</h2>GMSL has boolean $(true) (a non-empty string)

File diff suppressed because it is too large Load Diff

@ -0,0 +1,442 @@
{
"a52dec": {"version": "0.7.4", "website": "https://liba52.sourceforge.io/", "description": "a52dec (aka. liba52)"},
"agg": {"version": "2.5", "website": "https://agg.sourceforge.io/", "description": "Anti-Grain Geometry"},
"alure": {"version": "1.2", "website": "http://kcat.strangesoft.net/alure.html", "description": ""},
"apr": {"version": "1.5.2", "website": "https://apr.apache.org/", "description": "APR"},
"apr-util": {"version": "1.5.4", "website": "https://apr.apache.org/", "description": "APR-util"},
"armadillo": {"version": "7.800.1", "website": "https://arma.sourceforge.io/", "description": "Armadillo C++ linear algebra library"},
"aspell": {"version": "0.60.6.1", "website": "http://aspell.net/", "description": "Aspell"},
"assimp": {"version": "3.2", "website": "https://assimp.sourceforge.io/", "description": "Assimp Open Asset Import Library"},
"atk": {"version": "2.16.0", "website": "https://gtk.org/", "description": "ATK"},
"atkmm": {"version": "2.22.7", "website": "https://www.gtkmm.org/", "description": "ATKmm"},
"aubio": {"version": "0.4.2", "website": "https://www.aubio.org/", "description": ""},
"bfd": {"version": "2.25.1", "website": "https://www.gnu.org/software/binutils/", "description": "Binary File Descriptor library"},
"binutils": {"version": "2.25.1", "website": "https://www.gnu.org/software/binutils/", "description": "GNU Binutils"},
"blas": {"version": "3.5.0", "website": "http://www.netlib.org/blas/", "description": ""},
"boost": {"version": "1.60.0", "website": "https://www.boost.org/", "description": "Boost C++ Library"},
"box2d": {"version": "2.3.1", "website": "http://www.box2d.org/", "description": ""},
"bullet": {"version": "2.82-r2704", "website": "http://bulletphysics.org/", "description": "Bullet physics, version 2"},
"bzip2": {"version": "1.0.6", "website": "http://www.bzip.org/", "description": ""},
"cairo": {"version": "1.15.4", "website": "https://cairographics.org/", "description": ""},
"cairomm": {"version": "1.11.2", "website": "https://cairographics.org/cairomm/", "description": ""},
"cblas": {"version": "1", "website": "http://www.netlib.org/blas/", "description": ""},
"ccfits": {"version": "2.4", "website": "https://heasarc.gsfc.nasa.gov/fitsio/ccfits", "description": "CCfits"},
"cegui": {"version": "9726a2b505fb", "website": "http://cegui.org.uk/", "description": "Crazy Eddies GUI System (CEGUI)"},
"cfitsio": {"version": "3370", "website": "https://heasarc.gsfc.nasa.gov/fitsio/", "description": ""},
"cgal": {"version": "4.9.1", "website": "https://www.cgal.org/", "description": ""},
"check": {"version": "0.10.0", "website": "https://check.sourceforge.io/", "description": ""},
"chipmunk": {"version": "6.2.2", "website": "https://chipmunk-physics.net/", "description": "Chipmunk Physics"},
"chromaprint": {"version": "1.1", "website": "https://acoustid.org/chromaprint", "description": "Chromaprint"},
"cimg": {"version": "1.6.3", "website": "http://cimg.eu/", "description": "CImg Library"},
"cloog": {"version": "0.18.4", "website": "https://www.bastoul.net/cloog/", "description": "CLooG Code Generator"},
"cmake": {"version": "3.7.2", "website": "https://www.cmake.org/", "description": ""},
"cmake-conf": {"version": "1", "website": "", "description": ""},
"cminpack": {"version": "1.3.4", "website": "http://devernay.free.fr/hacks/cminpack/cminpack.html", "description": ""},
"coda": {"version": "2.15.1", "website": "https://stcorp.nl/coda/", "description": "CODA"},
"coin": {"version": "3.1.3", "website": "https://bitbucket.org/Coin3D/", "description": "Coin3D"},
"cpp-netlib": {"version": "0.11.2", "website": "http://cpp-netlib.org/", "description": "Boost C++ Networking Library"},
"cppunit": {"version": "1.13.2", "website": "https://www.freedesktop.org/wiki/Software/cppunit/", "description": "CppUnit"},
"cryptopp": {"version": "5.6.3", "website": "https://www.cryptopp.com/", "description": "Crypto++ Library"},
"crystalhd": {"version": "1", "website": "https://www.broadcom.com/support/crystal_hd/", "description": "Broadcom Crystal HD Headers"},
"cunit": {"version": "2.1-3", "website": "https://cunit.sourceforge.io/", "description": ""},
"curl": {"version": "7.54.1", "website": "https://curl.haxx.se/libcurl/", "description": "cURL"},
"db": {"version": "6.1.26", "website": "https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html", "description": "Oracle Berkeley DB"},
"dbus": {"version": "1.11.12", "website": "https://dbus.freedesktop.org/", "description": ""},
"dcmtk": {"version": "3.6.0", "website": "http://dicom.offis.de/dcmtk.php.en", "description": "DCMTK"},
"devil": {"version": "1.7.8", "website": "https://openil.sourceforge.io/", "description": "DevIL"},
"djvulibre": {"version": "3.5.27", "website": "https://djvu.sourceforge.io/", "description": "DjVuLibre"},
"dlfcn-win32": {"version": "e19bf07", "website": "https://github.com/dlfcn-win32/dlfcn-win32", "description": "POSIX dlfcn wrapper for Windows"},
"eigen": {"version": "3.2.5", "website": "https://eigen.tuxfamily.org/", "description": ""},
"exiv2": {"version": "0.25", "website": "http://www.exiv2.org/", "description": "Exiv2"},
"expat": {"version": "2.2.1", "website": "https://github.com/libexpat/libexpat", "description": "Expat XML Parser"},
"faad2": {"version": "2.7", "website": "http://www.audiocoding.com/", "description": ""},
"fdk-aac": {"version": "0.1.4", "website": "https://github.com/mstorsjo/fdk-aac", "description": "FDK-AAC"},
"ffmpeg": {"version": "3.2.4", "website": "https://ffmpeg.org/", "description": ""},
"fftw": {"version": "3.3.6-pl1", "website": "http://www.fftw.org/", "description": ""},
"file": {"version": "5.24", "website": "https://www.darwinsys.com/file/", "description": ""},
"flac": {"version": "1.3.1", "website": "https://www.xiph.org/flac/", "description": "FLAC"},
"flann": {"version": "1.8.4", "website": "https://www.cs.ubc.ca/~mariusm/index.php/FLANN/FLANN", "description": "FLANN"},
"fltk": {"version": "1.3.3", "website": "http://www.fltk.org/", "description": "FLTK"},
"fontconfig": {"version": "2.12.3", "website": "https://fontconfig.org/", "description": ""},
"freeglut": {"version": "3.0.0", "website": "https://freeglut.sourceforge.io/", "description": ""},
"freeimage": {"version": "3.15.4", "website": "https://freeimage.sourceforge.io/", "description": "FreeImage"},
"freetds": {"version": "1.00.47", "website": "http://www.freetds.org/", "description": "FreeTDS"},
"freetype": {"version": "2.8", "website": "https://www.freetype.org/", "description": ""},
"freetype-bootstrap": {"version": "2.8", "website": "https://www.freetype.org/", "description": "freetype (without harfbuzz)"},
"fribidi": {"version": "0.19.6", "website": "https://fribidi.org/", "description": "FriBidi"},
"ftgl": {"version": "2.1.3~rc5", "website": "https://sourceforge.net/projects/ftgl/", "description": ""},
"gc": {"version": "7.2e", "website": "http://www.hpl.hp.com/personal/Hans_Boehm/gc/", "description": ""},
"gcc": {"version": "5.4.0", "website": "https://gcc.gnu.org/", "description": "GCC"},
"gd": {"version": "2.1.0", "website": "https://libgd.github.io/", "description": "GD (without support for xpm)"},
"gdal": {"version": "2.1.3", "website": "http://www.gdal.org/", "description": "GDAL"},
"gdb": {"version": "8.0", "website": "https://www.gnu.org/software/gdb/", "description": ""},
"gdk-pixbuf": {"version": "2.32.3", "website": "https://gtk.org/", "description": "GDK-pixbuf"},
"gendef": {"version": "5.0.2", "website": "https://sourceforge.net/p/mingw-w64/wiki2/gendef/", "description": ""},
"geoip-database": {"version": "20150317-1", "website": "https://www.maxmind.com/", "description": "GeoIP Legacy Database"},
"geos": {"version": "3.4.2", "website": "https://trac.osgeo.org/geos/", "description": "GEOS"},
"gettext": {"version": "0.19.8.1", "website": "https://www.gnu.org/software/gettext/", "description": ""},
"ghostscript": {"version": "9.19", "website": "https://www.ghostscript.com/", "description": ""},
"giflib": {"version": "5.1.4", "website": "https://sourceforge.net/projects/libungif/", "description": ""},
"glew": {"version": "1.12.0", "website": "https://glew.sourceforge.io/", "description": "GLEW"},
"glfw2": {"version": "2.7.9", "website": "http://www.glfw.org/", "description": "GLFW 2.x"},
"glfw3": {"version": "3.1.2", "website": "http://www.glfw.org/", "description": "GLFW 3.x"},
"glib": {"version": "2.50.2", "website": "https://gtk.org/", "description": "GLib"},
"glibmm": {"version": "2.42.0", "website": "https://www.gtkmm.org/", "description": "GLibmm"},
"glm": {"version": "0.9.7.6", "website": "https://glm.g-truc.net/", "description": "GLM - OpenGL Mathematics"},
"glpk": {"version": "4.60", "website": "https://www.gnu.org/software/glpk/", "description": "GNU Linear Programming Kit"},
"gmp": {"version": "6.1.2", "website": "https://gmplib.org/", "description": "GMP"},
"gnutls": {"version": "3.5.13", "website": "https://www.gnu.org/software/gnutls/", "description": "GnuTLS"},
"googlemock": {"version": "1.7.0", "website": "https://github.com/google/googlemock", "description": "Google Mock"},
"googletest": {"version": "1.7.0", "website": "https://github.com/google/googletest", "description": "Google Test"},
"graphicsmagick": {"version": "1.3.21", "website": "http://www.graphicsmagick.org/", "description": "GraphicsMagick"},
"gsl": {"version": "2.3", "website": "https://www.gnu.org/software/gsl/", "description": "GSL"},
"gsoap": {"version": "2.8.22", "website": "https://www.genivia.com/dev.html", "description": "gSOAP"},
"gst-libav": {"version": "1.6.2", "website": "https://gstreamer.freedesktop.org/modules/gst-libav.html", "description": ""},
"gst-plugins-bad": {"version": "1.6.2", "website": "https://gstreamer.freedesktop.org/", "description": ""},
"gst-plugins-base": {"version": "1.6.2", "website": "https://gstreamer.freedesktop.org/", "description": ""},
"gst-plugins-good": {"version": "1.6.2", "website": "https://gstreamer.freedesktop.org/", "description": ""},
"gst-plugins-ugly": {"version": "1.6.2", "website": "https://gstreamer.freedesktop.org/", "description": ""},
"gstreamer": {"version": "1.6.2", "website": "https://gstreamer.freedesktop.org/", "description": ""},
"gta": {"version": "1.0.7", "website": "http://www.nongnu.org/gta/", "description": ""},
"gtk2": {"version": "2.24.29", "website": "https://gtk.org/", "description": "GTK+"},
"gtk3": {"version": "3.22.7", "website": "https://gtk.org/", "description": "GTK+"},
"gtkglarea": {"version": "2.0.1", "website": "http://www.mono-project.com/GtkGLArea/", "description": "GtkGLArea"},
"gtkglext": {"version": "1.2.0", "website": "https://gtkglext.sourceforge.io/", "description": "GtkGLExt"},
"gtkglextmm": {"version": "1.2.0", "website": "https://gtkglext.sourceforge.io/", "description": "GtkGLExtmm"},
"gtkimageview": {"version": "1.6.4", "website": "http://trac.bjourne.webfactional.com/", "description": "GtkImageView"},
"gtkmm2": {"version": "2.24.4", "website": "https://www.gtkmm.org/", "description": "GTKMM"},
"gtkmm3": {"version": "3.14.0", "website": "https://www.gtkmm.org/", "description": "GTKMM"},
"gtksourceview": {"version": "2.10.5", "website": "https://projects.gnome.org/gtksourceview/", "description": "GTKSourceView"},
"gtksourceviewmm2": {"version": "2.10.3", "website": "https://projects.gnome.org/gtksourceview/", "description": "GtkSourceViewmm"},
"guile": {"version": "1.8.8", "website": "https://www.gnu.org/software/guile/", "description": "GNU Guile"},
"hamlib": {"version": "3.0.1", "website": "http://www.hamlib.org/", "description": "HamLib"},
"harfbuzz": {"version": "1.4.6", "website": "https://wiki.freedesktop.org/www/Software/HarfBuzz/", "description": "HarfBuzz"},
"hdf-eos2": {"version": "19v1.00", "website": "https://hdfeos.org/software/library.php", "description": "HDF-EOS2"},
"hdf-eos5": {"version": "1.15", "website": "https://hdfeos.org/software/library.php", "description": "HDF-EOS5"},
"hdf4": {"version": "4.2.10", "website": "https://www.hdfgroup.org/hdf4/", "description": "HDF4"},
"hdf5": {"version": "1.8.12", "website": "https://www.hdfgroup.org/hdf5/", "description": "HDF5"},
"hunspell": {"version": "1.6.1", "website": "https://hunspell.github.io/", "description": "Hunspell"},
"hyperscan": {"version": "4.3.2", "website": "https://01.org/hyperscan", "description": "Hyperscan"},
"icu4c": {"version": "56.1", "website": "http://site.icu-project.org/", "description": "ICU4C"},
"id3lib": {"version": "3.8.3", "website": "https://id3lib.sourceforge.io/", "description": ""},
"ilmbase": {"version": "2.2.0", "website": "http://www.openexr.com/", "description": "IlmBase"},
"imagemagick": {"version": "6.9.0-0", "website": "https://www.imagemagick.org/", "description": "ImageMagick"},
"isl": {"version": "0.15", "website": "http://isl.gforge.inria.fr/", "description": "Integer Set Library"},
"itk": {"version": "4.10.1", "website": "https://www.itk.org/", "description": "Insight Segmentation and Registration Toolkit (ITK)"},
"jack": {"version": "1.9.10", "website": "http://jackaudio.org/", "description": "JACK Audio Connection Kit"},
"jansson": {"version": "2.7", "website": "http://www.digip.org/jansson/", "description": "Jansson"},
"jasper": {"version": "1.900.1", "website": "https://www.ece.uvic.ca/~mdadams/jasper/", "description": "JasPer"},
"jpeg": {"version": "9b", "website": "http://www.ijg.org/", "description": ""},
"json-c": {"version": "0.12", "website": "https://github.com/json-c/json-c/wiki", "description": ""},
"json-glib": {"version": "1.0.4", "website": "https://wiki.gnome.org/action/show/Projects/JsonGlib", "description": "JSON-Glib"},
"json_spirit": {"version": "4.08", "website": "https://www.codeproject.com/Articles/20027/JSON-Spirit-A-C-JSON-Parser-Generator-Implemented", "description": ""},
"jsoncpp": {"version": "1.8.0", "website": "https://github.com/open-source-parsers/jsoncpp", "description": "A C++ library for interacting with JSON"},
"lame": {"version": "3.99.5", "website": "https://lame.sourceforge.io/", "description": ""},
"lapack": {"version": "3.6.0", "website": "http://www.netlib.org/lapack/", "description": ""},
"lcms": {"version": "2.8", "website": "http://www.littlecms.com/", "description": ""},
"lcms1": {"version": "1.19", "website": "http://www.littlecms.com/", "description": ""},
"lensfun": {"version": "0.3.2", "website": "https://lensfun.sourceforge.io/", "description": ""},
"levmar": {"version": "2.6", "website": "https://www.ics.forth.gr/~lourakis/levmar", "description": ""},
"libaacs": {"version": "0.8.1", "website": "https://www.videolan.org/developers/libaacs.html", "description": ""},
"libarchive": {"version": "3.1.2", "website": "https://www.libarchive.org/", "description": "Libarchive"},
"libass": {"version": "0.13.1", "website": "https://code.google.com/p/libass/", "description": ""},
"libbluray": {"version": "0.9.2", "website": "https://www.videolan.org/developers/libbluray.html", "description": ""},
"libbs2b": {"version": "3.1.0", "website": "https://bs2b.sourceforge.io/", "description": "Bauer Stereophonic-to-Binaural library"},
"libcaca": {"version": "0.99.beta19", "website": "http://caca.zoy.org/wiki/libcaca", "description": ""},
"libcddb": {"version": "1.3.2", "website": "https://sourceforge.net/projects/libcddb/", "description": "Access data on a CDDB"},
"libcdio": {"version": "0.93", "website": "https://www.gnu.org/software/libcdio/", "description": "Libcdio"},
"libcdio-paranoia": {"version": "10.2+0.93+1", "website": "https://www.gnu.org/software/libcdio/", "description": "Libcdio-paranoia"},
"libcomm14cux": {"version": "2.1.1", "website": "https://github.com/colinbourassa/libcomm14cux/", "description": ""},
"libcroco": {"version": "0.6.2", "website": "http://www.linuxfromscratch.org/blfs/view/svn/general/libcroco.html", "description": "Libcroco"},
"libdnet": {"version": "1.11", "website": "https://libdnet.sourceforge.io/", "description": ""},
"libdvbpsi": {"version": "1.2.0", "website": "https://www.videolan.org/developers/libdvbpsi.html", "description": ""},
"libdvdcss": {"version": "1.3.0", "website": "https://www.videolan.org/developers/libdvdcss.html", "description": ""},
"libdvdetect": {"version": "0.71.0", "website": "https://www.dvdetect.de/", "description": "Fast database lookup for DVDs"},
"libdvdnav": {"version": "5.0.1", "website": "https://dvdnav.mplayerhq.hu/", "description": ""},
"libdvdread": {"version": "5.0.0", "website": "https://dvdnav.mplayerhq.hu/", "description": ""},
"libechonest": {"version": "2.3.1", "website": "https://github.com/lfranchi/libechonest", "description": ""},
"libepoxy": {"version": "1.3.1", "website": "https://github.com/anholt/libepoxy", "description": ""},
"libevent": {"version": "2.0.21", "website": "http://libevent.org/", "description": ""},
"libf2c": {"version": "1", "website": "http://www.netlib.org/f2c/", "description": ""},
"libffi": {"version": "3.2.1", "website": "https://sourceware.org/libffi/", "description": ""},
"libftdi": {"version": "0.20", "website": "https://www.intra2net.com/en/developer/libftdi/index.php", "description": "LibFTDI"},
"libftdi1": {"version": "1.2", "website": "https://www.intra2net.com/en/developer/libftdi/index.php", "description": "LibFTDI1"},
"libgcrypt": {"version": "1.7.7", "website": "https://directory.fsf.org/wiki/Libgcrypt", "description": ""},
"libgda": {"version": "4.2.13", "website": "http://www.gnome-db.org/", "description": ""},
"libgdamm": {"version": "4.1.3", "website": "https://launchpad.net/libgdamm", "description": ""},
"libgee": {"version": "0.5.0", "website": "https://wiki.gnome.org/Projects/Libgee", "description": ""},
"libgeotiff": {"version": "1.4.0", "website": "https://trac.osgeo.org/geotiff/", "description": "GeoTiff"},
"libgit2": {"version": "0.23.2", "website": "https://libgit2.github.com/", "description": ""},
"libglade": {"version": "2.6.4", "website": "https://glade.gnome.org/", "description": "glade"},
"libgnurx": {"version": "2.6.1", "website": "https://sourceforge.net/projects/mingw/files/UserContributed/regex/", "description": ""},
"libgpg_error": {"version": "1.27", "website": "https://www.gnupg.org/related_software/libgpg-error/", "description": "libgpg-error"},
"libgsasl": {"version": "1.8.0", "website": "https://www.gnu.org/software/gsasl/", "description": "Libgsasl"},
"libgsf": {"version": "1.14.30", "website": "https://developer.gnome.org/gsf/", "description": ""},
"libharu": {"version": "2.2.1", "website": "http://libharu.org/", "description": ""},
"libiberty": {"version": "2.25.1", "website": "https://gcc.gnu.org/onlinedocs/libiberty/", "description": ""},
"libical": {"version": "2.0.0", "website": "https://freeassociation.sourceforge.io/", "description": ""},
"libiconv": {"version": "1.15", "website": "https://www.gnu.org/software/libiconv/", "description": ""},
"libid3tag": {"version": "0.15.1b", "website": "https://sourceforge.net/projects/mad/files/libid3tag/", "description": ""},
"libidn": {"version": "1.33", "website": "https://www.gnu.org/software/libidn/", "description": "Libidn"},
"libidn2": {"version": "0.16", "website": "https://www.gnu.org/software/libidn/#libidn2", "description": "implementation of IDNA2008/TR46 internationalized domain names"},
"libieee1284": {"version": "0.2.11", "website": "http://cyberelk.net/tim/software/libieee1284/", "description": ""},
"libircclient": {"version": "1.8", "website": "https://sourceforge.net/projects/libircclient/", "description": ""},
"libjpeg-turbo": {"version": "1.5.1", "website": "http://libjpeg-turbo.virtualgl.org/", "description": ""},
"liblastfm": {"version": "1.0.9", "website": "https://github.com/lastfm/liblastfm", "description": "A Qt C++ library for the Last.fm webservices"},
"liblastfm_qt4": {"version": "1.0.9", "website": "https://github.com/lastfm/liblastfm", "description": "A Qt C++ library for the Last.fm webservices"},
"liblaxjson": {"version": "1.0.5", "website": "https://github.com/andrewrk/liblaxjson", "description": ""},
"liblo": {"version": "0.28", "website": "https://liblo.sourceforge.io/", "description": ""},
"liblqr-1": {"version": "0.4.2", "website": "https://liblqr.wikidot.com/", "description": ""},
"liblsmash": {"version": "2.9.1", "website": "https://l-smash.github.io/l-smash/", "description": "L-SMASH"},
"libltdl": {"version": "2.4.4", "website": "https://www.gnu.org/software/libtool/manual/html_node/Using-libltdl.html", "description": "GNU Libtool Library (libltdl)"},
"libmad": {"version": "0.15.1b", "website": "http://www.underbit.com/products/mad/", "description": ""},
"libmicrohttpd": {"version": "0.9.38", "website": "https://www.gnu.org/software/libmicrohttpd/", "description": "GNU Libmicrohttpd"},
"libmikmod": {"version": "3.3.7", "website": "http://mikmod.raphnet.net/", "description": "libMikMod"},
"libmms": {"version": "0.6.4", "website": "https://sourceforge.net/projects/libmms/", "description": "a library for downloading (streaming) media files using the mmst and mmsh protocols"},
"libmng": {"version": "2.0.3", "website": "https://www.libmng.com/", "description": ""},
"libmodplug": {"version": "0.8.8.4", "website": "https://modplug-xmms.sourceforge.io/", "description": ""},
"libmpcdec": {"version": "1.2.6", "website": "https://www.musepack.net/", "description": ""},
"libmysqlclient": {"version": "6.1.6", "website": "https://dev.mysql.com/downloads/connector/c/", "description": ""},
"libnice": {"version": "0.1.13", "website": "https://nice.freedesktop.org/wiki/", "description": ""},
"libntlm": {"version": "1.4", "website": "http://www.nongnu.org/libntlm/", "description": "Libntlm"},
"liboauth": {"version": "1.0.3", "website": "https://liboauth.sourceforge.io/", "description": ""},
"libodbc++": {"version": "0.2.5", "website": "https://libodbcxx.sourceforge.io/", "description": ""},
"liboil": {"version": "0.3.17", "website": "https://liboil.freedesktop.org/", "description": ""},
"libomemo": {"version": "0.4.1", "website": "https://github.com/gkdr/libomemo", "description": "Implementation of OMEMO in C"},
"libotr": {"version": "4.1.1", "website": "https://otr.cypherpunks.ca/", "description": "Off-the-Record Messaging"},
"libpano13": {"version": "2.9.18", "website": "https://panotools.sourceforge.io/", "description": ""},
"libpaper": {"version": "1.1.24+nmu4", "website": "https://packages.debian.org/unstable/libpaper1", "description": ""},
"libplist": {"version": "1.12", "website": "https://github.com/libimobiledevice/libplist", "description": ""},
"libpng": {"version": "1.6.29", "website": "http://www.libpng.org/", "description": ""},
"librosco": {"version": "0.1.11", "website": "https://github.com/colinbourassa/librosco/", "description": ""},
"librsvg": {"version": "2.40.5", "website": "https://librsvg.sourceforge.io/", "description": ""},
"librtmp": {"version": "a107cef", "website": "https://rtmpdump.mplayerhq.hu/", "description": ""},
"libsamplerate": {"version": "0.1.9", "website": "http://www.mega-nerd.com/SRC/", "description": ""},
"libshout": {"version": "2.4.1", "website": "http://www.icecast.org/", "description": ""},
"libsigc++": {"version": "2.4.0", "website": "https://libsigc.sourceforge.io/", "description": ""},
"libsndfile": {"version": "1.0.28", "website": "http://www.mega-nerd.com/libsndfile/", "description": ""},
"libsodium": {"version": "1.0.6", "website": "https://download.libsodium.org/doc/", "description": ""},
"libsoup": {"version": "2.57.1", "website": "https://github.com/GNOME/libsoup", "description": "HTTP client/server library for GNOME"},
"libspectre": {"version": "0.2.8", "website": "https://libspectre.freedesktop.org/", "description": ""},
"libssh2": {"version": "1.8.0", "website": "https://www.libssh2.org/", "description": ""},
"libsvm": {"version": "3.22", "website": "https://www.csie.ntu.edu.tw/~cjlin/libsvm", "description": ""},
"libtool": {"version": "2.4.4", "website": "https://www.gnu.org/software/libtool/", "description": "GNU Libtool"},
"libtorrent-rasterbar": {"version": "1.1.0", "website": "http://www.rasterbar.com/products/libtorrent/", "description": ""},
"libunistring": {"version": "0.9.7", "website": "https://www.gnu.org/software/libunistring/", "description": ""},
"libusb": {"version": "1.2.6.0", "website": "https://libusb-win32.sourceforge.io/", "description": "LibUsb"},
"libusb1": {"version": "1.0.21", "website": "http://libusb.org/", "description": "LibUsb-1.0"},
"libuv": {"version": "1.9.1", "website": "http://libuv.org/", "description": ""},
"libvpx": {"version": "1.5.0", "website": "https://code.google.com/p/webm/", "description": "vpx"},
"libwebp": {"version": "0.4.4", "website": "https://developers.google.com/speed/webp/", "description": ""},
"libwebsockets": {"version": "1.4-chrome43-firefox-36", "website": "https://libwebsockets.org/", "description": ""},
"libxml++": {"version": "2.37.2", "website": "https://libxmlplusplus.sourceforge.io/", "description": "libxml2"},
"libxml2": {"version": "2.9.4", "website": "http://www.xmlsoft.org/", "description": ""},
"libxslt": {"version": "1.1.29", "website": "http://xmlsoft.org/XSLT/", "description": ""},
"libzip": {"version": "1.1.3", "website": "https://www.nih.at/libzip/", "description": ""},
"llvm": {"version": "3.4", "website": "http://llvm.org/", "description": ""},
"log4cxx": {"version": "0.10.0", "website": "https://logging.apache.org/log4cxx/", "description": ""},
"lua": {"version": "5.3.3", "website": "https://www.lua.org/", "description": "Lua"},
"luabind": {"version": "0.9.1", "website": "http://www.rasterbar.com/products/luabind.html", "description": "Luabind"},
"luajit": {"version": "2.0.4", "website": "https://luajit.org/luajit.html", "description": "LuaJIT"},
"lz4": {"version": "1.7.5", "website": "https://github.com/lz4/lz4", "description": "lossless compression algorithm optimized for speed"},
"lzma": {"version": "1700", "website": "http://www.7-zip.org/sdk.html", "description": "LZMA SDK"},
"lzo": {"version": "2.09", "website": "https://www.oberhumer.com/opensource/lzo/", "description": ""},
"matio": {"version": "1.5.2", "website": "https://sourceforge.net/projects/matio/", "description": ""},
"mdbtools": {"version": "0.7.1", "website": "https://sourceforge.net/projects/mdbtools/", "description": ""},
"mingw-w64": {"version": "5.0.2", "website": "https://mingw-w64.sourceforge.io/", "description": "MinGW-w64 Runtime"},
"miniupnpc": {"version": "1.9", "website": "http://miniupnp.free.fr/", "description": ""},
"minizip": {"version": "0b46a2b", "website": "http://www.winimage.com/zLibDll/minizip.html", "description": ""},
"mman-win32": {"version": "b7ec370", "website": "https://code.google.com/p/mman-win32/", "description": "MMA-Win32"},
"mpc": {"version": "1.0.2", "website": "http://www.multiprecision.org/", "description": "GNU MPC"},
"mpfr": {"version": "3.1.5", "website": "http://www.mpfr.org/", "description": ""},
"mpg123": {"version": "1.22.4", "website": "https://www.mpg123.de/", "description": ""},
"muparser": {"version": "2.2.5", "website": "http://muparser.beltoforion.de/", "description": "muParser"},
"muparserx": {"version": "4.0.4", "website": "http://muparserx.beltoforion.de/", "description": "muParserX"},
"mxe-conf": {"version": "1", "website": "", "description": ""},
"mxml": {"version": "2.10", "website": "https://michaelrsweet.github.io/mxml/", "description": "Mini-XML"},
"ncurses": {"version": "e14300b", "website": "https://www.gnu.org/software/ncurses/", "description": "Ncurses"},
"neon": {"version": "0.30.2", "website": "http://webdav.org/neon/", "description": "HTTP and WebDAV client library (libneon)"},
"netcdf": {"version": "4.3.0", "website": "https://www.unidata.ucar.edu/software/netcdf/", "description": "NetCDF"},
"netpbm": {"version": "10.35.96", "website": "https://netpbm.sourceforge.io/", "description": "Netpbm"},
"nettle": {"version": "3.3", "website": "https://www.lysator.liu.se/~nisse/nettle/", "description": ""},
"nlopt": {"version": "2.4.2", "website": "http://ab-initio.mit.edu/wiki/index.php/NLopt", "description": "NLopt"},
"nsis": {"version": "3.01", "website": "https://nsis.sourceforge.io/", "description": "NSIS"},
"ocaml-cairo": {"version": "1.2.0", "website": "https://cairographics.org/cairo-ocaml/", "description": "cairo-ocaml"},
"ocaml-camlimages": {"version": "4.0.1", "website": "http://gallium.inria.fr/camlimages", "description": "camlimages"},
"ocaml-core": {"version": "4.00.1", "website": "https://caml.inria.fr/", "description": "ocaml"},
"ocaml-findlib": {"version": "1.4", "website": "http://download.camlcity.org/", "description": "findlib"},
"ocaml-flexdll": {"version": "0.31", "website": "http://alain.frisch.fr/", "description": "flexdll"},
"ocaml-lablgl": {"version": "1.05", "website": "http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgl.html", "description": "lablgl"},
"ocaml-lablgtk2": {"version": "2.16.0", "website": "https://forge.ocamlcore.org/", "description": "lablgtk2"},
"ocaml-native": {"version": "4.00.1", "website": "https://caml.inria.fr/", "description": "ocaml"},
"ocaml-xml-light": {"version": "2.2", "website": "http://tech.motion-twin.com/xmllight.html", "description": "xml-light"},
"oce": {"version": "0.17.2", "website": "https://github.com/tpaviot/oce", "description": "Open CASCADE Community Edition"},
"ogg": {"version": "1.3.2", "website": "https://www.xiph.org/ogg/", "description": "OGG"},
"old": {"version": "0.17", "website": "https://blitiri.com.ar/p/old/", "description": ""},
"openal": {"version": "1.16.0", "website": "http://kcat.strangesoft.net/openal.html", "description": ""},
"openblas": {"version": "0.2.15", "website": "http://www.openblas.net/", "description": "OpenBLAS"},
"opencore-amr": {"version": "0.1.3", "website": "https://opencore-amr.sourceforge.io/", "description": ""},
"opencsg": {"version": "1.4.1", "website": "http://www.opencsg.org/", "description": ""},
"opencv": {"version": "2.4.10", "website": "http://opencv.org/", "description": "OpenCV"},
"openexr": {"version": "2.2.0", "website": "http://www.openexr.com/", "description": "OpenEXR"},
"openjpeg": {"version": "2.1.0", "website": "http://www.openjpeg.org/", "description": "OpenJPEG"},
"openmp-validation": {"version": "3.1", "website": "https://github.com/uhhpctools/omp-validation", "description": "OpenMP Validation Suite"},
"openscenegraph": {"version": "3.4.0", "website": "http://www.openscenegraph.org/", "description": "OpenSceneGraph"},
"openssl": {"version": "1.0.2l", "website": "https://www.openssl.org/", "description": ""},
"openthreads": {"version": "3.4.0", "website": "http://www.openscenegraph.org/", "description": "OpenThreads"},
"opus": {"version": "1.1.1", "website": "https://opus-codec.org/", "description": ""},
"opusfile": {"version": "0.6", "website": "https://opus-codec.org/", "description": ""},
"ossim": {"version": "1.8.20", "website": "https://trac.osgeo.org/ossim", "description": "OSSIM"},
"pango": {"version": "1.37.4", "website": "http://www.pango.org/", "description": "Pango"},
"pangomm": {"version": "2.34.0", "website": "http://www.pango.org/", "description": "Pangomm"},
"pcl": {"version": "1.8.0", "website": "http://www.pointclouds.org/", "description": "PCL (Point Cloud Library)"},
"pcre": {"version": "8.40", "website": "http://www.pcre.org/", "description": "PCRE"},
"pcre2": {"version": "10.23", "website": "http://www.pcre.org/", "description": "PCRE2"},
"pdcurses": {"version": "3.4", "website": "https://pdcurses.sourceforge.io/", "description": "PDcurses"},
"pdflib_lite": {"version": "7.0.5p3", "website": "https://www.pdflib.com/download/free-software/pdflib-lite-7/", "description": "PDFlib Lite"},
"pfstools": {"version": "2.0.4", "website": "https://pfstools.sourceforge.io/", "description": ""},
"physfs": {"version": "2.0.3", "website": "https://icculus.org/physfs/", "description": ""},
"picomodel": {"version": "1142ad8", "website": "https://code.google.com/p/picomodel/", "description": ""},
"pire": {"version": "0.0.5", "website": "https://github.com/yandex/pire", "description": "PIRE"},
"pixman": {"version": "0.33.6", "website": "https://cairographics.org/", "description": ""},
"pkgconf": {"version": "da179fd", "website": "https://github.com/pkgconf/pkgconf", "description": ""},
"plib": {"version": "1.8.5-rc1", "website": "https://plib.sourceforge.io/", "description": "Plib"},
"plibc": {"version": "cd7ed09", "website": "https://plibc.sourceforge.io/", "description": "Plibc"},
"plotmm": {"version": "0.1.2", "website": "https://plotmm.sourceforge.io/", "description": "PlotMM"},
"plotutils": {"version": "2.6", "website": "https://www.gnu.org/software/plotutils/", "description": ""},
"poco": {"version": "1.4.7p1", "website": "https://pocoproject.org/", "description": "POCO C++ Libraries"},
"polarssl": {"version": "1.3.9", "website": "https://polarssl.org/", "description": "Polar SSL Library"},
"poppler": {"version": "0.51.0", "website": "https://poppler.freedesktop.org/", "description": ""},
"popt": {"version": "1.16", "website": "http://freshmeat.net/projects/popt/", "description": ""},
"portablexdr": {"version": "4.9.1", "website": "https://people.redhat.com/~rjones/portablexdr/", "description": "PortableXDR"},
"portaudio": {"version": "190600_20161030", "website": "http://www.portaudio.com/", "description": ""},
"portmidi": {"version": "217", "website": "https://portmedia.sourceforge.io/portmidi/", "description": ""},
"postgresql": {"version": "9.2.4", "website": "https://www.postgresql.org/", "description": "PostgreSQL"},
"primesieve": {"version": "5.5.0", "website": "http://primesieve.org/", "description": "Primesieve"},
"proj": {"version": "4.9.3", "website": "https://trac.osgeo.org/proj/", "description": ""},
"protobuf": {"version": "3.2.0", "website": "https://github.com/google/protobuf", "description": ""},
"pthreads": {"version": "POSIX 1003.1-2001", "website": "https://en.wikipedia.org/wiki/POSIX_Threads", "description": "POSIX Threads"},
"qca": {"version": "2.1.3", "website": "https://userbase.kde.org/QCA", "description": "Qt Cryptographic Architecture"},
"qdbm": {"version": "1.8.78", "website": "http://fallabs.com/qdbm/", "description": "QDBM"},
"qhttpengine": {"version": "0.1.0", "website": "https://github.com/nitroshare/qhttpengine", "description": ""},
"qjson": {"version": "0.8.1", "website": "https://qjson.sourceforge.io/", "description": "QJson"},
"qscintilla2": {"version": "2.8.4", "website": "https://www.riverbankcomputing.com/software/qscintilla/intro", "description": "QScintilla2"},
"qt": {"version": "4.8.7", "website": "https://www.qt.io/", "description": "Qt"},
"qt3d": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qt5": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtactiveqt": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtbase": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtcanvas3d": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtcharts": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtconnectivity": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtdatavis3d": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtdeclarative": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtgamepad": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtgraphicaleffects": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtimageformats": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtlocation": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtmultimedia": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtofficeopenxml": {"version": "02dda4a46f92a843eaba5f5a021952860eadfe01", "website": "https://github.com/dbzhang800/QtOfficeOpenXml/", "description": "QtOfficeOpenXml"},
"qtpurchasing": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtquickcontrols": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtquickcontrols2": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtscript": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtscxml": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtsensors": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtserialbus": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtserialport": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtserialport_qt4": {"version": "5c3b6cc", "website": "https://www.qt.io/", "description": "Qt"},
"qtservice": {"version": "ad9bc46", "website": "https://qt.gitorious.org/qt-solutions/", "description": "Qt Solutions"},
"qtsparkle": {"version": "4c852e57061d7928573afdf88f04f89d85167477", "website": "https://github.com/davidsansome/qtsparkle", "description": "Qt auto-updater lib"},
"qtsparkle_qt4": {"version": "4c852e57061d7928573afdf88f04f89d85167477", "website": "https://github.com/davidsansome/qtsparkle", "description": "Qt auto-updater lib"},
"qtsvg": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtsystems": {"version": "4e3a7ed", "website": "https://www.qt.io/", "description": "Qt"},
"qttools": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qttranslations": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtvirtualkeyboard": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtwebchannel": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtwebkit": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtwebsockets": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtwebview": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtwinextras": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qtxlsxwriter": {"version": "6895d8ba6c3a80768c98539445b124654801e8dd", "website": "https://github.com/dbzhang800/QtXlsxWriter/", "description": "QtXlsxWriter"},
"qtxmlpatterns": {"version": "5.9.0", "website": "https://www.qt.io/", "description": "Qt"},
"qwt": {"version": "6.1.3", "website": "https://qwt.sourceforge.io/", "description": "Qwt"},
"qwt_qt4": {"version": "6.1.3", "website": "https://qwt.sourceforge.io/", "description": "Qwt-qt4"},
"qwtplot3d": {"version": "0.2.7", "website": "https://qwtplot3d.sourceforge.io/", "description": "QwtPlot3D"},
"ragel": {"version": "6.9", "website": "https://www.colm.net/open-source/ragel/", "description": "Ragel"},
"readline": {"version": "6.3", "website": "https://tiswww.case.edu/php/chet/readline/rltop.html", "description": "Readline"},
"rubberband": {"version": "1.8.1", "website": "http://breakfastquay.com/rubberband/", "description": "Rubberband"},
"rucksack": {"version": "3.1.0", "website": "https://github.com/andrewrk/rucksack", "description": ""},
"sdl": {"version": "1.2.15", "website": "https://www.libsdl.org/", "description": "SDL"},
"sdl2": {"version": "2.0.5", "website": "https://www.libsdl.org/", "description": "SDL2"},
"sdl2_gfx": {"version": "1.0.3", "website": "http://www.ferzkopp.net/joomla/content/view/19/14/", "description": "SDL2_gfx"},
"sdl2_image": {"version": "2.0.1", "website": "https://www.libsdl.org/", "description": "SDL2_image"},
"sdl2_mixer": {"version": "2.0.1", "website": "https://www.libsdl.org/", "description": "SDL2_mixer"},
"sdl2_net": {"version": "2.0.0", "website": "https://www.libsdl.org/", "description": ""},
"sdl2_ttf": {"version": "2.0.14", "website": "https://www.libsdl.org/", "description": "SDL2_ttf"},
"sdl_gfx": {"version": "2.0.25", "website": "http://www.ferzkopp.net/joomla/content/view/19/14/", "description": "SDL_gfx"},
"sdl_image": {"version": "1.2.12", "website": "https://www.libsdl.org/projects/SDL_image/", "description": "SDL_image"},
"sdl_mixer": {"version": "1.2.12", "website": "https://www.libsdl.org/projects/SDL_mixer/", "description": "SDL_mixer"},
"sdl_net": {"version": "1.2.8", "website": "https://www.libsdl.org/projects/SDL_net/", "description": "SDL_net"},
"sdl_pango": {"version": "0.1.2", "website": "https://sdlpango.sourceforge.io/", "description": "SDL_Pango"},
"sdl_rwhttp": {"version": "0.2.0", "website": "https://github.com/mgerhardy/SDL_rwhttp/", "description": "SDL_rwhttp"},
"sdl_sound": {"version": "1.0.3", "website": "https://icculus.org/SDL_sound/", "description": "SDL_sound"},
"sdl_ttf": {"version": "2.0.11", "website": "https://www.libsdl.org/projects/SDL_ttf/", "description": "SDL_ttf"},
"sfml": {"version": "2.4.2", "website": "https://www.sfml-dev.org/", "description": "SFML"},
"smpeg": {"version": "0.4.5+cvs20030824", "website": "https://icculus.org/smpeg/", "description": ""},
"smpeg2": {"version": "2.0.0", "website": "https://icculus.org/smpeg/", "description": "smpeg"},
"sox": {"version": "14.4.2", "website": "https://sox.sourceforge.io/", "description": "SoX"},
"sparsehash": {"version": "2.0.3", "website": "https://github.com/sparsehash/sparsehash", "description": ""},
"speex": {"version": "1.2rc2", "website": "https://speex.org/", "description": "Speex"},
"speexdsp": {"version": "1.2rc3", "website": "https://speex.org/", "description": "SpeexDSP"},
"sqlite": {"version": "3190300", "website": "https://www.sqlite.org/", "description": "SQLite"},
"subversion": {"version": "1.9.4", "website": "https://subversion.apache.org/", "description": ""},
"suitesparse": {"version": "4.2.1", "website": "http://faculty.cse.tamu.edu/davis/suitesparse.html", "description": "SuiteSparse"},
"t4k_common": {"version": "0.1.1", "website": "https://tux4kids.alioth.debian.org/", "description": ""},
"taglib": {"version": "1.10", "website": "https://developer.kde.org/~wheeler/taglib.html", "description": "TagLib"},
"tclap": {"version": "1.2.1", "website": "https://tclap.sourceforge.io/", "description": ""},
"teem": {"version": "1.11.0", "website": "https://teem.sourceforge.io/", "description": "Teem"},
"termcap": {"version": "1.3.1", "website": "https://www.gnu.org/software/termutils/", "description": "Termcap"},
"theora": {"version": "1.1.1", "website": "https://theora.org/", "description": "Theora"},
"tidy-html5": {"version": "5.4.0", "website": "http://www.html-tidy.org/", "description": "HTML/XML syntax checker and reformatter"},
"tiff": {"version": "4.0.8", "website": "http://www.libtiff.org/", "description": "LibTIFF"},
"tinyxml": {"version": "2.6.2", "website": "https://sourceforge.net/projects/tinyxml/", "description": ""},
"tinyxml2": {"version": "4.0.1", "website": "http://grinninglizard.com/tinyxml2/", "description": ""},
"tre": {"version": "0.8.0", "website": "https://laurikari.net/tre/", "description": "TRE"},
"twolame": {"version": "0.3.13", "website": "http://www.twolame.org/", "description": "TwoLAME"},
"ucl": {"version": "1.03", "website": "https://www.oberhumer.com/opensource/ucl/", "description": "UCL"},
"unrtf": {"version": "0.21.9", "website": "https://www.gnu.org/software/unrtf/", "description": "unRTF"},
"upx": {"version": "3.91", "website": "https://upx.github.io/", "description": "UPX"},
"vamp-plugin-sdk": {"version": "2.5", "website": "http://vamp-plugins.org/", "description": "Vamp Plugins SDK"},
"vcdimager": {"version": "0.7.24", "website": "https://www.gnu.org/software/vcdimager/", "description": ""},
"vidstab": {"version": "0.98b", "website": "http://public.hronopik.de/vid.stab/features.php?lang=en", "description": "vid.stab video stablizer"},
"vigra": {"version": "1.9.0", "website": "https://ukoethe.github.io/vigra/", "description": ""},
"vmime": {"version": "3d3ed7b", "website": "https://www.vmime.org/", "description": "VMime"},
"vo-aacenc": {"version": "0.1.3", "website": "https://github.com/mstorsjo/vo-aacenc", "description": "VO-AACENC"},
"vo-amrwbenc": {"version": "0.1.3", "website": "https://github.com/mstorsjo/vo-amrwbenc", "description": "VO-AMRWBENC"},
"vorbis": {"version": "1.3.5", "website": "http://www.vorbis.com/", "description": "Vorbis"},
"vtk": {"version": "5.8.0", "website": "http://www.vtk.org/", "description": ""},
"vtk6": {"version": "6.3.0", "website": "http://www.vtk.org/", "description": "VTK6"},
"waf": {"version": "1.8.17", "website": "https://waf.io/", "description": "Waf: the meta build system"},
"wavpack": {"version": "4.75.2", "website": "http://www.wavpack.com/", "description": "WavPack"},
"wget": {"version": "1.19.1", "website": "https://www.gnu.org/software/wget/", "description": ""},
"widl": {"version": "5.0.2", "website": "https://www.winehq.org/docs/widl/", "description": "Wine IDL Compiler"},
"winpcap": {"version": "4_1_3", "website": "https://www.winpcap.org/", "description": "WinPcap"},
"wt": {"version": "3.3.7", "website": "https://www.webtoolkit.eu/", "description": "Wt"},
"wxwidgets": {"version": "3.0.2", "website": "https://www.wxwidgets.org/", "description": "wxWidgets"},
"x264": {"version": "20161130-2245", "website": "https://www.videolan.org/developers/x264.html", "description": ""},
"xapian-core": {"version": "1.2.21", "website": "https://xapian.org/", "description": "Xapian-Core"},
"xerces": {"version": "3.1.4", "website": "https://xerces.apache.org/xerces-c/", "description": "Xerces-C++"},
"xmlrpc-c": {"version": "d4364f4", "website": "https://xmlrpc-c.sourceforge.io/", "description": ""},
"xmlwrapp": {"version": "0.7.0", "website": "https://sourceforge.net/projects/xmlwrapp/", "description": ""},
"xorg-macros": {"version": "1.19.0", "website": "https://cgit.freedesktop.org/xorg/util/macros/", "description": "X.org utility macros"},
"xvidcore": {"version": "1.3.4", "website": "https://www.xvid.com/", "description": ""},
"xxhash": {"version": "0.6.1", "website": "https://cyan4973.github.io/xxHash/", "description": "xxHash"},
"xz": {"version": "5.2.3", "website": "https://tukaani.org/xz/", "description": "XZ"},
"yaml-cpp": {"version": "0.5.3", "website": "https://github.com/jbeder/yaml-cpp", "description": "A YAML parser and emitter for C++"},
"yasm": {"version": "1.3.0", "website": "http://yasm.tortall.net/", "description": "Yasm"},
"zlib": {"version": "1.2.11", "website": "https://zlib.net/", "description": ""},
"zziplib": {"version": "0.13.62", "website": "https://zziplib.sourceforge.io/", "description": "ZZIPlib"},
"": null
}

@ -0,0 +1,141 @@
# This file is part of MXE. See LICENSE.md for licensing information.
# Standardise GitHub downloads and updates
# Download API has two forms:
# Archive:
# url = <owner>/<repo>/archive/<ref>.tar.gz
# dir = <repo>-<ref>
# if <ref> starts with a single `v`, it is removed from dir
#
# Tarball:
# url = <owner>/<repo>/tarball/<ref>/output-file.tar.gz
# dir = <owner>-<repo>-<short sha>
#
# TODO: also third api - `releases` see libass.mk
# grep -l 'MXE_GET_GITHUB\|api.github.com\|github.com.*archive' src/*.mk | xargs grep -L 'GH_CONF'
#
# Filename doesn't matter as we stream the url to a name of our choosing.
#
# The archive API could be used for all packages, however, if the reference
# is any sort of SHA, the full SHA is used for the directory. We could `cd`
# into it without knowing the SHA beforehand, but the directory length would
# be comical in logs etc.
#
# The tarball API accepts references to commits or tags, always using the
# short SHA as the directory. In this case, tag tracking packages would have
# to store the SHA (see #1002). However, this only works for lightweight
# tags, not annotated tags that most projects use for releases.
#
# In summary, we have to use both.
# The tarball API determines the short SHA length used in the directory name.
# Chances of a collision on a "given" commit seem to decrease as the chance
# of "any" collision increases. If that changes in the future, `make update`
# will fix it.
# Currently (2015-12) the API sets the short SHA length to:
GITHUB_SHA_LENGTH := 7
# Packages must set the following metadata:
# Track branch - Tarball API
# GH_CONF := owner/repo/branch
# updates will use the last commit from the specified branch as
# a version string and bypass `sort -V`
#
# Track tags - Archive API
# GH_CONF := owner/repo, tag prefix, tag suffix, tag filter-out, version separator
# updates will construct a version number based on:
# <tag prefix><s/<version sep>/./version><tag suffix>
# common tag filtering is applied with `grep -v`:
GITHUB_TAG_FILTER := alpha\|beta\|rc
# More complex filters can fall back to `MXE_GET_GH_TAGS` which returns
# a list for post-processing.
# ...and finally, auto-configure packages based on above metadata:
# - `eval` these snippets during PKG_RULE loop (where PKG is in scope).
# - `call` or `eval` from package makefiles requires complex quoting
# and looks out of place.
# - don't redefine manually set standard variables (FILE, SUBDIR, URL, UPDATE)
GH_OWNER = $(word 1,$(subst /,$(space),$(word 1,$(subst $(comma),$(space),$($(PKG)_GH_CONF)))))
GH_REPO = $(word 2,$(subst /,$(space),$(word 1,$(subst $(comma),$(space),$($(PKG)_GH_CONF)))))
GH_BRANCH = $(word 3,$(subst /,$(space),$(word 1,$(subst $(comma),$(space),$($(PKG)_GH_CONF)))))
GH_TAG_VARS = $(call rest,$(subst $(comma),$(space)$(__gmsl_aa_magic),$(subst $(space),,$($(PKG)_GH_CONF))))
GH_TAG_PREFIX = $(subst $(__gmsl_aa_magic),,$(word 1,$(GH_TAG_VARS)))
GH_TAG_SUFFIX = $(subst $(__gmsl_aa_magic),,$(word 2,$(GH_TAG_VARS)))
GH_TAG_FILTER = $(subst $(__gmsl_aa_magic),,$(word 3,$(GH_TAG_VARS)))
GH_VERSION_SEP = $(subst $(__gmsl_aa_magic),,$(word 4,$(GH_TAG_VARS)))
define MXE_SETUP_GITHUB
$(PKG)_GH_OWNER := $(GH_OWNER)
$(PKG)_GH_REPO := $(GH_REPO)
$(PKG)_BRANCH := $(GH_BRANCH)
$(PKG)_TAG_VARS := $(GH_TAG_VARS)
$(PKG)_TAG_PREFIX := $(GH_TAG_PREFIX)
$(PKG)_TAG_SUFFIX := $(GH_TAG_SUFFIX)
$(PKG)_TAG_FILTER := $(GH_TAG_FILTER)
$(PKG)_VERSION_SEP := $(or $(GH_VERSION_SEP),.)
$(PKG)_FILE := $(or $($(PKG)_FILE),$(PKG)-$$($$(PKG)_TAG_PREFIX)$($(PKG)_VERSION)$$($$(PKG)_TAG_SUFFIX).tar.gz)
$(if $(and $(GH_BRANCH),$(GH_TAG_VARS)),\
$(error $(newline) $(PKG) specifies both branch and tag variables $(newline)))
$(if $(GH_BRANCH),$(value MXE_SETUP_GITHUB_BRANCH),$(value MXE_SETUP_GITHUB_TAG))
endef
define MXE_SETUP_GITHUB_BRANCH
$(PKG)_SUBDIR := $(or $($(PKG)_SUBDIR),$($(PKG)_GH_OWNER)-$($(PKG)_GH_REPO)-$($(PKG)_VERSION))
$(PKG)_URL := $(or $($(PKG)_URL),https://github.com/$($(PKG)_GH_OWNER)/$($(PKG)_GH_REPO)/tarball/$($(PKG)_VERSION)/$($(PKG)_FILE))
$(PKG)_UPDATE := $(or $($(PKG)_UPDATE),$(call MXE_GET_GH_SHA,$($(PKG)_GH_OWNER)/$($(PKG)_GH_REPO),$($(PKG)_BRANCH)))
endef
define MXE_SETUP_GITHUB_TAG
$(PKG)_SUBDIR := $(or $($(PKG)_SUBDIR),$($(PKG)_GH_REPO)-$(if $(call sne,v,$($(PKG)_TAG_PREFIX)),$($(PKG)_TAG_PREFIX))$(subst .,$($(PKG)_VERSION_SEP),$($(PKG)_VERSION))$($(PKG)_TAG_SUFFIX))
$(PKG)_TAR_GZ := $(or $($(PKG)_TAR_GZ),$($(PKG)_GH_REPO)-$($(PKG)_TAG_PREFIX)$(subst .,$($(PKG)_VERSION_SEP),$($(PKG)_VERSION))$($(PKG)_TAG_SUFFIX))
$(PKG)_URL := $(or $($(PKG)_URL),https://github.com/$($(PKG)_GH_OWNER)/$($(PKG)_GH_REPO)/archive/$(subst $($(PKG)_GH_REPO)-,,$($(PKG)_TAR_GZ)).tar.gz)
$(PKG)_UPDATE := $(or $($(PKG)_UPDATE),$(call MXE_GET_GH_TAG,$($(PKG)_GH_OWNER)/$($(PKG)_GH_REPO),$($(PKG)_TAG_PREFIX),$($(PKG)_TAG_SUFFIX),$(or $($(PKG)_TAG_FILTER),$(GITHUB_TAG_FILTER)),$($(PKG)_VERSION_SEP)))
endef
# called with owner/repo,branch
define MXE_GET_GH_SHA
$(WGET) -q -O- 'https://api.github.com/repos/$(strip $(1))/git/refs/heads/$(strip $(2))' \
| $(SED) -n 's#.*"sha": "\([^"]\{$(GITHUB_SHA_LENGTH)\}\).*#\1#p' \
| head -1
endef
# called with owner/repo
define MXE_GET_GH_TAGS
$(WGET) -q -O- 'https://api.github.com/repos/$(strip $(1))/git/refs/tags/' \
| $(SED) -n 's#.*"ref": "refs/tags/\([^"]*\).*#\1#p'
endef
# called with owner/repo, tag prefix, tag suffix, filter-out, version sep
define MXE_GET_GH_TAG
$(MXE_GET_GH_TAGS) \
| $(if $(4),grep -v '$(strip $(4))') \
| $(SED) -n 's,^$(strip $(2))\([^"]*\)$(strip $(3))$$,\1,p' \
| tr '$(strip $(5))' '.' \
| $(SORT) -V
| tail -1
endef
GITHUB_PKGS = $(patsubst %_GH_CONF,%,$(filter %_GH_CONF,$(.VARIABLES)))
# check-gh-conf : test updates and source directory
# check-gh-conf-dl: removes downloads and tests above
# a test of many package updates may hit rate limit of 60/hr
# https://developer.github.com/v3/#rate-limiting
.PHONY: check-gh-conf check-gh-conf-%
check-gh-conf-dl: REMOVE_DOWNLOAD = true
check-gh-conf-dl: MXE_NO_BACKUP_DL = true
check-gh-conf-dl: check-gh-conf
check-gh-conf-pkg-%: check-update-package-% download-only-%
@$(PRINTF_FMT) '[prep-src]' '$(*)' | $(RTRIM)
@($(MAKE) -f '$(MAKEFILE)' 'prepare-pkg-source-$(*)') > /dev/null
@rm -rf '$(call TMP_DIR,$(*))'
# secondexpansion here since this file is included before pkg makefiles
.SECONDEXPANSION:
check-gh-conf: $$(addprefix check-gh-conf-pkg-,$$(GITHUB_PKGS))
github-pkgs: $$(GITHUB_PKGS)

File diff suppressed because it is too large Load Diff

@ -0,0 +1,88 @@
# This file is part of MXE. See LICENSE.md for licensing information.
GIT_DIR = $(if $(patsubst .,,$($(1)_SUBDIR)) \
,$(GITS_DIR)/$($(1)_SUBDIR),$(GITS_DIR)/$(1))
GIT_CMD = git \
--work-tree='$(call GIT_DIR,$(1))' \
--git-dir='$(call GIT_DIR,$(1))'/.git
PATCH_NAME = 1-fixes
# can't use PKG_PATCHES here, because it returns existing patches
# while export-patch creates new patch
PATCH_BY_NAME = $(patsubst %.mk,%-$(2).patch,$(PKG_MAKEFILES))
define INIT_GIT
# unpack to gits/tmp/pkg
rm -rf '$(GITS_DIR)/tmp'
mkdir -p '$(GITS_DIR)/tmp/$(1)'
cd '$(GITS_DIR)/tmp/$(1)' && $(call UNPACK_PKG_ARCHIVE,$(1))
# if PKG_SUBDIR is ".", the following will move gits/tmp/pkg
mv '$(abspath $(GITS_DIR)/tmp/$(1)/$($(1)_SUBDIR))' '$(call GIT_DIR,$(1))'
rm -rf '$(GITS_DIR)/tmp'
# rename existing .git directories if any
find '$(call GIT_DIR,$(1))' -name .git -prune -exec sh -c 'mv "$$0" "$$0"_' {} \;
# initialize git
$(call GIT_CMD,$(1)) init
$(call GIT_CMD,$(1)) add -A
$(call GIT_CMD,$(1)) commit -m "init"
$(call GIT_CMD,$(1)) tag dist
endef
define IMPORT_PATCH
cd '$(call GIT_DIR,$(1))' \
&& cat '$(2)' \
| $(SED) '/^From/,$$ !d' \
| $(SED) s/'^From: MXE'/"From: fix@me"/'g;' \
| $(call GIT_CMD,$(1)) am --keep-cr ;
endef
define EXPORT_PATCH
cd '$(call GIT_DIR,$(1))' \
&& ( \
echo 'This file is part of MXE. See LICENSE.md for licensing information.'; \
echo ''; \
echo 'Contains ad hoc patches for cross building.'; \
echo ''; \
$(call GIT_CMD,$(1)) format-patch \
--no-numbered \
-p \
--no-signature \
--stdout \
--text \
-M9 \
dist..HEAD \
| $(SED) 's/^From [0-9a-f]\{40\} /From 0000000000000000000000000000000000000000 /' \
| $(SED) 's/^index .......\.\......../index 1111111..2222222/' \
) > '$(PATCH_BY_NAME)'
endef
init-git-%: download-only-%
$(if $(call set_is_member,$*,$(PKGS)), \
$(if $(wildcard $(call GIT_DIR,$*)), \
$(error $(call GIT_DIR,$*) already exists), \
$(call INIT_GIT,$*)), \
$(error Package $* not found))
import-patch-%:
$(if $(call set_is_member,$*,$(PKGS)), \
$(if $(wildcard $(call GIT_DIR,$*)), \
$(call IMPORT_PATCH,$*,$(call PATCH_BY_NAME,$*,$(PATCH_NAME))), \
$(error $(call GIT_DIR,$*) does not exist)), \
$(error Package $* not found))
import-all-patches-%:
$(if $(call set_is_member,$*,$(PKGS)), \
$(if $(wildcard $(call GIT_DIR,$*)), \
$(foreach PKG_PATCH,$(call PKG_PATCHES,$*), \
$(call IMPORT_PATCH,$*,$(PKG_PATCH))), \
$(error $(call GIT_DIR,$*) does not exist)), \
$(error Package $* not found))
export-patch-%:
$(if $(call set_is_member,$*,$(PKGS)), \
$(if $(wildcard $(call GIT_DIR,$*)), \
$(call EXPORT_PATCH,$*,$(PATCH_NAME)), \
$(error $(call GIT_DIR,$*) does not exist)), \
$(error Package $* not found))

@ -0,0 +1,158 @@
### MXE Plugins
#### Overview
MXE aims to provide a stable toolchain and feature-rich set of libraries to
be as broadly applicable as possible. Many use cases fall outside this main
objective and plugins are a way to bridge the gap without official framework
support.
The most common cases include:
##### Additional packages
- building handy tools to run on host
- cross-compiled interpreters and packages
- examples of packaging complete builds for projects using MXE
The `apps`, `luarocks`, and `native` directories are generally supported by
the project, each plugin package should have an identified `$(PKG)_OWNER` as
a primary contact familiar with the specifics of the plugin.
##### Customisation
- alternate compiler versions
- minimal features/dependencies
- building a host toolchain
The `examples` and `gcc*` directories contain some starting points for
experiments or long-lived customisations. Attempts to do such things with
`git` branches can lead to an outdated core MXE and using plugins allows a
nice separation while still keeping all local changes under source control.
These are experimental and will be deprecated over time as framework support
is added to handle the various forms of customisation.
##### Internal MXE uses
The `native` plugin contains sub-directories with symlinks to a subset of
packages in the parent directory. These "sub-plugins" are automatically
activated on certain systems where the standard package-manager versions are
known to cause issues. These are supported but subject to change or removal
over time and should not be used directly.
#### Usage
The current implementation is very lightweight and a `plugin` is simply a
directory containing *.mk files. When a plugin is activated with:
```
make MXE_PLUGIN_DIRS=/path/to/foo
```
MXE will:
- include all core packages
- include `/path/to/foo/*.mk`
- create a target for each `*.mk` file
- create an `all-foo` target
Multiple plugins can be activated on the command line with an escaped
space-separated list:
```
make MXE_PLUGIN_DIRS='/path/to/foo /path/to/foo2'
```
To ensure plugins are activated across multiple invocations of `make`, the
`MXE_PLUGIN_DIRS` variable must always be specified either on the command line
or by adding an entry in `settings.mk`
*N.B.* Setting `MXE_PLUGIN_DIRS` via the environment is not guaranteed to
work in future versions.
For example, if you want to build keepassx from the `apps` plugin with
a minimal qt run:
```
make keepassx MXE_PLUGIN_DIRS='plugins/examples/custom-qt-min plugins/apps'
```
To build all packages in `luarocks`:
```
$ make all-luarocks MXE_PLUGIN_DIRS=plugins/luarocks
```
To **always** use your desired plugin:
```
echo 'override MXE_PLUGIN_DIRS += /path/to/foo' >> settings.mk
```
Note that multiple entries in `settings.mk` should not be escaped:
```
echo 'override MXE_PLUGIN_DIRS += /path/to/foo /path/to/foo2' >> settings.mk
```
To review which plugins are activated, use the `gmsl-print-*` target:
```
make gmsl-print-MXE_PLUGIN_DIRS MXE_PLUGIN_DIRS='/foo /bar'
```
#### Creating plugins
The two main use cases lead to different styles of plugin. The first case of
additional packages follows normal MXE guidelines and reviewing the contents of
`src/*.mk`, or the `apps` and `luarocks` plugins should help getting started.
This type of package will also work with normal MXE features such as updates
and patches.
The customisation style (override/overlay) can be trickier since any arbitrary
`make` statements can be used. Most normal variables should be overriden with
[simply expanded variables](https://www.gnu.org/software/make/manual/html_node/Flavors.html#Flavors)
i.e. using `:=` instead of `=`. For example, to change a package version:
```make
PKG := foo
$(PKG)_VERSION := 1.2.3
$(PKG)_CHECKSUM := 09c4c85cab...
```
In this case, the behaviour of `make update-package-foo` may not be able to
determine the correct file to update with the new version and checksum and
`make` may not detect that the target should be rebuilt (depending on how
files are named). This is an on-going work that will be addressed.
To change the set of patches applied:
```make
foo_PATCHES := /path/to/first.patch /path/to/second.patch
```
To apply no patches:
```make
foo_PATCHES :=
```
To alter dependencies and components:
```make
qt_DEPS := gcc dbus jpeg libmng libpng openssl tiff zlib
qt_BUILD := \
$(subst -accessibility ,-no-accessibility ,\
$(subst -qt-sql-,-no-sql-,\
$(qt_BUILD)))
qt_BUILD_SHARED := \
$(subst -static ,-shared ,\
$(subst -no-webkit ,-webkit ,\
$(qt_BUILD)))
```
Note the order of inclusion is indeterminate so multiple plugins should not
be chained or attempt to add/modify the same package.

@ -0,0 +1,78 @@
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: Pavel Vatagin <pavelvat@gmail.com>
Date: Sat, 5 Nov 2016 02:19:37 +0300
Subject: [PATCH] fix clementine
diff --git a/3rdparty/libprojectm/CMakeLists.txt b/3rdparty/libprojectm/CMakeLists.txt
index 1111111..2222222 100644
--- a/3rdparty/libprojectm/CMakeLists.txt
+++ b/3rdparty/libprojectm/CMakeLists.txt
@@ -174,6 +174,8 @@ if(BUNDLE_PROJECTM_PRESETS)
COPY_ONLY
)
endforeach (preset)
+ elseif (WIN32)
+ INSTALL(FILES ${presets} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/projectm-presets)
else (APPLE)
INSTALL(FILES ${presets} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/clementine/projectm-presets)
endif (APPLE)
diff --git a/3rdparty/libprojectm/glew.h b/3rdparty/libprojectm/glew.h
index 1111111..2222222 100644
--- a/3rdparty/libprojectm/glew.h
+++ b/3rdparty/libprojectm/glew.h
@@ -149,7 +149,7 @@ typedef unsigned short wchar_t;
# endif
#endif
#if !defined(_PTRDIFF_T_DEFINED) && !defined(_PTRDIFF_T_)
-# ifdef _WIN64
+# if defined(_WIN64) && !defined(__MINGW32__)
typedef __int64 ptrdiff_t;
# else
typedef _W64 int ptrdiff_t;
diff --git a/3rdparty/tinysvcmdns/CMakeLists.txt b/3rdparty/tinysvcmdns/CMakeLists.txt
index 1111111..2222222 100644
--- a/3rdparty/tinysvcmdns/CMakeLists.txt
+++ b/3rdparty/tinysvcmdns/CMakeLists.txt
@@ -7,7 +7,7 @@ set(TINYSVCMDNS-SOURCES
)
find_library(PTHREAD
- pthreadGC2
+ pthread
)
add_library(tinysvcmdns STATIC
diff --git a/ext/clementine-tagreader/CMakeLists.txt b/ext/clementine-tagreader/CMakeLists.txt
index 1111111..2222222 100644
--- a/ext/clementine-tagreader/CMakeLists.txt
+++ b/ext/clementine-tagreader/CMakeLists.txt
@@ -27,10 +27,10 @@ add_executable(clementine-tagreader
target_link_libraries(clementine-tagreader
${TAGLIB_LIBRARIES}
- ${QT_QTCORE_LIBRARY}
- ${QT_QTNETWORK_LIBRARY}
libclementine-common
libclementine-tagreader
+ ${QT_QTCORE_LIBRARY}
+ ${QT_QTNETWORK_LIBRARY}
)
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1111111..2222222 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1343,6 +1343,7 @@ if (WIN32)
tinysvcmdns
qtwin
dsound
+ ${QT_QTGUI_LIBRARY}
)
endif (WIN32)

@ -0,0 +1,91 @@
# This file is part of MXE. See LICENSE.md for licensing information.
# lconvert and lupdate are not provided by MXE for Qt4,
# so for Debian/Ubuntu you need install packages qt4-linguist-tools
# (this package contains lupdate and lrelease) and qt4-dev-tools
# (this package contains lconvert):
# apt-get install qt4-linguist-tools qt4-dev-tools
# Or you may use lupdate, lrelease, lconvert from Qt5:
# apt-get install qttools5-dev-tools
PKG := clementine_qt4
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.3.1
$(PKG)_CHECKSUM := f885931a9ab7c88607d07b50c64fcce46fc05f13dd2c0a04188c94eff938f37c
$(PKG)_SUBDIR := Clementine-$($(PKG)_VERSION)
$(PKG)_FILE := clementine-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://github.com/clementine-player/clementine/archive/$($(PKG)_VERSION).tar.gz
$(PKG)_WEBSITE := https://www.clementine-player.org/
$(PKG)_OWNER := https://github.com/pavelvat
$(PKG)_DEPS := gcc boost chromaprint cryptopp dlfcn-win32 fftw glew gst-libav gst-plugins-bad \
gst-plugins-good gst-plugins-ugly libarchive libechonest libid3tag liblastfm_qt4 \
libmpcdec libplist libusb1 protobuf qtsparkle_qt4 sparsehash
define $(PKG)_UPDATE
$(call MXE_GET_GITHUB_TAGS, clementine-player/clementine)
endef
define $(PKG)_BUILD
cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \
-DCMAKE_INSTALL_PREFIX=$(PREFIX)/$(TARGET)/apps/$(PKG)
$(MAKE) -C '$(BUILD_DIR)' -j $(JOBS)
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
$(if $(BUILD_SHARED),
$(INSTALL) -d '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstapetag.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstapp.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstasf.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstaudioconvert.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstaudiofx.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstaudioparsers.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstaudioresample.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstaudiotestsrc.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstautodetect.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstcdio.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstcoreelements.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstdirectsoundsink.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstequalizer.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstfaad.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstflac.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstgdp.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstgio.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgsticydemux.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstid3demux.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstisomp4.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstlame.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstlibav.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstmad.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstmms.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstogg.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstopus.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstplayback.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstreplaygain.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstsouphttpsrc.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstspectrum.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstspeex.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgsttaglib.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgsttcp.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgsttypefindfunctions.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstudp.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstvolume.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstvorbis.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstwavpack.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) '$(PREFIX)/$(TARGET)/bin/libgstwavparse.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins'
$(INSTALL) -d '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/imageformats'
$(INSTALL) '$(PREFIX)/$(TARGET)/qt/plugins/imageformats/qgif4.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/imageformats'
$(INSTALL) '$(PREFIX)/$(TARGET)/qt/plugins/imageformats/qjpeg4.dll' '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/imageformats'
'$(TOP_DIR)/tools/copydlldeps.sh' -c \
-d '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin' \
-F '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin' \
-F '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/gstreamer-plugins' \
-F '$(PREFIX)/$(TARGET)/apps/$(PKG)/bin/imageformats' \
-X '$(PREFIX)/$(TARGET)/apps' \
-R '$(PREFIX)/$(TARGET)';
)
endef
# libechonest doesn't support static builds
$(PKG)_BUILD_STATIC =

@ -0,0 +1,26 @@
This file is part of MXE. See LICENSE.md for licensing information.
From e941cfd42870fe214f8c44cd5e4d8ee6893b0904 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Fri, 25 Sep 2015 10:19:17 +0200
Subject: [PATCH] don't discard CONFIG set by qmake
See https://github.com/mxe/mxe/commit/6c561c5f3307944d7b6d7ec3de732b25bf69ed00
---
src/src.pro | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/src.pro b/src/src.pro
index 7644b93..827741d 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -1,5 +1,5 @@
-CONFIG = qt uic resources thread stl warn_on
+CONFIG += qt uic resources thread stl warn_on
QT += xml
*-g++ : QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare
--
1.7.10.4

@ -0,0 +1,25 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := keepassx
$(PKG)_IGNORE :=
$(PKG)_VERSION := 0.4.3
$(PKG)_CHECKSUM := cd901a0611ce57e62cf6df7eeeb1b690b5232302bdad8626994eb54adcfa1e85
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://www.keepassx.org/releases/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_WEBSITE := https://www.keepassx.org
$(PKG)_OWNER := https://github.com/starius
$(PKG)_DEPS := gcc qt
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://www.keepassx.org/downloads/' | \
$(SED) -n 's,.*keepassx-\([0-9][^"]*\)\.tar.*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
cd '$(1)' && '$(TARGET)-qmake-qt4' \
"PREFIX=$(PREFIX)/$(TARGET)/bin/"
$(MAKE) -C '$(1)' -j '$(JOBS)'
$(MAKE) -C '$(1)' -j 1 install
endef

@ -0,0 +1,6 @@
# This file is part of MXE. See LICENSE.md for licensing information.
# enable native build of luajit for wrk
# leave build rule in src/luajit.mk for other uses (i.e. build-pkg)
luajit_TARGETS := $(BUILD) $(MXE_TARGETS)

@ -0,0 +1,30 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := msmtp
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.6.6
$(PKG)_CHECKSUM := da15db1f62bd0201fce5310adb89c86188be91cd745b7cb3b62b81a501e7fb5e
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_OWNER := https://github.com/andrew-strong
$(PKG)_DEPS := gcc gnutls libgcrypt libgpg_error libgsasl libiconv libidn libntlm
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://sourceforge.net/projects/msmtp/files/msmtp/' | \
$(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
$(MXE_CONFIGURE_OPTS) \
--infodir='$(BUILD_DIR)/sink' \
--disable-nls \
--without-libsecret \
--without-macosx-keyring \
--with-tls=gnutls \
--with-libidn
$(MAKE) -C $(BUILD_DIR) -j '$(JOBS)'
$(MAKE) -C $(BUILD_DIR) -j 1 install $(MXE_DISABLE_DOCS)
endef

@ -0,0 +1,121 @@
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: Boris Nagaev <bnagaev@gmail.com>
Date: Sun, 30 Aug 2015 00:28:50 +0200
Subject: [PATCH] do not check qmake existance
Fix ./configure error:
checking for mxe/usr/i686-w64-mingw32.static/qt/bin/qmake...
configure: error: cannot check for file existence when
cross compiling
diff --git a/configure b/configure
index 1111111..2222222 100755
--- a/configure
+++ b/configure
@@ -4500,7 +4500,7 @@ if eval \${$as_ac_File+:} false; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
+ echo "cannot check for file existence when cross compiling" "$LINENO" 5
if test -r "$QT_QMAKE/qmake"; then
eval "$as_ac_File=yes"
else
@@ -4520,7 +4520,7 @@ if eval \${$as_ac_File+:} false; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
+ echo "cannot check for file existence when cross compiling" "$LINENO" 5
if test -r "$QT_QMAKE/qmake-qt5"; then
eval "$as_ac_File=yes"
else
@@ -4617,7 +4617,7 @@ if eval \${$as_ac_File+:} false; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
+ echo "cannot check for file existence when cross compiling" "$LINENO" 5
if test -r "$QT_QMAKE/qmake"; then
eval "$as_ac_File=yes"
else
@@ -4637,7 +4637,7 @@ if eval \${$as_ac_File+:} false; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
- as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
+ echo "cannot check for file existence when cross compiling" "$LINENO" 5
if test -r "$QT_QMAKE/qmake-qt4"; then
eval "$as_ac_File=yes"
else
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Sun, 29 May 2016 23:35:25 +0200
Subject: [PATCH] link with boost_random and boost_chrono
libtorrent-rasterbar 1.1.0 uses them
diff --git a/winconf-mingw.pri b/winconf-mingw.pri
index 1111111..2222222 100644
--- a/winconf-mingw.pri
+++ b/winconf-mingw.pri
@@ -23,11 +23,15 @@ RC_FILE = qbittorrent_mingw.rc
# Adapt the lib names/versions accordingly
CONFIG(debug, debug|release) {
LIBS += libtorrent-rasterbar \
+ libboost_random-mt \
+ libboost_chrono-mt \
libboost_system-mt \
libboost_filesystem-mt \
libboost_thread_win32-mt
} else {
LIBS += libtorrent-rasterbar \
+ libboost_random-mt \
+ libboost_chrono-mt \
libboost_system-mt \
libboost_filesystem-mt \
libboost_thread_win32-mt
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Mon, 30 May 2016 00:09:20 +0200
Subject: [PATCH] disable BOOST_ASIO_SEPARATE_COMPILATION
After upgrading libtorrent-rasterbar to 1.1.0, qbittorrent fails to link
main executable with undefined symbols in boost_asio:
./release/application.o:application.cpp:(.text.startup+0x83):
undefined reference to `boost::asio::detail::winsock_init_base::startup
(boost::asio::detail::winsock_init_base::data&, unsigned char,
unsigned char)'
diff --git a/cmake/Modules/winconf.cmake b/cmake/Modules/winconf.cmake
index 1111111..2222222 100644
--- a/cmake/Modules/winconf.cmake
+++ b/cmake/Modules/winconf.cmake
@@ -5,7 +5,6 @@
set(LibtorrentRasterbar_USE_STATIC_LIBS True)
set(LibtorrentRasterbar_CUSTOM_DEFINITIONS
-DBOOST_ALL_NO_LIB -DBOOST_ASIO_HASH_MAP_BUCKETS=1021
- -DBOOST_ASIO_SEPARATE_COMPILATION
-DBOOST_EXCEPTION_DISABLE
-DBOOST_SYSTEM_STATIC_LINK=1
-DTORRENT_USE_OPENSSL
diff --git a/winconf.pri b/winconf.pri
index 1111111..2222222 100644
--- a/winconf.pri
+++ b/winconf.pri
@@ -21,7 +21,6 @@ LIBS += $$quote(-LC:/qBittorrent/openssl/lib)
# LIBTORRENT DEFINES
DEFINES += BOOST_ALL_NO_LIB
DEFINES += BOOST_ASIO_HASH_MAP_BUCKETS=1021
-DEFINES += BOOST_ASIO_SEPARATE_COMPILATION
# After 1.55 some Windows users reported regular UI freezes.
# This makes ASIO use the pre-1.56 way of doing things. See issue #2003
DEFINES += BOOST_ASIO_DISABLE_CONNECTEX

@ -0,0 +1,31 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := qbittorrent
$(PKG)_IGNORE :=
$(PKG)_VERSION := 3.3.4
$(PKG)_CHECKSUM := c0d0d4b72c240f113b59a061146803bc1b7926d3d7f39b06b50a4d26f5ad91b8
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$(PKG)-$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_WEBSITE := https://qbittorrent.org/
$(PKG)_OWNER := https://github.com/starius
$(PKG)_DEPS := gcc boost libtorrent-rasterbar qt
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://www.qbittorrent.org/download.php' | \
$(SED) -n 's,.*qbittorrent-\([0-9][^"]*\)\.tar.*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
cd '$(1)' && \
QMAKE_LRELEASE='$(PREFIX)/$(TARGET)/qt/bin/lrelease' \
./configure \
$(MXE_CONFIGURE_OPTS) \
--with-qt4=yes \
--with-boost='$(PREFIX)/$(TARGET)'
$(MAKE) -C '$(1)' -j '$(JOBS)'
cp '$(1)'/src/release/qbittorrent.exe '$(PREFIX)/$(TARGET)/bin/'
endef
$(PKG)_BUILD_SHARED =

@ -0,0 +1,28 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := ricochet
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.1.4
$(PKG)_CHECKSUM := f5f32caa3480def1de5c93010c6bf5f5789ddcba34bf09fc0feab67696d0c374
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION)-src.tar.bz2
$(PKG)_URL := https://ricochet.im/releases/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_WEBSITE := https://ricochet.im/
$(PKG)_OWNER := https://github.com/starius
$(PKG)_DEPS := gcc openssl protobuf qtbase qtdeclarative qtmultimedia qtquickcontrols qttools
define $(PKG)_UPDATE
$(call MXE_GET_GITHUB_TAGS, ricochet-im/ricochet, v)
endef
define $(PKG)_BUILD
# TODO: add libasan and libubsan and let ricochet use them.
# See https://github.com/ricochet-im/ricochet/blob/master/BUILDING.md#hardening
cd '$(BUILD_DIR)' && \
'$(TARGET)-qmake-qt5' \
OPENSSLDIR='$(PREFIX)/$(TARGET)' \
PROTOBUFDIR='$(PREFIX)/$(TARGET)' \
'$(SOURCE_DIR)'
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
cp '$(BUILD_DIR)'/release/ricochet.exe '$(PREFIX)/$(TARGET)/bin/'
endef

@ -0,0 +1,28 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := tor
$(PKG)_IGNORE :=
$(PKG)_VERSION := 0.3.0.7
$(PKG)_CHECKSUM := 9640c4448ef3cad7237c68ed6984e705db8fb2b9d6bb74c8815d01bb06527d02
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://torproject.org/dist/$($(PKG)_FILE)
$(PKG)_WEBSITE := https://torproject.org/
$(PKG)_OWNER := https://github.com/starius
$(PKG)_DEPS := gcc libevent openssl zlib
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://torproject.org/download/download' | \
$(SED) -n 's,.*tor-\([0-9][^"]*\)\.tar.*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
cd '$(BUILD_DIR)' && \
LIBS="`'$(TARGET)-pkg-config' --libs-only-l openssl`" \
'$(SOURCE_DIR)/configure' \
$(MXE_CONFIGURE_OPTS)
$(SED) 's@#define HAVE_SYS_MMAN_H 1@// Disabled in MXE #define HAVE_SYS_MMAN_H 1@' -i '$(BUILD_DIR)/orconfig.h'
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_DOCS)
$(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_DOCS)
endef

@ -0,0 +1,678 @@
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: Boris Nagaev <bnagaev@gmail.com>
Date: Sun, 20 Mar 2016 16:36:20 +0100
Subject: [PATCH] rename conflicting constants
diff --git a/src/net.c b/src/net.c
index 1111111..2222222 100644
--- a/src/net.c
+++ b/src/net.c
@@ -7,29 +7,29 @@
#include "net.h"
status sock_connect(connection *c) {
- return OK;
+ return WRK_OK;
}
status sock_close(connection *c) {
- return OK;
+ return WRK_OK;
}
status sock_read(connection *c, size_t *n) {
ssize_t r = read(c->fd, c->buf, sizeof(c->buf));
*n = (size_t) r;
- return r >= 0 ? OK : ERROR;
+ return r >= 0 ? WRK_OK : WRK_ERROR;
}
status sock_write(connection *c, char *buf, size_t len, size_t *n) {
ssize_t r;
if ((r = write(c->fd, buf, len)) == -1) {
switch (errno) {
- case EAGAIN: return RETRY;
- default: return ERROR;
+ case EAGAIN: return WRK_RETRY;
+ default: return WRK_ERROR;
}
}
*n = (size_t) r;
- return OK;
+ return WRK_OK;
}
size_t sock_readable(connection *c) {
diff --git a/src/net.h b/src/net.h
index 1111111..2222222 100644
--- a/src/net.h
+++ b/src/net.h
@@ -7,9 +7,9 @@
#include "wrk.h"
typedef enum {
- OK,
- ERROR,
- RETRY
+ WRK_OK,
+ WRK_ERROR,
+ WRK_RETRY
} status;
struct sock {
diff --git a/src/ssl.c b/src/ssl.c
index 1111111..2222222 100644
--- a/src/ssl.c
+++ b/src/ssl.c
@@ -54,44 +54,44 @@ status ssl_connect(connection *c) {
SSL_set_fd(c->ssl, c->fd);
if ((r = SSL_connect(c->ssl)) != 1) {
switch (SSL_get_error(c->ssl, r)) {
- case SSL_ERROR_WANT_READ: return RETRY;
- case SSL_ERROR_WANT_WRITE: return RETRY;
- default: return ERROR;
+ case SSL_ERROR_WANT_READ: return WRK_RETRY;
+ case SSL_ERROR_WANT_WRITE: return WRK_RETRY;
+ default: return WRK_ERROR;
}
}
- return OK;
+ return WRK_OK;
}
status ssl_close(connection *c) {
SSL_shutdown(c->ssl);
SSL_clear(c->ssl);
- return OK;
+ return WRK_OK;
}
status ssl_read(connection *c, size_t *n) {
int r;
if ((r = SSL_read(c->ssl, c->buf, sizeof(c->buf))) <= 0) {
switch (SSL_get_error(c->ssl, r)) {
- case SSL_ERROR_WANT_READ: return RETRY;
- case SSL_ERROR_WANT_WRITE: return RETRY;
- default: return ERROR;
+ case SSL_ERROR_WANT_READ: return WRK_RETRY;
+ case SSL_ERROR_WANT_WRITE: return WRK_RETRY;
+ default: return WRK_ERROR;
}
}
*n = (size_t) r;
- return OK;
+ return WRK_OK;
}
status ssl_write(connection *c, char *buf, size_t len, size_t *n) {
int r;
if ((r = SSL_write(c->ssl, buf, len)) <= 0) {
switch (SSL_get_error(c->ssl, r)) {
- case SSL_ERROR_WANT_READ: return RETRY;
- case SSL_ERROR_WANT_WRITE: return RETRY;
- default: return ERROR;
+ case SSL_ERROR_WANT_READ: return WRK_RETRY;
+ case SSL_ERROR_WANT_WRITE: return WRK_RETRY;
+ default: return WRK_ERROR;
}
}
*n = (size_t) r;
- return OK;
+ return WRK_OK;
}
size_t ssl_readable(connection *c) {
diff --git a/src/wrk.c b/src/wrk.c
index 1111111..2222222 100644
--- a/src/wrk.c
+++ b/src/wrk.c
@@ -349,9 +349,9 @@ static void socket_connected(aeEventLoop *loop, int fd, void *data, int mask) {
connection *c = data;
switch (sock.connect(c)) {
- case OK: break;
- case ERROR: goto error;
- case RETRY: return;
+ case WRK_OK: break;
+ case WRK_ERROR: goto error;
+ case WRK_RETRY: return;
}
http_parser_init(&c->parser, HTTP_RESPONSE);
@@ -384,9 +384,9 @@ static void socket_writeable(aeEventLoop *loop, int fd, void *data, int mask) {
size_t n;
switch (sock.write(c, buf, len, &n)) {
- case OK: break;
- case ERROR: goto error;
- case RETRY: return;
+ case WRK_OK: break;
+ case WRK_ERROR: goto error;
+ case WRK_RETRY: return;
}
c->written += n;
@@ -408,9 +408,9 @@ static void socket_readable(aeEventLoop *loop, int fd, void *data, int mask) {
do {
switch (sock.read(c, &n)) {
- case OK: break;
- case ERROR: goto error;
- case RETRY: return;
+ case WRK_OK: break;
+ case WRK_ERROR: goto error;
+ case WRK_RETRY: return;
}
if (http_parser_execute(&c->parser, &parser_settings, c->buf, n) != n) goto error;
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Sun, 20 Mar 2016 21:34:38 +0100
Subject: [PATCH] rename zcalloc (conflict with zlib)
diff --git a/src/stats.c b/src/stats.c
index 1111111..2222222 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -9,7 +9,7 @@
stats *stats_alloc(uint64_t max) {
uint64_t limit = max + 1;
- stats *s = zcalloc(sizeof(stats) + sizeof(uint64_t) * limit);
+ stats *s = zmalloc_calloc(sizeof(stats) + sizeof(uint64_t) * limit);
s->limit = limit;
s->min = UINT64_MAX;
return s;
diff --git a/src/wrk.c b/src/wrk.c
index 1111111..2222222 100644
--- a/src/wrk.c
+++ b/src/wrk.c
@@ -88,7 +88,7 @@ int main(int argc, char **argv) {
statistics.latency = stats_alloc(cfg.timeout * 1000);
statistics.requests = stats_alloc(MAX_THREAD_RATE_S);
- thread *threads = zcalloc(cfg.threads * sizeof(thread));
+ thread *threads = zmalloc_calloc(cfg.threads * sizeof(thread));
lua_State *L = script_create(cfg.script, url, headers);
if (!script_resolve(L, host, service)) {
@@ -204,7 +204,7 @@ void *thread_main(void *arg) {
script_request(thread->L, &request, &length);
}
- thread->cs = zcalloc(thread->connections * sizeof(connection));
+ thread->cs = zmalloc_calloc(thread->connections * sizeof(connection));
connection *c = thread->cs;
for (uint64_t i = 0; i < thread->connections; i++, c++) {
@@ -436,7 +436,7 @@ static char *copy_url_part(char *url, struct http_parser_url *parts, enum http_p
if (parts->field_set & (1 << field)) {
uint16_t off = parts->field_data[field].off;
uint16_t len = parts->field_data[field].len;
- part = zcalloc(len + 1 * sizeof(char));
+ part = zmalloc_calloc(len + 1 * sizeof(char));
memcpy(part, &url[off], len);
}
diff --git a/src/zmalloc.c b/src/zmalloc.c
index 1111111..2222222 100644
--- a/src/zmalloc.c
+++ b/src/zmalloc.c
@@ -107,7 +107,7 @@ void *zmalloc(size_t size) {
#endif
}
-void *zcalloc(size_t size) {
+void *zmalloc_calloc(size_t size) {
void *ptr = calloc(1, size+PREFIX_SIZE);
if (!ptr) zmalloc_oom(size);
diff --git a/src/zmalloc.h b/src/zmalloc.h
index 1111111..2222222 100644
--- a/src/zmalloc.h
+++ b/src/zmalloc.h
@@ -67,7 +67,7 @@
#endif
void *zmalloc(size_t size);
-void *zcalloc(size_t size);
+void *zmalloc_calloc(size_t size);
void *zrealloc(void *ptr, size_t size);
void zfree(void *ptr);
char *zstrdup(const char *s);
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Tue, 22 Mar 2016 23:04:35 +0100
Subject: [PATCH] allow to specify EXTRA_CFLAGS and EXTRA_LIBS
diff --git a/Makefile b/Makefile
index 1111111..2222222 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-CFLAGS := -std=c99 -Wall -O2 -D_REENTRANT
-LIBS := -lpthread -lm -lcrypto -lssl
+CFLAGS := -std=c99 -Wall -O2 -D_REENTRANT $(EXTRA_CFLAGS)
+LIBS := -lpthread -lm -lcrypto -lssl $(EXTRA_LIBS)
TARGET := $(shell uname -s | tr '[A-Z]' '[a-z]' 2>/dev/null || echo unknown)
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Tue, 22 Mar 2016 23:05:26 +0100
Subject: [PATCH] reorder -lssl and -lcrypto
See http://stackoverflow.com/a/27136346
diff --git a/Makefile b/Makefile
index 1111111..2222222 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
CFLAGS := -std=c99 -Wall -O2 -D_REENTRANT $(EXTRA_CFLAGS)
-LIBS := -lpthread -lm -lcrypto -lssl $(EXTRA_LIBS)
+LIBS := -lpthread -lm -lssl -lcrypto $(EXTRA_LIBS)
TARGET := $(shell uname -s | tr '[A-Z]' '[a-z]' 2>/dev/null || echo unknown)
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Tue, 22 Mar 2016 23:14:32 +0100
Subject: [PATCH] option to use external installation of LuaJIT
LUA_PATH is provided to avoid changing directory to LuaJIT's tree.
diff --git a/Makefile b/Makefile
index 1111111..2222222 100644
--- a/Makefile
+++ b/Makefile
@@ -25,9 +25,11 @@ ODIR := obj
OBJ := $(patsubst %.c,$(ODIR)/%.o,$(SRC)) $(ODIR)/bytecode.o
LDIR = deps/luajit/src
-LIBS := -lluajit $(LIBS)
-CFLAGS += -I$(LDIR)
-LDFLAGS += -L$(LDIR)
+LUA_PATH = $(LDIR)/?.lua # for luajit -b to work
+LUAJIT = $(LDIR)/luajit
+LUAJIT_A = $(LDIR)/libluajit.a
+LUAJIT_I = $(LDIR)
+CFLAGS += -I$(LUAJIT_I)
all: $(BIN)
@@ -37,16 +39,16 @@ clean:
$(BIN): $(OBJ)
@echo LINK $(BIN)
- @$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+ @$(CC) $(LDFLAGS) -o $@ $^ $(LUAJIT_A) $(LIBS)
-$(OBJ): config.h Makefile $(LDIR)/libluajit.a | $(ODIR)
+$(OBJ): config.h Makefile $(LUAJIT_A) | $(ODIR)
$(ODIR):
@mkdir -p $@
$(ODIR)/bytecode.o: src/wrk.lua
@echo LUAJIT $<
- @$(SHELL) -c 'cd $(LDIR) && ./luajit -b $(CURDIR)/$< $(CURDIR)/$@'
+ @LUA_PATH=$(LUA_PATH) $(LUAJIT) -b $(CURDIR)/$< $(CURDIR)/$@
$(ODIR)/%.o : %.c
@echo CC $<
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Tue, 22 Mar 2016 23:21:51 +0100
Subject: [PATCH] embed bytecode via header instead of object file
Embedding via object file requires -Wl,-E which doesn't work on MinGW.
Embedding via header is more portable.
diff --git a/.gitignore b/.gitignore
index 1111111..2222222 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
*.o
*.a
wrk
+src/bytecode.h
deps/luajit/src/host/buildvm
deps/luajit/src/host/buildvm_arch.h
diff --git a/Makefile b/Makefile
index 1111111..2222222 100644
--- a/Makefile
+++ b/Makefile
@@ -11,10 +11,8 @@ else ifeq ($(TARGET), darwin)
else ifeq ($(TARGET), linux)
CFLAGS += -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE
LIBS += -ldl
- LDFLAGS += -Wl,-E
else ifeq ($(TARGET), freebsd)
CFLAGS += -D_DECLARE_C99_LDBL_MATH
- LDFLAGS += -Wl,-E
endif
SRC := wrk.c net.c ssl.c aprintf.c stats.c script.c units.c \
@@ -22,7 +20,7 @@ SRC := wrk.c net.c ssl.c aprintf.c stats.c script.c units.c \
BIN := wrk
ODIR := obj
-OBJ := $(patsubst %.c,$(ODIR)/%.o,$(SRC)) $(ODIR)/bytecode.o
+OBJ := $(patsubst %.c,$(ODIR)/%.o,$(SRC))
LDIR = deps/luajit/src
LUA_PATH = $(LDIR)/?.lua # for luajit -b to work
@@ -41,12 +39,12 @@ $(BIN): $(OBJ)
@echo LINK $(BIN)
@$(CC) $(LDFLAGS) -o $@ $^ $(LUAJIT_A) $(LIBS)
-$(OBJ): config.h Makefile $(LUAJIT_A) | $(ODIR)
+$(OBJ): config.h bytecode.h Makefile $(LUAJIT_A) | $(ODIR)
$(ODIR):
@mkdir -p $@
-$(ODIR)/bytecode.o: src/wrk.lua
+src/bytecode.h: src/wrk.lua
@echo LUAJIT $<
@LUA_PATH=$(LUA_PATH) $(LUAJIT) -b $(CURDIR)/$< $(CURDIR)/$@
diff --git a/src/script.c b/src/script.c
index 1111111..2222222 100644
--- a/src/script.c
+++ b/src/script.c
@@ -5,6 +5,7 @@
#include "script.h"
#include "http_parser.h"
#include "zmalloc.h"
+#include "bytecode.h"
typedef struct {
char *name;
@@ -48,7 +49,17 @@ static const struct luaL_reg threadlib[] = {
lua_State *script_create(char *file, char *url, char **headers) {
lua_State *L = luaL_newstate();
luaL_openlibs(L);
- (void) luaL_dostring(L, "wrk = require \"wrk\"");
+
+ // Taken from http://stackoverflow.com/a/19426724
+ lua_getglobal(L, "package");
+ lua_getfield(L, -1, "preload");
+ luaL_loadbuffer(L, luaJIT_BC_wrk, luaJIT_BC_wrk_SIZE, NULL);
+ lua_setfield(L, -2, "wrk");
+ lua_pop(L, 2);
+
+ if (luaL_dostring(L, "wrk = require \"wrk\"")) {
+ fprintf(stderr, "Error in wrk.lua: %s\n", lua_tostring(L, -1));
+ }
luaL_newmetatable(L, "wrk.addr");
luaL_register(L, NULL, addrlib);
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Tue, 22 Mar 2016 23:28:09 +0100
Subject: [PATCH] use send/recv for sockets instead of write/read
write/read returns Bad file descriptor for sockets in MinGW.
diff --git a/src/net.c b/src/net.c
index 1111111..2222222 100644
--- a/src/net.c
+++ b/src/net.c
@@ -15,14 +15,14 @@ status sock_close(connection *c) {
}
status sock_read(connection *c, size_t *n) {
- ssize_t r = read(c->fd, c->buf, sizeof(c->buf));
+ ssize_t r = recv(c->fd, c->buf, sizeof(c->buf), 0);
*n = (size_t) r;
return r >= 0 ? WRK_OK : WRK_ERROR;
}
status sock_write(connection *c, char *buf, size_t len, size_t *n) {
ssize_t r;
- if ((r = write(c->fd, buf, len)) == -1) {
+ if ((r = send(c->fd, buf, len, 0)) == -1) {
switch (errno) {
case EAGAIN: return WRK_RETRY;
default: return WRK_ERROR;
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Wed, 23 Mar 2016 22:48:52 +0100
Subject: [PATCH] compatibility with MinGW
diff --git a/Makefile b/Makefile
index 1111111..2222222 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,8 @@ else ifeq ($(TARGET), linux)
LIBS += -ldl
else ifeq ($(TARGET), freebsd)
CFLAGS += -D_DECLARE_C99_LDBL_MATH
+else ifeq ($(TARGET), mingw)
+ CFLAGS += -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE
endif
SRC := wrk.c net.c ssl.c aprintf.c stats.c script.c units.c \
diff --git a/src/ae.c b/src/ae.c
index 1111111..2222222 100644
--- a/src/ae.c
+++ b/src/ae.c
@@ -35,7 +35,11 @@
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
+#ifndef __WIN32__
#include <poll.h>
+#else
+#include <winsock2.h>
+#endif
#include <string.h>
#include <time.h>
#include <errno.h>
@@ -395,6 +399,7 @@ int aeProcessEvents(aeEventLoop *eventLoop, int flags)
return processed; /* return the number of processed file/time events */
}
+#ifndef __WIN32__
/* Wait for millseconds until the given file descriptor becomes
* writable/readable/exception */
int aeWait(int fd, int mask, long long milliseconds) {
@@ -416,6 +421,7 @@ int aeWait(int fd, int mask, long long milliseconds) {
return retval;
}
}
+#endif
void aeMain(aeEventLoop *eventLoop) {
eventLoop->stop = 0;
diff --git a/src/main.h b/src/main.h
index 1111111..2222222 100644
--- a/src/main.h
+++ b/src/main.h
@@ -6,8 +6,14 @@
#include <fcntl.h>
#include <getopt.h>
#include <math.h>
+#ifndef __WIN32__
#include <netinet/in.h>
#include <netinet/tcp.h>
+#include <sys/uio.h>
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#endif
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
@@ -17,7 +23,6 @@
#include <time.h>
#include <unistd.h>
#include <sys/time.h>
-#include <sys/uio.h>
#include "ssl.h"
#include "aprintf.h"
diff --git a/src/net.c b/src/net.c
index 1111111..2222222 100644
--- a/src/net.c
+++ b/src/net.c
@@ -2,7 +2,12 @@
#include <errno.h>
#include <unistd.h>
+
+#ifndef __WIN32__
#include <sys/ioctl.h>
+#else
+#include <winsock2.h>
+#endif
#include "net.h"
@@ -33,7 +38,13 @@ status sock_write(connection *c, char *buf, size_t len, size_t *n) {
}
size_t sock_readable(connection *c) {
+#ifndef __WIN32__
int n, rc;
rc = ioctl(c->fd, FIONREAD, &n);
+#else
+ unsigned long n;
+ int rc;
+ rc = ioctlsocket(c->fd, FIONREAD, &n);
+#endif
return rc == -1 ? 0 : n;
}
diff --git a/src/wrk.c b/src/wrk.c
index 1111111..2222222 100644
--- a/src/wrk.c
+++ b/src/wrk.c
@@ -57,6 +57,14 @@ static void usage() {
}
int main(int argc, char **argv) {
+#ifdef __WIN32__
+ WSADATA wsaData;
+ if (WSAStartup(0x202, &wsaData) != 0) {
+ fprintf(stderr, "Failed to initialize WSA\n");
+ exit(1);
+ }
+#endif
+
char *url, **headers = zmalloc(argc * sizeof(char *));
struct http_parser_url parts = {};
@@ -83,7 +91,9 @@ int main(int argc, char **argv) {
sock.readable = ssl_readable;
}
+#ifndef __WIN32__
signal(SIGPIPE, SIG_IGN);
+#endif
signal(SIGINT, SIG_IGN);
statistics.latency = stats_alloc(cfg.timeout * 1000);
@@ -99,7 +109,12 @@ int main(int argc, char **argv) {
for (uint64_t i = 0; i < cfg.threads; i++) {
thread *t = &threads[i];
+#ifndef __WIN32__
t->loop = aeCreateEventLoop(10 + cfg.connections * 3);
+#else
+ // fd on Windows doesn't start from 1
+ t->loop = aeCreateEventLoop(10000);
+#endif
t->connections = cfg.connections / cfg.threads;
t->L = script_create(cfg.script, url, headers);
@@ -122,12 +137,16 @@ int main(int argc, char **argv) {
}
}
+#ifndef __WIN32__
struct sigaction sa = {
.sa_handler = handler,
.sa_flags = 0,
};
sigfillset(&sa.sa_mask);
sigaction(SIGINT, &sa, NULL);
+#else
+ signal(SIGINT, handler);
+#endif
char *time = format_time_s(cfg.duration);
printf("Running %s test @ %s\n", time, url);
@@ -231,18 +250,34 @@ static int connect_socket(thread *thread, connection *c) {
struct addrinfo *addr = thread->addr;
struct aeEventLoop *loop = thread->loop;
int fd, flags;
+#ifdef __WIN32__
+ unsigned long non_blocking;
+#endif
fd = socket(addr->ai_family, addr->ai_socktype, addr->ai_protocol);
+#ifndef __WIN32__
flags = fcntl(fd, F_GETFL, 0);
fcntl(fd, F_SETFL, flags | O_NONBLOCK);
+#else
+ non_blocking = 1;
+ ioctlsocket(fd, FIONBIO, &non_blocking);
+#endif
if (connect(fd, addr->ai_addr, addr->ai_addrlen) == -1) {
+#ifndef __WIN32__
if (errno != EINPROGRESS) goto error;
+#else
+ if (WSAGetLastError() != WSAEWOULDBLOCK) goto error;
+#endif
}
flags = 1;
- setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &flags, sizeof(flags));
+ setsockopt(fd, IPPROTO_TCP, TCP_NODELAY,
+#ifdef __WIN32__
+ (const char*)
+#endif
+ &flags, sizeof(flags));
flags = AE_READABLE | AE_WRITABLE;
if (aeCreateFileEvent(loop, fd, flags, socket_connected, c) == AE_OK) {
diff --git a/src/wrk.h b/src/wrk.h
index 1111111..2222222 100644
--- a/src/wrk.h
+++ b/src/wrk.h
@@ -5,8 +5,14 @@
#include <pthread.h>
#include <inttypes.h>
#include <sys/types.h>
+
+#ifndef __WIN32__
#include <netdb.h>
#include <sys/socket.h>
+#else
+#include <winsock2.h>
+#include <ws2tcpip.h> // addrinfo
+#endif
#include <openssl/ssl.h>
#include <openssl/err.h>

@ -0,0 +1,33 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := wrk
$(PKG)_IGNORE :=
$(PKG)_VERSION := 4.0.1
$(PKG)_CHECKSUM := c03bbc283836cb4b706eb6bfd18e724a8ce475e2c16154c13c6323a845b4327d
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://github.com/wg/wrk/archive/$($(PKG)_VERSION).tar.gz
$(PKG)_WEBSITE := https://github.com/wg/wrk
$(PKG)_OWNER := https://github.com/starius
$(PKG)_DEPS := gcc luajit openssl pthreads
define $(PKG)_UPDATE
$(call MXE_GET_GITHUB_TAGS, wg/wrk)
endef
define $(PKG)_BUILD
$(MAKE) \
-C '$(1)' \
-j '$(JOBS)' \
CC='$(TARGET)-gcc' \
TARGET='mingw' \
LUAJIT='$(PREFIX)/$(BUILD)/bin/luajit' \
LUA_PATH='$(PREFIX)/$(BUILD)/share/luajit-$(luajit_VERSION)/?.lua' \
LUAJIT_A='$(PREFIX)/$(TARGET)/lib/libluajit-$(luajit_ABIVER).a' \
LUAJIT_I='$(PREFIX)/$(TARGET)/include/luajit-$(call SHORT_PKG_VERSION,luajit)/' \
EXTRA_LIBS='-lz -lws2_32 -lgdi32' \
BIN='wrk.exe'
cp '$(1)/wrk.exe' '$(PREFIX)/$(TARGET)/bin/'
endef
$(PKG)_BUILD_SHARED =

@ -0,0 +1,84 @@
# This file is part of MXE. See LICENSE.md for licensing information.
# MXE provides a fully featured build of Qt. Some users want more control...
# https://lists.nongnu.org/archive/html/mingw-cross-env-list/2013-08/msg00010.html
# https://lists.nongnu.org/archive/html/mingw-cross-env-list/2012-05/msg00019.html
#
# build of qt and deps is (say): 25 mins with 12.5 MB test program
# custom with minimal deps is: 4 mins with 7.6 MB test program
# custom min deps and cflags is: 4 mins with 5.9 MB test program
#
# make qt MXE_PLUGIN_DIRS='plugins/custom-qt-min'
$(info == Custom Qt overrides: $(lastword $(MAKEFILE_LIST)))
qt_DEPS := gcc
define qt_BUILD
$(SED) -i 's,\(^QMAKE_CFLAGS_RELEASE\).*,\1 = -pipe -Os -fomit-frame-pointer -momit-leaf-frame-pointer -fdata-sections -ffunction-sections,g' '$(1)/mkspecs/win32-g++/qmake.conf'
cd '$(1)' && QTDIR='$(1)' ./bin/syncqt
cd '$(1)' && \
./configure \
-opensource \
-confirm-license \
-fast \
-xplatform win32-g++-4.6 \
-device-option CROSS_COMPILE=$(TARGET)- \
-device-option PKG_CONFIG='$(TARGET)-pkg-config' \
-force-pkg-config \
-release \
-static \
-prefix '$(PREFIX)/$(TARGET)/qt' \
-prefix-install \
-make libs \
-nomake demos \
-nomake docs \
-nomake examples \
-nomake tools \
-nomake translations \
-no-accessibility \
-no-audio-backend \
-no-dbus \
-no-declarative \
-no-exceptions \
-no-gif \
-no-glib \
-no-gstreamer \
-no-iconv \
-no-libjpeg \
-no-libmng \
-no-libpng \
-no-libtiff \
-no-multimedia \
-no-opengl \
-no-openssl \
-no-phonon \
-no-phonon-backend \
-no-qt3support \
-no-reduce-exports \
-no-rpath \
-no-script \
-no-scripttools \
-no-sql-mysql \
-no-sql-odbc \
-no-sql-psql \
-no-sql-sqlite \
-no-sql-tds \
-no-stl \
-no-svg \
-no-webkit \
-no-xmlpatterns \
-qt-zlib \
-v
$(MAKE) -C '$(1)' -j '$(JOBS)'
rm -rf '$(PREFIX)/$(TARGET)/qt'
$(MAKE) -C '$(1)' -j 1 install
ln -sf '$(PREFIX)/$(TARGET)/qt/bin/qmake' '$(PREFIX)/bin/$(TARGET)'-qmake-qt4
mkdir '$(1)/test-qt'
cd '$(1)/test-qt' && '$(PREFIX)/$(TARGET)/qt/bin/qmake' '$(PWD)/src/$(PKG)-test.pro'
$(MAKE) -C '$(1)/test-qt' -j '$(JOBS)'
$(INSTALL) -m755 '$(1)/test-qt/release/test-qt.exe' '$(PREFIX)/$(TARGET)/bin/'
endef

@ -0,0 +1,89 @@
Cross Compiling a Host Toolchain
--------------------------------
This plugin demonstrates a minimal working toolchain built with MXE to
execute on a Windows host.
#### GCC
```
make gcc-host MXE_PLUGIN_DIRS=plugins/examples/host-toolchain/
```
This will run the usual steps to build a cross-compiler, then build a
second pass to cross-compile the basic toolchain (`binutils` and `gcc`).
Once complete, copy `usr/{target}` to an appropriate Windows machine
and execute the `usr\{target}\bin\test-gcc-host.bat` batch file. This
builds and runs the `libgomp` test as a sanity check. The cross and host
built programs should be identical (after stripping), confirmed with the
final step:
```
>fc /b test-gcc-host.exe test-pthreads-libgomp.exe
Comparing files test-gcc-host.exe and TEST-PTHREADS-LIBGOMP.EXE
FC: no differences encountered
```
#### CMake
```
make cmake-host MXE_PLUGIN_DIRS=plugins/examples/host-toolchain/
```
CMake defaults to Visual Studio generators and additional configuration is
required for [MinGW or MSYS Makefiles][cmake-generators]. MinGW uses `cmd.exe`
and requires `mingw32-make`, MSYS uses `make` and requires `/bin/sh`. The
latter is recommended for further investigation since it's closest to the
normal environment MXE expects. See the following projects for shells and
terminal emulators:
- [MSYS2][msys2]
- [Git for Windows][git-win] - uses MSYS2
- [ConEmu][conemu] - usable terminal
- [cmder][cmder] - bundles ConEmu and Git
#### Make
Make is difficult to cross-compile so it is downloaded from the [source
recommended by the GNU Make team](https://git.savannah.gnu.org/cgit/make.git/tree/README.W32.template).
#### pkgconf/pkg-config
```
make pkgconf-host MXE_PLUGIN_DIRS=plugins/examples/host-toolchain/
```
This will cross-compile `pkgconf` and create the `pkg-config` wrapper. The
wrapper requires `/bin/sh` so one of the [MSYS2][msys2] options should be used.
Run the `usr/{target}/bin/test-pkgconf-host` script to build `libffi` test
with non-standard include paths.
#### Qt5 tools (`qmake.exe`, `rcc.exe`, etc.)
```
make qt5-host-tools MXE_PLUGIN_DIRS=plugins/examples/host-toolchain/
```
This will build `qtbase`, cross-compile the toolchain and qt tools, and
download `make` binaries.
On a windows machine, execute
`usr\{target}\qt5\test-qt5-host-tools\test-qt5-host-tools.bat` to build and
confirm the normal `qt` test with the cross-compiled `qtbase` libraries.
Why?
----
Simply for curiosity, it's hard to see a practical use for this. Certainly,
attempting to use it as a way to bootstrap MXE on Windows would strain
one's sanity and cross-compiling is the recommended way (even if that means
running a Linux VM on Windows).
[cmake-generators]:https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html
[cmder]:http://cmder.net/
[conemu]:https://conemu.github.io/
[git-win]:https://git-for-windows.github.io/
[msys2]:https://msys2.github.io/

@ -0,0 +1,37 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := binutils-host
$(PKG)_IGNORE = $(binutils_IGNORE)
$(PKG)_VERSION = $(binutils_VERSION)
$(PKG)_CHECKSUM = $(binutils_CHECKSUM)
$(PKG)_SUBDIR = $(binutils_SUBDIR)
$(PKG)_FILE = $(binutils_FILE)
$(PKG)_URL = $(binutils_URL)
$(PKG)_URL_2 = $(binutils_URL_2)
$(PKG)_DEPS := gcc
define $(PKG)_UPDATE
echo $(binutils_VERSION)
endef
$(PKG)_PROGS := addr2line ar as c++filt dlltool dllwrap elfedit gprof \
ld.bfd ld nm objcopy objdump ranlib readelf size strings \
strip windmc windres
define $(PKG)_BUILD
$(subst --disable-werror,\
--disable-werror \
--prefix='$(PREFIX)/$(TARGET)' \
--program-prefix='$(TARGET)-' \
--host='$(TARGET)',\
$(binutils_BUILD))
# install unprefixed versions also
for p in $($(PKG)_PROGS); do \
cp "$(PREFIX)/$(TARGET)/bin/$(TARGET)-$$p.exe" \
"$(PREFIX)/$(TARGET)/bin/$$p.exe" ; \
done
# tools seem to be duplicates of '$(PREFIX)/$(TARGET)'
rm -rf '$(PREFIX)/$(TARGET)/$(TARGET)'
endef

@ -0,0 +1,21 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := cmake-host
$(PKG)_IGNORE = $(cmake_IGNORE)
$(PKG)_VERSION = $(cmake_VERSION)
$(PKG)_CHECKSUM = $(cmake_CHECKSUM)
$(PKG)_SUBDIR = $(cmake_SUBDIR)
$(PKG)_FILE = $(cmake_FILE)
$(PKG)_URL = $(cmake_URL)
$(PKG)_URL_2 = $(cmake_URL_2)
$(PKG)_DEPS := gcc
define $(PKG)_UPDATE
echo $(cmake_VERSION)
endef
define $(PKG)_BUILD
cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)'
$(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) VERBOSE=1
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
endef

@ -0,0 +1,65 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := gcc-host
$(PKG)_IGNORE = $(gcc_IGNORE)
$(PKG)_VERSION = $(gcc_VERSION)
$(PKG)_CHECKSUM = $(gcc_CHECKSUM)
$(PKG)_SUBDIR = $(gcc_SUBDIR)
$(PKG)_FILE = $(gcc_FILE)
$(PKG)_PATCHES = $(realpath $(sort $(wildcard $(addsuffix /gcc-[0-9]*.patch, $(TOP_DIR)/src))))
$(PKG)_URL = $(gcc_URL)
$(PKG)_URL_2 = $(gcc_URL_2)
$(PKG)_DEPS := gcc binutils-host gmp isl mpfr mpc pthreads
define $(PKG)_UPDATE
echo $(gcc_VERSION)
endef
define $(PKG)_BUILD
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
--host='$(TARGET)' \
--target='$(TARGET)' \
--build='$(BUILD)' \
--prefix='$(PREFIX)/$(TARGET)' \
--with-native-system-header-dir='$(PREFIX)/$(TARGET)/include' \
--enable-languages='c,c++,objc,fortran' \
--enable-version-specific-runtime-libs \
--with-gcc \
--with-gnu-ld \
--with-gnu-as \
--disable-nls \
--without-libiconv-prefix \
$(if $(BUILD_STATIC),--disable-shared) \
--disable-multilib \
--without-x \
--disable-win32-registry \
--enable-threads=$(MXE_GCC_THREADS) \
--enable-libgomp \
--with-{gmp,isl,mpc,mpfr}='$(PREFIX)/$(TARGET)' \
$($(PKG)_CONFIGURE_OPTS)
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)' -j 1 $(INSTALL_STRIP_TOOLCHAIN)
# shared libgcc isn't installed to version-specific locations
# so install correctly to simplify cleanup (see gcc.mk)
$(and $(BUILD_SHARED),
$(MAKE) -C '$(BUILD_DIR)/$(TARGET)/libgcc' -j 1 \
toolexecdir='$(PREFIX)/$(TARGET)/bin' \
SHLIB_SLIBDIR_QUAL= \
install-shared
-rm -v '$(PREFIX)/$(TARGET)/lib/gcc/$(TARGET)/'libgcc_s*.dll
-rm -v '$(PREFIX)/$(TARGET)/lib/gcc/$(TARGET)/lib/'libgcc_s*.a
-rmdir '$(PREFIX)/$(TARGET)/lib/gcc/$(TARGET)/lib/')
# test compilation on host
# strip and compare cross and host-built tests
cp '$(TOP_DIR)/src/pthreads-libgomp-test.c' '$(PREFIX)/$(TARGET)/bin/test-$(PKG).c'
(printf 'set PATH=..\\bin;%%PATH%%\r\n'; \
printf 'gcc test-$(PKG).c -o test-$(PKG).exe -fopenmp -v\r\n'; \
printf 'test-$(PKG).exe\r\n'; \
printf 'strip test-$(PKG).exe test-pthreads-libgomp.exe\r\n'; \
printf 'fc /b test-$(PKG).exe test-pthreads-libgomp.exe\r\n'; \
printf 'cmd\r\n';) \
> '$(PREFIX)/$(TARGET)/bin/test-$(PKG).bat'
endef

@ -0,0 +1,21 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := make-w32-bin
$(PKG)_IGNORE :=
$(PKG)_VERSION := 4.2
$(PKG)_CHECKSUM := 6cab11301e601996ab0cb7b3b903e5a55d5bd795614946cf6bd025cd61c710c6
$(PKG)_SUBDIR := .
$(PKG)_FILE := make-$($(PKG)_VERSION)-without-guile-w32-bin.zip
$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/ezwinports/$($(PKG)_FILE)
$(PKG)_DEPS :=
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://sourceforge.net/projects/ezwinports/files/' | \
$(SED) -n 's,.*/make-\([0-9.]*\)-without-guile.*,\1,p' | \
head -1
endef
define $(PKG)_BUILD
cp '$(1)/bin/'* '$(PREFIX)/$(TARGET)/bin/'
cp '$(1)/lib/'* '$(PREFIX)/$(TARGET)/lib/'
endef

@ -0,0 +1,46 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := pkgconf-host
$(PKG)_IGNORE = $(pkgconf_IGNORE)
$(PKG)_VERSION = $(pkgconf_VERSION)
$(PKG)_CHECKSUM = $(pkgconf_CHECKSUM)
$(PKG)_SUBDIR = $(pkgconf_SUBDIR)
$(PKG)_FILE = $(pkgconf_FILE)
$(PKG)_URL = $(pkgconf_URL)
$(PKG)_URL_2 = $(pkgconf_URL_2)
$(PKG)_DEPS := gcc libffi
define $(PKG)_UPDATE
echo $(pkgconf_VERSION)
endef
define $(PKG)_BUILD
cd '$(SOURCE_DIR)' && ./autogen.sh
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
$(MXE_CONFIGURE_OPTS)
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
# create pkg-config script with relative paths
(echo '#!/bin/sh'; \
echo 'PKG_CONFIG_PATH="../qt5/lib/pkgconfig":"$$PKG_CONFIG_PATH_$(subst .,_,$(subst -,_,$(TARGET)))" \
PKG_CONFIG_LIBDIR='\''../lib/pkgconfig'\'' \
exec '../bin/pkgconf' \
$(if $(BUILD_STATIC),--static) \
--define-variable=prefix=.. \
"$$@"' \
) > '$(PREFIX)/$(TARGET)/bin/pkg-config'
chmod 0755 '$(PREFIX)/$(TARGET)/bin/pkg-config'
# test compilation on host with libffi in non-std prefix
cp '$(PWD)/src/libffi-test.c' '$(PREFIX)/$(TARGET)/bin/test-$(PKG).c'
(echo '#!/bin/sh'; \
echo 'export PATH=../bin:$PATH'; \
echo 'gcc -v \
-W -Wall -Werror -ansi -pedantic \
test-$(PKG).c -o test-$(PKG).exe \
`pkg-config --cflags --libs libffi`'; \
echo 'test-$(PKG).exe'; \
) > '$(PREFIX)/$(TARGET)/bin/test-$(PKG)'
chmod 0755 '$(PREFIX)/$(TARGET)/bin/test-$(PKG)'
endef

@ -0,0 +1,73 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := $(basename $(notdir $(lastword $(MAKEFILE_LIST))))
$(PKG)_FILE = $(qtbase_FILE)
$(PKG)_PATCHES = $(realpath $(sort $(wildcard $(addsuffix /qtbase-[0-9]*.patch, $(TOP_DIR)/src))))
$(PKG)_SUBDIR = $(qtbase_SUBDIR)
$(PKG)_DEPS := gcc gcc-host make-w32-bin qtbase winpthreads-host
# main configure options: -platform -host-option -external-hostbindir
# further testing needed: -prefix -extprefix -hostprefix -sysroot -no-gcc-sysroot
# and keeping options synced with qtbase
define $(PKG)_BUILD
$(SED) -i 's,BUILD_ON_MAC=yes,BUILD_ON_MAC=no,g' '$(1)/configure'
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
-prefix '$(PREFIX)/$(TARGET)/qt5' \
$(if $(BUILD_STATIC),-static,-shared) \
-release \
-c++std c++11 \
-platform win32-g++ \
-host-option CROSS_COMPILE=${TARGET}- \
-external-hostbindir '$(PREFIX)/$(TARGET)/qt5/bin' \
-device-option PKG_CONFIG='$(TARGET)-pkg-config' \
-device-option CROSS_COMPILE=$(TARGET)- \
-force-pkg-config \
-no-icu \
-no-sql-{db2,ibase,mysql,oci,odbc,psql,sqlite,sqlite2,tds} \
-no-use-gold-linker \
-nomake examples \
-nomake tests \
-opensource \
-confirm-license \
-continue \
-verbose
# generate remaining build configuration (qmake is created by configure)
$(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) \
sub-src-qmake_all
# build other tools
$(MAKE) -C '$(BUILD_DIR)/src' -j $(JOBS) \
sub-{moc,qdbuscpp2xml,qdbusxml2cpp,qlalr,rcc,uic}-all
# install tools and create `qt.conf` for runtime config
cp '$(BUILD_DIR)/bin'/*.exe '$(PREFIX)/$(TARGET)/qt5/bin/'
(printf '[Paths]\r\n'; \
printf 'Prefix = ..\r\n'; \
) > '$(PREFIX)/$(TARGET)/qt5/bin/qt.conf'
# test compilation on host
# windows can't work with symlinks
$(and $(BUILD_STATIC),
rm -f '$(PREFIX)/$(TARGET)/lib/libpng.a' && \
cp '$(PREFIX)/$(TARGET)/lib/libpng16.a' '$(PREFIX)/$(TARGET)/lib/libpng.a';
rm -f '$(PREFIX)/$(TARGET)/lib/libharfbuzz_too.a' && \
cp '$(PREFIX)/$(TARGET)/lib/libharfbuzz.a' '$(PREFIX)/$(TARGET)/lib/libharfbuzz_too.a';
)
# copy required test files and create batch file
mkdir -p '$(PREFIX)/$(TARGET)/qt5/test-$(PKG)'
cp '$(PWD)/src/qt-test.'* '$(PREFIX)/$(TARGET)/qt5/test-$(PKG)/'
cp '$(PWD)/src/qt.mk' '$(PREFIX)/$(TARGET)/qt5/test-$(PKG)/'
(printf 'set PWD=%%~dp0\r\n'; \
printf 'set PATH=%%PWD%%..\\bin;%%PWD%%..\\..\\bin;%%PWD%%..\\lib;%%PWD%%..\\..\\lib;%%PATH%%\r\n'; \
printf 'set QT_QPA_PLATFORM_PLUGIN_PATH=%%PWD%%..\\plugins\r\n'; \
printf 'mkdir build\r\n'; \
printf 'cd build\r\n'; \
printf 'qmake ..\r\n'; \
printf 'make -j $(JOBS)\r\n'; \
printf '%%PWD%%\\build\\release\\test-qt5.exe\r\n'; \
printf 'cmd\r\n'; \
) > '$(PREFIX)/$(TARGET)/qt5/test-$(PKG)/test-$(PKG).bat'
endef

@ -0,0 +1,25 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := winpthreads-host
$(PKG)_IGNORE = $(mingw-w64_IGNORE)
$(PKG)_VERSION = $(mingw-w64_VERSION)
$(PKG)_CHECKSUM = $(mingw-w64_CHECKSUM)
$(PKG)_SUBDIR = $(mingw-w64_SUBDIR)
$(PKG)_FILE = $(mingw-w64_FILE)
$(PKG)_URL = $(mingw-w64_URL)
$(PKG)_URL_2 = $(mingw-w64_URL_2)
$(PKG)_DEPS := gcc
define $(PKG)_UPDATE
echo $(mingw-w64_VERSION)
endef
# temporary build until gcc is built only once per arch
define $(PKG)_BUILD
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/mingw-w64-libraries/winpthreads/configure' \
$(MXE_CONFIGURE_OPTS) \
--enable-static \
--enable-shared
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)' -j 1 install
endef

@ -0,0 +1,4 @@
# This file is part of MXE. See LICENSE.md for licensing information.
poppler_DEPS := $(filter-out qt ,$(poppler_DEPS)) qtbase
openscenegraph_DEPS := $(filter-out qt ,$(openscenegraph_DEPS)) qtbase

@ -0,0 +1,4 @@
# Notes about GCC version 4.9.4
GCC 4.9.4 was used before [GCC 5.4.0](https://github.com/mxe/mxe/pull/1541).
This plugin is a backup in case of problems with GCC 5.4.0.

@ -0,0 +1,22 @@
# This file is part of MXE. See LICENSE.md for licensing information.
# This plugin is needed in case of issues with GCC 5.4.0:
# https://github.com/mxe/mxe/pull/1541#issuecomment-274035553
PKG := cloog
$(PKG)_VERSION := 0.18.1
$(PKG)_CHECKSUM := 02500a4edd14875f94fe84cbeda4290425cb0c1c2474c6f75d75a303d64b4196
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://www.bastoul.net/cloog/pages/download/$($(PKG)_FILE)
$(PKG)_URL_2 := ftp://gcc.gnu.org/pub/gcc/infrastructure/$($(PKG)_FILE)
$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)
$(PKG)_DEPS_$(BUILD) := gmp isl
PKG := isl
$(PKG)_VERSION := 0.12.2
$(PKG)_CHECKSUM := f4b3dbee9712850006e44f0db2103441ab3d13b406f77996d1df19ee89d11fb4
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := http://isl.gforge.inria.fr/$($(PKG)_FILE)
$(PKG)_URL_2 := ftp://gcc.gnu.org/pub/gcc/infrastructure/$($(PKG)_FILE)

@ -0,0 +1,130 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := gcc
$(PKG)_WEBSITE := https://gcc.gnu.org/
$(PKG)_DESCR := GCC
$(PKG)_IGNORE := 5%
$(PKG)_VERSION := 4.9.4
$(PKG)_CHECKSUM := 6c11d292cd01b294f9f84c9a59c230d80e9e4a47e5c6355f046bb36d4f358092
$(PKG)_SUBDIR := gcc-$($(PKG)_VERSION)
$(PKG)_FILE := gcc-$($(PKG)_VERSION).tar.bz2
$(PKG)_PATCHES := $(basename $(lastword $(MAKEFILE_LIST))).patch
$(PKG)_URL := https://ftp.gnu.org/gnu/gcc/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_URL_2 := https://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS := binutils mingw-w64
$(PKG)_FILE_$(BUILD) :=
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://ftp.gnu.org/gnu/gcc/?C=M;O=D' | \
$(SED) -n 's,.*<a href="gcc-\([0-9][^"]*\)/".*,\1,p' | \
$(SORT) -V | \
tail -1
endef
define $(PKG)_CONFIGURE
# configure gcc
mkdir '$(1).build'
cd '$(1).build' && '$(1)/configure' \
--target='$(TARGET)' \
--build='$(BUILD)' \
--prefix='$(PREFIX)' \
--libdir='$(PREFIX)/lib' \
--enable-languages='c,c++,objc,fortran' \
--enable-version-specific-runtime-libs \
--with-gcc \
--with-gnu-ld \
--with-gnu-as \
--disable-nls \
$(if $(BUILD_STATIC),--disable-shared) \
--disable-multilib \
--without-x \
--disable-win32-registry \
--enable-threads=$(MXE_GCC_THREADS) \
--enable-libgomp \
--with-gmp='$(PREFIX)/$(BUILD)' \
--with-isl='$(PREFIX)/$(BUILD)' \
--with-mpc='$(PREFIX)/$(BUILD)' \
--with-mpfr='$(PREFIX)/$(BUILD)' \
--with-cloog='$(PREFIX)/$(BUILD)' \
--with-as='$(PREFIX)/bin/$(TARGET)-as' \
--with-ld='$(PREFIX)/bin/$(TARGET)-ld' \
--with-nm='$(PREFIX)/bin/$(TARGET)-nm' \
$(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'")
endef
define $(PKG)_POST_BUILD
# - no non-trivial way to configure installation of *.dlls
# each sudbir has it's own variations of variables like:
# `toolexeclibdir` `install-toolexeclibLTLIBRARIES` etc.
# and maintaining those would be cumbersome
# - need to keep `--enable-version-specific-runtime-libs` otherwise
# libraries go directly into $(PREFIX)/$(TARGET)/lib and are
# harder to cleanup
# - ignore rm failure as parallel build may have cleaned up, but
# don't wildcard all libs so future additions will be detected
$(and $(BUILD_SHARED),
mv -v '$(PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/'*.dll '$(PREFIX)/$(TARGET)/bin/'
-rm -v '$(PREFIX)/lib/gcc/$(TARGET)/'libgcc_s*.dll
-rm -v '$(PREFIX)/lib/gcc/$(TARGET)/lib/'libgcc_s*.a
-rmdir '$(PREFIX)/lib/gcc/$(TARGET)/lib/')
endef
define $(PKG)_BUILD_mingw-w64
# install mingw-w64 headers
$(call PREPARE_PKG_SOURCE,mingw-w64,$(1))
mkdir '$(1).headers-build'
cd '$(1).headers-build' && '$(1)/$(mingw-w64_SUBDIR)/mingw-w64-headers/configure' \
--host='$(TARGET)' \
--prefix='$(PREFIX)/$(TARGET)' \
--enable-sdk=all \
--enable-idl \
--enable-secure-api \
$(mingw-w64-headers_CONFIGURE_OPTS)
$(MAKE) -C '$(1).headers-build' install
# build standalone gcc
$($(PKG)_CONFIGURE)
$(MAKE) -C '$(1).build' -j '$(JOBS)' all-gcc
$(MAKE) -C '$(1).build' -j 1 $(INSTALL_STRIP_TOOLCHAIN)-gcc
# build mingw-w64-crt
mkdir '$(1).crt-build'
cd '$(1).crt-build' && '$(1)/$(mingw-w64_SUBDIR)/mingw-w64-crt/configure' \
--host='$(TARGET)' \
--prefix='$(PREFIX)/$(TARGET)' \
@gcc-crt-config-opts@
$(MAKE) -C '$(1).crt-build' -j '$(JOBS)' || $(MAKE) -C '$(1).crt-build' -j '$(JOBS)'
$(MAKE) -C '$(1).crt-build' -j 1 $(INSTALL_STRIP_TOOLCHAIN)
# build posix threads
mkdir '$(1).pthread-build'
cd '$(1).pthread-build' && '$(1)/$(mingw-w64_SUBDIR)/mingw-w64-libraries/winpthreads/configure' \
$(MXE_CONFIGURE_OPTS)
$(MAKE) -C '$(1).pthread-build' -j '$(JOBS)' || $(MAKE) -C '$(1).pthread-build' -j '$(JOBS)'
$(MAKE) -C '$(1).pthread-build' -j 1 $(INSTALL_STRIP_TOOLCHAIN)
# build rest of gcc
cd '$(1).build'
$(MAKE) -C '$(1).build' -j '$(JOBS)'
$(MAKE) -C '$(1).build' -j 1 $(INSTALL_STRIP_TOOLCHAIN)
# shared libgcc isn't installed to version-specific locations
# so install correctly to simplify cleanup
$(and $(BUILD_SHARED),
$(MAKE) -C '$(1).build/$(TARGET)/libgcc' -j 1 \
toolexecdir='$(PREFIX)/$(TARGET)/bin' \
SHLIB_SLIBDIR_QUAL= \
install-shared)
$($(PKG)_POST_BUILD)
endef
$(PKG)_BUILD_x86_64-w64-mingw32 = $(subst @gcc-crt-config-opts@,--disable-lib32,$($(PKG)_BUILD_mingw-w64))
$(PKG)_BUILD_i686-w64-mingw32 = $(subst @gcc-crt-config-opts@,--disable-lib64,$($(PKG)_BUILD_mingw-w64))
define $(PKG)_BUILD_$(BUILD)
for f in c++ cpp g++ gcc gcov; do \
ln -sf "`which $$f`" '$(PREFIX)/bin/$(TARGET)'-$$f ; \
done
endef

@ -1,5 +1,4 @@
This file is part of MXE.
See index.html for further information.
This file is part of MXE. See LICENSE.md for licensing information.
From 05788ad7e6bf16402aa7c9c085784c3582de425c Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
@ -48,7 +47,7 @@ diff --git a/gcc/config/i386/adxintrin.h b/gcc/config/i386/adxintrin.h
index dd2a26c..2e680b3 100644
--- a/gcc/config/i386/adxintrin.h
+++ b/gcc/config/i386/adxintrin.h
@@ -28,6 +28,10 @@
@@ -28,5 +28,9 @@
#ifndef _ADXINTRIN_H_INCLUDED
#define _ADXINTRIN_H_INCLUDED
@ -58,7 +57,6 @@ index dd2a26c..2e680b3 100644
+
extern __inline unsigned char
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
_subborrow_u32 (unsigned char __CF, unsigned int __X,
@@ -78,4 +82,8 @@ _addcarryx_u64 (unsigned char __CF, unsigned long long __X,
}
#endif

@ -0,0 +1,70 @@
# Notes about GCC version 6.1.0 and later
GCC 6.1 is released with a number of major changes
[[1](https://gcc.gnu.org/ml/gcc-announce/2016/msg00000.html)]
[[2](https://gcc.gnu.org/gcc-6/changes.html)]
. The most notable change is:
> The `C++` frontend now defaults to `C++14` standard instead of `C++98` it has
> been defaulting to previously, for compiling older `C++` code that might
> require either explicitly compiling with selected older `C++` standards,
> or might require some code adjustment, see
> [[3](https://gcc.gnu.org/gcc-6/porting_to.html)]
> for details.
So it is expected that some of MXE packages will fails to build from source
(FTBFS) with default GCC 6.x options. As a workaround we may add `-std=gnu++11`
or `-std=gnu++98` into `CXXFLAGS` for building problematic packages. And this
will not affect the builds with older versions of GCC.
For example, in autotools based projects:
```
...
$(PKG)_CXXFLAGS := -std=gnu++11
...
cd '$(1)' && \
CXXFLAGS="$($(PKG)_CXXFLAGS)" \
./configure \
...
```
Just after adding this plugin (gcc6) some packages were FTBFS. For now, these
packages might be already fixed by upstream developers, by additional patches
or using above mentioned workaround. See the table below for details. If some
MXE packages or your personal projects are still FTBFS you may look how other
packages were fixed and use similar approach.
Please ensure that proposed fixes for packages also build with earlier GCC
versions [[4](https://github.com/mxe/mxe/commit/a1cc019)].
| package | target | fixed in commit |
| ------------------ | --------------------------------------- | ---------------------------------------------------- |
| boost | all | [7ca2bce](https://github.com/mxe/mxe/commit/7ca2bce) |
| cgal | all | - |
| dcmtk | static (all) | [8608e13](https://github.com/mxe/mxe/commit/8608e13) |
| fdk-aac | all | [363aec7](https://github.com/mxe/mxe/commit/363aec7) |
| flann | all | [73cd813](https://github.com/mxe/mxe/commit/73cd813) |
| freeimage | static (all) | [adc74c9](https://github.com/mxe/mxe/commit/adc74c9) |
| glib | all | [58c2c96](https://github.com/mxe/mxe/commit/58c2c96) |
| gtkimageview | static (all) | - |
| gtkmm2 | static (all) | - |
| gtkmm3 | static (all) | - |
| guile | i686-w64-mingw32.static (all) | - |
| itk | all | [55e9bba](https://github.com/mxe/mxe/commit/55e9bba) |
| jsoncpp | all | [0bc73f7](https://github.com/mxe/mxe/commit/0bc73f7) |
| json_spirit | all | - |
| librsvg | all | - |
| libxml++ | all | - |
| log4cxx | static (all) | - |
| ocaml-lablgtk2 | i686-w64-mingw32.static (all) | - |
| opencv | all | - |
| ossim | all | - |
| qt | all | [5aac1c3](https://github.com/mxe/mxe/commit/5aac1c3) |
| qt3d | all | [d52961f](https://github.com/mxe/mxe/commit/d52961f) |
| qtwebkit | i686-w64-mingw32.shared | - |
| sdl_sound | static (all) | - |
| smpeg | all | [57cb6bb](https://github.com/mxe/mxe/commit/57cb6bb) |
| smpeg2 | all | [1a42cbc](https://github.com/mxe/mxe/commit/1a42cbc) |
| ucl | all | [0ac2a77](https://github.com/mxe/mxe/commit/0ac2a77) |
| vtk | static (all) | - |
| vtk6 | all | - |
| wxwidgets | static (all) | [6869e3b](https://github.com/mxe/mxe/commit/6869e3b) |

@ -0,0 +1,24 @@
# This file is part of MXE. See LICENSE.md for licensing information.
# override relevant cloog, isl, and gcc variables changed in:
# https://github.com/mxe/mxe/pull/965
#
# simply expanded variables (*_SUBDIR, *_FILE, etc.) need to be set
PKG := cloog
$(PKG)_TARGETS := $(MXE_TARGETS)
PKG := isl
$(PKG)_VERSION := 0.16.1
$(PKG)_CHECKSUM := 412538bb65c799ac98e17e8cfcdacbb257a57362acfaaff254b0fcae970126d2
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := http://isl.gforge.inria.fr/$($(PKG)_FILE)
$(PKG)_URL_2 := ftp://gcc.gnu.org/pub/gcc/infrastructure/$($(PKG)_FILE)
PKG := gcc
$(PKG)_VERSION := 6.3.0
$(PKG)_CHECKSUM := f06ae7f3f790fbf0f018f6d40e844451e6bc3b7bc96e128e63b09825c1f8b29f
$(PKG)_SUBDIR := gcc-$($(PKG)_VERSION)
$(PKG)_FILE := gcc-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := https://ftp.gnu.org/gnu/gcc/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE)

@ -0,0 +1,24 @@
# This file is part of MXE. See LICENSE.md for licensing information.
# override relevant cloog, isl, and gcc variables changed in:
# https://github.com/mxe/mxe/pull/965
#
# simply expanded variables (*_SUBDIR, *_FILE, etc.) need to be set
PKG := cloog
$(PKG)_TARGETS := $(MXE_TARGETS)
PKG := isl
$(PKG)_VERSION := 0.16.1
$(PKG)_CHECKSUM := 412538bb65c799ac98e17e8cfcdacbb257a57362acfaaff254b0fcae970126d2
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := http://isl.gforge.inria.fr/$($(PKG)_FILE)
$(PKG)_URL_2 := ftp://gcc.gnu.org/pub/gcc/infrastructure/$($(PKG)_FILE)
PKG := gcc
$(PKG)_VERSION := 7.1.0
$(PKG)_CHECKSUM := 8a8136c235f64c6fef69cac0d73a46a1a09bb250776a050aec8f9fc880bebc17
$(PKG)_SUBDIR := gcc-$($(PKG)_VERSION)
$(PKG)_FILE := gcc-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := https://ftp.gnu.org/gnu/gcc/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE)

@ -0,0 +1,34 @@
# Go plugin for MXE
See also article [cross-compile go code, including cgo][1]
by Dimitri John Ledkov.
[1]: http://blog.surgut.co.uk/2014/06/cross-compile-go-code-including-cgo.html
Package `go-native` installs native Go 1.4. This version of Go
doesn't depend on Go installation.
Package `go` uses native Go 1.4 as a bootstrap and installs Go 1.6
as a cross-compiler to windows/386 or windows/amd64. Versions of
Go starting with 1.5 need Go installation to build.
To build Go packages for windows/386 or windows/amd64, you have to set
the [GOPATH](https://golang.org/doc/code.html#GOPATH) environment variable
and call `usr/bin/$(TARGET)-go` wrapper script.
## Example
Building [gohs](https://github.com/flier/gohs), GoLang Binding of
[HyperScan](https://01.org/hyperscan).
```
$ make hyperscan go MXE_PLUGIN_DIRS=plugins/go
$ mkdir gopath
$ GOPATH=`pwd`/gopath ./usr/bin/i686-w64-mingw32.static-go get \
github.com/flier/gohs/examples/simplegrep
$ ./gopath/bin/windows_386/simplegrep.exe root /etc/passwd
Scanning 42 bytes with Hyperscan
root:x:0:0:root:/root:/bin/bash
root:x:0:0:root:/root:/bin/bash
root:x:0:0:root:/root:/bin/bash
```

@ -0,0 +1,171 @@
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: Boris Nagaev <bnagaev@gmail.com>
Date: Thu, 17 Nov 2016 00:22:19 +0100
Subject: [PATCH] cmd/link: support new 386/amd64 relocations
It is needed to fix build on Debian 8 Stretch.
See https://github.com/golang/go/issues/13896
Backport https://github.com/golang/go/commit/914db9f060b1fd3eb1f74d48f3bd46a73d4ae9c7
diff --git a/src/cmd/6l/asm.c b/src/cmd/6l/asm.c
index 1111111..2222222 100644
--- a/src/cmd/6l/asm.c
+++ b/src/cmd/6l/asm.c
@@ -117,6 +117,8 @@ adddynrel(LSym *s, Reloc *r)
}
return;
+ case 256 + R_X86_64_REX_GOTPCRELX:
+ case 256 + R_X86_64_GOTPCRELX:
case 256 + R_X86_64_GOTPCREL:
if(targ->type != SDYNIMPORT) {
// have symbol
diff --git a/src/cmd/8l/asm.c b/src/cmd/8l/asm.c
index 1111111..2222222 100644
--- a/src/cmd/8l/asm.c
+++ b/src/cmd/8l/asm.c
@@ -115,6 +115,7 @@ adddynrel(LSym *s, Reloc *r)
return;
case 256 + R_386_GOT32:
+ case 256 + R_386_GOT32X:
if(targ->type != SDYNIMPORT) {
// have symbol
if(r->off >= 2 && s->p[r->off-2] == 0x8b) {
diff --git a/src/cmd/ld/elf.h b/src/cmd/ld/elf.h
index 1111111..2222222 100644
--- a/src/cmd/ld/elf.h
+++ b/src/cmd/ld/elf.h
@@ -502,8 +502,23 @@ typedef struct {
#define R_X86_64_DTPOFF32 21 /* Offset in TLS block */
#define R_X86_64_GOTTPOFF 22 /* PC relative offset to IE GOT entry */
#define R_X86_64_TPOFF32 23 /* Offset in static TLS block */
-
-#define R_X86_64_COUNT 24 /* Count of defined relocation types. */
+#define R_X86_64_PC64 24
+#define R_X86_64_GOTOFF64 25
+#define R_X86_64_GOTPC32 26
+#define R_X86_64_GOT64 27
+#define R_X86_64_GOTPCREL64 28
+#define R_X86_64_GOTPC64 29
+#define R_X86_64_GOTPLT64 30
+#define R_X86_64_PLTOFF64 31
+#define R_X86_64_SIZE32 32
+#define R_X86_64_SIZE64 33
+#define R_X86_64_GOTPC32_TLSDEC 34
+#define R_X86_64_TLSDESC_CALL 35
+#define R_X86_64_TLSDESC 36
+#define R_X86_64_IRELATIVE 37
+#define R_X86_64_PC32_BND 40
+#define R_X86_64_GOTPCRELX 41
+#define R_X86_64_REX_GOTPCRELX 42
#define R_ALPHA_NONE 0 /* No reloc */
@@ -535,8 +550,6 @@ typedef struct {
#define R_ALPHA_JMP_SLOT 26 /* Create PLT entry */
#define R_ALPHA_RELATIVE 27 /* Adjust by program base */
-#define R_ALPHA_COUNT 28
-
#define R_ARM_NONE 0 /* No relocation. */
#define R_ARM_PC24 1
@@ -578,8 +591,6 @@ typedef struct {
#define R_ARM_RPC24 254
#define R_ARM_RBASE 255
-#define R_ARM_COUNT 38 /* Count of defined relocation types. */
-
#define R_386_NONE 0 /* No relocation. */
#define R_386_32 1 /* Add symbol value. */
@@ -612,8 +623,42 @@ typedef struct {
#define R_386_TLS_DTPMOD32 35 /* GOT entry containing TLS index */
#define R_386_TLS_DTPOFF32 36 /* GOT entry containing TLS offset */
#define R_386_TLS_TPOFF32 37 /* GOT entry of -ve static TLS offset */
-
-#define R_386_COUNT 38 /* Count of defined relocation types. */
+#define R_386_NONE 0
+#define R_386_32 1
+#define R_386_PC32 2
+#define R_386_GOT32 3
+#define R_386_PLT32 4
+#define R_386_COPY 5
+#define R_386_GLOB_DAT 6
+#define R_386_JMP_SLOT 7
+#define R_386_RELATIVE 8
+#define R_386_GOTOFF 9
+#define R_386_GOTPC 10
+#define R_386_TLS_TPOFF 14
+#define R_386_TLS_IE 15
+#define R_386_TLS_GOTIE 16
+#define R_386_TLS_LE 17
+#define R_386_TLS_GD 18
+#define R_386_TLS_LDM 19
+#define R_386_TLS_GD_32 24
+#define R_386_TLS_GD_PUSH 25
+#define R_386_TLS_GD_CALL 26
+#define R_386_TLS_GD_POP 27
+#define R_386_TLS_LDM_32 28
+#define R_386_TLS_LDM_PUSH 29
+#define R_386_TLS_LDM_CALL 30
+#define R_386_TLS_LDM_POP 31
+#define R_386_TLS_LDO_32 32
+#define R_386_TLS_IE_32 33
+#define R_386_TLS_LE_32 34
+#define R_386_TLS_DTPMOD32 35
+#define R_386_TLS_DTPOFF32 36
+#define R_386_TLS_TPOFF32 37
+#define R_386_TLS_GOTDESC 39
+#define R_386_TLS_DESC_CALL 40
+#define R_386_TLS_DESC 41
+#define R_386_IRELATIVE 42
+#define R_386_GOT32X 43
#define R_PPC_NONE 0 /* No relocation. */
#define R_PPC_ADDR32 1
@@ -653,8 +698,6 @@ typedef struct {
#define R_PPC_SECTOFF_HI 35
#define R_PPC_SECTOFF_HA 36
-#define R_PPC_COUNT 37 /* Count of defined relocation types. */
-
#define R_PPC_TLS 67
#define R_PPC_DTPMOD32 68
#define R_PPC_TPREL16 69
@@ -697,9 +740,6 @@ typedef struct {
#define R_PPC_EMB_BIT_FLD 115
#define R_PPC_EMB_RELSDA 116
- /* Count of defined relocation types. */
-#define R_PPC_EMB_COUNT (R_PPC_EMB_RELSDA - R_PPC_EMB_NADDR32 + 1)
-
#define R_SPARC_NONE 0
#define R_SPARC_8 1
diff --git a/src/cmd/ld/ldelf.c b/src/cmd/ld/ldelf.c
index 1111111..2222222 100644
--- a/src/cmd/ld/ldelf.c
+++ b/src/cmd/ld/ldelf.c
@@ -888,12 +888,15 @@ reltype(char *pn, int elftype, uchar *siz)
case R('6', R_X86_64_PC32):
case R('6', R_X86_64_PLT32):
case R('6', R_X86_64_GOTPCREL):
+ case R('6', R_X86_64_GOTPCRELX):
+ case R('6', R_X86_64_REX_GOTPCRELX):
case R('8', R_386_32):
case R('8', R_386_PC32):
case R('8', R_386_GOT32):
case R('8', R_386_PLT32):
case R('8', R_386_GOTOFF):
case R('8', R_386_GOTPC):
+ case R('8', R_386_GOT32X):
*siz = 4;
break;
case R('6', R_X86_64_64):

@ -0,0 +1,31 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := go-native
$(PKG)_WEBSITE := https://golang.org/
$(PKG)_OWNER := https://github.com/starius
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.4.3
$(PKG)_CHECKSUM := 9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959
$(PKG)_SUBDIR := go
$(PKG)_FILE := go$($(PKG)_VERSION).src.tar.gz
$(PKG)_URL := https://storage.googleapis.com/golang/$($(PKG)_FILE)
$(PKG)_DEPS_$(BUILD) :=
$(PKG)_TARGETS := $(BUILD)
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://golang.org/dl/' | \
$(SED) -n 's,.*go\(1.4.[0-9][^>]*\)\.src\.tar.*,\1,p' | \
$(SORT) -h | tail -1
endef
define $(PKG)_BUILD
cd '$(1)/src' && \
GOROOT_FINAL='$(PREFIX)/$(TARGET)/go' \
DYLD_INSERT_LIBRARIES= \
./make.bash
mkdir -p '$(PREFIX)/$(TARGET)/go'
for d in include src bin pkg; do \
cp -a '$(1)'/$$d '$(PREFIX)/$(TARGET)/go/' ; \
done
endef

@ -0,0 +1,61 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := go
$(PKG)_WEBSITE := https://golang.org/
$(PKG)_OWNER := https://github.com/starius
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.8
$(PKG)_CHECKSUM := 406865f587b44be7092f206d73fc1de252600b79b3cacc587b74b5ef5c623596
$(PKG)_SUBDIR := go
$(PKG)_FILE := go$($(PKG)_VERSION).src.tar.gz
$(PKG)_URL := https://storage.googleapis.com/golang/$($(PKG)_FILE)
$(PKG)_DEPS :=
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://golang.org/dl/' | \
$(SED) -n 's,.*go\(1.[0-9][^>]*\)\.src\.tar.*,\1,p' | \
$(SORT) -h | tail -1
endef
define $(PKG)_BUILD
cd '$(1)/src' && \
GOROOT_BOOTSTRAP='$(PREFIX)/$(BUILD)/go' \
GOROOT_FINAL='$(PREFIX)/$(TARGET)/go' \
GOOS=windows \
GOARCH='$(if $(findstring x86_64,$(TARGET)),amd64,386)' \
DYLD_INSERT_LIBRARIES= \
./make.bash
rm -rf '$(PREFIX)/$(TARGET)/go'
mkdir -p '$(PREFIX)/$(TARGET)/go'
for d in include src bin pkg; do \
cp -a '$(1)'/$$d '$(PREFIX)/$(TARGET)/go/' ; \
done
#create prefixed go wrapper script
mkdir -p '$(PREFIX)/bin/$(TARGET)'
(echo '#!/usr/bin/env bash'; \
echo 'echo "== Using MXE Go wrapper: $(PREFIX)/bin/$(TARGET)-go"'; \
echo 'set -xue'; \
echo 'CGO_ENABLED=1 \'; \
echo 'GOOS=windows \'; \
echo 'GOARCH=$(if $(findstring x86_64,$(TARGET)),amd64,386) \'; \
echo 'DYLD_INSERT_LIBRARIES= \'; \
echo 'CC=$(PREFIX)/bin/$(TARGET)-gcc \'; \
echo 'CXX=$(PREFIX)/bin/$(TARGET)-g++ \'; \
echo 'PKG_CONFIG=$(PREFIX)/bin/$(TARGET)-pkg-config \'; \
echo 'exec $(PREFIX)/$(TARGET)/go/bin/go \'; \
echo '"$$@"'; \
) \
> '$(PREFIX)/bin/$(TARGET)-go'
chmod 0755 '$(PREFIX)/bin/$(TARGET)-go'
GOPATH=$(PWD)/plugins/go \
'$(TARGET)-go' build \
-o '$(PREFIX)/$(TARGET)/go/bin/test-go.exe' \
mxe-test
endef
# -buildmode=shared not supported on windows
# See https://golang.org/s/execmodes
$(PKG)_BUILD_SHARED =

@ -0,0 +1,7 @@
package main
import "fmt"
func main() {
fmt.Printf("hello, world\n")
}

@ -0,0 +1,94 @@
LuaRocks plugin
===============
Short description of LuaRocks
-----------------------------
Hundreds of [Lua][lua] packages are distributed via [LuaRocks][luarocks].
LuaRocks is the package manager for Lua. It allows you to create and
install Luamodules as self-contained packages called rocks. You can
download and install LuaRocks on Unix and Windows.
Lua rocks are similar to Ruby gems, Python eggs or JavaScript NPM. Command
`luarocks install <rock>` downloads a rock from [luarocks.org][luarocks]
(or other luarocks server), compiles C files (modules) to shared libraries
and installs (copies) shared libraries and Lua files to the directory
where luarocks is installed. Installed rocks can be loaded from Lua with
function `require`.
Example:
```
$ luarocks install luasocket
$ lua -e 'http = require "socket.http"; print(http.request("http://mxe.cc"))'
<!DOCTYPE html>
....
```
LuaRocks can used with `make`, `cmake`, custom or builtin
[back-ends][backends].
LuaRocks in MXE
---------------
LuaRocks and some popular rocks were ported to MXE as a plugin.
LuaRocks can now be used in the same way as CMake or Make.
Package `lua` installs native executable usr/bin/lua and
cross-compiled lua executable usr/<target>/bin/lua.exe. Native
executable is needed since LuaRocks is written in Lua. Cross-compiled
one is needed to run Lua scripts loading cross-compiled lua modules.
Package `luarocks` was added. Luarocks was patched to support new
platform `mxe`, inherited from platform `unix`. It uses mix of system
tools (e.g., `openssl`, `ln`, `mkdir`), MXE build chain
(`i686-w64-mingw32.shared-gcc`, `i686-w64-mingw32.shared-cmake`) and some
Windows variables (e.g., "dll" extension for shared libraries). The
package is shared-only because Lua loads modules in runtime. It
creates prefixed luarocks tool in `usr/bin`. It also creates prefixed
wine+lua wrapper aware of locations of dll and lua files installed.
This script can be used to test modules in Linux as if running them in
Windows.
There was a difficult choice if `mxe` platform of luarocks is inherited
from `windows` or `unix` platform. I tried both and it is less patching
for `unix`. For `windows` even build tools differ, while for `unix` a
typical rock builds without patching or with minor patching
(as other MXE packages).
LuaRocks can be used to install rocks. With ideal rock it works as follows:
```
$ i686-w64-mingw32.shared-luarocks install <rock>
```
This command downloads rockspeck, downloads sources, verifies checksum
(useless thing, because checksum is compared to the value from rockspec
file, which itself is neither verified nor signed), builds and installs.
LuaRocks is not used to download source tarballs (as said
above, it doesn't verify checksums properly) using MXE's downloading
and verifying facilities instead. Luarocks is used as builder,
installer and Lua library (it installs Lua files to
`usr/i686-w64-mingw32.shared/share/lua/5.3/luarocks/`).
Build all rocks:
```
$ make all-luarocks MXE_PLUGIN_DIRS=plugins/luarocks MXE_TARGETS='i686-w64-mingw32.shared x86_64-w64-mingw32.shared'
```
Run tests (requires wine):
```
$ ./usr/bin/i686-w64-mingw32.shared-lua plugins/luarocks/test.lua
```
See also:
* [LuaRocks site][luarocks]
* [LuaRocks wiki][wiki]
* [the thread in MXE mailing list about LuaRocks in MXE][thread]
[lua]:https://lua.org/
[luarocks]:https://luarocks.org/
[backends]:https://github.com/keplerproject/luarocks/wiki/Rockspec-format#Build_backends
[wiki]:https://github.com/keplerproject/luarocks/wiki/
[thread]:https://lists.nongnu.org/archive/html/mingw-cross-env-list/2015-10/msg00008.html

@ -0,0 +1,32 @@
This file is part of MXE. See LICENSE.md for licensing information.
From 1d8e959ee39e7a46e150e722af12252448c7ac22 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Sun, 11 Oct 2015 01:56:36 +0100
Subject: [PATCH] link with kernel32 on MXE
---
rockspecs/lua-llthreads2-scm-0.rockspec | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/rockspecs/lua-llthreads2-scm-0.rockspec b/rockspecs/lua-llthreads2-scm-0.rockspec
index 8f907b8..26d5b80 100644
--- a/rockspecs/lua-llthreads2-scm-0.rockspec
+++ b/rockspecs/lua-llthreads2-scm-0.rockspec
@@ -27,6 +27,13 @@ build = {
}
}
},
+ mxe = {
+ modules = {
+ llthreads2 = {
+ libraries = {"kernel32"},
+ }
+ }
+ },
windows = {
modules = {
llthreads2 = {
--
2.1.4

@ -0,0 +1,23 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := llthreads2
$(PKG)_WEBSITE := https://github.com/moteus/lua-llthreads2
$(PKG)_OWNER := https://github.com/starius
$(PKG)_IGNORE :=
$(PKG)_VERSION := 0.1.3
$(PKG)_CHECKSUM := 8c6fc7966cdcc15ae2f89f66ae72f6727a985e7d254f139ecf75a50956a3e8e4
$(PKG)_SUBDIR := lua-$(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz
$(PKG)_URL := https://github.com/moteus/lua-llthreads2/archive/v$($(PKG)_VERSION).tar.gz
$(PKG)_DEPS := gcc luarocks
define $(PKG)_UPDATE
$(call MXE_GET_GITHUB_TAGS, moteus/lua-llthreads2, v)
endef
# shared-only because luarocks is shared-only
define $(PKG)_BUILD_SHARED
cd '$(1)' && '$(TARGET)-luarocks' make \
rockspecs/lua-llthreads2-scm-0.rockspec
endef

@ -0,0 +1,54 @@
This file is part of MXE. See LICENSE.md for licensing information.
From f271a094f8add34df3f31ac6fb12c9fe683f763a Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Sat, 10 Oct 2015 16:40:35 +0100
Subject: [PATCH] add rockspec
Source:https://luarocks.org/modules/gvvaughan/lpeg/1.0.0-1
---
lpeg-1.0.0-1.rockspec | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 lpeg-1.0.0-1.rockspec
diff --git a/lpeg-1.0.0-1.rockspec b/lpeg-1.0.0-1.rockspec
new file mode 100644
index 0000000..b4fdd27
--- /dev/null
+++ b/lpeg-1.0.0-1.rockspec
@@ -0,0 +1,32 @@
+package = "LPeg"
+version = "1.0.0-1"
+source = {
+ url = "http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.0.0.tar.gz",
+ md5 = "0aec64ccd13996202ad0c099e2877ece",
+}
+description = {
+ summary = "Parsing Expression Grammars For Lua",
+ detailed = [[
+ LPeg is a new pattern-matching library for Lua, based on Parsing
+ Expression Grammars (PEGs). The nice thing about PEGs is that it
+ has a formal basis (instead of being an ad-hoc set of features),
+ allows an efficient and simple implementation, and does most things
+ we expect from a pattern-matching library (and more, as we can
+ define entire grammars).
+ ]],
+ homepage = "http://www.inf.puc-rio.br/~roberto/lpeg.html",
+ maintainer = "Gary V. Vaughan <gary@vaughan.pe>",
+ license = "MIT/X11"
+}
+dependencies = {
+ "lua >= 5.1"
+}
+build = {
+ type = "builtin",
+ modules = {
+ lpeg = {
+ "lpcap.c", "lpcode.c", "lpprint.c", "lptree.c", "lpvm.c"
+ },
+ re = "re.lua"
+ }
+}
--
2.1.4

@ -0,0 +1,24 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := lpeg
$(PKG)_WEBSITE := http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html
$(PKG)_OWNER := https://github.com/starius
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.0.1
$(PKG)_CHECKSUM := 62d9f7a9ea3c1f215c77e0cadd8534c6ad9af0fb711c3f89188a8891c72f026b
$(PKG)_SUBDIR := lpeg-$($(PKG)_VERSION)
$(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz
$(PKG)_URL := http://www.inf.puc-rio.br/~roberto/$(PKG)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc luarocks
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://www.inf.puc-rio.br/~roberto/lpeg/' | \
$(SED) -n 's,.*lpeg-\([0-9][^>]*\)\.tar.*,\1,p' | \
$(SORT) -h | tail -1
endef
# shared-only because luarocks is shared-only
define $(PKG)_BUILD_SHARED
cd '$(1)' && '$(TARGET)-luarocks' make
endef

@ -0,0 +1,81 @@
This file is part of MXE. See LICENSE.md for licensing information.
From dbedfa6c3b350b6cb2c13d17790a17129ce28721 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Sun, 11 Oct 2015 22:47:50 +0200
Subject: [PATCH 1/2] use Unix file functions on MinGW
---
src/rapidjson.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/rapidjson.cpp b/src/rapidjson.cpp
index 3b5b129..955009f 100644
--- a/src/rapidjson.cpp
+++ b/src/rapidjson.cpp
@@ -54,7 +54,7 @@ static void setfuncs(lua_State* L, const luaL_Reg *funcs)
FILE* openForRead(const char* filename)
{
FILE* fp = NULL;
-#if WIN32
+#if WIN32 && !defined(__MINGW32__)
fopen_s(&fp, filename, "rb");
#else
fp = fopen(filename, "r");
@@ -66,7 +66,7 @@ FILE* openForRead(const char* filename)
FILE* openForWrite(const char* filename)
{
FILE* fp = NULL;
-#if WIN32
+#if WIN32 && !defined(__MINGW32__)
fopen_s(&fp, filename, "wb");
#else
fp = fopen(filename, "w");
--
1.7.10.4
From ad7426ad156f90dcf2b051fe125900caf5b8b2da Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Sun, 11 Oct 2015 22:48:26 +0200
Subject: [PATCH 2/2] link with Lua libraries on MinGW and MXE
---
rapidjson-0.2.2-1.rockspec | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/rapidjson-0.2.2-1.rockspec b/rapidjson-0.2.2-1.rockspec
index 9efe7e1..6ad9188 100644
--- a/rapidjson-0.2.2-1.rockspec
+++ b/rapidjson-0.2.2-1.rockspec
@@ -27,6 +27,13 @@ dependencies = {
"lua >= 5.1"
}
+-- windows DLL needs link with importlib.
+local link = {
+ variables = {
+ LUA_LIBRARIES = "$(LUA_LIBDIR)/$(LUALIB)",
+ }
+}
+
-- cmake -Bbuild -H. -DBUILD_SHARED_LIBS=ON
-- cmake --build build --target install --config Release
build = {
@@ -39,10 +46,8 @@ build = {
},
-- Override default build options
platforms = {
- windows = {
- variables = {
- LUA_LIBRARIES = "$(LUA_LIBDIR)/$(LUALIB)", -- windows DLL needs link with importlib.
- }
- }
+ windows = link,
+ mingw = link,
+ mxe = link,
}
}
--
1.7.10.4

@ -0,0 +1,22 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := lua-rapidjson
$(PKG)_WEBSITE := https://github.com/xpol/lua-rapidjson
$(PKG)_OWNER := https://github.com/starius
$(PKG)_IGNORE :=
$(PKG)_VERSION := 0.2.2-1
$(PKG)_CHECKSUM := 10783d8633df3f50b1ad33c7de89d2a94a7d9cf45e2ce5217d0d2d5e77396fd2
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz
$(PKG)_URL := https://github.com/xpol/lua-rapidjson/archive/v$($(PKG)_VERSION).tar.gz
$(PKG)_DEPS := gcc luarocks
define $(PKG)_UPDATE
$(call MXE_GET_GITHUB_TAGS, xpol/lua-rapidjson, v)
endef
# shared-only because luarocks is shared-only
define $(PKG)_BUILD_SHARED
cd '$(1)' && '$(TARGET)-luarocks' make
endef

@ -0,0 +1,6 @@
# This file is part of MXE. See LICENSE.md for licensing information.
# enable native build for luarocks
# leave build rule in src/lua.mk for other uses (i.e. build-pkg)
lua_TARGETS := $(BUILD) $(MXE_TARGETS)

@ -0,0 +1,35 @@
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: Boris Nagaev <bnagaev@gmail.com>
Date: Sat, 10 Oct 2015 17:45:24 +0100
Subject: [PATCH] platform MXE
diff --git a/src/luarocks/build/builtin.lua b/src/luarocks/build/builtin.lua
index 1111111..2222222 100644
--- a/src/luarocks/build/builtin.lua
+++ b/src/luarocks/build/builtin.lua
@@ -165,7 +165,7 @@ function builtin.run(rockspec)
add_flags(extras, "-Wl,-rpath,%s:", libdirs)
end
add_flags(extras, "-l%s", libraries)
- if cfg.is_platform("cygwin") then
+ if cfg.is_platform("cygwin") or cfg.is_platform("mxe") then
add_flags(extras, "-l%s", {"lua"})
end
return execute(variables.LD.." "..variables.LIBFLAG, "-o", library, "-L"..variables.LUA_LIBDIR, unpack(extras))
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua
index 1111111..2222222 100644
--- a/src/luarocks/cfg.lua
+++ b/src/luarocks/cfg.lua
@@ -137,6 +140,7 @@ local platform_order = {
linux = 7,
macosx = 8,
cygwin = 9,
+ mxe = 13,
-- Windows
win32 = 10,
mingw32 = 11,

@ -0,0 +1,120 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := luarocks
$(PKG)_WEBSITE := https://luarocks.org/
$(PKG)_OWNER := https://github.com/starius
$(PKG)_IGNORE :=
$(PKG)_VERSION := 2.3.0
$(PKG)_CHECKSUM := 68e38feeb66052e29ad1935a71b875194ed8b9c67c2223af5f4d4e3e2464ed97
$(PKG)_SUBDIR := luarocks-$($(PKG)_VERSION)
$(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz
$(PKG)_URL := https://keplerproject.github.io/luarocks/releases/$($(PKG)_FILE)
$(PKG)_DEPS := gcc lua
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://keplerproject.github.io/luarocks/releases/' | \
$(SED) -n 's,.*luarocks-\([0-9][^>]*\)\.tar.*,\1,p' | \
$(SORT) -h | tail -1
endef
# shared-only because Lua loads modules in runtime
define $(PKG)_BUILD_SHARED
# Remove LuaRocks config because we change it after installation
rm -f '$(PREFIX)/$(TARGET)/etc/luarocks/config-$(lua_SHORTVER).lua'
cd '$(1)' && ./configure \
--prefix='$(PREFIX)/$(TARGET)' \
--rocks-tree='$(PREFIX)/$(TARGET)' \
--lua-version='$(lua_SHORTVER)' \
--with-lua='$(PREFIX)/$(TARGET)' \
--with-lua-bin='$(PREFIX)/$(BUILD)/bin' \
--with-downloader='wget' \
--with-md5-checker='openssl'
$(MAKE) -C '$(1)' build \
LUAROCKS_UNAME_S="MXE" \
LUAROCKS_UNAME_M="$(TARGET)"
$(MAKE) -C '$(1)' install
# Generate LuaRocks config.
( \
echo '-- WARNING! This file is autogenerated by luarocks.mk.'; \
echo '-- It will be overwritten by `make luarocks`'; \
cat '$(PREFIX)/$(TARGET)/etc/luarocks/config-$(lua_SHORTVER).lua'; \
echo 'lib_extension = "dll"'; \
echo 'external_lib_extension = "dll"'; \
echo 'obj_extension = "obj"'; \
echo 'external_deps_dirs = { "$(PREFIX)" }'; \
echo 'arch = "mxe-$(TARGET)"'; \
echo 'platforms = {'; \
echo ' unix = true,'; \
echo ' mxe = true,'; \
echo '}'; \
echo 'cmake_generator = "Unix Makefiles"'; \
echo 'variables = {'; \
echo ' LUA_BINDIR = "$(PREFIX)/bin",'; \
echo ' MAKE = "$(MAKE)",'; \
echo ' CMAKE = "$(PREFIX)/bin/$(TARGET)-cmake",'; \
echo ' CC = "$(PREFIX)/bin/$(TARGET)-gcc",'; \
echo ' CXX = "$(PREFIX)/bin/$(TARGET)-g++",'; \
echo ' LD = "$(PREFIX)/bin/$(TARGET)-gcc",'; \
echo ' CFLAGS = "-O2",'; \
echo ' LIBFLAG = "-shared",'; \
echo ' LUALIB = "liblua.dll.a",'; \
echo '}'; \
echo 'export_path = "SET PATH=%s"'; \
echo 'export_path_separator = ";"'; \
echo 'export_lua_path = "SET LUA_PATH=%s"'; \
echo 'export_lua_cpath = "SET LUA_CPATH=%s"'; \
echo 'wrapper_suffix = ".bat"'; \
echo 'external_deps_patterns = {'; \
echo ' bin = { "?.exe", "?.bat" },'; \
echo ' lib = { "?.dll.a", "lib?.dll.a" },'; \
echo ' include = { "?.h" }'; \
echo '}'; \
echo 'runtime_external_deps_patterns = {'; \
echo ' bin = { "?.exe", "?.bat" },'; \
echo ' lib = { "?.dll" },'; \
echo ' include = { "?.h" }'; \
echo '}'; \
) \
> '$(BUILD_DIR)/config.lua'
mv '$(BUILD_DIR)/config.lua' \
'$(PREFIX)/$(TARGET)/etc/luarocks/config-$(lua_SHORTVER).lua'
# move installed lua file luarocks to luarocks.lua
mv '$(PREFIX)/$(TARGET)/bin/luarocks' '$(PREFIX)/$(TARGET)/bin/luarocks.lua'
# create bash wrapper adding inter-process mutex
# see https://github.com/mxe/mxe/pull/1017#issuecomment-161557440
$(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/luarocks'
(echo '#!/usr/bin/env bash'; \
echo 'set -ue'; \
echo 'echo "== Using MXE wrapper: $(PREFIX)/$(TARGET)/bin/luarocks"'; \
echo '# Creating a directory is an atomic operation, that is why'; \
echo '# it can be used as a mutex.'; \
echo '# See http://wiki.bash-hackers.org/howto/mutex'; \
echo 'while ( ! mkdir "$(PREFIX)/$(TARGET)/lib/luarocks/lock.dir" ); do'; \
echo ' echo "Waiting for $(PREFIX)/$(TARGET)/lib/luarocks/lock.dir to lock"'; \
echo ' sleep 5'; \
echo 'done'; \
echo 'result=0'; \
echo '"$(PREFIX)/$(TARGET)/bin/luarocks.lua" "$$@" || result=$$?'; \
echo 'rmdir "$(PREFIX)/$(TARGET)/lib/luarocks/lock.dir"'; \
echo 'exit $$result'; \
) \
> '$(PREFIX)/$(TARGET)/bin/luarocks'
chmod 0755 '$(PREFIX)/$(TARGET)/bin/luarocks'
# remove lock dir if it exists after previous failed installation
-rmdir "$(PREFIX)/$(TARGET)/lib/luarocks/lock.dir"
# symlink
ln -sf '$(PREFIX)/$(TARGET)/bin/luarocks' '$(PREFIX)/bin/$(TARGET)-luarocks'
# create wine wrapper for testing
echo 'LUA_PATH="$(PREFIX)/$(TARGET)/share/lua/$(lua_SHORTVER)/?.lua;$(PREFIX)/$(TARGET)/share/lua/$(lua_SHORTVER)/?/init.lua;$$LUA_PATH"' > '$(PREFIX)/bin/$(TARGET)-lua'
echo 'LUA_CPATH="$(PREFIX)/$(TARGET)/lib/lua/$(lua_SHORTVER)/?.dll;;$$LUA_CPATH"' >> '$(PREFIX)/bin/$(TARGET)-lua'
echo 'export LUA_PATH LUA_CPATH' >> '$(PREFIX)/bin/$(TARGET)-lua'
echo 'exec wine $(PREFIX)/$(TARGET)/bin/lua.exe "$$@"' >> '$(PREFIX)/bin/$(TARGET)-lua'
chmod +x '$(PREFIX)/bin/$(TARGET)-lua'
endef

@ -0,0 +1,64 @@
This file is part of MXE. See LICENSE.md for licensing information.
From 11c943734757cf703daa6768b3919b7a580fe8b0 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Sat, 10 Oct 2015 22:00:31 +0100
Subject: [PATCH 1/2] build on MXE
---
luasocket-scm-0.rockspec | 14 ++++++++++++--
src/usocket_dummy.lua | 1 +
2 files changed, 13 insertions(+), 2 deletions(-)
create mode 100644 src/usocket_dummy.lua
diff --git a/luasocket-scm-0.rockspec b/luasocket-scm-0.rockspec
index f86567b..9b4da80 100644
--- a/luasocket-scm-0.rockspec
+++ b/luasocket-scm-0.rockspec
@@ -46,7 +46,14 @@ local function make_plat(plat)
"WINVER=0x0501",
"LUASOCKET_API=__declspec(dllexport)",
"MIME_API=__declspec(dllexport)"
- }
+ },
+ mxe = {
+ "LUASOCKET_DEBUG",
+ "LUASOCKET_INET_PTON",
+ "WINVER=0x0501",
+ "LUASOCKET_API=__declspec(dllexport)",
+ "MIME_API=__declspec(dllexport)"
+ },
}
local modules = {
["socket.core"] = {
@@ -85,9 +92,11 @@ local function make_plat(plat)
incdir = "/src"
}
end
- if plat == "win32" or plat == "mingw32" then
+ if plat == "win32" or plat == "mingw32" or plat == "mxe" then
modules["socket.core"].sources[#modules["socket.core"].sources+1] = "src/wsocket.c"
modules["socket.core"].libraries = { "ws2_32" }
+ modules["socket.unix"] = "src/usocket_dummy.lua"
+ modules["socket.serial"] = "src/usocket_dummy.lua"
end
return { modules = modules }
end
@@ -95,6 +104,7 @@ end
build = {
type = "builtin",
platforms = {
+ mxe = make_plat("mxe"),
unix = make_plat("unix"),
macosx = make_plat("macosx"),
win32 = make_plat("win32"),
diff --git a/src/usocket_dummy.lua b/src/usocket_dummy.lua
new file mode 100644
index 0000000..3cce676
--- /dev/null
+++ b/src/usocket_dummy.lua
@@ -0,0 +1 @@
+return error("This file was created to suppress build of usocket.c for MXE")
--
2.1.4

@ -0,0 +1,55 @@
This file is part of MXE. See LICENSE.md for licensing information.
From 25007fd7fed18926728b9a1249f827a27e1d03f1 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Sat, 10 Oct 2015 23:14:31 +0100
Subject: [PATCH 2/2] luaL_checkint -> luaL_checkinteger
---
gem/gem.c | 2 +-
src/luasocket.c | 2 +-
src/mime.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gem/gem.c b/gem/gem.c
index 976f74d..40f33b0 100644
--- a/gem/gem.c
+++ b/gem/gem.c
@@ -24,7 +24,7 @@ static int pushchar(int c, int last, const char *marker,
}
static int eol(lua_State *L) {
- int context = luaL_checkint(L, 1);
+ int context = luaL_checkinteger(L, 1);
size_t isize = 0;
const char *input = luaL_optlstring(L, 2, NULL, &isize);
const char *last = input + isize;
diff --git a/src/luasocket.c b/src/luasocket.c
index e6ee747..1bdfb13 100644
--- a/src/luasocket.c
+++ b/src/luasocket.c
@@ -64,7 +64,7 @@ static luaL_Reg func[] = {
* Skip a few arguments
\*-------------------------------------------------------------------------*/
static int global_skip(lua_State *L) {
- int amount = luaL_checkint(L, 1);
+ int amount = luaL_checkinteger(L, 1);
int ret = lua_gettop(L) - amount - 1;
return ret >= 0 ? ret : 0;
}
diff --git a/src/mime.c b/src/mime.c
index dd37dcf..bd9a2a9 100644
--- a/src/mime.c
+++ b/src/mime.c
@@ -661,7 +661,7 @@ static int eolprocess(int c, int last, const char *marker,
\*-------------------------------------------------------------------------*/
static int mime_global_eol(lua_State *L)
{
- int ctx = luaL_checkint(L, 1);
+ int ctx = luaL_checkinteger(L, 1);
size_t isize = 0;
const char *input = luaL_optlstring(L, 2, NULL, &isize);
const char *last = input + isize;
--
2.1.4

@ -0,0 +1,22 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := luasocket
$(PKG)_WEBSITE := http://www.impa.br/~diego/software/luasocket
$(PKG)_OWNER := https://github.com/starius
$(PKG)_IGNORE :=
$(PKG)_VERSION := 3.0-rc1
$(PKG)_CHECKSUM := 8b67d9b5b545e1b694753dab7bd6cdbc24c290f2b21ba1e14c77b32817ea1249
$(PKG)_SUBDIR := luasocket-$($(PKG)_VERSION)
$(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz
$(PKG)_URL := https://github.com/diegonehab/luasocket/archive/v$($(PKG)_VERSION).tar.gz
$(PKG)_DEPS := gcc luarocks
define $(PKG)_UPDATE
$(call MXE_GET_GITHUB_TAGS, diegonehab/luasocket, v)
endef
# shared-only because luarocks is shared-only
define $(PKG)_BUILD_SHARED
cd '$(1)' && '$(TARGET)-luarocks' make
endef

@ -0,0 +1,68 @@
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: Boris Nagaev <bnagaev@gmail.com>
Date: Mon, 25 Apr 2016 02:31:37 +0200
Subject: [PATCH] add rockspec from upstream
diff --git a/luv-1.9.0-1.rockspec b/luv-1.9.0-1.rockspec
new file mode 100644
index 1111111..2222222
--- /dev/null
+++ b/luv-1.9.0-1.rockspec
@@ -0,0 +1,34 @@
+package = "luv"
+version = "1.9.0-1"
+source = {
+ url = 'https://github.com/luvit/luv/releases/download/'..version..'/luv-'..version..'.tar.gz'
+}
+
+description = {
+ summary = "Bare libuv bindings for lua",
+ detailed = [[
+libuv bindings for luajit and lua 5.1/5.2/5.3.
+
+This library makes libuv available to lua scripts. It was made for the luvit
+project but should usable from nearly any lua project.
+ ]],
+ homepage = "https://github.com/luvit/luv",
+ license = "Apache 2.0"
+}
+
+dependencies = {
+ "lua >= 5.1"
+}
+
+build = {
+ type = 'cmake',
+ variables = {
+ CMAKE_C_FLAGS="$(CFLAGS)",
+ CMAKE_MODULE_LINKER_FLAGS="$(LIBFLAG)",
+ LUA_LIBDIR="$(LUA_LIBDIR)",
+ LUA_INCDIR="$(LUA_INCDIR)",
+ LUA="$(LUA)",
+ LIBDIR="$(LIBDIR)",
+ LUADIR="$(LUADIR)",
+ },
+}
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Boris Nagaev <bnagaev@gmail.com>
Date: Mon, 25 Apr 2016 02:25:47 +0200
Subject: [PATCH] use external libuv
diff --git a/luv-1.9.0-1.rockspec b/luv-1.9.0-1.rockspec
index 1111111..2222222 100644
--- a/luv-1.9.0-1.rockspec
+++ b/luv-1.9.0-1.rockspec
@@ -30,5 +30,6 @@ build = {
LUA="$(LUA)",
LIBDIR="$(LIBDIR)",
LUADIR="$(LUADIR)",
+ WITH_SHARED_LIBUV="ON",
},
}

@ -0,0 +1,22 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := luv
$(PKG)_WEBSITE := https://github.com/luvit/luv
$(PKG)_OWNER := https://github.com/starius
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.9.0-1
$(PKG)_CHECKSUM := fab5ba54f141711afc432216d03f3664710798204c78a2a7414479f10b2b2d83
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz
$(PKG)_URL := https://github.com/luvit/luv/releases/download/1.9.0-1/$($(PKG)_FILE)
$(PKG)_DEPS := gcc libuv luarocks
define $(PKG)_UPDATE
$(call MXE_GET_GITHUB_TAGS, luvit/luv)
endef
# shared-only because luarocks is shared-only
define $(PKG)_BUILD_SHARED
cd '$(1)' && '$(TARGET)-luarocks' make
endef

@ -0,0 +1,16 @@
local lpeg = require 'lpeg'
assert(((lpeg.R('AZ'))^1):match("TEXT") == 5)
local http = require "socket.http"
assert(http.request("http://mxe.cc"):match('MXE'))
local ll = require 'llthreads2'
local thread = ll.new("return 123")
thread:start()
local ok, result = thread:join()
assert(ok)
assert(result == 123)
local rapidjson = require 'rapidjson'
assert(rapidjson.encode(123) == '123')
assert(rapidjson.decode('["xyz"]')[1] == "xyz")

@ -1,5 +1,4 @@
# This file is part of MXE.
# See index.html for further information.
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := autoconf
$(PKG)_IGNORE :=
@ -7,12 +6,15 @@ $(PKG)_VERSION := 2.69
$(PKG)_CHECKSUM := 64ebcec9f8ac5b2487125a86a7760d2591ac9e1d3dbd59489633f9de62a57684
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := http://ftp.gnu.org/pub/gnu/autoconf/$($(PKG)_FILE)
$(PKG)_URL_2 := ftp://ftp.gnu.org/pub/gnu/autoconf/$($(PKG)_FILE)
$(PKG)_URL := https://ftp.gnu.org/gnu/autoconf/$($(PKG)_FILE)
$(PKG)_URL_2 := https://ftpmirror.gnu.org/autoconf/$($(PKG)_FILE)
$(PKG)_WEBSITE := https://www.gnu.org/software/autoconf
$(PKG)_OWNER := https://github.com/tonytheodore
$(PKG)_TARGETS := $(BUILD)
$(PKG)_DEPS := m4
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://ftp.gnu.org/gnu/autoconf/?C=M;O=D' | \
$(WGET) -q -O- 'https://ftp.gnu.org/gnu/autoconf/?C=M;O=D' | \
$(SED) -n 's,.*<a href="autoconf-\([0-9][^"]*\)\.tar.*,\1,p' | \
$(SORT) -V | \
tail -1

@ -1,18 +1,20 @@
# This file is part of MXE.
# See index.html for further information.
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := automake
$(PKG)_IGNORE :=
$(PKG)_VERSION := 1.14.1
$(PKG)_CHECKSUM := 814c2333f350ce00034a1fe718e0e4239998ceea7b0aff67e9fd273ed6dfc23b
$(PKG)_VERSION := 1.15
$(PKG)_CHECKSUM := 7946e945a96e28152ba5a6beb0625ca715c6e32ac55f2e353ef54def0c8ed924
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := http://ftp.gnu.org/pub/gnu/automake/$($(PKG)_FILE)
$(PKG)_URL_2 := ftp://ftp.gnu.org/pub/gnu/automake/$($(PKG)_FILE)
$(PKG)_URL := https://ftp.gnu.org/gnu/automake/$($(PKG)_FILE)
$(PKG)_URL_2 := https://ftpmirror.gnu.org/automake/$($(PKG)_FILE)
$(PKG)_WEBSITE := https://www.gnu.org/software/automake
$(PKG)_OWNER := https://github.com/tonytheodore
$(PKG)_TARGETS := $(BUILD)
$(PKG)_DEPS := autoconf
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://ftp.gnu.org/gnu/automake/?C=M;O=D' | \
$(WGET) -q -O- 'https://ftp.gnu.org/gnu/automake/?C=M;O=D' | \
$(SED) -n 's,.*<a href="automake-\([0-9][^"]*\)\.tar.*,\1,p' | \
$(SORT) -V | \
tail -1

@ -1,5 +1,4 @@
# This file is part of MXE.
# See index.html for further information.
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := bison
$(PKG)_IGNORE := 3%
@ -7,12 +6,15 @@ $(PKG)_VERSION := 2.7.1
$(PKG)_CHECKSUM := b409adcbf245baadb68d2f66accf6fdca5e282cafec1b865f4b5e963ba8ea7fb
$(PKG)_SUBDIR := bison-$($(PKG)_VERSION)
$(PKG)_FILE := bison-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := http://ftp.gnu.org/pub/gnu/bison/$($(PKG)_FILE)
$(PKG)_URL_2 := ftp://ftp.gnu.org/pub/gnu/bison/$($(PKG)_FILE)
$(PKG)_URL := https://ftp.gnu.org/gnu/bison/$($(PKG)_FILE)
$(PKG)_URL_2 := https://ftpmirror.gnu.org/bison/$($(PKG)_FILE)
$(PKG)_WEBSITE := https://www.gnu.org/software/bison
$(PKG)_OWNER := https://github.com/tonytheodore
$(PKG)_TARGETS := $(BUILD)
$(PKG)_DEPS := flex
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://ftp.gnu.org/gnu/bison/?C=M;O=D' | \
$(WGET) -q -O- 'https://ftp.gnu.org/gnu/bison/?C=M;O=D' | \
$(SED) -n 's,.*<a href="bison-\([0-9][^"]*\)\.tar.*,\1,p' | \
$(SORT) -V | \
tail -1

@ -1,5 +1,4 @@
# This file is part of MXE.
# See index.html for further information.
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := coreutils
$(PKG)_IGNORE :=
@ -7,12 +6,16 @@ $(PKG)_VERSION := 8.23
$(PKG)_CHECKSUM := ec43ca5bcfc62242accb46b7f121f6b684ee21ecd7d075059bf650ff9e37b82d
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := http://ftp.gnu.org/pub/gnu/$(PKG)/$($(PKG)_FILE)
$(PKG)_URL_2 := ftp://ftp.gnu.org/pub/gnu/$(PKG)/$($(PKG)_FILE)
$(PKG)_DEPS := gettext gmp libiconv libtool
$(PKG)_URL := https://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE)
$(PKG)_URL_2 := https://ftpmirror.gnu.org/$(PKG)/$($(PKG)_FILE)
$(PKG)_WEBSITE := https://www.gnu.org/software/coreutils
$(PKG)_OWNER := https://github.com/tonytheodore
$(PKG)_TARGETS := $(BUILD)
$(PKG)_DEPS_$(BUILD) := gettext gmp libiconv libtool
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://ftp.gnu.org/gnu/coreutils/?C=M;O=D' | \
$(WGET) -q -O- 'https://ftp.gnu.org/gnu/coreutils/?C=M;O=D' | \
$(SED) -n 's,.*<a href="coreutils-\([0-9][^"]*\)\.tar.*,\1,p' | \
$(SORT) -V | \
tail -1

@ -1,5 +1,4 @@
# This file is part of MXE.
# See index.html for further information.
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := flex
$(PKG)_IGNORE :=
@ -7,11 +6,14 @@ $(PKG)_VERSION := 2.5.39
$(PKG)_CHECKSUM := add2b55f3bc38cb512b48fad7d72f43b11ef244487ff25fc00aabec1e32b617f
$(PKG)_SUBDIR := flex-$($(PKG)_VERSION)
$(PKG)_FILE := flex-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/flex/$($(PKG)_FILE)
$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/flex/$($(PKG)_FILE)
$(PKG)_WEBSITE := https://flex.sourceforge.io/
$(PKG)_OWNER := https://github.com/tonytheodore
$(PKG)_TARGETS := $(BUILD)
$(PKG)_DEPS :=
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://sourceforge.net/projects/flex/files/' | \
$(WGET) -q -O- 'https://sourceforge.net/projects/flex/files/' | \
grep -i 'flex/files/' | \
$(SED) -n 's,.*/flex-\([0-9\.]*\)\.tar.*/.*,\1,p' | \
head -1

@ -0,0 +1,15 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := gettext
$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)
$(PKG)_DEPS_$(BUILD) := libiconv
define $(PKG)_BUILD_$(BUILD)
mkdir '$(1).build'
cd '$(1).build' && '$(1)/configure' \
--prefix='$(PREFIX)/$(TARGET)' \
--disable-shared \
--with-included-libxml
$(MAKE) -C '$(1).build' -j '$(JOBS)' man1_MANS=
$(MAKE) -C '$(1).build' -j 1 install man1_MANS=
endef

@ -1,5 +1,4 @@
# This file is part of MXE.
# See index.html for further information.
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := gperf
$(PKG)_IGNORE :=
@ -7,12 +6,15 @@ $(PKG)_VERSION := 3.0.4
$(PKG)_CHECKSUM := 767112a204407e62dbc3106647cf839ed544f3cf5d0f0523aaa2508623aad63e
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := http://ftp.gnu.org/pub/gnu/$(PKG)/$($(PKG)_FILE)
$(PKG)_URL_2 := ftp://ftp.gnu.org/pub/gnu/$(PKG)/$($(PKG)_FILE)
$(PKG)_URL := https://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE)
$(PKG)_URL_2 := https://ftpmirror.gnu.org/$(PKG)/$($(PKG)_FILE)
$(PKG)_WEBSITE := https://www.gnu.org/software/gperf
$(PKG)_OWNER := https://github.com/tonytheodore
$(PKG)_TARGETS := $(BUILD)
$(PKG)_DEPS :=
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://ftp.gnu.org/gnu/gperf/?C=M;O=D' | \
$(WGET) -q -O- 'https://ftp.gnu.org/gnu/gperf/?C=M;O=D' | \
$(SED) -n 's,.*<a href="gperf-\([0-9][^"]*\)\.tar.*,\1,p' | \
$(SORT) -V | \
tail -1

@ -1,12 +1,15 @@
# This file is part of MXE.
# See index.html for further information.
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := intltool
$(PKG)_IGNORE :=
$(PKG)_VERSION := 0.50.2
$(PKG)_CHECKSUM := 67f25c5c6fb71d095793a7f895b245e65e829e8bde68c6c8b4c912144ff34406
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://launchpad.net/intltool/trunk/$($(PKG)_VERSION)/+download/$($(PKG)_FILE)
$(PKG)_WEBSITE := https://freedesktop.org/wiki/Software/intltool
$(PKG)_OWNER := https://github.com/tonytheodore
$(PKG)_TARGETS := $(BUILD)
$(PKG)_DEPS :=
define $(PKG)_UPDATE

@ -0,0 +1,14 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := libiconv
$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)
$(PKG)_DEPS_$(BUILD) :=
define $(PKG)_BUILD_$(BUILD)
mkdir '$(1).build'
cd '$(1).build' && '$(1)/configure' \
--prefix='$(PREFIX)/$(TARGET)' \
--disable-shared
$(MAKE) -C '$(1).build' -j '$(JOBS)' man1_MANS=
$(MAKE) -C '$(1).build' -j 1 install man1_MANS=
endef

@ -0,0 +1,14 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := libtool
$(PKG)_TARGETS := $(BUILD)
$(PKG)_DEPS_$(BUILD) := autoconf automake
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
endef

@ -1,5 +1,4 @@
# This file is part of MXE.
# See index.html for further information.
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := m4
$(PKG)_IGNORE :=
@ -7,12 +6,15 @@ $(PKG)_VERSION := 1.4.17
$(PKG)_CHECKSUM := f0543c3beb51fa6b3337d8025331591e0e18d8ec2886ed391f1aade43477d508
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz
$(PKG)_URL := http://ftp.gnu.org/pub/gnu/m4/$($(PKG)_FILE)
$(PKG)_URL_2 := ftp://ftp.gnu.org/pub/gnu/m4/$($(PKG)_FILE)
$(PKG)_URL := https://ftp.gnu.org/gnu/m4/$($(PKG)_FILE)
$(PKG)_URL_2 := https://ftpmirror.gnu.org/m4/$($(PKG)_FILE)
$(PKG)_WEBSITE := https://www.gnu.org/software/m4
$(PKG)_OWNER := https://github.com/tonytheodore
$(PKG)_TARGETS := $(BUILD)
$(PKG)_DEPS :=
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://ftp.gnu.org/gnu/m4/?C=M;O=D' | \
$(WGET) -q -O- 'https://ftp.gnu.org/gnu/m4/?C=M;O=D' | \
$(SED) -n 's,.*<a href="m4-\([0-9][^"]*\)\.tar.*,\1,p' | \
$(SORT) -V | \
tail -1

@ -1,5 +1,4 @@
# This file is part of MXE.
# See index.html for further information.
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := make
$(PKG)_IGNORE :=
@ -7,12 +6,16 @@ $(PKG)_VERSION := 4.1
$(PKG)_CHECKSUM := 0bc7613389650ee6a24554b52572a272f7356164fd2c4132b0bcf13123e4fca5
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := http://ftp.gnu.org/pub/gnu/$(PKG)/$($(PKG)_FILE)
$(PKG)_URL_2 := ftp://ftp.gnu.org/pub/gnu/$(PKG)/$($(PKG)_FILE)
$(PKG)_DEPS := gettext
$(PKG)_URL := https://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE)
$(PKG)_URL_2 := https://ftpmirror.gnu.org/$(PKG)/$($(PKG)_FILE)
$(PKG)_WEBSITE := https://www.gnu.org/software/make
$(PKG)_OWNER := https://github.com/tonytheodore
$(PKG)_TARGETS := $(BUILD)
$(PKG)_DEPS_$(BUILD) := gettext
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://ftp.gnu.org/gnu/make/?C=M;O=D' | \
$(WGET) -q -O- 'https://ftp.gnu.org/gnu/make/?C=M;O=D' | \
$(SED) -n 's,.*<a href="make-\([0-9][^"]*\)\.tar.*,\1,p' | \
$(SORT) -V | \
tail -1

@ -0,0 +1,29 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := patch
$(PKG)_IGNORE :=
$(PKG)_VERSION := 2.7.5
$(PKG)_CHECKSUM := 7436f5a19f93c3ca83153ce9c5cbe4847e97c5d956e57a220121e741f6e7968f
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL := https://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE)
$(PKG)_URL_2 := https://ftpmirror.gnu.org/$(PKG)/$($(PKG)_FILE)
$(PKG)_WEBSITE := https://www.gnu.org/software/$(PKG)
$(PKG)_OWNER := https://github.com/tonytheodore
$(PKG)_TARGETS := $(BUILD)
$(PKG)_DEPS :=
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://ftp.gnu.org/gnu/patch/?C=M;O=D' | \
$(SED) -n 's,.*<a href="patch-\([0-9][^"]*\)\.tar.*,\1,p' | \
$(SORT) -V | \
tail -1
endef
define $(PKG)_BUILD_$(BUILD)
mkdir '$(1).build'
cd '$(1).build' && '$(1)/configure' \
--prefix='$(PREFIX)/$(TARGET)'
$(MAKE) -C '$(1).build' -j '$(JOBS)' man1_MANS=
$(MAKE) -C '$(1).build' -j 1 install man1_MANS=
endef

@ -1,5 +1,4 @@
# This file is part of MXE.
# See index.html for further information.
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := sed
$(PKG)_IGNORE :=
@ -7,12 +6,16 @@ $(PKG)_VERSION := 4.2.2
$(PKG)_CHECKSUM := f048d1838da284c8bc9753e4506b85a1e0cc1ea8999d36f6995bcb9460cddbd7
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := http://ftp.gnu.org/pub/gnu/$(PKG)/$($(PKG)_FILE)
$(PKG)_URL_2 := ftp://ftp.gnu.org/pub/gnu/$(PKG)/$($(PKG)_FILE)
$(PKG)_DEPS := gettext libiconv
$(PKG)_URL := https://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE)
$(PKG)_URL_2 := https://ftpmirror.gnu.org/$(PKG)/$($(PKG)_FILE)
$(PKG)_WEBSITE := https://www.gnu.org/software/sed
$(PKG)_OWNER := https://github.com/tonytheodore
$(PKG)_TARGETS := $(BUILD)
$(PKG)_DEPS_$(BUILD) := gettext libiconv
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://ftp.gnu.org/gnu/sed/?C=M;O=D' | \
$(WGET) -q -O- 'https://ftp.gnu.org/gnu/sed/?C=M;O=D' | \
$(SED) -n 's,.*<a href="sed-\([0-9][^"]*\)\.tar.*,\1,p' | \
$(SORT) -V | \
tail -1

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save