diff --git a/.github/ISSUE_TEMPLATE b/.github/ISSUE_TEMPLATE new file mode 100644 index 00000000..135b88aa --- /dev/null +++ b/.github/ISSUE_TEMPLATE @@ -0,0 +1,2 @@ +If a package fails to build, upload the log file to +https://gist.github.com/ and put the link here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..e96eb7b7 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -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! diff --git a/.gitignore b/.gitignore index 76be1b73..8031a238 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ /settings.mk -/build-matrix.html /usr*/ /gits/ /log*/ diff --git a/.travis.yml b/.travis.yml index 50f05cd4..b6351758 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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=" diff --git a/LICENSE.md b/LICENSE.md index b93dcbd8..f4d98978 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -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 diff --git a/Makefile b/Makefile index 10757ee2..0d53680f 100644 --- a/Makefile +++ b/Makefile @@ -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 -# 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)) +# include github related functions +include $(PWD)/github.mk -# disable wine with readonly directory (created by mxe-conf) -# see https://github.com/mxe/mxe/issues/841 -export WINEPREFIX=$(PREFIX)/readonly +# 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 +# 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 + +# 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-` 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 '' > $@ @echo '' >> $@ @echo '' >> $@ @@ -703,7 +890,8 @@ build-matrix.html: $(foreach PKG,$(PKGS), $(TOP_DIR)/src/$(PKG).mk) $(eval $(PKG)_BUILD_ONLY := $(false)) \ ✓, \ ✗)\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)) \ ✓, \ ✗)\n \ @@ -725,18 +913,24 @@ build-matrix.html: $(foreach PKG,$(PKGS), $(TOP_DIR)/src/$(PKG).mk) @echo '' >> $@ @$(foreach TARGET,$(MXE_TARGET_LIST), \ echo '$(words $($(TARGET)_PKGCOUNT))' >> $@;) - @echo '$(words $(BUILD_PKGS))' >> $@ + @echo '$(words $($(BUILD)_PKGS))' >> $@ @echo '' >> $@ @echo '' >> $@ @echo '' >> $@ @echo '' >> $@ @echo '' >> $@ -.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 diff --git a/README.md b/README.md index 1950615f..f9c1a422 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/doc/release-process.txt b/doc/release-process.txt deleted file mode 100644 index 57867c1b..00000000 --- a/doc/release-process.txt +++ /dev/null @@ -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) diff --git a/CNAME b/docs/CNAME similarity index 100% rename from CNAME rename to docs/CNAME diff --git a/assets/build-matrix.css b/docs/assets/build-matrix.css similarity index 70% rename from assets/build-matrix.css rename to docs/assets/build-matrix.css index 4d03da17..49850b63 100644 --- a/assets/build-matrix.css +++ b/docs/assets/build-matrix.css @@ -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%; diff --git a/assets/common.css b/docs/assets/common.css similarity index 96% rename from assets/common.css rename to docs/assets/common.css index 49499b40..da6a1f6a 100644 --- a/assets/common.css +++ b/docs/assets/common.css @@ -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; diff --git a/assets/screenshot-4th-compile-small.png b/docs/assets/screenshot-4th-compile-small.png similarity index 100% rename from assets/screenshot-4th-compile-small.png rename to docs/assets/screenshot-4th-compile-small.png diff --git a/assets/screenshot-4th-compile.png b/docs/assets/screenshot-4th-compile.png similarity index 100% rename from assets/screenshot-4th-compile.png rename to docs/assets/screenshot-4th-compile.png diff --git a/assets/screenshot-4th-run-small.png b/docs/assets/screenshot-4th-run-small.png similarity index 100% rename from assets/screenshot-4th-run-small.png rename to docs/assets/screenshot-4th-run-small.png diff --git a/assets/screenshot-4th-run.png b/docs/assets/screenshot-4th-run.png similarity index 100% rename from assets/screenshot-4th-run.png rename to docs/assets/screenshot-4th-run.png diff --git a/docs/build-matrix.html b/docs/build-matrix.html new file mode 100644 index 00000000..f6890e68 --- /dev/null +++ b/docs/build-matrix.html @@ -0,0 +1,4445 @@ + + + + +MXE Build Matrix + + + + +

MXE Build Matrix

+

+This is a table of all supported package/target +matrix. Being supported means that this specific +combination is working to the best of our knowledge, +but does not mean that it is tested daily. +

+

+If you found that some package is not working properly, +please file a ticket on GitHub. If you figured out a +way to make the package work for unsupported targets, +feel free to submit a pull request. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PackageVersioni686-w64-mingw32x86_64-w64-mingw32Native
staticsharedstaticshared
a52dec0.7.4
agg2.5
alure1.2
apr1.5.2
apr-util1.5.4
armadillo7.800.1
aspell0.60.6.1
assimp3.2
atk2.16.0
atkmm2.22.7
aubio0.4.2
bfd2.25.1
binutils2.25.1
blas3.5.0
boost1.60.0
box2d2.3.1
bullet2.82-r2704
bzip21.0.6
cairo1.15.4
cairomm1.11.2
cblas1
ccfits2.4
cegui9726a2b505fb
cfitsio3370
cgal4.9.1
check0.10.0
chipmunk6.2.2
chromaprint1.1
cimg1.6.3
cloog0.18.4
cmake3.7.2
cmake-conf1
cminpack1.3.4
coda2.15.1
coin3.1.3
cpp-netlib0.11.2
cppunit1.13.2
cryptopp5.6.3
crystalhd1
cunit2.1-3
curl7.54.1
db6.1.26
dbus1.11.12
dcmtk3.6.0
devil1.7.8
djvulibre3.5.27
dlfcn-win32e19bf07
eigen3.2.5
exiv20.25
expat2.2.1
faad22.7
fdk-aac0.1.4
ffmpeg3.2.4
fftw3.3.6-pl1
file5.24
flac1.3.1
flann1.8.4
fltk1.3.3
fontconfig2.12.3
freeglut3.0.0
freeimage3.15.4
freetds1.00.47
freetype2.8
freetype-bootstrap2.8
fribidi0.19.6
ftgl2.1.3~rc5
gc7.2e
gcc5.4.0
gd2.1.0
gdal2.1.3
gdb8.0
gdk-pixbuf2.32.3
gendef5.0.2
geoip-database20150317-1
geos3.4.2
gettext0.19.8.1
ghostscript9.19
giflib5.1.4
glew1.12.0
glfw22.7.9
glfw33.1.2
glib2.50.2
glibmm2.42.0
glm0.9.7.6
glpk4.60
gmp6.1.2
gnutls3.5.13
googlemock1.7.0
googletest1.7.0
graphicsmagick1.3.21
gsl2.3
gsoap2.8.22
gst-libav1.6.2
gst-plugins-bad1.6.2
gst-plugins-base1.6.2
gst-plugins-good1.6.2
gst-plugins-ugly1.6.2
gstreamer1.6.2
gta1.0.7
gtk22.24.29
gtk33.22.7
gtkglarea2.0.1
gtkglext1.2.0
gtkglextmm1.2.0
gtkimageview1.6.4
gtkmm22.24.4
gtkmm33.14.0
gtksourceview2.10.5
gtksourceviewmm22.10.3
guile1.8.8
hamlib3.0.1
harfbuzz1.4.6
hdf-eos219v1.00
hdf-eos51.15
hdf44.2.10
hdf51.8.12
hunspell1.6.1
hyperscan4.3.2
icu4c56.1
id3lib3.8.3
ilmbase2.2.0
imagemagick6.9.0-0
isl0.15
itk4.10.1
jack1.9.10
jansson2.7
jasper1.900.1
jpeg9b
json-c0.12
json-glib1.0.4
json_spirit4.08
jsoncpp1.8.0
lame3.99.5
lapack3.6.0
lcms2.8
lcms11.19
lensfun0.3.2
levmar2.6
libaacs0.8.1
libarchive3.1.2
libass0.13.1
libbluray0.9.2
libbs2b3.1.0
libcaca0.99.beta19
libcddb1.3.2
libcdio0.93
libcdio-paranoia10.2+0.93+1
libcomm14cux2.1.1
libcroco0.6.2
libdnet1.11
libdvbpsi1.2.0
libdvdcss1.3.0
libdvdetect0.71.0
libdvdnav5.0.1
libdvdread5.0.0
libechonest2.3.1
libepoxy1.3.1
libevent2.0.21
libf2c1
libffi3.2.1
libftdi0.20
libftdi11.2
libgcrypt1.7.7
libgda4.2.13
libgdamm4.1.3
libgee0.5.0
libgeotiff1.4.0
libgit20.23.2
libglade2.6.4
libgnurx2.6.1
libgpg_error1.27
libgsasl1.8.0
libgsf1.14.30
libharu2.2.1
libiberty2.25.1
libical2.0.0
libiconv1.15
libid3tag0.15.1b
libidn1.33
libidn20.16
libieee12840.2.11
libircclient1.8
libjpeg-turbo1.5.1
liblastfm1.0.9
liblastfm_qt41.0.9
liblaxjson1.0.5
liblo0.28
liblqr-10.4.2
liblsmash2.9.1
libltdl2.4.4
libmad0.15.1b
libmicrohttpd0.9.38
libmikmod3.3.7
libmms0.6.4
libmng2.0.3
libmodplug0.8.8.4
libmpcdec1.2.6
libmysqlclient6.1.6
libnice0.1.13
libntlm1.4
liboauth1.0.3
libodbc++0.2.5
liboil0.3.17
libomemo0.4.1
libotr4.1.1
libpano132.9.18
libpaper1.1.24+nmu4
libplist1.12
libpng1.6.29
librosco0.1.11
librsvg2.40.5
librtmpa107cef
libsamplerate0.1.9
libshout2.4.1
libsigc++2.4.0
libsndfile1.0.28
libsodium1.0.6
libsoup2.57.1
libspectre0.2.8
libssh21.8.0
libsvm3.22
libtool2.4.4
libtorrent-rasterbar1.1.0
libunistring0.9.7
libusb1.2.6.0
libusb11.0.21
libuv1.9.1
libvpx1.5.0
libwebp0.4.4
libwebsockets1.4-chrome43…
libxml++2.37.2
libxml22.9.4
libxslt1.1.29
libzip1.1.3
llvm3.4
log4cxx0.10.0
lua5.3.3
luabind0.9.1
luajit2.0.4
lz41.7.5
lzma1700
lzo2.09
matio1.5.2
mdbtools0.7.1
mingw-w645.0.2
miniupnpc1.9
minizip0b46a2b
mman-win32b7ec370
mpc1.0.2
mpfr3.1.5
mpg1231.22.4
muparser2.2.5
muparserx4.0.4
mxe-conf1
mxml2.10
ncursese14300b
neon0.30.2
netcdf4.3.0
netpbm10.35.96
nettle3.3
nlopt2.4.2
nsis3.01
ocaml-cairo1.2.0
ocaml-camlimages4.0.1
ocaml-core4.00.1
ocaml-findlib1.4
ocaml-flexdll0.31
ocaml-lablgl1.05
ocaml-lablgtk22.16.0
ocaml-native4.00.1
ocaml-xml-light2.2
oce0.17.2
ogg1.3.2
old0.17
openal1.16.0
openblas0.2.15
opencore-amr0.1.3
opencsg1.4.1
opencv2.4.10
openexr2.2.0
openjpeg2.1.0
openmp-validation3.1
openscenegraph3.4.0
openssl1.0.2l
openthreads3.4.0
opus1.1.1
opusfile0.6
ossim1.8.20
pango1.37.4
pangomm2.34.0
pcl1.8.0
pcre8.40
pcre210.23
pdcurses3.4
pdflib_lite7.0.5p3
pfstools2.0.4
physfs2.0.3
picomodel1142ad8
pire0.0.5
pixman0.33.6
pkgconfda179fd
plib1.8.5-rc1
plibccd7ed09
plotmm0.1.2
plotutils2.6
poco1.4.7p1
polarssl1.3.9
poppler0.51.0
popt1.16
portablexdr4.9.1
portaudio190600_20161…
portmidi217
postgresql9.2.4
primesieve5.5.0
proj4.9.3
protobuf3.2.0
pthreadsPOSIX 1003.1…
qca2.1.3
qdbm1.8.78
qhttpengine0.1.0
qjson0.8.1
qscintilla22.8.4
qt4.8.7
qt3d5.9.0
qt55.9.0
qtactiveqt5.9.0
qtbase5.9.0
qtcanvas3d5.9.0
qtcharts5.9.0
qtconnectivity5.9.0
qtdatavis3d5.9.0
qtdeclarative5.9.0
qtgamepad5.9.0
qtgraphicaleffects5.9.0
qtimageformats5.9.0
qtlocation5.9.0
qtmultimedia5.9.0
qtofficeopenxml02dda4a46f92…
qtpurchasing5.9.0
qtquickcontrols5.9.0
qtquickcontrols25.9.0
qtscript5.9.0
qtscxml5.9.0
qtsensors5.9.0
qtserialbus5.9.0
qtserialport5.9.0
qtserialport_qt45c3b6cc
qtservicead9bc46
qtsparkle4c852e57061d…
qtsparkle_qt44c852e57061d…
qtsvg5.9.0
qtsystems4e3a7ed
qttools5.9.0
qttranslations5.9.0
qtvirtualkeyboard5.9.0
qtwebchannel5.9.0
qtwebkit5.9.0
qtwebsockets5.9.0
qtwebview5.9.0
qtwinextras5.9.0
qtxlsxwriter6895d8ba6c3a…
qtxmlpatterns5.9.0
qwt6.1.3
qwt_qt46.1.3
qwtplot3d0.2.7
ragel6.9
readline6.3
rubberband1.8.1
rucksack3.1.0
sdl1.2.15
sdl22.0.5
sdl2_gfx1.0.3
sdl2_image2.0.1
sdl2_mixer2.0.1
sdl2_net2.0.0
sdl2_ttf2.0.14
sdl_gfx2.0.25
sdl_image1.2.12
sdl_mixer1.2.12
sdl_net1.2.8
sdl_pango0.1.2
sdl_rwhttp0.2.0
sdl_sound1.0.3
sdl_ttf2.0.11
sfml2.4.2
smpeg0.4.5+cvs200…
smpeg22.0.0
sox14.4.2
sparsehash2.0.3
speex1.2rc2
speexdsp1.2rc3
sqlite3190300
subversion1.9.4
suitesparse4.2.1
t4k_common0.1.1
taglib1.10
tclap1.2.1
teem1.11.0
termcap1.3.1
theora1.1.1
tidy-html55.4.0
tiff4.0.8
tinyxml2.6.2
tinyxml24.0.1
tre0.8.0
twolame0.3.13
ucl1.03
unrtf0.21.9
upx3.91
vamp-plugin-sdk2.5
vcdimager0.7.24
vidstab0.98b
vigra1.9.0
vmime3d3ed7b
vo-aacenc0.1.3
vo-amrwbenc0.1.3
vorbis1.3.5
vtk5.8.0
vtk66.3.0
waf1.8.17
wavpack4.75.2
wget1.19.1
widl5.0.2
winpcap4_1_3
wt3.3.7
wxwidgets3.0.2
x26420161130-224…
xapian-core1.2.21
xerces3.1.4
xmlrpc-cd4364f4
xmlwrapp0.7.0
xorg-macros1.19.0
xvidcore1.3.4
xxhash0.6.1
xz5.2.3
yaml-cpp0.5.3
yasm1.3.0
zlib1.2.11
zziplib0.13.62
+Total: 428 +
(+7 virtual ++4 native-only) +
42133340733319
+ + diff --git a/doc/gmsl.html b/docs/gmsl.html similarity index 99% rename from doc/gmsl.html rename to docs/gmsl.html index 28fd58d9..494d7f35 100644 --- a/doc/gmsl.html +++ b/docs/gmsl.html @@ -22,7 +22,7 @@ include the GMSL in your Makefile do
you have the right version of gmsl use the gmsl_compatible function (see -below). The current version is 1 1 6.
+below). The current version is 1 1 7.

The GMSL package also includes a test suite for GMSL.  Just run make -f gmsl-tests.

Logical Operators

GMSL has boolean $(true) (a non-empty string) diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 00000000..fbf8e0d7 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,2899 @@ + + + + + + + MXE (M cross environment) + + + + + + + + +
+

Introduction

+ +

+ MXE (M cross environment) is a Makefile that + compiles a cross compiler and cross compiles + many free libraries such as SDL and Qt. Thus, + it provides a nice cross compiling environment + for various target platforms, which +

+ + + +

Supported Toolchains

+ +

+ Compiler and runtime: MinGW-w64. +

+ + + + + + + + + + + + + + + + + + + + +
Target OSPackages
StaticShared
32 bit Windows99% (379/381)72% (273/381)
64 bit Windows94% (360/381)71% (271/381)
+

+ These numbers were last updated on December 16, 2015. + See the current status + for individual packages. +

+

+ Executables built for 32 bit Windows can be + executed on 64 bit Windows as well. +

+

+ How to choose MXE target: +

    +
  1. If you want a 64 bit Windows executable, + statically linked into one big executable: + use MXE_TARGETS x86_64-w64-mingw32.static;
  2. +
  3. If you want a 64 bit Windows executable, + split into an executable and dependant dlls + use MXE_TARGETS x86_64-w64-mingw32.shared;
  4. +
  5. If you want a 32 bit Windows executable, + statically linked into one big executable: + use MXE_TARGETS i686-w64-mingw32.static;
  6. +
  7. If you want a 32 bit Windows executable, + split into an executable and dependant dlls + use MXE_TARGETS i686-w64-mingw32.shared.
  8. +
+ Remark: The 'w64-mingw32' in those names are left-overs from + historical evolutions in the open source cross-compilation world + and refer in no way to the result being 64 or 32 bit Windows. +

+

+ OpenMP (libgomp) + and pthreads (winpthreads) + are always available. +

+

+ Experimental support for GCC with posix threads was + added in November 2015. +

+

+ Experimental support for alternate GCC Exception Handling was + added in February 2017. +

+ +
+ +
+

Screenshots

+ +

+ Cross compiling + 4tH: +

+ + 4th-compile + + +

+ and running it: +

+ + 4th-run + +
+ +
+

Tutorial

+ +

Step 1: Requirements and Download

+ +

+ First, you should ensure that your system meets + MXE's + requirements. + You will almost certainly have to install some stuff. +

+ +

+ When everything is fine, download the + current version: +

+
git clone https://github.com/mxe/mxe.git
+ +

+ If you don't mind installing it in your home directory, + just skip the following step and go straight to step 3. +

+ +

+ MXE builds and installs everything under the same + top-level directory and is not relocatable after + the first packages are built. +

+ +

+ Due to limitations of GNU Make, the path of MXE is not allowed + to contain any whitespace characters. +

+ +

Step 2: System-wide Installation (optional)

+ +

+ Now you should save any previous installation + of the MXE. + Assuming you've installed it under + /opt/mxe (any other directory will do as well), + you should execute the following commands: +

+
su
+mv /opt/mxe /opt/mxe.old
+exit
+ +

+ Then you need to transfer the entire directory to its definitive location. + We will assume again you use /opt/mxe, + but feel free to use any other directory if you like. +

+
su
+mv mxe /opt/mxe
+exit
+ +

+ We're almost done. + Just change to your newly created directory and get going: +

+
cd /opt/mxe
+ +

Step 3a: Build MXE

+ +

+ Enter the directory where you've downloaded MXE. + Now it depends on what you actually want – or need. +

+ +

+ If you choose to enter: +

+
make
+

+ you're in for a long wait, + because it compiles + a lot of packages. + On the other hand it doesn't require any intervention, + so you're free to do whatever you like + – like watch a movie or go for a night on the town. + When it's done you'll find that you've installed + a very capable Win32 cross compiler onto your system. +

+ +

+ If you only need the most basic tools you can also use: +

+
make gcc
+

+ and add any additional packages you need later on. + You can also supply a host of packages on the + command line, + e.g.: +

+
make gtk lua libidn
+

+ Targets can also be specified on the command line. + By default, only i686-w64-mingw32.static is built, but you can + build your toolchain(s) of choice with: +

+
make MXE_TARGETS='x86_64-w64-mingw32.static i686-w64-mingw32.static'
+

+ or by adjusting the MXE_TARGETS variable + in settings.mk. +

+

+ You'll always end up with a consistent cross compiling environment. +

+ +

+ If you have trouble here, please feel free to + contact the mxe team through the + issue tracker or + mailing list. +

+ +

+ After you're done it just needs a little post-installation. +

+ +

Step 3b: Install MXE from the binary distribution

+ +

+ Instead of building MXE packages from source, you can + download precompiled packages. There are two options: + tar archives and Debian packages. + See pkg.mxe.cc. +

+ +

Step 4: Environment Variables

+ +

+ Edit your .bashrc script in order to change $PATH: +

+
export PATH=/where MXE is installed/usr/bin:$PATH
+ +

+ You may be tempted to also add $(TARGET)/bin + to your path. You never want to do this, + the executables and scripts in there will cause conflicts + with your native toolchain. +

+ +

+ In case you are using custom $PKG_CONFIG_PATH entries, + you can add separate entries for cross builds: +

+
export PKG_CONFIG_PATH="entries for native builds"
+
export PKG_CONFIG_PATH_i686_w64_mingw32_static="entries for MXE builds"
+

+ Remember to use i686-w64-mingw32.static-pkg-config + instead of pkg-config for cross builds. + The Autotools do that automatically for you. +

+ +

+ Note that any other compiler related environment variables + (like $CC, $LDFLAGS, etc.) + may spoil your compiling pleasure, + so be sure to delete or disable those. +

+

+ For the most isolated and repeatable environment, + use a white-list approach: +

+
unset `env | \
+    grep -vi '^EDITOR=\|^HOME=\|^LANG=\|MXE\|^PATH=' | \
+    grep -vi 'PKG_CONFIG\|PROXY\|^PS1=\|^TERM=' | \
+    cut -d '=' -f1 | tr '\n' ' '`
+ +

+ Congratulations! + You're ready to cross compile anything you like. +

+ +

Step 5a: Cross compile your Project (Autotools)

+ +

+ If you use the + Autotools, + all you have to do is: +

+
./configure --host=i686-w64-mingw32.static
+make
+ +

+ If you build a library, you might also want to enforce a static build: +

+
./configure --host=i686-w64-mingw32.static --enable-static --disable-shared
+make
+ +

+ Don't worry about a warning like this: +

+
configure: WARNING: If you wanted to set the --build type, don't use --host.
+If a cross compiler is detected then cross compile mode will be used.
+

+ Everything will be just fine. +

+ +

Step 5b: Cross compile your Project (CMake)

+ +

+ If you have a + CMake project, + you can use the provided cmake wrapper: +

+
i686-w64-mingw32.static-cmake ...
+

+ This will automatically use the MXE version of cmake + and locate the toolchain file. +

+ +

Step 5c: Cross compile your Project (Qt)

+ +

+ If you have a + Qt application, + all you have to do is: +

+
/where MXE is installed/usr/i686-w64-mingw32.static/qt/bin/qmake
+make
+

+ Note that Qt 4 is in the "qt" subdirectory. Qt 5 is in the "qt5" subdirectory + and its qmake can be invoked similarly. +

+

+ If you are using Qt plugins + such as the svg or ico image handlers, + you should also have a look at the + Qt documentation about static plugins. +

+

+ Note the sql drivers (-qt-sql-*) + and the image handlers for jpeg, tiff, gif and mng + are built-in, not plugins. +

+ +

Step 5d: Cross compile your Project (Makefile)

+ +

+ If you have a handwritten Makefile, + you probably will have to make a few adjustments to it: +

+
CC=$(CROSS)gcc
+LD=$(CROSS)ld
+AR=$(CROSS)ar
+PKG_CONFIG=$(CROSS)pkg-config
+

+ You may have to add a few others, depending on your project. +

+ +

+ Then, all you have to do is: +

+
make CROSS=i686-w64-mingw32.static-
+

+ That's it! +

+ +

Step 5e: Cross compile your Project (OSG)

+ +

+ Using static OpenSceneGraph libraries requires a few changes to your source. + The graphics subsystem and all plugins required by your application must be + referenced explicitly. Use a code block like the following: +

+
#ifdef OSG_LIBRARY_STATIC
+USE_GRAPHICSWINDOW()
+USE_OSGPLUGIN(<plugin1>)
+USE_OSGPLUGIN(<plugin2>)
+...
+#endif
+

+ Look at examples/osgstaticviewer/osgstaticviewer.cpp in the + OpenSceneGraph source distribution for an example. This example can be + compiled with the following command: +

+
i686-w64-mingw32.static-g++ \
+    -o osgstaticviewer.exe examples/osgstaticviewer/osgstaticviewer.cpp \
+    `i686-w64-mingw32.static-pkg-config --cflags openscenegraph-osgViewer openscenegraph-osgPlugins` \
+    `i686-w64-mingw32.static-pkg-config --libs openscenegraph-osgViewer openscenegraph-osgPlugins`
+

+ The i686-w64-mingw32.static-pkg-config command from MXE will + automatically add -DOSG_LIBRARY_STATIC to your compiler flags. +

+ +

Further Steps

+ +

+ If you need further assistance, + feel free to join the + mailing list + where you'll get in touch with + the MXE developers + and other users. +

+
+ +
+
+
+
+

Download

+ +

+ To obtain the current version, run: +

+ +
git clone https://github.com/mxe/mxe.git
+ +

+ To retrieve updates, run: +

+ +
git pull
+ +

+ You can also browse the + web repository. +

+ +

+ In addition, + feel free to join the + mailing list + and to propose new packages. +

+
+ +
+

Requirements

+ +

+ MXE requires a recent Unix system where + all components as stated in the table below + are installed. It also needs roughly 2 GiB of + RAM to link gcc and at least 700 MB of disk + space per target (counted with only gcc + built). +

+

+ Detailed instructions are available for: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Autoconf≥ 2.68
Automake≥ 1.11.3
Bash
Bison
Bzip2
Flex≥ 2.5.31
GCC (gcc, g++)
gdk-pixbuf
Git≥ 1.7
GNU Coreutils
GNU Gettext
GNU gperf
GNU Make≥ 3.81
GNU Sed
GNU Tar
Intltool≥ 0.40
LibC for 32-bit
libffi≥ 3.0.0
Libtool≥ 2.2
OpenSSL-dev≥ 1.01
p7zip (7-Zip)
Patch
Perl
Perl XML::Parser
Pkg-config≥ 0.16
Python
Ruby
SCons≥ 0.98
UnZip
Wget
XZ Utils
zlib≥ 1.20
+ +

Debian and derivatives

+ + +
apt-get install \
+    autoconf automake autopoint bash bison bzip2 flex gettext\
+    git g++ gperf intltool libffi-dev libgdk-pixbuf2.0-dev \
+    libtool libltdl-dev libssl-dev libxml-parser-perl make \
+    openssl p7zip-full patch perl pkg-config python ruby scons \
+    sed unzip wget xz-utils
+ +

+ On 64-bit Debian, install also: +

+
apt-get install g++-multilib libc6-dev-i386
+ +

+ On Debian Jessie (8) or Ubuntu Utopic (14.10) or later, + install also: +

+
apt-get install libtool-bin
+ +

+ Only the latest Debian stable series is supported. +

+ +

+ You can install a precompiled MXE via Debian packages. + See pkg.mxe.cc. +

+ +

Fedora

+ + +
yum install \
+    autoconf automake bash bison bzip2 flex gcc-c++ \
+    gdk-pixbuf2-devel gettext git gperf intltool make \
+    sed libffi-devel libtool openssl-devel p7zip patch \
+    perl pkgconfig python ruby scons unzip wget xz
+ +

+ On 64-bit Fedora, + there are issues without a 32-bit compiler. +

+ +

FreeBSD

+ + +
pkg install \
+    automake autoconf bash bison coreutils flex \
+    gcc gdk-pixbuf2 gettext git glib gmake gperf gsed intltool libffi \
+    libtool openssl p5-XML-Parser p7zip patch perl5 \
+    pkgconf python ruby scons unzip wget
+ +

+ Use gmake instead of make. +

+

+ Install file(1) from ports, because file(1) from base + works + very-very-very slow with long text files. +

+

+ Do not build as root. See + #902. +

+

+ Ensure that /usr/local/bin precedes /usr/bin in your $PATH: +

+

+ For C style shells, edit .cshrc +

+
setenv PATH /usr/local/bin:$PATH
+

+ For Bourne shells, edit .profile +

+
export PATH=/usr/local/bin:$PATH
+

+ On 64-bit FreeBSD, + there are issues without a 32-bit compiler. +

+

+ N.B. FreeBSD is no longer fully supported +

+

+ to build the remainder of MXE, run: +

+
gmake EXCLUDE_PKGS='gtksourceviewmm2 ocaml% openexr pcl qtbase'
+

+ to see a list of all dependent downstream packages that + will be excluded, run: +

+
gmake show-downstream-deps-'gtksourceviewmm2 ocaml% openexr \
+                            pcl qtbase'
+ +

Frugalware

+ + +
pacman-g2 -S \
+    autoconf automake bash bzip2 bison flex gcc gdk-pixbuf2\
+    gettext git gperf intltool make sed libffi libtool \
+    openssl patch perl perl-xml-parser pkgconfig python \
+    ruby scons unzip wget xz xz-lzma
+ +

+ On 64-bit Frugalware, + there are issues without a 32-bit compiler. +

+ +

Gentoo

+ + +
emerge \
+    sys-devel/autoconf sys-devel/automake app-shells/bash \
+    sys-devel/bison app-arch/bzip2 \
+    sys-devel/flex sys-devel/gcc sys-devel/gettext \
+    dev-vcs/git dev-util/gperf dev-util/intltool \
+    sys-devel/make sys-apps/sed dev-libs/libffi \
+    sys-devel/libtool dev-libs/openssl app-arch/p7zip \
+    sys-devel/patch dev-lang/perl dev-perl/XML-Parser \
+    dev-util/pkgconfig dev-lang/python dev-lang/ruby \
+    dev-util/scons app-arch/unzip net-misc/wget \
+    app-arch/xz-utils x11-libs/gdk-pixbuf
+ +

Mac OS X

+ +

+ Install + the latest Xcode +

+
Method 1 - MacPorts
+

+ Install MacPorts, + then run: +

+ +
sudo port install \
+    autoconf automake bison coreutils flex gettext \
+    gdk-pixbuf2 glib2 gnutar gsed intltool libffi libtool \
+    openssl p5-xml-parser p7zip pkgconfig scons wget xz
+ +
Method 2 - Rudix
+

+ Install Rudix, + then run: +

+ +
sudo rudix install \
+    autoconf automake coreutils gettext glib intltool \
+    libtool p7zip scons sed tar wget xz
+

+ Note: gdk-pixbuf2 is not installed in method 2, + so you can not build gtk3. Other packages may be + missing on Rudix - please open an issue if you find any. +

+ +
Method 3 - Homebrew
+

+ Install Homebrew, + then run: +

+ +
brew install \
+    autoconf automake coreutils gdk-pixbuf gettext \
+    gnu-sed gnu-tar intltool libtool p7zip wget xz
+

+ Some formulae are + keg-only + and will need brew link to be found. +

+ +
Genral Notes
+

+ You may be prompted to install a java runtime + - this is not required. +

+

+ Mac OS X versions ≤ 10.9 are no longer tested. +

+

+

Certain packages have open issues on OS X
+

+

+ For Xcode ≥ 8.3 install an alternate compiler to build `gcc`. + For example, if you use Macports run: +

sudo port install gcc5
+make cmake && \
+sudo port select gcc mp-gcc5 && \
+make gcc -j4 && \
+sudo port select gcc none && \
+make -j4 -k
+

+

+ For Xcode <7.3, run: +

+
make EXCLUDE_PKGS='nsis'
+ +

openSUSE

+ + +
zypper install -R \
+    autoconf automake bash bison bzip2 flex gcc-c++ \
+    gdk-pixbuf-devel gettext-tools git gperf intltool \
+    libffi-devel libtool make openssl libopenssl-devel \
+    p7zip patch perl perl-XML-Parser pkg-config python \
+    ruby scons sed unzip wget xz
+ +

+ On 64-bit openSUSE, install also: +

+
zypper install -R \
+    gcc-32bit glibc-devel-32bit libgcc46-32bit \
+    libgomp46-32bit libstdc++46-devel-32bit
+ +

Issues without a 32-bit compiler

+ +

+ Certain packages contain native tools that are + currently 32-bit only. In order to build these on a + 64-bit system, multi-lib support must be enabled in the + compiler toolchain. However, not all operating systems + support this. +

+

+ To build the remainder of MXE, specify the affected + packages to exclude: +

+
make EXCLUDE_PKGS='ocaml%'
+
+ +
+

Usage

+ +

+ All build commands also download the packages if necessary. +

+

+ In a BSD userland, substitute "make" with "gmake" + as all commands are based on + GNU Make. +

+
+ +
make
+ +
+ build all packages, + non-parallel +
+ +
make gcc
+ +
+ build a minimal useful set of packages, + i.e. the cross compilers + and the most basic packages, + non-parallel +
+ +
make foo bar
+ +
+ build packages "foo", "bar" and their dependencies, + non-parallel +
+ +
+ the package list can also be set in + settings.mk +
LOCAL_PKG_LIST := foo bar
+.DEFAULT_GOAL  := local-pkg-list
+local-pkg-list: $(LOCAL_PKG_LIST)
+
+
+ so a call to make will only build those packages (and their + dependencies, of course) +
+ +
make foo bar --touch
+ +
+ mark packages "foo" and "bar" as up-to-date after + a trivial change in one of their dependencies + (short option "-t") +
+ +
make foo bar --jobs=4 JOBS=2
+ +
+ build packages "foo", "bar" and their dependencies, + where up to 4 packages are built in parallel + (short option "-j 4"), + each with up to 2 compiler processes running in parallel +
+
+ the JOBS variable can also be defined in + settings.mk and defaults to the number + of CPUs up to a max of 6 to prevent runaway system + load with diminishing returns - see the + GNU Make manual + for more details on parallel execution +
+ +
make --jobs=4 --keep-going
+ +
+ build all packages with 4 inter-package parallel + jobs and continue as much as possible after an error + (short option "-j 4 -k") +
+ +
make EXCLUDE_PKGS='foo bar'
+ +
+ build all packages excluding foo, bar, and all downstream + packages that depend on them - mostly used when there are + known issues +
+ +
make foo_SOURCE_TREE=/path/to/local/source
+ +
+ build using local source tree for package "foo", bypassing + download, checksum and patching +
+
+ N.B. ensure "foo" has an out-of-source + build configured to avoid generation of build artefacts + in local tree +
+ +
make check-requirements
+ +
+ check most of the + requirements + if necessary + – executed automatically + before building packages +
+ +
make download
+ +
+ download all packages, + non-parallel, + such that subsequent builds work without internet access +
+ +
make download-foo download-bar
+ +
+ download packages "foo", "bar" and their dependencies, + non-parallel +
+ +
make download-foo download-bar -j 4
+ +
+ download packages "foo", "bar" and their dependencies, + where up to 4 packages are downloaded in parallel +
+ +
make download-only-foo download-only-bar
+ +
+ download packages "foo", "bar", without their dependencies, + non-parallel +
+ +
make clean
+ +
+ remove all package builds + – use with caution! +
+ +
make clean-junk
+ +
+ remove all unused files, including unused package + files, temporary folders, and logs +
+ +
make clean-pkg
+ +
+ remove all unused package files, + handy after a successful update +
+ +
make show-deps-foo
+ +
+ print a list of upstream dependencies + and downstream dependents +
+ +
make show-downstream-deps-foo
+ +
+ print a list of downstream dependents + suitable for usage in shell scripts +
+ +
make show-upstream-deps-foo
+ +
+ print a list of upstream dependencies + suitable for usage in shell scripts +
+ +
make docs/build-matrix.html
+ +
+ generate a report of what packages are + supported on what targets to + docs/build-matrix.html +
+ +
make update
+ +
+ update the version numbers of all packages, + download the new versions and note their checksums +
+ +
make update UPDATE_DRYRUN=true
+ +
+ show list of update candidates without downloading +
+ +
make update-package-foo
+ +
+ update the version numbers of package foo, + download the new version and note its checksum +
+ +
make check-update-package-foo
+ +
+ check if package foo has an update available + without downloading +
+ +
make update-checksum-foo
+ +
+ download package foo and update its checksum +
+ +
make cleanup-style
+ +
+ cleanup coding style +
+ +
+
+ +
+

List of Packages

+ +

+ See something missing? Feel free to create a new package. +

+ + + + +
Loading package list...
+ +
+ +
+

Guidelines for Creating Packages

+ +
    +
  1. +

    + The package should be a + free + software + library + that is really used by one of your applications. Please also review our + legal notes. +

    + +

    + BTW, we're always curious about the applications people are porting. + We maintain a + list of projects + which use MXE. + No matter whether your project is free or proprietary + – as long as it has its own website, + we'd be happy to link to it. +

    + +

    + Also, feel free to link to us. :-) +

    +
  2. + +
  3. +

    + Grep through the src/*.mk files + to find a project that is most similar to yours. + (Really, grep is your friend here.) +

    + +

    + For instance, + when adding a GNU library, + you should take a package like + gettext.mk + or + libiconv.mk + as the base of your work. + When using a SourceForge project, + you could start with a copy of + xmlwrapp.mk. + And so on. +

    + +

    + GitHub hosted projects can automatically configure updates, + urls, file names etc. by setting $(PKG)_GH_CONF + instead of $(PKG)_FILE, $(PKG)_SUBDIR, $(PKG)_URL, and + $(PKG)_UPDATE sections. +

    +

    + To track normal release tags set: +

    $(PKG)_GH_CONF  := owner/repo[, tag prefix, tag suffix, tag filter-out, version separator]
    + To track branches, set: +
    $(PKG)_GH_CONF  := owner/repo/branch
    + See the following packages for examples: +
      +
    • + vmime.mk + for branch tracking +
    • +
    • + libevent.mk + for tag tracking +
    • +
    • + libffi.mk + for externally hosted tarballs with generated sources not + present in source tree +
    • +
    +

    + +

    + The GNU Make Standard Library is also + available (though it should be unnecessary for most packages). +

    + +

    + Alternatively you can use tool tools/skeleton.py to + create a skeleton of new MXE package. It fills most of the fields + of .mk file automatically and supports typical + build scenarios through option --builder. It also + adds a package to the list of packages + (see below). +

    +
  4. + +
  5. +

    + Adjust the comments, + fill in the $(PKG)_* fields. +

    + +

    + To fill the $(PKG)_CHECKSUM field, use a command such as (for file gettext.mk): +

    +
    make update-checksum-gettext
    +

    or:

    +
    openssl sha256 pkg/gettext-x.y.z.tar.gz
    +

    + if you have already downloaded the package. +

    + +

    + Be especially careful with the $(PKG)_DEPS section. + The easiest way to get the dependencies right + is to start with a minimal setup. + That is, + initialize MXE with make gcc only, + then check whether your package builds successfully. +

    + +

    + Always list the dependency on gcc explicitly: +

    +
    $(PKG)_DEPS     := gcc ...
    + +

    + Specify official name and website of a package. + If the official name coincides with the package name, + you can omit $(PKG)_DESCR. +

    +
    +PKG             := libdvdetect
    +$(PKG)_WEBSITE  := https://www.dvdetect.de/
    +$(PKG)_DESCR    := Fast database lookup for DVDs
    + +

    + Always look for the SSL version of URLs, that is, + prefer https:// URLs over http:// URLs. +

    +
  6. + +
  7. +

    + Write your $(PKG)_BUILD. + If your library has a ./configure script, + enable/disable all dependency libraries explicitly + via "--enable-*" and "--disable-*" options. +

    + +

    + Things not to do: +

    +
      +
    • + do not run target executables with Wine, as Wine is + not guaranteed to be installed. Instead build the needed tool + natively or (if it is too huge to build one more time) add + to MXE's dependencies. This policy is forced by setting + WINEPREFIX to an empty directory, which breaks Wine; +
    • + +
    • + do not download anything while building, as all files + downloaded should be verified by checksums. Instead create a + package which installs the needed file. This policy is forced + on Linux by LD_PRELOAD trick, breaking network functions. +
    • +
    + +

    + Useful Makefile variables provided by MXE: +

    + +
      +
    • +

      + $(SOURCE_DIR) + is a directory with package source and + $(BUILD_DIR) + is an empty directory intended for build files. + Both directories are temporary. + Prefer out-of-tree builds. Autotools + and CMake support them. +

      +
    • +
    • +

      + $(PREFIX) + is path to usr/ directory. + $(TOP_DIR) + is path to MXE root directory. + $(TARGET) is target triplet + (e.g., i686-w64-mingw32.static). + $(BUILD) is build triplet + (e.g., x86_64-unknown-linux-gnu). +

      +
    • +
    • +

      + $(MXE_CONFIGURE_OPTS) + adds standard options to ./configure script. + Typical usage: +

      +
      +cd '$(BUILD_DIR)' && '$(SOURCE_DIR)'/configure \
      +    $(MXE_CONFIGURE_OPTS)
      +            
      +
    • +
    • +

      + $(MXE_DISABLE_CRUFT) + disables installation of documentation and programs. +

      +
      +$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_CRUFT)
      +$(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_CRUFT)
      +            
      +
    • +
    • +

      + $(BUILD_SHARED) + is TRUE for shared targets. Useful to add flags applicable + only to shared targets. +

      +
      +$(if $(BUILD_SHARED),LDFLAGS=-no-undefined)
      +            
      +

      + Similarly, + $(BUILD_STATIC) + is TRUE for static targets; + $(BUILD_NATIVE) + is TRUE for native targets; + $(BUILD_CROSS) + is TRUE for cross targets. +

      +
    • +
    + +
  8. + +
  9. +

    + You might also have to provide a patch for it. + In that case, have a look at other patches such as + sdl2-2-libtool.patch. + In particular, each patch file should be named as: +

    +
    PACKAGE-PATCHNUMBER-DESCRIPTION.patch
    +

    + and should start with: +

    +
    This file is part of MXE. See LICENSE.md for licensing information.
    +
    +This patch has been taken from:
    +https://...
    +

    + where the URL points to the + bugtracker entry, + mailing list entry or + website + you took the patch from. +

    + +

    + If you created the patch yourself, + please offer it to the upstream project first, + and point to that URL, + using the same wording: + "This patch has been taken from:". +

    + +

    + Depending on the feedback you get from the upstream project, + you might want to improve your patch. +

    +
  10. + +
  11. +

    + If you find some time, + please provide a minimal test program for it. + It should be + simple, + stand alone and + should work unmodified for many (all?) future versions of the library. + Test programs are named as: +

    +
    PACKAGE-test.c
    + or +
    PACKAGE-test.cpp
    +

    + depending on whether it is a C or C++ library. + To get a clue, + please have a look at existing test programs such as + sdl-test.c. +

    + +

    + At the very end of your *.mk file + you should build the test program in a generic way, + using strict compiler flags. + The last few lines of + sdl.mk + will give you a clue. +

    +
  12. + +
  13. +

    + You could also try to provide a $(PKG)_UPDATE section. + However, that requires some experience and "feeling" for it. + So it is perfectly okay if you leave a placeholder: +

    +
    define $(PKG)_UPDATE
    +    echo 'TODO: write update script for $(PKG).' >&2;
    +    echo $($(PKG)_VERSION)
    +endef
    +

    + We'll fill that in for you. + It's a funny exercise. +

    +
  14. + +
  15. +

    + Check that you don't have "dirty stuff" in your *.mk files, + such as TAB characters or trailing spaces at lines endings. Run: +

    +
    make cleanup-style
    +

    + to remove these. + Have a look at random *.mk files + to get a feeling for the coding style. +

    + +

    + The same holds for your test program. +

    + +

    + However, patch files should always appear + in the same coding style as the files they are patching. +

    + +

    + When patching sources with crlf line endings, the patch + file itself should also have the same eol style. Use the + convention of naming the file as *crlf.patch + to instruct git not to normalise the line endings (defined + in .gitattributes). +

    + +

    + Finally, in your $(PKG)_BUILD section, + please check that you use our portability variables: +

    + + + + + + + + + + + +
    bash $(SHELL)
    date $(DATE)
    install $(INSTALL)
    libtool $(LIBTOOL)
    libtoolize$(LIBTOOLIZE)
    make $(MAKE)
    patch $(PATCH)
    sed $(SED)
    sort $(SORT)
    wget $(WGET)
    +
  16. + +
  17. +

    + Check whether everything runs fine. + If you have some trouble, + don't hesitate to ask on the + mailing list, + providing your *.mk file so far. +

    +
  18. + +
  19. +

    + Issue a + pull request + to propose your final *.mk file to us. + If you have trouble with pull requests, + send your file to the mailing list instead. +

    +

    + Either way, + don't forget to tell us + if there are some pieces in your *.mk file + you feel unsure about. + We'll then have a specific look at those parts, + which avoids trouble for you and us in the future. +

    +
  20. +
+
+ +
+ + + + +

(contact via the + project mailing list)

+ +

+ 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. +

+
+ +
+ + +

Disclaimer - it's all code...

+ +

+ Modern legal systems are like any other large, complex, and evolving body + of code you're likely to encounter. +

+ +

+ They have their own language with quirky parsers, compilers, and + interpreters (though these tend to be human). Their issue trackers are + a backlog of court cases. They have bugs. They have traps for the + uninitiated that may potentially do more than waste your time. +

+ +

+ We currently limit ourselves to: +

+
--enable-languages='c,c++,objc,fortran'
+

+ so nothing mentioned here or on the mailing list should be taken as + legal advice. :-) +

+ +

Choosing the right compiler

+ +

+ The best starting point for any legal questions would be the +

+

+ FTF (Freedom Task Force of the FSFE (Free Software Foundation Europe)). +

+

+ They have been very helpful in the past, and maintain an + extensive network + of legal contacts, both within and outside Europe. +

+ +

Your local jurisdiction may be a signatory to various + international agreements, + so be sure to mention where you are in any correspondence (much like any + detailed bug report really). +

+ +

Additionally, you should also do some background reading from the + FSF (Free Software Foundation) + and + Wikipedia + to familiarise yourself with some of the potential issues (and experience + some context-switching overhead). +

+ +

Contributions

+ +

+ Contributions are always welcome! +

+ +

+ Ownership of all contributions (bug fixes, new packages, doc updates, etc.) + remain with the author. All we require is a real name (no l33t handles, + please), and that you release your work under + our licence. +

+ +

If you prefer not to be credited with a contribution, please notify + the committer. +

+ +

Package Licences

+ +

+ Each package is individually licensed under terms specified by the + authors of that package. Please see the respective source tarball + and/or project website for details. +

+ +

+ Packages that are + non-free + or + ambiguous + will be + removed + or + rejected. +

+ +

+ The definition of free must be one of: +

+ + +

+ Please contact the + mailing list + if you notice a package that doesn't meet these guidlines. +

+ + + +

+ In addition to the usual considerations (copyrights, patents, + trademarks, export regulations etc.), building + statically linked + libraries + for Windows + exposes some edge cases that you may not have encountered before. +

+ +

+ According to + freedom 0 and our + own licence, + you can use mxe in countless different + environments, each with it's own special legal considerations. The + configuration options of certain packages (e.g ffmpeg) allow the use of + non-free software and/or combinations that cause license violations. +

+ +

+ For these packages, we will provide sensible defaults aimed + at achieving the following goals: +

+
    +
  1. avoid causing inherent licensing issues with conflicting options
  2. +
  3. make the package as feature complete as possible
  4. +
+ +

+ Note that this does not prevent downstream violations, or affect any + further obligations a licence may impose on you. +

+ + + +

GNU Licenses

+

+ Review the + FAQ +

+ +

LGPL and Static Linking

+ +

+ Review the + Differences from the GPL + section of the Wikipedia article mentioned above. +

+ +

GPL and OpenSSL

+ +

+ See conflicting accounts from the + FSF + and the + OpenSSL project. +

+

+ A similar situation also exists for package fdk-aac. +

+
+ +
+

History

+ +
+ +
2015-05-04 – Retired the stable branch
+
+

+ The stable branch + was retired + as it + did more harm than good. + Everybody is using the master branch, + because it is always recent and well enough tested. + For historical reference, the last commit to the stable branch was + 0c6cc9c, + which was + fully merged into master + as usual. +

+ +

+ Added support for shared toolchains for over 50% of all the packages. +

+ +

+ Unfortunately, a number of factors have forced us to drop support + for MinGW 3 (i.e. "MinGW.org"), + in favor of the MinGW-w64 toolchain. This decision was made in a + large part because of the dropping of support for MinGW by + GLib and Qt5, + which arguably are two of the most important packages in MXE. + Other considerations have also been taken, like the lack + of maintainership in MinGW and potential legal + challenges that comes with using supplemental DirectX + headers in MinGW in order to support Qt4. Worse yet, having to + support the unsupported MinGW toolchain impedes adding or + updating packages, as shown in the pull + request of updating GLib. +

+ +

+ Please note that dropping support for MinGW DOES NOT + MEAN dropping support for the 32-bit architecture. MinGW-w64 + also supports 32-bit target through i686-w64-mingw32. +

+ +

+ To ease migration to the supported MinGW-w64 target, we have + finished porting all packages that were MinGW-only to at least + i686-w64-mingw32 (32-bit target of MinGW-w64). Hence your existing + commands should work out-of-the-box assuming the + MXE_TARGETS environment variable is set correctly. +

+
+ +
2013-07-27 – Release 2.23
+
+

+ The stable branch was updated + to the current development version after a thorough + testing phase. +

+ +

+ Current users are strongly encouraged to + start with a clean tree as the toolchain has been + updated and requires a full rebuild: +

+
git pull && make clean && make
+ +

+ Most packages were updated to their latest version. +

+ +

+ Many new packages are supported: + alure, apr-util, apr, armadillo, cegui, cfitsio, cminpack, + flann, gtkglarea, gtkimageview, harfbuzz, hdf4, hdf5, hunspell, + icu4c, itk, lensfun, levmar, libf2c, libftdi, libgda, libgdamm, + libglade, liblqr-1, libmodplug, librtmp, libzip, log4cxx, mdbtools, + ncurses, netcdf, netpbm, ocaml-cairo, ocaml-camlimages, ocaml-core, + ocaml-findlib, ocaml-flexdll, ocaml-lablgl, ocaml-lablgtk2, + ocaml-native, ocaml-xml-light, opencv, opus, opusfile, pcl, + picomodel, plib, plibc, poppler, portablexdr, portmidi, protobuf, + qdbm, qt5, qtactiveqt, qtbase, qtdeclarative, qtgraphicaleffects, + qtimageformats, qtjsbackend, qtmultimedia, qtquick1, qtquickcontrols, + qtscript, qtsensors, qtserialport, qtsvg, qttools, qttranslations, + qtxmlpatterns, qwt, sdl_gfx, sfml, sox, teem, twolame, vtk6, wavpack, + wget, winpthreads, xapian-core, yasm +

+ +

+ Added support for mingw-w64 based toolchains + targeting 32 & 64-bit architectures. +

+ +

+ With the addition of Qt5, there is no longer a prefixed version of + qmake, see the Qt section of the tutorial + for the new way to invoke qmake. +

+ +

+ FreeBSD is no longer fully supported. + Qt5, ocaml*, and 8 other packages are excluded from the build. +

+
+ +
2012-04-12 – Release 2.22
+
+

+ The release tarballs have been replaced with a stable branch + that conforms to the new branch concept: +

+ +
    +
  • + Any change of a build script goes into "master". +
  • +
  • + Any package upgrade goes into "master". +
  • +
  • + Any documentation upgrade that refers to a feature + not present in stable goes into "master". +
  • +
  • + Anything else that doesn't affect the build goes + into "stable". +
  • +
  • + Any non-critical improvement to the main Makefile + goes into "stable". +
  • +
  • + Any improvement in the package download URLs or + package version recognition goes into "stable". +
  • +
  • + When in doubt, "master" is used rather than "stable". +
  • +
  • + Every change to the "stable" branch + will be merged into "master". +
  • +
  • + After a successful testing phase, + the "stable" branch + will be fast-forwarded to "master". +
  • +
+ +

+ The project has been + renamed + from + mingw-cross-env (MinGW cross compiling environment) + to + MXE (M cross environment). +

+ +

+ Most packages were updated to their latest version. +

+ +

+ New packages are supported: + agg, cgal, eigen, file, gta, json-c, libgnurx, libharu, + libircclient, libssh2, libxml++, llvm, lzo, mpfr, nettle, + opencsg, qjson, qwtplot3d, vtk, and wt. +

+
+ +
2011-06-07 – Release 2.21
+
+

+ Download | + Changelog +

+ +

+ Minor bugfixes in several packages. +

+ +

+ Almost all packages are updated to their latest version. +

+ +

+ Packages gtkmm and gtksourceviewmm have been renamed to gtkmm2 and gtksourceviewmm2. +

+ +

+ New packages are supported: + libass, poco, and t4k_common. +

+
+ +
2011-04-05 – Release 2.20
+
+

+ Download | + Changelog +

+ +

+ This release fixes a download error caused by the pixman project + (a sudden change of their URL scheme without proper redirects). + That sort of thing should never happen! +

+
+ +
2011-03-19 – Release 2.19
+
+

+ Download | + Changelog +

+ +

+ The download mechanisms are improved. +

+ +

+ A CMake toolchain file is provided + to simplify cross-compiling projects which use CMake. +

+ +

+ Support for Debian/Lenny is dropped. +

+ +

+ Package gtk is renamed to gtk2. +

+ +

+ Almost all packages are updated to their latest version. +

+ +

+ New packages are supported: + dbus, graphicsmagick, libical, liboauth, physfs, and vigra. +

+ +

+ Note for boost::filesystem users: + Version 3 is a major revision + and now the default in 1.46. +

+
+ +
2010-12-15 – Release 2.18
+
+

+ Download | + Changelog +

+ +

+ This release fixes a checksum error caused by the atkmm project + (a sudden change of their current source tarball). + That sort of thing should never happen! +

+
+ +
2010-12-11 – Release 2.17
+
+

+ Download | + Changelog +

+ +

+ This release provides some improvements of the build system + such as an automatic check for most of the requirements. +

+ +

+ All packages are updated to their latest version. +

+ +

+ New packages are supported: + bfd, blas, cblas, dcmtk, ftgl, lapack, lcms1, + mingw-utils, mxml, suitesparse and tinyxml. +

+
+ +
2010-10-27 – Release 2.16
+
+

+ Download | + Changelog +

+ +

+ This release provides lots of improvements to + the build system as well as the documentation. +

+ +

+ Support for OpenSolaris is dropped. +

+ +

+ Almost all packages are updated to their latest version. +

+ +

+ Many new packages are supported: + atkmm, cairomm, cunit, faac, faad2, ffmpeg, gdk-pixbuf, glibmm, + gtkglextmm, gtkmm, gtksourceview, gtksourceviewmm, imagemagick, + lame, libiberty, libsigc++, libvpx, matio, openal, opencore-amr, + pangomm, pfstools, plotmm, sdl_sound and x264. +

+
+ +
2010-06-16 – Release 2.15
+
+

+ Download | + Changelog +

+ +

+ This release fixes download errors caused by the Qt project + (a sudden change of their current source tarball). +

+ +

+ Almost all packages are updated to their latest version. +

+
+ +
2010-06-08 – Release 2.14
+
+

+ Download | + Changelog +

+ +

+ This release fixes download errors caused by the MinGW project + (a sudden change of their URL scheme without proper redirects). + That sort of thing should never happen! +

+ +

+ Almost all packages are updated to their latest version. +

+ +

+ New packages are supported: + libarchive, libgee and xvidcore. +

+
+ +
2010-05-31 – Release 2.13
+
+

+ Download | + Changelog +

+ +

+ This release switches back from TDM to the official GCC, + thus supporting the current GCC 4.5. +

+ +

+ The set of DirectX headers is improved and more complete. +

+ +

+ The deadlock issues with Pthreads-w32 are fixed. +

+ +

+ A static build of GDB is provided, + i.e. a standalone "gdb.exe" + that doesn't require any extra DLLs. +

+ +

+ More packages are backed by test programs. +

+ +

+ Many "sed hacks" are replaced by proper portability patches. +

+ +

+ Almost all packages are updated to their latest version. +

+ +

+ Many new packages are supported: + fribidi, gc, gdb, gmp, gsl, gst-plugins-base, gst-plugins-good, + gstreamer, gtkglext, guile, libcroco, libffi, liboil, libpaper, + libshout, libunistring and xine-lib. +

+
+ +
2010-02-21 – Release 2.12
+
+

+ Download | + Changelog +

+ +

+ This release fixes some minor build issues, + and contains a first small set of test programs + to check the package builds. +

+ +

+ The build rules are simplified + by calling generators like Autotools and Flex, + instead of patching the generated files. +

+ +

+ Almost all packages are updated to their latest version. +

+ +

+ Many new packages are supported: + aubio, devil, directx, exiv2, fftw, freeimage, gsoap, + id3lib, liblo, libpano13, librsvg, libsamplerate, + muparser, openscenegraph, portaudio and sdl_pango. +

+
+ +
2010-02-20 – Release 2.11
+
+

+ Download | + Changelog +

+ +

+ This release contains a packaging bug. + Please use release 2.12 instead. +

+
+ +
2009-12-23 – Release 2.10
+
+

+ Download | + Changelog +

+ +

+ This release adds support for many new packages: + flac, libmad, libsndfile, sdl_net, speex, postgresql, + freetds, openssl, plotutils, taglib, lcms, freeglut, + xerces and zziplib. +

+ +

+ Almost all packages are updated to their latest version. +

+ +

+ In addition to the libraries + some command line tools such as psql.exe are built, too. +

+ +

+ The placements of logfiles, as well as many other build details, have been improved. +

+
+ +
2009-10-24 – Release 2.9
+
+

+ Download | + Changelog +

+ +

+ This release adds support for Qt, VMime and libmng. +

+ +

+ The target triplet is updated to i686-pc-mingw32. +

+ +

+ OpenMP support is enabled in GCC. +

+ +

+ Almost all packages are updated to their latest version. +

+
+ +
2009-09-11 – Release 2.8
+
+

+ Download | + Changelog +

+ +

+ This release comes with a better look & feel + by providing a highlevel overview of the build process. +

+ +

+ The detailed build messages are stored into + separate log files for each package, + so parallel builds don't intermix them anymore. +

+ +

+ The download URLs of SourceForge packages + are adjusted to ensure that + the selected SourceForge mirror is really used + and not circumvalented via HTTP redirects to other mirrors. +

+ +

+ Almost all packages are updated to their latest version. +

+ +

+ The whole mingw-cross-env project has moved to + Savannah. + So all URIs have changed, + but the old URIs + redirect to the new locations seamlessly. +

+ +

+ Everyone is invited to join the freshly created + project mailing list. +

+
+ +
2009-08-11 – Release 2.7
+
+

+ Download | + Changelog +

+ +

+ This release + provides an improved version recognition + for SourceForge packages. + SourceForge changed their page layout + in a way that makes it much harder + to identify the current version of a package. +

+ +

+ Additionally, + almost all packages are updated to their latest version. +

+
+ +
2009-06-19 – Release 2.6
+
+

+ Download | + Changelog +

+ +

+ This release contains some portability fixes + which allow it to run on a wider range of systems + such as Frugalware. +

+ +

+ The documentation and website are completely revised. +

+ +

+ New packages such as + CppUnit, libUsb, NSIS, Popt, SQLite and Theora + are supported. +

+ +

+ Almost all packages are updated to their latest version. +

+ +

+ A new command "make download" is implemented. +

+
+ +
2009-04-06 – Release 2.5
+
+

+ Download | + Changelog +

+ +

+ This release fixes a download error caused by the MinGW project. + They suddenly changed the names of their source tarballs. + That sort of thing should never happen! +

+ +

+ This release also contains some bugfixes + which allow it to run on a wider range of systems. +

+ +

+ All downloaded files are now + verified by their SHA-1 checksums. +

+ +

+ New versions of various packages are supported. +

+
+ +
2009-03-08 – Release 2.4
+
+

+ Download | + Changelog +

+ +

+ This release provides many new libraries such as + wxWidgets, GTK+ and OpenEXR. +

+ +

+ In addition, new versions of various packages + are supported. +

+
+ +
2009-02-09 – Release 2.3
+
+

+ Download | + Changelog +

+ +

+ This release fixes some serious build problems on FreeBSD and MacOS-X. +

+ +

+ The Makefile has a new target "clean-pkg" + and allows to be called from a separate build directory + via "make -f .../Makefile". +

+ +

+ Some new versions of the packages are supported, + especially GCC-4.3 by switching from MinGW GCC to + TDM-GCC. +

+
+ +
2009-01-31 – Release 2.2
+
+

+ Download | + Changelog +

+ +

+ This release fixes some minor build problems. +

+ +

+ It also supports some new packages and + some newer versions of the already supported packages. +

+ +

+ Parallelization is now disabled by default. +

+
+ +
2008-12-13 – Release 2.1
+
+

+ Download | + Changelog +

+ +

+ This release fixes a download error caused by the GDAL project. + They suddenly changed their download URLs. + That sort of thing should never happen! +

+ +

+ In addition, some newer versions of various packages are supported. +

+ +

+ There is also a small compatibility fix for OS X. +

+
+ +
2008-11-10 – Release 2.0
+
+

+ Download | + Changelog +

+ +

+ The shell script has been rewritten as Makefile + and supports partial builds and parallel builds. +

+ +

+ As usual, + this release also supports some new packages and + some newer versions of the already supported packages. +

+
+ +
2008-01-11 – Release 1.4
+
+

+ Download | + Changelog +

+ +

+ This release now includes a tutorial by Hans Bezemer + and has improved compile options of FLTK. + As usual, it supports some newer versions of the libraries. +

+ +

+ At the request of its author, + libowfat is no longer supported from this release on. +

+ +

+ The script now uses a specific SourceForge mirror + instead of randomly chosen ones, + because the download phase + often stumbled on some very slow mirrors. +

+
+ +
2007-12-23 – Release 1.3
+
+

+ Download | + Changelog +

+ +

+ A sudden change in the download URLs of GEOS + made the automatic download fail. + Such changes should never happen! + But it happened, + and this quick release is an attempt to limit the damage. +

+ +

+ This release also supports some newer versions of the libraries + including support for fontconfig-2.5.0. +

+
+ +
2007-12-13 – Release 1.2
+
+

+ Download | + Changelog +

+ +

+ This release is a switch from gcc-3 to gcc-4. + It also supports a new library and + some newer versions of the already supported libraries. +

+
+ +
2007-07-24 – Release 1.1
+
+

+ Download | + Changelog +

+ +

+ This release is the result of the public attention the release 1.0 got. + It contains many improvements suggested by its first users, + and adds support for many new libraries. +

+ +

+ Thanks to Rocco Rutte who contributed many code snippets. +

+
+ +
2007-06-19 – Release 1.0
+
+

+ Download | + Changelog +

+ +

+ This first release has been created in a 7-day-sprint. +

+
+ +
2007-06-12 – Project start
+
+
+ +
+
+ +
+

See also

+ +

This project

+ + + +

Related articles

+ + + +

Related projects

+ + +
+ +
+

Projects which use MXE (alphabetical order)

+ + +
+ + + diff --git a/docs/packages.json b/docs/packages.json new file mode 100644 index 00000000..415ddd1a --- /dev/null +++ b/docs/packages.json @@ -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 Eddie’s 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 +} diff --git a/github.mk b/github.mk new file mode 100644 index 00000000..48e4eb6f --- /dev/null +++ b/github.mk @@ -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 = //archive/.tar.gz +# dir = - +# if starts with a single `v`, it is removed from dir +# +# Tarball: +# url = //tarball//output-file.tar.gz +# dir = -- +# +# 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: +# /./version> + +# 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) diff --git a/index.html b/index.html deleted file mode 100644 index c608aba2..00000000 --- a/index.html +++ /dev/null @@ -1,4235 +0,0 @@ - - - - - - - MXE (M cross environment) - - - - - - - - -
-

Introduction

- -

- MXE (M cross environment) is a Makefile that - compiles a cross compiler and cross compiles - many free libraries such as SDL and Qt. Thus, - it provides a nice cross compiling environment - for various target platforms, which -

- -
    -
  • - is designed to - run on any Unix system -
  • -
  • - is easy to adapt and to extend -
  • -
  • - builds - many free libraries - in addition to the cross compiler -
  • -
  • - can also - build just a subset - of the packages, - and automatically builds their dependencies -
  • -
  • - downloads all needed packages - and verifies them by their checksums -
  • -
  • - is able to update the version numbers of all packages automatically -
  • -
  • - directly uses source packages, - thus ensuring the whole build mechanism is transparent -
  • -
  • - allows inter-package and intra-package - parallel builds - whenever possible -
  • -
  • - integrates well with autotools, - cmake, qmake, - and hand-written makefiles. -
  • -
  • - has been in continuous development since 2007 - and is used by several projects -
  • -
- -

Supported Toolchains

- - - - - - - - - - - - - - - - - - - - - - -
RuntimeHost TripletPackages
StaticShared*
MinGW-w64i686-w64-mingw3299% (339/341)62% (211/341)
x86_64-w64-mingw3291% (311/341)61% (209/341)
-

- These numbers were last updated on October 13, 2014. You can see the - current status by executing make build-matrix.html in the - MXE directory. -

-

- * Shared support in MXE was just added in early February, 2014. These - numbers are expected to rise significantly. -

- -
- -
-

Screenshots

- -

- Cross compiling - 4tH: -

- - 4th-compile - - -

- and running it: -

- - 4th-run - -
- -
-

Tutorial

- -

Step 1: Requirements and Download

- -

- First, you should ensure that your system meets - MXE's - requirements. - You will almost certainly have to install some stuff. -

- -

- When everything is fine, download the - current version: -

-
git clone https://github.com/mxe/mxe.git
- -

- If you don't mind installing it in your home directory, - just skip the following step and go straight to step 3. -

- -

- MXE builds and installs everything under the same - top-level directory and is not relocatable after - the first packages are built. -

- -

- Due to limitations of GNU Make, the path of MXE is not allowed - to contain any whitespace characters. -

- -

Step 2: System-wide Installation (optional)

- -

- Now you should save any previous installation - of the MXE. - Assuming you've installed it under - /opt/mxe (any other directory will do as well), - you should execute the following commands: -

-
su
-mv /opt/mxe /opt/mxe.old
-exit
- -

- Then you need to transfer the entire directory to its definitive location. - We will assume again you use /opt/mxe, - but feel free to use any other directory if you like. -

-
su
-mv mxe /opt/mxe
-exit
- -

- We're almost done. - Just change to your newly created directory and get going: -

-
cd /opt/mxe
- -

Step 3: Build MXE

- -

- Enter the directory where you've downloaded MXE. - Now it depends on what you actually want – or need. -

- -

- If you choose to enter: -

-
make
-

- you're in for a long wait, - because it compiles - a lot of packages. - On the other hand it doesn't require any intervention, - so you're free to do whatever you like - – like watch a movie or go for a night on the town. - When it's done you'll find that you've installed - a very capable Win32 cross compiler onto your system. -

- -

- If you only need the most basic tools you can also use: -

-
make gcc
-

- and add any additional packages you need later on. - You can also supply a host of packages on the - command line, - e.g.: -

-
make gtk lua libidn
-

- Targets can also be specified on the command line. - By default, only i686-w64-mingw32.static is built, but you can - build your toolchain(s) of choice with: -

-
make MXE_TARGETS='x86_64-w64-mingw32.static i686-w64-mingw32.static'
-

- or by adjusting the MXE_TARGETS variable - in settings.mk. -

-

- You'll always end up with a consistent cross compiling environment. -

- -

- If you have trouble here, please feel free to - contact the mxe team through the - issue tracker or - mailing list. -

- -

- After you're done it just needs a little post-installation. -

- -

Step 4: Environment Variables

- -

- Edit your .bashrc script in order to change $PATH: -

-
export PATH=/where MXE is installed/usr/bin:$PATH
- -

- You may be tempted to also add $(TARGET)/bin - to your path. You never want to do this, - the executables and scripts in there will cause conflicts - with your native toolchain. -

- -

- In case you are using custom $PKG_CONFIG_PATH entries, - you can add separate entries for cross builds: -

-
export PKG_CONFIG_PATH="entries for native builds"
-
export PKG_CONFIG_PATH_i686_w64_mingw32_static="entries for MXE builds"
-

- Remember to use i686-w64-mingw32.static-pkg-config - instead of pkg-config for cross builds. - The Autotools do that automatically for you. -

- -

- Note that any other compiler related environment variables - (like $CC, $LDFLAGS, etc.) - may spoil your compiling pleasure, - so be sure to delete or disable those. -

-

- For the most isolated and repeatable environment, - use a white-list approach: -

-
unset `env | \
-    grep -vi '^EDITOR=\|^HOME=\|^LANG=\|MXE\|^PATH=' | \
-    grep -vi 'PKG_CONFIG\|PROXY\|^PS1=\|^TERM=' | \
-    cut -d '=' -f1 | tr '\n' ' '`
- -

- Congratulations! - You're ready to cross compile anything you like. -

- -

Step 5a: Cross compile your Project (Autotools)

- -

- If you use the - Autotools, - all you have to do is: -

-
./configure --host=i686-w64-mingw32.static
-make
- -

- If you build a library, you might also want to enforce a static build: -

-
./configure --host=i686-w64-mingw32.static --enable-static --disable-shared
-make
- -

- Don't worry about a warning like this: -

-
configure: WARNING: If you wanted to set the --build type, don't use --host.
-If a cross compiler is detected then cross compile mode will be used.
-

- Everything will be just fine. -

- -

Step 5b: Cross compile your Project (CMake)

- -

- If you have a - CMake project, - you can use the provided toolchain file: -

-
cmake ... -DCMAKE_TOOLCHAIN_FILE=/where MXE is installed/usr/i686-w64-mingw32.static/share/cmake/mxe-conf.cmake
- -

Step 5c: Cross compile your Project (Qt)

- -

- If you have a - Qt application, - all you have to do is: -

-
/where MXE is installed/usr/i686-w64-mingw32.static/qt/bin/qmake
-make
-

- Note that Qt 4 is in the "qt" subdirectory. Qt 5 is in the "qt5" subdirectory - and its qmake can be invoked similarly. -

-

- If you are using Qt plugins - such as the svg or ico image handlers, - you should also have a look at the - Qt documentation about static plugins. -

-

- Note the sql drivers (-qt-sql-*) - and the image handlers for jpeg, tiff, gif and mng - are built-in, not plugins. -

- -

Step 5d: Cross compile your Project (Makefile)

- -

- If you have a handwritten Makefile, - you probably will have to make a few adjustments to it: -

-
CC=$(CROSS)gcc
-LD=$(CROSS)ld
-AR=$(CROSS)ar
-PKG_CONFIG=$(CROSS)pkg-config
-

- You may have to add a few others, depending on your project. -

- -

- Then, all you have to do is: -

-
make CROSS=i686-w64-mingw32.static-
-

- That's it! -

- -

Step 5e: Cross compile your Project (OSG)

- -

- Using static OpenSceneGraph libraries requires a few changes to your source. - The graphics subsystem and all plugins required by your application must be - referenced explicitly. Use a code block like the following: -

-
#ifdef OSG_LIBRARY_STATIC
-USE_GRAPHICSWINDOW()
-USE_OSGPLUGIN(<plugin1>)
-USE_OSGPLUGIN(<plugin2>)
-...
-#endif
-

- Look at examples/osgstaticviewer/osgstaticviewer.cpp in the - OpenSceneGraph source distribution for an example. This example can be - compiled with the following command: -

-
i686-w64-mingw32.static-g++ \
-    -o osgstaticviewer.exe examples/osgstaticviewer/osgstaticviewer.cpp \
-    `i686-w64-mingw32.static-pkg-config --cflags openscenegraph-osgViewer openscenegraph-osgPlugins` \
-    `i686-w64-mingw32.static-pkg-config --libs openscenegraph-osgViewer openscenegraph-osgPlugins`
-

- The i686-w64-mingw32.static-pkg-config command from MXE will - automatically add -DOSG_LIBRARY_STATIC to your compiler flags. -

- -

Further Steps

- -

- If you need further assistance, - feel free to join the - mailing list - where you'll get in touch with - the MXE developers - and other users. -

-
- -
-
-
-
-

Download

- -

- To obtain the current version, run: -

- -
git clone https://github.com/mxe/mxe.git
- -

- To retrieve updates, run: -

- -
git pull
- -

- You can also browse the - web repository. -

- -

- In addition, - feel free to join the - mailing list - and to propose new packages. -

-
- -
-

Requirements

- -

- MXE requires a recent Unix system where - all components as stated in the table below - are installed. It also needs roughly 2 GiB of - RAM to link gcc and at least 700 MB of disk - space per target (counted with only gcc - built). -

-

- Detailed instructions are available for: -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Autoconf≥ 2.67
Automake≥ 1.11.3
Bash
Bison
Bzip2
CMake≥ 2.8.0
Flex≥ 2.5.31
GCC (gcc, g++)
Git≥ 1.7
GNU Coreutils
GNU Gettext
GNU gperf
GNU Make≥ 3.81
GNU Sed
Intltool≥ 0.40
LibC for 32-bit
libffi≥ 3.0.0
Libtool≥ 2.2
OpenSSL-dev
p7zip (7-Zip)
Patch
Perl
Perl XML::Parser
Pkg-config≥ 0.16
Python
Ruby
SCons≥ 0.98
UnZip
Wget
XZ Utils
gdk-pixbuf
- -

Debian and derivatives

- - -
apt-get install \
-    autoconf automake autopoint bash bison bzip2 cmake flex \
-    gettext git g++ gperf intltool libffi-dev libgdk-pixbuf2.0-dev \
-    libtool libltdl-dev libssl-dev libxml-parser-perl make openssl \
-    p7zip-full patch perl pkg-config python ruby scons sed \
-    unzip wget xz-utils
- -

- On 64-bit Debian, install also: -

-
apt-get install g++-multilib libc6-dev-i386
- -

- On Debian Jessie (8) or Ubuntu Utopic (14.10) or later, - install also: -

-
apt-get install libtool-bin
- -

- Only the latest Debian stable series is supported. -

- -

Fedora

- - -
yum install \
-    autoconf automake bash bison bzip2 cmake flex gcc-c++ \
-    gdk-pixbuf-devel gettext git gperf intltool make sed libffi-devel \
-    libtool openssl-devel p7zip patch perl pkgconfig \
-    python ruby scons unzip wget xz
- -

- On 64-bit Fedora, - there are issues without a 32-bit compiler. -

- -

FreeBSD

- - -
pkg_add -r \
-    automake autoconf bash bison cmake coreutils flex \
-    gdk-pixbuf2 gettext git glib20 gmake gperf gsed intltool libffi \
-    libtool openssl p5-XML-Parser p7zip patch perl \
-    pkgconf python ruby scons unzip wget
- -

- Ensure that /usr/local/bin precedes /usr/bin in your $PATH: -

-

- For C style shells, edit .cshrc -

-
setenv PATH /usr/local/bin:$PATH
-

- For Bourne shells, edit .profile -

-
export PATH = /usr/local/bin:$PATH
-

- On 64-bit FreeBSD, - there are issues without a 32-bit compiler. -

-

- N.B. FreeBSD is no longer fully supported -

-

- to build the remainder of MXE, run: -

-
gmake EXCLUDE_PKGS='gtksourceviewmm2 ocaml% openexr pcl qtbase'
-

- to see a list of all dependent downstream packages that - will be excluded, run: -

-
gmake show-downstream-deps-'gtksourceviewmm2 ocaml% openexr \
-                            pcl qtbase'
- -

Frugalware

- - -
pacman-g2 -S \
-    autoconf automake bash bzip2 bison cmake flex gcc \
-    gdk-pixbuf2 gettext git gperf intltool make sed libffi libtool \
-    openssl patch perl perl-xml-parser pkgconfig python \
-    ruby scons unzip wget xz xz-lzma
- -

- On 64-bit Frugalware, - there are issues without a 32-bit compiler. -

- -

Gentoo

- - -
emerge \
-    sys-devel/autoconf sys-devel/automake app-shells/bash \
-    sys-devel/bison app-arch/bzip2 dev-util/cmake \
-    sys-devel/flex sys-devel/gcc sys-devel/gettext \
-    dev-vcs/git dev-util/gperf dev-util/intltool \
-    sys-devel/make sys-apps/sed dev-libs/libffi \
-    sys-devel/libtool dev-libs/openssl app-arch/p7zip \
-    sys-devel/patch dev-lang/perl dev-perl/XML-Parser \
-    dev-util/pkgconfig dev-lang/python dev-lang/ruby \
-    dev-util/scons app-arch/unzip net-misc/wget \
-    app-arch/xz-utils x11-libs/gdk-pixbuf
- -

Mac OS X

- -

- Install - Xcode 5 -

-

Step 1

-
Method 1 - MacPorts
-

- Install MacPorts, - then run: -

- -
sudo port install \
-    gdk-pixbuf2 glib2 intltool p5-xml-parser p7zip gpatch scons wget xz
-
Method 2 - Rudix
-

- Install Rudix you can make it with following command -

-
curl -s https://raw.githubusercontent.com/rudix-mac/rpm/2014.6/rudix.py \
-    | sudo python - install rudix
-

- then run: -

-
sudo rudix install glib pkg-config scons wget xz
- Note: gdk-pixbuf2 is not installed in method 2, - so you can not build gtk3. -

Step 2

-

- After installing pre-requirement run from within the mxe directory: -

-
make build-requirements
-

- You may be prompted to install a java runtime - - this is not required. -

-

- Mac OS X versions ≤ 10.7 are no longer supported. -

- -

openSUSE

- - -
zypper install -R \
-    autoconf automake bash bison bzip2 cmake flex gcc-c++ \
-    gdk-pixbuf-devel gettext-tools git gperf intltool libffi-devel libtool \
-    make openssl libopenssl-devel p7zip patch perl \
-    perl-XML-Parser pkg-config python ruby scons sed unzip \
-    wget xz
- -

- On 64-bit openSUSE, install also: -

-
zypper install -R \
-    gcc-32bit glibc-devel-32bit libgcc46-32bit \
-    libgomp46-32bit libstdc++46-devel-32bit
- -

Issues without a 32-bit compiler

- -

- Certain packages contain native tools that are - currently 32-bit only. In order to build these on a - 64-bit system, multi-lib support must be enabled in the - compiler toolchain. However, not all operating systems - support this. -

-

- To build the remainder of MXE, specify the affected - packages to exclude: -

-
make EXCLUDE_PKGS='ocaml%'
-
- -
-

Usage

- -

- All build commands also download the packages if necessary. -

-

- In a BSD userland, substitute "make" with "gmake" - as all commands are based on - GNU Make. -

-
- -
make
- -
- build all packages, - non-parallel -
- -
make gcc
- -
- build a minimal useful set of packages, - i.e. the cross compilers - and the most basic packages, - non-parallel -
- -
make foo bar
- -
- build packages "foo", "bar" and their dependencies, - non-parallel -
- -
- the package list can also be set in - settings.mk -
LOCAL_PKG_LIST := foo bar
-.DEFAULT local-pkg-list:
-local-pkg-list: $(LOCAL_PKG_LIST)
-
-
- so a call to make will only build those packages (and their - dependencies, of course) -
- -
make foo bar --touch
- -
- mark packages "foo" and "bar" as up-to-date after - a trivial change in one of their dependencies - (short option "-t") -
- -
make foo bar --jobs=4 JOBS=2
- -
- build packages "foo", "bar" and their dependencies, - where up to 4 packages are built in parallel - (short option "-j 4"), - each with up to 2 compiler processes running in parallel -
-
- the JOBS variable can also be defined in - settings.mk and defaults to the number - of CPUs up to a max of 6 to prevent runaway system - load with diminishing returns - see the - GNU Make manual - for more details on parallel execution -
- -
make --jobs=4 --keep-going
- -
- build all packages with 4 inter-package parallel - jobs and continue as much as possible after an error - (short option "-j 4 -k") -
- -
make EXCLUDE_PKGS='foo bar'
- -
- build all packages excluding foo, bar, and all downstream - packages that depend on them - mostly used when there are - known issues -
- -
make check-requirements
- -
- check most of the - requirements - if necessary - – executed automatically - before building packages -
- -
make download
- -
- download all packages, - non-parallel, - such that subsequent builds work without internet access -
- -
make download-foo download-bar
- -
- download packages "foo", "bar" and their dependencies, - non-parallel -
- -
make download-foo download-bar -j 4
- -
- download packages "foo", "bar" and their dependencies, - where up to 4 packages are downloaded in parallel -
- -
make download-only-foo download-only-bar
- -
- download packages "foo", "bar", without their dependencies, - non-parallel -
- -
make clean
- -
- remove all package builds - – use with caution! -
- -
make clean-junk
- -
- remove all unused files, including unused package - files, temporary folders, and logs -
- -
make clean-pkg
- -
- remove all unused package files, - handy after a successful update -
- -
make show-deps-foo
- -
- print a list of upstream dependencies - and downstream dependents -
- -
make show-downstream-deps-foo
- -
- print a list of downstream dependents - suitable for usage in shell scripts -
- -
make show-upstream-deps-foo
- -
- print a list of upstream dependencies - suitable for usage in shell scripts -
- -
make build-matrix.html
- -
- generate a report of what packages are - supported on what targets to build-matrix.html -
- -
make update
- -
- for internal use only! - – - update the version numbers of all packages, - download the new versions and note their checksums -
- -
make update UPDATE_DRYRUN=true
- -
- for internal use only! - – - show list of update candidates without downloading -
- -
make update-package-foo
- -
- for internal use only! - – - update the version numbers of package foo, - download the new version and note its checksum -
- -
make update-checksum-foo
- -
- for internal use only! - – - download package foo and update its checksum -
- -
make cleanup-style
- -
- for internal use only! - – - cleanup coding style -
- -
-
- -
-

List of Packages

- -

- See something missing? Feel free to create a new package. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
a52deca52dec (aka. liba52)
aggAnti-Grain Geometry
alurealure
aprAPR
apr-utilAPR-util
armadilloArmadillo C++ linear algebra library
aspellAspell
assimpAssimp Open Asset Import Library
atkATK
atkmmATKmm
aubioaubio
autoconfautoconf
automakeautomake
dbOracle Berkeley DB
bfdBinary File Descriptor library
binutilsGNU Binutils
bisonbison
blasblas
boostBoost C++ Library
box2dBox2D
bulletBullet physics, version 2
bzip2bzip2
cairocairo
cairommcairomm
cblascblas
ccfitsCCfits
ceguiCrazy Eddie’s GUI System (CEGUI)
cfitsiocfitsio
cgalcgal
checkcheck
chipmunkChipmunk Physics
chromaprintChromaprint
cimgCImg Library
cmakecmake
cminpackcminpack
coreutilsGNU Core Utilities
cppunitCppUnit
crystalhdBroadcom Crystal HD Headers
cunitcunit
curlcURL
dbusdbus
dcmtkDCMTK
devilDevIL
dlfcn-win32POSIX dlfcn wrapper for Windows
eigeneigen
exiv2Exiv2
expatExpat XML Parser
faad2faad2
fdk-aacFDK-AAC
ffmpegffmpeg
fftwfftw
filefile
flacFLAC
flannFLANN
flexflex
fltkFLTK
fontconfigfontconfig
freeglutfreeglut
freeimageFreeImage
freetdsFreeTDS
freetypefreetype
freetype-bootstrapfreetype (without harfbuzz)
fribidiFriBidi
ftglftgl
gcgc
gccGCC
gdGD (without support for xpm)
gdalGDAL
gdbgdb
gdk-pixbufGDK-pixbuf
gendefgendef
geosGEOS
gettextgettext
giflibgiflib
glewGLEW
glfw2GLFW 2.x
glfw3GLFW 3.x
glibGLib
glibmmGLibmm
gmpGMP
gnutlsGnuTLS
gperfGNU gperf
graphicsmagickGraphicsMagick
gslGSL
gsoapgSOAP
gst-plugins-basegst-plugins-base
gst-plugins-goodgst-plugins-good
gstreamergstreamer
gtagta
gtk2GTK+
gtk3GTK+
gtkglareaGtkGLArea
gtkglextGtkGLExt
gtkglextmmGtkGLExtmm
gtkimageviewGtkImageView
gtkmm2GTKMM
gtkmm3GTKMM
gtksourceviewGTKSourceView
gtksourceviewmm2GtkSourceViewmm
guileGNU Guile
harfbuzzHarfBuzz
hdf4HDF4
hdf5HDF5
hunspellHunspell
icu4cICU4C
id3libid3lib
ilmbaseIlmBase
imagemagickImageMagick
intltoolIntltool
islInteger Set Library
itkInsight Segmentation and Registration Toolkit (ITK)
jackJACK Audio Connection Kit
janssonJansson
jasperJasPer
jpegjpeg
json-cjson-c
json_spiritjson_spirit
jsoncppjsoncpp
lamelame
lapacklapack
lcmslcms
lcms1lcms1
lensfunlensfun
levmarlevmar
libaacslibaacs
libarchiveLibarchive
libasslibass
libbluraylibbluray
libbs2bBauer Stereophonic-to-Binaural library
libcacalibcaca
libcdioLibcdio
libcdio-paranoiaLibcdio-paranoia
libcomm14cuxlibcomm14cux
libcrocoLibcroco
libdcalibdca (formerly libdts)
libdnetlibdnet
libdvbpsilibdvbpsi
libdvdcsslibdvdcss
libdvdnavlibdvdnav
libdvdreadlibdvdread
libepoxylibepoxy
libeventlibevent
libf2clibf2c
libffilibffi
libftdiLibFTDI
libftdi1LibFTDI1
libgcryptlibgcrypt
libgdalibgda
libgdammlibgdamm
libgeelibgee
libgeotiffGeoTiff
libgit2libgit2
libgladeglade
libgnurxlibgnurx
libgpg_errorlibgpg-error
libgsaslLibgsasl
libgsflibgsf
libharulibharu
libibertylibiberty
libicallibical
libiconvlibiconv
libidnLibidn
libircclientlibircclient
libjpeg-turbolibjpeg-turbo
liblaxjsonliblaxjson
libloliblo
liblqr-1liblqr-1
libltdlGNU Libtool Library (libltdl)
libmadlibmad
libmicrohttpdGNU Libmicrohttpd
libmikmodlibMikMod
libmnglibmng
libmodpluglibmodplug
libmpcdeclibmpcdec
libmysqlclientlibmysqlclient
libntlmLibntlm
liboauthliboauth
libodbc++libodbc++
liboilliboil
libpano13libpano13
libpaperlibpaper
libplistlibplist
libpnglibpng
librsvglibrsvg
librtmplibrtmp
libsampleratelibsamplerate
libshoutlibshout
libsigc++libsigc++
libsndfilelibsndfile
libssh2libssh2
libsvmlibsvm
libtoolGNU Libtool
libtorrent-rasterbarlibtorrent-rasterbar
libunistringlibunistring
libusbLibUsb
libusb1LibUsb-1.0
libvpxvpx
libwebplibwebp
libwebsocketslibwebsockets
libxml++libxml2
libxml2libxml2
libxsltlibxslt
libziplibzip
llvmllvm
log4cxxlog4cxx
luaLua
luabindLuabind
luajitLuaJIT
lzmaLZMA SDK
lzolzo
m4GNU M4
makeGNU Make
matiomatio
mdbtoolsmdbtools
minizipminizip
mingw-w64MinGW-w64 Runtime
mman-win32MMA-Win32
mpcGNU MPC
mpfrmpfr
mpg123mpg123
muparsermuParser
mxmlMini-XML
ncursesNcurses
netcdfNetCDF
netpbmNetpbm
nettlenettle
nloptNLopt
nsisNSIS
ocaml-cairocairo-ocaml
ocaml-camlimagescamlimages
ocaml-coreocaml
ocaml-findlibfindlib
ocaml-flexdllflexdll
ocaml-lablgllablgl
ocaml-lablgtk2lablgtk2
ocaml-nativeocaml
ocaml-xml-lightxml-light
oceOpen CASCADE Community Edition
oggOGG
oldold
openalopenal
openblasOpenBLAS
opencore-amropencore-amr
opencsgopencsg
opencvOpenCV
openexrOpenEXR
openjpegOpenJPEG
openmp-validationOpenMP Validation Suite
openscenegraphOpenSceneGraph
opensslopenssl
opusopus
opusfileopusfile
ossimOSSIM
pangoPango
pangommPangomm
pclPCL (Point Cloud Library)
pcrePCRE
pdcursesPDcurses
pdflib_litePDFlib Lite
pfstoolspfstools
physfsphysfs
picomodelpicomodel
pirePIRE
pixmanpixman
pkgconfpkgconf
plibPlib
plibcPlibc
plotmmPlotMM
plotutilsplotutils
pocoPOCO C++ Libraries
polarsslPolar SSL Library
popplerpoppler
poptpopt
portablexdrPortableXDR
portaudioportaudio
portmidiportmidi
postgresqlPostgreSQL
primesievePrimesieve
projproj
protobufprotobuf
pthreadsPOSIX Threads
qdbmQDBM
qhttpengineqhttpengine
qjsonQJson
qscintilla2QScintilla2
qtQt
qt3dQt
qt5Qt
qtactiveqtQt
qtbaseQt
qtconnectivityQt
qtdeclarativeQt
qtenginioQt
qtgraphicaleffectsQt
qtimageformatsQt
qtlocationQt
qtmultimediaQt
qtquick1Qt
qtquickcontrolsQt
qtscriptQt
qtsensorsQt
qtserialportQt
qtserialport_qt4Qt
qtserviceQt Solutions
qtsvgQt
qtsystemsQt
qttoolsQt
qttranslationsQt
qtwebchannelQt
qtwebengineQt
qtwebkitQt
qtwebsocketsQt
qtwinextrasQt
qtxlsxwriterQtXlsxWriter
qtxmlpatternsQt
qwtQwt
qwt_qt4Qwt-qt4
qwtplot3dQwtPlot3D
readlineReadline
rubberbandRubberband
rucksackrucksack
sdlSDL
sdl_gfxSDL_gfx
sdl_imageSDL_image
sdl_mixerSDL_mixer
sdl_netSDL_net
sdl_pangoSDL_Pango
sdl_rwhttpSDL_rwhttp
sdl_soundSDL_sound
sdl_ttfSDL_ttf
sdl2SDL2
sdl2_gfxSDL2_gfx
sdl2_imageSDL2_image
sdl2_mixerSDL2_mixer
sdl2_netsdl2_net
sdl2_ttfSDL2_ttf
sedGNU sed
sfmlSFML
smpegsmpeg
smpeg2smpeg
soxSoX
speexSpeex
speexdspSpeexDSP
sqliteSQLite
suitesparseSuiteSparse
t4k_commont4k_common
taglibTagLib
tclaptclap
teemTeem
termcapTermcap
theoraTheora
tiffLibTIFF
tinyxmltinyxml
tinyxml2tinyxml2
treTRE
twolameTwoLAME
uclUCL
unrtfunRTF
upxUPX
vamp-plugin-sdkVamp Plugins SDK
vcdimagervcdimager
vidstabvid.stab video stablizer
vigravigra
vmimeVMime
vo-aacencVO-AACENC
vo-amrwbencVO-AMRWBENC
vorbisVorbis
vtkvtk
vtk6VTK6
wavpackWavPack
wgetwget
widlWine IDL Compiler
winpcapWinPcap
wtWt
wxwidgetswxWidgets
x264x264
x265x265
xapian-coreXapian-Core
xercesXerces-C++
xine-libxine-lib
xmlrpc-cxmlrpc-c
xmlwrappxmlwrapp
xorg-macrosX.org utility macros
xvidcorexvidcore
xzXZ
yasmYasm
zlibzlib
zziplibZZIPlib
- - -
- -
-

Guidelines for Creating Packages

- -
    -
  1. -

    - The package should be a - free - software - library - that is really used by one of your applications. Please also review our - legal notes. -

    - -

    - BTW, we're always curious about the applications people are porting. - We maintain a - list of projects - which use MXE. - No matter whether your project is free or proprietary - – as long as it has its own website, - we'd be happy to link to it. -

    - -

    - Also, feel free to link to us. :-) -

    -
  2. - -
  3. -

    - Grep through the src/*.mk files - to find a project that is most similar to yours. - (Really, grep is your friend here.) -

    - -

    - For instance, - when adding a GNU library, - you should take a package like - gettext.mk - or - libiconv.mk - as the base of your work. - When using a SourceForge project, - you could start with a copy of - xmlwrapp.mk. - And so on. -

    - -

    - The GNU Make Standard Library is also - available (though it should be unnecessary for most packages). -

    -
  4. - -
  5. -

    - Adjust the comments, - fill in the $(PKG)_* fields. -

    - -

    - To fill the $(PKG)_CHECKSUM field, use a command such as (for file gettext.mk): -

    -
    make update-checksum-gettext
    -

    or:

    -
    openssl sha256 pkg/gettext-x.y.z.tar.gz
    -

    - if you have already downloaded the package -

    - -

    - Be especially careful with the $(PKG)_DEPS section. - The easiest way to get the dependencies right - is to start with a minimal setup. - That is, - initialize MXE with make gcc only, - then check whether your package builds successfully. -

    - -

    - Always list the dependency on gcc explicitly: -

    -
    $(PKG)_DEPS     := gcc ...
    -
  6. - -
  7. -

    - Add your package to the list of packages. -

    -

    - Each package gets its own table row element with table cells - specifying your package name, official name and website: -

    -
    -<tr>
    -    <td class="package">gettext</td>
    -    <td class="website"><a href="https://www.gnu.org/software/gettext/">gettext</a></td>
    -</tr>
    -

    - Always look for the SSL version of a website, that is, - prefer https:// URLs over http:// URLs. -

    -
  8. - -
  9. -

    - Write your $(PKG)_BUILD. - If your library has a ./configure script, - enable/disable all dependency libraries explicitly - via "--enable-*" and "--disable-*" options. -

    -
  10. - -
  11. -

    - You might also have to provide a patch for it. - In that case, have a look at other patches such as - sdl2-2-libtool.patch. - In particular, each patch file should be named as: -

    -
    PACKAGE-PATCHNUMBER-DESCRIPTION.patch
    -

    - and should start with: -

    -
    This file is part of MXE.
    -See index.html for further information.
    -
    -This patch has been taken from:
    -https://...
    -

    - where the URL points to the - bugtracker entry, - mailing list entry or - website - you took the patch from. -

    - -

    - If you created the patch yourself, - please offer it to the upstream project first, - and point to that URL, - using the same wording: - "This patch has been taken from:". -

    - -

    - Depending on the feedback you get from the upstream project, - you might want to improve your patch. -

    -
  12. - -
  13. -

    - If you find some time, - please provide a minimal test program for it. - It should be - simple, - stand alone and - should work unmodified for many (all?) future versions of the library. - Test programs are named as: -

    -
    PACKAGE-test.c
    - or -
    PACKAGE-test.cpp
    -

    - depending on whether it is a C or C++ library. - To get a clue, - please have a look at existing test programs such as - sdl-test.c. -

    - -

    - At the very end of your *.mk file - you should build the test program in a generic way, - using strict compiler flags. - The last few lines of - sdl.mk - will give you a clue. -

    -
  14. - -
  15. -

    - You could also try to provide a $(PKG)_UPDATE section. - However, that requires some experience and "feeling" for it. - So it is perfectly okay if you leave a placeholder: -

    -
    define $(PKG)_UPDATE
    -    echo 'TODO: write update script for $(PKG).' >&2;
    -    echo $($(PKG)_VERSION)
    -endef
    -

    - We'll fill that in for you. - It's a funny exercise. -

    -
  16. - -
  17. -

    - Check that you don't have "dirty stuff" in your *.mk files, - such as TAB characters or trailing spaces at lines endings. Run: -

    -
    make cleanup-style
    -

    - to remove these. - Have a look at random *.mk files - to get a feeling for the coding style. -

    - -

    - The same holds for your test program. -

    - -

    - However, patch files should always appear - in the same coding style as the files they are patching. -

    - -

    - When patching sources with crlf line endings, the patch - file itself should also have the same eol style. Use the - convention of naming the file as *crlf.patch - to instruct git not to normalise the line endings (defined - in .gitattributes). -

    - -

    - Finally, in your $(PKG)_BUILD section, - please check that you use our portability variables: -

    - - - - - - - - - - - -
    bash $(SHELL)
    date $(DATE)
    install $(INSTALL)
    libtool $(LIBTOOL)
    libtoolize$(LIBTOOLIZE)
    make $(MAKE)
    patch $(PATCH)
    sed $(SED)
    sort $(SORT)
    wget $(WGET)
    -
  18. - -
  19. -

    - Check whether everything runs fine. - If you have some trouble, - don't hesitate to ask on the - mailing list, - providing your *.mk file so far. -

    -
  20. - -
  21. -

    - Issue a - pull request - to propose your final *.mk file to us. - If you have trouble with pull requests, - send your file to the mailing list instead. -

    -

    - Either way, - don't forget to tell us - if there are some pieces in your *.mk file - you feel unsure about. - We'll then have a specific look at those parts, - which avoids trouble for you and us in the future. -

    -
  22. -
-
- -
- - - - -

(contact via the - project mailing list)

- -

- 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. -

-
- -
- - -

Disclaimer - it's all code...

- -

- Modern legal systems are like any other large, complex, and evolving body - of code you're likely to encounter. -

- -

- They have their own language with quirky parsers, compilers, and - interpreters (though these tend to be human). Their issue trackers are - a backlog of court cases. They have bugs. They have traps for the - uninitiated that may potentially do more than waste your time. -

- -

- We currently limit ourselves to: -

-
--enable-languages='c,c++,objc,fortran'
-

- so nothing mentioned here or on the mailing list should be taken as - legal advice. :-) -

- -

Choosing the right compiler

- -

- The best starting point for any legal questions would be the -

-

- FTF (Freedom Task Force of the FSFE (Free Software Foundation Europe)). -

-

- They have been very helpful in the past, and maintain an - extensive network - of legal contacts, both within and outside Europe. -

- -

Your local jurisdiction may be a signatory to various - international agreements, - so be sure to mention where you are in any correspondence (much like any - detailed bug report really). -

- -

Additionally, you should also do some background reading from the - FSF (Free Software Foundation) - and - Wikipedia - to familiarise yourself with some of the potential issues (and experience - some context-switching overhead). -

- -

Contributions

- -

- Contributions are always welcome! -

- -

- Ownership of all contributions (bug fixes, new packages, doc updates, etc.) - remain with the author. All we require is a real name (no l33t handles, - please), and that you release your work under - our licence. -

- -

If you prefer not to be credited with a contribution, please notify - the committer. -

- -

Package Licences

- -

- Each package is individually licensed under terms specified by the - authors of that package. Please see the respective source tarball - and/or project website for details. -

- -

- Packages that are - non-free - or - ambiguous - will be - removed - or - rejected. -

- -

- The definition of free must be one of: -

- - -

- Please contact the - mailing list - if you notice a package that doesn't meet these guidlines. -

- - - -

- In addition to the usual considerations (copyrights, patents, - trademarks, export regulations etc.), building - statically linked - libraries - for Windows - exposes some edge cases that you may not have encountered before. -

- -

- According to - freedom 0 and our - own licence, - you can use mxe in countless different - environments, each with it's own special legal considerations. The - configuration options of certain packages (e.g ffmpeg) allow the use of - non-free software and/or combinations that cause license violations. -

- -

- For these packages, we will provide sensible defaults aimed - at achieving the following goals: -

-
    -
  1. avoid causing inherent licensing issues with conflicting options
  2. -
  3. make the package as feature complete as possible
  4. -
- -

- Note that this does not prevent downstream violations, or affect any - further obligations a licence may impose on you. -

- - - -

GNU Licenses

-

- Review the - FAQ -

- -

LGPL and Static Linking

- -

- Review the - Differences from the GPL - section of the Wikipedia article mentioned above. -

- -

GPL and OpenSSL

- -

- See conflicting accounts from the - FSF - and the - OpenSSL project. -

-

- A similar situation also exists for package fdk-aac. -

-
- -
-

History

- -
- -
2015-05-04 – Retired the stable branch
-
-

- The stable branch - was retired - as it - did more harm than good. - Everybody is using the master branch, - because it is always recent and well enough tested. - For historical reference, the last commit to the stable branch was - 0c6cc9c, - which was - fully merged into master - as usual. -

- -

- Added support for shared toolchains for over 50% of all the packages. -

- -

- Unfortunately, a number of factors have forced us to drop support - for MinGW 3 (i.e. "MinGW.org"), - in favor of the MinGW-w64 toolchain. This decision was made in a - large part because of the dropping of support for MinGW by - GLib and Qt5, - which arguably are two of the most important packages in MXE. - Other considerations have also been taken, like the lack - of maintainership in MinGW and potential legal - challenges that comes with using supplemental DirectX - headers in MinGW in order to support Qt4. Worse yet, having to - support the unsupported MinGW toolchain impedes adding or - updating packages, as shown in the pull - request of updating GLib. -

- -

- Please note that dropping support for MinGW DOES NOT - MEAN dropping support for the 32-bit architecture. MinGW-w64 - also supports 32-bit target through i686-w64-mingw32. -

- -

- To ease migration to the supported MinGW-w64 target, we have - finished porting all packages that were MinGW-only to at least - i686-w64-mingw32 (32-bit target of MinGW-w64). Hence your existing - commands should work out-of-the-box assuming the - MXE_TARGETS environmental variable is set correctly. -

-
- -
2013-07-27 – Release 2.23
-
-

- The stable branch was updated - to the current development version after a thorough - testing phase. -

- -

- Current users are strongly encouraged to - start with a clean tree as the toolchain has been - updated and requires a full rebuild: -

-
git pull && make clean && make
- -

- Most packages were updated to their latest version. -

- -

- Many new packages are supported: - alure, apr-util, apr, armadillo, cegui, cfitsio, cminpack, - flann, gtkglarea, gtkimageview, harfbuzz, hdf4, hdf5, hunspell, - icu4c, itk, lensfun, levmar, libf2c, libftdi, libgda, libgdamm, - libglade, liblqr-1, libmodplug, librtmp, libzip, log4cxx, mdbtools, - ncurses, netcdf, netpbm, ocaml-cairo, ocaml-camlimages, ocaml-core, - ocaml-findlib, ocaml-flexdll, ocaml-lablgl, ocaml-lablgtk2, - ocaml-native, ocaml-xml-light, opencv, opus, opusfile, pcl, - picomodel, plib, plibc, poppler, portablexdr, portmidi, protobuf, - qdbm, qt5, qtactiveqt, qtbase, qtdeclarative, qtgraphicaleffects, - qtimageformats, qtjsbackend, qtmultimedia, qtquick1, qtquickcontrols, - qtscript, qtsensors, qtserialport, qtsvg, qttools, qttranslations, - qtxmlpatterns, qwt, sdl_gfx, sfml, sox, teem, twolame, vtk6, wavpack, - wget, winpthreads, xapian-core, yasm -

- -

- Added support for mingw-w64 based toolchains - targeting 32 & 64-bit architectures. -

- -

- With the addition of Qt5, there is no longer a prefixed version of - qmake, see the Qt section of the tutorial - for the new way to invoke qmake. -

- -

- FreeBSD is no longer fully supported. - Qt5, ocaml*, and 8 other packages are excluded from the build. -

-
- -
2012-04-12 – Release 2.22
-
-

- The release tarballs have been replaced with a stable branch - that conforms to the new branch concept: -

- -
    -
  • - Any change of a build script goes into "master". -
  • -
  • - Any package upgrade goes into "master". -
  • -
  • - Any documentation upgrade that refers to a feature - not present in stable goes into "master". -
  • -
  • - Anything else that doesn't affect the build goes - into "stable". -
  • -
  • - Any non-critical improvement to the main Makefile - goes into "stable". -
  • -
  • - Any improvement in the package download URLs or - package version recognition goes into "stable". -
  • -
  • - When in doubt, "master" is used rather than "stable". -
  • -
  • - Every change to the "stable" branch - will be merged into "master". -
  • -
  • - After a successful testing phase, - the "stable" branch - will be fast-forwarded to "master". -
  • -
- -

- The project has been - renamed - from - mingw-cross-env (MinGW cross compiling environment) - to - MXE (M cross environment). -

- -

- Most packages were updated to their latest version. -

- -

- New packages are supported: - agg, cgal, eigen, file, gta, json-c, libgnurx, libharu, - libircclient, libssh2, libxml++, llvm, lzo, mpfr, nettle, - opencsg, qjson, qwtplot3d, vtk, and wt. -

-
- -
2011-06-07 – Release 2.21
-
-

- Download | - Changelog -

- -

- Minor bugfixes in several packages. -

- -

- Almost all packages are updated to their latest version. -

- -

- Packages gtkmm and gtksourceviewmm have been renamed to gtkmm2 and gtksourceviewmm2. -

- -

- New packages are supported: - libass, poco, and t4k_common. -

-
- -
2011-04-05 – Release 2.20
-
-

- Download | - Changelog -

- -

- This release fixes a download error caused by the pixman project - (a sudden change of their URL scheme without proper redirects). - That sort of thing should never happen! -

-
- -
2011-03-19 – Release 2.19
-
-

- Download | - Changelog -

- -

- The download mechanisms are improved. -

- -

- A CMake toolchain file is provided - to simplify cross-compiling projects which use CMake. -

- -

- Support for Debian/Lenny is dropped. -

- -

- Package gtk is renamed to gtk2. -

- -

- Almost all packages are updated to their latest version. -

- -

- New packages are supported: - dbus, graphicsmagick, libical, liboauth, physfs, and vigra. -

- -

- Note for boost::filesystem users: - Version 3 is a major revision - and now the default in 1.46. -

-
- -
2010-12-15 – Release 2.18
-
-

- Download | - Changelog -

- -

- This release fixes a checksum error caused by the atkmm project - (a sudden change of their current source tarball). - That sort of thing should never happen! -

-
- -
2010-12-11 – Release 2.17
-
-

- Download | - Changelog -

- -

- This release provides some improvements of the build system - such as an automatic check for most of the requirements. -

- -

- All packages are updated to their latest version. -

- -

- New packages are supported: - bfd, blas, cblas, dcmtk, ftgl, lapack, lcms1, - mingw-utils, mxml, suitesparse and tinyxml. -

-
- -
2010-10-27 – Release 2.16
-
-

- Download | - Changelog -

- -

- This release provides lots of improvements to - the build system as well as the documentation. -

- -

- Support for OpenSolaris is dropped. -

- -

- Almost all packages are updated to their latest version. -

- -

- Many new packages are supported: - atkmm, cairomm, cunit, faac, faad2, ffmpeg, gdk-pixbuf, glibmm, - gtkglextmm, gtkmm, gtksourceview, gtksourceviewmm, imagemagick, - lame, libiberty, libsigc++, libvpx, matio, openal, opencore-amr, - pangomm, pfstools, plotmm, sdl_sound and x264. -

-
- -
2010-06-16 – Release 2.15
-
-

- Download | - Changelog -

- -

- This release fixes download errors caused by the Qt project - (a sudden change of their current source tarball). -

- -

- Almost all packages are updated to their latest version. -

-
- -
2010-06-08 – Release 2.14
-
-

- Download | - Changelog -

- -

- This release fixes download errors caused by the MinGW project - (a sudden change of their URL scheme without proper redirects). - That sort of thing should never happen! -

- -

- Almost all packages are updated to their latest version. -

- -

- New packages are supported: - libarchive, libgee and xvidcore. -

-
- -
2010-05-31 – Release 2.13
-
-

- Download | - Changelog -

- -

- This release switches back from TDM to the official GCC, - thus supporting the current GCC 4.5. -

- -

- The set of DirectX headers is improved and more complete. -

- -

- The deadlock issues with Pthreads-w32 are fixed. -

- -

- A static build of GDB is provided, - i.e. a standalone "gdb.exe" - that doesn't require any extra DLLs. -

- -

- More packages are backed by test programs. -

- -

- Many "sed hacks" are replaced by proper portability patches. -

- -

- Almost all packages are updated to their latest version. -

- -

- Many new packages are supported: - fribidi, gc, gdb, gmp, gsl, gst-plugins-base, gst-plugins-good, - gstreamer, gtkglext, guile, libcroco, libffi, liboil, libpaper, - libshout, libunistring and xine-lib. -

-
- -
2010-02-21 – Release 2.12
-
-

- Download | - Changelog -

- -

- This release fixes some minor build issues, - and contains a first small set of test programs - to check the package builds. -

- -

- The build rules are simplified - by calling generators like Autotools and Flex, - instead of patching the generated files. -

- -

- Almost all packages are updated to their latest version. -

- -

- Many new packages are supported: - aubio, devil, directx, exiv2, fftw, freeimage, gsoap, - id3lib, liblo, libpano13, librsvg, libsamplerate, - muparser, openscenegraph, portaudio and sdl_pango. -

-
- -
2010-02-20 – Release 2.11
-
-

- Download | - Changelog -

- -

- This release contains a packaging bug. - Please use release 2.12 instead. -

-
- -
2009-12-23 – Release 2.10
-
-

- Download | - Changelog -

- -

- This release adds support for many new packages: - flac, libmad, libsndfile, sdl_net, speex, postgresql, - freetds, openssl, plotutils, taglib, lcms, freeglut, - xerces and zziplib. -

- -

- Almost all packages are updated to their latest version. -

- -

- In addition to the libraries - some command line tools such as psql.exe are built, too. -

- -

- The placements of logfiles, as well as many other build details, have been improved. -

-
- -
2009-10-24 – Release 2.9
-
-

- Download | - Changelog -

- -

- This release adds support for Qt, VMime and libmng. -

- -

- The target triplet is updated to i686-pc-mingw32. -

- -

- OpenMP support is enabled in GCC. -

- -

- Almost all packages are updated to their latest version. -

-
- -
2009-09-11 – Release 2.8
-
-

- Download | - Changelog -

- -

- This release comes with a better look & feel - by providing a highlevel overview of the build process. -

- -

- The detailed build messages are stored into - separate log files for each package, - so parallel builds don't intermix them anymore. -

- -

- The download URLs of SourceForge packages - are adjusted to ensure that - the selected SourceForge mirror is really used - and not circumvalented via HTTP redirects to other mirrors. -

- -

- Almost all packages are updated to their latest version. -

- -

- The whole mingw-cross-env project has moved to - Savannah. - So all URIs have changed, - but the old URIs - redirect to the new locations seamlessly. -

- -

- Everyone is invited to join the freshly created - project mailing list. -

-
- -
2009-08-11 – Release 2.7
-
-

- Download | - Changelog -

- -

- This release - provides an improved version recognition - for SourceForge packages. - SourceForge changed their page layout - in a way that makes it much harder - to identify the current version of a package. -

- -

- Additionally, - almost all packages are updated to their latest version. -

-
- -
2009-06-19 – Release 2.6
-
-

- Download | - Changelog -

- -

- This release contains some portability fixes - which allow it to run on a wider range of systems - such as Frugalware. -

- -

- The documentation and website are completely revised. -

- -

- New packages such as - CppUnit, libUsb, NSIS, Popt, SQLite and Theora - are supported. -

- -

- Almost all packages are updated to their latest version. -

- -

- A new command "make download" is implemented. -

-
- -
2009-04-06 – Release 2.5
-
-

- Download | - Changelog -

- -

- This release fixes a download error caused by the MinGW project. - They suddenly changed the names of their source tarballs. - That sort of thing should never happen! -

- -

- This release also contains some bugfixes - which allow it to run on a wider range of systems. -

- -

- All downloaded files are now - verified by their SHA-1 checksums. -

- -

- New versions of various packages are supported. -

-
- -
2009-03-08 – Release 2.4
-
-

- Download | - Changelog -

- -

- This release provides many new libraries such as - wxWidgets, GTK+ and OpenEXR. -

- -

- In addition, new versions of various packages - are supported. -

-
- -
2009-02-09 – Release 2.3
-
-

- Download | - Changelog -

- -

- This release fixes some serious build problems on FreeBSD and MacOS-X. -

- -

- The Makefile has a new target "clean-pkg" - and allows to be called from a separate build directory - via "make -f .../Makefile". -

- -

- Some new versions of the packages are supported, - especially GCC-4.3 by switching from MinGW GCC to - TDM-GCC. -

-
- -
2009-01-31 – Release 2.2
-
-

- Download | - Changelog -

- -

- This release fixes some minor build problems. -

- -

- It also supports some new packages and - some newer versions of the already supported packages. -

- -

- Parallelization is now disabled by default. -

-
- -
2008-12-13 – Release 2.1
-
-

- Download | - Changelog -

- -

- This release fixes a download error caused by the GDAL project. - They suddenly changed their download URLs. - That sort of thing should never happen! -

- -

- In addition, some newer versions of various packages are supported. -

- -

- There is also a small compatibility fix for OS X. -

-
- -
2008-11-10 – Release 2.0
-
-

- Download | - Changelog -

- -

- The shell script has been rewritten as Makefile - and supports partial builds and parallel builds. -

- -

- As usual, - this release also supports some new packages and - some newer versions of the already supported packages. -

-
- -
2008-01-11 – Release 1.4
-
-

- Download | - Changelog -

- -

- This release now includes a tutorial by Hans Bezemer - and has improved compile options of FLTK. - As usual, it supports some newer versions of the libraries. -

- -

- At the request of its author, - libowfat is no longer supported from this release on. -

- -

- The script now uses a specific SourceForge mirror - instead of randomly chosen ones, - because the download phase - often stumbled on some very slow mirrors. -

-
- -
2007-12-23 – Release 1.3
-
-

- Download | - Changelog -

- -

- A sudden change in the download URLs of GEOS - made the automatic download fail. - Such changes should never happen! - But it happened, - and this quick release is an attempt to limit the damage. -

- -

- This release also supports some newer versions of the libraries - including support for fontconfig-2.5.0. -

-
- -
2007-12-13 – Release 1.2
-
-

- Download | - Changelog -

- -

- This release is a switch from gcc-3 to gcc-4. - It also supports a new library and - some newer versions of the already supported libraries. -

-
- -
2007-07-24 – Release 1.1
-
-

- Download | - Changelog -

- -

- This release is the result of the public attention the release 1.0 got. - It contains many improvements suggested by its first users, - and adds support for many new libraries. -

- -

- Thanks to Rocco Rutte who contributed many code snippets. -

-
- -
2007-06-19 – Release 1.0
-
-

- Download | - Changelog -

- -

- This first release has been created in a 7-day-sprint. -

-
- -
2007-06-12 – Project start
-
-
- -
-
- -
-

See also

- -

This project

- - - -

Related projects

- - - -

Related articles

- - -
- -
-

Projects which use MXE (alphabetical order)

- - -
- - - diff --git a/patch.mk b/patch.mk new file mode 100644 index 00000000..c036784d --- /dev/null +++ b/patch.mk @@ -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)) diff --git a/plugins/README.md b/plugins/README.md new file mode 100644 index 00000000..62009386 --- /dev/null +++ b/plugins/README.md @@ -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. diff --git a/plugins/apps/clementine_qt4-1-fixes.patch b/plugins/apps/clementine_qt4-1-fixes.patch new file mode 100644 index 00000000..3abec0de --- /dev/null +++ b/plugins/apps/clementine_qt4-1-fixes.patch @@ -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 +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) + diff --git a/plugins/apps/clementine_qt4.mk b/plugins/apps/clementine_qt4.mk new file mode 100644 index 00000000..f271ea8e --- /dev/null +++ b/plugins/apps/clementine_qt4.mk @@ -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 = diff --git a/plugins/apps/keepassx-1-don-t-discard-config-set-by-qmake.patch b/plugins/apps/keepassx-1-don-t-discard-config-set-by-qmake.patch new file mode 100644 index 00000000..0d97f8c1 --- /dev/null +++ b/plugins/apps/keepassx-1-don-t-discard-config-set-by-qmake.patch @@ -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 +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 + diff --git a/plugins/apps/keepassx.mk b/plugins/apps/keepassx.mk new file mode 100644 index 00000000..01429154 --- /dev/null +++ b/plugins/apps/keepassx.mk @@ -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 diff --git a/plugins/apps/luajit.mk b/plugins/apps/luajit.mk new file mode 100644 index 00000000..aa396fb8 --- /dev/null +++ b/plugins/apps/luajit.mk @@ -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) diff --git a/plugins/apps/msmtp.mk b/plugins/apps/msmtp.mk new file mode 100644 index 00000000..a2eb0192 --- /dev/null +++ b/plugins/apps/msmtp.mk @@ -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 diff --git a/plugins/apps/qbittorrent-1-fixes.patch b/plugins/apps/qbittorrent-1-fixes.patch new file mode 100644 index 00000000..4d9cbab0 --- /dev/null +++ b/plugins/apps/qbittorrent-1-fixes.patch @@ -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 +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 +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 +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 diff --git a/plugins/apps/qbittorrent.mk b/plugins/apps/qbittorrent.mk new file mode 100644 index 00000000..8c3cd881 --- /dev/null +++ b/plugins/apps/qbittorrent.mk @@ -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 = diff --git a/plugins/apps/ricochet.mk b/plugins/apps/ricochet.mk new file mode 100644 index 00000000..25873601 --- /dev/null +++ b/plugins/apps/ricochet.mk @@ -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 diff --git a/plugins/apps/tor.mk b/plugins/apps/tor.mk new file mode 100644 index 00000000..e3be040a --- /dev/null +++ b/plugins/apps/tor.mk @@ -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 diff --git a/plugins/apps/wrk-1-fixes.patch b/plugins/apps/wrk-1-fixes.patch new file mode 100644 index 00000000..7e6134f0 --- /dev/null +++ b/plugins/apps/wrk-1-fixes.patch @@ -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 +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 +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 +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 +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 +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 +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 +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 +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 + #include + #include ++#ifndef __WIN32__ + #include ++#else ++#include ++#endif + #include + #include + #include +@@ -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 + #include + #include ++#ifndef __WIN32__ + #include + #include ++#include ++#else ++#include ++#include ++#endif + #include + #include + #include +@@ -17,7 +23,6 @@ + #include + #include + #include +-#include + + #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 + #include ++ ++#ifndef __WIN32__ + #include ++#else ++#include ++#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 + #include + #include ++ ++#ifndef __WIN32__ + #include + #include ++#else ++#include ++#include // addrinfo ++#endif + + #include + #include diff --git a/plugins/apps/wrk.mk b/plugins/apps/wrk.mk new file mode 100644 index 00000000..d41d50f7 --- /dev/null +++ b/plugins/apps/wrk.mk @@ -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 = diff --git a/plugins/examples/custom-qt-min/overrides.mk b/plugins/examples/custom-qt-min/overrides.mk new file mode 100644 index 00000000..f34fa2a6 --- /dev/null +++ b/plugins/examples/custom-qt-min/overrides.mk @@ -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 diff --git a/plugins/examples/host-toolchain/README.md b/plugins/examples/host-toolchain/README.md new file mode 100644 index 00000000..9783b1bc --- /dev/null +++ b/plugins/examples/host-toolchain/README.md @@ -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/ diff --git a/plugins/examples/host-toolchain/binutils-host.mk b/plugins/examples/host-toolchain/binutils-host.mk new file mode 100644 index 00000000..67aedb41 --- /dev/null +++ b/plugins/examples/host-toolchain/binutils-host.mk @@ -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 diff --git a/plugins/examples/host-toolchain/cmake-host.mk b/plugins/examples/host-toolchain/cmake-host.mk new file mode 100644 index 00000000..9def3398 --- /dev/null +++ b/plugins/examples/host-toolchain/cmake-host.mk @@ -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 diff --git a/plugins/examples/host-toolchain/gcc-host.mk b/plugins/examples/host-toolchain/gcc-host.mk new file mode 100644 index 00000000..bab48e1d --- /dev/null +++ b/plugins/examples/host-toolchain/gcc-host.mk @@ -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 diff --git a/plugins/examples/host-toolchain/make-w32-bin.mk b/plugins/examples/host-toolchain/make-w32-bin.mk new file mode 100644 index 00000000..e00bfc06 --- /dev/null +++ b/plugins/examples/host-toolchain/make-w32-bin.mk @@ -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 diff --git a/plugins/examples/host-toolchain/pkgconf-host.mk b/plugins/examples/host-toolchain/pkgconf-host.mk new file mode 100644 index 00000000..d82edcba --- /dev/null +++ b/plugins/examples/host-toolchain/pkgconf-host.mk @@ -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 diff --git a/plugins/examples/host-toolchain/qt5-host-tools.mk b/plugins/examples/host-toolchain/qt5-host-tools.mk new file mode 100644 index 00000000..c68a79ff --- /dev/null +++ b/plugins/examples/host-toolchain/qt5-host-tools.mk @@ -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 diff --git a/plugins/examples/host-toolchain/winpthreads-host.mk b/plugins/examples/host-toolchain/winpthreads-host.mk new file mode 100644 index 00000000..1a947da3 --- /dev/null +++ b/plugins/examples/host-toolchain/winpthreads-host.mk @@ -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 diff --git a/plugins/examples/qt5-deps/overrides.mk b/plugins/examples/qt5-deps/overrides.mk new file mode 100644 index 00000000..f8407b1e --- /dev/null +++ b/plugins/examples/qt5-deps/overrides.mk @@ -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 diff --git a/plugins/gcc4/README.md b/plugins/gcc4/README.md new file mode 100644 index 00000000..afbe8846 --- /dev/null +++ b/plugins/gcc4/README.md @@ -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. diff --git a/plugins/gcc4/gcc4-overlay.mk b/plugins/gcc4/gcc4-overlay.mk new file mode 100644 index 00000000..37463466 --- /dev/null +++ b/plugins/gcc4/gcc4-overlay.mk @@ -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) diff --git a/plugins/gcc4/gcc4.mk b/plugins/gcc4/gcc4.mk new file mode 100644 index 00000000..789c0339 --- /dev/null +++ b/plugins/gcc4/gcc4.mk @@ -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,.* @@ -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 diff --git a/plugins/gcc6/README.md b/plugins/gcc6/README.md new file mode 100644 index 00000000..d123d83b --- /dev/null +++ b/plugins/gcc6/README.md @@ -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) | diff --git a/plugins/gcc6/gcc6-overlay.mk b/plugins/gcc6/gcc6-overlay.mk new file mode 100644 index 00000000..267dc106 --- /dev/null +++ b/plugins/gcc6/gcc6-overlay.mk @@ -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) diff --git a/plugins/gcc7/gcc7-overlay.mk b/plugins/gcc7/gcc7-overlay.mk new file mode 100644 index 00000000..88b88779 --- /dev/null +++ b/plugins/gcc7/gcc7-overlay.mk @@ -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) diff --git a/plugins/go/README.md b/plugins/go/README.md new file mode 100644 index 00000000..6d3c7ddd --- /dev/null +++ b/plugins/go/README.md @@ -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 +``` diff --git a/plugins/go/go-native-1-fixes.patch b/plugins/go/go-native-1-fixes.patch new file mode 100644 index 00000000..5421bcfc --- /dev/null +++ b/plugins/go/go-native-1-fixes.patch @@ -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 +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): diff --git a/plugins/go/go-native.mk b/plugins/go/go-native.mk new file mode 100644 index 00000000..f85fcd79 --- /dev/null +++ b/plugins/go/go-native.mk @@ -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 diff --git a/plugins/go/go.mk b/plugins/go/go.mk new file mode 100644 index 00000000..a380204e --- /dev/null +++ b/plugins/go/go.mk @@ -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 = diff --git a/plugins/go/src/mxe-test/main.go b/plugins/go/src/mxe-test/main.go new file mode 100644 index 00000000..c6d46fb4 --- /dev/null +++ b/plugins/go/src/mxe-test/main.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Printf("hello, world\n") +} diff --git a/plugins/luarocks/README.md b/plugins/luarocks/README.md new file mode 100644 index 00000000..761fed2d --- /dev/null +++ b/plugins/luarocks/README.md @@ -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 ` 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"))' + +.... +``` + +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//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 +``` + +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 diff --git a/plugins/luarocks/llthreads2-1-link-with-kernel32-on-mxe.patch b/plugins/luarocks/llthreads2-1-link-with-kernel32-on-mxe.patch new file mode 100644 index 00000000..fffa233c --- /dev/null +++ b/plugins/luarocks/llthreads2-1-link-with-kernel32-on-mxe.patch @@ -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 +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 + diff --git a/plugins/luarocks/llthreads2.mk b/plugins/luarocks/llthreads2.mk new file mode 100644 index 00000000..0939b958 --- /dev/null +++ b/plugins/luarocks/llthreads2.mk @@ -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 diff --git a/plugins/luarocks/lpeg-1-rockspec.patch b/plugins/luarocks/lpeg-1-rockspec.patch new file mode 100644 index 00000000..e8bd247f --- /dev/null +++ b/plugins/luarocks/lpeg-1-rockspec.patch @@ -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 +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 ", ++ 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 + diff --git a/plugins/luarocks/lpeg.mk b/plugins/luarocks/lpeg.mk new file mode 100644 index 00000000..120b5f8a --- /dev/null +++ b/plugins/luarocks/lpeg.mk @@ -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 diff --git a/plugins/luarocks/lua-rapidjson-1-fixes.patch b/plugins/luarocks/lua-rapidjson-1-fixes.patch new file mode 100644 index 00000000..b509c2f5 --- /dev/null +++ b/plugins/luarocks/lua-rapidjson-1-fixes.patch @@ -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 +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 +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 + diff --git a/plugins/luarocks/lua-rapidjson.mk b/plugins/luarocks/lua-rapidjson.mk new file mode 100644 index 00000000..7ba99fcd --- /dev/null +++ b/plugins/luarocks/lua-rapidjson.mk @@ -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 diff --git a/plugins/luarocks/lua.mk b/plugins/luarocks/lua.mk new file mode 100644 index 00000000..b30afc59 --- /dev/null +++ b/plugins/luarocks/lua.mk @@ -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) diff --git a/plugins/luarocks/luarocks-1-fixes.patch b/plugins/luarocks/luarocks-1-fixes.patch new file mode 100644 index 00000000..1d6d28ff --- /dev/null +++ b/plugins/luarocks/luarocks-1-fixes.patch @@ -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 +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, diff --git a/plugins/luarocks/luarocks.mk b/plugins/luarocks/luarocks.mk new file mode 100644 index 00000000..20565493 --- /dev/null +++ b/plugins/luarocks/luarocks.mk @@ -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 diff --git a/plugins/luarocks/luasocket-1-build-on-mxe.patch b/plugins/luarocks/luasocket-1-build-on-mxe.patch new file mode 100644 index 00000000..1845a0a3 --- /dev/null +++ b/plugins/luarocks/luasocket-1-build-on-mxe.patch @@ -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 +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 + diff --git a/plugins/luarocks/luasocket-2-lual-checkint.patch b/plugins/luarocks/luasocket-2-lual-checkint.patch new file mode 100644 index 00000000..2c1c390c --- /dev/null +++ b/plugins/luarocks/luasocket-2-lual-checkint.patch @@ -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 +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 + diff --git a/plugins/luarocks/luasocket.mk b/plugins/luarocks/luasocket.mk new file mode 100644 index 00000000..c224b62a --- /dev/null +++ b/plugins/luarocks/luasocket.mk @@ -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 diff --git a/plugins/luarocks/luv-1-fixes.patch b/plugins/luarocks/luv-1-fixes.patch new file mode 100644 index 00000000..cf46fa22 --- /dev/null +++ b/plugins/luarocks/luv-1-fixes.patch @@ -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 +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 +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", + }, + } diff --git a/plugins/luarocks/luv.mk b/plugins/luarocks/luv.mk new file mode 100644 index 00000000..844686e0 --- /dev/null +++ b/plugins/luarocks/luv.mk @@ -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 diff --git a/plugins/luarocks/test.lua b/plugins/luarocks/test.lua new file mode 100644 index 00000000..1016231c --- /dev/null +++ b/plugins/luarocks/test.lua @@ -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") diff --git a/src/autoconf.mk b/plugins/native/autoconf.mk similarity index 60% rename from src/autoconf.mk rename to plugins/native/autoconf.mk index 93c2ffbc..904de6a6 100644 --- a/src/autoconf.mk +++ b/plugins/native/autoconf.mk @@ -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,.* diff --git a/src/agg.mk b/src/agg.mk index 3222c03b..5941b6d4 100644 --- a/src/agg.mk +++ b/src/agg.mk @@ -1,13 +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 := agg +$(PKG)_WEBSITE := https://agg.sourceforge.io/ +$(PKG)_DESCR := Anti-Grain Geometry $(PKG)_IGNORE := $(PKG)_VERSION := 2.5 $(PKG)_CHECKSUM := ab1edc54cc32ba51a62ff120d501eecd55fceeedf869b9354e7e13812289911f $(PKG)_SUBDIR := agg-$($(PKG)_VERSION) $(PKG)_FILE := agg-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://www.antigrain.com/$($(PKG)_FILE) +$(PKG)_URL_2 := https://web.archive.org/web/20170111090029/www.antigrain.com/$($(PKG)_FILE) $(PKG)_DEPS := gcc freetype sdl define $(PKG)_UPDATE diff --git a/src/alure.mk b/src/alure.mk index dec64a86..bcd30739 100644 --- a/src/alure.mk +++ b/src/alure.mk @@ -1,14 +1,14 @@ -# 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 := alure +$(PKG)_WEBSITE := http://kcat.strangesoft.net/alure.html $(PKG)_IGNORE := $(PKG)_VERSION := 1.2 $(PKG)_CHECKSUM := 465e6adae68927be3a023903764662d64404e40c4c152d160e3a8838b1d70f71 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 $(PKG)_URL := http://kcat.strangesoft.net/alure-releases/$($(PKG)_FILE) -$(PKG)_DEPS := gcc flac libsndfile ogg openal vorbis +$(PKG)_DEPS := gcc flac libsndfile mpg123 ogg openal vorbis define $(PKG)_UPDATE $(WGET) -q -O- http://repo.or.cz/w/alure.git/tags | \ @@ -18,13 +18,12 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - cd '$(1)/build' && cmake \ - -DBUILD_STATIC=ON \ - -DBUILD_SHARED=OFF \ + cd '$(1)/build' && '$(TARGET)-cmake' \ + -DDYNLOAD=OFF \ -DBUILD_EXAMPLES=OFF \ + -DFLUIDSYNTH=OFF \ -DCMAKE_C_FLAGS="-DAL_LIBTYPE_STATIC -DALURE_STATIC_LIBRARY" \ -DCMAKE_CXX_FLAGS="-DAL_LIBTYPE_STATIC -DALURE_STATIC_LIBRARY" \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ .. $(MAKE) -C '$(1)/build' -j $(JOBS) VERBOSE=1 $(MAKE) -C '$(1)/build' -j $(JOBS) install diff --git a/src/apr-1.patch b/src/apr-1.patch index 530b5dae..b19d8040 100644 --- a/src/apr-1.patch +++ b/src/apr-1.patch @@ -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 1e244993f497ca7167361dfb29a2fe43232a7661 Mon Sep 17 00:00:00 2001 From: Timothy Gu diff --git a/src/apr-2-wtypes.patch b/src/apr-2-wtypes.patch index c1676bd7..ea63c9bf 100644 --- a/src/apr-2-wtypes.patch +++ b/src/apr-2-wtypes.patch @@ -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: "Jon Schewe (BBN) " Taken from https://issues.apache.org/bugzilla/attachment.cgi?id=31800. diff --git a/src/apr-3.patch b/src/apr-3.patch index 19a02d07..e19abc39 100644 --- a/src/apr-3.patch +++ b/src/apr-3.patch @@ -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 72ceb6351c8519ed48b21233246fc87f5dc8ee18 Mon Sep 17 00:00:00 2001 From: Timothy Gu diff --git a/src/apr-util.mk b/src/apr-util.mk index ff10a01b..bdd7e0cc 100644 --- a/src/apr-util.mk +++ b/src/apr-util.mk @@ -1,18 +1,19 @@ -# 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 := apr-util +$(PKG)_WEBSITE := https://apr.apache.org/ +$(PKG)_DESCR := APR-util $(PKG)_IGNORE := $(PKG)_VERSION := 1.5.4 $(PKG)_CHECKSUM := 976a12a59bc286d634a21d7be0841cc74289ea9077aa1af46be19d1a6e844c19 $(PKG)_SUBDIR := apr-util-$($(PKG)_VERSION) $(PKG)_FILE := apr-util-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://archive.apache.org/dist/apr/$($(PKG)_FILE) +$(PKG)_URL := https://archive.apache.org/dist/apr/$($(PKG)_FILE) $(PKG)_URL_2 := http://mirror.apache-kr.org/apr/$($(PKG)_FILE) $(PKG)_DEPS := gcc apr expat libiconv define $(PKG)_UPDATE - $(WGET) -q -O- 'http://apr.apache.org/download.cgi' | \ + $(WGET) -q -O- 'https://apr.apache.org/download.cgi' | \ grep 'aprutil1.*best' | $(SED) -n 's,.*APR-util \([0-9.]*\).*,\1,p' endef diff --git a/src/apr.mk b/src/apr.mk index 3ce4c213..222564d9 100644 --- a/src/apr.mk +++ b/src/apr.mk @@ -1,35 +1,41 @@ -# 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 := apr +$(PKG)_WEBSITE := https://apr.apache.org/ +$(PKG)_DESCR := APR $(PKG)_IGNORE := $(PKG)_VERSION := 1.5.2 $(PKG)_CHECKSUM := 1af06e1720a58851d90694a984af18355b65bb0d047be03ec7d659c746d6dbdb $(PKG)_SUBDIR := apr-$($(PKG)_VERSION) $(PKG)_FILE := apr-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://archive.apache.org/dist/apr/$($(PKG)_FILE) +$(PKG)_URL := https://archive.apache.org/dist/apr/$($(PKG)_FILE) $(PKG)_URL_2 := http://mirror.apache-kr.org/apr/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://apr.apache.org/download.cgi' | \ + $(WGET) -q -O- 'https://apr.apache.org/download.cgi' | \ grep 'apr1.*best' | $(SED) -n 's,.*APR \([0-9.]*\).*,\1,p' endef define $(PKG)_BUILD - cp -Rp '$(1)' '$(1).native' - cd '$(1).native' && ./configure - cd '$(1).native' && $(MAKE) tools/gen_test_char \ - CFLAGS='-DNEED_ENHANCED_ESCAPES' - cd '$(1)' && ./configure \ + # native build for gen_test_char + mkdir '$(BUILD_DIR).native' + cd '$(BUILD_DIR).native' && '$(SOURCE_DIR)/configure' + $(MAKE) -C '$(BUILD_DIR).native' tools/gen_test_char \ + CFLAGS='-DNEED_ENHANCED_ESCAPES' -j '$(JOBS)' + + # cross build + cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \ $(MXE_CONFIGURE_OPTS) \ ac_cv_sizeof_off_t=4 \ ac_cv_sizeof_pid_t=4 \ ac_cv_sizeof_size_t=4 \ ac_cv_sizeof_ssize_t=4 \ + $(if $(POSIX_THREADS),apr_cv_mutex_robust_shared=yes) \ CFLAGS=-D_WIN32_WINNT=0x0500 - $(MAKE) -C '$(1)' -j 1 install GEN_TEST_CHAR='$(1).native/tools/gen_test_char' + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' GEN_TEST_CHAR='$(BUILD_DIR).native/tools/gen_test_char' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install ln -sf '$(PREFIX)/$(TARGET)/bin/apr-1-config' '$(PREFIX)/bin/$(TARGET)-apr-1-config' endef diff --git a/src/armadillo-test.cpp b/src/armadillo-test.cpp index 3abff944..01a7ce2b 100644 --- a/src/armadillo-test.cpp +++ b/src/armadillo-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include diff --git a/src/armadillo.mk b/src/armadillo.mk index a7d3be90..92cc923e 100644 --- a/src/armadillo.mk +++ b/src/armadillo.mk @@ -1,33 +1,30 @@ -# 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 := armadillo +$(PKG)_WEBSITE := https://arma.sourceforge.io/ +$(PKG)_DESCR := Armadillo C++ linear algebra library $(PKG)_IGNORE := -$(PKG)_VERSION := 4.550.1 -$(PKG)_CHECKSUM := f44e85a4cc2d1631339ef974464730d952f3b2bf9141eedfc42ed4ace9148260 +$(PKG)_VERSION := 7.800.1 +$(PKG)_CHECKSUM := 5ada65a5a610301ae188bb34f0ac6e7fdafbdbcd0450b0adb7715349ae14b8db $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) -$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/arma/$($(PKG)_FILE) -$(PKG)_DEPS := gcc blas boost lapack +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/arma/$($(PKG)_FILE) +$(PKG)_DEPS := gcc blas lapack define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/arma/files/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/arma/files/' | \ $(SED) -n 's,.*/armadillo-\([0-9.]*\)[.]tar.*".*,\1,p' | \ head -1 endef define $(PKG)_BUILD mkdir '$(1)/build' - cd '$(1)/build' && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -DBUILD_SHARED_LIBS=$(if $(BUILD_SHARED),YES,NO) \ + cd '$(1)/build' && '$(TARGET)-cmake' .. \ -DARMA_USE_WRAPPER=false $(MAKE) -C '$(1)/build' -j '$(JOBS)' install VERBOSE=1 - # note: don't use -Werror with GCC 4.7.0 and .1 '$(TARGET)-g++' \ - -W -Wall \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-armadillo.exe' \ - -larmadillo -llapack -lblas -lgfortran -lquadmath \ - -lboost_serialization-mt -lboost_thread_win32-mt -lboost_system-mt + -W -Wall -Werror \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-armadillo.exe' \ + -larmadillo -llapack -lblas -lgfortran -lquadmath endef diff --git a/src/aspell-1-fixes.patch b/src/aspell-1-fixes.patch index d889428a..6c80a852 100644 --- a/src/aspell-1-fixes.patch +++ b/src/aspell-1-fixes.patch @@ -1,11 +1,670 @@ -diff -Naur aspell-0.60.6.1.orig/common/file_util.cpp aspell-0.60.6.1/common/file_util.cpp ---- aspell-0.60.6.1.orig/common/file_util.cpp 2011-07-03 01:09:08.000000000 +0400 -+++ aspell-0.60.6.1/common/file_util.cpp 2015-07-28 18:01:01.435865252 +0300 -@@ -26,6 +26,7 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +Contains ad hoc patches for cross building. + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore +Date: Sun, 31 Jan 2016 21:13:24 +1100 +Subject: [PATCH] add pthreads option + + +diff --git a/configure.ac b/configure.ac +index 1111111..2222222 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -64,6 +64,9 @@ AC_ARG_ENABLE(wide-curses, + AC_ARG_ENABLE(regex, + [ --disable-regex]) - #ifdef WIN32 ++AC_ARG_ENABLE(pthreads, ++ [ --disable-pthreads]) ++ + AC_ARG_ENABLE(compile-in-filters, + [ --enable-compile-in-filters]) -+#include "asc_ctype.hpp" - # include +@@ -254,6 +257,8 @@ AM_LANGINFO_CODESET + # # + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + ++if test "$enable_pthreads" != "no" ++then + AC_SUBST(PTHREAD_LIB) + + AC_MSG_CHECKING(if posix mutexes are supported) +@@ -293,6 +298,7 @@ else + AC_MSG_WARN([Unable to find locking mechanism, Aspell will not be thread safe.]) + fi + ++fi + + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + # # + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore +Date: Sun, 31 Jan 2016 20:10:22 +1100 +Subject: [PATCH] use namespace mingw + +taken from: +https://aur.archlinux.org/cgit/aur.git/plain/0001-use-namespace.mingw.patch?h=mingw-w64-aspell + +diff --git a/common/file_util.cpp b/common/file_util.cpp +index 1111111..2222222 100644 +--- a/common/file_util.cpp ++++ b/common/file_util.cpp +@@ -30,6 +30,7 @@ # define ACCESS _access # include + # include ++# include "asc_ctype.hpp" + + #else + +@@ -38,6 +39,7 @@ + + #endif + ++using namespace acommon; + + namespace acommon { + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore +Date: Sun, 31 Jan 2016 20:14:27 +1100 +Subject: [PATCH] printf mingw + +taken from: +https://aur.archlinux.org/cgit/aur.git/plain/0002-printf.mingw.patch?h=mingw-w64-aspell + +diff --git a/common/config.cpp b/common/config.cpp +index 1111111..2222222 100644 +--- a/common/config.cpp ++++ b/common/config.cpp +@@ -39,6 +39,9 @@ + #include "vararray.hpp" + #include "string_list.hpp" + ++#define printf printf ++#include "libintl.h" ++#undef printf + #include "gettext.h" + + #include "iostream.hpp" +diff --git a/modules/speller/default/language.cpp b/modules/speller/default/language.cpp +index 1111111..2222222 100644 +--- a/modules/speller/default/language.cpp ++++ b/modules/speller/default/language.cpp +@@ -24,6 +24,9 @@ + # include + #endif + ++#define printf printf ++#include "libintl.h" ++#undef printf + #include "gettext.h" + + namespace aspeller { +diff --git a/prog/aspell.cpp b/prog/aspell.cpp +index 1111111..2222222 100644 +--- a/prog/aspell.cpp ++++ b/prog/aspell.cpp +@@ -59,6 +59,9 @@ + #include "hash-t.hpp" + #include "hash_fun.hpp" + ++#define printf printf ++#include "libintl.h" ++#undef printf + #include "gettext.h" + + using namespace acommon; + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore +Date: Sun, 31 Jan 2016 20:15:48 +1100 +Subject: [PATCH] no-undefined mingw + +taken from: +https://aur.archlinux.org/cgit/aur.git/plain/0003-no-undefined-on.mingw.patch?h=mingw-w64-aspell + +diff --git a/Makefile.am b/Makefile.am +index 1111111..2222222 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -194,7 +194,7 @@ libaspell_la_SOURCES +=\ + else # not COMPILE_IN_FILTERS + + dynamic_optfiles += ${optfiles} +-filter_ldflags = -module -avoid-version ++filter_ldflags = -module -avoid-version -no-undefined + + ### Add name of filter library containing your filter. Name always + ### must look like lib-filter.la see development manual + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore +Date: Sun, 31 Jan 2016 20:16:41 +1100 +Subject: [PATCH] reloc mingw + +taken from: +https://aur.archlinux.org/cgit/aur.git/plain/0004-reloc.mingw.patch?h=mingw-w64-aspell + +diff --git a/common/config.cpp b/common/config.cpp +index 1111111..2222222 100644 +--- a/common/config.cpp ++++ b/common/config.cpp +@@ -22,6 +22,8 @@ + # include + #endif + ++#include "info.hpp" ++#include + #include "cache.hpp" + #include "asc_ctype.hpp" + #include "config.hpp" +@@ -310,6 +312,14 @@ namespace acommon { + const Entry * res = 0; + const Entry * cur = first_; + ++#ifdef ENABLE_W32_PREFIX ++ if (key == "prefix") ++ { ++ Entry *e = new Config::Entry(); ++ e->value = get_w32_prefix (); ++ return e; ++ } ++#endif + while (cur) { + if (cur->key == key && cur->action != NoOp) res = cur; + cur = cur->next; +diff --git a/common/info.cpp b/common/info.cpp +index 1111111..2222222 100644 +--- a/common/info.cpp ++++ b/common/info.cpp +@@ -39,6 +39,19 @@ + + #include "gettext.h" + ++#ifdef ENABLE_W32_PREFIX ++extern "C" { ++static HINSTANCE dll_hinstance; ++ ++BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) ++{ ++ if (fdwReason == DLL_PROCESS_ATTACH) ++ dll_hinstance = hinstDLL; ++ return TRUE; ++} ++} ++#endif ++ + namespace acommon { + + class Dir { +@@ -778,4 +791,60 @@ namespace acommon { + return data; + } + ++#ifdef ENABLE_W32_PREFIX ++ ++const char * ++get_w32_prefix () ++{ ++ ++ static char *wprefix = NULL; ++ ++/* ++ Entry * next; ++ String key; ++ String value; ++ String file; ++*/ ++ if (wprefix == NULL) ++ { ++ DWORD bsize = MAX_PATH; ++ DWORD l = bsize; ++ char *bslash, *slash; ++ char *buf = (char *) malloc (bsize); ++ while (l == bsize) ++ { ++ l = GetModuleFileNameA (dll_hinstance, buf, bsize); ++ if (l == 0) ++ { ++ DebugBreak (); ++ abort (); ++ } ++ if (l == bsize) ++ { ++ buf = (char *) realloc ((void *) buf, bsize * 2); ++ bsize *= 2; ++ l = bsize; ++ } ++ } ++ bslash = strrchr (buf, '\\'); ++ slash = strrchr (buf, '/'); ++ if (bslash > slash) ++ slash = bslash; ++ slash[0] = '\0'; ++ l = strlen (buf); ++ if (l > 3 && strcmp (&buf[l - 3], "bin") == 0) ++ { ++ bslash = strrchr (buf, '\\'); ++ slash = strrchr (buf, '/'); ++ if (bslash > slash) ++ slash = bslash; ++ slash[0] = '\0'; ++ } ++ wprefix = buf; ++ ++ } ++ return wprefix; ++} ++#endif ++ + } +diff --git a/common/info.hpp b/common/info.hpp +index 1111111..2222222 100644 +--- a/common/info.hpp ++++ b/common/info.hpp +@@ -140,8 +140,7 @@ namespace acommon { + }; + + +- +- ++ const char * get_w32_prefix (); + } + + #endif /* ASPELL_INFO__HPP */ + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore +Date: Sun, 31 Jan 2016 20:17:30 +1100 +Subject: [PATCH] w32 home + +taken from: +https://aur.archlinux.org/cgit/aur.git/plain/0005-w32-home.all.patch?h=mingw-w64-aspell + +diff --git a/common/config.cpp b/common/config.cpp +index 1111111..2222222 100644 +--- a/common/config.cpp ++++ b/common/config.cpp +@@ -664,6 +664,21 @@ namespace acommon { + } else { // sep == '|' + assert(replace[0] == '$'); + const char * env = getenv(replace.c_str()+1); ++ if (NULL == env && strcmp (replace.c_str() + 1, "HOME") == 0) ++ { ++ const char *hd, *hp; ++ hd = getenv("HOMEDRIVE"); ++ hp = getenv("HOMEPATH"); ++ if (hd && hp) ++ { ++ char tmpbuf[strlen ("HOME=") + strlen (hd) + strlen (hp) + 1]; ++ strcpy (tmpbuf, "HOME="); ++ strcpy (&tmpbuf[strlen ("HOME=")], hd); ++ strcpy (&tmpbuf[strlen ("HOME=") + strlen (hd)], hp); ++ putenv (tmpbuf); ++ env = getenv(replace.c_str()+1); ++ } ++ } + final_str += env ? env : second; + } + replace = ""; + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore +Date: Sun, 31 Jan 2016 20:18:24 +1100 +Subject: [PATCH] abort mingw + +taken from: +https://aur.archlinux.org/cgit/aur.git/plain/0006-abort.mingw.patch?h=mingw-w64-aspell + +diff --git a/common/config.cpp b/common/config.cpp +index 1111111..2222222 100644 +--- a/common/config.cpp ++++ b/common/config.cpp +@@ -623,7 +623,7 @@ namespace acommon { + + } else { + +- abort(); // this should not happen ++ DebugBreak(); // this should not happen + + } + +@@ -857,7 +857,7 @@ namespace acommon { + case ListClear: + return make_err(no_value_clear, entry->key); + default: +- abort(); // this shouldn't happen ++ DebugBreak(); // this shouldn't happen + } + } else { + entry->place_holder = -1; +diff --git a/common/itemize.cpp b/common/itemize.cpp +index 1111111..2222222 100644 +--- a/common/itemize.cpp ++++ b/common/itemize.cpp +@@ -12,6 +12,7 @@ + #include "mutable_container.hpp" + #include + #include ++#include + + //FIXME: it should be possible to escape ',' '+' '-' '!' so that they can + // appear in values +@@ -97,7 +98,7 @@ namespace acommon { + RET_ON_ERR(d.clear()); + break; + default: +- abort(); ++ DebugBreak(); + } + } + return no_err; +diff --git a/common/posib_err.cpp b/common/posib_err.cpp +index 1111111..2222222 100644 +--- a/common/posib_err.cpp ++++ b/common/posib_err.cpp +@@ -13,7 +13,7 @@ + #include "posib_err.hpp" + + #include "gettext.h" +- ++#include + + namespace acommon { + +@@ -100,7 +100,7 @@ namespace acommon { + fputs(_("Unhandled Error: "), stderr); + fputs(err_->err->mesg, stderr); + fputs("\n", stderr); +- abort(); ++ DebugBreak(); + } + #endif + +diff --git a/common/string_list.hpp b/common/string_list.hpp +index 1111111..2222222 100644 +--- a/common/string_list.hpp ++++ b/common/string_list.hpp +@@ -12,6 +12,7 @@ + #include "posib_err.hpp" + #include + #include ++#include + + namespace acommon { + +@@ -90,7 +91,7 @@ namespace acommon { + } + + bool empty() const { return first == 0; } +- unsigned int size() const { abort(); return 0; } ++ unsigned int size() const { DebugBreak(); return 0; } + + }; + +diff --git a/lib/find_speller.cpp b/lib/find_speller.cpp +index 1111111..2222222 100644 +--- a/lib/find_speller.cpp ++++ b/lib/find_speller.cpp +@@ -384,7 +384,7 @@ namespace acommon { + b_size.req_type = '+'; + } + if (!asc_isdigit(p[0]) || !asc_isdigit(p[1]) || p[2] != '\0') +- abort(); //FIXME: create an error condition here ++ DebugBreak(); //FIXME: create an error condition here + b_size.requested = atoi(p); + b_size.init(); + +diff --git a/modules/filter/tex.cpp b/modules/filter/tex.cpp +index 1111111..2222222 100644 +--- a/modules/filter/tex.cpp ++++ b/modules/filter/tex.cpp +@@ -24,6 +24,7 @@ + #include "string_enumeration.hpp" + + #include "gettext.h" ++#include + + namespace { + +diff --git a/modules/speller/default/data.cpp b/modules/speller/default/data.cpp +index 1111111..2222222 100644 +--- a/modules/speller/default/data.cpp ++++ b/modules/speller/default/data.cpp +@@ -17,6 +17,7 @@ + #include "vararray.hpp" + + #include "gettext.h" ++#include + + namespace aspeller { + +@@ -439,7 +440,7 @@ namespace aspeller { + w = new_default_replacement_dict(); + break; + default: +- abort(); ++ DebugBreak(); + } + + RET_ON_ERR(w->load(true_file_name, config, new_dicts, speller)); +diff --git a/modules/speller/default/phonetic.cpp b/modules/speller/default/phonetic.cpp +index 1111111..2222222 100644 +--- a/modules/speller/default/phonetic.cpp ++++ b/modules/speller/default/phonetic.cpp +@@ -7,6 +7,7 @@ + #include "file_util.hpp" + #include "file_data_util.hpp" + #include "clone_ptr-t.hpp" ++#include + + namespace aspeller { + +@@ -194,7 +195,7 @@ namespace aspeller { + } else if (name == lang->name()) { + sl = new PhonetSoundslike(lang); + } else { +- abort(); // FIXME ++ DebugBreak(); // FIXME + } + PosibErrBase pe = sl->setup(iconv); + if (pe.has_err()) { +diff --git a/modules/speller/default/readonly_ws.cpp b/modules/speller/default/readonly_ws.cpp +index 1111111..2222222 100644 +--- a/modules/speller/default/readonly_ws.cpp ++++ b/modules/speller/default/readonly_ws.cpp +@@ -55,6 +55,7 @@ using std::pair; + #include "iostream.hpp" + + #include "gettext.h" ++#include + + typedef unsigned int u32int; + static const u32int u32int_max = (u32int)-1; +@@ -102,7 +103,7 @@ static inline char * mmap_open(unsigned int, + + static inline void mmap_free(char *, unsigned int) + { +- abort(); ++ DebugBreak(); + } + + #endif +@@ -204,7 +205,7 @@ namespace { + InsensitiveHash hash; + InsensitiveEqual equal; + bool is_nonexistent(Value v) const {return v == u32int_max;} +- void make_nonexistent(const Value & v) const {abort();} ++ void make_nonexistent(const Value & v) const {DebugBreak();} + }; + typedef VectorHashTable WordLookup; + +diff --git a/modules/speller/default/speller_impl.cpp b/modules/speller/default/speller_impl.cpp +index 1111111..2222222 100644 +--- a/modules/speller/default/speller_impl.cpp ++++ b/modules/speller/default/speller_impl.cpp +@@ -380,7 +380,7 @@ namespace aspeller { + static PosibErr save_repl(SpellerImpl * m, bool value) { + // FIXME + // m->save_on_saveall(DataSet::Id(&m->personal_repl()), value); +- abort(); return no_err; ++ DebugBreak(); return no_err; + } + static PosibErr sug_mode(SpellerImpl * m, const char * mode) { + RET_ON_ERR(m->suggest_->set_mode(mode)); +@@ -683,7 +683,7 @@ namespace aspeller { + case Dict::multi_dict: + break; + default: +- abort(); ++ DebugBreak(); + } + save_on_saveall = false; + } +@@ -709,7 +709,7 @@ namespace aspeller { + + } else { + +- abort(); ++ DebugBreak(); + + } + break; +diff --git a/prog/aspell.cpp b/prog/aspell.cpp +index 1111111..2222222 100644 +--- a/prog/aspell.cpp ++++ b/prog/aspell.cpp +@@ -448,7 +448,7 @@ int main (int argc, const char *argv[]) + else if (action_str == "merge") + action = do_merge; + else +- abort(); // this should not happen ++ DebugBreak(); // this should not happen + + if (action != do_other) { + if (args.empty()) { +@@ -1498,7 +1498,7 @@ void dump (aspeller::Dict * lws, Convert * conv) + } + break; + default: +- abort(); ++ DebugBreak(); + } + } + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore +Date: Sun, 31 Jan 2016 20:19:16 +1100 +Subject: [PATCH] fix including langinfo + +taken from: +https://aur.archlinux.org/cgit/aur.git/plain/0007-fix-including-langinfo.patch?h=mingw-w64-aspell + +diff --git a/modules/speller/default/language.cpp b/modules/speller/default/language.cpp +index 1111111..2222222 100644 +--- a/modules/speller/default/language.cpp ++++ b/modules/speller/default/language.cpp +@@ -20,7 +20,7 @@ + #include "getdata.hpp" + #include "file_util.hpp" + +-#ifdef ENABLE_NLS ++#ifdef HAVE_LANGINFO_CODESET + # include + #endif + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore +Date: Tue, 2 Feb 2016 15:46:07 +1100 +Subject: [PATCH] add dlopen option + + +diff --git a/configure.ac b/configure.ac +index 1111111..2222222 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -58,6 +58,9 @@ AC_ARG_ENABLE(curses, + AC_ARG_ENABLE(curses-include, + [ --enable-curses-include=DIR]) + ++AC_ARG_ENABLE(dlopen, ++ [ --enable-dlopen]) ++ + AC_ARG_ENABLE(wide-curses, + AS_HELP_STRING([--disable-wide-curses],[disable wide char utf8 cursor control])) + +@@ -95,14 +98,17 @@ AC_LANG([C++]) + AM_PROG_CC_C_O + + AC_DISABLE_STATIC +-AC_LIBTOOL_DLOPEN + AC_PROG_LIBTOOL + ++if test "$enable_dlopen" = "yes" ++then + dnl DL stuff ++AC_LIBTOOL_DLOPEN + + AC_CHECK_HEADERS(dlfcn.h,,[enable_compile_in_filters=yes]) + AC_CHECK_FUNC(dlopen,, + AC_CHECK_LIB(dl, dlopen,,[enable_compile_in_filters=yes])) ++fi + + dnl + +@@ -165,9 +171,12 @@ then + AC_DEFINE(ENABLE_WIN32_RELOCATABLE, 1, [Defined if win32 relocation should be used]) + fi + ++if test "$enable_dlopen" = "yes" ++then + # DL stuff + AC_CHECK_HEADERS(dlfcn.h) + AC_CHECK_LIB(dl, dlopen) ++fi + + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + # # + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Kevin Atkinson +Date: Thu, 29 Dec 2016 00:50:31 -0500 +Subject: [PATCH] Compile Fixes for GCC 7. + +Closes #519. + +(cherry picked from commit 8089fa02122fed0a6394eba14bbedcb1d18e2384) + +diff --git a/modules/filter/tex.cpp b/modules/filter/tex.cpp +index 1111111..2222222 100644 +--- a/modules/filter/tex.cpp ++++ b/modules/filter/tex.cpp +@@ -175,7 +175,7 @@ namespace { + + if (c == '{') { + +- if (top.in_what == Parm || top.in_what == Opt || top.do_check == '\0') ++ if (top.in_what == Parm || top.in_what == Opt || *top.do_check == '\0') + push_command(Parm); + + top.in_what = Parm; +diff --git a/prog/check_funs.cpp b/prog/check_funs.cpp +index 1111111..2222222 100644 +--- a/prog/check_funs.cpp ++++ b/prog/check_funs.cpp +@@ -647,7 +647,7 @@ static void print_truncate(FILE * out, const char * word, int width) { + } + } + if (i == width-1) { +- if (word == '\0') ++ if (*word == '\0') + put(out,' '); + else if (word[len] == '\0') + put(out, word, len); diff --git a/src/aspell.mk b/src/aspell.mk index 1a6cb342..309570bc 100644 --- a/src/aspell.mk +++ b/src/aspell.mk @@ -1,26 +1,36 @@ -# 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 := aspell +$(PKG)_WEBSITE := http://aspell.net/ +$(PKG)_DESCR := Aspell $(PKG)_IGNORE := $(PKG)_VERSION := 0.60.6.1 $(PKG)_CHECKSUM := f52583a83a63633701c5f71db3dc40aab87b7f76b29723aeb27941eff42df6e1 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE) -$(PKG)_DEPS := gcc +$(PKG)_URL := https://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc gettext define $(PKG)_UPDATE - $(WGET) -q -O- 'http://ftp.gnu.org/gnu/aspell/' | \ + $(WGET) -q -O- 'https://ftp.gnu.org/gnu/aspell/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef define $(PKG)_BUILD + cd '$(1)' && $(LIBTOOLIZE) && autoreconf -fi cd '$(1)' && ./configure \ $(MXE_CONFIGURE_OPTS) \ --enable-win32-relocatable \ --disable-curses \ - --disable-nls + --disable-dlopen \ + --disable-pthreads \ + CPPFLAGS='-DENABLE_W32_PREFIX=1' + + # fix undefined reference to `libintl_dgettext' + # https://github.com/mxe/mxe/pull/1210#issuecomment-178471641 + $(if $(BUILD_SHARED),\ + $(SED) -i 's#^postdeps="-#postdeps="-lintl -#g' '$(1)/libtool') + $(MAKE) -C '$(1)' -j '$(JOBS)' install endef diff --git a/src/assimp-1-pkgconfig.patch b/src/assimp-1-pkgconfig.patch deleted file mode 100644 index 51021a84..00000000 --- a/src/assimp-1-pkgconfig.patch +++ /dev/null @@ -1,65 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -Taken from https://github.com/assimp/assimp/pull/405. - -From 060f3c33d9966dc55901e4d039ca30f6bff85de0 Mon Sep 17 00:00:00 2001 -From: Timothy Gu -Date: Tue, 14 Oct 2014 22:28:14 -0700 -Subject: Correctly set Libs.private field in pkgconfig file - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 97d4b68..b1c1f26 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -90,10 +90,6 @@ ELSE ( ASSIMP_BUILD_STATIC_LIB ) - option ( BUILD_SHARED_LIBS "Build a shared version of the library" ON ) - ENDIF ( ASSIMP_BUILD_STATIC_LIB ) - --# Generate a pkg-config .pc for the Assimp library. --CONFIGURE_FILE( "${PROJECT_SOURCE_DIR}/assimp.pc.in" "${PROJECT_BINARY_DIR}/assimp.pc" @ONLY ) --INSTALL( FILES "${PROJECT_BINARY_DIR}/assimp.pc" DESTINATION ${ASSIMP_LIB_INSTALL_DIR}/pkgconfig/ COMPONENT ${LIBASSIMP-DEV_COMPONENT}) -- - # Only generate this target if no higher-level project already has - IF (NOT TARGET uninstall) - # add make uninstall capability -@@ -136,6 +132,10 @@ option ( ASSIMP_NO_EXPORT - OFF - ) - -+if( CMAKE_COMPILER_IS_GNUCXX ) -+ set(LIBSTDC++_LIBRARIES -lstdc++) -+endif( CMAKE_COMPILER_IS_GNUCXX ) -+ - # Search for external dependencies, and build them from source if not found - # Search for zlib - find_package(ZLIB) -@@ -151,6 +151,7 @@ if( NOT ZLIB_FOUND ) - set(ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/contrib/zlib ${CMAKE_CURRENT_BINARY_DIR}/contrib/zlib) - else(NOT ZLIB_FOUND) - ADD_DEFINITIONS(-DASSIMP_BUILD_NO_OWN_ZLIB) -+ set(ZLIB_LIBRARIES_LINKED -lz) - endif(NOT ZLIB_FOUND) - INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) - -@@ -228,6 +229,10 @@ IF(MSVC) - ) - ENDIF(MSVC) - -+# Generate a pkg-config .pc for the Assimp library. -+CONFIGURE_FILE( "${PROJECT_SOURCE_DIR}/assimp.pc.in" "${PROJECT_BINARY_DIR}/assimp.pc" @ONLY ) -+INSTALL( FILES "${PROJECT_BINARY_DIR}/assimp.pc" DESTINATION ${ASSIMP_LIB_INSTALL_DIR}/pkgconfig/ COMPONENT ${LIBASSIMP-DEV_COMPONENT}) -+ - if(CMAKE_CPACK_COMMAND AND UNIX AND ASSIMP_OPT_BUILD_PACKAGES) - # Packing information - set(CPACK_PACKAGE_NAME "assimp{ASSIMP_VERSION_MAJOR}") -diff --git a/assimp.pc.in b/assimp.pc.in -index 1d3d995..ecb7074 100644 ---- a/assimp.pc.in -+++ b/assimp.pc.in -@@ -7,4 +7,5 @@ Name: @CMAKE_PROJECT_NAME@ - Description: Import various well-known 3D model formats in an uniform manner. - Version: @PROJECT_VERSION@ - Libs: -L${libdir} -lassimp@ASSIMP_LIBRARY_SUFFIX@ -+Libs.private: @LIBSTDC++_LIBRARIES@ @ZLIB_LIBRARIES_LINKED@ - Cflags: -I${includedir} diff --git a/src/assimp-test.c b/src/assimp-test.c index 24866cf1..5321558d 100644 --- a/src/assimp-test.c +++ b/src/assimp-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include diff --git a/src/assimp.mk b/src/assimp.mk index 566a1805..eac5ab43 100644 --- a/src/assimp.mk +++ b/src/assimp.mk @@ -1,35 +1,26 @@ -# 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 := assimp +$(PKG)_WEBSITE := https://assimp.sourceforge.io/ +$(PKG)_DESCR := Assimp Open Asset Import Library $(PKG)_IGNORE := -$(PKG)_VERSION := 3.1.1 -$(PKG)_CHECKSUM := 3b8d16eaf6c4b26479295f4f7436388bee1e42e8c0b11f6f695b7194985eb00e -$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) -$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).zip -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)-$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_VERSION := 3.2 +$(PKG)_CHECKSUM := 187f825c563e84b1b17527a4da0351aa3d575dfd696a9d204ae4bb19ee7df94a +$(PKG)_GH_CONF := assimp/assimp, v $(PKG)_DEPS := gcc boost -define $(PKG)_UPDATE - $(WGET) -q -O- "https://api.github.com/repos/assimp/assimp/releases" | \ - grep 'tag_name' | \ - $(SED) -n 's,.*tag_name": "v\([0-9][^>]*\)".*,\1,p' | \ - $(SORT) -Vr | \ - head -1 -endef - define $(PKG)_BUILD - mkdir '$(1)/build' - cd '$(1)/build' && $(TARGET)-cmake $(1) \ + cd '$(BUILD_DIR)' && $(TARGET)-cmake \ -DASSIMP_ENABLE_BOOST_WORKAROUND=OFF \ -DASSIMP_BUILD_ASSIMP_TOOLS=OFF \ - -DASSIMP_BUILD_SAMPLES=OFF \ - -DASSIMP_BUILD_TESTS=OFF \ - -DASSIMP_BUILD_STATIC_LIB=$(if $(BUILD_STATIC),ON,OFF) - $(MAKE) -C '$(1)/build' -j '$(JOBS)' install VERBOSE=1 + -DASSIMP_BUILD_SAMPLES=OFF \ + -DASSIMP_BUILD_TESTS=OFF \ + '$(SOURCE_DIR)' + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-assimp.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-assimp.exe' \ `'$(TARGET)-pkg-config' assimp --cflags --libs` endef diff --git a/src/atk-1-DllMain.patch b/src/atk-1-DllMain.patch index 69b8d46f..92389e41 100644 --- a/src/atk-1-DllMain.patch +++ b/src/atk-1-DllMain.patch @@ -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. diff -uNr a/atk/atkprivate.c b/atk/atkprivate.c --- a/atk/atkprivate.c diff --git a/src/atk.mk b/src/atk.mk index f36816cc..aef6e983 100644 --- a/src/atk.mk +++ b/src/atk.mk @@ -1,17 +1,18 @@ -# 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 := atk +$(PKG)_WEBSITE := https://gtk.org/ +$(PKG)_DESCR := ATK $(PKG)_IGNORE := $(PKG)_VERSION := 2.16.0 $(PKG)_CHECKSUM := 095f986060a6a0b22eb15eef84ae9f14a1cf8082488faa6886d94c37438ae562 $(PKG)_SUBDIR := atk-$($(PKG)_VERSION) $(PKG)_FILE := atk-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/atk/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/atk/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc gettext glib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/atk/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/atk/refs/tags' | \ grep ']*>\([0-9][^<]*\)<.*,\1,p' | \ head -1 diff --git a/src/aubio-1-fixes.patch b/src/aubio-1-fixes.patch index 4f543e81..84fb628c 100644 --- a/src/aubio-1-fixes.patch +++ b/src/aubio-1-fixes.patch @@ -1,12 +1,103 @@ -From a34301d5fcdb6187dceb508bab341727ec57d0b4 Mon Sep 17 00:00:00 2001 -From: Timothy Gu -Date: Fri, 14 Nov 2014 16:37:52 -0500 -Subject: [PATCH 1/4] Add options for enabling shared and/or static libraries +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: Paul Brossier +Date: Tue, 5 Jan 2016 21:28:06 -0500 +Subject: [PATCH] wscript: check HAVE_AV* from ctx.env + +From https://github.com/aubio/aubio/commit/eb6899125ac83900710180c02b94bc593a1426d2 + +diff --git a/wscript b/wscript +index 1111111..2222222 100644 +--- a/wscript ++++ b/wscript +@@ -226,7 +226,7 @@ def configure(ctx): + args = '--cflags --libs', uselib_store = 'AVUTIL', mandatory = False) + ctx.check_cfg(package = 'libavresample', atleast_version = '1.0.1', + args = '--cflags --libs', uselib_store = 'AVRESAMPLE', mandatory = False) +- if all ( 'HAVE_' + i in ctx.env.define_key ++ if all ( 'HAVE_' + i in ctx.env + for i in ['AVCODEC', 'AVFORMAT', 'AVUTIL', 'AVRESAMPLE'] ): + ctx.define('HAVE_LIBAV', 1) + ctx.msg('Checking for all libav libraries', 'yes') + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Timothy Gu +Date: Tue, 5 Jan 2016 21:47:01 -0500 +Subject: [PATCH] wscript: check more variables from ctx.env + + +diff --git a/wscript b/wscript +index 1111111..2222222 100644 +--- a/wscript ++++ b/wscript +@@ -192,11 +192,11 @@ def configure(ctx): + ctx.define('HAVE_FFTW3', 1) + + # fftw not enabled, use vDSP or ooura +- if 'HAVE_FFTW3F' in ctx.env.define_key: ++ if 'HAVE_FFTW3F' in ctx.env: + ctx.msg('Checking for FFT implementation', 'fftw3f') +- elif 'HAVE_FFTW3' in ctx.env.define_key: ++ elif 'HAVE_FFTW3' in ctx.env: + ctx.msg('Checking for FFT implementation', 'fftw3') +- elif 'HAVE_ACCELERATE' in ctx.env.define_key: ++ elif 'HAVE_ACCELERATE' in ctx.env: + ctx.msg('Checking for FFT implementation', 'vDSP') + else: + ctx.msg('Checking for FFT implementation', 'ooura') + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Timothy Gu +Date: Tue, 5 Jan 2016 22:48:20 -0500 +Subject: [PATCH] wscript: fftw3 support requires pthreads + + +diff --git a/wscript b/wscript +index 1111111..2222222 100644 +--- a/wscript ++++ b/wscript +@@ -194,8 +194,10 @@ def configure(ctx): + # fftw not enabled, use vDSP or ooura + if 'HAVE_FFTW3F' in ctx.env: + ctx.msg('Checking for FFT implementation', 'fftw3f') ++ ctx.env.LINKFLAGS += ['-pthread'] + elif 'HAVE_FFTW3' in ctx.env: + ctx.msg('Checking for FFT implementation', 'fftw3') ++ ctx.env.LINKFLAGS += ['-pthread'] + elif 'HAVE_ACCELERATE' in ctx.env: + ctx.msg('Checking for FFT implementation', 'vDSP') + else: + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Timothy Gu +Date: Tue, 5 Jan 2016 22:18:21 -0500 +Subject: [PATCH] wscript: Install static library -Signed-off-by: Timothy Gu diff --git a/src/wscript_build b/src/wscript_build -index 94b2062..1a72e4a 100644 +index 1111111..2222222 100644 +--- a/src/wscript_build ++++ b/src/wscript_build +@@ -38,3 +38,7 @@ for target in build_features: + ctx.install_files('${PREFIX}/include/aubio/', + ctx.path.ant_glob('**/*.h', excl = ['**_priv.h', 'config.h']), + relative_trick=True) ++ ++# install static libs ++from waflib.Tools.c import cstlib ++cstlib.inst_to = '${LIBDIR}' + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Timothy Gu +Date: Tue, 5 Jan 2016 21:15:37 -0500 +Subject: [PATCH] Add options for enabling shared and/or static libraries + + +diff --git a/src/wscript_build b/src/wscript_build +index 1111111..2222222 100644 --- a/src/wscript_build +++ b/src/wscript_build @@ -18,13 +18,11 @@ ctx(features = 'c', @@ -21,23 +112,23 @@ index 94b2062..1a72e4a 100644 -else: #linux, darwin, android, mingw, ... - build_features = ['cshlib', 'cstlib'] +build_features = [] -+if ctx.options.enable_shared: ++if ctx.env.HAVE_SHARED: + build_features += ['cshlib'] -+if ctx.options.enable_static: ++if ctx.env.HAVE_STATIC: + build_features += ['cstlib'] for target in build_features: ctx(features = 'c ' + target, diff --git a/wscript b/wscript -index 83ad7b8..7013f12 100644 +index 1111111..2222222 100644 --- a/wscript +++ b/wscript -@@ -73,6 +73,13 @@ def options(ctx): - help_str = 'compile in double precision mode', - help_disable_str = 'compile in single precision mode (default)') +@@ -76,6 +76,13 @@ def options(ctx): + help_str = 'build fat binaries (darwin only)', + help_disable_str = 'do not build fat binaries (default)') + add_option_enable_disable(ctx, 'shared', default = True, -+ help_str = 'compile shared libraries (defaut)', ++ help_str = 'compile shared libraries (default)', + help_disable_str = 'do not compile shared library') + add_option_enable_disable(ctx, 'static', default = True, + help_str = 'compile static libraries (default)', @@ -46,45 +137,27 @@ index 83ad7b8..7013f12 100644 ctx.add_option('--with-target-platform', type='string', help='set target platform for cross-compilation', dest='target_platform') --- -1.9.1 - - -From e133535438a965b3f6f7f0cac5cb5c062c07829f Mon Sep 17 00:00:00 2001 -From: Timothy Gu -Date: Fri, 14 Nov 2014 16:39:51 -0500 -Subject: [PATCH 2/4] fftw3 support requires -pthread - -Signed-off-by: Timothy Gu - -diff --git a/wscript b/wscript -index 7013f12..052fb27 100644 ---- a/wscript -+++ b/wscript -@@ -197,8 +197,10 @@ def configure(ctx): - # fftw not enabled, use vDSP or ooura - if 'HAVE_FFTW3F' in ctx.env.define_key: - ctx.msg('Checking for FFT implementation', 'fftw3f') -+ ctx.env.LINKFLAGS += ['-pthread'] - elif 'HAVE_FFTW3' in ctx.env.define_key: - ctx.msg('Checking for FFT implementation', 'fftw3') -+ ctx.env.LINKFLAGS += ['-pthread'] - elif 'HAVE_ACCELERATE' in ctx.env.define_key: - ctx.msg('Checking for FFT implementation', 'vDSP') +@@ -99,7 +106,10 @@ def configure(ctx): else: --- -1.9.1 + ctx.env.CFLAGS += ['-Wall'] + +- if target_platform not in ['win32', 'win64']: ++ ctx.env.HAVE_SHARED = int(ctx.options.enable_shared) ++ ctx.env.HAVE_STATIC = int(ctx.options.enable_static) ++ ++ if not ctx.options.enable_shared and target_platform not in ['win32', 'win64']: + ctx.env.CFLAGS += ['-fPIC'] + else: + ctx.define('HAVE_WIN_HACKS', 1) - -From 16fda40e02065b670b63e193a453357051ca9c33 Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Timothy Gu -Date: Fri, 14 Nov 2014 16:40:53 -0500 -Subject: [PATCH 3/4] Add static deps to pkgconfig file +Date: Tue, 5 Jan 2016 21:25:46 -0500 +Subject: [PATCH] Add static deps to pkgconfig file -Signed-off-by: Timothy Gu diff --git a/aubio.pc.in b/aubio.pc.in -index 301a1b5..0cd2281 100644 +index 1111111..2222222 100644 --- a/aubio.pc.in +++ b/aubio.pc.in @@ -6,5 +6,7 @@ includedir=@includedir@ @@ -96,10 +169,10 @@ index 301a1b5..0cd2281 100644 +Libs.private: @PCLIBS@ Cflags: -I${includedir} diff --git a/wscript b/wscript -index 052fb27..424bcf8 100644 +index 1111111..2222222 100644 --- a/wscript +++ b/wscript -@@ -176,6 +176,8 @@ def configure(ctx): +@@ -183,6 +183,8 @@ def configure(ctx): if (ctx.options.enable_complex == True): ctx.check(header_name='complex.h') @@ -108,44 +181,44 @@ index 052fb27..424bcf8 100644 # check for fftw3 if (ctx.options.enable_fftw3 != False or ctx.options.enable_fftw3f != False): # one of fftwf or fftw3f -@@ -197,9 +199,13 @@ def configure(ctx): +@@ -204,9 +206,13 @@ def configure(ctx): # fftw not enabled, use vDSP or ooura - if 'HAVE_FFTW3F' in ctx.env.define_key: + if 'HAVE_FFTW3F' in ctx.env: ctx.msg('Checking for FFT implementation', 'fftw3f') + pcrequires += ['fftw3f >= 3.0.0'] -+ pclibs += ['-lpthread'] ++ pclibs += ['-pthread'] ctx.env.LINKFLAGS += ['-pthread'] - elif 'HAVE_FFTW3' in ctx.env.define_key: + elif 'HAVE_FFTW3' in ctx.env: ctx.msg('Checking for FFT implementation', 'fftw3') + pcrequires += ['fftw3 >= 3.0.0'] -+ pclibs += ['-lpthread'] ++ pclibs += ['-pthread'] ctx.env.LINKFLAGS += ['-pthread'] - elif 'HAVE_ACCELERATE' in ctx.env.define_key: + elif 'HAVE_ACCELERATE' in ctx.env: ctx.msg('Checking for FFT implementation', 'vDSP') -@@ -210,16 +216,22 @@ def configure(ctx): +@@ -217,16 +223,22 @@ def configure(ctx): if (ctx.options.enable_sndfile != False): ctx.check_cfg(package = 'sndfile', atleast_version = '1.0.4', args = '--cflags --libs', mandatory = False) -+ if 'HAVE_SNDFILE' in ctx.env.define_key: ++ if 'HAVE_SNDFILE' in ctx.env: + pcrequires += ['sndfile >= 1.0.4'] # check for libsamplerate if (ctx.options.enable_samplerate != False): ctx.check_cfg(package = 'samplerate', atleast_version = '0.0.15', args = '--cflags --libs', mandatory = False) -+ if 'HAVE_SAMPLERATE' in ctx.env.define_key: ++ if 'HAVE_SAMPLERATE' in ctx.env: + pcrequires += ['samplerate >= 0.0.15'] # check for jack if (ctx.options.enable_jack != False): ctx.check_cfg(package = 'jack', args = '--cflags --libs', mandatory = False) -+ if 'HAVE_JACK' in ctx.env.define_key: ++ if 'HAVE_JACK' in ctx.env: + pcrequires += ['jack'] # check for libav if (ctx.options.enable_avcodec != False): -@@ -235,9 +247,13 @@ def configure(ctx): +@@ -242,9 +254,13 @@ def configure(ctx): for i in ['AVCODEC', 'AVFORMAT', 'AVUTIL', 'AVRESAMPLE'] ): ctx.define('HAVE_LIBAV', 1) ctx.msg('Checking for all libav libraries', 'yes') @@ -159,22 +232,18 @@ index 052fb27..424bcf8 100644 ctx.define('HAVE_WAVREAD', 1) ctx.define('HAVE_WAVWRITE', 1) --- -1.9.1 - -From 407863716f05ffca5b2241d7dcedb3d1c1ae87ad Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Timothy Gu -Date: Fri, 14 Nov 2014 16:45:04 -0500 -Subject: [PATCH 4/4] [MXE] disable tests and examples +Date: Tue, 5 Jan 2016 21:27:05 -0500 +Subject: [PATCH] [MXE] disable tests and examples -Signed-off-by: Timothy Gu diff --git a/wscript b/wscript -index 424bcf8..7f135b5 100644 +index 1111111..2222222 100644 --- a/wscript +++ b/wscript -@@ -290,9 +290,9 @@ def build(bld): +@@ -297,9 +297,9 @@ def build(bld): bld.recurse('src') if bld.env['DEST_OS'] not in ['ios', 'iosimulator']: pass @@ -182,11 +251,8 @@ index 424bcf8..7f135b5 100644 - bld.recurse('examples') - bld.recurse('tests') + #if bld.env['DEST_OS'] not in ['ios', 'iosimulator', 'android']: -+ #bld.recurse('examples') -+ #bld.recurse('tests') ++ # bld.recurse('examples') ++ # bld.recurse('tests') bld( source = 'aubio.pc.in' ) --- -1.9.1 - diff --git a/src/aubio-test.c b/src/aubio-test.c index c7782f04..083b473d 100644 --- a/src/aubio-test.c +++ b/src/aubio-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include diff --git a/src/aubio.mk b/src/aubio.mk index 8c7adbe3..df75cec9 100644 --- a/src/aubio.mk +++ b/src/aubio.mk @@ -1,46 +1,45 @@ -# 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 := aubio +$(PKG)_WEBSITE := https://www.aubio.org/ $(PKG)_IGNORE := $(PKG)_VERSION := 0.4.2 $(PKG)_CHECKSUM := 1cc58e0fed2b9468305b198ad06b889f228b797a082c2ede716dc30fcb4f8f1f $(PKG)_SUBDIR := aubio-$($(PKG)_VERSION) $(PKG)_FILE := aubio-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://www.aubio.org/pub/$($(PKG)_FILE) -$(PKG)_DEPS := gcc ffmpeg fftw jack libsamplerate libsndfile +$(PKG)_URL := https://www.aubio.org/pub/$($(PKG)_FILE) +$(PKG)_DEPS := gcc ffmpeg fftw jack libsamplerate libsndfile waf define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.aubio.org/download' | \ + $(WGET) -q -O- 'https://www.aubio.org/download' | \ $(SED) -n 's,.*aubio-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef define $(PKG)_BUILD + rm -rf '$(1)/waf' '$(1)/waflib' cd '$(1)' && \ AR='$(TARGET)-ar' \ CC='$(TARGET)-gcc' \ PKGCONFIG='$(TARGET)-pkg-config' \ - ./waf configure \ + '$(PREFIX)/$(BUILD)/bin/waf' \ + configure \ -j '$(JOBS)' \ --with-target-platform='win$(BITS)' \ --prefix='$(PREFIX)/$(TARGET)' \ --enable-fftw3f \ + --libdir='$(PREFIX)/$(TARGET)/lib' \ $(if $(BUILD_STATIC), \ - --enable-static --disable-shared, \ + --enable-static --disable-shared --disable-jack, \ --disable-static --enable-shared) # disable txt2man and doxygen $(SED) -i '/\(TXT2MAN\|DOXYGEN\)/d' '$(1)/build/c4che/_cache.py' - cd '$(1)' && ./waf build install - - # It is not trivial to adjust the installation in waf-based builds - $(if $(BUILD_STATIC), \ - $(INSTALL) -m644 '$(1)/build/src/libaubio.a' '$(PREFIX)/$(TARGET)/lib') + cd '$(1)' && '$(PREFIX)/$(BUILD)/bin/waf' build install '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-aubio.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-aubio.exe' \ `'$(TARGET)-pkg-config' aubio --cflags --libs` endef diff --git a/src/bfd-1-disable-subdir-doc.patch b/src/bfd-1-disable-subdir-doc.patch index f5e62a6e..7d6e946a 100644 --- a/src/bfd-1-disable-subdir-doc.patch +++ b/src/bfd-1-disable-subdir-doc.patch @@ -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 e64e4a2b049ff472d6400d9650e295c1ebd6294b Mon Sep 17 00:00:00 2001 From: Boris Nagaev diff --git a/src/bfd.mk b/src/bfd.mk index 2fe2af03..8d64bcaf 100644 --- a/src/bfd.mk +++ b/src/bfd.mk @@ -1,7 +1,8 @@ -# 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 := bfd +$(PKG)_WEBSITE := https://www.gnu.org/software/binutils/ +$(PKG)_DESCR := Binary File Descriptor library $(PKG)_IGNORE = $(binutils_IGNORE) $(PKG)_VERSION = $(binutils_VERSION) $(PKG)_CHECKSUM = $(binutils_CHECKSUM) diff --git a/src/binutils.mk b/src/binutils.mk index 7d3d1ce2..5ad0b355 100644 --- a/src/binutils.mk +++ b/src/binutils.mk @@ -1,18 +1,21 @@ -# 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 := binutils -$(PKG)_IGNORE := +$(PKG)_WEBSITE := https://www.gnu.org/software/binutils/ +$(PKG)_DESCR := GNU Binutils +# see https://lists.nongnu.org/archive/html/mingw-cross-env-list/2016-01/msg00013.html +# 2.26 causes incorrect dlls to be built with sjlj exceptions +$(PKG)_IGNORE := 2.26 $(PKG)_VERSION := 2.25.1 $(PKG)_CHECKSUM := b5b14added7d78a8d1ca70b5cb75fef57ce2197264f4f5835326b0df22ac9f22 $(PKG)_SUBDIR := binutils-$($(PKG)_VERSION) $(PKG)_FILE := binutils-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://ftp.gnu.org/pub/gnu/binutils/$($(PKG)_FILE) -$(PKG)_URL_2 := ftp://ftp.cs.tu-berlin.de/pub/gnu/binutils/$($(PKG)_FILE) +$(PKG)_URL := https://ftp.gnu.org/gnu/binutils/$($(PKG)_FILE) +$(PKG)_URL_2 := https://ftpmirror.gnu.org/binutils/$($(PKG)_FILE) $(PKG)_DEPS := pkgconf define $(PKG)_UPDATE - $(WGET) -q -O- 'http://ftp.gnu.org/gnu/binutils/?C=M;O=D' | \ + $(WGET) -q -O- 'https://ftp.gnu.org/gnu/binutils/?C=M;O=D' | \ $(SED) -n 's,.* -Date: Sun, 29 Mar 2015 12:55:15 +0200 -Subject: [PATCH 1/3] fixes +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: xantares +Date: Mon, 28 Sep 2015 08:21:42 +0000 +Subject: [PATCH] Fix {make,jump}_fcontext visibility with mingw -This patch has been taken from: -https://aur.archlinux.org/packages/mingw-w64-boost/ +taken from: https://github.com/boostorg/context/pull/22 -diff --git a/boost/detail/interlocked.hpp b/boost/detail/interlocked.hpp -index 2c91ce2..abc7c6d 100644 ---- a/boost/detail/interlocked.hpp -+++ b/boost/detail/interlocked.hpp -@@ -1,6 +1,10 @@ - #ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED - #define BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED +diff --git a/libs/context/src/asm/jump_i386_ms_pe_gas.asm b/src/asm/jump_i386_ms_pe_gas.asm +index 1111111..2222222 100644 +--- a/libs/context/src/asm/jump_i386_ms_pe_gas.asm ++++ b/libs/context/src/asm/jump_i386_ms_pe_gas.asm +@@ -138,3 +138,6 @@ _jump_fcontext: -+#ifndef BOOST_USE_WINDOWS_H -+#define BOOST_USE_WINDOWS_H -+#endif + /* indirect jump to context */ + jmp *%edx + - // - // boost/detail/interlocked.hpp - // -diff --git a/boost/detail/interlocked.hpp.orig b/boost/detail/interlocked.hpp.orig -new file mode 100644 -index 0000000..2c91ce2 ---- /dev/null -+++ b/boost/detail/interlocked.hpp.orig -@@ -0,0 +1,218 @@ -+#ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED -+#define BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED ++.section .drectve ++.ascii " -export:\"jump_fcontext\"" +diff --git a/libs/context/src/asm/jump_x86_64_ms_pe_gas.asm b/src/asm/jump_x86_64_ms_pe_gas.asm +index 1111111..2222222 100644 +--- a/libs/context/src/asm/jump_x86_64_ms_pe_gas.asm ++++ b/libs/context/src/asm/jump_x86_64_ms_pe_gas.asm +@@ -223,3 +223,6 @@ jump_fcontext: + /* indirect jump to context */ + jmp *%r10 + .seh_endproc + -+// -+// boost/detail/interlocked.hpp -+// -+// Copyright 2005 Peter Dimov -+// -+// Distributed under the Boost Software License, Version 1.0. (See -+// accompanying file LICENSE_1_0.txt or copy at -+// http://www.boost.org/LICENSE_1_0.txt) -+// -+ -+#include -+ -+// MS compatible compilers support #pragma once -+#ifdef BOOST_HAS_PRAGMA_ONCE -+#pragma once -+#endif -+ -+#if defined( BOOST_USE_WINDOWS_H ) -+ -+# include -+ -+# define BOOST_INTERLOCKED_INCREMENT InterlockedIncrement -+# define BOOST_INTERLOCKED_DECREMENT InterlockedDecrement -+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange -+# define BOOST_INTERLOCKED_EXCHANGE InterlockedExchange -+# define BOOST_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd -+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER InterlockedCompareExchangePointer -+# define BOOST_INTERLOCKED_EXCHANGE_POINTER InterlockedExchangePointer -+ -+#elif defined( BOOST_USE_INTRIN_H ) -+ -+#include -+ -+# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement -+# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement -+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange -+# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange -+# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd -+ -+# if defined(_M_IA64) || defined(_M_AMD64) || defined(__x86_64__) || defined(__x86_64) -+ -+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer -+# define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer -+ -+# else -+ -+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \ -+ ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare))) -+# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \ -+ ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange))) -+ -+# endif -+ -+#elif defined(_WIN32_WCE) -+ -+#if _WIN32_WCE >= 0x600 -+ -+extern "C" long __cdecl _InterlockedIncrement( long volatile * ); -+extern "C" long __cdecl _InterlockedDecrement( long volatile * ); -+extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long ); -+extern "C" long __cdecl _InterlockedExchange( long volatile *, long ); -+extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long ); -+ -+# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement -+# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement -+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange -+# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange -+# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd -+ -+#else -+// under Windows CE we still have old-style Interlocked* functions -+ -+extern "C" long __cdecl InterlockedIncrement( long* ); -+extern "C" long __cdecl InterlockedDecrement( long* ); -+extern "C" long __cdecl InterlockedCompareExchange( long*, long, long ); -+extern "C" long __cdecl InterlockedExchange( long*, long ); -+extern "C" long __cdecl InterlockedExchangeAdd( long*, long ); -+ -+# define BOOST_INTERLOCKED_INCREMENT InterlockedIncrement -+# define BOOST_INTERLOCKED_DECREMENT InterlockedDecrement -+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange -+# define BOOST_INTERLOCKED_EXCHANGE InterlockedExchange -+# define BOOST_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd -+ -+#endif -+ -+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \ -+ ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long*)(dest),(long)(exchange),(long)(compare))) -+# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \ -+ ((void*)BOOST_INTERLOCKED_EXCHANGE((long*)(dest),(long)(exchange))) -+ -+#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN ) -+ -+#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1400 -+ -+#include -+ -+#else -+ -+# if defined( __CLRCALL_PURE_OR_CDECL ) -+# define BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL __CLRCALL_PURE_OR_CDECL -+# else -+# define BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL __cdecl -+# endif -+ -+extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedIncrement( long volatile * ); -+extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedDecrement( long volatile * ); -+extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedCompareExchange( long volatile *, long, long ); -+extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedExchange( long volatile *, long ); -+extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd( long volatile *, long ); -+ -+# undef BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL -+ -+# if defined( BOOST_MSVC ) && BOOST_MSVC >= 1310 -+# pragma intrinsic( _InterlockedIncrement ) -+# pragma intrinsic( _InterlockedDecrement ) -+# pragma intrinsic( _InterlockedCompareExchange ) -+# pragma intrinsic( _InterlockedExchange ) -+# pragma intrinsic( _InterlockedExchangeAdd ) -+# endif -+ -+#endif -+ -+# if defined(_M_IA64) || defined(_M_AMD64) -+ -+extern "C" void* __cdecl _InterlockedCompareExchangePointer( void* volatile *, void*, void* ); -+extern "C" void* __cdecl _InterlockedExchangePointer( void* volatile *, void* ); -+ -+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer -+# define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer -+ -+# else -+ -+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \ -+ ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare))) -+# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \ -+ ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange))) -+ -+# endif -+ -+# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement -+# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement -+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange -+# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange -+# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd -+ -+// Unlike __MINGW64__, __MINGW64_VERSION_MAJOR is defined by MinGW-w64 for both 32 and 64-bit targets. -+#elif defined(__MINGW64_VERSION_MAJOR) -+ -+// MinGW-w64 provides intrin.h for both 32 and 64-bit targets. -+#include -+ -+# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement -+# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement -+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange -+# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange -+# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd -+# if defined(__x86_64__) || defined(__x86_64) -+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer -+# define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer -+# else -+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \ -+ ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare))) -+# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \ -+ ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange))) -+# endif -+ -+#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ ) -+ -+#define BOOST_INTERLOCKED_IMPORT __declspec(dllimport) -+ -+namespace boost -+{ -+ -+namespace detail -+{ -+ -+extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedIncrement( long volatile * ); -+extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedDecrement( long volatile * ); -+extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedCompareExchange( long volatile *, long, long ); -+extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchange( long volatile *, long ); -+extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchangeAdd( long volatile *, long ); -+ -+# if defined(_M_IA64) || defined(_M_AMD64) -+extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedCompareExchangePointer( void* volatile *, void*, void* ); -+extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer( void* volatile *, void* ); -+# endif -+ -+} // namespace detail -+ -+} // namespace boost -+ -+# define BOOST_INTERLOCKED_INCREMENT ::boost::detail::InterlockedIncrement -+# define BOOST_INTERLOCKED_DECREMENT ::boost::detail::InterlockedDecrement -+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE ::boost::detail::InterlockedCompareExchange -+# define BOOST_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange -+# define BOOST_INTERLOCKED_EXCHANGE_ADD ::boost::detail::InterlockedExchangeAdd -+ -+# if defined(_M_IA64) || defined(_M_AMD64) -+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER ::boost::detail::InterlockedCompareExchangePointer -+# define BOOST_INTERLOCKED_EXCHANGE_POINTER ::boost::detail::InterlockedExchangePointer -+# else -+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \ -+ ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare))) -+# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \ -+ ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange))) -+# endif -+ -+#else -+ -+# error "Interlocked intrinsics not available" -+ -+#endif -+ -+#endif // #ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED -diff --git a/libs/context/build/Jamfile.v2 b/libs/context/build/Jamfile.v2 -index 7cc8a07..2143ed3 100644 ---- a/libs/context/build/Jamfile.v2 -+++ b/libs/context/build/Jamfile.v2 -@@ -581,6 +581,17 @@ alias asm_context_sources - ; ++.section .drectve ++.ascii " -export:\"jump_fcontext\"" +diff --git a/libs/context/src/asm/make_i386_ms_pe_gas.asm b/src/asm/make_i386_ms_pe_gas.asm +index 1111111..2222222 100644 +--- a/libs/context/src/asm/make_i386_ms_pe_gas.asm ++++ b/libs/context/src/asm/make_i386_ms_pe_gas.asm +@@ -122,3 +122,6 @@ finish: + hlt - alias asm_context_sources -+ : asm/make_i386_ms_pe_gas.S -+ asm/jump_i386_ms_pe_gas.S -+ dummy.cpp -+ : 32 -+ x86 -+ pe -+ windows -+ gcc -+ ; + .def __exit; .scl 2; .type 32; .endef /* standard C library function */ + -+alias asm_context_sources - : asm/make_i386_ms_pe_masm.asm - asm/jump_i386_ms_pe_masm.asm - dummy.cpp -@@ -715,6 +726,17 @@ alias asm_context_sources - ; ++.section .drectve ++.ascii " -export:\"make_fcontext\"" +diff --git a/libs/context/src/asm/make_x86_64_ms_pe_gas.asm b/src/asm/make_x86_64_ms_pe_gas.asm +index 1111111..2222222 100644 +--- a/libs/context/src/asm/make_x86_64_ms_pe_gas.asm ++++ b/libs/context/src/asm/make_x86_64_ms_pe_gas.asm +@@ -149,3 +149,6 @@ finish: + .seh_endproc - alias asm_context_sources -+ : asm/make_x86_64_ms_pe_gas.S -+ asm/jump_x86_64_ms_pe_gas.S -+ dummy.cpp -+ : 64 -+ x86 -+ pe -+ windows -+ gcc -+ ; + .def _exit; .scl 2; .type 32; .endef /* standard C library function */ + -+alias asm_context_sources - : asm/make_x86_64_ms_pe_masm.asm - asm/jump_x86_64_ms_pe_masm.asm - dummy.cpp -diff --git a/libs/context/build/Jamfile.v2.orig b/libs/context/build/Jamfile.v2.orig -new file mode 100644 -index 0000000..7cc8a07 ---- /dev/null -+++ b/libs/context/build/Jamfile.v2.orig -@@ -0,0 +1,775 @@ -+ -+# Boost.Context Library Build Jamfile -+ -+# Copyright Oliver Kowalke 2009. -+# Distributed under the Boost Software License, Version 1.0. -+# (See accompanying file LICENSE_1_0.txt or copy at -+# http://www.boost.org/LICENSE_1_0.txt) -+ -+import common ; -+import feature ; -+import indirect ; -+import modules ; -+import os ; -+import toolset ; -+import architecture ; -+ -+project boost/context -+ : requirements -+ SOLARIS:_XOPEN_SOURCE=600 -+ shared:BOOST_CONTEXT_DYN_LINK=1 -+ BOOST_CONTEXT_SOURCE -+ : usage-requirements -+ shared:BOOST_CONTEXT_DYN_LINK=1 -+ : source-location ../src -+ ; -+ -+local rule default_binary_format ( ) -+{ -+ local tmp = elf ; -+ if [ os.name ] = "MACOSX" { tmp = mach-o ; } -+ if [ os.name ] = "NT" { tmp = pe ; } -+ if [ os.name ] = "AIX" { tmp = xcoff ; } -+ return $(tmp) ; -+} -+ -+feature.feature binary-format -+ : elf -+ mach-o -+ pe -+ xcoff -+ : propagated -+ ; -+feature.set-default binary-format : [ default_binary_format ] ; -+ -+ -+local rule default_abi ( ) -+{ -+ local tmp = sysv ; -+ if [ os.name ] = "NT" { tmp = ms ; } -+ else if [ os.platform ] = "ARM" { tmp = aapcs ; } -+ else if [ os.platform ] = "MIPS" { tmp = o32 ; } -+ return $(tmp) ; -+} -+ -+feature.feature abi -+ : aapcs -+ eabi -+ ms -+ n32 -+ n64 -+ o32 -+ o64 -+ sysv -+ x32 -+ : propagated -+ ; -+feature.set-default abi : [ default_abi ] ; -+ -+ -+actions gas32 -+{ -+ cpp -x assembler-with-cpp "$(>)" | as --32 -o "$(<)" -+} -+ -+actions gas64 -+{ -+ cpp -x assembler-with-cpp "$(>)" | as --64 -o "$(<)" -+} -+ -+actions gasx32 -+{ -+ cpp -x assembler-with-cpp "$(>)" | as --x32 -o "$(<)" -+} -+ -+actions gas -+{ -+ cpp -x assembler-with-cpp "$(>)" | as -o "$(<)" -+} -+ -+actions armasm -+{ -+ armasm "$(>)" "$(<)" -+} -+ -+actions masm -+{ -+ ml /c /Fo"$(<)" "$(>)" -+} -+ -+actions masm64 -+{ -+ ml64 /c /Fo"$(<)" "$(>)" -+} -+ -+ -+rule configure ( properties * ) -+{ -+ local result ; -+ -+# if ( ! ( gcc in $(properties) -+# || intel in $(properties) -+# || msvc in $(properties) ) ) -+# { -+# result = no ; -+# ECHO "toolset not supported" ; -+# } -+ -+ return $(result) ; -+} -+ -+# ARM -+# ARM/AAPCS/ELF -+alias asm_context_sources -+ : [ make asm/make_arm_aapcs_elf_gas.o : asm/make_arm_aapcs_elf_gas.S : @gas32 ] -+ [ make asm/jump_arm_aapcs_elf_gas.o : asm/jump_arm_aapcs_elf_gas.S : @gas32 ] -+ : aapcs -+ 32 -+ arm -+ elf -+ ; -+ -+alias asm_context_sources -+ : asm/make_arm_aapcs_elf_gas.S -+ asm/jump_arm_aapcs_elf_gas.S -+ : aapcs -+ 32 -+ arm -+ elf -+ clang -+ ; -+ -+alias asm_context_sources -+ : asm/make_arm_aapcs_elf_gas.S -+ asm/jump_arm_aapcs_elf_gas.S -+ : aapcs -+ 32 -+ arm -+ elf -+ gcc -+ ; -+ -+alias asm_context_sources -+ : asm/make_arm_aapcs_elf_gas.S -+ asm/jump_arm_aapcs_elf_gas.S -+ : aapcs -+ 32 -+ arm -+ elf -+ qcc -+ ; -+# ARM/AAPCS/MACH-O -+alias asm_context_sources -+ : [ make asm/make_arm_aapcs_macho_gas.o : asm/make_arm_aapcs_macho_gas.S : @gas32 ] -+ [ make asm/jump_arm_aapcs_macho_gas.o : asm/jump_arm_aapcs_macho_gas.S : @gas32 ] -+ : aapcs -+ 32 -+ arm -+ mach-o -+ ; -+ -+alias asm_context_sources -+ : asm/make_arm_aapcs_macho_gas.S -+ asm/jump_arm_aapcs_macho_gas.S -+ : aapcs -+ 32 -+ arm -+ mach-o -+ clang -+ ; -+ -+alias asm_context_sources -+ : asm/make_arm_aapcs_macho_gas.S -+ asm/jump_arm_aapcs_macho_gas.S -+ : aapcs -+ 32 -+ arm -+ mach-o -+ darwin -+ ; -+# ARM/AAPCS/PE -+alias asm_context_sources -+ : [ make asm/make_arm_aapcs_pe_armasm.o : asm/make_arm_aapcs_pe_armasm.asm : @armasm ] -+ [ make asm/jump_arm_aapcs_pe_armasm.o : asm/jump_arm_aapcs_pe_armasm.asm : @armasm ] -+ untested.cpp -+ : aapcs -+ 32 -+ arm -+ pe -+ ; -+ -+alias asm_context_sources -+ : asm/make_arm_aapcs_pe_armasm.asm -+ asm/jump_arm_aapcs_pe_armasm.asm -+ untested.cpp -+ : aapcs -+ 32 -+ arm -+ pe -+ msvc -+ ; -+ -+# MIPS -+# MIPS/O32/ELF -+alias asm_context_sources -+ : [ make asm/make_mips32_o32_elf_gas.o : asm/make_mips32_o32_elf_gas.S : @gas32 ] -+ [ make asm/jump_mips32_o32_elf_gas.o : asm/jump_mips32_o32_elf_gas.S : @gas32 ] -+ : o32 -+ 32 -+ mips1 -+ elf -+ ; -+ -+alias asm_context_sources -+ : asm/make_mips32_o32_elf_gas.S -+ asm/jump_mips32_o32_elf_gas.S -+ : o32 -+ 32 -+ mips1 -+ elf -+ clang -+ ; -+ -+alias asm_context_sources -+ : asm/make_mips32_o32_elf_gas.S -+ asm/jump_mips32_o32_elf_gas.S -+ : o32 -+ 32 -+ mips1 -+ elf -+ gcc -+ ; -+ -+# POWERPC_32 -+# POWERPC_32/SYSV/ELF -+alias asm_context_sources -+ : [ make asm/make_ppc32_sysv_elf_gas.o : asm/make_ppc32_sysv_elf_gas.S : @gas32 ] -+ [ make asm/jump_ppc32_sysv_elf_gas.o : asm/jump_ppc32_sysv_elf_gas.S : @gas32 ] -+ : sysv -+ 32 -+ power -+ elf -+ ; -+ -+alias asm_context_sources -+ : asm/make_ppc32_sysv_elf_gas.S -+ asm/jump_ppc32_sysv_elf_gas.S -+ : sysv -+ 32 -+ power -+ elf -+ clang -+ ; -+ -+alias asm_context_sources -+ : asm/make_ppc32_sysv_elf_gas.S -+ asm/jump_ppc32_sysv_elf_gas.S -+ : sysv -+ 32 -+ power -+ elf -+ gcc -+ ; -+# POWERPC_32/SYSV/MACH-O -+alias asm_context_sources -+ : [ make asm/make_ppc32_sysv_macho_gas.o : asm/make_ppc32_sysv_macho_gas.S : @gas32 ] -+ [ make asm/jump_ppc32_sysv_macho_gas.o : asm/jump_ppc32_sysv_macho_gas.S : @gas32 ] -+ : sysv -+ 32 -+ power -+ mach-o -+ ; -+ -+alias asm_context_sources -+ : asm/make_ppc32_sysv_macho_gas.S -+ asm/jump_ppc32_sysv_macho_gas.S -+ : sysv -+ 32 -+ power -+ mach-o -+ clang -+ ; -+ -+alias asm_context_sources -+ : asm/make_ppc32_sysv_macho_gas.S -+ asm/jump_ppc32_sysv_macho_gas.S -+ : sysv -+ 32 -+ power -+ mach-o -+ darwin -+ ; -+#POWERPC_32/SYSV/XCOFF -+alias asm_context_sources -+ : [ make asm/make_ppc32_sysv_xcoff_gas.o : asm/make_ppc32_sysv_xcoff_gas.S : @gas ] -+ [ make asm/jump_ppc32_sysv_xcoff_gas.o : asm/jump_ppc32_sysv_xcoff_gas.S : @gas ] -+ : sysv -+ 32 -+ power -+ xcoff -+ ; -+ -+alias asm_context_sources -+ : asm/make_ppc32_sysv_xcoff_gas.S -+ asm/jump_ppc32_sysv_xcoff_gas.S -+ : sysv -+ 32 -+ power -+ xcoff -+ clang -+ ; -+ -+alias asm_context_sources -+ : asm/make_ppc32_sysv_xcoff_gas.S -+ asm/jump_ppc32_sysv_xcoff_gas.S -+ : sysv -+ 32 -+ power -+ xcoff -+ gcc -+ ; -+ -+# POWERPC_64 -+# POWERPC_64/SYSV/ELF -+alias asm_context_sources -+ : [ make asm/make_ppc64_sysv_elf_gas.o : asm/make_ppc64_sysv_elf_gas.S : @gas64 ] -+ [ make asm/jump_ppc64_sysv_elf_gas.o : asm/jump_ppc64_sysv_elf_gas.S : @gas64 ] -+ : sysv -+ 64 -+ power -+ elf -+ ; -+ -+alias asm_context_sources -+ : asm/make_ppc64_sysv_elf_gas.S -+ asm/jump_ppc64_sysv_elf_gas.S -+ : sysv -+ 64 -+ power -+ elf -+ clang -+ ; -+ -+alias asm_context_sources -+ : asm/make_ppc64_sysv_elf_gas.S -+ asm/jump_ppc64_sysv_elf_gas.S -+ : sysv -+ 64 -+ power -+ elf -+ gcc -+ ; -+# POWERPC_64/SYSV/MACH-O -+alias asm_context_sources -+ : [ make asm/make_ppc64_sysv_macho_gas.o : asm/make_ppc64_sysv_macho_gas.S : @gas ] -+ [ make asm/jump_ppc64_sysv_macho_gas.o : asm/jump_ppc64_sysv_macho_gas.S : @gas ] -+ untested.cpp -+ : sysv -+ 64 -+ power -+ mach-o -+ ; -+ -+alias asm_context_sources -+ : asm/make_ppc64_sysv_macho_gas.S -+ asm/jump_ppc64_sysv_macho_gas.S -+ untested.cpp -+ : sysv -+ 64 -+ power -+ mach-o -+ clang -+ ; -+ -+alias asm_context_sources -+ : asm/make_ppc64_sysv_macho_gas.S -+ asm/jump_ppc64_sysv_macho_gas.S -+ untested.cpp -+ : sysv -+ 64 -+ power -+ mach-o -+ darwin -+ ; -+# POWERPC_64/SYSV/XCOFF -+alias asm_context_sources -+ : [ make asm/make_ppc64_sysv_xcoff_gas.o : asm/make_ppc64_sysv_xcoff_gas.S : @gas ] -+ [ make asm/jump_ppc64_sysv_xcoff_gas.o : asm/jump_ppc64_sysv_xcoff_gas.S : @gas ] -+ : sysv -+ 64 -+ power -+ xcoff -+ ; -+ -+alias asm_context_sources -+ : asm/make_ppc64_sysv_xcoff_gas.S -+ asm/jump_ppc64_sysv_xcoff_gas.S -+ : sysv -+ 64 -+ power -+ xcoff -+ clang -+ ; -+ -+alias asm_context_sources -+ : asm/make_ppc64_sysv_xcoff_gas.S -+ asm/jump_ppc64_sysv_xcoff_gas.S -+ : sysv -+ 64 -+ power -+ xcoff -+ gcc -+ ; -+ -+# POWERPC universal -+# POWERPC_32_64/SYSV/MACH-O -+alias asm_context_sources -+ : asm/make_ppc32_ppc64_sysv_macho_gas.S -+ asm/jump_ppc32_ppc64_sysv_macho_gas.S -+ : sysv -+ 32_64 -+ power -+ mach-o -+ ; -+ -+# SPARC -+# SPARC/SYSV/ELF -+alias asm_context_sources -+ : [ make asm/make_sparc_sysv_elf_gas.o : asm/make_sparc_sysv_elf_gas.S : @gas32 ] -+ [ make asm/jump_sparc_sysv_elf_gas.o : asm/jump_sparc_sysv_elf_gas.S : @gas32 ] -+ unsupported.cpp -+ : sysv -+ 32 -+ sparc -+ elf -+ ; -+ -+alias asm_context_sources -+ : asm/make_sparc_sysv_elf_gas.S -+ asm/jump_sparc_sysv_elf_gas.S -+ unsupported.cpp -+ : sysv -+ 32 -+ sparc -+ elf -+ clang -+ ; -+ -+alias asm_context_sources -+ : asm/make_sparc_sysv_elf_gas.S -+ asm/jump_sparc_sysv_elf_gas.S -+ unsupported.cpp -+ : sysv -+ 32 -+ sparc -+ elf -+ gcc -+ ; -+ -+# SPARC_64 -+# SPARC_64/SYSV/ELF -+alias asm_context_sources -+ : [ make asm/make_sparc64_sysv_elf_gas.o : asm/make_sparc64_sysv_elf_gas.S : @gas64 ] -+ [ make asm/jump_sparc64_sysv_elf_gas.o : asm/jump_sparc64_sysv_elf_gas.S : @gas64 ] -+ unsupported.cpp -+ : sysv -+ 64 -+ sparc -+ elf -+ ; -+ -+alias asm_context_sources -+ : asm/make_sparc64_sysv_elf_gas.S -+ asm/jump_sparc64_sysv_elf_gas.S -+ unsupported.cpp -+ : sysv -+ 64 -+ sparc -+ elf -+ clang -+ ; -+ -+alias asm_context_sources -+ : asm/make_sparc64_sysv_elf_gas.S -+ asm/jump_sparc64_sysv_elf_gas.S -+ unsupported.cpp -+ : sysv -+ 64 -+ sparc -+ elf -+ gcc -+ ; -+ -+# X86 -+# X86/SYSV/ELF -+alias asm_context_sources -+ : [ make asm/make_i386_sysv_elf_gas.o : asm/make_i386_sysv_elf_gas.S : @gas32 ] -+ [ make asm/jump_i386_sysv_elf_gas.o : asm/jump_i386_sysv_elf_gas.S : @gas32 ] -+ : sysv -+ 32 -+ x86 -+ elf -+ ; -+ -+alias asm_context_sources -+ : asm/make_i386_sysv_elf_gas.S -+ asm/jump_i386_sysv_elf_gas.S -+ : sysv -+ 32 -+ x86 -+ elf -+ clang -+ ; -+ -+alias asm_context_sources -+ : asm/make_i386_sysv_elf_gas.S -+ asm/jump_i386_sysv_elf_gas.S -+ : sysv -+ 32 -+ x86 -+ elf -+ gcc -+ ; -+ -+alias asm_context_sources -+ : asm/make_i386_sysv_elf_gas.S -+ asm/jump_i386_sysv_elf_gas.S -+ : sysv -+ 32 -+ x86 -+ elf -+ intel -+ ; -+# X86/SYSV/MACH-O -+alias asm_context_sources -+ : [ make asm/make_i386_sysv_macho_gas.o : asm/make_i386_sysv_macho_gas.S : @gas32 ] -+ [ make asm/jump_i386_sysv_macho_gas.o : asm/jump_i386_sysv_macho_gas.S : @gas32 ] -+ : sysv -+ 32 -+ x86 -+ mach-o -+ ; -+ -+alias asm_context_sources -+ : asm/make_i386_sysv_macho_gas.S -+ asm/jump_i386_sysv_macho_gas.S -+ : sysv -+ 32 -+ x86 -+ mach-o -+ clang -+ ; -+ -+alias asm_context_sources -+ : asm/make_i386_sysv_macho_gas.S -+ asm/jump_i386_sysv_macho_gas.S -+ : sysv -+ 32 -+ x86 -+ mach-o -+ darwin -+ ; -+# X86/MS/PE -+alias asm_context_sources -+ : [ make asm/make_i386_ms_pe_masm.o : asm/make_i386_ms_pe_masm.asm : @masm ] -+ [ make asm/jump_i386_ms_pe_masm.o : asm/jump_i386_ms_pe_masm.asm : @masm ] -+ dummy.cpp -+ : ms -+ 32 -+ x86 -+ pe -+ ; -+ -+alias asm_context_sources -+ : asm/make_i386_ms_pe_masm.asm -+ asm/jump_i386_ms_pe_masm.asm -+ dummy.cpp -+ : ms -+ 32 -+ x86 -+ pe -+ intel -+ ; -+ -+alias asm_context_sources -+ : asm/make_i386_ms_pe_masm.asm -+ asm/jump_i386_ms_pe_masm.asm -+ dummy.cpp -+ : ms -+ 32 -+ x86 -+ pe -+ msvc -+ ; -+ -+# X86_64 -+# X86_64/SYSV/ELF -+alias asm_context_sources -+ : [ make asm/make_x86_64_sysv_elf_gas.o : asm/make_x86_64_sysv_elf_gas.S : @gas64 ] -+ [ make asm/jump_x86_64_sysv_elf_gas.o : asm/jump_x86_64_sysv_elf_gas.S : @gas64 ] -+ : sysv -+ 64 -+ x86 -+ elf -+ ; -+ -+alias asm_context_sources -+ : asm/make_x86_64_sysv_elf_gas.S -+ asm/jump_x86_64_sysv_elf_gas.S -+ : sysv -+ 64 -+ x86 -+ elf -+ clang -+ ; -+ -+alias asm_context_sources -+ : asm/make_x86_64_sysv_elf_gas.S -+ asm/jump_x86_64_sysv_elf_gas.S -+ : sysv -+ 64 -+ x86 -+ elf -+ gcc -+ ; -+ -+alias asm_context_sources -+ : asm/make_x86_64_sysv_elf_gas.S -+ asm/jump_x86_64_sysv_elf_gas.S -+ : sysv -+ 64 -+ x86 -+ elf -+ intel -+ ; -+# X86_64/X32/ELF -+alias asm_context_sources -+ : [ make asm/make_x86_64_x32_elf_gas.o : asm/make_x86_64_x32_elf_gas.S : @gasx32 ] -+ [ make asm/jump_x86_64_x32_elf_gas.o : asm/jump_x86_64_x32_elf_gas.S : @gasx32 ] -+ untested.cpp -+ : x32 -+ 32 -+ x86 -+ elf -+ ; -+ -+alias asm_context_sources -+ : asm/make_x86_64_x32_elf_gas.S -+ asm/jump_x86_64_x32_elf_gas.S -+ untested.cpp -+ : x32 -+ 32 -+ x86 -+ elf -+ clang -+ ; -+ -+alias asm_context_sources -+ : asm/make_x86_64_x32_elf_gas.S -+ asm/jump_x86_64_x32_elf_gas.S -+ untested.cpp -+ : x32 -+ 32 -+ x86 -+ elf -+ gcc -+ ; -+# X86_64/SYSV/MACH-O -+alias asm_context_sources -+ : [ make asm/make_x86_64_sysv_macho_gas.o : asm/make_x86_64_sysv_macho_gas.S : @gas64 ] -+ [ make asm/jump_x86_64_sysv_macho_gas.o : asm/jump_x86_64_sysv_macho_gas.S : @gas64 ] -+ : sysv -+ 64 -+ x86 -+ mach-o -+ ; -+ -+alias asm_context_sources -+ : asm/make_x86_64_sysv_macho_gas.S -+ asm/jump_x86_64_sysv_macho_gas.S -+ : sysv -+ 64 -+ x86 -+ mach-o -+ clang -+ ; -+ -+alias asm_context_sources -+ : asm/make_x86_64_sysv_macho_gas.S -+ asm/jump_x86_64_sysv_macho_gas.S -+ : sysv -+ 64 -+ x86 -+ mach-o -+ darwin -+ ; -+# X86_64/MS/PE -+alias asm_context_sources -+ : [ make asm/make_x86_64_ms_pe_masm.o : asm/make_x86_64_ms_pe_masm.asm : @masm64 ] -+ [ make asm/jump_x86_64_ms_pe_masm.o : asm/jump_x86_64_ms_pe_masm.asm : @masm64 ] -+ dummy.cpp -+ : ms -+ 64 -+ x86 -+ pe -+ ; -+ -+alias asm_context_sources -+ : asm/make_x86_64_ms_pe_masm.asm -+ asm/jump_x86_64_ms_pe_masm.asm -+ dummy.cpp -+ : ms -+ 64 -+ x86 -+ pe -+ intel -+ ; -+ -+alias asm_context_sources -+ : asm/make_x86_64_ms_pe_masm.asm -+ asm/jump_x86_64_ms_pe_masm.asm -+ dummy.cpp -+ : ms -+ 64 -+ x86 -+ pe -+ msvc -+ ; -+ -+#X86 universal -+alias asm_context_sources -+ : asm/make_i386_x86_64_sysv_macho_gas.S -+ asm/jump_i386_x86_64_sysv_macho_gas.S -+ : sysv -+ 32_64 -+ x86 -+ mach-o -+ ; -+ -+# COMBINED -+alias asm_context_sources -+ : asm/make_combined_sysv_macho_gas.S -+ asm/jump_combined_sysv_macho_gas.S -+ : sysv -+ combined -+ mach-o -+ ; -+ -+ -+alias asm_context_sources -+ : unsupported.cpp -+ ; -+ -+explicit asm_context_sources ; -+ -+alias select_asm_context_sources -+ : asm_context_sources -+ : [ architecture.architecture ] -+ [ architecture.address-model ] -+ ; -+ -+lib boost_context -+ : select_asm_context_sources -+ ; -+ -+boost-install boost_context ; -diff --git a/libs/context/src/asm/jump_i386_ms_pe_gas.S b/libs/context/src/asm/jump_i386_ms_pe_gas.S -new file mode 100644 -index 0000000..84ab084 ---- /dev/null -+++ b/libs/context/src/asm/jump_i386_ms_pe_gas.S -@@ -0,0 +1,108 @@ -+/* -+ Copyright Oliver Kowalke 2009. -+ Copyright Thomas Sailer 2013. -+ Distributed under the Boost Software License, Version 1.0. -+ (See accompanying file LICENSE_1_0.txt or copy at -+ http://www.boost.org/LICENSE_1_0.txt) -+*/ -+ -+/******************************************************************** -+ * * -+ * -------------------------------------------------------------- * -+ * | 0 | 1 | 2 | 3 | 4 | 5 | * -+ * -------------------------------------------------------------- * -+ * | 0h | 04h | 08h | 0ch | 010h | 014h | * -+ * -------------------------------------------------------------- * -+ * | EDI | ESI | EBX | EBP | ESP | EIP | * -+ * -------------------------------------------------------------- * -+ * -------------------------------------------------------------- * -+ * | 6 | 7 | 8 | | * -+ * -------------------------------------------------------------- * -+ * | 018h | 01ch | 020h | | * -+ * -------------------------------------------------------------- * -+ * | sp | size | limit | | * -+ * -------------------------------------------------------------- * -+ * -------------------------------------------------------------- * -+ * | 9 | | * -+ * -------------------------------------------------------------- * -+ * | 024h | | * -+ * -------------------------------------------------------------- * -+ * |fc_execpt| | * -+ * -------------------------------------------------------------- * -+ * -------------------------------------------------------------- * -+ * | 10 | | * -+ * -------------------------------------------------------------- * -+ * | 028h | | * -+ * -------------------------------------------------------------- * -+ * |fc_strage| | * -+ * -------------------------------------------------------------- * -+ * -------------------------------------------------------------- * -+ * | 11 | 12 | | * -+ * -------------------------------------------------------------- * -+ * | 02ch | 030h | | * -+ * -------------------------------------------------------------- * -+ * | fc_mxcsr|fc_x87_cw| | * -+ * -------------------------------------------------------------- * -+ * * -+ * *****************************************************************/ -+ -+.file "jump_i386_ms_pe_gas.S" -+.text -+.p2align 4,,15 -+.globl _jump_fcontext -+.def _jump_fcontext; .scl 2; .type 32; .endef -+_jump_fcontext: -+ movl 0x04(%esp), %ecx /* load address of the first fcontext_t arg */ -+ movl %edi, (%ecx) /* save EDI */ -+ movl %esi, 0x04(%ecx) /* save ESI */ -+ movl %ebx, 0x08(%ecx) /* save EBX */ -+ movl %ebp, 0x0c(%ecx) /* save EBP */ -+ -+ movl %fs:(0x18), %edx /* load NT_TIB */ -+ movl (%edx), %eax /* load current SEH exception list */ -+ movl %eax, 0x24(%ecx) /* save current exception list */ -+ movl 0x04(%edx), %eax /* load current stack base */ -+ movl %eax, 0x18(%ecx) /* save current stack base */ -+ movl 0x08(%edx), %eax /* load current stack limit */ -+ movl %eax, 0x20(%ecx) /* save current stack limit */ -+ movl 0x10(%edx), %eax /* load fiber local storage */ -+ movl %eax, 0x28(%ecx) /* save fiber local storage */ -+ -+ leal 0x04(%esp), %eax /* exclude the return address */ -+ movl %eax, 0x10(%ecx) /* save as stack pointer */ -+ movl (%esp), %eax /* load return address */ -+ movl %eax, 0x14(%ecx) /* save return address */ -+ -+ movl 0x08(%esp), %edx /* load address of the second fcontext_t arg */ -+ movl (%edx), %edi /* restore EDI */ -+ movl 0x04(%edx), %esi /* restore ESI */ -+ movl 0x08(%edx), %ebx /* restore EBX */ -+ movl 0x0c(%edx), %ebp /* restore EBP */ -+ -+ movl 0x10(%esp), %eax /* check if fpu enve preserving was requested */ -+ testl %eax, %eax -+ je 1f -+ -+ stmxcsr 0x2c(%ecx) /* save MMX control word */ -+ fnstcw 0x30(%ecx) /* save x87 control word */ -+ ldmxcsr 0x2c(%edx) /* restore MMX control word */ -+ fldcw 0x30(%edx) /* restore x87 control word */ -+1: -+ movl %edx, %ecx -+ movl %fs:(0x18), %edx /* load NT_TIB */ -+ movl 0x24(%ecx), %eax /* load SEH exception list */ -+ movl %eax, (%edx) /* restore next SEH item */ -+ movl 0x18(%ecx), %eax /* load stack base */ -+ movl %eax, 0x04(%edx) /* restore stack base */ -+ movl 0x20(%ecx), %eax /* load stack limit */ -+ movl %eax, 0x08(%edx) /* restore stack limit */ -+ movl 0x28(%ecx), %eax /* load fiber local storage */ -+ movl %eax, 0x10(%edx) /* restore fiber local storage */ -+ -+ movl 0x0c(%esp), %eax /* use third arg as return value after jump */ -+ -+ movl 0x10(%ecx), %esp /* restore ESP */ -+ movl %eax, 0x04(%esp) /* use third arg as first arg in context function */ -+ movl 0x14(%ecx), %ecx /* fetch the address to return to */ -+ -+ jmp *%ecx /* indirect jump to context */ -diff --git a/libs/context/src/asm/jump_x86_64_ms_pe_gas.S b/libs/context/src/asm/jump_x86_64_ms_pe_gas.S -new file mode 100644 -index 0000000..32aa2a5 ---- /dev/null -+++ b/libs/context/src/asm/jump_x86_64_ms_pe_gas.S -@@ -0,0 +1,189 @@ -+/* -+ Copyright Oliver Kowalke 2009. -+ Copyright Thomas Sailer 2013. -+ Distributed under the Boost Software License, Version 1.0. -+ (See accompanying file LICENSE_1_0.txt or copy at -+ http://www.boost.org/LICENSE_1_0.txt) -+*/ -+ -+/**************************************************************************************** -+ * * -+ * ---------------------------------------------------------------------------------- * -+ * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * -+ * ---------------------------------------------------------------------------------- * -+ * | R12 | R13 | R14 | R15 | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * -+ * ---------------------------------------------------------------------------------- * -+ * | RDI | RSI | RBX | RBP | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 16 | 17 | 18 | 19 | | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0x40 | 0x44 | 0x48 | 0x4c | | * -+ * ---------------------------------------------------------------------------------- * -+ * | RSP | RIP | | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 20 | 21 | 22 | 23 | 24 | 25 | | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0x50 | 0x54 | 0x58 | 0x5c | 0x60 | 0x64 | | * -+ * ---------------------------------------------------------------------------------- * -+ * | sp | size | limit | | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 26 | 27 | | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0x68 | 0x6c | | * -+ * ---------------------------------------------------------------------------------- * -+ * | fbr_strg | | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0x70 | 0x74 | 0x78 | 0x7c | 0x80 | 0x84 | 0x88 | 0x8c | * -+ * ---------------------------------------------------------------------------------- * -+ * | fc_mxcsr|fc_x87_cw| fc_xmm | SEE registers (XMM6-XMM15) | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0x90 | 0x94 | 0x98 | 0x9c | 0xa0 | 0xa4 | 0xa8 | 0xac | * -+ * ---------------------------------------------------------------------------------- * -+ * | SEE registers (XMM6-XMM15) | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0xb0 | 0xb4 | 0xb8 | 0xbc | 0xc0 | 0xc4 | 0xc8 | 0xcc | * -+ * ---------------------------------------------------------------------------------- * -+ * | SEE registers (XMM6-XMM15) | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0xd0 | 0xd4 | 0xd8 | 0xdc | 0xe0 | 0xe4 | 0xe8 | 0xec | * -+ * ---------------------------------------------------------------------------------- * -+ * | SEE registers (XMM6-XMM15) | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0xf0 | 0xf4 | 0xf8 | 0xfc | 0x100 | 0x104 | 0x108 | 0x10c | * -+ * ---------------------------------------------------------------------------------- * -+ * | SEE registers (XMM6-XMM15) | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0x110 | 0x114 | 0x118 | 0x11c | 0x120 | 0x124 | 0x128 | 0x12c | * -+ * ---------------------------------------------------------------------------------- * -+ * | SEE registers (XMM6-XMM15) | * -+ * ---------------------------------------------------------------------------------- * -+ * * -+ * *************************************************************************************/ -+ -+.file "jump_x86_64_ms_pe_gas.S" -+.text -+.p2align 4,,15 -+.globl jump_fcontext -+.def jump_fcontext; .scl 2; .type 32; .endef -+.seh_proc jump_fcontext -+jump_fcontext: -+.seh_endprologue -+ movq %r12, (%rcx) /* save R12 */ -+ movq %r13, 0x08(%rcx) /* save R13 */ -+ movq %r14, 0x10(%rcx) /* save R14 */ -+ movq %r15, 0x18(%rcx) /* save R15 */ -+ movq %rdi, 0x20(%rcx) /* save RDI */ -+ movq %rsi, 0x28(%rcx) /* save RSI */ -+ movq %rbx, 0x30(%rcx) /* save RBX */ -+ movq %rbp, 0x38(%rcx) /* save RBP */ -+ -+ movq %gs:(0x30), %r10 /* load NT_TIB */ -+ movq 0x08(%r10), %rax /* load current stack base */ -+ movq %rax, 0x50(%rcx) /* save current stack base */ -+ movq 0x10(%r10), %rax /* load current stack limit */ -+ movq %rax, 0x60(%rcx) /* save current stack limit */ -+ movq 0x18(%r10), %rax /* load fiber local storage */ -+ movq %rax, 0x68(%rcx) /* save fiber local storage */ -+ -+ testq %r9, %r9 -+ je 1f -+ -+ stmxcsr 0x70(%rcx) /* save MMX control and status word */ -+ fnstcw 0x74(%rcx) /* save x87 control word */ -+ /* save XMM storage */ -+ /* save start address of SSE register block in R10 */ -+ leaq 0x90(%rcx), %r10 -+ /* shift address in R10 to lower 16 byte boundary */ -+ /* == pointer to SEE register block */ -+ andq $-16, %r10 -+ -+ movaps %xmm6, (%r10) -+ movaps %xmm7, 0x10(%r10) -+ movaps %xmm8, 0x20(%r10) -+ movaps %xmm9, 0x30(%r10) -+ movaps %xmm10, 0x40(%r10) -+ movaps %xmm11, 0x50(%r10) -+ movaps %xmm12, 0x60(%r10) -+ movaps %xmm13, 0x70(%r10) -+ movaps %xmm14, 0x80(%r10) -+ movaps %xmm15, 0x90(%r10) -+ -+ ldmxcsr 0x70(%rdx) /* restore MMX control and status word */ -+ fldcw 0x74(%rdx) /* restore x87 control word */ -+ /* restore XMM storage */ -+ /* save start address of SSE register block in R10 */ -+ leaq 0x90(%rdx), %r10 -+ /* shift address in R10 to lower 16 byte boundary */ -+ /* == pointer to SEE register block */ -+ andq $-16, %r10 -+ -+ movaps (%r10), %xmm6 -+ movaps 0x10(%r10), %xmm7 -+ movaps 0x20(%r10), %xmm8 -+ movaps 0x30(%r10), %xmm9 -+ movaps 0x40(%r10), %xmm10 -+ movaps 0x50(%r10), %xmm11 -+ movaps 0x60(%r10), %xmm12 -+ movaps 0x70(%r10), %xmm13 -+ movaps 0x80(%r10), %xmm14 -+ movaps 0x90(%r10), %xmm15 -+ -+1: -+ leaq 0x08(%rsp), %rax /* exclude the return address */ -+ movq %rax, 0x40(%rcx) /* save as stack pointer */ -+ movq (%rsp), %rax /* load return address */ -+ movq %rax, 0x48(%rcx) /* save return address */ -+ -+ movq (%rdx), %r12 /* restore R12 */ -+ movq 0x08(%rdx), %r13 /* restore R13 */ -+ movq 0x10(%rdx), %r14 /* restore R14 */ -+ movq 0x18(%rdx), %r15 /* restore R15 */ -+ movq 0x20(%rdx), %rdi /* restore RDI */ -+ movq 0x28(%rdx), %rsi /* restore RSI */ -+ movq 0x30(%rdx), %rbx /* restore RBX */ -+ movq 0x38(%rdx), %rbp /* restore RBP */ -+ -+ movq %gs:(0x30), %r10 /* load NT_TIB */ -+ movq 0x50(%rdx), %rax /* load stack base */ -+ movq %rax, 0x08(%r10) /* restore stack base */ -+ movq 0x60(%rdx), %rax /* load stack limit */ -+ movq %rax, 0x10(%r10) /* restore stack limit */ -+ movq 0x68(%rdx), %rax /* load fiber local storage */ -+ movq %rax, 0x18(%r10) /* restore fiber local storage */ -+ -+ movq 0x40(%rdx), %rsp /* restore RSP */ -+ movq 0x48(%rdx), %r10 /* fetch the address to returned to */ -+ -+ movq %r8, %rax /* use third arg as return value after jump */ -+ movq %r8, %rcx /* use third arg as first arg in context function */ -+ -+ jmp *%r10 /* indirect jump to caller */ -+.seh_endproc -diff --git a/libs/context/src/asm/make_i386_ms_pe_gas.S b/libs/context/src/asm/make_i386_ms_pe_gas.S -new file mode 100644 -index 0000000..1b57faa ---- /dev/null -+++ b/libs/context/src/asm/make_i386_ms_pe_gas.S -@@ -0,0 +1,115 @@ -+/* -+ Copyright Oliver Kowalke 2009. -+ Copyright Thomas Sailer 2013. -+ Distributed under the Boost Software License, Version 1.0. -+ (See accompanying file LICENSE_1_0.txt or copy at -+ http://www.boost.org/LICENSE_1_0.txt) -+*/ -+ -+/******************************************************************** -+ * * -+ * -------------------------------------------------------------- * -+ * | 0 | 1 | 2 | 3 | 4 | 5 | * -+ * -------------------------------------------------------------- * -+ * | 0h | 04h | 08h | 0ch | 010h | 014h | * -+ * -------------------------------------------------------------- * -+ * | EDI | ESI | EBX | EBP | ESP | EIP | * -+ * -------------------------------------------------------------- * -+ * -------------------------------------------------------------- * -+ * | 6 | 7 | 8 | | * -+ * -------------------------------------------------------------- * -+ * | 018h | 01ch | 020h | | * -+ * -------------------------------------------------------------- * -+ * | sp | size | limit | | * -+ * -------------------------------------------------------------- * -+ * -------------------------------------------------------------- * -+ * | 9 | | * -+ * -------------------------------------------------------------- * -+ * | 024h | | * -+ * -------------------------------------------------------------- * -+ * |fc_execpt| | * -+ * -------------------------------------------------------------- * -+ * -------------------------------------------------------------- * -+ * | 10 | | * -+ * -------------------------------------------------------------- * -+ * | 028h | | * -+ * -------------------------------------------------------------- * -+ * |fc_strage| | * -+ * -------------------------------------------------------------- * -+ * -------------------------------------------------------------- * -+ * | 11 | 12 | | * -+ * -------------------------------------------------------------- * -+ * | 02ch | 030h | | * -+ * -------------------------------------------------------------- * -+ * | fc_mxcsr|fc_x87_cw| | * -+ * -------------------------------------------------------------- * -+ * * -+ * *****************************************************************/ -+ -+.file "make_i386_ms_pe_gas.S" -+.text -+.p2align 4,,15 -+.globl _make_fcontext -+.def _make_fcontext; .scl 2; .type 32; .endef -+_make_fcontext: -+ movl 0x04(%esp), %eax /* load 1. arg of make_fcontext, pointer to context stack (base) */ -+ leal -0x34(%eax),%eax /* reserve space for fcontext_t at top of context stack */ -+ -+ /* shift address in EAX to lower 16 byte boundary */ -+ /* == pointer to fcontext_t and address of context stack */ -+ andl $-16, %eax -+ -+ movl 0x04(%esp), %ecx /* load 1. arg of make_fcontext, pointer to context stack (base) */ -+ movl %ecx, 0x18(%eax) /* save address of context stack (base) in fcontext_t */ -+ movl 0x08(%esp), %edx /* load 2. arg of make_fcontext, context stack size */ -+ movl %edx, 0x1c(%eax) /* save context stack size in fcontext_t */ -+ negl %edx /* negate stack size for LEA instruction (== substraction) */ -+ leal (%ecx,%edx),%ecx /* compute bottom address of context stack (limit) */ -+ movl %ecx, 0x20(%eax) /* save address of context stack (limit) in fcontext_t */ -+ movl 0x0c(%esp), %ecx /* load 3. arg of make_fcontext, pointer to context function */ -+ movl %ecx, 0x14(%eax) /* save address of context function in fcontext_t */ -+ -+ stmxcsr 0x02c(%eax) /* save MMX control word */ -+ fnstcw 0x030(%eax) /* save x87 control word */ -+ -+ leal -0x1c(%eax),%edx /* reserve space for last frame and seh on context stack, (ESP - 0x4) % 16 == 0 */ -+ movl %edx, 0x10(%eax) /* save address in EDX as stack pointer for context function */ -+ -+ movl $finish, %ecx /* abs address of finish */ -+ movl %ecx, (%edx) /* save address of finish as return address for context function */ -+ /* entered after context function returns */ -+ -+ /* traverse current seh chain to get the last exception handler installed by Windows */ -+ /* note that on Windows Server 2008 and 2008 R2, SEHOP is activated by default */ -+ /* the exception handler chain is tested for the presence of ntdll.dll!FinalExceptionHandler */ -+ /* at its end by RaiseException all seh andlers are disregarded if not present and the */ -+ /* program is aborted */ -+ movl %fs:(0x18), %ecx /* load NT_TIB into ECX */ -+ -+walk: -+ movl (%ecx), %edx /* load 'next' member of current SEH into EDX */ -+ incl %edx /* test if 'next' of current SEH is last (== 0xffffffff) */ -+ jz found -+ decl %edx -+ xchgl %ecx, %edx /* exchange content; ECX contains address of next SEH */ -+ jmp walk /* inspect next SEH */ -+ -+found: -+ movl 0x04(%ecx), %ecx /* load 'handler' member of SEH == address of last SEH handler installed by Windows */ -+ movl 0x10(%eax), %edx /* load address of stack pointer for context function */ -+ movl %ecx, 0x18(%edx) /* save address in ECX as SEH handler for context */ -+ movl $0xffffffff,%ecx /* set ECX to -1 */ -+ movl %ecx, 0x14(%edx) /* save ECX as next SEH item */ -+ leal 0x14(%edx), %ecx /* load address of next SEH item */ -+ movl %ecx, 0x24(%eax) /* save next SEH */ -+ -+ ret -+ -+finish: -+ /* ESP points to same address as ESP on entry of context function + 0x4 */ -+ xorl %eax, %eax -+ movl %eax, (%esp) /* exit code is zero */ -+ call __exit /* exit application */ -+ hlt -+ -+.def __exit; .scl 2; .type 32; .endef /* standard C library function */ -diff --git a/libs/context/src/asm/make_x86_64_ms_pe_gas.S b/libs/context/src/asm/make_x86_64_ms_pe_gas.S -new file mode 100644 -index 0000000..5bfeeb1 ---- /dev/null -+++ b/libs/context/src/asm/make_x86_64_ms_pe_gas.S -@@ -0,0 +1,132 @@ -+/* -+ Copyright Oliver Kowalke 2009. -+ Copyright Thomas Sailer 2013. -+ Distributed under the Boost Software License, Version 1.0. -+ (See accompanying file LICENSE_1_0.txt or copy at -+ http://www.boost.org/LICENSE_1_0.txt) -+*/ -+ -+/**************************************************************************************** -+ * * -+ * ---------------------------------------------------------------------------------- * -+ * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * -+ * ---------------------------------------------------------------------------------- * -+ * | R12 | R13 | R14 | R15 | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * -+ * ---------------------------------------------------------------------------------- * -+ * | RDI | RSI | RBX | RBP | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 16 | 17 | 18 | 19 | | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0x40 | 0x44 | 0x48 | 0x4c | | * -+ * ---------------------------------------------------------------------------------- * -+ * | RSP | RIP | | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 20 | 21 | 22 | 23 | 24 | 25 | | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0x50 | 0x54 | 0x58 | 0x5c | 0x60 | 0x64 | | * -+ * ---------------------------------------------------------------------------------- * -+ * | sp | size | limit | | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 26 | 27 | | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0x68 | 0x6c | | * -+ * ---------------------------------------------------------------------------------- * -+ * | fbr_strg | | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0x70 | 0x74 | 0x78 | 0x7c | 0x80 | 0x84 | 0x88 | 0x8c | * -+ * ---------------------------------------------------------------------------------- * -+ * | fc_mxcsr|fc_x87_cw| fc_xmm | SEE registers (XMM6-XMM15) | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0x90 | 0x94 | 0x98 | 0x9c | 0xa0 | 0xa4 | 0xa8 | 0xac | * -+ * ---------------------------------------------------------------------------------- * -+ * | SEE registers (XMM6-XMM15) | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0xb0 | 0xb4 | 0xb8 | 0xbc | 0xc0 | 0xc4 | 0xc8 | 0xcc | * -+ * ---------------------------------------------------------------------------------- * -+ * | SEE registers (XMM6-XMM15) | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0xd0 | 0xd4 | 0xd8 | 0xdc | 0xe0 | 0xe4 | 0xe8 | 0xec | * -+ * ---------------------------------------------------------------------------------- * -+ * | SEE registers (XMM6-XMM15) | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0xf0 | 0xf4 | 0xf8 | 0xfc | 0x100 | 0x104 | 0x108 | 0x10c | * -+ * ---------------------------------------------------------------------------------- * -+ * | SEE registers (XMM6-XMM15) | * -+ * ---------------------------------------------------------------------------------- * -+ * ---------------------------------------------------------------------------------- * -+ * | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | * -+ * ---------------------------------------------------------------------------------- * -+ * | 0x110 | 0x114 | 0x118 | 0x11c | 0x120 | 0x124 | 0x128 | 0x12c | * -+ * ---------------------------------------------------------------------------------- * -+ * | SEE registers (XMM6-XMM15) | * -+ * ---------------------------------------------------------------------------------- * -+ * * -+ * *************************************************************************************/ -+ -+.file "make_x86_64_ms_pe_gas.S" -+.text -+.p2align 4,,15 -+.globl make_fcontext -+.def make_fcontext; .scl 2; .type 32; .endef -+.seh_proc make_fcontext -+make_fcontext: -+.seh_endprologue -+ leaq -0x130(%rcx),%rax /* reserve space for fcontext_t at top of context stack */ -+ -+ /* shift address in RAX to lower 16 byte boundary */ -+ /* == pointer to fcontext_t and address of context stack */ -+ andq $-16, %rax -+ -+ movq %r8, 0x48(%rax) /* save address of context function in fcontext_t */ -+ movq %rdx, 0x58(%rax) /* save context stack size in fcontext_t */ -+ movq %rcx, 0x50(%rax) /* save address of context stack pointer (base) in fcontext_t */ -+ -+ negq %rdx /* negate stack size for LEA instruction (== substraction) */ -+ leaq (%rcx,%rdx),%rcx /* compute bottom address of context stack (limit) */ -+ movq %rcx, 0x60(%rax) /* save bottom address of context stack (limit) in fcontext_t */ -+ -+ stmxcsr 0x70(%rax) /* save MMX control and status word */ -+ fnstcw 0x74(%rax) /* save x87 control word */ -+ -+ leaq -0x28(%rax),%rdx /* reserve 32byte shadow space + return address on stack, (RSP - 0x8) % 16 == 0 */ -+ movq %rdx, 0x40(%rax) /* save address in RDX as stack pointer for context function */ -+ -+ leaq finish(%rip),%rcx /* compute abs address of label finish */ -+ movq %rcx,(%rdx) /* save address of finish as return address for context function */ -+ /* entered after context function returns */ -+ -+ ret -+ -+finish: -+ /* RSP points to same address as RSP on entry of context function + 0x8 */ -+ xorq %rcx, %rcx /* exit code is zero */ -+ call _exit /* exit application */ -+ hlt -+.seh_endproc -+ -+.def _exit; .scl 2; .type 32; .endef /* standard C library function */ --- -2.1.0 - - -From eddef4ea6e60df241c9afa9a6adc909c57f8095c Mon Sep 17 00:00:00 2001 -From: Pavel Vatagin -Date: Sun, 29 Mar 2015 12:57:11 +0200 -Subject: [PATCH 2/3] more fixes - -taken from https://github.com/boostorg/interprocess/pull/15 - -diff --git a/boost/interprocess/detail/win32_api.hpp b/boost/interprocess/detail/win32_api.hpp -index d9d3e70..7fcc907 100644 ---- a/boost/interprocess/detail/win32_api.hpp -+++ b/boost/interprocess/detail/win32_api.hpp -@@ -28,11 +28,18 @@ - #include - #include - -+#if defined (BOOST_INTERPROCESS_WINDOWS) -+# include -+# include -+#else -+# error "This file can only be included in Windows OS" -+#endif -+ - #ifdef BOOST_USE_WINDOWS_H - #include --#include --#include --#include -+#include -+#include -+#include - #endif - - #if defined(_MSC_VER) -@@ -44,13 +51,6 @@ - # pragma comment( lib, "Shell32.lib" ) //SHGetSpecialFolderPathA - #endif - --#if defined (BOOST_INTERPROCESS_WINDOWS) --# include --# include --#else --# error "This file can only be included in Windows OS" --#endif -- - ////////////////////////////////////////////////////////////////////////////// - // - // Declaration of Windows structures or typedefs if BOOST_USE_WINDOWS_H is used -@@ -2252,7 +2252,7 @@ inline bool get_last_bootup_time(std::string &stamp) - // Print the contents of each record in the buffer. - if(find_record_in_buffer(heap_deleter.get(), dwBytesRead, provider_name, event_id, pTypedRecord)){ - char stamp_str[sizeof(unsigned long)*3+1]; -- std::sprintf(&stamp_str[0], "%u", ((unsigned int)pTypedRecord->TimeGenerated)); -+ sprintf(&stamp_str[0], "%u", ((unsigned int)pTypedRecord->TimeGenerated)); - stamp = stamp_str; - break; - } --- -2.1.0 - - -From 9081374d788ead34e417f0fe1aa34310156eb14f Mon Sep 17 00:00:00 2001 -From: Mark Brand -Date: Sun, 29 Mar 2015 13:00:45 +0200 -Subject: [PATCH 3/3] add missing winsock2.h - -Otherwise windows.h might default to winsock.h. - -diff --git a/boost/detail/interlocked.hpp b/boost/detail/interlocked.hpp -index abc7c6d..2cd60c1 100644 ---- a/boost/detail/interlocked.hpp -+++ b/boost/detail/interlocked.hpp -@@ -24,6 +24,7 @@ - - #if defined( BOOST_USE_WINDOWS_H ) - -+# include - # include - - # define BOOST_INTERLOCKED_INCREMENT InterlockedIncrement --- -2.1.0 ++.section .drectve ++.ascii " -export:\"make_fcontext\"" diff --git a/src/boost-test.cmake b/src/boost-test.cmake index 3875fecf..12ec9cf1 100644 --- a/src/boost-test.cmake +++ b/src/boost-test.cmake @@ -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. # partial module - included by src/cmake/CMakeLists.txt @@ -8,7 +7,7 @@ set(TGT test-${PKG}-cmake) enable_language(CXX) add_executable(${TGT} ${CMAKE_CURRENT_LIST_DIR}/${PKG}-test.cpp) -find_package(Boost ${PKG_VERSION} EXACT COMPONENTS chrono serialization system thread REQUIRED) +find_package(Boost ${PKG_VERSION} EXACT COMPONENTS chrono context serialization system thread REQUIRED) target_link_libraries(${TGT} ${Boost_LIBRARIES}) install(TARGETS ${TGT} DESTINATION bin) diff --git a/src/boost-test.cpp b/src/boost-test.cpp index a81b11ae..f4a9bad7 100644 --- a/src/boost-test.cpp +++ b/src/boost-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include @@ -10,6 +9,10 @@ boost::thread_specific_ptr ptr; +// https://www.boost.org/doc/libs/1_60_0/libs/context/doc/html/context/context.html +#include +boost::context::fcontext_t fcm,fc1,fc2; + void test_thread() { if (ptr.get() == 0) { @@ -18,6 +21,23 @@ void test_thread() std::cout << "Hello, World! from thread" << std::endl; } +void f1(intptr_t) +{ + std::cout<<"f1: entered"< #include -#include +#include +#include // We’re lazy using namespace CEGUI; @@ -34,21 +33,21 @@ int main(int argc, char* argv[]) // Tell CEGUI where to find its resources DefaultResourceProvider* p_provider = static_cast(System::getSingleton().getResourceProvider()); - p_provider->setResourceGroupDirectory("schemes", "../share/CEGUI/schemes"); - p_provider->setResourceGroupDirectory("imagesets", "../share/CEGUI/imagesets"); - p_provider->setResourceGroupDirectory("fonts", "../share/CEGUI/fonts"); - p_provider->setResourceGroupDirectory("layouts", "../share/CEGUI/layouts"); - p_provider->setResourceGroupDirectory("looknfeels", "../share/CEGUI/looknfeel"); - p_provider->setResourceGroupDirectory("lua_scripts", "../share/CEGUI/lua_scripts"); - p_provider->setResourceGroupDirectory("schemas", "../share/CEGUI/xml_schemas"); - p_provider->setResourceGroupDirectory("animations", "../share/CEGUI/animations"); + p_provider->setResourceGroupDirectory("schemes", "../share/cegui-0/schemes"); + p_provider->setResourceGroupDirectory("imagesets", "../share/cegui-0/imagesets"); + p_provider->setResourceGroupDirectory("fonts", "../share/cegui-0/fonts"); + p_provider->setResourceGroupDirectory("layouts", "../share/cegui-0/layouts"); + p_provider->setResourceGroupDirectory("looknfeels", "../share/cegui-0/looknfeel"); + p_provider->setResourceGroupDirectory("lua_scripts", "../share/cegui-0/lua_scripts"); + p_provider->setResourceGroupDirectory("schemas", "../share/cegui-0/xml_schemas"); + p_provider->setResourceGroupDirectory("animations", "../share/cegui-0/animations"); // Map the resource request to our provider - Imageset::setDefaultResourceGroup("imagesets"); - Font::setDefaultResourceGroup("fonts"); Scheme::setDefaultResourceGroup("schemes"); - WidgetLookManager::setDefaultResourceGroup("looknfeels"); + ImageManager::setImagesetDefaultResourceGroup("imagesets"); + Font::setDefaultResourceGroup("fonts"); WindowManager::setDefaultResourceGroup("layouts"); + WidgetLookManager::setDefaultResourceGroup("looknfeels"); ScriptModule::setDefaultResourceGroup("lua_scripts"); AnimationManager::setDefaultResourceGroup("animations"); XMLParser* p_parser = System::getSingleton().getXMLParser(); @@ -57,18 +56,21 @@ int main(int argc, char* argv[]) p_parser->setProperty("SchemaDefaultResourceGroup", "schemas"); // Configure the default window layouting - SchemeManager::getSingleton().create("TaharezLook.scheme"); - System::getSingleton().setDefaultMouseCursor("TaharezLook", "MouseArrow"); + SchemeManager::getSingleton().createFromFile("TaharezLook.scheme"); + + // Mouse cursor + CEGUI::GUIContext& gui_context = CEGUI::System::getSingleton().getDefaultGUIContext(); + gui_context.getMouseCursor().setDefaultImage("TaharezLook/MouseArrow"); // Create the hypothetical CEGUI root window Window* p_root_window = WindowManager::getSingleton().createWindow("DefaultWindow", "root"); - System::getSingleton().setGUISheet(p_root_window); + gui_context.setRootWindow(p_root_window); // Create an actual framed window we can look onto FrameWindow* p_frame_window = static_cast(WindowManager::getSingleton().createWindow("TaharezLook/FrameWindow", "testWindow")); - p_root_window->addChildWindow(p_frame_window); + p_root_window->addChild(p_frame_window); p_frame_window->setPosition(UVector2(UDim(0.25f, 0), UDim(0.25f, 0))); - p_frame_window->setSize(UVector2(UDim(0.5f, 0), UDim(0.5f, 0))); + p_frame_window->setSize(USize(UDim(0.5f, 0), UDim(0.5f, 0))); p_frame_window->setText("Hello World!"); // Enter main loop @@ -90,7 +92,7 @@ void main_loop() glutMainLoopEvent(); // Process events glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear the window background to a single color glFlush(); - System::getSingleton().renderGUI(); // Tell CEGUI to render all its stuff + CEGUI::System::getSingleton().renderAllGUIContexts(); // Tell CEGUI to render all its stuff glutSwapBuffers(); // Put the auxiliary rendering buffer onto the screen and make the screen the new auxiliary buffer. } } diff --git a/src/cegui.mk b/src/cegui.mk index a7e22ed4..a47f0db7 100644 --- a/src/cegui.mk +++ b/src/cegui.mk @@ -1,14 +1,16 @@ -# 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 := cegui +$(PKG)_WEBSITE := http://cegui.org.uk/ +$(PKG)_DESCR := Crazy Eddie’s GUI System (CEGUI) $(PKG)_IGNORE := -$(PKG)_VERSION := 0.7.9 -$(PKG)_CHECKSUM := 7c3b264def08b46de749c2acaba363e907479d924612436f3bd09da2e474bb8c -$(PKG)_SUBDIR := CEGUI-$($(PKG)_VERSION) -$(PKG)_FILE := CEGUI-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/crayzedsgui/CEGUI%20Mk-2/$($(PKG)_VERSION)/$($(PKG)_FILE)?download -$(PKG)_DEPS := gcc expat freeglut freeimage freetype libxml2 pcre xerces +$(PKG)_VERSION := 9726a2b505fb +$(PKG)_CHECKSUM := 14b3da7f1f89693192cd9afbf2126f4519508245ed156de893828e31ce676e9e +$(PKG)_SUBDIR := $(PKG)-$(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$(PKG)-$($(PKG)_VERSION).tar.bz2 +$(PKG)_URL := https://bitbucket.org/$(PKG)/$(PKG)/get/$($(PKG)_VERSION).tar.bz2 +$(PKG)_DEPS := gcc expat freeglut freeimage freetype fribidi glew \ + glfw3 glm libxml2 minizip pcre xerces define $(PKG)_UPDATE $(WGET) -q -O- 'https://bitbucket.org/cegui/cegui/downloads' | \ @@ -18,48 +20,71 @@ define $(PKG)_UPDATE tail -1 endef +# track dev branch v0-8 until next release +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://bitbucket.org/cegui/cegui/commits/branch/v0-8' | \ + $(SED) -n 's,.*cegui/cegui/commits/\([^?]\{12\}\).*at=.*,\1,p' | \ + head -1 +endef + +# Use pkg-config to set FREEIMAGE_LIB and GLEW_STATIC to prevent "_imp__" errors +# freeimage and xerces don't have shared builds - disable with $(CMAKE_STATIC_BOOL) +# devil appears to be dead, tinyxml is deprecated, lua needs toluapp +# boost and sdl2 aren't detected define $(PKG)_BUILD - cd '$(1)' && ./configure \ - --host='$(TARGET)' \ - --disable-shared \ - --prefix='$(PREFIX)/$(TARGET)' \ - --enable-freetype \ - --enable-pcre \ - --enable-xerces-c \ - --enable-libxml \ - --enable-expat \ - --disable-corona \ - --disable-devil \ - --enable-freeimage \ - --disable-silly \ - --enable-tga \ - --disable-tinyxml \ - --enable-stb \ - --enable-opengl-renderer \ - --disable-ogre-renderer \ - --disable-irrlicht-renderer \ - --disable-directfb-renderer \ - --enable-null-renderer \ - --disable-samples \ - --disable-lua-module \ - --disable-python-module \ - PKG_CONFIG='$(TARGET)-pkg-config' \ - CFLAGS="`$(TARGET)-pkg-config --cflags glut freeimage`" \ - CXXFLAGS="`$(TARGET)-pkg-config --cflags glut freeimage`" \ - LDFLAGS="`$(TARGET)-pkg-config --libs glut freeimage`" - $(MAKE) -C '$(1)' -j '$(JOBS)' - $(SED) -i 's/Cflags:\(.*\)/Cflags: \1 -DCEGUI_STATIC/' '$(1)/cegui/CEGUI.pc' - $(MAKE) -C '$(1)' -j '$(JOBS)' install + cd '$(BUILD_DIR)' && '$(TARGET)-cmake' \ + -DCEGUI_BUILD_SHARED_CONFIGURATION=$(CMAKE_SHARED_BOOL) \ + -DCEGUI_BUILD_STATIC_CONFIGURATION=$(CMAKE_STATIC_BOOL) \ + -DCEGUI_BUILD_STATIC_FACTORY_MODULE=$(CMAKE_STATIC_BOOL) \ + -DCEGUI_INSTALL_PKGCONFIG=ON \ + -DCEGUI_SAMPLES_ENABLED=OFF \ + -DCEGUI_BUILD_TESTS=OFF \ + -DCEGUI_BUILD_APPLICATION_TEMPLATES=OFF \ + -DCEGUI_BUILD_LUA_MODULE=OFF \ + -DCEGUI_BUILD_PYTHON_MODULES=OFF \ + -DCEGUI_BUILD_XMLPARSER_XERCES=$(CMAKE_STATIC_BOOL) \ + -DCEGUI_BUILD_XMLPARSER_LIBXML2=ON \ + -DCEGUI_BUILD_XMLPARSER_EXPAT=ON \ + -DCEGUI_BUILD_XMLPARSER_TINYXML=OFF \ + -DCEGUI_BUILD_XMLPARSER_RAPIDXML=OFF \ + -DCEGUI_BUILD_IMAGECODEC_CORONA=OFF \ + -DCEGUI_BUILD_IMAGECODEC_DEVIL=OFF \ + -DCEGUI_BUILD_IMAGECODEC_FREEIMAGE=$(CMAKE_STATIC_BOOL) \ + -DCEGUI_BUILD_IMAGECODEC_PVR=OFF \ + -DCEGUI_BUILD_IMAGECODEC_SDL2=OFF \ + -DCEGUI_BUILD_IMAGECODEC_SILLY=OFF \ + -DCEGUI_BUILD_IMAGECODEC_STB=ON \ + -DCEGUI_BUILD_IMAGECODEC_TGA=ON \ + -DCEGUI_BUILD_RENDERER_DIRECT3D10=ON \ + -DCEGUI_BUILD_RENDERER_DIRECT3D11=OFF \ + -DCEGUI_BUILD_RENDERER_DIRECT3D9=ON \ + -DCEGUI_BUILD_RENDERER_DIRECTFB=OFF \ + -DCEGUI_BUILD_RENDERER_IRRLICHT=OFF \ + -DCEGUI_BUILD_RENDERER_NULL=ON \ + -DCEGUI_BUILD_RENDERER_OGRE=OFF \ + -DCEGUI_BUILD_RENDERER_OPENGL=ON \ + -DCEGUI_BUILD_RENDERER_OPENGL3=ON \ + -DCEGUI_BUILD_RENDERER_OPENGLES=OFF \ + -DCMAKE_CXX_FLAGS="`$(TARGET)-pkg-config --cflags glew freeimage`" \ + $(SOURCE_DIR) + + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' VERBOSE=1 + $(MAKE) -C '$(BUILD_DIR)' -j 1 install VERBOSE=1 + + # reconfigure pc files + # https://bitbucket.org/cegui/cegui/issues/1135/pkg-config-files-not-installed-when-using#comment-29605718 + $(SED) -i 's/Requires:\(.*\)/Requires: \1 gl glew glut/' '$(PREFIX)/$(TARGET)/lib/pkgconfig/CEGUI-0-OPENGL.pc' + $(if $(BUILD_STATIC),\ + $(SED) -i 's#\(-lCEGUI.*-0\>\)#\1_Static#g' '$(PREFIX)/$(TARGET)/lib/pkgconfig/CEGUI-0'*.pc + (echo 'Libs: -lCEGUIFreeImageImageCodec_Static \ + -lCEGUIXercesParser_Static \ + -lCEGUICoreWindowRendererSet_Static';\ + echo 'Requires.private: freeimage freetype2 libpcre xerces-c';\ + echo 'Cflags.private: -DCEGUI_STATIC';\ + ) >> '$(PREFIX)/$(TARGET)/lib/pkgconfig/CEGUI-0.pc') '$(TARGET)-g++' \ -W -Wall -ansi -pedantic \ - '$(2).cpp' \ - `'$(TARGET)-pkg-config' --cflags --libs CEGUI-OPENGL glut freetype2 libpcre` \ - -lCEGUIFreeImageImageCodec -lCEGUIXercesParser -lCEGUIFalagardWRBase \ - `'$(TARGET)-pkg-config' --libs --cflags freeimage xerces-c` \ - -o '$(PREFIX)/$(TARGET)/bin/test-cegui.exe' + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-cegui.exe' \ + `$(TARGET)-pkg-config --cflags --libs CEGUI-0-OPENGL` endef - -$(PKG)_BUILD_x86_64-w64-mingw32 = - -$(PKG)_BUILD_SHARED = diff --git a/src/cfitsio-test.c b/src/cfitsio-test.c index 99ac80fc..9b261417 100644 --- a/src/cfitsio-test.c +++ b/src/cfitsio-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include diff --git a/src/cfitsio.mk b/src/cfitsio.mk index 4ba9e838..304f4914 100644 --- a/src/cfitsio.mk +++ b/src/cfitsio.mk @@ -1,17 +1,17 @@ -# 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 := cfitsio +$(PKG)_WEBSITE := https://heasarc.gsfc.nasa.gov/fitsio/ $(PKG)_IGNORE := $(PKG)_VERSION := 3370 $(PKG)_CHECKSUM := 092897c6dae4dfe42d91d35a738e45e8236aa3d8f9b3ffc7f0e6545b8319c63a $(PKG)_SUBDIR := cfitsio $(PKG)_FILE := cfitsio$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/$($(PKG)_FILE) +$(PKG)_URL := https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/?C=M;O=D" | \ + $(WGET) -q -O- "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/?C=M;O=D" | \ grep -i ' diff --git a/src/chipmunk.mk b/src/chipmunk.mk index ca04da98..8b525b69 100644 --- a/src/chipmunk.mk +++ b/src/chipmunk.mk @@ -1,7 +1,8 @@ -# 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 := chipmunk +$(PKG)_WEBSITE := https://chipmunk-physics.net/ +$(PKG)_DESCR := Chipmunk Physics $(PKG)_IGNORE := $(PKG)_VERSION := 6.2.2 $(PKG)_CHECKSUM := c51f0e3a30770f6b940de3228bee40a871aaf7611a1b5ec546a7d2b9e1041f97 @@ -18,22 +19,17 @@ endef define $(PKG)_BUILD mkdir '$(1)/build' - cd '$(1)/build' && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + cd '$(1)/build' && '$(TARGET)-cmake' .. \ -DBUILD_DEMOS=OFF \ -DINSTALL_DEMOS=OFF \ $(if $(BUILD_STATIC), \ - -DBUILD_SHARED=OFF \ - -DBUILD_STATIC=ON \ -DINSTALL_STATIC=ON, \ - -DBUILD_SHARED=ON \ - -DBUILD_STATIC=OFF \ -DINSTALL_STATIC=OFF) $(MAKE) -C '$(1)/build' -j '$(JOBS)' install '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic -std=c99 \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-chipmunk.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-chipmunk.exe' \ -lchipmunk endef diff --git a/src/chromaprint.mk b/src/chromaprint.mk index 5ad47288..8640e71e 100644 --- a/src/chromaprint.mk +++ b/src/chromaprint.mk @@ -1,7 +1,8 @@ -# 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 := chromaprint +$(PKG)_WEBSITE := https://acoustid.org/chromaprint +$(PKG)_DESCR := Chromaprint $(PKG)_IGNORE := $(PKG)_VERSION := 1.1 $(PKG)_CHECKSUM := 6b14d7ea4964581b73bd3f8038c8857c01e446421c1ae99cbbf64de26b47cd12 @@ -16,8 +17,6 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - cd '$(1)' && cmake \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -DBUILD_SHARED_LIBS=$(if $(BUILD_SHARED),ON,OFF) + cd '$(1)' && '$(TARGET)-cmake' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/cimg-1-add-option-exe-suffix-exesfx.patch b/src/cimg-1-add-option-exe-suffix-exesfx.patch index 5760bc15..05ad82a9 100644 --- a/src/cimg-1-add-option-exe-suffix-exesfx.patch +++ b/src/cimg-1-add-option-exe-suffix-exesfx.patch @@ -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 68ca8760276836154d4cc09585c21771856c1cf8 Mon Sep 17 00:00:00 2001 From: Boris Nagaev diff --git a/src/cimg-2-split-cflags-to-define-and-incdir.patch b/src/cimg-2-split-cflags-to-define-and-incdir.patch index 0bb79fdb..1ecb5d50 100644 --- a/src/cimg-2-split-cflags-to-define-and-incdir.patch +++ b/src/cimg-2-split-cflags-to-define-and-incdir.patch @@ -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 db2da6e11d917fae648af3cd3c31190bc0fc8b74 Mon Sep 17 00:00:00 2001 From: Boris Nagaev diff --git a/src/cimg.mk b/src/cimg.mk index 24b49ded..4f7c7d87 100644 --- a/src/cimg.mk +++ b/src/cimg.mk @@ -1,7 +1,8 @@ -# 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 := cimg +$(PKG)_WEBSITE := http://cimg.eu/ +$(PKG)_DESCR := CImg Library $(PKG)_IGNORE := $(PKG)_VERSION := 1.6.3 $(PKG)_CHECKSUM := c2a3c62d05d1e322afa6afae086cf96df82a3a13b839e9bf1cedcb014d921ce7 diff --git a/src/cloog.mk b/src/cloog.mk new file mode 100644 index 00000000..3f9259a8 --- /dev/null +++ b/src/cloog.mk @@ -0,0 +1,29 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := cloog +$(PKG)_WEBSITE := https://www.bastoul.net/cloog/ +$(PKG)_DESCR := CLooG Code Generator +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.18.4 +$(PKG)_CHECKSUM := 325adf3710ce2229b7eeb9e84d3b539556d093ae860027185e7af8a8b00a750e +$(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)_DEPS := gcc gmp isl + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://www.bastoul.net/cloog/download.php' | \ + $(SED) -n 's,.*cloog-\([0-9][^>]*\)\.tar.*,\1,p' | \ + $(SORT) -V | + tail -1 +endef + +define $(PKG)_BUILD + cd '$(1)' && ./configure \ + $(MXE_CONFIGURE_OPTS) \ + --with-gmp-prefix='$(PREFIX)/$(TARGET)' \ + --with-isl-prefix='$(PREFIX)/$(TARGET)' + $(MAKE) -C '$(1)' -j '$(JOBS)' $(if $(BUILD_SHARED),LDFLAGS=-no-undefined) + $(MAKE) -C '$(1)' -j '$(JOBS)' install +endef diff --git a/src/cmake-1-fixes.patch b/src/cmake-1-fixes.patch new file mode 100644 index 00000000..59a350bf --- /dev/null +++ b/src/cmake-1-fixes.patch @@ -0,0 +1,19 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +Contains ad hoc patches for cross building. + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore +Date: Fri, 12 Aug 2016 02:01:20 +1000 +Subject: [PATCH] fix windres invocation options + +windres doesn't recognise various gcc flags like -mms-bitfields, +-fopenmp, -mthreads etc. (basically not `-D` or `-I`) + +diff --git a/Modules/Platform/Windows-windres.cmake b/Modules/Platform/Windows-windres.cmake +index 1111111..2222222 100644 +--- a/Modules/Platform/Windows-windres.cmake ++++ b/Modules/Platform/Windows-windres.cmake +@@ -1 +1 @@ +-set(CMAKE_RC_COMPILE_OBJECT " -O coff ") ++set(CMAKE_RC_COMPILE_OBJECT " -O coff ") diff --git a/src/cmake-conf.mk b/src/cmake-conf.mk new file mode 100644 index 00000000..d9c086d2 --- /dev/null +++ b/src/cmake-conf.mk @@ -0,0 +1,57 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := cmake-conf +$(PKG)_VERSION := 1 +$(PKG)_UPDATE := echo 1 +$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) +$(PKG)_FILE_DEPS := $(wildcard $(PWD)/src/cmake/conf/*) + +define $(PKG)_BUILD + # create the CMake toolchain file using template + # individual packages (e.g. hdf5) should add their + # own files under CMAKE_TOOLCHAIN_DIR + + mkdir -p '$(CMAKE_TOOLCHAIN_DIR)' + touch '$(CMAKE_TOOLCHAIN_DIR)/.gitkeep' + cmake-configure-file \ + -DCMAKE_VERSION=$(cmake_VERSION) \ + -DCMAKE_SHARED_BOOL=$(CMAKE_SHARED_BOOL) \ + -DCMAKE_STATIC_BOOL=$(CMAKE_STATIC_BOOL) \ + -DLIBTYPE=$(if $(BUILD_SHARED),SHARED,STATIC) \ + -DPREFIX=$(PREFIX) \ + -DTARGET=$(TARGET) \ + -DBUILD=$(BUILD) \ + -DCMAKE_TOOLCHAIN_DIR='$(CMAKE_TOOLCHAIN_DIR)' \ + -DINPUT='$(PWD)/src/cmake/conf/mxe-conf.cmake.in' \ + -DOUTPUT='$(CMAKE_TOOLCHAIN_FILE)' + + #create prefixed cmake wrapper script + cmake-configure-file \ + -DCMAKE_VERSION=$(cmake_VERSION) \ + -DPREFIX=$(PREFIX) \ + -DTARGET=$(TARGET) \ + -DBUILD=$(BUILD) \ + -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + -DCMAKE_RUNRESULT_FILE='$(CMAKE_RUNRESULT_FILE)' \ + -DINPUT='$(PWD)/src/cmake/conf/target-cmake.in' \ + -DOUTPUT='$(PREFIX)/bin/$(TARGET)-cmake' + chmod 0755 '$(PREFIX)/bin/$(TARGET)-cmake' +endef + +define $(PKG)_BUILD_$(BUILD) + # install cmake modules + mkdir -p '$(PREFIX)/share/cmake/modules' + $(INSTALL) -m644 '$(PWD)/src/cmake/modules/'* '$(PREFIX)/share/cmake/modules' + + # install cmake-configure-file for general use + # cmake-configure-file -DINPUT -DOUTPUT -DFOO -DBAR -D... + mkdir -p '$(PREFIX)/bin' + echo 'configure_file($${INPUT} $${OUTPUT} @ONLY)' \ + > '$(PREFIX)/share/cmake/modules/configure_file.cmake' + (echo '#!/usr/bin/env bash'; \ + echo 'exec "$(PREFIX)/$(BUILD)/bin/cmake" "$$@" \ + -P "$(PREFIX)/share/cmake/modules/configure_file.cmake"'; \ + ) \ + > '$(PREFIX)/bin/cmake-configure-file' + chmod 0755 '$(PREFIX)/bin/cmake-configure-file' +endef diff --git a/src/cmake.mk b/src/cmake.mk index 11c44efc..c083f79c 100644 --- a/src/cmake.mk +++ b/src/cmake.mk @@ -1,17 +1,18 @@ -# 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 := cmake +$(PKG)_WEBSITE := https://www.cmake.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 3.0.2 -$(PKG)_CHECKSUM := 6b4ea61eadbbd9bec0ccb383c29d1f4496eacc121ef7acf37c7a24777805693e +$(PKG)_VERSION := 3.7.2 +$(PKG)_CHECKSUM := dc1246c4e6d168ea4d6e042cfba577c1acd65feea27e56f5ff37df920c30cae0 $(PKG)_SUBDIR := cmake-$($(PKG)_VERSION) $(PKG)_FILE := cmake-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.cmake.org/files/v$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://www.cmake.org/files/v$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_TARGETS := $(BUILD) $(PKG)_DEPS := define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.cmake.org/cmake/resources/software.html' | \ + $(WGET) -q -O- 'https://www.cmake.org/cmake/resources/software.html' | \ $(SED) -n 's,.*cmake-\([0-9.]*\)\.tar.*,\1,p' | \ $(SORT) -V | \ tail -1 diff --git a/src/cmake/conf/mxe-conf.cmake.in b/src/cmake/conf/mxe-conf.cmake.in new file mode 100644 index 00000000..12d38562 --- /dev/null +++ b/src/cmake/conf/mxe-conf.cmake.in @@ -0,0 +1,66 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +# https://cmake.org/cmake/help/latest + +# Can't set `cmake_minimum_required` or `cmake_policy` in toolchain +# since toolchain is read before CMakeLists.txt +# See `target-cmake.in` for CMAKE_POLICY_DEFAULT_CMPNNNN + +# Check if we are using mxe supplied version +# - toolchain is included multiple times so set a guard in +# environment to suppress duplicate messages +if(NOT ${CMAKE_COMMAND} STREQUAL @PREFIX@/@BUILD@/bin/cmake AND NOT DEFINED ENV{_MXE_CMAKE_TOOLCHAIN_INCLUDED}) + message(WARNING " +** Warning: direct use of toolchain file is deprecated +** Please use prefixed wrapper script instead: + @TARGET@-cmake [options] + - uses mxe supplied cmake version @CMAKE_VERSION@ + - loads toolchain + - loads common run results + - sets various policy defaults + ") + set(ENV{_MXE_CMAKE_TOOLCHAIN_INCLUDED} TRUE) +endif() + +## General configuration +set(CMAKE_SYSTEM_NAME Windows) +set(MSYS 1) +set(CMAKE_EXPORT_NO_PACKAGE_REGISTRY ON) +# Workaround for https://www.cmake.org/Bug/view.php?id=14075 +set(CMAKE_CROSS_COMPILING ON) + + +## Library config +set(BUILD_SHARED_LIBS @CMAKE_SHARED_BOOL@ CACHE BOOL "BUILD_SHARED_LIBS" FORCE) +set(BUILD_STATIC_LIBS @CMAKE_STATIC_BOOL@ CACHE BOOL "BUILD_STATIC_LIBS" FORCE) +set(BUILD_SHARED @CMAKE_SHARED_BOOL@ CACHE BOOL "BUILD_SHARED" FORCE) +set(BUILD_STATIC @CMAKE_STATIC_BOOL@ CACHE BOOL "BUILD_STATIC" FORCE) +set(LIBTYPE @LIBTYPE@) + + +## Paths etc. +set(CMAKE_FIND_ROOT_PATH @PREFIX@/@TARGET@) +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_PREFIX_PATH @PREFIX@/@TARGET@) +set(CMAKE_INSTALL_PREFIX @PREFIX@/@TARGET@ CACHE PATH "Installation Prefix") +# For custom mxe FindPackage scripts +set(CMAKE_MODULE_PATH "@PREFIX@/share/cmake/modules" ${CMAKE_MODULE_PATH}) + + +## Programs +set(CMAKE_C_COMPILER @PREFIX@/bin/@TARGET@-gcc) +set(CMAKE_CXX_COMPILER @PREFIX@/bin/@TARGET@-g++) +set(CMAKE_Fortran_COMPILER @PREFIX@/bin/@TARGET@-gfortran) +set(CMAKE_RC_COMPILER @PREFIX@/bin/@TARGET@-windres) +# CMAKE_RC_COMPILE_OBJECT is defined in: +# /share/cmake-X.Y/Modules/Platform/Windows-windres.cmake + +## Individual package configuration +file(GLOB mxe_cmake_files + "@CMAKE_TOOLCHAIN_DIR@/*.cmake" +) +foreach(mxe_cmake_file ${mxe_cmake_files}) + include(${mxe_cmake_file}) +endforeach() diff --git a/src/cmake/conf/target-cmake.in b/src/cmake/conf/target-cmake.in new file mode 100644 index 00000000..a78bcf58 --- /dev/null +++ b/src/cmake/conf/target-cmake.in @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +echo "== Using MXE wrapper: @PREFIX@/bin/@TARGET@-cmake" + +# https://cmake.org/cmake/help/latest/manual/cmake-policies.7.html +# https://cmake.org/cmake/help/latest/variable/CMAKE_POLICY_DEFAULT_CMPNNNN.html +POLICIES=(0017,0020) + +unset NO_MXE_TOOLCHAIN +if echo -- "$@" | grep -Ewq "(--build|-E|--system-information)" ; then + NO_MXE_TOOLCHAIN=1 +fi +if [[ "$NO_MXE_TOOLCHAIN" == "1" ]]; then + echo "== Skip using MXE toolchain: @CMAKE_TOOLCHAIN_FILE@" + # see https://github.com/mxe/mxe/issues/932 + exec "@PREFIX@/@BUILD@/bin/cmake" "$@" +else + echo " - cmake version @CMAKE_VERSION@" + echo " - warnings for unused CMAKE_POLICY_DEFAULT variables can be ignored" + echo "== Using MXE toolchain: @CMAKE_TOOLCHAIN_FILE@" + echo "== Using MXE runresult: @CMAKE_RUNRESULT_FILE@" + if ! ( echo "$@" | grep --silent "DCMAKE_BUILD_TYPE" ) ; then + echo '== Adding "-DCMAKE_BUILD_TYPE=Release"' + set -- "-DCMAKE_BUILD_TYPE=Release" "$@" + fi + exec "@PREFIX@/@BUILD@/bin/cmake" \ + -DCMAKE_TOOLCHAIN_FILE="@CMAKE_TOOLCHAIN_FILE@" \ + `eval echo -DCMAKE_POLICY_DEFAULT_CMP{$POLICIES}=NEW` \ + -C"@CMAKE_RUNRESULT_FILE@" "$@" +fi diff --git a/src/cmake/modules/CMakeParseArguments.cmake b/src/cmake/modules/CMakeParseArguments.cmake deleted file mode 100644 index 8553f38f..00000000 --- a/src/cmake/modules/CMakeParseArguments.cmake +++ /dev/null @@ -1,161 +0,0 @@ -#.rst: -# CMakeParseArguments -# ------------------- -# -# -# -# CMAKE_PARSE_ARGUMENTS( -# args...) -# -# CMAKE_PARSE_ARGUMENTS() is intended to be used in macros or functions -# for parsing the arguments given to that macro or function. It -# processes the arguments and defines a set of variables which hold the -# values of the respective options. -# -# The argument contains all options for the respective macro, -# i.e. keywords which can be used when calling the macro without any -# value following, like e.g. the OPTIONAL keyword of the install() -# command. -# -# The argument contains all keywords for this macro -# which are followed by one value, like e.g. DESTINATION keyword of the -# install() command. -# -# The argument contains all keywords for this -# macro which can be followed by more than one value, like e.g. the -# TARGETS or FILES keywords of the install() command. -# -# When done, CMAKE_PARSE_ARGUMENTS() will have defined for each of the -# keywords listed in , and -# a variable composed of the given -# followed by "_" and the name of the respective keyword. These -# variables will then hold the respective value from the argument list. -# For the keywords this will be TRUE or FALSE. -# -# All remaining arguments are collected in a variable -# _UNPARSED_ARGUMENTS, this can be checked afterwards to see -# whether your macro was called with unrecognized parameters. -# -# As an example here a my_install() macro, which takes similar arguments -# as the real install() command: -# -# :: -# -# function(MY_INSTALL) -# set(options OPTIONAL FAST) -# set(oneValueArgs DESTINATION RENAME) -# set(multiValueArgs TARGETS CONFIGURATIONS) -# cmake_parse_arguments(MY_INSTALL "${options}" "${oneValueArgs}" -# "${multiValueArgs}" ${ARGN} ) -# ... -# -# -# -# Assume my_install() has been called like this: -# -# :: -# -# my_install(TARGETS foo bar DESTINATION bin OPTIONAL blub) -# -# -# -# After the cmake_parse_arguments() call the macro will have set the -# following variables: -# -# :: -# -# MY_INSTALL_OPTIONAL = TRUE -# MY_INSTALL_FAST = FALSE (this option was not used when calling my_install() -# MY_INSTALL_DESTINATION = "bin" -# MY_INSTALL_RENAME = "" (was not used) -# MY_INSTALL_TARGETS = "foo;bar" -# MY_INSTALL_CONFIGURATIONS = "" (was not used) -# MY_INSTALL_UNPARSED_ARGUMENTS = "blub" (no value expected after "OPTIONAL" -# -# -# -# You can then continue and process these variables. -# -# Keywords terminate lists of values, e.g. if directly after a -# one_value_keyword another recognized keyword follows, this is -# interpreted as the beginning of the new option. E.g. -# my_install(TARGETS foo DESTINATION OPTIONAL) would result in -# MY_INSTALL_DESTINATION set to "OPTIONAL", but MY_INSTALL_DESTINATION -# would be empty and MY_INSTALL_OPTIONAL would be set to TRUE therefor. - -#============================================================================= -# Copyright 2010 Alexander Neundorf -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - - -if(__CMAKE_PARSE_ARGUMENTS_INCLUDED) - return() -endif() -set(__CMAKE_PARSE_ARGUMENTS_INCLUDED TRUE) - - -function(CMAKE_PARSE_ARGUMENTS prefix _optionNames _singleArgNames _multiArgNames) - # first set all result variables to empty/FALSE - foreach(arg_name ${_singleArgNames} ${_multiArgNames}) - set(${prefix}_${arg_name}) - endforeach() - - foreach(option ${_optionNames}) - set(${prefix}_${option} FALSE) - endforeach() - - set(${prefix}_UNPARSED_ARGUMENTS) - - set(insideValues FALSE) - set(currentArgName) - - # now iterate over all arguments and fill the result variables - foreach(currentArg ${ARGN}) - list(FIND _optionNames "${currentArg}" optionIndex) # ... then this marks the end of the arguments belonging to this keyword - list(FIND _singleArgNames "${currentArg}" singleArgIndex) # ... then this marks the end of the arguments belonging to this keyword - list(FIND _multiArgNames "${currentArg}" multiArgIndex) # ... then this marks the end of the arguments belonging to this keyword - - if(${optionIndex} EQUAL -1 AND ${singleArgIndex} EQUAL -1 AND ${multiArgIndex} EQUAL -1) - if(insideValues) - if("${insideValues}" STREQUAL "SINGLE") - set(${prefix}_${currentArgName} ${currentArg}) - set(insideValues FALSE) - elseif("${insideValues}" STREQUAL "MULTI") - list(APPEND ${prefix}_${currentArgName} ${currentArg}) - endif() - else() - list(APPEND ${prefix}_UNPARSED_ARGUMENTS ${currentArg}) - endif() - else() - if(NOT ${optionIndex} EQUAL -1) - set(${prefix}_${currentArg} TRUE) - set(insideValues FALSE) - elseif(NOT ${singleArgIndex} EQUAL -1) - set(currentArgName ${currentArg}) - set(${prefix}_${currentArgName}) - set(insideValues "SINGLE") - elseif(NOT ${multiArgIndex} EQUAL -1) - set(currentArgName ${currentArg}) - set(${prefix}_${currentArgName}) - set(insideValues "MULTI") - endif() - endif() - - endforeach() - - # propagate the result variables to the caller: - foreach(arg_name ${_singleArgNames} ${_multiArgNames} ${_optionNames}) - set(${prefix}_${arg_name} ${${prefix}_${arg_name}} PARENT_SCOPE) - endforeach() - set(${prefix}_UNPARSED_ARGUMENTS ${${prefix}_UNPARSED_ARGUMENTS} PARENT_SCOPE) - -endfunction() diff --git a/src/cmake/modules/FindFreetype.cmake b/src/cmake/modules/FindFreetype.cmake index e436662d..43690feb 100644 --- a/src/cmake/modules/FindFreetype.cmake +++ b/src/cmake/modules/FindFreetype.cmake @@ -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. message("== Custom MXE File: " ${CMAKE_CURRENT_LIST_FILE}) @@ -9,4 +8,6 @@ endif() pkg_check_modules(FREETYPE freetype2) -set(FREETYPE_LIBRARY ${FREETYPE_LIBRARIES}) #For compatibility +#For compatibility +set(FREETYPE_LIBRARY ${FREETYPE_LIBRARIES}) +set(FREETYPE_INCLUDE_DIR ${FREETYPE_INCLUDE_DIRS}) diff --git a/src/cmake/modules/FindFriBiDi.cmake b/src/cmake/modules/FindFriBiDi.cmake index 949665b2..6dbfdf88 100644 --- a/src/cmake/modules/FindFriBiDi.cmake +++ b/src/cmake/modules/FindFriBiDi.cmake @@ -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. message("== Custom MXE File: " ${CMAKE_CURRENT_LIST_FILE}) diff --git a/src/cmake/modules/FindOpenSSL.cmake b/src/cmake/modules/FindOpenSSL.cmake deleted file mode 100644 index 3763d802..00000000 --- a/src/cmake/modules/FindOpenSSL.cmake +++ /dev/null @@ -1,336 +0,0 @@ -#.rst: -# FindOpenSSL -# ----------- -# -# Try to find the OpenSSL encryption library -# -# Once done this will define -# -# :: -# -# OPENSSL_ROOT_DIR - Set this variable to the root installation of OpenSSL -# -# -# -# Read-Only variables: -# -# :: -# -# OPENSSL_FOUND - system has the OpenSSL library -# OPENSSL_INCLUDE_DIR - the OpenSSL include directory -# OPENSSL_LIBRARIES - The libraries needed to use OpenSSL -# OPENSSL_VERSION - This is set to $major.$minor.$revision$path (eg. 0.9.8s) - -#============================================================================= -# Copyright 2006-2009 Kitware, Inc. -# Copyright 2006 Alexander Neundorf -# Copyright 2009-2011 Mathieu Malaterre -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -message("== Custom MXE File: " ${CMAKE_CURRENT_LIST_FILE}) - -if (UNIX) - find_package(PkgConfig QUIET) - pkg_check_modules(_OPENSSL QUIET openssl) -endif () - -if (WIN32) - # http://www.slproweb.com/products/Win32OpenSSL.html - set(_OPENSSL_ROOT_HINTS - ${OPENSSL_ROOT_DIR} - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;Inno Setup: App Path]" - ENV OPENSSL_ROOT_DIR - ) - file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles) - set(_OPENSSL_ROOT_PATHS - "${_programfiles}/OpenSSL" - "${_programfiles}/OpenSSL-Win32" - "${_programfiles}/OpenSSL-Win64" - "C:/OpenSSL/" - "C:/OpenSSL-Win32/" - "C:/OpenSSL-Win64/" - ) - unset(_programfiles) -else () - set(_OPENSSL_ROOT_HINTS - ${OPENSSL_ROOT_DIR} - ENV OPENSSL_ROOT_DIR - ) -endif () - -set(_OPENSSL_ROOT_HINTS_AND_PATHS - HINTS ${_OPENSSL_ROOT_HINTS} - PATHS ${_OPENSSL_ROOT_PATHS} - ) - -find_path(OPENSSL_INCLUDE_DIR - NAMES - openssl/ssl.h - ${_OPENSSL_ROOT_HINTS_AND_PATHS} - HINTS - ${_OPENSSL_INCLUDEDIR} - PATH_SUFFIXES - include -) - -if(WIN32 AND NOT CYGWIN) - if(MSVC) - # /MD and /MDd are the standard values - if someone wants to use - # others, the libnames have to change here too - # use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b - # TODO: handle /MT and static lib - # In Visual C++ naming convention each of these four kinds of Windows libraries has it's standard suffix: - # * MD for dynamic-release - # * MDd for dynamic-debug - # * MT for static-release - # * MTd for static-debug - - # Implementation details: - # We are using the libraries located in the VC subdir instead of the parent directory eventhough : - # libeay32MD.lib is identical to ../libeay32.lib, and - # ssleay32MD.lib is identical to ../ssleay32.lib - find_library(LIB_EAY_DEBUG - NAMES - libeay32MDd - libeay32d - ${_OPENSSL_ROOT_HINTS_AND_PATHS} - PATH_SUFFIXES - "lib" - "VC" - "lib/VC" - ) - - find_library(LIB_EAY_RELEASE - NAMES - libeay32MD - libeay32 - ${_OPENSSL_ROOT_HINTS_AND_PATHS} - PATH_SUFFIXES - "lib" - "VC" - "lib/VC" - ) - - find_library(SSL_EAY_DEBUG - NAMES - ssleay32MDd - ssleay32d - ${_OPENSSL_ROOT_HINTS_AND_PATHS} - PATH_SUFFIXES - "lib" - "VC" - "lib/VC" - ) - - find_library(SSL_EAY_RELEASE - NAMES - ssleay32MD - ssleay32 - ssl - ${_OPENSSL_ROOT_HINTS_AND_PATHS} - PATH_SUFFIXES - "lib" - "VC" - "lib/VC" - ) - - set(LIB_EAY_LIBRARY_DEBUG "${LIB_EAY_DEBUG}") - set(LIB_EAY_LIBRARY_RELEASE "${LIB_EAY_RELEASE}") - set(SSL_EAY_LIBRARY_DEBUG "${SSL_EAY_DEBUG}") - set(SSL_EAY_LIBRARY_RELEASE "${SSL_EAY_RELEASE}") - - include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) - select_library_configurations(LIB_EAY) - select_library_configurations(SSL_EAY) - - mark_as_advanced(LIB_EAY_LIBRARY_DEBUG LIB_EAY_LIBRARY_RELEASE - SSL_EAY_LIBRARY_DEBUG SSL_EAY_LIBRARY_RELEASE) - set( OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY} ) - elseif(MINGW) - # same player, for MinGW - set(LIB_EAY_NAMES libeay32) - set(SSL_EAY_NAMES ssleay32) - if(CMAKE_CROSSCOMPILING) - list(APPEND LIB_EAY_NAMES crypto) - list(APPEND SSL_EAY_NAMES ssl) - endif() - find_library(LIB_EAY - NAMES - ${LIB_EAY_NAMES} - ${_OPENSSL_ROOT_HINTS_AND_PATHS} - PATH_SUFFIXES - "lib" - "lib/MinGW" - ) - - find_library(SSL_EAY - NAMES - ${SSL_EAY_NAMES} - ${_OPENSSL_ROOT_HINTS_AND_PATHS} - PATH_SUFFIXES - "lib" - "lib/MinGW" - ) - - mark_as_advanced(SSL_EAY LIB_EAY) - set( OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} ) - unset(LIB_EAY_NAMES) - unset(SSL_EAY_NAMES) - else() - # Not sure what to pick for -say- intel, let's use the toplevel ones and hope someone report issues: - find_library(LIB_EAY - NAMES - libeay32 - ${_OPENSSL_ROOT_HINTS_AND_PATHS} - HINTS - ${_OPENSSL_LIBDIR} - PATH_SUFFIXES - lib - ) - - find_library(SSL_EAY - NAMES - ssleay32 - ${_OPENSSL_ROOT_HINTS_AND_PATHS} - HINTS - ${_OPENSSL_LIBDIR} - PATH_SUFFIXES - lib - ) - - mark_as_advanced(SSL_EAY LIB_EAY) - set( OPENSSL_LIBRARIES ${SSL_EAY} ${LIB_EAY} ) - endif() -else() - - find_library(OPENSSL_SSL_LIBRARY - NAMES - ssl - ssleay32 - ssleay32MD - ${_OPENSSL_ROOT_HINTS_AND_PATHS} - HINTS - ${_OPENSSL_LIBDIR} - PATH_SUFFIXES - lib - ) - - find_library(OPENSSL_CRYPTO_LIBRARY - NAMES - crypto - ${_OPENSSL_ROOT_HINTS_AND_PATHS} - HINTS - ${_OPENSSL_LIBDIR} - PATH_SUFFIXES - lib - ) - - mark_as_advanced(OPENSSL_CRYPTO_LIBRARY OPENSSL_SSL_LIBRARY) - - # compat defines - set(OPENSSL_SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY}) - set(OPENSSL_CRYPTO_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY}) - - set(OPENSSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY}) - -endif() - -function(from_hex HEX DEC) - string(TOUPPER "${HEX}" HEX) - set(_res 0) - string(LENGTH "${HEX}" _strlen) - - while (_strlen GREATER 0) - math(EXPR _res "${_res} * 16") - string(SUBSTRING "${HEX}" 0 1 NIBBLE) - string(SUBSTRING "${HEX}" 1 -1 HEX) - if (NIBBLE STREQUAL "A") - math(EXPR _res "${_res} + 10") - elseif (NIBBLE STREQUAL "B") - math(EXPR _res "${_res} + 11") - elseif (NIBBLE STREQUAL "C") - math(EXPR _res "${_res} + 12") - elseif (NIBBLE STREQUAL "D") - math(EXPR _res "${_res} + 13") - elseif (NIBBLE STREQUAL "E") - math(EXPR _res "${_res} + 14") - elseif (NIBBLE STREQUAL "F") - math(EXPR _res "${_res} + 15") - else() - math(EXPR _res "${_res} + ${NIBBLE}") - endif() - - string(LENGTH "${HEX}" _strlen) - endwhile() - - set(${DEC} ${_res} PARENT_SCOPE) -endfunction() - -if (OPENSSL_INCLUDE_DIR) - if (_OPENSSL_VERSION) - set(OPENSSL_VERSION "${_OPENSSL_VERSION}") - elseif(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h") - file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str - REGEX "^# *define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*") - - # The version number is encoded as 0xMNNFFPPS: major minor fix patch status - # The status gives if this is a developer or prerelease and is ignored here. - # Major, minor, and fix directly translate into the version numbers shown in - # the string. The patch field translates to the single character suffix that - # indicates the bug fix state, which 00 -> nothing, 01 -> a, 02 -> b and so - # on. - - string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F]).*$" - "\\1;\\2;\\3;\\4;\\5" OPENSSL_VERSION_LIST "${openssl_version_str}") - list(GET OPENSSL_VERSION_LIST 0 OPENSSL_VERSION_MAJOR) - list(GET OPENSSL_VERSION_LIST 1 OPENSSL_VERSION_MINOR) - from_hex("${OPENSSL_VERSION_MINOR}" OPENSSL_VERSION_MINOR) - list(GET OPENSSL_VERSION_LIST 2 OPENSSL_VERSION_FIX) - from_hex("${OPENSSL_VERSION_FIX}" OPENSSL_VERSION_FIX) - list(GET OPENSSL_VERSION_LIST 3 OPENSSL_VERSION_PATCH) - - if (NOT OPENSSL_VERSION_PATCH STREQUAL "00") - from_hex("${OPENSSL_VERSION_PATCH}" _tmp) - # 96 is the ASCII code of 'a' minus 1 - math(EXPR OPENSSL_VERSION_PATCH_ASCII "${_tmp} + 96") - unset(_tmp) - # Once anyone knows how OpenSSL would call the patch versions beyond 'z' - # this should be updated to handle that, too. This has not happened yet - # so it is simply ignored here for now. - string(ASCII "${OPENSSL_VERSION_PATCH_ASCII}" OPENSSL_VERSION_PATCH_STRING) - endif () - - set(OPENSSL_VERSION "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_FIX}${OPENSSL_VERSION_PATCH_STRING}") - endif () -endif () - -include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) - -if (OPENSSL_VERSION) - find_package_handle_standard_args(OpenSSL - REQUIRED_VARS - OPENSSL_LIBRARIES - OPENSSL_INCLUDE_DIR - VERSION_VAR - OPENSSL_VERSION - FAIL_MESSAGE - "Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR" - ) -else () - find_package_handle_standard_args(OpenSSL "Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR" - OPENSSL_LIBRARIES - OPENSSL_INCLUDE_DIR - ) -endif () - -mark_as_advanced(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) diff --git a/src/cmake/modules/FindPackageHandleStandardArgs.cmake b/src/cmake/modules/FindPackageHandleStandardArgs.cmake deleted file mode 100644 index 6bcf1e78..00000000 --- a/src/cmake/modules/FindPackageHandleStandardArgs.cmake +++ /dev/null @@ -1,382 +0,0 @@ -#.rst: -# FindPackageHandleStandardArgs -# ----------------------------- -# -# -# -# FIND_PACKAGE_HANDLE_STANDARD_ARGS( ... ) -# -# This function is intended to be used in FindXXX.cmake modules files. -# It handles the REQUIRED, QUIET and version-related arguments to -# find_package(). It also sets the _FOUND variable. The -# package is considered found if all variables ... listed contain -# valid results, e.g. valid filepaths. -# -# There are two modes of this function. The first argument in both -# modes is the name of the Find-module where it is called (in original -# casing). -# -# The first simple mode looks like this: -# -# :: -# -# FIND_PACKAGE_HANDLE_STANDARD_ARGS( -# (DEFAULT_MSG|"Custom failure message") ... ) -# -# If the variables to are all valid, then -# _FOUND will be set to TRUE. If DEFAULT_MSG is given -# as second argument, then the function will generate itself useful -# success and error messages. You can also supply a custom error -# message for the failure case. This is not recommended. -# -# The second mode is more powerful and also supports version checking: -# -# :: -# -# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME -# [FOUND_VAR ] -# [REQUIRED_VARS ...] -# [VERSION_VAR ] -# [HANDLE_COMPONENTS] -# [CONFIG_MODE] -# [FAIL_MESSAGE "Custom failure message"] ) -# -# In this mode, the name of the result-variable can be set either to -# either _FOUND or _FOUND using the -# FOUND_VAR option. Other names for the result-variable are not -# allowed. So for a Find-module named FindFooBar.cmake, the two -# possible names are FooBar_FOUND and FOOBAR_FOUND. It is recommended -# to use the original case version. If the FOUND_VAR option is not -# used, the default is _FOUND. -# -# As in the simple mode, if through are all valid, -# _FOUND will be set to TRUE. After REQUIRED_VARS the -# variables which are required for this package are listed. Following -# VERSION_VAR the name of the variable can be specified which holds the -# version of the package which has been found. If this is done, this -# version will be checked against the (potentially) specified required -# version used in the find_package() call. The EXACT keyword is also -# handled. The default messages include information about the required -# version and the version which has been actually found, both if the -# version is ok or not. If the package supports components, use the -# HANDLE_COMPONENTS option to enable handling them. In this case, -# find_package_handle_standard_args() will report which components have -# been found and which are missing, and the _FOUND variable -# will be set to FALSE if any of the required components (i.e. not the -# ones listed after OPTIONAL_COMPONENTS) are missing. Use the option -# CONFIG_MODE if your FindXXX.cmake module is a wrapper for a -# find_package(... NO_MODULE) call. In this case VERSION_VAR will be -# set to _VERSION and the macro will automatically check whether -# the Config module was found. Via FAIL_MESSAGE a custom failure -# message can be specified, if this is not used, the default message -# will be displayed. -# -# Example for mode 1: -# -# :: -# -# find_package_handle_standard_args(LibXml2 DEFAULT_MSG -# LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR) -# -# -# -# LibXml2 is considered to be found, if both LIBXML2_LIBRARY and -# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to -# TRUE. If it is not found and REQUIRED was used, it fails with -# FATAL_ERROR, independent whether QUIET was used or not. If it is -# found, success will be reported, including the content of . On -# repeated Cmake runs, the same message won't be printed again. -# -# Example for mode 2: -# -# :: -# -# find_package_handle_standard_args(LibXslt -# FOUND_VAR LibXslt_FOUND -# REQUIRED_VARS LibXslt_LIBRARIES LibXslt_INCLUDE_DIRS -# VERSION_VAR LibXslt_VERSION_STRING) -# -# In this case, LibXslt is considered to be found if the variable(s) -# listed after REQUIRED_VAR are all valid, i.e. LibXslt_LIBRARIES and -# LibXslt_INCLUDE_DIRS in this case. The result will then be stored in -# LibXslt_FOUND . Also the version of LibXslt will be checked by using -# the version contained in LibXslt_VERSION_STRING. Since no -# FAIL_MESSAGE is given, the default messages will be printed. -# -# Another example for mode 2: -# -# :: -# -# find_package(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4) -# find_package_handle_standard_args(Automoc4 CONFIG_MODE) -# -# In this case, FindAutmoc4.cmake wraps a call to find_package(Automoc4 -# NO_MODULE) and adds an additional search directory for automoc4. Here -# the result will be stored in AUTOMOC4_FOUND. The following -# FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper -# success/error message. - -#============================================================================= -# Copyright 2007-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -include(${CMAKE_CURRENT_LIST_DIR}/FindPackageMessage.cmake) -include(${CMAKE_CURRENT_LIST_DIR}/CMakeParseArguments.cmake) - -# internal helper macro -macro(_FPHSA_FAILURE_MESSAGE _msg) - if (${_NAME}_FIND_REQUIRED) - message(FATAL_ERROR "${_msg}") - else () - if (NOT ${_NAME}_FIND_QUIETLY) - message(STATUS "${_msg}") - endif () - endif () -endmacro() - - -# internal helper macro to generate the failure message when used in CONFIG_MODE: -macro(_FPHSA_HANDLE_FAILURE_CONFIG_MODE) - # _CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found: - if(${_NAME}_CONFIG) - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing: ${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})") - else() - # If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version. - # List them all in the error message: - if(${_NAME}_CONSIDERED_CONFIGS) - set(configsText "") - list(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount) - math(EXPR configsCount "${configsCount} - 1") - foreach(currentConfigIndex RANGE ${configsCount}) - list(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename) - list(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version) - set(configsText "${configsText} ${filename} (version ${version})\n") - endforeach() - if (${_NAME}_NOT_FOUND_MESSAGE) - set(configsText "${configsText} Reason given by package: ${${_NAME}_NOT_FOUND_MESSAGE}\n") - endif() - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}") - - else() - # Simple case: No Config-file was found at all: - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}") - endif() - endif() -endmacro() - - -function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG) - -# set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in -# new extended or in the "old" mode: - set(options CONFIG_MODE HANDLE_COMPONENTS) - set(oneValueArgs FAIL_MESSAGE VERSION_VAR FOUND_VAR) - set(multiValueArgs REQUIRED_VARS) - set(_KEYWORDS_FOR_EXTENDED_MODE ${options} ${oneValueArgs} ${multiValueArgs} ) - list(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX) - - if(${INDEX} EQUAL -1) - set(FPHSA_FAIL_MESSAGE ${_FIRST_ARG}) - set(FPHSA_REQUIRED_VARS ${ARGN}) - set(FPHSA_VERSION_VAR) - else() - - CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}" ${_FIRST_ARG} ${ARGN}) - - if(FPHSA_UNPARSED_ARGUMENTS) - message(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"") - endif() - - if(NOT FPHSA_FAIL_MESSAGE) - set(FPHSA_FAIL_MESSAGE "DEFAULT_MSG") - endif() - endif() - -# now that we collected all arguments, process them - - if("x${FPHSA_FAIL_MESSAGE}" STREQUAL "xDEFAULT_MSG") - set(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}") - endif() - - # In config-mode, we rely on the variable _CONFIG, which is set by find_package() - # when it successfully found the config-file, including version checking: - if(FPHSA_CONFIG_MODE) - list(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG) - list(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS) - set(FPHSA_VERSION_VAR ${_NAME}_VERSION) - endif() - - if(NOT FPHSA_REQUIRED_VARS) - message(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()") - endif() - - list(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR) - - string(TOUPPER ${_NAME} _NAME_UPPER) - string(TOLOWER ${_NAME} _NAME_LOWER) - - if(FPHSA_FOUND_VAR) - if(FPHSA_FOUND_VAR MATCHES "^${_NAME}_FOUND$" OR FPHSA_FOUND_VAR MATCHES "^${_NAME_UPPER}_FOUND$") - set(_FOUND_VAR ${FPHSA_FOUND_VAR}) - else() - message(FATAL_ERROR "The argument for FOUND_VAR is \"${FPHSA_FOUND_VAR}\", but only \"${_NAME}_FOUND\" and \"${_NAME_UPPER}_FOUND\" are valid names.") - endif() - else() - set(_FOUND_VAR ${_NAME_UPPER}_FOUND) - endif() - - # collect all variables which were not found, so they can be printed, so the - # user knows better what went wrong (#6375) - set(MISSING_VARS "") - set(DETAILS "") - # check if all passed variables are valid - unset(${_FOUND_VAR}) - foreach(_CURRENT_VAR ${FPHSA_REQUIRED_VARS}) - if(NOT ${_CURRENT_VAR}) - set(${_FOUND_VAR} FALSE) - set(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}") - else() - set(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]") - endif() - endforeach() - if(NOT "${${_FOUND_VAR}}" STREQUAL "FALSE") - set(${_FOUND_VAR} TRUE) - endif() - - # component handling - unset(FOUND_COMPONENTS_MSG) - unset(MISSING_COMPONENTS_MSG) - - if(FPHSA_HANDLE_COMPONENTS) - foreach(comp ${${_NAME}_FIND_COMPONENTS}) - if(${_NAME}_${comp}_FOUND) - - if(NOT DEFINED FOUND_COMPONENTS_MSG) - set(FOUND_COMPONENTS_MSG "found components: ") - endif() - set(FOUND_COMPONENTS_MSG "${FOUND_COMPONENTS_MSG} ${comp}") - - else() - - if(NOT DEFINED MISSING_COMPONENTS_MSG) - set(MISSING_COMPONENTS_MSG "missing components: ") - endif() - set(MISSING_COMPONENTS_MSG "${MISSING_COMPONENTS_MSG} ${comp}") - - if(${_NAME}_FIND_REQUIRED_${comp}) - set(${_FOUND_VAR} FALSE) - set(MISSING_VARS "${MISSING_VARS} ${comp}") - endif() - - endif() - endforeach() - set(COMPONENT_MSG "${FOUND_COMPONENTS_MSG} ${MISSING_COMPONENTS_MSG}") - set(DETAILS "${DETAILS}[c${COMPONENT_MSG}]") - endif() - - # version handling: - set(VERSION_MSG "") - set(VERSION_OK TRUE) - set(VERSION ${${FPHSA_VERSION_VAR}}) - - # check with DEFINED here as the requested or found version may be "0" - if (DEFINED ${_NAME}_FIND_VERSION) - if(DEFINED ${FPHSA_VERSION_VAR}) - - if(${_NAME}_FIND_VERSION_EXACT) # exact version required - # count the dots in the version string - string(REGEX REPLACE "[^.]" "" _VERSION_DOTS "${VERSION}") - # add one dot because there is one dot more than there are components - string(LENGTH "${_VERSION_DOTS}." _VERSION_DOTS) - if (_VERSION_DOTS GREATER ${_NAME}_FIND_VERSION_COUNT) - # Because of the C++ implementation of find_package() ${_NAME}_FIND_VERSION_COUNT - # is at most 4 here. Therefore a simple lookup table is used. - if (${_NAME}_FIND_VERSION_COUNT EQUAL 1) - set(_VERSION_REGEX "[^.]*") - elseif (${_NAME}_FIND_VERSION_COUNT EQUAL 2) - set(_VERSION_REGEX "[^.]*\\.[^.]*") - elseif (${_NAME}_FIND_VERSION_COUNT EQUAL 3) - set(_VERSION_REGEX "[^.]*\\.[^.]*\\.[^.]*") - else () - set(_VERSION_REGEX "[^.]*\\.[^.]*\\.[^.]*\\.[^.]*") - endif () - string(REGEX REPLACE "^(${_VERSION_REGEX})\\..*" "\\1" _VERSION_HEAD "${VERSION}") - unset(_VERSION_REGEX) - if (NOT ${_NAME}_FIND_VERSION VERSION_EQUAL _VERSION_HEAD) - set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"") - set(VERSION_OK FALSE) - else () - set(VERSION_MSG "(found suitable exact version \"${VERSION}\")") - endif () - unset(_VERSION_HEAD) - else () - if (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}") - set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"") - set(VERSION_OK FALSE) - else () - set(VERSION_MSG "(found suitable exact version \"${VERSION}\")") - endif () - endif () - unset(_VERSION_DOTS) - - else() # minimum version specified: - if ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}") - set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"") - set(VERSION_OK FALSE) - else () - set(VERSION_MSG "(found suitable version \"${VERSION}\", minimum required is \"${${_NAME}_FIND_VERSION}\")") - endif () - endif() - - else() - - # if the package was not found, but a version was given, add that to the output: - if(${_NAME}_FIND_VERSION_EXACT) - set(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")") - else() - set(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")") - endif() - - endif() - else () - if(VERSION) - set(VERSION_MSG "(found version \"${VERSION}\")") - endif() - endif () - - if(VERSION_OK) - set(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]") - else() - set(${_FOUND_VAR} FALSE) - endif() - - - # print the result: - if (${_FOUND_VAR}) - FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG} ${COMPONENT_MSG}" "${DETAILS}") - else () - - if(FPHSA_CONFIG_MODE) - _FPHSA_HANDLE_FAILURE_CONFIG_MODE() - else() - if(NOT VERSION_OK) - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})") - else() - _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}") - endif() - endif() - - endif () - - set(${_FOUND_VAR} ${${_FOUND_VAR}} PARENT_SCOPE) - -endfunction() diff --git a/src/cmake/modules/FindPackageMessage.cmake b/src/cmake/modules/FindPackageMessage.cmake deleted file mode 100644 index a0349d3d..00000000 --- a/src/cmake/modules/FindPackageMessage.cmake +++ /dev/null @@ -1,57 +0,0 @@ -#.rst: -# FindPackageMessage -# ------------------ -# -# -# -# FIND_PACKAGE_MESSAGE( "message for user" "find result details") -# -# This macro is intended to be used in FindXXX.cmake modules files. It -# will print a message once for each unique find result. This is useful -# for telling the user where a package was found. The first argument -# specifies the name (XXX) of the package. The second argument -# specifies the message to display. The third argument lists details -# about the find result so that if they change the message will be -# displayed again. The macro also obeys the QUIET argument to the -# find_package command. -# -# Example: -# -# :: -# -# if(X11_FOUND) -# FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}" -# "[${X11_X11_LIB}][${X11_INCLUDE_DIR}]") -# else() -# ... -# endif() - -#============================================================================= -# Copyright 2008-2009 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -function(FIND_PACKAGE_MESSAGE pkg msg details) - # Avoid printing a message repeatedly for the same find result. - if(NOT ${pkg}_FIND_QUIETLY) - string(REPLACE "\n" "" details "${details}") - set(DETAILS_VAR FIND_PACKAGE_MESSAGE_DETAILS_${pkg}) - if(NOT "${details}" STREQUAL "${${DETAILS_VAR}}") - # The message has not yet been printed. - message(STATUS "${msg}") - - # Save the find details in the cache to avoid printing the same - # message again. - set("${DETAILS_VAR}" "${details}" - CACHE INTERNAL "Details about finding ${pkg}") - endif() - endif() -endfunction() diff --git a/src/cmake/modules/FindSDL.cmake b/src/cmake/modules/FindSDL.cmake index 791b4afe..ed238c83 100644 --- a/src/cmake/modules/FindSDL.cmake +++ b/src/cmake/modules/FindSDL.cmake @@ -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. message("== Custom MXE File: " ${CMAKE_CURRENT_LIST_FILE}) diff --git a/src/cmake/modules/FindSDL_image.cmake b/src/cmake/modules/FindSDL_image.cmake index 27b63428..83954033 100644 --- a/src/cmake/modules/FindSDL_image.cmake +++ b/src/cmake/modules/FindSDL_image.cmake @@ -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. message("== Custom MXE File: " ${CMAKE_CURRENT_LIST_FILE}) diff --git a/src/cmake/modules/FindSDL_mixer.cmake b/src/cmake/modules/FindSDL_mixer.cmake index c80d2dad..9e4986b8 100644 --- a/src/cmake/modules/FindSDL_mixer.cmake +++ b/src/cmake/modules/FindSDL_mixer.cmake @@ -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. message("== Custom MXE File: " ${CMAKE_CURRENT_LIST_FILE}) diff --git a/src/cmake/modules/FindSDL_net.cmake b/src/cmake/modules/FindSDL_net.cmake index e4be76e4..99f70ba7 100644 --- a/src/cmake/modules/FindSDL_net.cmake +++ b/src/cmake/modules/FindSDL_net.cmake @@ -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. message("== Custom MXE File: " ${CMAKE_CURRENT_LIST_FILE}) diff --git a/src/cmake/modules/FindSDL_sound.cmake b/src/cmake/modules/FindSDL_sound.cmake index 0c6d7653..58bb7769 100644 --- a/src/cmake/modules/FindSDL_sound.cmake +++ b/src/cmake/modules/FindSDL_sound.cmake @@ -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. message("== Custom MXE File: " ${CMAKE_CURRENT_LIST_FILE}) diff --git a/src/cmake/modules/FindSDL_ttf.cmake b/src/cmake/modules/FindSDL_ttf.cmake index 12362f4a..6427cdcd 100644 --- a/src/cmake/modules/FindSDL_ttf.cmake +++ b/src/cmake/modules/FindSDL_ttf.cmake @@ -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. message("== Custom MXE File: " ${CMAKE_CURRENT_LIST_FILE}) diff --git a/src/cmake/modules/FindTIFF.cmake b/src/cmake/modules/FindTIFF.cmake index 6dab2b48..a5a49960 100644 --- a/src/cmake/modules/FindTIFF.cmake +++ b/src/cmake/modules/FindTIFF.cmake @@ -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. message("== Custom MXE File: " ${CMAKE_CURRENT_LIST_FILE}) diff --git a/src/cmake/modules/TryRunResults.cmake b/src/cmake/modules/TryRunResults.cmake new file mode 100644 index 00000000..0b9516d9 --- /dev/null +++ b/src/cmake/modules/TryRunResults.cmake @@ -0,0 +1,156 @@ +SET( KWSYS_CHAR_IS_SIGNED + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +SET( KWSYS_CHAR_IS_SIGNED__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +SET( VCL_HAS_SLICED_DESTRUCTOR_BUG + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +SET( VCL_HAS_SLICED_DESTRUCTOR_BUG__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +SET( VCL_HAS_WORKING_STRINGSTREAM + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +SET( VCL_HAS_WORKING_STRINGSTREAM__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +SET( VCL_HAS_LFS + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +SET( VCL_HAS_LFS__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +SET( VXL_SSE2_HARDWARE_SUPPORT_POSSIBLE + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +SET( VXL_SSE2_HARDWARE_SUPPORT_POSSIBLE__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +SET( VCL_COMPLEX_POW_WORKS + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +SET( VCL_COMPLEX_POW_WORKS__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +SET( VCL_CHAR_IS_SIGNED + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +SET( VCL_CHAR_IS_SIGNED__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +SET( VCL_NUMERIC_LIMITS_HAS_INFINITY + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +SET( VCL_NUMERIC_LIMITS_HAS_INFINITY__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +SET( VCL_PROCESSOR_HAS_INFINITY + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +SET( VCL_PROCESSOR_HAS_INFINITY__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +SET( QNANHIBIT_VALUE + "1" + CACHE STRING "Result from TRY_RUN" FORCE) +SET( QNANHIBIT_VALUE__TRYRUN_OUTPUT + "-DTEEM_QNANHIBIT=1" + CACHE STRING "Output from TRY_RUN" FORCE) +SET( KWSYS_LFS_WORKS + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +SET( KWSYS_LFS_WORKS__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +SET( VXL_HAS_SSE2_HARDWARE_SUPPORT + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +SET( VXL_HAS_SSE2_HARDWARE_SUPPORT__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +set( DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS + "1" + CACHE STRING "Result from TRY_RUN" FORCE) +set( DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS__TRYRUN_OUTPUT + "89255.0/1e22 = 8.9255e-018" + CACHE STRING "Output from TRY_RUN" FORCE) +set( HDF5_PRINTF_LL_TEST_RUN + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +set( HDF5_PRINTF_LL_TEST_RUN__TRYRUN_OUTPUT + "PRINTF_LL_WIDTH=[I64]" + CACHE STRING "Output from TRY_RUN" FORCE) +set( H5_LDOUBLE_TO_INTEGER_WORKS_RUN + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +set( H5_LDOUBLE_TO_INTEGER_WORKS_RUN__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +set( H5_ULONG_TO_FLOAT_ACCURATE_RUN + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +set( H5_ULONG_TO_FLOAT_ACCURATE_RUN__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +set( H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE_RUN + "1" + CACHE STRING "Result from TRY_RUN" FORCE) +set( H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE_RUN__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +set( H5_FP_TO_ULLONG_ACCURATE_RUN + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +set( H5_FP_TO_ULLONG_ACCURATE_RUN__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +set( H5_FP_TO_ULLONG_RIGHT_MAXIMUM_RUN + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +set( H5_FP_TO_ULLONG_RIGHT_MAXIMUM_RUN__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +set( H5_LDOUBLE_TO_UINT_ACCURATE_RUN + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +set( H5_LDOUBLE_TO_UINT_ACCURATE_RUN__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +set( H5_ULLONG_TO_LDOUBLE_PRECISION_RUN + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +set( H5_ULLONG_TO_LDOUBLE_PRECISION_RUN__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +set( H5_FP_TO_INTEGER_OVERFLOW_WORKS_RUN + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +set( H5_FP_TO_INTEGER_OVERFLOW_WORKS_RUN__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +set( H5_LDOUBLE_TO_LLONG_ACCURATE_RUN + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +set( H5_LDOUBLE_TO_LLONG_ACCURATE_RUN__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +set( H5_LLONG_TO_LDOUBLE_CORRECT_RUN + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +set( H5_LLONG_TO_LDOUBLE_CORRECT_RUN__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +set( H5_NO_ALIGNMENT_RESTRICTIONS_RUN + "0" + CACHE STRING "Result from TRY_RUN" FORCE) +set( H5_NO_ALIGNMENT_RESTRICTIONS_RUN__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) +set( C_CHAR_SIGNED + "1" + CACHE STRING "Result from TRY_RUN" FORCE) +set( C_CHAR_SIGNED__TRYRUN_OUTPUT + "" + CACHE STRING "Output from TRY_RUN" FORCE) diff --git a/src/cmake/test/CMakeLists.txt b/src/cmake/test/CMakeLists.txt index 864075cb..6075a8f5 100644 --- a/src/cmake/test/CMakeLists.txt +++ b/src/cmake/test/CMakeLists.txt @@ -1,11 +1,10 @@ -# This file is part of MXE. -# See index.html for further information. +# This file is part of MXE. See LICENSE.md for licensing information. # 2.8.9 is Debian Wheezy version cmake_minimum_required(VERSION 2.8.9) -# set languages in individual modules -project(mxe NONE) +# use default C and CXX languages +project(mxe) # see cmake --help-policy for details cmake_policy(SET CMP0017 NEW) diff --git a/src/cminpack.mk b/src/cminpack.mk index 33fa53f1..97709e96 100644 --- a/src/cminpack.mk +++ b/src/cminpack.mk @@ -1,7 +1,7 @@ -# 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 := cminpack +$(PKG)_WEBSITE := http://devernay.free.fr/hacks/cminpack/cminpack.html $(PKG)_IGNORE := $(PKG)_VERSION := 1.3.4 $(PKG)_CHECKSUM := 3b517bf7dca68cc9a882883db96dac0a0d37d72aba6dfb0c9c7e78e67af503ca @@ -17,8 +17,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - cd '$(1)' && cmake \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' + cd '$(1)' && '$(TARGET)-cmake' $(MAKE) -C '$(1)' -j $(JOBS) $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' diff --git a/src/coda-1-use-stdint.patch b/src/coda-1-use-stdint.patch new file mode 100644 index 00000000..d116b8d3 --- /dev/null +++ b/src/coda-1-use-stdint.patch @@ -0,0 +1,21 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +This patch has been taken from https://github.com/stcorp/coda/pull/9 + +diff --git a/libcoda/coda.h.in b/libcoda/coda.h.in +index 1587c61..b7dce21 100644 +--- a/libcoda/coda.h.in ++++ b/libcoda/coda.h.in +@@ -33,9 +33,9 @@ extern "C" + #ifdef WIN32 + #include + +-#if (_MSC_VER < 1600) +-/* For Visual Studio we can use stdint.h as of Visual Studio 2010 +- * For earlier versions we need to provide our own defines ++#if (_MSC_VER < 1600) && !defined(__MINGW32__) ++/* For Visual Studio > 2010 and MinGW we can use stdint.h ++ * For earlier versions of Visual Studio we need to provide our own defines + */ + #ifndef int8_t + #define int8_t signed char diff --git a/src/coda-test.c b/src/coda-test.c new file mode 100644 index 00000000..ca912f2a --- /dev/null +++ b/src/coda-test.c @@ -0,0 +1,21 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include +#include + +int main() { + + printf("Testing CODA version %s\n", libcoda_version); + + int rc = coda_init(); + + if (rc) { + printf("coda_init returned error '%d' -- '%s'", coda_errno, coda_errno_to_string(coda_errno) ); + } + + coda_done(); + + return 0; +} diff --git a/src/coda.mk b/src/coda.mk new file mode 100644 index 00000000..5e1ddd8f --- /dev/null +++ b/src/coda.mk @@ -0,0 +1,39 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := coda +$(PKG)_WEBSITE := https://stcorp.nl/coda/ +$(PKG)_DESCR := CODA +$(PKG)_IGNORE := +$(PKG)_VERSION := 2.15.1 +$(PKG)_CHECKSUM := 51076ff958ec15633d741ea021761fc6d8c6492f931175c489288481e37ac810 +$(PKG)_SUBDIR := coda-$($(PKG)_VERSION) +$(PKG)_FILE := coda-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://github.com/stcorp/coda/releases/download/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc + +define $(PKG)_UPDATE + echo 'TODO: write update script for $(PKG).' >&2; + echo $($(PKG)_VERSION) +endef + +define $(PKG)_BUILD + cd '$(1)' && ./configure \ + $(MXE_CONFIGURE_OPTS) \ + --disable-idl \ + --disable-matlab \ + --disable-python \ + --without-hdf5 \ + --without-hdf4 + + # Fortran includes are generated by the tool 'generate-finc', + # which needs to run natively: + cd '$(1)' && $(CC) -I . -o generate-finc fortran/generate-finc.c + + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install-libLTLIBRARIES install-nodist_includeHEADERS install-fortranDATA + + '$(TARGET)-gcc' \ + -std=c99 -W -Wall -Werror -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-coda.exe' \ + -lcoda +endef diff --git a/src/coin-1-fixes.patch b/src/coin-1-fixes.patch new file mode 100644 index 00000000..2ab958ec --- /dev/null +++ b/src/coin-1-fixes.patch @@ -0,0 +1,152 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +This patch has been taken from: https://bitbucket.org/msys2/coin/commits/69e9990b05cee506f5fa16c6edad02a7808bc610/raw/ + +It was modified to work with Coin 3.1.3. +(The order of the template arguments of SbHash was switched.) + +diff --git a/include/Inventor/C/glue/spidermonkey.h b/include/Inventor/C/glue/spidermonkey.h +--- a/include/Inventor/C/glue/spidermonkey.h ++++ b/include/Inventor/C/glue/spidermonkey.h +@@ -56,7 +56,7 @@ + Structs and defines. + */ + typedef int JSBool; +-typedef long jsword; ++typedef intmax_t jsword; + typedef jsword jsval; + typedef jsword jsid; + typedef int intN; +diff --git a/src/foreignfiles/SoSTLFileKit.cpp b/src/foreignfiles/SoSTLFileKit.cpp +--- a/src/foreignfiles/SoSTLFileKit.cpp ++++ b/src/foreignfiles/SoSTLFileKit.cpp +@@ -566,14 +566,14 @@ + SO_GET_ANY_PART(this, "facets", SoIndexedFaceSet); + + // find existing indexes if any +- long v1idx = PRIVATE(this)->points->findPoint(v1), v1new = (v1idx == -1); +- long v2idx = PRIVATE(this)->points->findPoint(v2), v2new = (v2idx == -1); +- long v3idx = PRIVATE(this)->points->findPoint(v3), v3new = (v3idx == -1); +- if (!v1new) { v1idx = (long) PRIVATE(this)->points->getUserData(v1idx); } +- if (!v2new) { v2idx = (long) PRIVATE(this)->points->getUserData(v2idx); } +- if (!v3new) { v3idx = (long) PRIVATE(this)->points->getUserData(v3idx); } +- long nidx = PRIVATE(this)->normals->findPoint(n); +- if (nidx != -1) { nidx = (long) PRIVATE(this)->normals->getUserData(nidx); } ++ intmax_t v1idx = PRIVATE(this)->points->findPoint(v1), v1new = (v1idx == -1); ++ intmax_t v2idx = PRIVATE(this)->points->findPoint(v2), v2new = (v2idx == -1); ++ intmax_t v3idx = PRIVATE(this)->points->findPoint(v3), v3new = (v3idx == -1); ++ if (!v1new) { v1idx = (intmax_t) PRIVATE(this)->points->getUserData(v1idx); } ++ if (!v2new) { v2idx = (intmax_t) PRIVATE(this)->points->getUserData(v2idx); } ++ if (!v3new) { v3idx = (intmax_t) PRIVATE(this)->points->getUserData(v3idx); } ++ intmax_t nidx = PRIVATE(this)->normals->findPoint(n); ++ if (nidx != -1) { nidx = (intmax_t) PRIVATE(this)->normals->getUserData(nidx); } + + // toss out invalid facets - facets where two or more points are in + // the same location. what are these - are they lines and points or +diff --git a/src/threads/thread.cpp b/src/threads/thread.cpp +--- a/src/threads/thread.cpp ++++ b/src/threads/thread.cpp +@@ -130,7 +130,7 @@ + void + cc_sleep(float seconds) + { +-#ifndef _WIN32 ++#if !defined(_WIN32) || defined(__MINGW32__) + /* FIXME: 20011107, thammer: create a configure macro to detect + * which sleep function is available */ + sleep(floor(seconds)); +@@ -164,7 +164,7 @@ + assert(0 && "unexpected failure"); + } + } +- return (unsigned long) val; ++ return static_cast(reinterpret_cast(val)); + } + + static void +diff --git a/src/threads/thread_win32.icc b/src/threads/thread_win32.icc +--- a/src/threads/thread_win32.icc ++++ b/src/threads/thread_win32.icc +@@ -38,7 +38,7 @@ + cc_w32thread_thread_proc(LPVOID lpParameter) + { + cc_thread *thread = (cc_thread *)lpParameter; +- return (DWORD) thread->func(thread->closure); ++ return static_cast(reinterpret_cast(thread->func(thread->closure))); + } + + static int +diff --git a/src/vrml97/JS_VRMLClasses.cpp b/src/vrml97/JS_VRMLClasses.cpp +--- a/src/vrml97/JS_VRMLClasses.cpp ++++ b/src/vrml97/JS_VRMLClasses.cpp +@@ -110,8 +110,11 @@ + struct CoinVrmlJs_SensorInfo { + SbList objects; + }; ++#if defined(_WIN64) ++SbHash * CoinVrmlJs_sensorinfohash = NULL; ++#else + SbHash * CoinVrmlJs_sensorinfohash = NULL; +- ++#endif + + const char * CoinVrmlJs_SFColorAliases[] = {"r", "g", "b"}; + const char * CoinVrmlJs_SFRotationAliases[] = {"x", "y", "z", "angle"}; +@@ -674,7 +677,11 @@ + { + SoNode * node = ((SoNodeSensor *) sensor)->getAttachedNode(); + void * tmp; ++#if defined(_WIN64) ++ if(!CoinVrmlJs_sensorinfohash->get((unsigned long long) node, tmp)) { ++#else + if(!CoinVrmlJs_sensorinfohash->get((unsigned long) node, tmp)) { ++#endif + assert(FALSE && "Trying to delete an unregistered SoNodeSensor. Internal error."); + return; + } +@@ -690,7 +697,11 @@ + + // Store the sensor-pointer so that it can be properly deleted later + nodesensorstobedeleted->append((SoNodeSensor *) sensor); ++#if defined(_WIN64) ++ CoinVrmlJs_sensorinfohash->remove((unsigned long long) node); ++#else + CoinVrmlJs_sensorinfohash->remove((unsigned long) node); ++#endif + delete si; + } + +@@ -1428,13 +1439,21 @@ + { + // Has the hash-table been initialized? + if (!CoinVrmlJs_sensorinfohash) { ++#if defined(_WIN64) ++ CoinVrmlJs_sensorinfohash = new SbHash ; ++#else + CoinVrmlJs_sensorinfohash = new SbHash ; ++#endif + coin_atexit(deleteSensorInfoHash, CC_ATEXIT_NORMAL); + } + + // Is a sensor already attached to this SoNode? + void * tmp; ++#if defined(_WIN64) ++ if (CoinVrmlJs_sensorinfohash->get((unsigned long long) node, tmp)) { ++#else + if (CoinVrmlJs_sensorinfohash->get((unsigned long) node, tmp)) { ++#endif + CoinVrmlJs_SensorInfo * si = (CoinVrmlJs_SensorInfo *) tmp; + si->objects.append(obj); + } +@@ -1444,7 +1463,11 @@ + ns->attach(node); + CoinVrmlJs_SensorInfo * si = new CoinVrmlJs_SensorInfo; + si->objects.append(obj); ++#if defined(_WIN64) ++ CoinVrmlJs_sensorinfohash->put((unsigned long long) node, si); ++#else + CoinVrmlJs_sensorinfohash->put((unsigned long) node, si); ++#endif + } + } + diff --git a/src/coin-2-gcc-4.7.patch b/src/coin-2-gcc-4.7.patch new file mode 100644 index 00000000..d4deebea --- /dev/null +++ b/src/coin-2-gcc-4.7.patch @@ -0,0 +1,15 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +This patch was taken from Gentoo: +https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/coin/files/coin-3.1.3-gcc-4.7.patch?id=17d7c853393ff83e3422e48e9ad2810f23889bbf + +--- coin3-3.1.3.orig/include/Inventor/SbBasic.h ++++ coin3-3.1.3/include/Inventor/SbBasic.h +@@ -24,6 +24,7 @@ + * + \**************************************************************************/ + ++#include + #include + + /* ********************************************************************** */ diff --git a/src/coin-test.cpp b/src/coin-test.cpp new file mode 100644 index 00000000..6a9f3339 --- /dev/null +++ b/src/coin-test.cpp @@ -0,0 +1,23 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include +#include +#include +#include +#include +#include + +int main() +{ + SoSeparator *root = new SoSeparator; + SoPerspectiveCamera *myCamera = new SoPerspectiveCamera; + SoMaterial *myMaterial = new SoMaterial; + root->ref(); + root->addChild(myCamera); + root->addChild(new SoDirectionalLight); + myMaterial->diffuseColor.setValue(1.0, 0.0, 0.0); + root->addChild(myMaterial); + root->addChild(new SoCone); +} diff --git a/src/coin.mk b/src/coin.mk new file mode 100644 index 00000000..618c4f68 --- /dev/null +++ b/src/coin.mk @@ -0,0 +1,41 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := coin +$(PKG)_WEBSITE := https://bitbucket.org/Coin3D/ +$(PKG)_DESCR := Coin3D +$(PKG)_IGNORE := +$(PKG)_VERSION := 3.1.3 +$(PKG)_CHECKSUM := 583478c581317862aa03a19f14c527c3888478a06284b9a46a0155fa5886d417 +$(PKG)_SUBDIR := Coin-$($(PKG)_VERSION) +$(PKG)_FILE := Coin-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://bitbucket.org/Coin3D/coin/downloads/$($(PKG)_FILE) +$(PKG)_DEPS := gcc dlfcn-win32 + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://bitbucket.org/Coin3D/coin/downloads' | \ + $(SED) -n 's,.*Coin-\([0-9.]*\).tar.gz.*,\1,p' | \ + $(SORT) -V | \ + tail -1 +endef + +define $(PKG)_BUILD + cd '$(1)' && ./configure \ + $(MXE_CONFIGURE_OPTS) \ + --disable-debug \ + --disable-symbols \ + --enable-compact \ + --without-x \ + COIN_STATIC=$(if $(BUILD_STATIC),true,false) + + # libtool misses some dependency libs and there's no lt_cv* etc. options + # can be removed after 3.1.3 if recent libtool et al. is used + $(SED) -i 's,^postdeps="-,postdeps="-ldl -lopengl32 -lgdi32 -lwinmm -,g' '$(1)/libtool' + + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install + + '$(TARGET)-g++' \ + -W -Wall -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-coin.exe' \ + `'$(TARGET)-pkg-config' Coin --cflags --libs` +endef diff --git a/src/cpp-netlib-1-fixes.patch b/src/cpp-netlib-1-fixes.patch new file mode 100644 index 00000000..1bdf5529 --- /dev/null +++ b/src/cpp-netlib-1-fixes.patch @@ -0,0 +1,46 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +Contains ad hoc patches for cross building. + +From 12d808cb5f167015b193f3a7f61f4414f93e3876 Mon Sep 17 00:00:00 2001 +From: MXE +Date: Mon, 30 Nov 2015 20:34:28 +1100 +Subject: [PATCH] fix dll installation and ws2_32 linking errors + + +diff --git a/libs/network/src/CMakeLists.txt b/libs/network/src/CMakeLists.txt +index 3f22165..baa70e4 100644 +--- a/libs/network/src/CMakeLists.txt ++++ b/libs/network/src/CMakeLists.txt +@@ -21,6 +21,7 @@ install(TARGETS cppnetlib-uri + EXPORT cppnetlibTargets + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}) + + set(CPP-NETLIB_HTTP_SERVER_SRCS server_request_parsers_impl.cpp) +@@ -33,6 +34,7 @@ install(TARGETS cppnetlib-server-parsers + EXPORT cppnetlibTargets + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}) + + set(CPP-NETLIB_HTTP_CLIENT_SRCS client.cpp) +@@ -47,8 +49,12 @@ endif () + if (Boost_FOUND) + target_link_libraries(cppnetlib-client-connections ${Boost_LIBRARIES}) + endif () ++if (WIN32) ++ target_link_libraries(cppnetlib-client-connections ws2_32) ++endif () + install(TARGETS cppnetlib-client-connections + EXPORT cppnetlibTargets + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}) +-- +2.4.9 (Apple Git-60) + diff --git a/src/cpp-netlib.mk b/src/cpp-netlib.mk new file mode 100644 index 00000000..90e98f92 --- /dev/null +++ b/src/cpp-netlib.mk @@ -0,0 +1,29 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := cpp-netlib +$(PKG)_WEBSITE := http://cpp-netlib.org/ +$(PKG)_DESCR := Boost C++ Networking Library +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.11.2 +$(PKG)_CHECKSUM := 71953379c5a6fab618cbda9ac6639d87b35cab0600a4450a7392bc08c930f2b1 +$(PKG)_SUBDIR := cpp-netlib-$($(PKG)_VERSION)-final +$(PKG)_FILE := cpp-netlib-$($(PKG)_VERSION)-final.tar.gz +$(PKG)_URL := http://downloads.cpp-netlib.org/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc boost openssl + +define $(PKG)_UPDATE + $(WGET) -q -O- 'http://cpp-netlib.org/' | \ + $(SED) -n 's,.*cpp-netlib-\([0-9][^"]*\)-final.tar.gz.*,\1,p' | \ + $(SORT) -V | \ + tail -1 +endef + +define $(PKG)_BUILD + mkdir '$(1)/build' + cd '$(1)/build' && '$(TARGET)-cmake' .. \ + -DINSTALL_CMAKE_DIR='$(PREFIX)/$(TARGET)/cmake/cppnetlib' \ + -DCPP-NETLIB_BUILD_EXAMPLES=OFF \ + -DCPP-NETLIB_BUILD_TESTS=OFF + + $(MAKE) -C '$(1)/build' -j '$(JOBS)' install +endef diff --git a/src/cppunit.mk b/src/cppunit.mk index e277a325..d691f4b3 100644 --- a/src/cppunit.mk +++ b/src/cppunit.mk @@ -1,17 +1,18 @@ -# 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 := cppunit +$(PKG)_WEBSITE := https://www.freedesktop.org/wiki/Software/cppunit/ +$(PKG)_DESCR := CppUnit $(PKG)_IGNORE := $(PKG)_VERSION := 1.13.2 $(PKG)_CHECKSUM := 3f47d246e3346f2ba4d7c9e882db3ad9ebd3fcbd2e8b732f946e0e3eeb9f429f $(PKG)_SUBDIR := cppunit-$($(PKG)_VERSION) $(PKG)_FILE := cppunit-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://dev-www.libreoffice.org/src/$($(PKG)_FILE) +$(PKG)_URL := https://dev-www.libreoffice.org/src/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://dev-www.libreoffice.org/src/' | \ + $(WGET) -q -O- 'https://dev-www.libreoffice.org/src/' | \ $(SED) -n 's,.*href="cppunit-\([0-9][^"]*\)\.tar.*,\1,p' | \ $(SORT) -Vr | \ head -1 diff --git a/src/cryptopp-1-fixes.patch b/src/cryptopp-1-fixes.patch new file mode 100644 index 00000000..7314ffd4 --- /dev/null +++ b/src/cryptopp-1-fixes.patch @@ -0,0 +1,17 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +Fix broken Makefile, add relevant object files and don't use -DCRYPTOPP_EXPORTS + +diff -ur a/GNUmakefile b/GNUmakefile +--- a/GNUmakefile 2015-11-22 22:17:59.000000000 +0100 ++++ b/GNUmakefile 2015-11-29 13:04:15.587252779 +0100 +@@ -255,8 +255,7 @@ + LIBOBJS := $(filter-out $(TESTOBJS),$(OBJS)) + + # List cryptlib.cpp first in an attempt to tame C++ static initialization problems +-DLLSRCS := cryptlib.cpp algebra.cpp algparam.cpp asn.cpp basecode.cpp cbcmac.cpp channels.cpp des.cpp dessp.cpp dh.cpp dll.cpp dsa.cpp ec2n.cpp eccrypto.cpp ecp.cpp eprecomp.cpp files.cpp filters.cpp fips140.cpp fipstest.cpp gf2n.cpp gfpcrypt.cpp hex.cpp hmac.cpp integer.cpp iterhash.cpp misc.cpp modes.cpp modexppc.cpp mqueue.cpp nbtheory.cpp oaep.cpp osrng.cpp pch.cpp pkcspad.cpp pubkey.cpp queue.cpp randpool.cpp rdtables.cpp rijndael.cpp rng.cpp rsa.cpp sha.cpp simple.cpp skipjack.cpp strciphr.cpp trdlocal.cpp +-DLLOBJS := $(DLLSRCS:.cpp=.export.o) ++DLLOBJS := cryptlib.o cpu.o hex.o serpent.o randpool.o sharkbox.o blowfish.o files.o seal.o gzip.o fips140.o eprecomp.o dsa.o dll.o md2.o fipstest.o rc5.o mars.o osrng.o queue.o xtrcrypt.o gf256.o vmac.o authenc.o default.o idea.o squaretb.o pkcspad.o emsa2.o sha.o network.o eax.o tea.o square.o dessp.o crc.o elgamal.o zlib.o ida.o dh2.o camellia.o strciphr.o ecp.o marss.o adler32.o wait.o iterhash.o safer.o base32.o rc2.o polynomi.o oaep.o gf2n.o zinflate.o shark.o xtr.o shacal2.o cmac.o eccrypto.o rdrand.o ripemd.o gcm.o pubkey.o basecode.o trdlocal.o salsa.o esign.o luc.o hrtimer.o ttmac.o cbcmac.o mqv.o dh.o md4.o whrlpool.o rw.o cast.o asn.o tiger.o rng.o pssr.o misc.o mqueue.o algparam.o base64.o zdeflate.o channels.o ccm.o des.o blumshub.o ec2n.o casts.o gfpcrypt.o gost.o algebra.o rijndael.o modes.o sha3.o panama.o nbtheory.o md5.o socketft.o twofish.o tigertab.o tftables.o rsa.o rdtables.o sosemanuk.o 3way.o gf2_32.o rabin.o bfinit.o filters.o integer.o seed.o rc6.o wake.o skipjack.o arc4.o hmac.o winpipes.o + + # Import lib testing + LIBIMPORTOBJS := $(LIBOBJS:.o=.import.o) diff --git a/src/cryptopp-test.cpp b/src/cryptopp-test.cpp new file mode 100644 index 00000000..0d6ec48a --- /dev/null +++ b/src/cryptopp-test.cpp @@ -0,0 +1,46 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int main() { + { + CryptoPP::SHA512 sha2; + unsigned char digest[CryptoPP::SHA512::DIGESTSIZE]; + sha2.Final(digest); + } + + { + std::string data; + const CryptoPP::SecByteBlock key; + const CryptoPP::SecByteBlock iv; + + CryptoPP::SecByteBlock ret(0, CryptoPP::AES::MAX_KEYLENGTH); + CryptoPP::StringSource(data, true, new CryptoPP::HashFilter(*(new CryptoPP::SHA3_512), new CryptoPP::ArraySink(ret, CryptoPP::AES::MAX_KEYLENGTH))); + CryptoPP::GCM< CryptoPP::AES, CryptoPP::GCM_64K_Tables >::Encryption pwenc; + pwenc.SetKeyWithIV(key.data(), key.size(), iv.data(), iv.size()); + std::string cipher; + CryptoPP::StringSource(data, true, new CryptoPP::AuthenticatedEncryptionFilter(pwenc, new CryptoPP::StringSink(cipher), false, 16)); + } + + { + const CryptoPP::SecByteBlock key; + const CryptoPP::SecByteBlock iv; + CryptoPP::GCM< CryptoPP::AES, CryptoPP::GCM_64K_Tables >::Decryption pwdec; + pwdec.SetKeyWithIV(key.data(), key.size(), iv.data(), iv.size()); + } + + { + CryptoPP::SecByteBlock ret(0, CryptoPP::AES::BLOCKSIZE); + std::string str; + CryptoPP::StringSource(str, true, new CryptoPP::Base64Decoder(new CryptoPP::ArraySink(ret, CryptoPP::AES::BLOCKSIZE))); + } + + return 0; +} diff --git a/src/cryptopp.mk b/src/cryptopp.mk new file mode 100644 index 00000000..89412905 --- /dev/null +++ b/src/cryptopp.mk @@ -0,0 +1,55 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := cryptopp +$(PKG)_WEBSITE := https://www.cryptopp.com/ +$(PKG)_DESCR := Crypto++ Library +$(PKG)_IGNORE := +$(PKG)_VERSION := 5.6.3 +$(PKG)_CHECKSUM := 9390670a14170dd0f48a6b6b06f74269ef4b056d4718a1a329f6f6069dc957c9 +$(PKG)_SUBDIR := +$(PKG)_VERSIONF := $(shell echo $($(PKG)_VERSION) | tr -d .) +$(PKG)_FILE := $(PKG)$($(PKG)_VERSIONF).zip +$(PKG)_URL := $(SOURCEFORGE_MIRROR)/cryptopp/$($(PKG)_FILE) +$(PKG)_URL_2 := https://www.cryptopp.com/$($(PKG)_FILE) +$(PKG)_DEPS := gcc + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://www.cryptopp.com/' | \ + $(SED) -n 's,Crypto++ Library \([0-9]\.[0-9]\.[0-9]\).*,\1,p' +endef + +define $(PKG)_BUILD + cp '$(1)'config.recommend '$(1)'config.h + $(MAKE) -C '$(1)' -j '$(JOBS)' -f GNUmakefile \ + CC=$(TARGET)-gcc \ + CXX=$(TARGET)-g++ \ + RANLIB=$(TARGET)-ranlib \ + AR=$(TARGET)-ar \ + LD=$(TARGET)-ld \ + CXXFLAGS='-DNDEBUG -O3 -mtune=native -pipe' \ + $(if $(BUILD_STATIC),libcryptopp.a,cryptopp.dll) + + $(INSTALL) -d '$(PREFIX)'/$(TARGET)/include/cryptopp + $(INSTALL) '$(1)'*.h '$(PREFIX)'/$(TARGET)/include/cryptopp + $(INSTALL) '$(1)'$(if $(BUILD_STATIC),libcryptopp.a,libcryptopp.dll.a) '$(PREFIX)'/$(TARGET)/lib + $(if $(BUILD_STATIC),,$(INSTALL) '$(1)'cryptopp.dll '$(PREFIX)'/$(TARGET)/bin) + + # create pkg-config file + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' + (echo 'prefix=$(PREFIX)/$(TARGET)'; \ + echo 'exec_prefix=$${prefix}'; \ + echo 'libdir=$${exec_prefix}/lib'; \ + echo 'includedir=$${prefix}/include'; \ + echo ''; \ + echo 'Name: $(PKG)'; \ + echo 'Version: $($(PKG)_VERSION)'; \ + echo 'Description: Crypto++ Library'; \ + echo 'Libs: -L$${libdir} -lcryptopp'; \ + echo 'Cflags: -I$${includedir}';) \ + > '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc' + + $(TARGET)-g++ \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `$(TARGET)-pkg-config cryptopp --cflags --libs` +endef diff --git a/src/crystalhd.mk b/src/crystalhd.mk index 746511f3..eed95ca7 100644 --- a/src/crystalhd.mk +++ b/src/crystalhd.mk @@ -1,13 +1,14 @@ -# 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 := crystalhd +$(PKG)_WEBSITE := https://www.broadcom.com/support/crystal_hd/ +$(PKG)_DESCR := Broadcom Crystal HD Headers $(PKG)_IGNORE := $(PKG)_VERSION := 1 $(PKG)_CHECKSUM := 818d72fdbebcfc0a449d9e39153370c80325f2490798f82f1ed98c6bb60bc18c $(PKG)_SUBDIR := . $(PKG)_FILE := crystalhd_lgpl_includes_v$($(PKG)_VERSION).zip -$(PKG)_URL := http://www.broadcom.com/docs/support/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://ftp.videolan.org/contrib/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE diff --git a/src/cunit.mk b/src/cunit.mk index 353e5562..cfd657e4 100644 --- a/src/cunit.mk +++ b/src/cunit.mk @@ -1,17 +1,17 @@ -# 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 := cunit +$(PKG)_WEBSITE := https://cunit.sourceforge.io/ $(PKG)_IGNORE := $(PKG)_VERSION := 2.1-3 $(PKG)_CHECKSUM := f5b29137f845bb08b77ec60584fdb728b4e58f1023e6f249a464efa49a40f214 $(PKG)_SUBDIR := CUnit-$($(PKG)_VERSION) $(PKG)_FILE := CUnit-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/cunit/CUnit/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/cunit/CUnit/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/cunit/files/CUnit/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/cunit/files/CUnit/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef diff --git a/src/curl-test.c b/src/curl-test.c index d0f35d9d..5fff5c2e 100644 --- a/src/curl-test.c +++ b/src/curl-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <curl/curl.h> diff --git a/src/curl.mk b/src/curl.mk index 023964b7..79d5fb04 100644 --- a/src/curl.mk +++ b/src/curl.mk @@ -1,17 +1,18 @@ -# 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 := curl +$(PKG)_WEBSITE := https://curl.haxx.se/libcurl/ +$(PKG)_DESCR := cURL $(PKG)_IGNORE := -$(PKG)_VERSION := 7.45.0 -$(PKG)_CHECKSUM := 96cd9711d8f38fa6f99af085a67ad1e0ebca339f2a9a00a2aa59c40a66c4552d +$(PKG)_VERSION := 7.54.1 +$(PKG)_CHECKSUM := 2b7af34d4900887e0b4e0a9f545b9511ff774d07151ae4976485060d3e1bdb6e $(PKG)_SUBDIR := curl-$($(PKG)_VERSION) $(PKG)_FILE := curl-$($(PKG)_VERSION).tar.lzma -$(PKG)_URL := http://curl.haxx.se/download/$($(PKG)_FILE) -$(PKG)_DEPS := gcc gnutls libidn libssh2 +$(PKG)_URL := https://curl.haxx.se/download/$($(PKG)_FILE) +$(PKG)_DEPS := gcc gnutls libidn2 libssh2 define $(PKG)_UPDATE - $(WGET) -q -O- 'http://curl.haxx.se/download/?C=M;O=D' | \ + $(WGET) -q -O- 'https://curl.haxx.se/download/?C=M;O=D' | \ $(SED) -n 's,.*curl-\([0-9][^"]*\)\.tar.*,\1,p' | \ head -1 endef @@ -21,7 +22,7 @@ define $(PKG)_BUILD $(MXE_CONFIGURE_OPTS) \ --with-gnutls \ --without-ssl \ - --with-libidn \ + --with-libidn2 \ --enable-sspi \ --enable-ipv6 \ --with-libssh2 @@ -30,6 +31,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-curl.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-curl.exe' \ `'$(TARGET)-pkg-config' libcurl --cflags --libs` endef diff --git a/src/db-1-fix-including-winioctl-h-lowcase.patch b/src/db-1-fix-including-winioctl-h-lowcase.patch index 5246f03b..30f2db01 100644 --- a/src/db-1-fix-including-winioctl-h-lowcase.patch +++ b/src/db-1-fix-including-winioctl-h-lowcase.patch @@ -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 b768ced5dfb6e45b03aff92c747af641f12dcf06 Mon Sep 17 00:00:00 2001 From: Boris Nagaev <bnagaev@gmail.com> diff --git a/src/db-2-install-exe.patch b/src/db-2-install-exe.patch index 5eaf8209..57d26f07 100644 --- a/src/db-2-install-exe.patch +++ b/src/db-2-install-exe.patch @@ -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 67a1bbc57a368efd2ebb81f771ef7ba794bac5a0 Mon Sep 17 00:00:00 2001 From: Boris Nagaev <bnagaev@gmail.com> diff --git a/src/db.mk b/src/db.mk index 349c0e65..ab50e229 100644 --- a/src/db.mk +++ b/src/db.mk @@ -1,7 +1,8 @@ -# 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 := db +$(PKG)_WEBSITE := https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html +$(PKG)_DESCR := Oracle Berkeley DB $(PKG)_IGNORE := $(PKG)_VERSION := 6.1.26 $(PKG)_CHECKSUM := dd1417af5443f326ee3998e40986c3c60e2a7cfb5bfa25177ef7cadb2afb13a6 @@ -11,7 +12,7 @@ $(PKG)_URL := http://download.oracle.com/berkeley-db/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html' | \ + $(WGET) -q -O- 'https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html' | \ $(SED) -n 's,.*/db-\([0-9\.]\+\)\.tar.gz.*,\1,p' | \ head -1 endef diff --git a/src/dbus.mk b/src/dbus.mk index 105da1e0..127374d2 100644 --- a/src/dbus.mk +++ b/src/dbus.mk @@ -1,17 +1,17 @@ -# 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 := dbus +$(PKG)_WEBSITE := https://dbus.freedesktop.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 1.10.2 -$(PKG)_CHECKSUM := aef3f49595df09b0824433ee993cda748ede93693a719a831562ae1616b6bb9e +$(PKG)_VERSION := 1.11.12 +$(PKG)_CHECKSUM := ac12df14a0fd0a9ecb56d02e2988cd313b91116d048aaaf53786ad6ccea9906d $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(PKG).freedesktop.org/releases/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://$(PKG).freedesktop.org/releases/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc expat define $(PKG)_UPDATE - $(WGET) -q -O- 'http://cgit.freedesktop.org/dbus/dbus/refs/tags' | \ + $(WGET) -q -O- 'https://cgit.freedesktop.org/dbus/dbus/refs/tags' | \ $(SED) -n "s,.*<a href='[^']*/tag/?id=dbus-\\([0-9][^']*\\)'.*,\\1,p" | \ $(SORT) -V | \ tail -1 diff --git a/src/dcmtk-1-fixes.patch b/src/dcmtk-1-fixes.patch index 51f9dc02..04b4a924 100644 --- a/src/dcmtk-1-fixes.patch +++ b/src/dcmtk-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/dcmtk-2-mingw-w64.patch b/src/dcmtk-2-mingw-w64.patch index 53285ae8..b51023c3 100644 --- a/src/dcmtk-2-mingw-w64.patch +++ b/src/dcmtk-2-mingw-w64.patch @@ -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 2d08af9a15089c354b436282e4d23f462a81ce8f Mon Sep 17 00:00:00 2001 From: MXE <mxe@mxe.cc> diff --git a/src/dcmtk-3-pointer-fixes.patch b/src/dcmtk-3-pointer-fixes.patch index 3204bf0d..84ec1470 100644 --- a/src/dcmtk-3-pointer-fixes.patch +++ b/src/dcmtk-3-pointer-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/dcmtk-4-c++11-related-fixes.patch b/src/dcmtk-4-c++11-related-fixes.patch new file mode 100644 index 00000000..2e47dc4f --- /dev/null +++ b/src/dcmtk-4-c++11-related-fixes.patch @@ -0,0 +1,16 @@ +From: Boris Pek +Date: Thu, 05 May 2016 15:38:47 +0300 +Subject: [PATCH] fix build with GCC >= 6.x + +diff --git a/ofstd/libsrc/ofstd.cc b/ofstd/libsrc/ofstd.cc +--- a/ofstd/libsrc/ofstd.cc ++++ b/ofstd/libsrc/ofstd.cc +@@ -175,7 +175,7 @@ + + + // some systems don't properly define isnan() +-#ifdef HAVE_ISNAN ++#if defined(HAVE_ISNAN) && (__cplusplus < 201103L) + #ifndef HAVE_PROTOTYPE_ISNAN + extern "C" + { diff --git a/src/dcmtk.mk b/src/dcmtk.mk index 71d5b99d..6e2b7d42 100644 --- a/src/dcmtk.mk +++ b/src/dcmtk.mk @@ -1,14 +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 := dcmtk +$(PKG)_WEBSITE := http://dicom.offis.de/dcmtk.php.en +$(PKG)_DESCR := DCMTK $(PKG)_IGNORE := $(PKG)_VERSION := 3.6.0 $(PKG)_CHECKSUM := cfc509701122adfa359f1ee160e943c1548c7696b607dbb646c5a06f015ed33a $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := ftp://dicom.offis.de/pub/dicom/offis/software/$(PKG)/$(PKG)$(subst .,,$($(PKG)_VERSION))/$($(PKG)_FILE) -$(PKG)_URL_2 := http://ftp.debian.org/debian/pool/main/d/$(PKG)/$(PKG)_$($(PKG)_VERSION).orig.tar.gz +$(PKG)_URL := http://dicom.offis.de/download/$(PKG)/$(PKG)$(subst .,,$($(PKG)_VERSION))/$($(PKG)_FILE) +$(PKG)_URL_2 := https://mirrorservice.org/sites/ftp.debian.org/debian/pool/main/d/$(PKG)/$(PKG)_$($(PKG)_VERSION).orig.tar.gz $(PKG)_DEPS := gcc libpng libxml2 openssl tiff zlib define $(PKG)_UPDATE diff --git a/src/devil-1-png.patch b/src/devil-1-png.patch index 3337821d..86b21cfa 100644 --- a/src/devil-1-png.patch +++ b/src/devil-1-png.patch @@ -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. diff -urN devil-1.7.8.orig/src-IL/src/il_icon.c devil-1.7.8/src-IL/src/il_icon.c --- devil-1.7.8.orig/src-IL/src/il_icon.c 2009-03-08 08:10:09.000000000 +0100 diff --git a/src/devil-2-il.patch b/src/devil-2-il.patch index 6f8ac8ba..53899dda 100644 --- a/src/devil-2-il.patch +++ b/src/devil-2-il.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/devil.mk b/src/devil.mk index 8360846f..efd2a0ae 100644 --- a/src/devil.mk +++ b/src/devil.mk @@ -1,29 +1,30 @@ -# 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 := devil +$(PKG)_WEBSITE := https://openil.sourceforge.io/ +$(PKG)_DESCR := DevIL $(PKG)_IGNORE := $(PKG)_VERSION := 1.7.8 $(PKG)_CHECKSUM := 682ffa3fc894686156337b8ce473c954bf3f4fb0f3ecac159c73db632d28a8fd $(PKG)_SUBDIR := devil-$($(PKG)_VERSION) $(PKG)_FILE := DevIL-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/openil/DevIL/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/openil/DevIL/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc freeglut jasper jpeg lcms libmng libpng openexr sdl tiff zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/p/openil/svn/HEAD/tree/tags/' | \ + $(WGET) -q -O- 'https://sourceforge.net/p/openil/svn/HEAD/tree/tags/' | \ grep '<a href="' | \ $(SED) -n 's,.*<a href="release-\([0-9][^"]*\)".*,\1,p' | \ tail -1 endef define $(PKG)_BUILD - $(SED) -i 's,__declspec(dllimport),,' '$(1)/include/IL/il.h' + # autotools files in tarball are ancient (2009) so regenerate + $(if $(BUILD_STATIC), \ + $(SED) -i 's/__declspec(dllimport)//' '$(1)/include/IL/il.h', \ + cd '$(1)' && $(LIBTOOLIZE) && autoreconf -fi) cd '$(1)' && ./configure \ - --host='$(TARGET)' \ - --build="`config.guess`" \ - --disable-shared \ - --prefix='$(PREFIX)/$(TARGET)' \ + $(MXE_CONFIGURE_OPTS) \ --enable-ILU \ --enable-ILUT \ --disable-allegro \ @@ -40,7 +41,3 @@ define $(PKG)_BUILD --without-examples $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= INFO_DEPS= endef - -$(PKG)_BUILD_x86_64-w64-mingw32 = - -$(PKG)_BUILD_SHARED = diff --git a/src/djvulibre-1-fixes.patch b/src/djvulibre-1-fixes.patch new file mode 100644 index 00000000..e99f7e48 --- /dev/null +++ b/src/djvulibre-1-fixes.patch @@ -0,0 +1,50 @@ +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: darealshinji <djcj@gmx.de> +Date: Sun, 24 Jul 2016 09:33:22 +0200 +Subject: [PATCH] define XXX_EXPORT symbols + + +diff --git a/libdjvu/Makefile.am b/libdjvu/Makefile.am +index 1111111..2222222 100644 +--- a/libdjvu/Makefile.am ++++ b/libdjvu/Makefile.am +@@ -33,6 +33,8 @@ libdjvulibre_la_LIBADD = $(JPEG_LIBS) $(PTHREAD_LIBS) + libdjvulibre_la_LDFLAGS = -no-undefined -version-info $(version_info) + + if HAVE_OS_WIN32 ++libdjvulibre_la_CPPFLAGS += -DDJVUAPI_EXPORT ++libdjvulibre_la_CPPFLAGS += -DDDJVUAPI_EXPORT -DMINILISPAPI_EXPORT + libdjvulibre_la_LDFLAGS += -Wl,--export-all-symbols + endif + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: darealshinji <djcj@gmx.de> +Date: Sun, 24 Jul 2016 09:36:49 +0200 +Subject: [PATCH] disable unknown pragma warnings + + +diff --git a/libdjvu/miniexp.cpp b/libdjvu/miniexp.cpp +index 1111111..2222222 100644 +--- a/libdjvu/miniexp.cpp ++++ b/libdjvu/miniexp.cpp +@@ -382,6 +382,7 @@ static void NTAPI gctls_cb(PVOID, DWORD dwReason, PVOID) { + {CSLOCK(r);TlsFree(tlsIndex);tlsIndex=TLS_OUT_OF_INDEXES;} + } + # endif ++#ifndef __GNUC__ + // -- Very black magic to clean tls variables. + # ifdef _M_IX86 + # pragma comment (linker, "/INCLUDE:_tlscb") +@@ -391,6 +392,7 @@ static void NTAPI gctls_cb(PVOID, DWORD dwReason, PVOID) { + # pragma const_seg(".CRT$XLB") + extern "C" PIMAGE_TLS_CALLBACK tlscb = gctls_cb; + # pragma const_seg() ++#endif /* !__GNUC__ */ + + #else + // No threads diff --git a/src/djvulibre-test.c b/src/djvulibre-test.c new file mode 100644 index 00000000..ff46691e --- /dev/null +++ b/src/djvulibre-test.c @@ -0,0 +1,16 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include <libdjvu/ddjvuapi.h> + +int main(int argc, char *argv[]) +{ + ddjvu_context_t *djvu_test; + (void)argc; + + djvu_test = ddjvu_context_create(argv[0]); + ddjvu_context_release(djvu_test); + + return 0; +} diff --git a/src/djvulibre.mk b/src/djvulibre.mk new file mode 100644 index 00000000..4ebb5ba5 --- /dev/null +++ b/src/djvulibre.mk @@ -0,0 +1,34 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := djvulibre +$(PKG)_WEBSITE := https://djvu.sourceforge.io/ +$(PKG)_DESCR := DjVuLibre +$(PKG)_VERSION := 3.5.27 +$(PKG)_CHECKSUM := e69668252565603875fb88500cde02bf93d12d48a3884e472696c896e81f505f +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/djvu/DjVuLibre/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc jpeg tiff zlib + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://sourceforge.net/projects/djvu/files/DjVuLibre/' | \ + $(SED) -n 's,.*/\([0-9][^A-Za-z"]*\)/".*,\1,p' | \ + head -1 +endef + +# can't build a working static library for now +# https://sourceforge.net/p/djvu/bugs/274/ +define $(PKG)_BUILD_SHARED + cd '$(SOURCE_DIR)' && autoreconf -fi + cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \ + $(MXE_CONFIGURE_OPTS) \ + --disable-desktopfiles + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install-strip \ + $(MXE_DISABLE_CRUFT) dist_bin_SCRIPTS= + + '$(TARGET)-g++' \ + -W -Wall -Werror -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' ddjvuapi --cflags --libs` +endef diff --git a/src/dlfcn-win32.mk b/src/dlfcn-win32.mk index ffac1fd0..c1651ba7 100644 --- a/src/dlfcn-win32.mk +++ b/src/dlfcn-win32.mk @@ -1,20 +1,17 @@ -# 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 := dlfcn-win32 +$(PKG)_WEBSITE := https://github.com/dlfcn-win32/dlfcn-win32 +$(PKG)_DESCR := POSIX dlfcn wrapper for Windows $(PKG)_IGNORE := -$(PKG)_VERSION := 1.0.0 -$(PKG)_CHECKSUM := 36f2e7ef1f1ba04f6ce682a71937eaddd3d6994f09e29df2c7578ec524e47450 -$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) -$(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz -$(PKG)_URL := https://github.com/$(PKG)/$(PKG)/archive/v$($(PKG)_VERSION).tar.gz +$(PKG)_VERSION := e19bf07 +$(PKG)_CHECKSUM := 6b31a8547547af27e5dfc092df1ea2c6ac562ce47b7ec08a0a4da4ed0b002767 +$(PKG)_SUBDIR := $(PKG)-$(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://github.com/$(PKG)/$(PKG)/tarball/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc -define $(PKG)_UPDATE - $(WGET) -q -O- 'https://github.com/dlfcn-win32/dlfcn-win32/releases' | \ - $(SED) -n 's,.*<a href="/dlfcn-win32/dlfcn-win32/archive/v\([0-9][^>]*\)\.tar.*,\1,p' | \ - head -1 -endef +$(PKG)_UPDATE = $(call MXE_GET_GITHUB_SHA, dlfcn-win32/dlfcn-win32, master) | $(SED) 's/^\(.......\).*/\1/;' define $(PKG)_BUILD cd '$(1)' && ./configure \ @@ -25,6 +22,14 @@ define $(PKG)_BUILD --disable-static --enable-shared ) $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install + $(MAKE) -C '$(1)' -j '$(JOBS)' test.exe testdll.dll - # No test avalable temprorarily because MXE doesn't support shared build yet + # create pkg-config file - mostly for psapi dependency + mkdir -p '$(PREFIX)/$(TARGET)/lib/pkgconfig' + (echo 'Name: $(PKG)'; \ + echo 'Version: $($(PKG)_VERSION)'; \ + echo 'Description: $(PKG)'; \ + echo 'Libs: -ldl'; \ + echo 'Libs.private: -lpsapi'; \ + ) > '$(PREFIX)/$(TARGET)/lib/pkgconfig/dlfcn.pc' endef diff --git a/src/eigen-1-disable-os-check.patch b/src/eigen-1-disable-os-check.patch index ce9c620b..ab63bd0e 100644 --- a/src/eigen-1-disable-os-check.patch +++ b/src/eigen-1-disable-os-check.patch @@ -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. --- a/cmake/EigenDetermineOSVersion.cmake 2012-12-05 16:53:46.305932163 +0100 +++ b/cmake/EigenDetermineOSVersion.cmake 2012-12-05 16:56:15.937936644 +0100 diff --git a/src/eigen-2-fix-compiler-version.patch b/src/eigen-2-fix-compiler-version.patch index ec9c7816..009af42f 100644 --- a/src/eigen-2-fix-compiler-version.patch +++ b/src/eigen-2-fix-compiler-version.patch @@ -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. --- a/cmake/EigenTesting.cmake +++ b/cmake/EigenTesting.cmake diff --git a/src/eigen-test.cpp b/src/eigen-test.cpp index 91869d58..436bf1a2 100644 --- a/src/eigen-test.cpp +++ b/src/eigen-test.cpp @@ -1,9 +1,8 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. * * This code was originally found on: - * http://eigen.tuxfamily.org/dox/GettingStarted.html + * https://eigen.tuxfamily.org/dox/GettingStarted.html */ #include <Eigen/Dense> diff --git a/src/eigen.mk b/src/eigen.mk index 6fe642dd..28b317c0 100644 --- a/src/eigen.mk +++ b/src/eigen.mk @@ -1,7 +1,7 @@ -# 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 := eigen +$(PKG)_WEBSITE := https://eigen.tuxfamily.org/ $(PKG)_IGNORE := $(PKG)_VERSION := 3.2.5 $(PKG)_CHECKSUM := 5f6e6cb88188e34185f43cb819d7dab9b48ef493774ff834e568f4805d3dc2f9 @@ -11,21 +11,19 @@ $(PKG)_URL := https://bitbucket.org/$(PKG)/$(PKG)/get/$($(PKG)_VERSION).tar $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://eigen.tuxfamily.org/index.php?title=Main_Page#Download' | \ + $(WGET) -q -O- 'https://eigen.tuxfamily.org/index.php?title=Main_Page#Download' | \ grep 'eigen/get/' | \ $(SED) -n 's,.*eigen/get/\(3[^>]*\)\.tar.*,\1,p' | \ head -1 endef define $(PKG)_BUILD - cd '$(1)' && mkdir build && cd build && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -DCMAKE_BUILD_TYPE=Release \ + cd '$(1)' && mkdir build && cd build && '$(TARGET)-cmake' .. \ -DEIGEN_BUILD_PKGCONFIG=ON \ -Drun_res=1 -Drun_res__TRYRUN_OUTPUT="" $(MAKE) -C '$(1)'/build -j '$(JOBS)' install VERBOSE=1 - '$(TARGET)-g++' -W -Wall '$(2).cpp' -o \ + '$(TARGET)-g++' -W -Wall '$(TEST_FILE)' -o \ '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ `'$(TARGET)-pkg-config' --cflags --libs eigen3` endef diff --git a/src/exiv2-1-lpsapi.patch b/src/exiv2-1-lpsapi.patch deleted file mode 100644 index 109f98af..00000000 --- a/src/exiv2-1-lpsapi.patch +++ /dev/null @@ -1,41 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -This patch is adapted from the Exiv2 svn trunk revision 3210. - -diff -ur a/config/exiv2.pc.in b/config/exiv2.pc.in ---- a/config/exiv2.pc.in 2011-07-29 14:11:16.000000000 +0200 -+++ b/config/exiv2.pc.in 2013-12-20 06:44:37.265187475 +0100 -@@ -7,5 +7,5 @@ - Description: Image metadata library and tools - Version: @PACKAGE_VERSION@ - Libs: -L${libdir} -lexiv2 @EXV_LIB_STATIC@ --Libs.private: @EXPAT_LDFLAGS@ @LTLIBINTL@ @LTLIBICONV@ @LIBS@ @EXPAT_LIBS@ -+Libs.private: @EXPAT_LDFLAGS@ @LTLIBINTL@ @LTLIBICONV@ @LIBS@ @EXPAT_LIBS@ @EXV_LIBPSAPI@ - Cflags: -I${includedir} -diff -ur a/configure b/configure ---- a/configure 2013-12-01 13:29:47.000000000 +0100 -+++ b/configure 2013-12-20 06:44:37.273191477 +0100 -@@ -774,6 +774,7 @@ - ac_header_list= - ac_subst_vars='LTLIBOBJS - LIBOBJS -+EXV_LIBPSAPI - EXV_LIB_STATIC - ENABLE_XMP - EXPAT_LIBS -@@ -17068,11 +17069,14 @@ - # version.cpp requires link to psapi/Windows and dl/Unix builds - case "$host_os" in - *mingw* | *cygwin*) -+ EXV_LIBPSAPI="-lpsapi" - LDFLAGS="$LDFLAGS -no-undefined -lpsapi" ;; - *) -+ EXV_LIBPSAPI= - LDFLAGS="$LDFLAGS -ldl" ;; - esac - -+ - # --------------------------------------------------------------------------- - # Create output files. - # --------------------------------------------------------------------------- diff --git a/src/exiv2.mk b/src/exiv2.mk index 26be6da3..581871e2 100644 --- a/src/exiv2.mk +++ b/src/exiv2.mk @@ -1,14 +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 := exiv2 +$(PKG)_WEBSITE := http://www.exiv2.org/ +$(PKG)_DESCR := Exiv2 $(PKG)_IGNORE := -$(PKG)_VERSION := 0.24 -$(PKG)_CHECKSUM := f4a443e6c7fb9d9f5e787732f76969a64c72c4c04af69b10ed57f949c2dfef8e +$(PKG)_VERSION := 0.25 +$(PKG)_CHECKSUM := c80bfc778a15fdb06f71265db2c3d49d8493c382e516cb99b8c9f9cbde36efa4 $(PKG)_SUBDIR := exiv2-$($(PKG)_VERSION) $(PKG)_FILE := exiv2-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://www.exiv2.org/$($(PKG)_FILE) -$(PKG)_DEPS := gcc expat gettext zlib +$(PKG)_DEPS := gcc expat gettext mman-win32 zlib define $(PKG)_UPDATE $(WGET) -q -O- 'http://www.exiv2.org/download.html' | \ @@ -27,6 +28,7 @@ define $(PKG)_BUILD --disable-visibility \ --disable-nls \ --with-expat \ + LIBS='-lmman' \ $(if $(BUILD_SHARED),\ lt_cv_deplibs_check_method='file_magic file format (pe-i386|pe-x86-64)' \ lt_cv_file_magic_cmd='$$OBJDUMP -f') diff --git a/src/expat.mk b/src/expat.mk index 0e7acb6e..4675dcb8 100644 --- a/src/expat.mk +++ b/src/expat.mk @@ -1,17 +1,18 @@ -# 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 := expat +$(PKG)_WEBSITE := https://github.com/libexpat/libexpat +$(PKG)_DESCR := Expat XML Parser $(PKG)_IGNORE := -$(PKG)_VERSION := 2.1.0 -$(PKG)_CHECKSUM := 823705472f816df21c8f6aa026dd162b280806838bb55b3432b0fb1fcca7eb86 +$(PKG)_VERSION := 2.2.1 +$(PKG)_CHECKSUM := 1868cadae4c82a018e361e2b2091de103cd820aaacb0d6cfa49bd2cd83978885 $(PKG)_SUBDIR := expat-$($(PKG)_VERSION) -$(PKG)_FILE := expat-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/expat/expat/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_FILE := expat-$($(PKG)_VERSION).tar.bz2 +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/expat/expat/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/expat/files/expat/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/expat/files/expat/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef diff --git a/src/faad2-1-uint.patch b/src/faad2-1-uint.patch index d7c6625b..179001c7 100644 --- a/src/faad2-1-uint.patch +++ b/src/faad2-1-uint.patch @@ -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. --- ./frontend/main.c.backup 2010-07-01 16:53:48.563042615 +0200 +++ ./frontend/main.c 2010-07-01 16:54:03.379043126 +0200 diff --git a/src/faad2.mk b/src/faad2.mk index e07ccb0d..f518cdeb 100644 --- a/src/faad2.mk +++ b/src/faad2.mk @@ -1,17 +1,17 @@ -# 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 := faad2 +$(PKG)_WEBSITE := http://www.audiocoding.com/ $(PKG)_IGNORE := $(PKG)_VERSION := 2.7 $(PKG)_CHECKSUM := ee26ed1e177c0cd8fa8458a481b14a0b24ca0b51468c8b4c8b676fd3ceccd330 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/faac/$(PKG)-src/$(PKG)-$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/faac/$(PKG)-src/$(PKG)-$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/faac/files/faad2-src/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/faac/files/faad2-src/' | \ $(SED) -n 's,.*faad2-\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef diff --git a/src/fdk-aac.mk b/src/fdk-aac.mk index d9bf8522..4aa4b303 100644 --- a/src/fdk-aac.mk +++ b/src/fdk-aac.mk @@ -1,20 +1,21 @@ -# This file is part of MXE. -# See index.html for further information. +# This file is part of MXE. See LICENSE.md for licensing information. # WARNING: Like openssl, the license of this package is not compatible with -# GPL 2+, but it is with LGPL 2.1+. See index.html#potential-legal-issues +# GPL 2+, but it is with LGPL 2.1+. See docs/index.html#potential-legal-issues PKG := fdk-aac +$(PKG)_WEBSITE := https://github.com/mstorsjo/fdk-aac +$(PKG)_DESCR := FDK-AAC $(PKG)_IGNORE := $(PKG)_VERSION := 0.1.4 $(PKG)_CHECKSUM := 5910fe788677ca13532e3f47b7afaa01d72334d46a2d5e1d1f080f1173ff15ab $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/opencore-amr/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/opencore-amr/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/opencore-amr/files/fdk-aac/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/opencore-amr/files/fdk-aac/' | \ $(SED) -n 's,.*fdk-aac-\([0-9.]*\)\.tar.*,\1,p' | \ $(SORT) -V | \ tail -1 @@ -22,7 +23,8 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ - $(MXE_CONFIGURE_OPTS) + $(MXE_CONFIGURE_OPTS) \ + CXXFLAGS='-Wno-narrowing' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/ffmpeg.mk b/src/ffmpeg.mk index f57fe8cc..74f3930d 100644 --- a/src/ffmpeg.mk +++ b/src/ffmpeg.mk @@ -1,25 +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. PKG := ffmpeg +$(PKG)_WEBSITE := https://ffmpeg.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 2.7.2 -$(PKG)_CHECKSUM := 7ceb7550ad628c526fa6c9ff23fdfb687a62f54d90c4a730998d8c2b417b9ef2 +$(PKG)_VERSION := 3.2.4 +$(PKG)_CHECKSUM := c0fa3593a2e9e96ace3c1757900094437ad96d1d6ca19f057c378b5f394496a4 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://www.ffmpeg.org/releases/$($(PKG)_FILE) -$(PKG)_URL_2 := http://launchpad.net/ffmpeg/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_VERSION)/+download/$($(PKG)_FILE) +$(PKG)_URL := https://ffmpeg.org/releases/$($(PKG)_FILE) +$(PKG)_URL_2 := https://launchpad.net/ffmpeg/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_VERSION)/+download/$($(PKG)_FILE) $(PKG)_DEPS := gcc bzip2 gnutls lame libass libbluray libbs2b libcaca \ libvpx opencore-amr opus sdl speex theora vidstab \ - vo-aacenc vo-amrwbenc vorbis x264 xvidcore yasm zlib + vo-amrwbenc vorbis x264 xvidcore yasm zlib # DO NOT ADD fdk-aac OR openssl SUPPORT. # Although they are free softwares, their licenses are not compatible with # the GPL, and we'd like to enable GPL in our default ffmpeg build. -# See index.html#potential-legal-issues +# See docs/index.html#potential-legal-issues define $(PKG)_UPDATE - $(WGET) -q -O- 'http://ffmpeg.org/releases/' | \ + $(WGET) -q -O- 'https://ffmpeg.org/releases/' | \ $(SED) -n 's,.*ffmpeg-\([0-9][^>]*\)\.tar.*,\1,p' | \ grep -v 'alpha\|beta\|rc\|git' | \ $(SORT) -Vr | \ @@ -59,7 +59,6 @@ define $(PKG)_BUILD --enable-libspeex \ --enable-libtheora \ --enable-libvidstab \ - --enable-libvo-aacenc \ --enable-libvo-amrwbenc \ --enable-libvorbis \ --enable-libvpx \ diff --git a/src/fftw.mk b/src/fftw.mk index 53ab3c1e..fe859782 100644 --- a/src/fftw.mk +++ b/src/fftw.mk @@ -1,10 +1,10 @@ -# 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 := fftw +$(PKG)_WEBSITE := http://www.fftw.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 3.3.4 -$(PKG)_CHECKSUM := 8f0cde90929bc05587c3368d2f15cd0530a60b8a9912a8e2979a72dbe5af0982 +$(PKG)_VERSION := 3.3.6-pl1 +$(PKG)_CHECKSUM := 1ef4aa8427d9785839bc767f3eb6a84fcb5e9a37c31ed77a04e7e047519a183d $(PKG)_SUBDIR := fftw-$($(PKG)_VERSION) $(PKG)_FILE := fftw-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://www.fftw.org/$($(PKG)_FILE) diff --git a/src/file-1-fixes.patch b/src/file-1-fixes.patch index 4f5a1379..95ff1f6f 100644 --- a/src/file-1-fixes.patch +++ b/src/file-1-fixes.patch @@ -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 https://github.com/file/file/commit/d5f2c28536f1645e3da25fa3f8da5a0a45404dc4. diff --git a/src/file-test.c b/src/file-test.c index f1ada597..b912e8bc 100644 --- a/src/file-test.c +++ b/src/file-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdio.h> diff --git a/src/file.mk b/src/file.mk index bb9c9810..882e362f 100644 --- a/src/file.mk +++ b/src/file.mk @@ -1,7 +1,7 @@ -# 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 := file +$(PKG)_WEBSITE := https://www.darwinsys.com/file/ $(PKG)_IGNORE := $(PKG)_VERSION := 5.24 $(PKG)_CHECKSUM := 802cb3de2e49e88ef97cdcb52cd507a0f25458112752e398445cea102bc750ce @@ -39,6 +39,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-file.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-file.exe' \ -lmagic -lgnurx -lshlwapi endef diff --git a/src/flac.mk b/src/flac.mk index 2cfef460..204e173d 100644 --- a/src/flac.mk +++ b/src/flac.mk @@ -1,7 +1,8 @@ -# 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 := flac +$(PKG)_WEBSITE := https://www.xiph.org/flac/ +$(PKG)_DESCR := FLAC $(PKG)_IGNORE := $(PKG)_VERSION := 1.3.1 $(PKG)_CHECKSUM := 4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c diff --git a/src/flann-1-fixes.patch b/src/flann-1-fixes.patch index bbdf800b..8fd704e2 100644 --- a/src/flann-1-fixes.patch +++ b/src/flann-1-fixes.patch @@ -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 cdd24cfc910a9a171451ad005fbcaa5530590609 Mon Sep 17 00:00:00 2001 From: MXE diff --git a/src/flann-2-Fix-openmp-on-mingw.patch b/src/flann-2-Fix-openmp-on-mingw.patch index 03f8cc70..f6f0f13c 100644 --- a/src/flann-2-Fix-openmp-on-mingw.patch +++ b/src/flann-2-Fix-openmp-on-mingw.patch @@ -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 ce062a2d900aa215c301d327084a6d04da283005 Mon Sep 17 00:00:00 2001 From: Timothy Gu <timothygu99@gmail.com> diff --git a/src/flann-3-x86-64.patch b/src/flann-3-x86-64.patch index 11f83e65..bd082268 100644 --- a/src/flann-3-x86-64.patch +++ b/src/flann-3-x86-64.patch @@ -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. Taken from: https://github.com/mariusmuja/flann/commit/895f31624f58ed56f29b24b9abcaa52688dea100 diff --git a/src/flann-4-c++11-related-fixes.patch b/src/flann-4-c++11-related-fixes.patch new file mode 100644 index 00000000..492ae9b9 --- /dev/null +++ b/src/flann-4-c++11-related-fixes.patch @@ -0,0 +1,30 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +Taken from: https://github.com/mariusmuja/flann/commit/3645f0c30a47267e56e5acdecfc7bac2b76bc3d5 + +From 3645f0c30a47267e56e5acdecfc7bac2b76bc3d5 Mon Sep 17 00:00:00 2001 +From: Alastair Quadros <alastair.j.quadros@gmail.com> +Date: Sun, 15 Mar 2015 10:58:57 +1100 +Subject: [PATCH] abs -> std::abs + +diff --git a/src/cpp/flann/algorithms/kdtree_index.h b/src/cpp/flann/algorithms/kdtree_index.h +index 42659ca..fc12d8f 100644 +--- a/src/cpp/flann/algorithms/kdtree_index.h ++++ b/src/cpp/flann/algorithms/kdtree_index.h +@@ -36,6 +36,7 @@ + #include <cassert> + #include <cstring> + #include <stdarg.h> ++#include <cmath> + + #include "flann/general.h" + #include "flann/algorithms/nn_index.h" +@@ -663,7 +664,7 @@ + ElementType max_span = 0; + size_t div_feat = 0; + for (size_t i=0;i<veclen_;++i) { +- ElementType span = abs(point[i]-leaf_point[i]); ++ ElementType span = std::abs(point[i]-leaf_point[i]); + if (span > max_span) { + max_span = span; + div_feat = i; diff --git a/src/flann.mk b/src/flann.mk index 1bc5dd7b..9af0e8b8 100644 --- a/src/flann.mk +++ b/src/flann.mk @@ -1,17 +1,18 @@ -# 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 := flann +$(PKG)_WEBSITE := https://www.cs.ubc.ca/~mariusm/index.php/FLANN/FLANN +$(PKG)_DESCR := FLANN $(PKG)_IGNORE := $(PKG)_VERSION := 1.8.4 $(PKG)_CHECKSUM := dfbb9321b0d687626a644c70872a2c540b16200e7f4c7bd72f91ae032f445c08 $(PKG)_SUBDIR := flann-$($(PKG)_VERSION)-src $(PKG)_FILE := flann-$($(PKG)_VERSION)-src.zip -$(PKG)_URL := http://www.cs.ubc.ca/research/flann/uploads/FLANN/$($(PKG)_FILE) +$(PKG)_URL := https://www.cs.ubc.ca/research/flann/uploads/FLANN/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.cs.ubc.ca/research/flann/index.php/FLANN/Changelog' | \ + $(WGET) -q -O- 'https://www.cs.ubc.ca/research/flann/index.php/FLANN/Changelog' | \ grep 'Version' | \ $(SED) -n 's,.*Version.\([0-9.]*\).*,\1,p' | \ head -1 @@ -20,10 +21,8 @@ endef define $(PKG)_BUILD_SHARED # workaround for strange "too many sections" error # setting CXXFLAGS='-O3' seems to fix it - # similar to http://www.mail-archive.com/mingw-w64-public@lists.sourceforge.net/msg06329.html - cd '$(1)' && CXXFLAGS='-O3' cmake . \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -DCMAKE_BUILD_TYPE=Release \ + # similar to https://www.mail-archive.com/mingw-w64-public@lists.sourceforge.net/msg06329.html + cd '$(1)' && CXXFLAGS='-O3' '$(TARGET)-cmake' . \ -DBUILD_CUDA_LIB=OFF \ -DBUILD_MATLAB_BINDINGS=OFF \ -DBUILD_PYTHON_BINDINGS=OFF \ diff --git a/src/fltk-test.cpp b/src/fltk-test.cpp index 6155710f..c02652eb 100644 --- a/src/fltk-test.cpp +++ b/src/fltk-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. * * This is a slightly modified version of: * http://www.fltk.org/doc-1.3/basics.html diff --git a/src/fltk.mk b/src/fltk.mk index 3887ffc9..f537289f 100644 --- a/src/fltk.mk +++ b/src/fltk.mk @@ -1,7 +1,8 @@ -# 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 := fltk +$(PKG)_WEBSITE := http://www.fltk.org/ +$(PKG)_DESCR := FLTK $(PKG)_IGNORE := $(PKG)_VERSION := 1.3.3 $(PKG)_CHECKSUM := f8398d98d7221d40e77bc7b19e761adaf2f1ef8bb0c30eceb7beb4f2273d0d97 @@ -30,6 +31,6 @@ define $(PKG)_BUILD '$(TARGET)-g++' \ -W -Wall -Werror -pedantic -ansi \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-fltk.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-fltk.exe' \ `$(TARGET)-fltk-config --cxxflags --ld$(if $(BUILD_STATIC),static)flags` endef diff --git a/src/fontconfig-1-fix_mktemp_s.patch b/src/fontconfig-1-fixes.patch similarity index 75% rename from src/fontconfig-1-fix_mktemp_s.patch rename to src/fontconfig-1-fixes.patch index 88520a34..20b5ccf4 100644 --- a/src/fontconfig-1-fix_mktemp_s.patch +++ b/src/fontconfig-1-fixes.patch @@ -1,22 +1,21 @@ -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 da6c9bfc3d57f3aa192972717cb5c84a56e1c422 Mon Sep 17 00:00:00 2001 -From: Mark Brand <mabrand@mabrand.nl> -Date: Fri, 29 Mar 2013 10:21:29 +0100 +From: MXE +Date: Tue, 05 Jul 2016 21:56:34 +0300 Subject: [PATCH] fix mktemp_s diff --git a/configure.ac b/configure.ac -index 1086a9a..d9fa572 100644 +index f8dadf1..bde05c8 100644 --- a/configure.ac +++ b/configure.ac -@@ -150,7 +150,7 @@ AC_TYPE_PID_T +@@ -160,7 +160,7 @@ AC_TYPE_PID_T # Checks for library functions. AC_FUNC_VPRINTF AC_FUNC_MMAP --AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp_s mkdtemp getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r readlink regcomp regerror regexec regfree fstatvfs fstatfs lstat]) -+AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp mkdtemp getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r readlink regcomp regerror regexec regfree fstatvfs fstatfs lstat]) +-AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp_s mkdtemp getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r readlink fstatvfs fstatfs lstat]) ++AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp mkdtemp getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r readlink fstatvfs fstatfs lstat]) dnl AC_CHECK_FUNCS doesn't check for header files. dnl posix_fadvise() may be not available in older libc. diff --git a/src/fontconfig.mk b/src/fontconfig.mk index e8f2b8ee..ca552b89 100644 --- a/src/fontconfig.mk +++ b/src/fontconfig.mk @@ -1,17 +1,17 @@ -# 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 := fontconfig +$(PKG)_WEBSITE := https://fontconfig.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 2.11.1 -$(PKG)_CHECKSUM := dc62447533bca844463a3c3fd4083b57c90f18a70506e7a9f4936b5a1e516a99 +$(PKG)_VERSION := 2.12.3 +$(PKG)_CHECKSUM := bd24bf6602731a11295c025909d918180e98385625182d3b999fd6f1ab34f8bd $(PKG)_SUBDIR := fontconfig-$($(PKG)_VERSION) $(PKG)_FILE := fontconfig-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://fontconfig.org/release/$($(PKG)_FILE) +$(PKG)_URL := https://fontconfig.org/release/$($(PKG)_FILE) $(PKG)_DEPS := gcc expat freetype-bootstrap define $(PKG)_UPDATE - $(WGET) -q -O- 'http://fontconfig.org/release/' | \ + $(WGET) -q -O- 'https://fontconfig.org/release/' | \ $(SED) -n 's,.*fontconfig-\([0-9][^>]*\)\.tar.*,\1,p' | \ tail -1 endef diff --git a/src/freeglut-1-fixes.patch b/src/freeglut-1-fixes.patch index c7398340..ff57c3b5 100644 --- a/src/freeglut-1-fixes.patch +++ b/src/freeglut-1-fixes.patch @@ -1,60 +1,95 @@ -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. Contains ad hoc patches for cross building. -From dc54ddf47055db70aeb19c618a70bd5448cff836 Mon Sep 17 00:00:00 2001 -From: Mark Brand <mabrand@mabrand.nl> -Date: Thu, 11 Apr 2013 08:50:44 +0200 -Subject: [PATCH] add pkg-config support +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Pek <tehnick-8@yandex.ru> +Date: Sat, 18 Jun 2016 16:24:52 +0300 +Subject: [PATCH] Back compatibility with older freeglut packages in MXE -based on -http://old.nabble.com/-PATCH--Add-pkgconfig-file-td23312302.html -proposed to upstream -https://sourceforge.net/tracker/?func=detail&aid=3511842&group_id=1032&atid=101032 - -diff --git a/Makefile.am b/Makefile.am -index 39c5628..b504bc6 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -68,3 +68,6 @@ dist-hook: +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1111111..2222222 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -11,7 +11,7 @@ INCLUDE(GNUInstallDirs) + # CMAKE_ARCHIVE_OUTPUT_DIRECTORY instead. + # Static libraries end up in CMAKE_ARCHIVE_OUTPUT_DIRECTORY on all + # platforms. +-SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) ++SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) + SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) + SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) - libtool: $(LIBTOOL_DEPS) - $(SHELL) ./config.status --recheck +@@ -53,9 +53,7 @@ ENDIF() + OPTION(FREEGLUT_GLES "Use OpenGL ES (requires EGL)" OFF) + + # option to build either as "glut" (ON) or "freeglut" (OFF) +-IF(NOT WIN32) +- OPTION(FREEGLUT_REPLACE_GLUT "Be a replacement for GLUT" ON) +-ENDIF() ++OPTION(FREEGLUT_REPLACE_GLUT "Be a replacement for GLUT" ON) + + + SET(FREEGLUT_HEADERS +@@ -346,12 +344,18 @@ ENDIF() + + + IF(WIN32) ++ IF(FREEGLUT_REPLACE_GLUT) ++ SET(LIBNAME glut) ++ ELSE() ++ SET(LIBNAME freeglut) ++ ENDIF() + -+pkgconfigdir = $(libdir)/pkgconfig -+pkgconfig_DATA = glut.pc -diff --git a/configure.ac b/configure.ac -index 4f194d9..71e696d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -125,5 +125,6 @@ AC_CONFIG_FILES([ - progs/demos/spaceball/Makefile - progs/demos/subwin/Makefile - src/Makefile -+ glut.pc - ]) - AC_OUTPUT -diff --git a/glut.pc.in b/glut.pc.in -new file mode 100644 -index 0000000..ea57c4a ---- /dev/null -+++ b/glut.pc.in -@@ -0,0 +1,13 @@ -+prefix=@prefix@ -+exec_prefix=@exec_prefix@ -+libdir=@libdir@ -+includedir=@includedir@/@PACKAGE@ -+ -+Name: glut -+Description: A freely licensed alternative to the GLUT library -+Version: @VERSION@ -+Libs: -L${libdir} -lglut -+Libs.private: -lglu32 -lopengl32 -lwinmm -lgdi32 -mwindows -+Cflags: -I${includedir} -+Cflags.private: -DFREEGLUT_STATIC -+ --- -1.8.1.4 + LIST(APPEND LIBS winmm) + IF(FREEGLUT_BUILD_SHARED_LIBS) +- SET_TARGET_PROPERTIES(freeglut PROPERTIES COMPILE_FLAGS -DFREEGLUT_EXPORTS) ++ SET_TARGET_PROPERTIES(freeglut PROPERTIES COMPILE_FLAGS -DFREEGLUT_EXPORTS OUTPUT_NAME ${LIBNAME}) + ENDIF() + IF(FREEGLUT_BUILD_STATIC_LIBS) +- SET_TARGET_PROPERTIES(freeglut_static PROPERTIES COMPILE_FLAGS -DFREEGLUT_STATIC) ++ SET_TARGET_PROPERTIES(freeglut_static PROPERTIES COMPILE_FLAGS -DFREEGLUT_STATIC OUTPUT_NAME ${LIBNAME}) + # need to set machine:x64 for linker, at least for VC10, and + # doesn't hurt for older compilers: + # http://public.kitware.com/Bug/view.php?id=11240#c22768 +@@ -514,12 +518,13 @@ ELSE() + ENDIF() + # Client applications need to define FreeGLUT GLES version to + # bootstrap headers inclusion in freeglut_std.h: +-SET(PC_LIBNAME "glut") +-SET(PC_FILENAME "freeglut.pc") ++SET(PC_LIBNAME "${LIBNAME}") ++SET(PC_FILENAME "${LIBNAME}.pc") + IF(FREEGLUT_GLES) + SET(PC_CFLAGS "-DFREEGLUT_GLES") +- SET(PC_LIBNAME "freeglut-gles") +- SET(PC_FILENAME "freeglut-gles.pc") ++ENDIF() ++IF(FREEGLUT_BUILD_STATIC_LIBS) ++ LIST(APPEND PC_CFLAGS -DFREEGLUT_STATIC) + ENDIF() + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/freeglut.pc.in ${CMAKE_BINARY_DIR}/freeglut.pc @ONLY) + INSTALL(FILES ${CMAKE_BINARY_DIR}/freeglut.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/ RENAME ${PC_FILENAME}) +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Thu, 14 Jul 2016 19:15:17 +0300 +Subject: [PATCH] add glu to requirements in .pc file + +glu.pc is generated by mxe-conf and it adds -lglu32 to linker flags. +libglu32.a defines gluUnProject and other symbols used by users of GLU. + +Fix https://github.com/mxe/mxe/issues/1434 +See https://github.com/mxe/mxe/pull/1429 +See http://stackoverflow.com/a/17451000 + +diff --git a/freeglut.pc.in b/freeglut.pc.in +index 1111111..2222222 100644 +--- a/freeglut.pc.in ++++ b/freeglut.pc.in +@@ -8,3 +8,4 @@ Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ + Libs: -L${libdir} -l@PC_LIBNAME@ + Libs.private: @PC_LIBS_PRIVATE@ + Cflags: -I${includedir} @PC_CFLAGS@ ++Requires: glu diff --git a/src/freeglut-2-fix-autoconf-version.patch b/src/freeglut-2-fix-autoconf-version.patch deleted file mode 100644 index f0525d69..00000000 --- a/src/freeglut-2-fix-autoconf-version.patch +++ /dev/null @@ -1,15 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -diff --git a/configure.ac b/configure.ac ---- a/configure.ac 2013-02-08 23:55:11.000000000 +0100 -+++ b/configure.ac 2013-04-12 15:23:57.161451656 +0200 -@@ -2,7 +2,7 @@ - - AC_INIT([freeglut library],[2.8.1],[freeglut-bugs@lists.sourceforge.net],[freeglut]) - AM_INIT_AUTOMAKE --AC_PREREQ([2.69]) -+AC_PREREQ([2.67]) - AC_CONFIG_SRCDIR([AUTHORS]) - AC_CONFIG_HEADERS([config.h]) - diff --git a/src/freeglut-test.c b/src/freeglut-test.c index ef6d1c9a..5d640956 100644 --- a/src/freeglut-test.c +++ b/src/freeglut-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <GL/glut.h> diff --git a/src/freeglut.mk b/src/freeglut.mk index 78f3061a..1c986723 100644 --- a/src/freeglut.mk +++ b/src/freeglut.mk @@ -1,32 +1,34 @@ -# 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 := freeglut +$(PKG)_WEBSITE := https://freeglut.sourceforge.io/ $(PKG)_IGNORE := -$(PKG)_VERSION := 2.8.1 -$(PKG)_CHECKSUM := dde46626a62a1cd9cf48a11951cdd592e7067c345cffe193a149dfd47aef999a -$(PKG)_SUBDIR := freeglut-$(word 1,$(subst -, ,$($(PKG)_VERSION))) +$(PKG)_VERSION := 3.0.0 +$(PKG)_CHECKSUM := 2a43be8515b01ea82bcfa17d29ae0d40bd128342f0930cd1f375f1ff999f76a2 +$(PKG)_SUBDIR := freeglut-$($(PKG)_VERSION) $(PKG)_FILE := freeglut-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/freeglut/freeglut/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/freeglut/freeglut/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/freeglut/files/freeglut/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/freeglut/files/freeglut/' | \ $(SED) -n 's,.*freeglut-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef define $(PKG)_BUILD - cd '$(1)' && ./autogen.sh - cd '$(1)' && ./configure \ - $(MXE_CONFIGURE_OPTS) \ - --enable-replace-glut \ - --disable-debug \ - --without-x - $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= $(if $(BUILD_STATIC),EXPORT_FLAGS='-DFREEGLUT_STATIC') + mkdir '$(1).build' + cd '$(1).build' && $(TARGET)-cmake '$(1)' \ + -DFREEGLUT_GLES=OFF \ + -DFREEGLUT_BUILD_DEMOS=OFF \ + -DFREEGLUT_REPLACE_GLUT=ON \ + -DFREEGLUT_BUILD_STATIC_LIBS=$(CMAKE_STATIC_BOOL) \ + -DFREEGLUT_BUILD_SHARED_LIBS=$(CMAKE_SHARED_BOOL) + $(MAKE) -C '$(1).build' -j '$(JOBS)' + $(MAKE) -C '$(1).build' -j 1 install '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-freeglut.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-freeglut.exe' \ `'$(TARGET)-pkg-config' glut --cflags --libs` endef diff --git a/src/freeimage-1-fixes.patch b/src/freeimage-1-fixes.patch index b166db52..25819707 100644 --- a/src/freeimage-1-fixes.patch +++ b/src/freeimage-1-fixes.patch @@ -1,17 +1,16 @@ -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. Contains ad hoc patches for cross building. -From 85f449a5341881f90a6af1dbbb7f3d3cd656bca6 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Mark Brand <mabrand@mabrand.nl> Date: Sat, 27 Oct 2012 22:57:27 +0200 -Subject: [PATCH 1/2] include string.h for memset +Subject: [PATCH] include string.h for memset taken from https://sourceforge.net/tracker/?func=detail&aid=3581223&group_id=11504&atid=311504 diff --git a/Source/OpenEXR/IlmImf/ImfAutoArray.h b/Source/OpenEXR/IlmImf/ImfAutoArray.h -index edb8b10..0b1378e 100755 +index 1111111..2222222 100644 --- a/Source/OpenEXR/IlmImf/ImfAutoArray.h +++ b/Source/OpenEXR/IlmImf/ImfAutoArray.h @@ -45,6 +45,10 @@ @@ -25,18 +24,15 @@ index edb8b10..0b1378e 100755 namespace Imf { --- -1.8.2.2 - -From 1c85f65b9efc06760ac572ba19c1c513f14d4719 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> Date: Sat, 11 May 2013 15:15:39 +1000 -Subject: [PATCH 2/2] mingw-w64 fixes +Subject: [PATCH] mingw-w64 fixes diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp -index 72218a2..10c86fd 100755 +index 1111111..2222222 100644 --- a/Source/FreeImage/PluginTIFF.cpp +++ b/Source/FreeImage/PluginTIFF.cpp @@ -35,6 +35,8 @@ @@ -57,6 +53,45 @@ index 72218a2..10c86fd 100755 } return tif; --- -1.8.2.2 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: fiesh <weiss@wsoptics.de> +Date: Tue, 22 Dec 2015 13:45:56 +0100 +Subject: [PATCH] fix freeimage build + +Add the FREEIMAGE_LIB define in order to keep the build process from +defining dllspec specifications. Remove -fPIC to fix a warning. + +diff --git a/Makefile.fip b/Makefile.fip +index 1111111..2222222 100644 +--- a/Makefile.fip ++++ b/Makefile.fip +@@ -17,7 +17,7 @@ MODULES = $(SRCS:.c=.o) + MODULES := $(MODULES:.cpp=.o) + CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -DNO_LCMS + CFLAGS += $(INCLUDE) +-CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy ++CXXFLAGS ?= -O3 -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy -DFREEIMAGE_LIB + CXXFLAGS += $(INCLUDE) + + ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64) + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Pek <tehnick-8@mail.ru> +Date: Wed, 04 May 2016 18:43:16 +0300 +Subject: [PATCH] fix build with GCC >= 6.x + +diff --git a/Makefile.mingw b/Makefile.mingw +index 1111111..2222222 100644 +--- a/Makefile.mingw ++++ b/Makefile.mingw +@@ -67,7 +67,7 @@ MODULES := $(MODULES:.cpp=.o) + RESOURCE = $(RCFILE:.rc=.coff) + CFLAGS ?= -O3 -fexceptions -DNDEBUG $(WIN32_CFLAGS) + CFLAGS += $(INCLUDE) +-CXXFLAGS ?= -O3 -fexceptions -Wno-ctor-dtor-privacy -DNDEBUG $(WIN32_CXXFLAGS) ++CXXFLAGS ?= -O3 -fexceptions -Wno-ctor-dtor-privacy -Wno-narrowing -DNDEBUG $(WIN32_CXXFLAGS) + CXXFLAGS += $(INCLUDE) + RCFLAGS ?= -DNDEBUG + LDFLAGS ?= -s -shared -static -Wl,-soname,$(SOLIBNAME) $(WIN32_LDFLAGS) + diff --git a/src/freeimage-test.c b/src/freeimage-test.c index 606be602..acdf220c 100644 --- a/src/freeimage-test.c +++ b/src/freeimage-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdio.h> diff --git a/src/freeimage-test.cpp b/src/freeimage-test.cpp new file mode 100644 index 00000000..328c0767 --- /dev/null +++ b/src/freeimage-test.cpp @@ -0,0 +1,14 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include <FreeImagePlus.h> + +int main() +{ + fipImage fi; + + fi.setSize(FIT_BITMAP, 800, 600, 24); + + return 0; +} diff --git a/src/freeimage.mk b/src/freeimage.mk index 6b9f8c17..6f19c434 100644 --- a/src/freeimage.mk +++ b/src/freeimage.mk @@ -1,17 +1,18 @@ -# 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 := freeimage +$(PKG)_WEBSITE := https://freeimage.sourceforge.io/ +$(PKG)_DESCR := FreeImage $(PKG)_IGNORE := $(PKG)_VERSION := 3.15.4 $(PKG)_CHECKSUM := eb6361519d33131690a0e726b085a05825e5adf9fb72c752d8d39100e48dc829 $(PKG)_SUBDIR := FreeImage $(PKG)_FILE := FreeImage$(subst .,,$($(PKG)_VERSION)).zip -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/freeimage/Source Distribution/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/freeimage/Source Distribution/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/freeimage/files/Source Distribution/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/freeimage/files/Source Distribution/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef @@ -25,12 +26,21 @@ define $(PKG)_BUILD FREEIMAGE_LIBRARY_TYPE=STATIC \ TARGET=freeimage + $(MAKE) -C '$(1)' -j '$(JOBS)' -f Makefile.fip \ + CXX='$(TARGET)-g++' \ + CC='$(TARGET)-gcc' \ + AR='$(TARGET)-ar' \ + RC='$(TARGET)-windres' \ + libfreeimageplus.a + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' $(INSTALL) -m644 '$(1)/libfreeimage.a' '$(PREFIX)/$(TARGET)/lib/' + $(INSTALL) -m644 '$(1)/libfreeimageplus.a' '$(PREFIX)/$(TARGET)/lib/' $(INSTALL) -d '$(PREFIX)/$(TARGET)/include' $(INSTALL) -m644 '$(1)/Source/FreeImage.h' '$(PREFIX)/$(TARGET)/include/' + $(INSTALL) -m644 '$(1)/Wrapper/FreeImagePlus/FreeImagePlus.h' '$(PREFIX)/$(TARGET)/include/' - # create pkg-config file + # create pkg-config files $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' (echo 'Name: freeimage'; \ echo 'Version: $(freeimage_VERSION)'; \ @@ -38,11 +48,22 @@ define $(PKG)_BUILD echo 'Cflags: -DFREEIMAGE_LIB'; \ echo 'Libs: -lfreeimage -lws2_32 -lstdc++';) \ > '$(PREFIX)/$(TARGET)/lib/pkgconfig/freeimage.pc' + (echo 'Name: freeimageplus'; \ + echo 'Version: $(freeimage_VERSION)'; \ + echo "Description: FreeImagePlus"; \ + echo 'Cflags: -DFREEIMAGE_LIB'; \ + echo 'Libs: -lfreeimage -lfreeimageplus -lws2_32';) \ + > '$(PREFIX)/$(TARGET)/lib/pkgconfig/freeimageplus.pc' '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-freeimage.exe' \ + '$(PWD)/src/$(PKG)-test.c' -o '$(PREFIX)/$(TARGET)/bin/test-freeimage.exe' \ `'$(TARGET)-pkg-config' freeimage --cflags --libs` + + '$(TARGET)-g++' \ + -W -Wall -Werror -ansi -pedantic \ + '$(PWD)/src/$(PKG)-test.cpp' -o '$(PREFIX)/$(TARGET)/bin/test-freeimageplus.exe' \ + `'$(TARGET)-pkg-config' freeimageplus --cflags --libs` endef $(PKG)_BUILD_SHARED = diff --git a/src/freetds.mk b/src/freetds.mk index d7dcf1c4..66095031 100644 --- a/src/freetds.mk +++ b/src/freetds.mk @@ -1,25 +1,22 @@ -# 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 := freetds +$(PKG)_WEBSITE := http://www.freetds.org/ +$(PKG)_DESCR := FreeTDS $(PKG)_IGNORE := -$(PKG)_VERSION := 0.95.8 -$(PKG)_CHECKSUM := ace9f99993235c4a1e407981eea1cb345dd304f1703a9accfb8835296786d2fb +$(PKG)_VERSION := 1.00.47 +$(PKG)_CHECKSUM := 28d7eab43ebb52d61274ee7465d68a221e044de5ceb511cc6b384d2bf0cc01ca $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 $(PKG)_URL := ftp://ftp.freetds.org/pub/$(PKG)/stable/$($(PKG)_FILE) +$(PKG)_URL_2 := https://fossies.org/linux/privat/$($(PKG)_FILE) $(PKG)_DEPS := gcc gnutls libiconv define $(PKG)_UPDATE - echo 'Warning: Updates are temporarily disabled for package freetds.' >&2; - echo $(freetds_VERSION) -endef -define $(PKG)_UPDATE_orig - $(WGET) -q -O- 'http://freetds.cvs.sourceforge.net/viewvc/freetds/freetds/' | \ - grep '<option>R' | \ - $(SED) -n 's,.*R\([0-9][0-9_]*\)<.*,\1,p' | \ - $(SED) 's,_,.,g' | \ - head -1 + $(WGET) -q -O- 'ftp://ftp.freetds.org/pub/freetds/stable/' | \ + $(SED) -n 's,.*freetds-\([0-9.]*\)\.tar.*,\1,p' | \ + $(SORT) -V | \ + tail -1 endef define $(PKG)_BUILD diff --git a/src/freetype-1-fixes.patch b/src/freetype-1-fixes.patch new file mode 100644 index 00000000..ee4604b7 --- /dev/null +++ b/src/freetype-1-fixes.patch @@ -0,0 +1,71 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +Contains ad hoc patches for cross building. + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Tue, 20 Jun 2017 19:34:02 +1000 +Subject: [PATCH] fix PKG_CONFIG program in freetype-config for cross-compiling + +Taken from: +https://savannah.nongnu.org/bugs/index.php?51274 + +diff --git a/builds/unix/freetype-config.in b/builds/unix/freetype-config.in +index 1111111..2222222 100644 +--- a/builds/unix/freetype-config.in ++++ b/builds/unix/freetype-config.in +@@ -14,7 +14,7 @@ export LC_ALL + + + # if `pkg-config' is available, use values from `freetype2.pc' +-pkg-config --version >/dev/null 2>&1 ++%PKG_CONFIG% --version >/dev/null 2>&1 + if test $? -eq 0 ; then + # note that option `--variable' is not affected by the + # PKG_CONFIG_SYSROOT_DIR environment variable +@@ -23,17 +23,17 @@ if test $? -eq 0 ; then + export PKG_CONFIG_SYSROOT_DIR + fi + +- prefix=`pkg-config --variable prefix freetype2` +- exec_prefix=`pkg-config --variable exec_prefix freetype2` ++ prefix=`%PKG_CONFIG% --variable prefix freetype2` ++ exec_prefix=`%PKG_CONFIG% --variable exec_prefix freetype2` + +- includedir=`pkg-config --variable includedir freetype2` +- libdir=`pkg-config --variable libdir freetype2` ++ includedir=`%PKG_CONFIG% --variable includedir freetype2` ++ libdir=`%PKG_CONFIG% --variable libdir freetype2` + +- version=`pkg-config --modversion freetype2` ++ version=`%PKG_CONFIG% --modversion freetype2` + +- cflags=`pkg-config --cflags freetype2` +- dynamic_libs=`pkg-config --libs freetype2` +- static_libs=`pkg-config --static --libs freetype2` ++ cflags=`%PKG_CONFIG% --cflags freetype2` ++ dynamic_libs=`%PKG_CONFIG% --libs freetype2` ++ static_libs=`%PKG_CONFIG% --static --libs freetype2` + else + prefix="%prefix%" + exec_prefix="%exec_prefix%" +diff --git a/builds/unix/unix-def.in b/builds/unix/unix-def.in +index 1111111..2222222 100644 +--- a/builds/unix/unix-def.in ++++ b/builds/unix/unix-def.in +@@ -62,6 +62,7 @@ version_info := @version_info@ + + # Variables needed for `freetype-config' and `freetype.pc'. + # ++PKG_CONFIG := @PKG_CONFIG@ + REQUIRES_PRIVATE := @REQUIRES_PRIVATE@ + LIBS_PRIVATE := @LIBS_PRIVATE@ + LIBSSTATIC_CONFIG := @LIBSSTATIC_CONFIG@ +@@ -102,6 +103,7 @@ NO_OUTPUT := 2> /dev/null + $(OBJ_BUILD)/freetype-config: $(TOP_DIR)/builds/unix/freetype-config.in + rm -f $@ $@.tmp + sed -e 's|%LIBSSTATIC_CONFIG%|$(LIBSSTATIC_CONFIG)|' \ ++ -e 's|%PKG_CONFIG%|$(PKG_CONFIG)|' \ + -e 's|%build_libtool_libs%|$(build_libtool_libs)|' \ + -e 's|%exec_prefix%|$(exec_prefix)|' \ + -e 's|%ft_version%|$(ft_version)|' \ diff --git a/src/freetype-bootstrap.mk b/src/freetype-bootstrap.mk index 472bf848..b92057c7 100644 --- a/src/freetype-bootstrap.mk +++ b/src/freetype-bootstrap.mk @@ -1,7 +1,8 @@ -# 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 := freetype-bootstrap +$(PKG)_WEBSITE := https://www.freetype.org/ +$(PKG)_DESCR := freetype (without harfbuzz) $(PKG)_IGNORE = $(freetype_IGNORE) $(PKG)_VERSION = $(freetype_VERSION) $(PKG)_CHECKSUM = $(freetype_CHECKSUM) @@ -15,5 +16,5 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - $(freetype_BUILD) + $(freetype_BUILD_COMMON) endef diff --git a/src/freetype.mk b/src/freetype.mk index 9b6ad4fa..81a614b4 100644 --- a/src/freetype.mk +++ b/src/freetype.mk @@ -1,33 +1,39 @@ -# 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 := freetype +$(PKG)_WEBSITE := https://www.freetype.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 2.6.1 -$(PKG)_CHECKSUM := 2f6e9a7de3ae8e85bdd2fe237e27d868d3ba7a27495e65906455c27722dd1a17 +$(PKG)_VERSION := 2.8 +$(PKG)_CHECKSUM := a3c603ed84c3c2495f9c9331fe6bba3bb0ee65e06ec331e0a0fb52158291b40b $(PKG)_SUBDIR := freetype-$($(PKG)_VERSION) $(PKG)_FILE := freetype-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/freetype/freetype2/$(shell echo '$($(PKG)_VERSION)' | cut -d . -f 1,2,3)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/freetype/freetype2/$(shell echo '$($(PKG)_VERSION)' | cut -d . -f 1,2,3)/$($(PKG)_FILE) $(PKG)_DEPS := gcc bzip2 harfbuzz libpng zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/freetype/files/freetype2/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/freetype/files/freetype2/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ $(SORT) -V | \ tail -1 endef -define $(PKG)_BUILD - # alias harfbuzz to handle linking circularity - $(if $(BUILD_STATIC),\ - ln -sf libharfbuzz.a '$(PREFIX)/$(TARGET)/lib/libharfbuzz_too.a',) +define $(PKG)_BUILD_COMMON cd '$(1)' && GNUMAKE=$(MAKE) ./configure \ $(MXE_CONFIGURE_OPTS) \ LIBPNG_CFLAGS="`$(TARGET)-pkg-config libpng --cflags`" \ LIBPNG_LDFLAGS="`$(TARGET)-pkg-config libpng --libs`" \ FT2_EXTRA_LIBS="`$(TARGET)-pkg-config libpng --libs`" \ - $(if $(BUILD_STATIC),HARFBUZZ_LIBS="`$(TARGET)-pkg-config harfbuzz --libs` -lharfbuzz_too `$(TARGET)-pkg-config glib-2.0 --libs`",) + $(if $(BUILD_STATIC),HARFBUZZ_LIBS="`$(TARGET)-pkg-config harfbuzz --libs` -lharfbuzz_too -lfreetype_too `$(TARGET)-pkg-config glib-2.0 --libs`",) $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install ln -sf '$(PREFIX)/$(TARGET)/bin/freetype-config' '$(PREFIX)/bin/$(TARGET)-freetype-config' endef + +define $(PKG)_BUILD + # alias libharfbuzz and libfreetype to satisfy circular dependence + # libfreetype should already have been created by freetype-bootstrap.mk + $(if $(BUILD_STATIC),\ + ln -sf libharfbuzz.a '$(PREFIX)/$(TARGET)/lib/libharfbuzz_too.a' \ + && ln -sf libfreetype.a '$(PREFIX)/$(TARGET)/lib/libfreetype_too.a',) + $($(PKG)_BUILD_COMMON) +endef diff --git a/src/fribidi-1-fixes.patch b/src/fribidi-1-fixes.patch index 2fdb45ff..1f1102eb 100644 --- a/src/fribidi-1-fixes.patch +++ b/src/fribidi-1-fixes.patch @@ -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 c4dc7b368af33821eca1be8a4ec88929b44f3d06 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> diff --git a/src/fribidi.mk b/src/fribidi.mk index ef2a9ba0..4e25f4fe 100644 --- a/src/fribidi.mk +++ b/src/fribidi.mk @@ -1,17 +1,18 @@ -# 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 := fribidi +$(PKG)_WEBSITE := https://fribidi.org/ +$(PKG)_DESCR := FriBidi $(PKG)_IGNORE := $(PKG)_VERSION := 0.19.6 $(PKG)_CHECKSUM := cba8b7423c817e5adf50d28ec9079d14eafcec9127b9e8c8f1960c5ad585e17d $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://fribidi.org/download/$($(PKG)_FILE) +$(PKG)_URL := https://fribidi.org/download/$($(PKG)_FILE) $(PKG)_DEPS := gcc glib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://fribidi.org/download/?C=M;O=D' | \ + $(WGET) -q -O- 'https://fribidi.org/download/?C=M;O=D' | \ $(SED) -n 's,.*<a href="fribidi-\([0-9][^"]*\)\.tar.*,\1,p' | \ head -1 endef diff --git a/src/ftgl-1-gl-m4.patch b/src/ftgl-1-gl-m4.patch index ba74df53..816c3b4b 100644 --- a/src/ftgl-1-gl-m4.patch +++ b/src/ftgl-1-gl-m4.patch @@ -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. --- ftgl-2.1.3~rc5/m4/gl.m4 2008-05-05 16:48:57.000000000 +0200 +++ ftgl-2.1.3~rc5/m4/gl.m4.new 2010-09-20 14:55:27.000000000 +0200 diff --git a/src/ftgl-2-obsolete-am-header.patch b/src/ftgl-2-obsolete-am-header.patch index 5154066d..5223141b 100644 --- a/src/ftgl-2-obsolete-am-header.patch +++ b/src/ftgl-2-obsolete-am-header.patch @@ -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. diff -ur ftgl-2.1.3~rc5.orig/configure.ac ftgl-2.1.3~rc5/configure.ac --- ftgl-2.1.3~rc5.orig/configure.ac 2013-04-25 16:57:09.000000000 +1000 diff --git a/src/ftgl-test.c b/src/ftgl-test.c index eda4db89..47b47ed4 100644 --- a/src/ftgl-test.c +++ b/src/ftgl-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. * * This is a modified version of: * test/CTest.c diff --git a/src/ftgl.mk b/src/ftgl.mk index a48d81ec..82e2cbf1 100644 --- a/src/ftgl.mk +++ b/src/ftgl.mk @@ -1,17 +1,17 @@ -# 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 := ftgl +$(PKG)_WEBSITE := https://sourceforge.net/projects/ftgl/ $(PKG)_IGNORE := $(PKG)_VERSION := 2.1.3~rc5 $(PKG)_CHECKSUM := 521ff7bd62c459ff5372e269c223e2a6107a6a99a36afdc2ae634a973af70c59 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$(subst ~,-,$($(PKG)_VERSION)).tar.bz2 -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/FTGL Source/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/FTGL Source/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc freeglut freetype define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/ftgl/files/FTGL Source/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/ftgl/files/FTGL Source/' | \ $(SED) -n 's,.*<tr title="\([0-9][^"]*\)".*,\1,p' | \ head -1 endef @@ -35,7 +35,7 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ `'$(TARGET)-pkg-config' freetype2 --cflags --libs` \ `'$(TARGET)-pkg-config' ftgl --cflags --libs` endef diff --git a/src/gc.mk b/src/gc.mk index 86ae0b25..f9edc0c2 100644 --- a/src/gc.mk +++ b/src/gc.mk @@ -1,17 +1,17 @@ -# 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 := gc +$(PKG)_WEBSITE := http://www.hpl.hp.com/personal/Hans_Boehm/gc/ $(PKG)_IGNORE := $(PKG)_VERSION := 7.2e $(PKG)_CHECKSUM := 09315b48a82d600371207691126ad058c04677281ac318d86fa84c98c3c9af4b $(PKG)_SUBDIR := $(PKG)-7.2 $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://hboehm.info/$(PKG)/$(PKG)_source/$($(PKG)_FILE) +$(PKG)_URL := https://hboehm.info/$(PKG)/$(PKG)_source/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://hboehm.info/gc/gc_source/' | \ + $(WGET) -q -O- 'https://hboehm.info/gc/gc_source/' | \ grep '<a href="gc-' | \ $(SED) -n 's,.*<a href="gc-\([0-9][^"]*\)\.tar.*,\1,p' | \ grep -v 'alpha' | \ diff --git a/src/gcc-1-fixes.patch b/src/gcc-1-fixes.patch new file mode 100644 index 00000000..4cab760b --- /dev/null +++ b/src/gcc-1-fixes.patch @@ -0,0 +1,27 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +Contains ad hoc patches for cross building. + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Thu, 2 Feb 2017 02:05:50 +1100 +Subject: [PATCH] allow native cpu detection when building with clang + +function was disabled for non-gcc5 in: +https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b587c12551143c14f023860a1dbdf7316ae71f27;hp=43096b526a9f23008b9769372f11475ae63487bc + +clang can build it correctly and this should probably be a feature test + +diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.c +index 1111111..2222222 100644 +--- a/gcc/config/i386/driver-i386.c ++++ b/gcc/config/i386/driver-i386.c +@@ -24,7 +24,7 @@ along with GCC; see the file COPYING3. If not see + + const char *host_detect_local_cpu (int argc, const char **argv); + +-#if defined(__GNUC__) && (__GNUC__ >= 5 || !defined(__PIC__)) ++#if defined(__GNUC__) && (__GNUC__ >= 5 || !defined(__PIC__)) || defined(__clang__) + #include "cpuid.h" + + struct cache_desc diff --git a/src/gcc.mk b/src/gcc.mk index 4e7bbf7d..42171f9f 100644 --- a/src/gcc.mk +++ b/src/gcc.mk @@ -1,20 +1,19 @@ -# 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 := gcc -$(PKG)_IGNORE := -$(PKG)_VERSION := 5.2.0 -$(PKG)_CHECKSUM := 5f835b04b5f7dd4f4d2dc96190ec1621b8d89f2dc6f638f9f8bc1b1014ba8cad +$(PKG)_WEBSITE := https://gcc.gnu.org/ +$(PKG)_DESCR := GCC +$(PKG)_IGNORE := 6% +$(PKG)_VERSION := 5.4.0 +$(PKG)_CHECKSUM := 608df76dec2d34de6558249d8af4cbee21eceddbcb580d666f7a5a583ca3303a $(PKG)_SUBDIR := gcc-$($(PKG)_VERSION) $(PKG)_FILE := gcc-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://ftp.gnu.org/pub/gnu/gcc/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE) -$(PKG)_URL_2 := ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE) +$(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- 'http://ftp.gnu.org/gnu/gcc/?C=M;O=D' | \ + $(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 @@ -22,8 +21,7 @@ endef define $(PKG)_CONFIGURE # configure gcc - mkdir '$(1).build' - cd '$(1).build' && '$(1)/configure' \ + cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \ --target='$(TARGET)' \ --build='$(BUILD)' \ --prefix='$(PREFIX)' \ @@ -39,6 +37,7 @@ define $(PKG)_CONFIGURE --without-x \ --disable-win32-registry \ --enable-threads=$(MXE_GCC_THREADS) \ + $(MXE_GCC_EXCEPTION_OPTS) \ --enable-libgomp \ --with-gmp='$(PREFIX)/$(BUILD)' \ --with-isl='$(PREFIX)/$(BUILD)' \ @@ -47,69 +46,76 @@ define $(PKG)_CONFIGURE --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 - # TODO: find a way to configure the installation of these correctly - rm -f $(addprefix $(PREFIX)/$(TARGET)/bin/, c++ g++ gcc gfortran) - -mv '$(PREFIX)/lib/gcc/$(TARGET)/lib/'* '$(PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/' - -mv '$(PREFIX)/lib/gcc/$(TARGET)/'*.dll '$(PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/' - -mv '$(PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/'*.dll '$(PREFIX)/$(TARGET)/bin/' - -cp '$(PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)/'*.dll.a '$(PREFIX)/$(TARGET)/lib/' - - # remove incorrectly installed libcc1 - rm -f '$(PREFIX)/lib/'libcc1* + $(shell [ `uname -s` == Darwin ] && echo "LDFLAGS='-Wl,-no_pie'") \ + $($(PKG)_CONFIGURE_OPTS) 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' \ + $(call PREPARE_PKG_SOURCE,mingw-w64,$(BUILD_DIR)) + mkdir '$(BUILD_DIR).headers' + cd '$(BUILD_DIR).headers' && '$(BUILD_DIR)/$(mingw-w64_SUBDIR)/mingw-w64-headers/configure' \ --host='$(TARGET)' \ --prefix='$(PREFIX)/$(TARGET)' \ --enable-sdk=all \ - --enable-idl - $(MAKE) -C '$(1).headers-build' install + --enable-idl \ + --enable-secure-api \ + $(mingw-w64-headers_CONFIGURE_OPTS) + $(MAKE) -C '$(BUILD_DIR).headers' install # build standalone gcc $($(PKG)_CONFIGURE) - $(MAKE) -C '$(1).build' -j '$(JOBS)' all-gcc - $(MAKE) -C '$(1).build' -j 1 install-gcc + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' all-gcc + $(MAKE) -C '$(BUILD_DIR)' -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' \ + mkdir '$(BUILD_DIR).crt' + cd '$(BUILD_DIR).crt' && '$(BUILD_DIR)/$(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 + $(MAKE) -C '$(BUILD_DIR).crt' -j '$(JOBS)' || $(MAKE) -C '$(BUILD_DIR).crt' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR).crt' -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' \ + mkdir '$(BUILD_DIR).pthreads' + cd '$(BUILD_DIR).pthreads' && '$(BUILD_DIR)/$(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 + $(MAKE) -C '$(BUILD_DIR).pthreads' -j '$(JOBS)' || $(MAKE) -C '$(BUILD_DIR).pthreads' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR).pthreads' -j 1 $(INSTALL_STRIP_TOOLCHAIN) # build rest of gcc - cd '$(1).build' - $(MAKE) -C '$(1).build' -j '$(JOBS)' - - # cc1libdir isn't passed to subdirs so install correctly and rm later - $(MAKE) -C '$(1).build/libcc1' -j 1 install cc1libdir='$(PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)' - $(MAKE) -C '$(1).build' -j 1 install + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 $(INSTALL_STRIP_TOOLCHAIN) $($(PKG)_POST_BUILD) 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 + # - shared libgcc isn't installed to version-specific locations + # - 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), + $(MAKE) -C '$(BUILD_DIR)/$(TARGET)/libgcc' -j 1 \ + toolexecdir='$(PREFIX)/$(TARGET)/bin' \ + SHLIB_SLIBDIR_QUAL= \ + install-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/') + + # cc1libdir isn't passed to subdirs so install correctly and rm + $(MAKE) -C '$(BUILD_DIR)/libcc1' -j 1 install cc1libdir='$(PREFIX)/lib/gcc/$(TARGET)/$($(PKG)_VERSION)' + -rm -f '$(PREFIX)/lib/'libcc1* +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 diff --git a/src/gd-1-fix-libvpx.patch b/src/gd-1-fix-libvpx.patch index c3d80469..b9fe7995 100644 --- a/src/gd-1-fix-libvpx.patch +++ b/src/gd-1-fix-libvpx.patch @@ -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. This patch has been taken from: https://github.com/libgd/libgd/commit/d41eb72cd4545c394578332e5c102dee69e02ee8 diff --git a/src/gd-test.c b/src/gd-test.c index c0913292..5be81aa7 100644 --- a/src/gd-test.c +++ b/src/gd-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. * * This is a slightly modified version of: * examples/arc.c diff --git a/src/gd.mk b/src/gd.mk index 7c27669c..ec3386ee 100644 --- a/src/gd.mk +++ b/src/gd.mk @@ -1,7 +1,8 @@ -# 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 := gd +$(PKG)_WEBSITE := https://libgd.github.io/ +$(PKG)_DESCR := GD (without support for xpm) $(PKG)_IGNORE := $(PKG)_VERSION := 2.1.0 $(PKG)_CHECKSUM := fa6665dfe3d898019671293c84d77067a3d2ede50884dbcb6df899d508370e5a @@ -29,7 +30,7 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-gd.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-gd.exe' \ `'$(PREFIX)/$(TARGET)/bin/gdlib-config' --cflags --libs` endef diff --git a/src/gdal-1-fixes.patch b/src/gdal-1-fixes.patch index 4544444a..7afc76a6 100644 --- a/src/gdal-1-fixes.patch +++ b/src/gdal-1-fixes.patch @@ -1,15 +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. -From ffcbf5c48eb8d8ae6a1c20e1496f1866d7903af8 Mon Sep 17 00:00:00 2001 -From: Timothy Gu <timothygu99@gmail.com> +Contains ad hoc patches for cross building. + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: MXE Date: Sat, 18 Oct 2014 18:25:34 -0400 Subject: [PATCH 1/2] Fix geos detection -Signed-off-by: Timothy Gu <timothygu99@gmail.com> diff --git a/m4/geos.m4 b/m4/geos.m4 -index 386a2c8..cda1510 100644 +index 1111111..2222222 100644 --- a/m4/geos.m4 +++ b/m4/geos.m4 @@ -121,14 +121,14 @@ AC_DEFUN([GEOS_INIT],[ @@ -30,31 +30,36 @@ index 386a2c8..cda1510 100644 AC_CHECK_LIB([geos_c], [GEOSversion], --- -1.9.1 - -From 3c60ec35bec710dc9e8fd6f0606abb7646b4f8eb Mon Sep 17 00:00:00 2001 -From: Timothy Gu <timothygu99@gmail.com> -Date: Sat, 18 Oct 2014 18:33:43 -0400 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: MXE +Date: Tue, 5 Jul 2016 22:23:16 +0300 Subject: [PATCH 2/2] Use AC_PATH_TOOL for config scripts -Signed-off-by: Timothy Gu <timothygu99@gmail.com> diff --git a/configure.in b/configure.in -index a0cf595..8ab4b5a 100644 +index 1111111..2222222 100644 --- a/configure.in +++ b/configure.in -@@ -640,7 +640,7 @@ AC_ARG_WITH(pg, +@@ -866,7 +866,7 @@ AC_ARG_WITH(pg, [Include PostgreSQL GDAL/OGR Support (ARG=path to pg_config)]),,) if test "x$with_pg" = "xyes" -o "x$with_pg" = "x" ; then - AC_PATH_PROG(PG_CONFIG, pg_config, no) + AC_PATH_TOOL(PG_CONFIG, pg_config, no) - else + else PG_CONFIG=$with_pg fi -@@ -1719,10 +1719,10 @@ else +@@ -2016,7 +2016,7 @@ KEA_CONFIG=no + AC_ARG_WITH(kea,[ --with-kea[=ARG] Include kealib (ARG=path to kea-config) [[default=yes]]],,) + + if test "$with_kea" = "yes" -o "x$with_kea" = "x" ; then +- AC_PATH_PROG(KEA_CONFIG, kea-config, no) ++ AC_PATH_TOOL(KEA_CONFIG, kea-config, no) + else + KEA_CONFIG=$with_kea + fi +@@ -2079,10 +2079,10 @@ else dnl find nc-config location unset ac_cv_path_NETCDF_NCCONFIG if test "$with_netcdf" = "yes" -o "$with_netcdf" = "" ; then @@ -67,7 +72,7 @@ index a0cf595..8ab4b5a 100644 fi dnl test nc-config -@@ -2447,7 +2447,7 @@ MYSQL_CONFIG=no +@@ -2832,7 +2832,7 @@ MYSQL_CONFIG=no AC_ARG_WITH(mysql,[ --with-mysql[=ARG] Include MySQL (ARG=path to mysql_config) [[default=no]]],,) if test "$with_mysql" = "yes" ; then @@ -76,7 +81,7 @@ index a0cf595..8ab4b5a 100644 else if test "x$with_mysql" != "x" ; then MYSQL_CONFIG=$with_mysql -@@ -2756,7 +2756,7 @@ if test "`basename xx/$with_curl`" = "curl-config" ; then +@@ -3162,7 +3162,7 @@ if test "`basename xx/$with_curl`" = "curl-config" ; then elif test "$with_curl" = "no" ; then LIBCURL_CONFIG=no else @@ -85,7 +90,7 @@ index a0cf595..8ab4b5a 100644 fi if test "$LIBCURL_CONFIG" != "no" ; then -@@ -2798,7 +2798,7 @@ if test "`basename xx/$with_xml2`" = "xml2-config" ; then +@@ -3204,7 +3204,7 @@ if test "`basename xx/$with_xml2`" = "xml2-config" ; then elif test "$with_xml2" = "no" ; then LIBXML2_CONFIG=no else @@ -95,7 +100,7 @@ index a0cf595..8ab4b5a 100644 if test "$LIBXML2_CONFIG" != "no" ; then diff --git a/m4/geos.m4 b/m4/geos.m4 -index cda1510..3fb4490 100644 +index 1111111..2222222 100644 --- a/m4/geos.m4 +++ b/m4/geos.m4 @@ -58,7 +58,7 @@ AC_DEFUN([GEOS_INIT],[ @@ -116,6 +121,3 @@ index cda1510..3fb4490 100644 [] ) --- -1.9.1 - diff --git a/src/gdal.mk b/src/gdal.mk index f6a626d7..f4709002 100644 --- a/src/gdal.mk +++ b/src/gdal.mk @@ -1,10 +1,11 @@ -# 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 := gdal +$(PKG)_WEBSITE := http://www.gdal.org/ +$(PKG)_DESCR := GDAL $(PKG)_IGNORE := -$(PKG)_VERSION := 1.11.2 -$(PKG)_CHECKSUM := 66bc8192d24e314a66ed69285186d46e6999beb44fc97eeb9c76d82a117c0845 +$(PKG)_VERSION := 2.1.3 +$(PKG)_CHECKSUM := ae6a0a0dc6eb45a981a46db27e3dfe16c644fcf04732557e2cb315776974074a $(PKG)_SUBDIR := gdal-$($(PKG)_VERSION) $(PKG)_FILE := gdal-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://download.osgeo.org/gdal/$($(PKG)_VERSION)/$($(PKG)_FILE) @@ -14,7 +15,7 @@ $(PKG)_DEPS := gcc armadillo curl expat geos giflib gta hdf4 hdf5 \ netcdf openjpeg postgresql proj sqlite tiff zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://trac.osgeo.org/gdal/wiki/DownloadSource' | \ + $(WGET) -q -O- 'https://trac.osgeo.org/gdal/wiki/DownloadSource' | \ $(SED) -n 's,.*gdal-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef @@ -79,12 +80,18 @@ define $(PKG)_BUILD LIBS="-ljpeg -lsecur32 -lportablexdr `'$(TARGET)-pkg-config' --libs openssl libtiff-4`" $(MAKE) -C '$(1)' -j '$(JOBS)' lib-target - $(MAKE) -C '$(1)' -j '$(JOBS)' install-lib + # gdal doesn't have an install-strip target + # --strip-debug doesn't reduce size by much, --strip-all breaks libs + $(if $(STRIP_LIB),-'$(TARGET)-strip' --strip-debug '$(1)/.libs'/*) + $(MAKE) -C '$(1)' -j '$(JOBS)' gdal.pc + $(MAKE) -C '$(1)' -j '$(JOBS)' install-actions $(MAKE) -C '$(1)/port' -j '$(JOBS)' install $(MAKE) -C '$(1)/gcore' -j '$(JOBS)' install $(MAKE) -C '$(1)/frmts' -j '$(JOBS)' install $(MAKE) -C '$(1)/alg' -j '$(JOBS)' install $(MAKE) -C '$(1)/ogr' -j '$(JOBS)' install OGR_ENABLED= + $(MAKE) -C '$(1)/apps' -j '$(JOBS)' all + $(if $(STRIP_EXE),-'$(TARGET)-strip' '$(1)/apps'/*.exe) $(MAKE) -C '$(1)/apps' -j '$(JOBS)' install ln -sf '$(PREFIX)/$(TARGET)/bin/gdal-config' '$(PREFIX)/bin/$(TARGET)-gdal-config' endef diff --git a/src/gdb-1-fix-termcap.patch b/src/gdb-1-fix-termcap.patch deleted file mode 100644 index 1ec247d9..00000000 --- a/src/gdb-1-fix-termcap.patch +++ /dev/null @@ -1,31 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -diff --git a/gdb/windows-termcap.c b/gdb/windows-termcap.c -index caafc47..809ae6d 100644 ---- a/gdb/windows-termcap.c -+++ b/gdb/windows-termcap.c -@@ -19,9 +19,16 @@ - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -- - #include "defs.h" -- -+#include "config.h" -+ -+#if defined (HAVE_NCURSES_TERM_H) -+#elif defined (HAVE_TERM_H) -+#else -+/* On MinGW, a real termcap library is usually not present. Stub versions -+ of the termcap functions will be built from windows-termcap.c. Readline -+ provides its own extern declarations when there's no termcap.h; do the -+ same here for the termcap functions used in GDB. */ - #include <stdlib.h> - - /* -Wmissing-prototypes */ -@@ -74,3 +81,4 @@ tgoto (const char *cap, int col, int row) - { - return NULL; - } -+#endif diff --git a/src/gdb.mk b/src/gdb.mk index dc1a7747..0527b1cf 100644 --- a/src/gdb.mk +++ b/src/gdb.mk @@ -1,17 +1,17 @@ -# 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 := gdb -$(PKG)_VERSION := 7.9.1 -$(PKG)_CHECKSUM := cd9c543a411a05b2b647dd38936034b68c2b5d6f10e0d51dc168c166c973ba40 +$(PKG)_WEBSITE := https://www.gnu.org/software/gdb/ +$(PKG)_VERSION := 8.0 +$(PKG)_CHECKSUM := f6a24ffe4917e67014ef9273eb8b547cb96a13e5ca74895b06d683b391f3f4ee $(PKG)_SUBDIR := gdb-$($(PKG)_VERSION) $(PKG)_FILE := gdb-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://ftp.gnu.org/pub/gnu/$(PKG)/$($(PKG)_FILE) -$(PKG)_URL_2 := ftp://ftp.cs.tu-berlin.de/pub/gnu/$(PKG)/$($(PKG)_FILE) -$(PKG)_DEPS := gcc expat libiconv readline zlib +$(PKG)_URL := https://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL_2 := https://ftpmirror.gnu.org/$(PKG)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc dlfcn-win32 expat libiconv readline zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://ftp.gnu.org/gnu/gdb/?C=M;O=D' | \ + $(WGET) -q -O- 'https://ftp.gnu.org/gnu/gdb/?C=M;O=D' | \ $(SED) -n 's,.*<a href="gdb-\([0-9][^"]*\)\.tar.*,\1,p' | \ $(SORT) -V | \ tail -1 @@ -21,6 +21,7 @@ define $(PKG)_BUILD cd '$(1)' && ./configure \ $(MXE_CONFIGURE_OPTS) \ --with-system-readline \ + host_configargs="LIBS=\"`$(TARGET)-pkg-config --libs dlfcn`\"" \ CONFIG_SHELL=$(SHELL) $(MAKE) -C '$(1)' -j '$(JOBS)' diff --git a/src/gdk-pixbuf-1-fixes.patch b/src/gdk-pixbuf-1-fixes.patch index c52778f7..f49db18f 100644 --- a/src/gdk-pixbuf-1-fixes.patch +++ b/src/gdk-pixbuf-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/gdk-pixbuf.mk b/src/gdk-pixbuf.mk index 1a9d4bcc..990b038e 100644 --- a/src/gdk-pixbuf.mk +++ b/src/gdk-pixbuf.mk @@ -1,17 +1,18 @@ -# 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 := gdk-pixbuf +$(PKG)_WEBSITE := https://gtk.org/ +$(PKG)_DESCR := GDK-pixbuf $(PKG)_IGNORE := -$(PKG)_VERSION := 2.30.8 -$(PKG)_CHECKSUM := 4853830616113db4435837992c0aebd94cbb993c44dc55063cee7f72a7bef8be +$(PKG)_VERSION := 2.32.3 +$(PKG)_CHECKSUM := 2b6771f1ac72f687a8971e59810b8dc658e65e7d3086bd2e676e618fd541d031 $(PKG)_SUBDIR := gdk-pixbuf-$($(PKG)_VERSION) $(PKG)_FILE := gdk-pixbuf-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/gdk-pixbuf/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc glib jasper jpeg libiconv libpng tiff define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/gdk-pixbuf/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/gdk-pixbuf/refs/tags' | \ grep '<a href=' | \ $(SED) -n 's,.*<a[^>]*>\([0-9]*\.[0-9]*[02468]\.[^<]*\)<.*,\1,p' | \ grep -v '^2\.9' | \ diff --git a/src/gendef.mk b/src/gendef.mk index d89d7d68..46115a00 100644 --- a/src/gendef.mk +++ b/src/gendef.mk @@ -1,7 +1,7 @@ -# 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 := gendef +$(PKG)_WEBSITE := https://sourceforge.net/p/mingw-w64/wiki2/gendef/ $(PKG)_IGNORE = $(mingw-w64_IGNORE) $(PKG)_VERSION = $(mingw-w64_VERSION) $(PKG)_CHECKSUM = $(mingw-w64_CHECKSUM) diff --git a/src/geoip-database.mk b/src/geoip-database.mk new file mode 100644 index 00000000..7b228624 --- /dev/null +++ b/src/geoip-database.mk @@ -0,0 +1,24 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := geoip-database +$(PKG)_WEBSITE := https://www.maxmind.com/ +$(PKG)_DESCR := GeoIP Legacy Database +$(PKG)_IGNORE := +$(PKG)_VERSION := 20150317-1 +$(PKG)_CHECKSUM := 45be84939fd22bef1ccaa1189f83c667fef275a16bbfb91f82b7b2068b4e3735 +$(PKG)_SUBDIR := . +$(PKG)_FILE := $(PKG)_$($(PKG)_VERSION)_all.deb +$(PKG)_URL := http://http.debian.net/debian/pool/main/g/$(PKG)/$($(PKG)_FILE) +$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://packages.debian.org/jessie/all/geoip-database/download' | \ + $(SED) -n 's,.*geoip-database_\([0-9\-]*\)_all.deb.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD_$(BUILD) + mkdir -p '$(PREFIX)/$(BUILD)/share/GeoIP' + cp '$(1)/usr/share/GeoIP/GeoIP.dat' \ + '$(PREFIX)/$(BUILD)/share/GeoIP/GeoIP.dat' +endef diff --git a/src/geos-1-fixes.patch b/src/geos-1-fixes.patch index fab5058a..7c04169e 100644 --- a/src/geos-1-fixes.patch +++ b/src/geos-1-fixes.patch @@ -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 7966e3a9768f3db85fd93f8e4334ef6b58f0fb92 Mon Sep 17 00:00:00 2001 From: Timothy Gu <timothygu99@gmail.com> diff --git a/src/geos-test.c b/src/geos-test.c index 4d79dcb1..d27cb0d2 100644 --- a/src/geos-test.c +++ b/src/geos-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdarg.h> diff --git a/src/geos.mk b/src/geos.mk index 7f5ac166..652e9604 100644 --- a/src/geos.mk +++ b/src/geos.mk @@ -1,7 +1,8 @@ -# 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 := geos +$(PKG)_WEBSITE := https://trac.osgeo.org/geos/ +$(PKG)_DESCR := GEOS $(PKG)_IGNORE := $(PKG)_VERSION := 3.4.2 $(PKG)_CHECKSUM := 15e8bfdf7e29087a957b56ac543ea9a80321481cef4d4f63a7b268953ad26c53 @@ -20,12 +21,13 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ $(MXE_CONFIGURE_OPTS) - $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= + $(MAKE) -C '$(1)' -j '$(JOBS)' $(MXE_DISABLE_PROGRAMS) + $(MAKE) -C '$(1)' -j 1 $(INSTALL_STRIP_LIB) ln -sf '$(PREFIX)/$(TARGET)/bin/geos-config' '$(PREFIX)/bin/$(TARGET)-geos-config' '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-geos.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-geos.exe' \ `'$(PREFIX)/bin/$(TARGET)-geos-config' --cflags --clibs` endef diff --git a/src/gettext.mk b/src/gettext.mk index 26ce2727..ee5674d0 100644 --- a/src/gettext.mk +++ b/src/gettext.mk @@ -1,18 +1,18 @@ -# 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 := gettext +$(PKG)_WEBSITE := https://www.gnu.org/software/gettext/ $(PKG)_IGNORE := -$(PKG)_VERSION := 0.19.5.1 -$(PKG)_CHECKSUM := a198d53b0c1fb11421ead197b7e76b144e887c9ef5a685323e92cbc950227731 +$(PKG)_VERSION := 0.19.8.1 +$(PKG)_CHECKSUM := ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43 $(PKG)_SUBDIR := gettext-$($(PKG)_VERSION) $(PKG)_FILE := gettext-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://ftp.gnu.org/pub/gnu/gettext/$($(PKG)_FILE) -$(PKG)_URL_2 := ftp://ftp.gnu.org/pub/gnu/gettext/$($(PKG)_FILE) +$(PKG)_URL := https://ftp.gnu.org/gnu/gettext/$($(PKG)_FILE) +$(PKG)_URL_2 := https://ftpmirror.gnu.org/gettext/$($(PKG)_FILE) $(PKG)_DEPS := gcc libiconv define $(PKG)_UPDATE - $(WGET) -q -O- 'http://ftp.gnu.org/gnu/gettext/' | \ + $(WGET) -q -O- 'https://ftp.gnu.org/gnu/gettext/' | \ grep 'gettext-' | \ $(SED) -n 's,.*gettext-\([0-9][^>]*\)\.tar.*,\1,p' | \ $(SORT) -Vr | \ diff --git a/src/ghostscript-1-fixes.patch b/src/ghostscript-1-fixes.patch new file mode 100644 index 00000000..ffa30e7a --- /dev/null +++ b/src/ghostscript-1-fixes.patch @@ -0,0 +1,1388 @@ +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, 16 Jul 2016 13:01:59 +0200 +Subject: [PATCH] apply mingw-build.patch from MINGW-packages + +Source: https://git.io/vKz1V + +diff --git a/Makefile.in b/Makefile.in +index 1111111..2222222 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -60,6 +60,14 @@ GPDLOBJDIR=./$(BUILDDIRPREFIX)@OBJDIR_BSDMAKE_WORKAROUND@ + + CONTRIBDIR=@srcdir@/contrib + ++# ------ MINGW options ------ # ++ ++MINGW_BUILD=@MINGW_BUILD@ ++MINGW_PLATFORM=@MINGW_PLATFORM@ ++MINGW_PLATFORM_BITS=@MINGW_PLATFORM_BITS@ ++MINGW_WITH_WINLIB_NAMES=@MINGW_WITH_WINLIB_NAMES@ ++MINGW_WITH_GDI=@MINGW_WITH_GDI@ ++ + # Do not edit the next group of lines. + + include $(GLSRCDIR)/version.mak +@@ -433,8 +441,8 @@ LDFLAGS_SO=@DYNAMIC_LDFLAGS@ + # Solaris may need -lnsl -lsocket -lposix4. + # (Libraries required by individual drivers are handled automatically.) + +-EXTRALIBS=$(XTRALIBS) @LIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@ @JPX_AUTOCONF_LIBS@ +-AUXEXTRALIBS=$(XTRALIBS) @LIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@ @JPX_AUTOCONF_LIBS@ @AUX_SHARED_ZLIB@ ++EXTRALIBS=$(XTRALIBS) @LIBS@ @MINGW_XTLIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@ @JPX_AUTOCONF_LIBS@ ++AUXEXTRALIBS=$(XTRALIBS) @LIBS@ @MINGW_XTLIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@ @JPX_AUTOCONF_LIBS@ @AUX_SHARED_ZLIB@ + + # Define the standard libraries to search at the end of linking. + # Most platforms require -lpthread for the POSIX threads library; +@@ -484,9 +492,10 @@ SYNC=@SYNC@ + RM=rm -f + + # ------ Dynamic loader options ------- # +-SOC_CFLAGS = @SOC_CFLAGS@ +-SOC_LIBS = @SOC_LIBS@ +-SOC_LOADER = @SOC_LOADER@ ++SOC_CFLAGS = @SOC_CFLAGS@ ++SOC_LIBS = @SOC_LIBS@ ++SOC_LOADER = @SOC_LOADER@ ++SOC_LOADER_PLAIN = @SOC_LOADER_PLAIN@ + + # on virtually every Unix-a-like system, this is "so", + # but Apple just had to be different, so it's now set +@@ -637,7 +646,17 @@ AK= + + CCFLAGS=$(GENOPT) $(CAPOPT) $(CFLAGS) + CC_=$(CC) $(CCFLAGS) +-CCAUX_=$(CCAUX) $(CFLAGS) ++ ++ifeq ($(MINGW_BUILD), 1) ++ # adding -lz to the compilation flags seems to be an error: ++ # if not always, then at least under MSys/MinGW, ++ # compiled against the system's zlib, ++ # and having no zlib sub-folder (see also: unixaux.mak) ++ CCAUX_=$(CCAUX) $(CFLAGS) ++else ++ CCAUX_=$(CCAUX) $(CFLAGS) @AUX_SHARED_ZLIB@ ++endif ++ + CC_LEAF=$(CC_) + # note gcc can't use -fomit-frame-pointer with -pg. + CC_LEAF_PG=$(CC_) +@@ -707,6 +726,12 @@ include $(GLSRCDIR)/unixinst.mak + @CONTRIBINCLUDE@ + @CUPSINCLUDE@ + ++# conditionally include the two .mak files that are only needed with a MINGW build ++ifeq ($(MINGW_BUILD), 1) ++ include $(GLSRCDIR)/mingw-fs.mak ++ include $(GLSRCDIR)/mingwlib.mak ++endif ++ + # Clean up after the autotools scripts + distclean : clean config-clean soclean pgclean debugclean mementoclean + -$(RM_) -r $(BINDIR) $(GLOBJDIR) $(PSOBJDIR) $(AUXDIR) +diff --git a/base/gp_mswin.c b/base/gp_mswin.c +index 1111111..2222222 100644 +--- a/base/gp_mswin.c ++++ b/base/gp_mswin.c +@@ -989,7 +989,7 @@ bool gp_fseekable (FILE *f) + + /* ------------------------- _snprintf -----------------------------*/ + +-#if defined(_MSC_VER) && _MSC_VER>=1900 /* VS 2014 and later have (finally) snprintf */ ++#if (defined(_MSC_VER) && _MSC_VER>=1900) || defined(__MINGW64_VERSION_MAJOR) /* VS 2014 and later have (finally) snprintf */ + # define STDC99 + #else + /* Microsoft Visual C++ 2005 doesn't properly define snprintf, +diff --git a/base/gp_mswin.h b/base/gp_mswin.h +index 1111111..2222222 100644 +--- a/base/gp_mswin.h ++++ b/base/gp_mswin.h +@@ -56,4 +56,13 @@ extern int is_spool(const char *queue); + + #endif /* !defined(RC_INVOKED) */ + ++// in gp_mswin.c, mswin_popen is called ++// before it is implemented, so we must ++// provide a prototype (at least with GCC) to ++// avoid implicit definition with the wrong return type ++ ++#ifdef __GNUC__ ++FILE *mswin_popen(const char *cmd, const char *mode); ++#endif ++ + #endif /* gp_mswin_INCLUDED */ +diff --git a/base/gs.mak b/base/gs.mak +index 1111111..2222222 100644 +--- a/base/gs.mak ++++ b/base/gs.mak +@@ -520,6 +520,7 @@ $(gconfig_h) : $(gconfxx_h) + # save our set of makefile variables that are defined in every build (paths, etc.) + $(gconfigd_h) : $(ECHOGS_XE) $(GS_MAK) $(GLSRCDIR)$(D)version.mak $(MAKEDIRS) + $(EXP)$(ECHOGS_XE) -w $(gconfigd_h) -x 23 define -s -u GS_LIB_DEFAULT -x 2022 $(GS_LIB_DEFAULT) -x 22 ++ $(MINGW_FONTPATH_PATCH_OR_EMPTY_COMMAND) + $(EXP)$(ECHOGS_XE) -a $(gconfigd_h) -x 23 define -s -u GS_DEV_DEFAULT -x 2022 $(GS_DEV_DEFAULT) -x 22 + $(EXP)$(ECHOGS_XE) -a $(gconfigd_h) -x 23 define -s -u GS_CACHE_DIR -x 2022 $(GS_CACHE_DIR) -x 22 + $(EXP)$(ECHOGS_XE) -a $(gconfigd_h) -x 23 define -s -u SEARCH_HERE_FIRST -s $(SEARCH_HERE_FIRST) +diff --git a/base/lib.mak b/base/lib.mak +index 1111111..2222222 100644 +--- a/base/lib.mak ++++ b/base/lib.mak +@@ -42,13 +42,13 @@ GLCCSHARED=$(CC_SHARED) $(GLCCFLAGS) + # We can't use $(CC_) for GLLCMSCC becuase that includes /Za on + # msvc builds, and lcms configures itself to depend on msvc extensions + # (inline asm, including windows.h) when compiled under msvc. +-GLLCMSCC=$(CC) $(LCMS_CFLAGS) $(CFLAGS) $(I_)$(GLI_) $(II)$(LCMSSRCDIR)$(D)include$(_I) $(GLF_) ++GLLCMSCC=$(CC) $(LCMS_CFLAGS) $(CFLAGS) $(I_)$(GLI_) $(GLF_) + lcms_h=$(LCMSSRCDIR)$(D)include$(D)lcms.h + icc34_h=$(GLSRC)icc34.h + # We can't use $(CC_) for GLLCMS2CC becuase that includes /Za on + # msvc builds, and lcms configures itself to depend on msvc extensions + # (inline asm, including windows.h) when compiled under msvc. +-GLLCMS2CC=$(CC) $(LCMS2_CFLAGS) $(CFLAGS) $(I_)$(GLI_) $(II)$(LCMS2SRCDIR)$(D)include$(_I) $(GLF_) ++GLLCMS2CC=$(CC) $(LCMS2_CFLAGS) $(CFLAGS) $(I_)$(GLI_) $(GLF_) + lcms2_h=$(LCMS2SRCDIR)$(D)include$(D)lcms2.h + lcms2_plugin_h=$(LCMS2SRCDIR)$(D)include$(D)lcms2_plugin.h + +diff --git a/base/mingw-fp.sh b/base/mingw-fp.sh +new file mode 100644 +index 1111111..2222222 +--- /dev/null ++++ b/base/mingw-fp.sh +@@ -0,0 +1 @@ ++sed -i -e 's?\\?/?g' $1 +diff --git a/base/mingw-fs.mak b/base/mingw-fs.mak +new file mode 100644 +index 1111111..2222222 +--- /dev/null ++++ b/base/mingw-fs.mak +@@ -0,0 +1,34 @@ ++# MSys/MinGW file- and operating-system section ++# adapted from winplat.mak ++ ++# Define the name of this makefile. ++ ++MINGW_FS_MAK=$(GLSRC)mingw-fs.mak ++ ++# Define generic Windows-specific modules. ++ ++mingw-fs_=$(GLOBJ)gp_ntfs.$(OBJ) $(GLOBJ)gp_win32.$(OBJ) ++$(GLD)mingw-fs.dev : $(MINGW_FS_MAK) $(ECHOGS_XE) $(mingw-fs_) ++ $(SETMOD) $(GLD)mingw-fs $(mingw-fs_) ++ ++$(GLOBJ)gp_ntfs.$(OBJ): $(GLSRC)gp_ntfs.c $(AK)\ ++ $(dos__h) $(memory__h) $(stdio__h) $(string__h) $(windows__h)\ ++ $(gp_h) $(gpmisc_h) $(gsmemory_h) $(gsstruct_h) $(gstypes_h) $(gsutil_h) ++ $(GLCC) $(GLO_)gp_ntfs.$(OBJ) $(C_) $(GLSRC)gp_ntfs.c ++ ++$(GLOBJ)gp_win32.$(OBJ): $(GLSRC)gp_win32.c $(AK)\ ++ $(dos__h) $(malloc__h) $(stdio__h) $(string__h) $(windows__h)\ ++ $(gp_h) $(gsmemory_h) $(gstypes_h) ++ $(GLCC) $(GLO_)gp_win32.$(OBJ) $(C_) $(GLSRC)gp_win32.c ++ ++# Define the Windows thread / synchronization module. ++ ++winsync_=$(GLOBJ)gp_wsync.$(OBJ) ++$(GLD)winsync.dev : $(MINGW_FS_MAK) $(ECHOGS_XE) $(winsync_) ++ $(SETMOD) $(GLD)winsync $(winsync_) ++ $(ADDMOD) $(GLD)winsync -replace $(GLD)nosync ++ ++$(GLOBJ)gp_wsync.$(OBJ): $(GLSRC)gp_wsync.c $(AK)\ ++ $(dos__h) $(malloc__h) $(stdio__h) $(string__h) $(windows__h)\ ++ $(gp_h) $(gsmemory_h) $(gstypes_h) ++ $(GLCC) $(GLO_)gp_wsync.$(OBJ) $(C_) $(GLSRC)gp_wsync.c +diff --git a/base/mingwlib.mak b/base/mingwlib.mak +new file mode 100644 +index 1111111..2222222 +--- /dev/null ++++ b/base/mingwlib.mak +@@ -0,0 +1,76 @@ ++# Common makefile section for MSys/MinGW ++# adapted from winlib.mak ++ ++# Define the files to be removed by `make clean'. ++# nmake expands macros when encountered, not when used, ++# so this must precede the !include statements. ++ ++BEGINFILES=$(GLGENDIR)\ccf32.tr\ ++ $(GLOBJDIR)\*.res $(GLOBJDIR)\*.ico\ ++ $(BINDIR)\$(GSDLL).dll $(BINDIR)\$(GSCONSOLE).exe\ ++ $(BINDIR)\setupgs.exe $(BINDIR)\uninstgs.exe\ ++ $(GLOBJDIR)\cups\*.h\ ++ $(BEGINFILES2) ++ ++# -------------------------------- Library -------------------------------- # ++ ++# The MSys/MinGW Win32 platform ++ ++mingw32__=$(GLOBJ)gp_mswin.$(OBJ) $(GLOBJ)gp_wgetv.$(OBJ) $(GLOBJ)gp_wpapr.$(OBJ) \ ++ $(GLOBJ)gp_stdia.$(OBJ) $(GLOBJ)gp_wutf8.$(OBJ) ++mingw32_inc=$(GLD)nosync.dev $(GLD)mingw-fs.dev ++ ++$(GLGEN)mingw32_.dev: $(mingw32__) $(ECHOGS_XE) $(mingw32_inc) ++ $(SETMOD) $(GLGEN)mingw32_ $(mingw32__) ++ $(ADDMOD) $(GLGEN)mingw32_ -include $(mingw32_inc) ++ ++$(GLOBJ)gp_mswin.$(OBJ): $(GLSRC)gp_mswin.c $(AK) $(gp_mswin_h) \ ++ $(ctype__h) $(dos__h) $(malloc__h) $(memory__h) $(pipe__h) \ ++ $(stdio__h) $(string__h) $(windows__h) $(winspool_h)\ ++ $(gx_h) $(gp_h) $(gpcheck_h) $(gpmisc_h) $(gserrors_h) $(gsexit_h) ++ $(GLCC) $(GLO_)gp_mswin.$(OBJ) $(C_) $(GLSRC)gp_mswin.c ++ ++$(GLOBJ)gp_wutf8.$(OBJ): $(GLSRC)gp_wutf8.c $(windows__h) ++ $(GLCC) $(GLO_)gp_wutf8.$(OBJ) $(C_) $(GLSRC)gp_wutf8.c ++ ++$(GLOBJ)gp_wgetv.$(OBJ): $(GLSRC)gp_wgetv.c $(AK) $(gscdefs_h) ++ $(GLCC) $(GLO_)gp_wgetv.$(OBJ) $(C_) $(GLSRC)gp_wgetv.c ++ ++$(GLOBJ)gp_wpapr.$(OBJ): $(GLSRC)gp_wpapr.c $(AK) $(gp_h) ++ $(GLCC) $(GLO_)gp_wpapr.$(OBJ) $(C_) $(GLSRC)gp_wpapr.c ++ ++# Define MS-Windows handles (file system) as a separable feature. ++ ++mshandle_=$(GLOBJ)gp_mshdl.$(OBJ) ++$(GLD)mshandle.dev: $(ECHOGS_XE) $(mshandle_) ++ $(SETMOD) $(GLD)mshandle $(mshandle_) ++ $(ADDMOD) $(GLD)mshandle -iodev handle ++ ++$(GLOBJ)gp_mshdl.$(OBJ): $(GLSRC)gp_mshdl.c $(AK)\ ++ $(ctype__h) $(errno__h) $(stdio__h) $(string__h)\ ++ $(gsmemory_h) $(gstypes_h) $(gxiodev_h) $(gserrors_h) ++ $(GLCC) $(GLO_)gp_mshdl.$(OBJ) $(C_) $(GLSRC)gp_mshdl.c ++ ++# Define MS-Windows printer (file system) as a separable feature. ++ ++msprinter_=$(GLOBJ)gp_msprn.$(OBJ) ++$(GLD)msprinter.dev: $(ECHOGS_XE) $(msprinter_) ++ $(SETMOD) $(GLD)msprinter $(msprinter_) ++ $(ADDMOD) $(GLD)msprinter -iodev printer ++ ++$(GLOBJ)gp_msprn.$(OBJ): $(GLSRC)gp_msprn.c $(AK)\ ++ $(ctype__h) $(errno__h) $(stdio__h) $(string__h)\ ++ $(gsmemory_h) $(gstypes_h) $(gxiodev_h) ++ $(GLCC) $(GLO_)gp_msprn.$(OBJ) $(C_) $(GLSRC)gp_msprn.c ++ ++# Define MS-Windows polling as a separable feature ++# because it is not needed by the gslib. ++mspoll_=$(GLOBJ)gp_mspol.$(OBJ) ++$(GLD)mspoll.dev: $(ECHOGS_XE) $(mspoll_) ++ $(SETMOD) $(GLD)mspoll $(mspoll_) ++ ++$(GLOBJ)gp_mspol.$(OBJ): $(GLSRC)gp_mspol.c $(AK)\ ++ $(gx_h) $(gp_h) $(gpcheck_h) ++ $(GLCC) $(GLO_)gp_mspol.$(OBJ) $(C_) $(GLSRC)gp_mspol.c ++ ++# end of mingwlib.mak +diff --git a/base/stat_.h b/base/stat_.h +index 1111111..2222222 100644 +--- a/base/stat_.h ++++ b/base/stat_.h +@@ -43,7 +43,7 @@ + * Microsoft C uses _stat instead of stat, + * for both the function name and the structure name. + */ +-#ifdef _MSC_VER ++#if defined(_MSC_VER) || defined(__MINGW32__) + # define stat _stat + #define struct_stat struct _stat + #else +diff --git a/base/time_.h b/base/time_.h +index 1111111..2222222 100644 +--- a/base/time_.h ++++ b/base/time_.h +@@ -78,7 +78,7 @@ struct timezone { + #endif + + /* Some System V environments, and Posix environments, need <sys/times.h>. */ +-#if defined(HAVE_SYS_TIMES_H) && HAVE_SYS_TIMES_H == 1 ++#if defined(HAVE_SYS_TIMES_H) && HAVE_SYS_TIMES_H == 1 && !defined(__MINGW32__) + # include <sys/times.h> + # define use_times_for_usertime 1 + /* Posix 1003.1b-1993 section 4.8.1.5 says that +diff --git a/base/unix-aux.mak b/base/unix-aux.mak +index 1111111..2222222 100644 +--- a/base/unix-aux.mak ++++ b/base/unix-aux.mak +@@ -69,6 +69,13 @@ $(GLOBJ)gp_sysv.$(OBJ): $(GLSRC)gp_sysv.c $(stdio__h) $(time__h) $(AK)\ + $(UNIX_AUX_MAK) $(MAKEDIRS) + $(GLCC) $(GLO_)gp_sysv.$(OBJ) $(C_) $(GLSRC)gp_sysv.c + ++# the MINGW platform / build environment, joining unix for the ride ++mingw__=$(GLOBJ)gp_wgetv.$(OBJ) $(GLOBJ)gp_wpapr.$(OBJ) $(GLOBJ)gp_win32.$(OBJ) $(GLOBJ)gp_mswin.$(OBJ) $(GLOBJ)gp_ntfs.$(OBJ) $(GLOBJ)gp_stdia.$(OBJ) $(GLOBJ)gp_wutf8.$(OBJ) $(GLOBJ)gp_nxpsprn.$(OBJ) ++$(GLGEN)mingw_.dev: $(mingw__) $(GLD)nosync.dev $(GLD)smd5.dev ++ $(SETMOD) $(GLGEN)mingw_ $(mingw__) -include $(GLD)nosync ++ $(ADDMOD) $(GLGEN)mingw_ -include $(GLD)smd5 ++ ++ + # -------------------------- Auxiliary programs --------------------------- # + + $(ECHOGS_XE): $(GLSRC)echogs.c $(AK) $(stdpre_h) $(UNIX_AUX_MAK) $(MAKEDIRS) +@@ -91,18 +98,31 @@ $(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) + # To get GS to use the system zlib, you remove/hide the gs/zlib directory + # which means that the mkromfs build can't find the zlib source it needs. + # So it's split into two targets, one using the zlib source directly..... +-MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ +- $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ +- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ) ++ifeq ($(MINGW_BUILD), 1) ++ MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ ++ $(AUX)gscdefs.$(OBJ) $(AUX)gp_ntfs.$(OBJ) $(AUX)gp_mswin.$(OBJ) \ ++ $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ) ++else ++ MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ ++ $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ ++ $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ) ++endif + + $(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(UNIX_AUX_MAK) $(MAKEDIRS) + $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS) + + # .... and one using the zlib library linked via the command line +-MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \ +- $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ +- $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ +- $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) ++# (here two, MINGW has a different set of dependencies, ++# most notably gp_ntfs and gp_wutf8) ++ifeq ($(MINGW_BUILD), 1) ++ MKROMFS_OBJS_1=$(GLOBJ)gp_ntfs.$(OBJ) $(GLOBJ)gp_wutf8.$(OBJ) \ ++ $(GLOBJ)gpmisc.$(OBJ) $(GLOBJ)gp_wgetv.$(OBJ) $(GLOBJ)gscdefs.$(OBJ) ++else ++ MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \ ++ $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ ++ $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ ++ $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) ++endif + + $(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(UNIX_AUX_MAK) $(MAKEDIRS) + $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS) +diff --git a/base/unix-dll.mak b/base/unix-dll.mak +index 1111111..2222222 100644 +--- a/base/unix-dll.mak ++++ b/base/unix-dll.mak +@@ -35,17 +35,38 @@ SODEBUGDIRPREFIX=sodebug + # Shared object names + + # simple loader (no support for display device) +-GSSOC_XENAME=$(GS_SO_BASE)c$(XE) ++ifeq ($(MINGW_WITH_WINLIB_NAMES), 1) ++ GSSOC_XENAME=gswin$(MINGW_PLATFORM_BITS)c$(XE) ++else ++ GSSOC_XENAME=$(GS_SO_BASE)c$(XE) ++endif ++ + GSSOC_XE=$(BINDIR)/$(GSSOC_XENAME) + GSSOC=$(BINDIR)/$(GSSOC_XENAME) + + # loader suporting display device using Gtk+ +-GSSOX_XENAME=$(GS_SO_BASE)x$(XE) ++ifeq ($(MINGW_WITH_WINLIB_NAMES), 1) ++ GSSOX_XENAME=gswin$(MINGW_PLATFORM_BITS)$(XE) ++else ++ GSSOX_XENAME=$(GS_SO_BASE)x$(XE) ++endif ++ + GSSOX_XE=$(BINDIR)/$(GSSOX_XENAME) + GSSOX=$(BINDIR)/$(GSSOX_XENAME) + +-# shared library +-GS_SONAME_BASE=lib$(GS_SO_BASE) ++# shared library: handle unix and mingw library names ++ifeq ($(MINGW_BUILD), 1) ++ ifeq ($(MINGW_WITH_WINLIB_NAMES), 1) ++ GS_SONAME_BASE=gsdll$(MINGW_PLATFORM_BITS) ++ GS_SONAME_LINK=$(GS_SONAME_BASE) ++ else ++ GS_SONAME_BASE=lib$(GS_SO_BASE) ++ GS_SONAME_LINK=lib$(GS_SO_BASE) ++ endif ++else ++ GS_SONAME_BASE=lib$(GS_SO_BASE) ++ GS_SONAME_LINK=$(GS_SO_BASE) ++endif + + # GNU/Linux + GS_SOEXT=$(SO_LIB_EXT) +@@ -82,30 +103,30 @@ GS_SO_MAJOR_MINOR=$(BINDIR)/$(GS_SONAME_MAJOR_MINOR) + + # Create symbolic links to the Ghostscript interpreter library + +-$(GS_SO): $(GS_SO_MAJOR) $(UNIX_DLL_MAK) $(MAKEDIRS) ++$(GS_SO): $(GS_SO_MAJOR_MINOR) $(UNIX_DLL_MAK) $(MAKEDIRS) + $(RM_) $(GS_SO) +- ln -s $(GS_SONAME_MAJOR_MINOR) $(GS_SO) ++ ln -s $(GS_SONAME_MAJOR) $(GS_SO) + +-$(GS_SO_MAJOR): $(GS_SO_MAJOR_MINOR) $(UNIX_DLL_MAK) $(MAKEDIRS) +- $(RM_) $(GS_SO_MAJOR) +- ln -s $(GS_SONAME_MAJOR_MINOR) $(GS_SO_MAJOR) ++$(GS_SO_MAJOR_MINOR): $(GS_SO_MAJOR) $(UNIX_DLL_MAK) $(MAKEDIRS) ++ $(RM_) $(GS_SO_MAJOR_MINOR) ++ ln -s $(GS_SONAME_MAJOR) $(GS_SO_MAJOR_MINOR) + + so-links-subtarget: $(GS_SO) $(UNIX_DLL_MAK) $(MAKEDIRS) + $(NO_OP) + + # Build the small Ghostscript loaders, with Gtk+ and without + $(GSSOC_XE): so-links-subtarget $(PSSRC)$(SOC_LOADER) $(UNIX_DLL_MAK) $(MAKEDIRS) +- $(GLCC) -g -o $(GSSOC_XE) $(PSSRC)dxmainc.c \ +- -L$(BINDIR) -l$(GS_SO_BASE) ++ $(GLCC) -g -o $(GSSOC_XE) $(PSSRC)$(SOC_LOADER_PLAIN) \ ++ -L$(BINDIR) -l$(GS_SONAME_LINK) + + $(GSSOX_XE): so-links-subtarget $(PSSRC)$(SOC_LOADER) $(UNIX_DLL_MAK) $(MAKEDIRS) + $(GLCC) -g $(SOC_CFLAGS) -o $(GSSOX_XE) $(PSSRC)$(SOC_LOADER) \ +- -L$(BINDIR) -l$(GS_SO_BASE) $(SOC_LIBS) ++ -L$(BINDIR) -l$(GS_SONAME_LINK) $(SOC_LIBS) + + # ------------------------- Recursive make targets ------------------------- # + + SODEFS=\ +- GS_XE=$(BINDIR)/$(GS_SONAME_MAJOR_MINOR)\ ++ GS_XE=$(BINDIR)/$(GS_SONAME_MAJOR)\ + DISPLAY_DEV=$(DD)display.dev\ + STDIO_IMPLEMENTATION=c\ + BUILDDIRPREFIX=$(BUILDDIRPREFIX) +@@ -179,11 +200,17 @@ install-so-subtarget: so-subtarget + -mkdir -p $(DESTDIR)$(gsincludedir) + $(INSTALL_PROGRAM) $(GSSOC) $(DESTDIR)$(bindir)/$(GSSOC_XENAME) + $(INSTALL_PROGRAM) $(GSSOX) $(DESTDIR)$(bindir)/$(GSSOX_XENAME) +- $(INSTALL_PROGRAM) $(BINDIR)/$(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR_MINOR) +- $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME) +- ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME) +- $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR) +- ln -s $(GS_SONAME_MAJOR_MINOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR) ++ @if test "$(MINGW_BUILD)" = "1" ; then \ ++ $(INSTALL_PROGRAM) $(BINDIR)/$(GS_SONAME_MAJOR) $(DESTDIR)$(bindir)/$(GS_SONAME_MAJOR) ; \ ++ $(INSTALL_PROGRAM) $(BINDIR)/$(GS_SONAME_LINK).dll.a $(DESTDIR)$(libdir)/$(GS_SONAME_LINK).dll.a ; \ ++ else \ ++ $(INSTALL_PROGRAM) $(BINDIR)/$(GS_SONAME_MAJOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR) ; \ ++ $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME) ; \ ++ ln -s $(GS_SONAME_MAJOR) $(DESTDIR)$(libdir)/$(GS_SONAME) ; \ ++ $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR) ; \ ++ ln -s $(GS_SONAME_MAJOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR_MINOR) ; \ ++ fi ++ $(INSTALL_DATA) $(GLSRCDIR)/gserrors.h $(DESTDIR)$(gsincludedir)gserrors.h + $(INSTALL_DATA) $(PSSRC)iapi.h $(DESTDIR)$(gsincludedir)iapi.h + $(INSTALL_DATA) $(PSSRC)ierrors.h $(DESTDIR)$(gsincludedir)ierrors.h + $(INSTALL_DATA) $(GLSRC)gserrors.h $(DESTDIR)$(gsincludedir)gserrors.h +diff --git a/base/unix-gcc.mak b/base/unix-gcc.mak +index 1111111..2222222 100644 +--- a/base/unix-gcc.mak ++++ b/base/unix-gcc.mak +@@ -79,7 +79,7 @@ INSTALL_PROGRAM = $(INSTALL) -m 755 + INSTALL_DATA = $(INSTALL) -m 644 + INSTALL_SHARED = + +-prefix = /usr/local ++prefix = /usr + exec_prefix = ${prefix} + bindir = ${exec_prefix}/bin + scriptdir = $(bindir) +@@ -98,7 +98,7 @@ gsdatadir = $(gsdir)/$(GS_DOT_VERSION) + gssharedir = ${exec_prefix}/lib/ghostscript/$(GS_DOT_VERSION) + gsincludedir = ${prefix}/include/ghostscript/ + +-docdir=$(gsdatadir)/doc ++docdir=$(gsdatadir)/doc/ghostscript-$(GS_DOT_VERSION) + exdir=$(gsdatadir)/examples + GS_DOCDIR=$(docdir) + +diff --git a/base/unixhead.mak b/base/unixhead.mak +index 1111111..2222222 100644 +--- a/base/unixhead.mak ++++ b/base/unixhead.mak +@@ -22,7 +22,12 @@ + # Define the platform name. For a "stock" System V platform, + # use sysv_ instead of unix_. + +-GSPLATFORM=unix_ ++# select platform: unix or mingw ++ifeq ($(MINGW_BUILD), 1) ++ GSPLATFORM=mingw_ ++else ++ GSPLATFORM=unix_ ++endif + + # Define the syntax for command, object, and executable files. + +@@ -65,3 +70,9 @@ CONFLDTR=-ol + # Define the compilation rules and flags. + + BEGINFILES= ++ ++ifeq ($(MINGW_BUILD), 1) ++ MINGW_FONTPATH_PATCH_OR_EMPTY_COMMAND=$(SH) $(GLSRCDIR)/mingw-fp.sh $(gconfigd_h) ++else ++ MINGW_FONTPATH_PATCH_OR_EMPTY_COMMAND= ++endif +diff --git a/configure.ac b/configure.ac +index 1111111..2222222 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -187,6 +187,26 @@ case `uname` in + SET_DT_SONAME="so" + fi + ;; ++ MINGW*) ++ MINGW_BUILD=1 ++ MINGW_PLATFORM=`uname` ++ MINGW_XTLIBS="-lwinspool" ++ ++ # inner MINGW case statement: 32/64 bits ++ case $MINGW_PLATFORM in ++ MINGW32*) ++ MINGW_PLATFORM_BITS=32 ++ ;; ++ MINGW64*) ++ MINGW_PLATFORM_BITS=64 ++ ;; ++ esac ++ ++ AC_SUBST(MINGW_BUILD) ++ AC_SUBST(MINGW_PLATFORM) ++ AC_SUBST(MINGW_PLATFORM_BITS) ++ AC_SUBST(MINGW_XTLIBS) ++ ;; + esac + + AC_SUBST(SET_DT_SONAME) +@@ -1521,12 +1541,41 @@ AC_SUBST(JPXDIR) + AC_SUBST(SHARE_JPX) + AC_SUBST(JPXDEVS) + ++dnl checks for MinGW shared object name and gdi must precede the gtk checks ++dnl check whether MinGW should use the MSVC dll names ++AC_ARG_WITH([winlib-names], AC_HELP_STRING([--with-winlib-names], ++ [MSys/MinGW only: dll and executable names should be gsdll32.dll (gsdll64.dll), gswin32.exe (gswin64.exe), and gswin32c.exe (gswin64c.exe)]), ++ [], [with_winlib_names=no]) ++if test "x$with_winlib_names" = "xyes"; then ++ MINGW_WITH_WINLIB_NAMES=1 ++fi ++ ++dnl check whether MinGW should use the gdi-based (dwmain.c, dwmainc.c) front end ++AC_ARG_WITH([gdi], AC_HELP_STRING([--with-gdi], ++ [MSys/MinGW only: use the gdi-based Shared Object loaders (dwmain.c & dwmainc.c; implies --with-winlib-names=yes): not yet implemented]), ++ [], [with_gdi=no]) ++if test "x$with_gdi" = "xyes"; then ++ MINGW_WITH_WINLIB_NAMES=1 ++ MINGW_WITH_GDI=1 ++ # SOC_LOADER value will be set after the initial gtk test ++fi ++ ++AC_SUBST(MINGW_WITH_WINLIB_NAMES) ++AC_SUBST(MINGW_WITH_GDI) ++ + dnl check if we can/should build the gtk loader + AC_ARG_ENABLE([gtk], AC_HELP_STRING([--disable-gtk], + [Do not build the gtk loader])) + SOC_CFLAGS="" + SOC_LIBS="" +-SOC_LOADER="" ++SOC_LOADER="" # default may not be set before the gtk+-2.0 test ++SOC_LOADER_PLAIN="" ++ ++if test "x$with_gdi" = "xyes"; then ++ AC_MSG_WARN([the gdi front end under MSys/MinGW is not yet implemented]) ++ enable_gtk=yes # try to use gtk+ instead ++fi ++ + if test "x$enable_gtk" != "xno"; then + # Try GTK+ 3.x first... + if test "x$PKGCONFIG" != x; then +@@ -1559,9 +1608,15 @@ if test "x$SOC_LOADER" = "x"; then + SOC_LOADER="dxmainc.c" + fi + ++dnl set default SOC_LOADER_PLAIN as necessary ++if test "x$SOC_LOADER_PLAIN" = x; then ++ SOC_LOADER_PLAIN="dxmainc.c" ++fi ++ + AC_SUBST(SOC_CFLAGS) + AC_SUBST(SOC_LIBS) + AC_SUBST(SOC_LOADER) ++AC_SUBST(SOC_LOADER_PLAIN) + + dnl look for omni implementation + AC_ARG_WITH([omni], AC_HELP_STRING([--with-omni], +@@ -2103,6 +2158,12 @@ case `uname` in + DYNAMIC_LDFLAGS="-shared -Wl,-brtl,-G -fPIC" + SO_LIB_EXT=".so" + ;; ++ MINGW*) ++ DYNAMIC_CFLAGS="-fPIC" ++ DYNAMIC_LDFLAGS="-fPIC -shared" ++ DYNAMIC_LIBS="" ++ DYNANIC_LIB_EXT="dll" ++ ;; + esac + + AC_ARG_ENABLE([dynamic], AC_HELP_STRING([--enable-dynamic], +@@ -2175,6 +2236,20 @@ if test "x$datadir" = 'x${prefix}/share'; then + fi + + dnl Fix "fontpath" variable... ++if test $MINGW_BUILD = 1; then ++ # Add a reference to the Windows Fonts directory. ++ # This must take place priot to the test below, ++ # as it is also our way to avoid inclusion ++ # of the various unix font directories. ++ # Since gs uses here a colon as delimiter, ++ # we must refer to %windir% as /c/Windows ++ if test "x$fontpath" = "x"; then ++ fontpath="/c/Windows/Fonts" ++ else ++ fontpath="${fontpath}:/c/Windows/Fonts" ++ fi ++fi ++ + if test "x$fontpath" = "x"; then + # These font directories are used by various Linux distributions... + fontpath="$datadir/fonts/default/ghostscript" + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Sat, 16 Jul 2016 13:05:54 +0200 +Subject: [PATCH] import patch libspectre.patch from MINGW-packages + +Source: https://git.io/vKz18 + +diff --git a/psi/iapi.h b/psi/iapi.h +index 1111111..2222222 100644 +--- a/psi/iapi.h ++++ b/psi/iapi.h +@@ -246,6 +246,7 @@ GSDLLEXPORT int GSDLLAPI gsapi_init_with_args(void *instance, + int argc, char **argv); + + #ifdef __WIN32__ ++#include <stddef.h> + GSDLLEXPORT int GSDLLAPI gsapi_init_with_argsA(void *instance, + int argc, char **argv); + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Sat, 16 Jul 2016 13:13:22 +0200 +Subject: [PATCH] import patch ghostscript-sys-zlib.patch from MINGW-packages + +Source: https://git.io/vKz1D + +diff --git a/configure.ac b/configure.ac +index 1111111..2222222 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -912,7 +912,7 @@ AC_MSG_CHECKING([for local zlib source]) + dnl zlib is needed for language level 3, and libpng + # we must define ZLIBDIR regardless because png.mak does a -I$(ZLIBDIR) + # this seems a harmless default +-ZLIBDIR=src ++ZLIBDIR=$includedir + AUX_SHARED_ZLIB= + + if test -d $srcdir/zlib; then + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: darealshinji <djcj@gmx.de> +Date: Sat, 16 Jul 2016 13:15:57 +0200 +Subject: [PATCH] further changes for MXE + + +diff --git a/Makefile.in b/Makefile.in +index 1111111..2222222 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -110,6 +110,9 @@ docdir=$(gsdatadir)/doc + exdir=$(gsdatadir)/examples + GS_DOCDIR=$(docdir) + ++# Are we cross-compiling? ++CROSS_COMPILING=@CROSS_COMPILING@ ++ + # Choose whether to compile the .ps initialization files into the executable. + # See gs.mak for details. + +@@ -184,7 +187,7 @@ XPS=@XPS@ + GPDL=@GPDL@ + + XE=@EXEEXT@ +-XEAUX=@EXEEXT@ ++XEAUX=@EXEEXTAUX@ + + PCL_XPS_TARGETS=@PCL_TARGET@ @XPS_TARGET@ @GPDL_TARGET@ + +@@ -369,7 +372,7 @@ RANLIB=@RANLIB@ + # Define the name of the C compiler (target and host (AUX)) + + CC=@CC@ +-CCAUX=@CC@ ++CCAUX=@CCAUX@ + + # Define the name of the linker for the final link step. + # Normally this is the same as the C compiler. +@@ -379,6 +382,7 @@ CCAUXLD=$(CCAUX) + + # Define the default gcc flags. + GCFLAGS=@CPPFLAGS@ @GCFLAGS@ @CFLAGS@ ++GCFLAGS_AUX=@GCFLAGS@ + + # Define the added flags for standard, debugging, profiling + # and shared object builds. +@@ -442,7 +446,11 @@ LDFLAGS_SO=@DYNAMIC_LDFLAGS@ + # (Libraries required by individual drivers are handled automatically.) + + EXTRALIBS=$(XTRALIBS) @LIBS@ @MINGW_XTLIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@ @JPX_AUTOCONF_LIBS@ ++ifeq ($(CROSS_COMPILING),yes) ++AUXEXTRALIBS=$(XTRALIBS) -lz ++else + AUXEXTRALIBS=$(XTRALIBS) @LIBS@ @MINGW_XTLIBS@ @DYNAMIC_LIBS@ @FONTCONFIG_LIBS@ @FT_LIBS@ @JPX_AUTOCONF_LIBS@ @AUX_SHARED_ZLIB@ ++endif + + # Define the standard libraries to search at the end of linking. + # Most platforms require -lpthread for the POSIX threads library; +@@ -492,10 +500,10 @@ SYNC=@SYNC@ + RM=rm -f + + # ------ Dynamic loader options ------- # +-SOC_CFLAGS = @SOC_CFLAGS@ +-SOC_LIBS = @SOC_LIBS@ +-SOC_LOADER = @SOC_LOADER@ +-SOC_LOADER_PLAIN = @SOC_LOADER_PLAIN@ ++SOC_CFLAGS = @SOC_CFLAGS@ ++SOC_LIBS = @SOC_LIBS@ ++SOC_LOADER = @SOC_LOADER@ ++SOC_LOADER_PLAIN = @SOC_LOADER_PLAIN@ + + # on virtually every Unix-a-like system, this is "so", + # but Apple just had to be different, so it's now set +@@ -646,16 +654,15 @@ AK= + + CCFLAGS=$(GENOPT) $(CAPOPT) $(CFLAGS) + CC_=$(CC) $(CCFLAGS) +- + ifeq ($(MINGW_BUILD), 1) + # adding -lz to the compilation flags seems to be an error: +- # if not always, then at least under MSys/MinGW, ++ # if not always, then at least under MSys/MinGW, + # compiled against the system's zlib, + # and having no zlib sub-folder (see also: unixaux.mak) +- CCAUX_=$(CCAUX) $(CFLAGS) ++ CCAUX_=$(CCAUX) -I"@TARGET_INCLUDE@" $(GCFLAGS_AUX) + else + CCAUX_=$(CCAUX) $(CFLAGS) @AUX_SHARED_ZLIB@ +-endif ++endif + + CC_LEAF=$(CC_) + # note gcc can't use -fomit-frame-pointer with -pg. +diff --git a/base/gp_mswin.h b/base/gp_mswin.h +index 1111111..2222222 100644 +--- a/base/gp_mswin.h ++++ b/base/gp_mswin.h +@@ -56,7 +56,7 @@ extern int is_spool(const char *queue); + + #endif /* !defined(RC_INVOKED) */ + +-// in gp_mswin.c, mswin_popen is called ++// in gp_mswin.c, mswin_popen is called + // before it is implemented, so we must + // provide a prototype (at least with GCC) to + // avoid implicit definition with the wrong return type +diff --git a/base/gp_unix.c b/base/gp_unix.c +index 1111111..2222222 100644 +--- a/base/gp_unix.c ++++ b/base/gp_unix.c +@@ -13,6 +13,9 @@ + CA 94903, U.S.A., +1(415)492-9861, for further information. + */ + ++#if defined(__WIN32__) && !defined(METRO) ++#include "windows_.h" ++#endif + + /* Unix-specific routines for Ghostscript */ + +@@ -442,3 +445,11 @@ void gp_enumerate_fonts_free(void *enum_state) + } + #endif + } ++ ++#if defined(__WIN32__) && !defined(METRO) ++/* include gp_local_arg_encoding_get_codepoint for MinGW cross-builds */ ++#ifndef GP_LAEGC_INCLUDED ++# define GP_LAEGC_INCLUDED ++#endif ++#include "gp_win32.c" ++#endif +diff --git a/base/gp_win32.c b/base/gp_win32.c +index 1111111..2222222 100644 +--- a/base/gp_win32.c ++++ b/base/gp_win32.c +@@ -13,6 +13,7 @@ + CA 94903, U.S.A., +1(415)492-9861, for further information. + */ + ++#ifndef GP_LAEGC_INCLUDED + + /* Common platform-specific routines for MS-Windows WIN32 */ + /* originally hacked from gp_msdos.c by Russell Lang */ +@@ -131,6 +132,8 @@ const char gp_null_file_name[] = "nul"; + /* Define the name that designates the current directory. */ + const char gp_current_directory_name[] = "."; + ++#endif /* GP_LAEGC_INCLUDED */ ++ + /* A function to decode the next codepoint of the supplied args from the + * local windows codepage, or -1 for EOF. + */ +diff --git a/base/lib.mak b/base/lib.mak +index 1111111..2222222 100644 +--- a/base/lib.mak ++++ b/base/lib.mak +@@ -76,7 +76,7 @@ stdpre_h=$(GLSRC)stdpre.h $(stdpn_h) + stdint__h=$(GLSRC)stdint_.h $(std_h) + + $(GLGEN)arch.h : $(GENARCH_XE) +- $(EXP)$(GENARCH_XE) $(GLGEN)arch.h $(TARGET_ARCH_FILE) ++ test -f $@ || $(GENARCH_XE) $(GLGEN)arch.h $(TARGET_ARCH_FILE) + + # Platform interfaces + +diff --git a/base/unix-aux.mak b/base/unix-aux.mak +index 1111111..2222222 100644 +--- a/base/unix-aux.mak ++++ b/base/unix-aux.mak +@@ -69,7 +69,7 @@ $(GLOBJ)gp_sysv.$(OBJ): $(GLSRC)gp_sysv.c $(stdio__h) $(time__h) $(AK)\ + $(UNIX_AUX_MAK) $(MAKEDIRS) + $(GLCC) $(GLO_)gp_sysv.$(OBJ) $(C_) $(GLSRC)gp_sysv.c + +-# the MINGW platform / build environment, joining unix for the ride ++# the MINGW platform / build environment, joining unix for the ride + mingw__=$(GLOBJ)gp_wgetv.$(OBJ) $(GLOBJ)gp_wpapr.$(OBJ) $(GLOBJ)gp_win32.$(OBJ) $(GLOBJ)gp_mswin.$(OBJ) $(GLOBJ)gp_ntfs.$(OBJ) $(GLOBJ)gp_stdia.$(OBJ) $(GLOBJ)gp_wutf8.$(OBJ) $(GLOBJ)gp_nxpsprn.$(OBJ) + $(GLGEN)mingw_.dev: $(mingw__) $(GLD)nosync.dev $(GLD)smd5.dev + $(SETMOD) $(GLGEN)mingw_ $(mingw__) -include $(GLD)nosync +@@ -98,6 +98,11 @@ $(GENHT_XE): $(GLSRC)genht.c $(AK) $(GENHT_DEPS) $(UNIX_AUX_MAK) $(MAKEDIRS) + # To get GS to use the system zlib, you remove/hide the gs/zlib directory + # which means that the mkromfs build can't find the zlib source it needs. + # So it's split into two targets, one using the zlib source directly..... ++ifeq ($(CROSS_COMPILING),yes) ++MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ ++ $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ ++ $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ) ++else + ifeq ($(MINGW_BUILD), 1) + MKROMFS_OBJS_0=$(MKROMFS_ZLIB_OBJS) $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ + $(AUX)gscdefs.$(OBJ) $(AUX)gp_ntfs.$(OBJ) $(AUX)gp_mswin.$(OBJ) \ +@@ -107,13 +112,20 @@ else + $(AUX)gscdefs.$(OBJ) $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ + $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) $(AUX)memento.$(OBJ) + endif ++endif + + $(MKROMFS_XE)_0: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_0) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS) ++ $(CCAUX_) $(GENOPT) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_0 $(MKROMFS_OBJS_0) $(AUXEXTRALIBS) + + # .... and one using the zlib library linked via the command line + # (here two, MINGW has a different set of dependencies, + # most notably gp_ntfs and gp_wutf8) ++ifeq ($(CROSS_COMPILING),yes) ++MKROMFS_OBJS_1=$(AUX)gscdefs.$(OBJ) \ ++ $(AUX)gpmisc.$(OBJ) $(AUX)gp_getnv.$(OBJ) \ ++ $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ ++ $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) ++else + ifeq ($(MINGW_BUILD), 1) + MKROMFS_OBJS_1=$(GLOBJ)gp_ntfs.$(OBJ) $(GLOBJ)gp_wutf8.$(OBJ) \ + $(GLOBJ)gpmisc.$(OBJ) $(GLOBJ)gp_wgetv.$(OBJ) $(GLOBJ)gscdefs.$(OBJ) +@@ -123,9 +135,10 @@ else + $(AUX)gp_unix.$(OBJ) $(AUX)gp_unifs.$(OBJ) $(AUX)gp_unifn.$(OBJ) \ + $(AUX)gp_stdia.$(OBJ) $(AUX)gsutil.$(OBJ) + endif ++endif + + $(MKROMFS_XE)_1: $(GLSRC)mkromfs.c $(MKROMFS_COMMON_DEPS) $(MKROMFS_OBJS_1) $(UNIX_AUX_MAK) $(MAKEDIRS) +- $(CCAUX_) $(GENOPT) $(CFLAGS) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(I_)$(ZSRCDIR)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS) ++ $(CCAUX_) $(GENOPT) $(I_)$(GLSRCDIR)$(_I) $(I_)$(GLOBJ)$(_I) $(GLSRC)mkromfs.c $(O_)$(MKROMFS_XE)_1 $(MKROMFS_OBJS_1) $(AUXEXTRALIBS) + + $(MKROMFS_XE): $(MKROMFS_XE)_$(SHARE_ZLIB) $(UNIX_AUX_MAK) $(MAKEDIRS) + $(CP_) $(MKROMFS_XE)_$(SHARE_ZLIB) $(MKROMFS_XE) +diff --git a/base/unix-dll.mak b/base/unix-dll.mak +index 1111111..2222222 100644 +--- a/base/unix-dll.mak ++++ b/base/unix-dll.mak +@@ -54,7 +54,8 @@ endif + GSSOX_XE=$(BINDIR)/$(GSSOX_XENAME) + GSSOX=$(BINDIR)/$(GSSOX_XENAME) + +-# shared library: handle unix and mingw library names ++# shared library ++# handle unix and mingw library names + ifeq ($(MINGW_BUILD), 1) + ifeq ($(MINGW_WITH_WINLIB_NAMES), 1) + GS_SONAME_BASE=gsdll$(MINGW_PLATFORM_BITS) +@@ -210,7 +211,6 @@ install-so-subtarget: so-subtarget + $(RM_) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR) ; \ + ln -s $(GS_SONAME_MAJOR) $(DESTDIR)$(libdir)/$(GS_SONAME_MAJOR_MINOR) ; \ + fi +- $(INSTALL_DATA) $(GLSRCDIR)/gserrors.h $(DESTDIR)$(gsincludedir)gserrors.h + $(INSTALL_DATA) $(PSSRC)iapi.h $(DESTDIR)$(gsincludedir)iapi.h + $(INSTALL_DATA) $(PSSRC)ierrors.h $(DESTDIR)$(gsincludedir)ierrors.h + $(INSTALL_DATA) $(GLSRC)gserrors.h $(DESTDIR)$(gsincludedir)gserrors.h +diff --git a/base/unixhead.mak b/base/unixhead.mak +index 1111111..2222222 100644 +--- a/base/unixhead.mak ++++ b/base/unixhead.mak +@@ -25,7 +25,7 @@ + # select platform: unix or mingw + ifeq ($(MINGW_BUILD), 1) + GSPLATFORM=mingw_ +-else ++else + GSPLATFORM=unix_ + endif + +diff --git a/configure.ac b/configure.ac +index 1111111..2222222 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -24,6 +24,9 @@ AC_PREREQ(2.63) + AC_LANG(C) + AC_CONFIG_SRCDIR(psi/gs.c) + ++AC_CANONICAL_HOST ++AC_CANONICAL_BUILD ++ + dnl Inherit compiler flags from the environment... + CFLAGS="${CFLAGS:=}" + CPPFLAGS="${CPPFLAGS:=}" +@@ -106,7 +109,7 @@ AC_PROG_RANLIB + #AC_PROG_INSTALL + + dnl pkg-config is used for several tests now... +-AC_PATH_PROG(PKGCONFIG, pkg-config) ++AC_PATH_TARGET_TOOL(PKGCONFIG, pkg-config) + + dnl -------------------------------------------------- + dnl Allow excluding the contributed drivers +@@ -117,8 +120,8 @@ AC_ARG_ENABLE([contrib], AC_HELP_STRING([--disable-contrib], + CONTRIBINCLUDE="include $srcdir/contrib/contrib.mak" + INSTALL_CONTRIB="install-contrib-extras" + +-case `uname` in +- MINGW*|MSYS*) ++case $host in ++ *-mingw*) + AC_MSG_WARN([disabling contrib devices]) + enable_contrib=no + ;; +@@ -146,28 +149,23 @@ dnl -------------------------------------------------- + + CC_OPT_FLAGS_TO_TRY="-O" + SET_DT_SONAME="-soname=" ++MINGW_BUILD=0 + +-case `uname` in +- Linux*|GNU*) ++case $host in ++ *-linux*|*-gnu*|*bsd*) + if test $ac_cv_prog_gcc = yes; then + CC_OPT_FLAGS_TO_TRY="-O2" + CC_DBG_FLAGS_TO_TRY="-gdwarf-2 -g3 -O0" + fi + ;; +- *BSD) +- if test $ac_cv_prog_gcc = yes; then +- CC_OPT_FLAGS_TO_TRY="-O2" +- CC_DBG_FLAGS_TO_TRY="-gdwarf-2 -g3 -O0" +- fi +- ;; +- Darwin*) ++ *-darwin*) + if test $ac_cv_prog_gcc = yes; then + CC_OPT_FLAGS_TO_TRY="-O2" + CC_DBG_FLAGS_TO_TRY="-gdwarf-2 -g3 -O0" + fi + SET_DT_SONAME="" + ;; +- SunOS) ++ *-sunos*|*-solaris*) + CC_OPT_FLAGS_TO_TRY="-O2" + # the trailing space is required! + if test $ac_cv_prog_gcc = no; then +@@ -180,33 +178,32 @@ case `uname` in + CC_DBG_FLAGS_TO_TRY="-g -O0" + fi + ;; +- AIX) ++ *-aix*) + if test $ac_cv_prog_gcc = yes; then + CC_OPT_FLAGS_TO_TRY="-O2" + CC_DBG_FLAGS_TO_TRY="-gdwarf-2 -g3 -O0" + SET_DT_SONAME="so" + fi + ;; +- MINGW*) +- MINGW_BUILD=1 +- MINGW_PLATFORM=`uname` +- MINGW_XTLIBS="-lwinspool" +- +- # inner MINGW case statement: 32/64 bits +- case $MINGW_PLATFORM in +- MINGW32*) +- MINGW_PLATFORM_BITS=32 +- ;; +- MINGW64*) +- MINGW_PLATFORM_BITS=64 +- ;; +- esac +- +- AC_SUBST(MINGW_BUILD) +- AC_SUBST(MINGW_PLATFORM) +- AC_SUBST(MINGW_PLATFORM_BITS) +- AC_SUBST(MINGW_XTLIBS) +- ;; ++ *-mingw*) ++ MINGW_BUILD=1 ++ MINGW_XTLIBS="-lwinspool" ++ # inner MINGW case statement: 32/64 bits ++ case $host in ++ i?86-*) ++ MINGW_PLATFORM=MINGW32 ++ MINGW_PLATFORM_BITS=32 ++ ;; ++ x86_64-*) ++ MINGW_PLATFORM=MINGW64 ++ MINGW_PLATFORM_BITS=64 ++ ;; ++ esac ++ AC_SUBST(MINGW_BUILD) ++ AC_SUBST(MINGW_PLATFORM) ++ AC_SUBST(MINGW_PLATFORM_BITS) ++ AC_SUBST(MINGW_XTLIBS) ++ ;; + esac + + AC_SUBST(SET_DT_SONAME) +@@ -227,10 +224,16 @@ fi + + ARCH_CONF_HEADER= + +-case `uname` in +- Darwin*) ++case $host in ++ *-darwin*) + ARCH_CONF_HEADER="\$(GLSRCDIR)/../arch/osx-x86-x86_64-ppc-gcc.h" + ;; ++ i?86-*-mingw*) ++ ARCH_CONF_HEADER="\$(GLSRCDIR)/../arch/windows-x86-msvc.h" ++ ;; ++ x86_64-*-mingw*) ++ ARCH_CONF_HEADER="\$(GLSRCDIR)/../arch/windows-x64-msvc.h" ++ ;; + *) + ARCH_CONF_HEADER= + ;; +@@ -342,8 +345,8 @@ dnl -------------------------------------------------- + + OBJDIR_BSDMAKE_WORKAROUND=obj + +-case `uname` in +- *BSD) ++case $host in ++ *bsd*) + OBJDIR_BSDMAKEWORKAOROUND="notobj" + ;; + esac +@@ -513,8 +516,8 @@ AC_ARG_ENABLE([threading], AC_HELP_STRING([--disable-threading], + # if you haven't got pread/pwrite, we can't use multithreading + if test "x$HAVE_PREAD_PWRITE" != "x"; then + if test "$enable_threading" != "no"; then +- case `uname` in +- MINGW*|MSYS*) ++ case $host in ++ *-mingw*) + AC_MSG_WARN([disabling support for pthreads......]) + ;; + *) +@@ -1251,8 +1254,8 @@ dnl look for IJS implementation + AC_ARG_WITH([ijs], AC_HELP_STRING([--without-ijs], + [disable IJS driver support])) + +-case `uname` in +- MINGW*|MSYS*) ++case $host in ++ *-mingw*) + AC_MSG_WARN([disabling the ijs device]) + with_ijs=no + ;; +@@ -1311,11 +1314,11 @@ if test x$with_luratech != xno; then + SHARE_JBIG2=0 + JBIG2DIR=$srcdir/luratech/ldf_jb2 + +- case `uname` in +- Darwin*) ++ case $host in ++ *-darwin*) + JBIG2_AUTOCONF_CFLAGS="-DUSE_LDF_JB2 -DMAC -DMAC_OS_X_BUILD" + ;; +- AIX) ++ *-aix*) + if test $ac_cv_prog_gcc = yes; then + JBIG2_AUTOCONF_CFLAGS="-DUSE_LDF_JB2 -fsigned-char -DLINUX" + else +@@ -1433,11 +1436,11 @@ if test x$with_luratech != xno; then + SHARE_JPX=0 + JPXDIR=$srcdir/luratech/lwf_jp2 + +- case `uname` in +- Darwin*) ++ case $host in ++ *-darwin*) + JPX_AUTOCONF_CFLAGS="-DUSE_LWF_JP2 -DMAC -DMAC_OS_X_BUILD" + ;; +- AIX) ++ *-aix*) + if test $ac_cv_prog_gcc = yes; then + JPX_AUTOCONF_CFLAGS="-DUSE_LWF_JP2 -fsigned-char -DLINUX" + else +@@ -1568,7 +1571,7 @@ AC_ARG_ENABLE([gtk], AC_HELP_STRING([--disable-gtk], + [Do not build the gtk loader])) + SOC_CFLAGS="" + SOC_LIBS="" +-SOC_LOADER="" # default may not be set before the gtk+-2.0 test ++SOC_LOADER="" + SOC_LOADER_PLAIN="" + + if test "x$with_gdi" = "xyes"; then +@@ -2111,8 +2114,8 @@ SO_LIB_EXT=".so" + DLL_EXT="" + SO_LIB_VERSION_SEPARATOR="." + +-case `uname` in +- Linux*|GNU*) ++case $host in ++ *-linux*|*-gnu*|*bsd*) + DYNAMIC_CFLAGS="-fPIC" + DYNAMIC_LDFLAGS="-shared -Wl,\$(LD_SET_DT_SONAME)\$(LDFLAGS_SO_PREFIX)\$(GS_SONAME_MAJOR)" + if test $ac_cv_prog_gcc = yes; then +@@ -2123,25 +2126,20 @@ case `uname` in + fi + SO_LIB_EXT=".so" + ;; +- MINGW*|MSYS*) +- DYNAMIC_CFLAGS="" ++ *-mingw*) ++ DYNAMIC_LIBS="" ++ DYNAMIC_CFLAGS="-DGSDLLEXPORT=\"__declspec(dllexport)\"" + DYNAMIC_LDFLAGS="-shared -Wl,--out-implib=\$(BINDIR)/lib\$(GS_SO_BASE).dll.a -Wl,--export-all-symbols -Wl,--enable-auto-import" + SO_LIB_EXT="" + DLL_EXT=".dll" + SO_LIB_VERSION_SEPARATOR="-" + ;; +- *BSD) +- DYNAMIC_CFLAGS="-fPIC" +- DYNAMIC_LDFLAGS="-shared -Wl,\$(LD_SET_DT_SONAME)\$(LDFLAGS_SO_PREFIX)\$(GS_SONAME_MAJOR)" +- DYNAMIC_LIBS="" +- SO_LIB_EXT=".so" +- ;; +- Darwin*) ++ *-darwin*) + DYNAMIC_LDFLAGS="-dynamiclib -install_name \$(GS_SONAME_MAJOR_MINOR)" + DYNAMIC_LIBS="" + SO_LIB_EXT=".dylib" + ;; +- SunOS) ++ *-sunos*|*-solaris*) + if test $ac_cv_prog_gcc = yes; then + DYNAMIC_CFLAGS="-fPIC" + else +@@ -2152,26 +2150,20 @@ case `uname` in + DYNAMIC_LIBS="" + SO_LIB_EXT=".so" + ;; +- AIX) ++ *-aix*) + DYNAMIC_CFLAGS="-fPIC" + GCFLAGS="-Wl,-brtl $GCFLAGS" + DYNAMIC_LDFLAGS="-shared -Wl,-brtl,-G -fPIC" + SO_LIB_EXT=".so" + ;; +- MINGW*) +- DYNAMIC_CFLAGS="-fPIC" +- DYNAMIC_LDFLAGS="-fPIC -shared" +- DYNAMIC_LIBS="" +- DYNANIC_LIB_EXT="dll" +- ;; + esac + + AC_ARG_ENABLE([dynamic], AC_HELP_STRING([--enable-dynamic], + [Enable dynamically loaded drivers]), + [ + if test "x$enable_dynamic" != xno; then +- case `uname` in +- Linux*|GNU*) ++ case $host in ++ *-linux*) + INSTALL_SHARED="install-shared" + if test "x$X_DEVS" != x; then + DYNAMIC_DEVS="\$(GLOBJDIR)/X11.so" +@@ -2183,21 +2175,21 @@ AC_ARG_ENABLE([dynamic], AC_HELP_STRING([--enable-dynamic], + OPT_CFLAGS="$DYNAMIC_CFLAGS $OPT_CFLAGS" + DBG_CFLAGS="$DYNAMIC_CFLAGS $DBG_CFLAGS" + ;; +- *BSD) ++ *bsd*) + DYNAMIC_DEVS="\$(GLOBJDIR)/X11.so" + DYNAMIC_FLAGS="-DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\\\"\$(gssharedir)\\\"" + X11_DEVS="" + OPT_CFLAGS="$DYNAMIC_CFLAGS $OPT_CFLAGS" + DBG_CFLAGS="$DYNAMIC_CFLAGS $DBG_CFLAGS" + ;; +- Darwin*) ++ *darwin*) + INSTALL_SHARED="install-shared" + DYNAMIC_FLAGS="-DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\\\"\$(gssharedir)\\\"" + X11_DEVS="" + OPT_CFLAGS="$DYNAMIC_CFLAGS $OPT_CFLAGS" + DBG_CFLAGS="$DYNAMIC_CFLAGS $DBG_CFLAGS" + ;; +- SunOS) ++ *-sunos*|*-solaris*) + DYNAMIC_DEVS="\$(GLOBJDIR)/X11.so" + DYNAMIC_FLAGS="-DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\\\"\$(gssharedir)\\\"" + OPT_CFLAGS="$DYNAMIC_CFLAGS $OPT_CFLAGS" +@@ -2316,8 +2308,8 @@ dnl -------------------------------------------------- + dnl disable the memory header ID code on SPARC + dnl -------------------------------------------------- + +-case `uname -a` in +- *sparc*) ++case $host in ++ sparc*) + GCFLAGS="$GCFLAGS -DGS_USE_MEMORY_HEADER_ID=0" + ;; + esac +@@ -2513,8 +2505,8 @@ AC_SUBST(SUB_MAKE_OPTION) + # mingw, add the same prefix as the VS build uses + # -------------------------------------------------- + AUXDIRPOSTFIX="" +-case `uname` in +- MINGW*|MSYS*) ++case $host in ++ *-mingw*) + AUXDIRPOSTFIX="_" + CFLAGS="-DGS_NO_UTF8=1 $CFLAGS" + ;; +@@ -2533,8 +2525,8 @@ AC_ARG_WITH([exe-ext], AC_HELP_STRING([--with-exe-ext=EXT], + if test "x"$with_exe_ext != "x"; then + EXEEXT="$with_exe_ext" + else +- case `uname` in +- MINGW*|MSYS*) ++ case $host in ++ *-mingw*) + EXEEXT=".exe" + ;; + esac +@@ -2543,6 +2535,36 @@ fi + AC_SUBST(EXEEXT) + + dnl -------------------------------------------------- ++dnl AUX and cross compiling ++dnl -------------------------------------------------- ++EXEEXTAUX="$EXEEXT" ++CROSS_COMPILING=no ++ ++AC_ARG_VAR(CCAUX, [auxilliary C compiler]) ++ ++if test "$cross_compiling" = yes ; then ++ CROSS_COMPILING=yes ++ case $build in ++ *-mingw*) ++ EXEEXTAUX=".exe" ++ ;; ++ *) ++ EXEEXTAUX="" ++ ;; ++ esac ++ if test "x$CCAUX" = "x" ; then ++ CCAUX="gcc" ++ fi ++else ++ if test "x$CCAUX" = "x" ; then ++ CCAUX="\$(CC)" ++ fi ++fi ++ ++AC_SUBST(EXEEXTAUX) ++AC_SUBST(CROSS_COMPILING) ++ ++dnl -------------------------------------------------- + dnl Do substitutions + dnl -------------------------------------------------- + SRCDIR="$srcdir" +diff --git a/ijs/ijs_exec_unix.c b/ijs/ijs_exec_unix.c +index 1111111..2222222 100644 +--- a/ijs/ijs_exec_unix.c ++++ b/ijs/ijs_exec_unix.c +@@ -22,6 +22,12 @@ + * SOFTWARE. + **/ + ++#ifdef __WIN32__ ++ ++#include "ijs_exec_win.c" ++ ++#else ++ + #include "unistd_.h" + #include <stdio.h> + #include <stdlib.h> +@@ -101,3 +107,5 @@ ijs_exec_server(const char *server_cmd, int *pfd_to, int *pfd_from, + + return 0; + } ++ ++#endif /* __WIN32__ */ +diff --git a/psi/iapi.h b/psi/iapi.h +index 1111111..2222222 100644 +--- a/psi/iapi.h ++++ b/psi/iapi.h +@@ -68,6 +68,11 @@ extern "C" { + # define GSDLLEXPORT + # endif + # endif ++# ifdef __MINGW32__ ++/* export stdcall functions as "name" instead of "_name@ordinal" */ ++# undef GSDLLAPI ++# define GSDLLAPI ++# endif + # ifndef GSDLLAPI + # define GSDLLAPI __stdcall + # endif + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Tue, 19 Jul 2016 23:58:16 +0300 +Subject: [PATCH] fix noncontribmakefiles if srcdir!=dstdir + +See https://github.com/mxe/mxe/pull/1382#issuecomment-233653542 + +diff --git a/configure.ac b/configure.ac +index 1111111..2222222 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2054,7 +2054,7 @@ if test x$enable_threadsafe = xyes; then + NTS_EXCLUDES=`echo "$NTS_EXCLUDES" | tr " " "\n" | sort | uniq | tr "\n" " "` + fi # x$enable_threadsafe = xyes + +-noncontribmakefiles=`find $srcdir -name '*.mak' -print | grep -v '^\./contrib/'` ++noncontribmakefiles=`find $srcdir -name '*.mak' -print | grep -v '/contrib/'` + + # No need to include opvp/oprp driver without iconv/libiconv. + if test -n "$P_DEVS0"; then diff --git a/src/ghostscript-test.c b/src/ghostscript-test.c new file mode 100644 index 00000000..92dad400 --- /dev/null +++ b/src/ghostscript-test.c @@ -0,0 +1,45 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#ifdef _WIN32 + +#include <windows.h> + +#ifndef _Windows +# define _Windows +#endif + +#ifndef GSDLLEXPORT +# ifdef GS_STATIC_LIB +# define GSDLLEXPORT +# else +# define GSDLLEXPORT __declspec(dllimport) +# endif +#endif + +#endif /* _WIN32 */ + +#include <iapi.h> + +void *minst; + +int main(int argc, char *argv[]) +{ + int code; + + (void)argc; + (void)argv; + + code = gsapi_new_instance(&minst, 0); + if (code < 0) + return 1; + + code = gsapi_exit(minst); + if (code < 0) + return 1; + + gsapi_delete_instance(minst); + + return 0; +} diff --git a/src/ghostscript.mk b/src/ghostscript.mk new file mode 100644 index 00000000..57dfee7a --- /dev/null +++ b/src/ghostscript.mk @@ -0,0 +1,76 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := ghostscript +$(PKG)_WEBSITE := https://www.ghostscript.com/ +$(PKG)_IGNORE := +$(PKG)_VERSION := 9.19 +$(PKG)_NODOTVER := $(subst .,,$($(PKG)_VERSION)) +$(PKG)_CHECKSUM := f67acdcfcde1f86757ff3553cd719f12eac2d7681a0e96d8bdd1f40a0f47b45b +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 +$(PKG)_URL := https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs$($(PKG)_NODOTVER)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc dbus fontconfig freetype lcms libiconv libidn libjpeg-turbo libpaper libpng openjpeg tiff zlib + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://ghostscript.com/Releases.html' | \ + $(SED) -n 's:.*GPL_Ghostscript_::p' | \ + $(SED) -n 's:\.html.*::p' +endef + +define $(PKG)_BUILD + cd '$(SOURCE_DIR)' && rm -rf freetype jpeg lcms2 libpng openjpeg tiff zlib + cd '$(SOURCE_DIR)' && $(LIBTOOLIZE) --force --copy --install + cd '$(SOURCE_DIR)' && autoconf -f -i + cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \ + $(MXE_CONFIGURE_OPTS) \ + --disable-contrib \ + --enable-threading \ + --enable-fontconfig \ + --enable-dbus \ + --enable-freetype \ + --disable-cups \ + --enable-openjpeg \ + --disable-gtk \ + --with-libiconv=gnu \ + --with-libidn \ + --with-libpaper \ + --with-system-libtiff \ + --with-ijs \ + --with-luratech \ + --with-jbig2dec \ + --with-omni \ + --without-x \ + --with-drivers=ALL \ + --with-memory-alignment=$(if $(filter x86_64-%,$(TARGET)),8,4) + $(MAKE) -C '$(BUILD_DIR)' -j 1 $(if $(BUILD_STATIC),gs.a,so) + + $(INSTALL) -d '$(PREFIX)/$(TARGET)/include/ghostscript' + $(INSTALL) '$(SOURCE_DIR)/devices/gdevdsp.h' '$(PREFIX)/$(TARGET)/include/ghostscript/gdevdsp.h' + $(INSTALL) '$(SOURCE_DIR)/base/gserrors.h' '$(PREFIX)/$(TARGET)/include/ghostscript/gserrors.h' + $(INSTALL) '$(SOURCE_DIR)/psi/iapi.h' '$(PREFIX)/$(TARGET)/include/ghostscript/iapi.h' + $(INSTALL) '$(SOURCE_DIR)/psi/ierrors.h' '$(PREFIX)/$(TARGET)/include/ghostscript/ierrors.h' + + $(INSTALL) -d '$(PREFIX)/$(TARGET)/bin' + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' + $(if $(BUILD_STATIC),\ + $(INSTALL) '$(BUILD_DIR)/gs.a' '$(PREFIX)/$(TARGET)/lib/libgs.a',\ + $(INSTALL) '$(BUILD_DIR)/sobin/libgs-9.dll' '$(PREFIX)/$(TARGET)/bin/libgs-9.dll' && \ + $(INSTALL) '$(BUILD_DIR)/sobin/libgs.dll.a' '$(PREFIX)/$(TARGET)/lib/libgs.dll.a') + + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' + (echo 'Name: ghostscript'; \ + echo 'Version: $($(PKG)_VERSION)'; \ + echo 'Description: Ghostscript library'; \ + echo 'Cflags: -I"$(PREFIX)/$(TARGET)/include/ghostscript"'; \ + echo 'Cflags.private: -DGS_STATIC_LIB'; \ + echo 'Libs: -L"$(PREFIX)/$(TARGET)/lib" -lgs'; \ + echo 'Requires: libidn libtiff-4 libpng jpeg lcms2 zlib'; \ + echo '# https://github.com/mxe/mxe/issues/1446'; \ + echo 'Libs.private: -lm -liconv -lpaper -lopenjp2 -lwinspool';) \ + > '$(PREFIX)/$(TARGET)/lib/pkgconfig/ghostscript.pc' + + '$(TARGET)-gcc' \ + -W -Wall -Werror -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-ghostscript.exe' \ + `$(TARGET)-pkg-config --cflags --libs ghostscript` +endef diff --git a/src/giflib.mk b/src/giflib.mk index bc0e5187..bfb911cc 100644 --- a/src/giflib.mk +++ b/src/giflib.mk @@ -1,17 +1,17 @@ -# 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 := giflib +$(PKG)_WEBSITE := https://sourceforge.net/projects/libungif/ $(PKG)_IGNORE := -$(PKG)_VERSION := 5.0.5 -$(PKG)_CHECKSUM := 606d8a366b1c625ab60d62faeca807a799a2b9e88cbdf2a02bfcdf4429bf8609 +$(PKG)_VERSION := 5.1.4 +$(PKG)_CHECKSUM := df27ec3ff24671f80b29e6ab1c4971059c14ac3db95406884fc26574631ba8d5 $(PKG)_SUBDIR := giflib-$($(PKG)_VERSION) $(PKG)_FILE := giflib-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/giflib/giflib-5.x/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/giflib/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/giflib/files/giflib-5.x/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/giflib/files/' | \ grep '<a href.*giflib.*bz2/download' | \ $(SED) -n 's,.*giflib-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 @@ -23,4 +23,4 @@ define $(PKG)_BUILD CPPFLAGS='-D_OPEN_BINARY' echo 'all:' > '$(1)/doc/Makefile' $(MAKE) -C '$(1)/lib' -j '$(JOBS)' install -endef \ No newline at end of file +endef diff --git a/src/glew-test.c b/src/glew-test.c index f0492532..8cb6a41d 100644 --- a/src/glew-test.c +++ b/src/glew-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdio.h> diff --git a/src/glew.mk b/src/glew.mk index 1a9ec5ff..beb86fab 100644 --- a/src/glew.mk +++ b/src/glew.mk @@ -1,17 +1,18 @@ -# 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 := glew +$(PKG)_WEBSITE := https://glew.sourceforge.io/ +$(PKG)_DESCR := GLEW $(PKG)_IGNORE := $(PKG)_VERSION := 1.12.0 $(PKG)_CHECKSUM := af58103f4824b443e7fa4ed3af593b8edac6f3a7be3b30911edbc7344f48e4bf $(PKG)_SUBDIR := glew-$($(PKG)_VERSION) $(PKG)_FILE := glew-$($(PKG)_VERSION).tgz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/glew/glew/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/glew/glew/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/glew/files/glew/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/glew/files/glew/' | \ $(SED) -n 's,.*/\([0-9][^A-Za-z"]*\)/".*,\1,p' | \ head -1 endef @@ -60,11 +61,11 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ `'$(TARGET)-pkg-config' glew --cflags` \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-glew.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-glew.exe' \ `'$(TARGET)-pkg-config' glew --libs` '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ `'$(TARGET)-pkg-config' glewmx --cflags` \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-glewmx.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-glewmx.exe' \ `'$(TARGET)-pkg-config' glewmx --libs` endef diff --git a/src/glfw2-test.c b/src/glfw2-test.c index b7c473e7..9e633a9a 100644 --- a/src/glfw2-test.c +++ b/src/glfw2-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdlib.h> diff --git a/src/glfw2.mk b/src/glfw2.mk index 4a513323..7f9ee484 100644 --- a/src/glfw2.mk +++ b/src/glfw2.mk @@ -1,17 +1,18 @@ -# 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 := glfw2 +$(PKG)_WEBSITE := http://www.glfw.org/ +$(PKG)_DESCR := GLFW 2.x $(PKG)_IGNORE := $(PKG)_VERSION := 2.7.9 $(PKG)_CHECKSUM := b7276dcadc85a07077834d1043f11ffd6a3a379647bb94361b4abc3ffca75e7d $(PKG)_SUBDIR := glfw-$($(PKG)_VERSION) $(PKG)_FILE := glfw-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/glfw/glfw/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/glfw/glfw/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/glfw/files/glfw/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/glfw/files/glfw/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ grep '^2\.' | \ $(SORT) -V | \ @@ -43,7 +44,7 @@ define $(PKG)_BUILD #Test '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-glfw2.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-glfw2.exe' \ `'$(TARGET)-pkg-config' libglfw --cflags --libs` endef diff --git a/src/glfw3-test.c b/src/glfw3-test.c index 51f69328..9c1004ab 100644 --- a/src/glfw3-test.c +++ b/src/glfw3-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <GLFW/glfw3.h> diff --git a/src/glfw3.mk b/src/glfw3.mk index 04025d14..f19c5419 100644 --- a/src/glfw3.mk +++ b/src/glfw3.mk @@ -1,34 +1,24 @@ -# 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 := glfw3 +$(PKG)_WEBSITE := http://www.glfw.org/ +$(PKG)_DESCR := GLFW 3.x $(PKG)_IGNORE := -$(PKG)_VERSION := 3.1 -$(PKG)_CHECKSUM := 4948d5091d71a2249dc6d7e3effab2066089334844cea5cef0489b4a575b0bce -$(PKG)_SUBDIR := glfw-$($(PKG)_VERSION) -$(PKG)_FILE := glfw-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/glfw/glfw/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_VERSION := 3.1.2 +$(PKG)_CHECKSUM := 6ac642087682aaf7f8397761a41a99042b2c656498217a1c63ba9706d1eef122 +$(PKG)_GH_CONF := glfw/glfw $(PKG)_DEPS := gcc -define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/glfw/files/glfw/' | \ - $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ - grep '^3\.' | \ - $(SORT) -V | \ - tail -1 -endef - define $(PKG)_BUILD - mkdir '$(1).build' - cd '$(1).build' && cmake '$(1)' \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -DBUILD_SHARED_LIBS=$(if $(BUILD_STATIC),FALSE,TRUE) \ + cd '$(BUILD_DIR)' && $(TARGET)-cmake \ -DGLFW_BUILD_EXAMPLES=FALSE \ -DGLFW_BUILD_TESTS=FALSE \ -DGLFW_BUILD_DOCS=FALSE \ -DGLFW_INSTALL_PKG_CONFIG=TRUE \ - -DGLFW_PKG_LIBS='-lopengl32 -lgdi32' - $(MAKE) -C '$(1).build' -j '$(JOBS)' install + -DGLFW_PKG_LIBS='-lopengl32 -lgdi32' \ + '$(SOURCE_DIR)' + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install # Windows convention: DLLs in bin/, not in lib/, import library is called "libglfw3.dll.a" $(if $(BUILD_SHARED), @@ -37,7 +27,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-glfw3.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-glfw3.exe' \ `'$(TARGET)-pkg-config' glfw3 --cflags --libs` endef - diff --git a/src/glib-1-fixes.patch b/src/glib-1-fixes.patch index 0e54d86a..57cb0ac9 100644 --- a/src/glib-1-fixes.patch +++ b/src/glib-1-fixes.patch @@ -1,16 +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. Contains ad hoc patches for cross building. -From 544cc902caf39c937bbac7c9f7b07f5fcb869d81 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Mark Brand <mabrand@mabrand.nl> Date: Thu, 23 Sep 2010 21:42:46 +0200 -Subject: [PATCH 1/6] fix tool paths +Subject: [PATCH] fix tool paths diff --git a/glib-2.0.pc.in b/glib-2.0.pc.in -index 275fc01..ac09887 100644 +index 1111111..2222222 100644 --- a/glib-2.0.pc.in +++ b/glib-2.0.pc.in @@ -3,9 +3,9 @@ exec_prefix=@exec_prefix@ @@ -26,21 +25,21 @@ index 275fc01..ac09887 100644 Name: GLib Description: C Utility Library --- -2.3.2 (Apple Git-55) - -From 10e38774090ee198d7f70e80f7dd29ef18dcd9d9 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Hans Petter Jansson <hpj@cl.no> Date: Fri, 15 Jun 2012 15:25:01 +0200 -Subject: [PATCH 2/6] Avoid DllMain symbol conflict when linking statically +Subject: [PATCH] Avoid DllMain symbol conflict when linking statically +Adjusted by Boris Nagaev on 29-Jan-2017 to fix +https://gist.github.com/starius/f4fc85939352cb50122ba29e0f5b140d +when updating to glib-2.50.2. diff --git a/gio/giomodule.c b/gio/giomodule.c -index 510f652..f66ca9b 100644 +index 1111111..2222222 100644 --- a/gio/giomodule.c +++ b/gio/giomodule.c -@@ -904,14 +904,12 @@ extern GType g_gtk_notification_backend_get_type (void); +@@ -928,14 +928,12 @@ extern GType g_cocoa_notification_backend_get_type (void); static HMODULE gio_dll = NULL; @@ -57,7 +56,7 @@ index 510f652..f66ca9b 100644 DWORD fdwReason, LPVOID lpvReserved) { -@@ -921,8 +919,6 @@ DllMain (HINSTANCE hinstDLL, +@@ -945,8 +943,6 @@ DllMain (HINSTANCE hinstDLL, return TRUE; } @@ -67,10 +66,10 @@ index 510f652..f66ca9b 100644 _g_io_win32_get_module (void) { diff --git a/glib/glib-init.c b/glib/glib-init.c -index 24efe9d..6fb9e25 100644 +index 1111111..2222222 100644 --- a/glib/glib-init.c +++ b/glib/glib-init.c -@@ -237,14 +237,14 @@ glib_init (void) +@@ -245,14 +245,14 @@ glib_init (void) #if defined (G_OS_WIN32) @@ -87,21 +86,31 @@ index 24efe9d..6fb9e25 100644 DWORD fdwReason, LPVOID lpvReserved) { --- -2.3.2 (Apple Git-55) +diff --git a/gobject/gtype.c b/gobject/gtype.c +index 1111111..2222222 100644 +--- a/gobject/gtype.c ++++ b/gobject/gtype.c +@@ -4450,7 +4450,7 @@ gobject_init (void) + _g_signal_init (); + } + +-#if defined (G_OS_WIN32) ++#if 0 + + BOOL WINAPI DllMain (HINSTANCE hinstDLL, + DWORD fdwReason, - -From ca4e5a60cc9176279bd27a44c679e18666fac5e6 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Hans Petter Jansson <hpj@cl.no> Date: Fri, 15 Jun 2012 15:27:22 +0200 -Subject: [PATCH 3/6] Allow building without inotify support +Subject: [PATCH] Allow building without inotify support diff --git a/configure.ac b/configure.ac -index 4a904a4..427d9e2 100644 +index 1111111..2222222 100644 --- a/configure.ac +++ b/configure.ac -@@ -1669,10 +1669,16 @@ dnl ***************************** +@@ -1599,10 +1599,16 @@ dnl ***************************** dnl ** Check for inotify (GIO) ** dnl ***************************** inotify_support=no @@ -118,22 +127,19 @@ index 4a904a4..427d9e2 100644 AM_CONDITIONAL(HAVE_INOTIFY, [test "$inotify_support" = "yes"]) --- -2.3.2 (Apple Git-55) - -From 024bc122e81e418096281400b4b5340a7949eca1 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Hans Petter Jansson <hpj@cl.no> Date: Fri, 15 Jun 2012 15:28:14 +0200 -Subject: [PATCH 4/6] Make sure STDC_HEADERS is set for AC_CHECK_ALIGNOF. +Subject: [PATCH] Make sure STDC_HEADERS is set for AC_CHECK_ALIGNOF. Backported from upstream diff --git a/configure.ac b/configure.ac -index 427d9e2..afb6232 100644 +index 1111111..2222222 100644 --- a/configure.ac +++ b/configure.ac -@@ -499,6 +499,8 @@ LT_INIT([disable-static win32-dll]) +@@ -511,6 +511,8 @@ LT_INIT([disable-static win32-dll]) dnl when using libtool 2.x create libtool early, because it's used in configure m4_ifdef([LT_OUTPUT], [LT_OUTPUT]) @@ -142,18 +148,15 @@ index 427d9e2..afb6232 100644 AS_IF([test "$glib_native_win32" = "yes"], [ if test x$enable_static = xyes -a x$enable_shared = xyes; then --- -2.3.2 (Apple Git-55) - -From bb1a73677634f3a70dbe5baac36ba8e6acf4f4cd Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Hans Petter Jansson <hpj@cl.no> Date: Fri, 15 Jun 2012 15:29:06 +0200 -Subject: [PATCH 5/6] Link with dnsapi +Subject: [PATCH] Link with dnsapi diff --git a/gio-2.0.pc.in b/gio-2.0.pc.in -index 899af0c..b8308f8 100644 +index 1111111..2222222 100644 --- a/gio-2.0.pc.in +++ b/gio-2.0.pc.in @@ -13,6 +13,6 @@ Description: glib I/O library @@ -164,22 +167,19 @@ index 899af0c..b8308f8 100644 +Libs: -L${libdir} -lgio-2.0 -ldnsapi -liphlpapi Libs.private: @ZLIB_LIBS@ @NETWORK_LIBS@ @SELINUX_LIBS@ @COCOA_LIBS@ @CARBON_LIBS@ Cflags: --- -2.3.2 (Apple Git-55) - -From bb796f32a497ef983e2e7483cab25b6142e15630 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Hans Petter Jansson <hpj@cl.no> Date: Fri, 15 Jun 2012 15:29:38 +0200 -Subject: [PATCH 6/6] Ensure globals are initialized even when DllMain is not +Subject: [PATCH] Ensure globals are initialized even when DllMain is not being run diff --git a/glib/gmain.c b/glib/gmain.c -index 30fac70..736cb57 100644 +index 1111111..2222222 100644 --- a/glib/gmain.c +++ b/glib/gmain.c -@@ -2566,12 +2566,15 @@ g_get_real_time (void) +@@ -2657,12 +2657,15 @@ g_get_real_time (void) #if defined (G_OS_WIN32) static ULONGLONG (*g_GetTickCount64) (void) = NULL; static guint32 g_win32_tick_epoch = 0; @@ -195,7 +195,7 @@ index 30fac70..736cb57 100644 g_GetTickCount64 = NULL; kernel32 = GetModuleHandle ("KERNEL32.DLL"); if (kernel32 != NULL) -@@ -2630,6 +2633,9 @@ g_get_monotonic_time (void) +@@ -2721,6 +2724,9 @@ g_get_monotonic_time (void) * timeBeginPeriod() to increase it as much as they want */ @@ -206,7 +206,7 @@ index 30fac70..736cb57 100644 { guint32 ticks_as_32bit; diff --git a/glib/gthread-win32.c b/glib/gthread-win32.c -index 275ecc6..8285187 100644 +index 1111111..2222222 100644 --- a/glib/gthread-win32.c +++ b/glib/gthread-win32.c @@ -116,18 +116,28 @@ typedef struct @@ -535,7 +535,7 @@ index 275ecc6..8285187 100644 win32_check_for_error (WAIT_FAILED != WaitForSingleObject (wt->handle, INFINITE)); } -@@ -984,6 +1088,8 @@ g_thread_lookup_native_funcs (void) +@@ -1041,6 +1145,8 @@ g_thread_lookup_native_funcs (void) void g_thread_win32_init (void) { @@ -544,6 +544,54 @@ index 275ecc6..8285187 100644 if (!g_thread_lookup_native_funcs ()) g_thread_xp_init (); --- -2.3.2 (Apple Git-55) +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Gerardo Ballabio <gerardo.ballabio@gmail.com> +Date: Sun, 16 Aug 2015 13:18:24 +0200 +Subject: [PATCH] Remove an annoying runtime warning + +that pops up when using GtkApplication in Gtk+ 3 programs. + +diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c +index 1111111..2222222 100644 +--- a/gio/gdbusaddress.c ++++ b/gio/gdbusaddress.c +@@ -1387,6 +1387,7 @@ __declspec(dllexport) void CALLBACK g_win32_run_session_bus (HWND hwnd, HINSTANC + __declspec(dllexport) void CALLBACK + g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow) + { ++ /* + GDBusDaemon *daemon; + GMainLoop *loop; + const char *address; +@@ -1418,6 +1419,7 @@ g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow + + g_main_loop_unref (loop); + g_object_unref (daemon); ++ */ + } + + static gchar * + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: aquiles2k <aj@elane2k.com> +Date: Wed, 6 Apr 2016 22:39:53 +0300 +Subject: [PATCH] fix error "won't overwrite defined macro" on OSX + +See https://github.com/mxe/mxe/issues/1281 + +diff --git a/m4macros/glib-gettext.m4 b/m4macros/glib-gettext.m4 +index 1111111..2222222 100644 +--- a/m4macros/glib-gettext.m4 ++++ b/m4macros/glib-gettext.m4 +@@ -36,8 +36,8 @@ dnl We go to great lengths to make sure that aclocal won't + dnl try to pull in the installed version of these macros + dnl when running aclocal in the glib directory. + dnl +-m4_copy([AC_DEFUN],[glib_DEFUN]) +-m4_copy([AC_REQUIRE],[glib_REQUIRE]) ++m4_copy_force([AC_DEFUN],[glib_DEFUN]) ++m4_copy_force([AC_REQUIRE],[glib_REQUIRE]) + dnl + dnl At the end, if we're not within glib, we'll define the public + dnl definitions in terms of our private definitions. diff --git a/src/glib-2-remove-runtime-warning-gtkapplication.patch b/src/glib-2-remove-runtime-warning-gtkapplication.patch deleted file mode 100644 index 3d47602d..00000000 --- a/src/glib-2-remove-runtime-warning-gtkapplication.patch +++ /dev/null @@ -1,24 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -Remove an annoying runtime warning that pops up when using GtkApplication -in Gtk+ 3 programs. - ---- a/gio/gdbusaddress.c 2014-06-28 19:02:43.000000000 +0200 -+++ b/gio/gdbusaddress.c 2015-08-12 20:26:45.931228430 +0200 -@@ -1325,6 +1325,7 @@ - __declspec(dllexport) void CALLBACK - g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow) - { -+ /* - GDBusDaemon *daemon; - GMainLoop *loop; - const char *address; -@@ -1354,6 +1355,7 @@ - - g_main_loop_unref (loop); - g_object_unref (daemon); -+ */ - } - - static gchar * diff --git a/src/glib.mk b/src/glib.mk index 042b91c0..9f1bb465 100644 --- a/src/glib.mk +++ b/src/glib.mk @@ -1,18 +1,19 @@ -# 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 := glib +$(PKG)_WEBSITE := https://gtk.org/ +$(PKG)_DESCR := GLib $(PKG)_IGNORE := -$(PKG)_VERSION := 2.44.1 -$(PKG)_CHECKSUM := 8811deacaf8a503d0a9b701777ea079ca6a4277be10e3d730d2112735d5eca07 +$(PKG)_VERSION := 2.50.2 +$(PKG)_CHECKSUM := be68737c1f268c05493e503b3b654d2b7f43d7d0b8c5556f7e4651b870acfbf5 $(PKG)_SUBDIR := glib-$($(PKG)_VERSION) $(PKG)_FILE := glib-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/glib/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/glib/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc dbus gettext libffi libiconv pcre zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/glib/refs/tags' | \ - $(SED) -n "s,.*tag/?id=\([0-9]\+\.[0-9]*[02468]\.[^']*\).*,\1,p" | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/glib/refs/tags' | \ + $(SED) -n "s,.*glib-\([0-9]\+\.[0-9]*[02468]\.[^']*\)\.tar.*,\1,p" | \ $(SORT) -Vr | \ head -1 endef @@ -46,6 +47,7 @@ define $(PKG)_NATIVE_BUILD --disable-fam \ --disable-xattr \ --disable-dtrace \ + --disable-libmount \ --with-libiconv=gnu \ --with-pcre=internal \ CPPFLAGS='-I$(1).native/$(libiconv_SUBDIR)/include -I$(1).native/$(zlib_SUBDIR)' \ diff --git a/src/glibmm.mk b/src/glibmm.mk index 02c8f734..945d4e2e 100644 --- a/src/glibmm.mk +++ b/src/glibmm.mk @@ -1,17 +1,18 @@ -# 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 := glibmm +$(PKG)_WEBSITE := https://www.gtkmm.org/ +$(PKG)_DESCR := GLibmm $(PKG)_IGNORE := $(PKG)_VERSION := 2.42.0 $(PKG)_CHECKSUM := 985083d97378d234da27a7243587cc0d186897a4b2d3c1286f794089be1a3397 $(PKG)_SUBDIR := glibmm-$($(PKG)_VERSION) $(PKG)_FILE := glibmm-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/glibmm/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/glibmm/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc glib libsigc++ define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/glibmm/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/glibmm/refs/tags' | \ grep '<a href=' | \ $(SED) -n 's,.*<a[^>]*>\([0-9]*\.[0-9]*[02468]\.[^<]*\)<.*,\1,p' | \ $(SORT) -Vr | \ diff --git a/src/glm-test.cpp b/src/glm-test.cpp new file mode 100644 index 00000000..1f98f2e2 --- /dev/null +++ b/src/glm-test.cpp @@ -0,0 +1,31 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + * + * This file is a test program for glm, adapted from the code sample at + * http://glm.g-truc.net/0.9.7/index.html. + */ + +#include <glm/gtc/matrix_transform.hpp> // glm::translate, glm::rotate, glm::scale, glm::perspective +#include <glm/mat4x4.hpp> // glm::mat4 +#include <glm/vec3.hpp> // glm::vec3 +#include <glm/vec4.hpp> // glm::vec4 +#include <glm/gtx/string_cast.hpp> // so we can print a calculation result +#include <iostream> + +glm::mat4 camera(float Translate, glm::vec2 const& Rotate) +{ + glm::mat4 Projection = glm::perspective(45.0f, 4.0f / 3.0f, 0.1f, 100.f); + glm::mat4 View = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, -Translate)); + View = glm::rotate(View, Rotate.y, glm::vec3(-1.0f, 0.0f, 0.0f)); + View = glm::rotate(View, Rotate.x, glm::vec3(0.0f, 1.0f, 0.0f)); + glm::mat4 Model = glm::scale(glm::mat4(1.0f), glm::vec3(0.5f)); + return Projection * View * Model; +} + +int main() +{ + glm::mat4 m = camera(0.0f, glm::vec2(0.0f, 0.0f)); + std::cout << glm::to_string(m) << std::endl; + + return 0; +} diff --git a/src/glm.mk b/src/glm.mk new file mode 100644 index 00000000..b1022c20 --- /dev/null +++ b/src/glm.mk @@ -0,0 +1,21 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := glm +$(PKG)_WEBSITE := https://glm.g-truc.net/ +$(PKG)_DESCR := GLM - OpenGL Mathematics +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.9.7.6 +$(PKG)_CHECKSUM := 872fdea580b69b752562adc60734d7472fd97d5724c4ead585564083deac3953 +$(PKG)_GH_CONF := g-truc/glm +$(PKG)_DEPS := gcc + +define $(PKG)_BUILD + cd '$(BUILD_DIR)' && $(TARGET)-cmake \ + '$(SOURCE_DIR)' + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install + + '$(TARGET)-g++' \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-glm.exe' +endef diff --git a/src/glpk.mk b/src/glpk.mk new file mode 100644 index 00000000..9a1f7435 --- /dev/null +++ b/src/glpk.mk @@ -0,0 +1,44 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := glpk +$(PKG)_WEBSITE := https://www.gnu.org/software/glpk/ +$(PKG)_DESCR := GNU Linear Programming Kit +$(PKG)_IGNORE := +$(PKG)_VERSION := 4.60 +$(PKG)_CHECKSUM := 1356620cb0a0d33ac3411dd49d9fd40d53ece73eaec8f6b8d19a77887ff5e297 +$(PKG)_SUBDIR := glpk-$($(PKG)_VERSION) +$(PKG)_FILE := glpk-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://ftp.gnu.org/gnu/glpk/glpk-$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := gcc gmp + +# internal zlib is always used +# libmysqlclient and odbc not supported on windows (see INSTALL and configure.ac) + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://ftp.gnu.org/gnu/glpk/?C=M;O=D' | \ + $(SED) -n 's,.*<a href="glpk-\([0-9][^"]*\)\.tar.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + # build and install the library + cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \ + $(MXE_CONFIGURE_OPTS) \ + --with-gmp + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install + + # create pkg-config files + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' + (echo 'Name: $(PKG)'; \ + echo 'Version: $($(PKG)_VERSION)'; \ + echo 'Description: GNU Linear Programming Kit'; \ + echo 'Libs: -lglpk';) \ + > '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc' + + # compile test + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(SOURCE_DIR)/examples/netgen.c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' $(PKG) --cflags --libs` +endef diff --git a/src/gmp.mk b/src/gmp.mk index d1b872d5..dfe8b532 100644 --- a/src/gmp.mk +++ b/src/gmp.mk @@ -1,10 +1,11 @@ -# 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 := gmp +$(PKG)_WEBSITE := https://gmplib.org/ +$(PKG)_DESCR := GMP $(PKG)_IGNORE := -$(PKG)_VERSION := 6.1.0 -$(PKG)_CHECKSUM := 68dadacce515b0f8a54f510edf07c1b636492bcdb8e8d54c56eb216225d16989 +$(PKG)_VERSION := 6.1.2 +$(PKG)_CHECKSUM := 87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz $(PKG)_URL := https://gmplib.org/download/$(PKG)/$($(PKG)_FILE) @@ -14,7 +15,7 @@ $(PKG)_DEPS := gcc $(PKG)_DEPS_$(BUILD) := define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.gmplib.org/' | \ + $(WGET) -q -O- 'https://gmplib.org/' | \ grep '<a href="' | \ $(SED) -n 's,.*gmp-\([0-9][^>]*\)\.tar.*,\1,p' | \ $(SORT) -V | \ diff --git a/src/gnutls-1-fixes.patch b/src/gnutls-1-fixes.patch index d8f1bca5..6b83c577 100644 --- a/src/gnutls-1-fixes.patch +++ b/src/gnutls-1-fixes.patch @@ -1,34 +1,30 @@ -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. Contains ad hoc patches for cross building. -From 239dc102017197025ef37cda8fa26b3750f18fb9 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Mark Brand <mabrand@mabrand.nl> Date: Mon, 4 Feb 2013 16:11:12 +0100 -Subject: [PATCH 1/2] add missing private lib to pc file +Subject: [PATCH] add missing private lib to pc file diff --git a/lib/gnutls.pc.in b/lib/gnutls.pc.in -index a25fcdf..3860c68 100644 +index 1111111..2222222 100644 --- a/lib/gnutls.pc.in +++ b/lib/gnutls.pc.in @@ -19,6 +19,6 @@ Description: Transport Security Layer implementation for the GNU system URL: http://www.gnutls.org/ Version: @VERSION@ Libs: -L${libdir} -lgnutls --Libs.private: @LTLIBZ@ @LTLIBINTL@ @LIBSOCKET@ @LTLIBPTHREAD@ @LTLIBICONV@ @P11_KIT_LIBS@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ -+Libs.private: @LTLIBZ@ @LTLIBINTL@ @LIBSOCKET@ @LTLIBPTHREAD@ @LTLIBICONV@ @P11_KIT_LIBS@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ -lcrypt32 +-Libs.private: @LIBZ_PC@ @LIBINTL@ @LIBSOCKET@ @LIBNSL@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LIBUNISTRING@ @LIBIDN2_LIBS@ ++Libs.private: @LIBZ_PC@ @LIBINTL@ @LIBSOCKET@ @LIBNSL@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LIBUNISTRING@ @LIBIDN2_LIBS@ -lcrypt32 @GNUTLS_REQUIRES_PRIVATE@ Cflags: -I${includedir} --- -2.3.2 (Apple Git-55) - -From 02e79ee0c18ff148e315c223675370ad11673bf6 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Mark Brand <mabrand@mabrand.nl> Date: Mon, 24 Nov 2014 08:56:48 +0100 -Subject: [PATCH 2/2] windows build fix: ws2tcpip.h supplies inet_ntop +Subject: [PATCH] windows build fix: ws2tcpip.h supplies inet_ntop Follow-up to 492c2b937ab66134d0b37499a6f3a747e19bc31a @@ -36,12 +32,12 @@ Signed-off-by: Mark Brand <mabrand@mabrand.nl> taken from: http://lists.gnutls.org/pipermail/gnutls-devel/2014-November/007250.html -diff --git a/lib/x509/output.c b/lib/x509/output.c -index e82fe84..2e62418 100644 ---- a/lib/x509/output.c -+++ b/lib/x509/output.c -@@ -34,7 +34,11 @@ - #include <gnutls-idna.h> +diff --git a/lib/x509/ip.c b/lib/x509/ip.c +index 1111111..2222222 100644 +--- a/lib/x509/ip.c ++++ b/lib/x509/ip.c +@@ -26,7 +26,11 @@ + #include <gnutls/x509.h> #ifdef HAVE_INET_NTOP -# include <arpa/inet.h> @@ -52,7 +48,82 @@ index e82fe84..2e62418 100644 +# endif #endif - #define addf _gnutls_buffer_append_printf --- -2.3.2 (Apple Git-55) + /*- +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Tue, 2 May 2017 23:52:16 +0200 +Subject: [PATCH] gnutls.pc: hardcode -lunistring -liconv + +See https://github.com/mxe/mxe/issues/1753#issuecomment-298772548 + +diff --git a/lib/gnutls.pc.in b/lib/gnutls.pc.in +index 1111111..2222222 100644 +--- a/lib/gnutls.pc.in ++++ b/lib/gnutls.pc.in +@@ -19,6 +19,6 @@ Description: Transport Security Layer implementation for the GNU system + URL: http://www.gnutls.org/ + Version: @VERSION@ + Libs: -L${libdir} -lgnutls +-Libs.private: @LIBZ_PC@ @LIBINTL@ @LIBSOCKET@ @LIBNSL@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LIBUNISTRING@ @LIBIDN2_LIBS@ -lcrypt32 ++Libs.private: @LIBZ_PC@ @LIBINTL@ @LIBSOCKET@ @LIBNSL@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ -lunistring -liconv @LIBIDN2_LIBS@ -lcrypt32 + @GNUTLS_REQUIRES_PRIVATE@ + Cflags: -I${includedir} + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Mark Brand <mabrand@mabrand.nl> +Date: Sun, 7 May 2017 20:17:13 +0200 +Subject: [PATCH] let gnutls configure detect libidn2 + + +diff --git a/configure.ac b/configure.ac +index 1111111..2222222 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -483,24 +483,19 @@ with_libidn=no + if test "$try_libidn" = yes;then + + if test "$try_libidn2" = yes;then +- AC_SEARCH_LIBS(idn2_lookup_u8, idn2, [ +- with_libidn2=yes; ++ PKG_CHECK_MODULES(LIBIDN2, libidn2, [with_libidn2=yes], [with_libidn2=no]) ++ if test "$with_libidn2" != "no";then + idna_support="IDNA 2008 (libidn2)" ++ + AC_DEFINE([HAVE_LIBIDN2], 1, [Define if IDNA 2008 support is enabled.]) +- AC_SUBST([LIBIDN_LIBS], [-lidn2]) +- AC_SUBST([LIBIDN2_LIBS], [-lidn2]) dnl used in gnutls.pc.in +-dnl enable once libidn2.pc is widespread; and remove LIBIDN2_LIBS from gnutls.pc.in (Libs.private) +-dnl if test "x$GNUTLS_REQUIRES_PRIVATE" = "x"; then +-dnl GNUTLS_REQUIRES_PRIVATE="Requires.private: libidn2" +-dnl else +-dnl GNUTLS_REQUIRES_PRIVATE="${GNUTLS_REQUIRES_PRIVATE}, libidn2" +-dnl fi +- ],[ +- with_libidn2=no; ++ if test "x$GNUTLS_REQUIRES_PRIVATE" = "x"; then ++ GNUTLS_REQUIRES_PRIVATE="Requires.private: libidn2" ++ else ++ GNUTLS_REQUIRES_PRIVATE="${GNUTLS_REQUIRES_PRIVATE}, libidn2" ++ fi ++ else + AC_MSG_WARN(*** LIBIDN2 was not found. You will not be able to use IDN2008 support) +- ]) +- else +- with_libidn2=no ++ fi + fi + + if test "$with_libidn2" = "no"; then +diff --git a/lib/gnutls.pc.in b/lib/gnutls.pc.in +index 1111111..2222222 100644 +--- a/lib/gnutls.pc.in ++++ b/lib/gnutls.pc.in +@@ -19,6 +19,6 @@ Description: Transport Security Layer implementation for the GNU system + URL: http://www.gnutls.org/ + Version: @VERSION@ + Libs: -L${libdir} -lgnutls +-Libs.private: @LIBZ_PC@ @LIBINTL@ @LIBSOCKET@ @LIBNSL@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ -lunistring -liconv @LIBIDN2_LIBS@ -lcrypt32 ++Libs.private: @LIBZ_PC@ @LIBINTL@ @LIBSOCKET@ @LIBNSL@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ -lunistring -liconv -lcrypt32 + @GNUTLS_REQUIRES_PRIVATE@ + Cflags: -I${includedir} diff --git a/src/gnutls-test.c b/src/gnutls-test.c index 2bdc4722..e948f8e2 100644 --- a/src/gnutls-test.c +++ b/src/gnutls-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <gnutls/gnutls.h> diff --git a/src/gnutls.mk b/src/gnutls.mk index 528ed0af..8eaf3731 100644 --- a/src/gnutls.mk +++ b/src/gnutls.mk @@ -1,17 +1,18 @@ -# 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 := gnutls -$(PKG)_VERSION := 3.4.5 -$(PKG)_CHECKSUM := af88b8e0460728d034ff3f454f7851a09b7f0959a93531b6f8d35658ef0f7aae +$(PKG)_WEBSITE := https://www.gnu.org/software/gnutls/ +$(PKG)_DESCR := GnuTLS +$(PKG)_VERSION := 3.5.13 +$(PKG)_CHECKSUM := 79f5480ad198dad5bc78e075f4a40c4a315a1b2072666919d2d05a08aec13096 $(PKG)_SUBDIR := gnutls-$($(PKG)_VERSION) $(PKG)_FILE := gnutls-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://mirrors.dotsrc.org/gnupg/gnutls/v3.4/$($(PKG)_FILE) -$(PKG)_URL_2 := ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4//$($(PKG)_FILE) -$(PKG)_DEPS := gcc gettext gmp libgnurx nettle zlib +$(PKG)_URL := https://gnupg.org/ftp/gcrypt/gnutls/v3.5/$($(PKG)_FILE) +$(PKG)_URL_2 := ftp://ftp.gnutls.org/gcrypt/gnutls/v3.5/$($(PKG)_FILE) +$(PKG)_DEPS := gcc gettext gmp libgnurx libidn2 libunistring nettle zlib define $(PKG)_UPDATE - $(WGET) -q -O- ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4/ | \ + $(WGET) -q -O- https://gnupg.org/ftp/gcrypt/gnutls/v3.5/ | \ $(SED) -n 's,.*gnutls-\([1-9]\+\.[0-9]\+.[0-9]\+\)\..*,\1,p' | \ $(SORT) -V | \ tail -1 @@ -19,13 +20,14 @@ endef define $(PKG)_BUILD # AI_ADDRCONFIG referenced by src/serv.c but not provided by mingw. - # Value taken from http://msdn.microsoft.com/en-us/library/windows/desktop/ms737530%28v=vs.85%29.aspx - cd '$(1)' && ./configure \ + # Value taken from https://msdn.microsoft.com/en-us/library/windows/desktop/ms737530%28v=vs.85%29.aspx + cd '$(1)' && autoreconf -fi && ./configure \ $(MXE_CONFIGURE_OPTS) \ --disable-rpath \ --disable-nls \ --disable-guile \ --disable-doc \ + --disable-tests \ --enable-local-libopts \ --with-included-libtasn1 \ --with-libregex-libs="-lgnurx" \ @@ -38,6 +40,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-gnutls.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-gnutls.exe' \ `'$(TARGET)-pkg-config' gnutls --cflags --libs` endef diff --git a/src/googlemock.mk b/src/googlemock.mk new file mode 100644 index 00000000..bd4a4bde --- /dev/null +++ b/src/googlemock.mk @@ -0,0 +1,11 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := googlemock +$(PKG)_WEBSITE := https://github.com/google/googlemock +$(PKG)_DESCR := Google Mock +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.7.0 +$(PKG)_CHECKSUM := 3f20b6acb37e5a98e8c4518165711e3e35d47deb6cdb5a4dd4566563b5efd232 +$(PKG)_GH_CONF := google/googlemock, release- +$(PKG)_DEPS := +$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) diff --git a/src/googletest.mk b/src/googletest.mk new file mode 100644 index 00000000..1b133e7c --- /dev/null +++ b/src/googletest.mk @@ -0,0 +1,11 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := googletest +$(PKG)_WEBSITE := https://github.com/google/googletest +$(PKG)_DESCR := Google Test +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.7.0 +$(PKG)_CHECKSUM := f73a6546fdf9fce9ff93a5015e0333a8af3062a152a9ad6bcb772c96687016cc +$(PKG)_GH_CONF := google/googletest, release- +$(PKG)_DEPS := +$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) diff --git a/src/graphicsmagick-1-fix-xml2-config.patch b/src/graphicsmagick-1-fix-xml2-config.patch index 2f32e87c..a674b8a6 100644 --- a/src/graphicsmagick-1-fix-xml2-config.patch +++ b/src/graphicsmagick-1-fix-xml2-config.patch @@ -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. This patch has been taken from: http://sourceforge.net/tracker/?func=detail&aid=3130497&group_id=73485&atid=537937 diff --git a/src/graphicsmagick-2-fix-autoconf-version.patch b/src/graphicsmagick-2-fix-autoconf-version.patch index 13937b58..dd9e1ee3 100644 --- a/src/graphicsmagick-2-fix-autoconf-version.patch +++ b/src/graphicsmagick-2-fix-autoconf-version.patch @@ -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. diff --git a/configure.ac b/configure.ac --- a/configure.ac diff --git a/src/graphicsmagick-test.cpp b/src/graphicsmagick-test.cpp index 429aaa11..4bf29f43 100644 --- a/src/graphicsmagick-test.cpp +++ b/src/graphicsmagick-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <Magick++.h> diff --git a/src/graphicsmagick.mk b/src/graphicsmagick.mk index 30c4c0e8..696c4676 100644 --- a/src/graphicsmagick.mk +++ b/src/graphicsmagick.mk @@ -1,17 +1,18 @@ -# 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 := graphicsmagick +$(PKG)_WEBSITE := http://www.graphicsmagick.org/ +$(PKG)_DESCR := GraphicsMagick $(PKG)_IGNORE := $(PKG)_VERSION := 1.3.21 $(PKG)_CHECKSUM := 9045304d991776b6a37e1b45b9b6ef152593ada0d49bc744263565617cbf3c1f $(PKG)_SUBDIR := GraphicsMagick-$($(PKG)_VERSION) $(PKG)_FILE := GraphicsMagick-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc bzip2 freetype jasper jpeg lcms libltdl libpng libxml2 pthreads tiff zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef @@ -49,6 +50,6 @@ define $(PKG)_BUILD '$(TARGET)-g++' \ -W -Wall -Werror -pedantic -std=gnu++0x \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-graphicsmagick.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-graphicsmagick.exe' \ `'$(TARGET)-pkg-config' GraphicsMagick++ --cflags --libs` -llzma endef diff --git a/src/gsl-test.c b/src/gsl-test.c index 00ac9a8b..a20e59de 100644 --- a/src/gsl-test.c +++ b/src/gsl-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdio.h> diff --git a/src/gsl.mk b/src/gsl.mk index 5ee761cf..2861e3b6 100644 --- a/src/gsl.mk +++ b/src/gsl.mk @@ -1,17 +1,18 @@ -# 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 := gsl +$(PKG)_WEBSITE := https://www.gnu.org/software/gsl/ +$(PKG)_DESCR := GSL $(PKG)_IGNORE := -$(PKG)_VERSION := 1.16 -$(PKG)_CHECKSUM := 73bc2f51b90d2a780e6d266d43e487b3dbd78945dd0b04b14ca5980fe28d2f53 +$(PKG)_VERSION := 2.3 +$(PKG)_CHECKSUM := 562500b789cd599b3a4f88547a7a3280538ab2ff4939504c8b4ac4ca25feadfb $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://ftp.gnu.org/gnu/$(PKG)/' | \ + $(WGET) -q -O- 'https://ftp.gnu.org/gnu/$(PKG)/' | \ $(SED) -n 's,.*<a href="gsl-\([0-9.]\+\).tar.gz".*,\1,p' | \ $(SORT) -V | \ tail -1 @@ -19,18 +20,12 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ - --host='$(TARGET)' \ - --build="`config.guess`" \ - --prefix='$(PREFIX)/$(TARGET)' \ - --disable-shared \ - --enable-static + $(MXE_CONFIGURE_OPTS) $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-gsl.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-gsl.exe' \ -lgsl endef - -$(PKG)_BUILD_SHARED = diff --git a/src/gsoap-1-fixes.patch b/src/gsoap-1-fixes.patch index 376c9a6a..642b2802 100644 --- a/src/gsoap-1-fixes.patch +++ b/src/gsoap-1-fixes.patch @@ -1,14 +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. -From 933115892cfe9e4c9942a9667b3362dbf5c64b52 Mon Sep 17 00:00:00 2001 +Contains ad hoc patches for cross building. + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> Date: Sun, 23 Oct 2011 21:36:53 +0200 -Subject: [PATCH 1/2] support static linking to ntlm +Subject: [PATCH] support static linking to ntlm diff --git a/configure b/configure -index 5454a6a..8508b30 100755 +index 1111111..2222222 100755 --- a/configure +++ b/configure @@ -5023,8 +5023,8 @@ case "${host}" in @@ -22,18 +23,15 @@ index 5454a6a..8508b30 100755 ;; *-*-freebsd*) platform=FREEBSD ;; *-*-openbsd*) platform=OPENBSD ;; --- -2.1.4 - -From b7210831195d6ed4b2f43f8c7b0a8d877b86d65f Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> Date: Mon, 24 Oct 2011 11:17:13 +0200 -Subject: [PATCH 2/2] ntlm support in .pc files +Subject: [PATCH] ntlm support in .pc files diff --git a/gsoap++.pc.in b/gsoap++.pc.in -index e22c7e4..cefef8c 100644 +index 1111111..2222222 100644 --- a/gsoap++.pc.in +++ b/gsoap++.pc.in @@ -9,4 +9,4 @@ Version: @VERSION@ @@ -43,7 +41,7 @@ index e22c7e4..cefef8c 100644 -Cflags: @SOAPCPP2_IPV6@ -DWITH_DOM -I${includedir} +Cflags: @SOAPCPP2_IPV6@ -DWITH_DOM -DWITH_NTLM -I${includedir} diff --git a/gsoap.pc.in b/gsoap.pc.in -index d5e1860..810dea1 100644 +index 1111111..2222222 100644 --- a/gsoap.pc.in +++ b/gsoap.pc.in @@ -9,4 +9,4 @@ Version: @VERSION@ @@ -53,7 +51,7 @@ index d5e1860..810dea1 100644 -Cflags: @SOAPCPP2_IPV6@ -DWITH_DOM -I${includedir} +Cflags: @SOAPCPP2_IPV6@ -DWITH_DOM -DWITH_NTLM -I${includedir} diff --git a/gsoapck++.pc.in b/gsoapck++.pc.in -index 9699198..7d023b2 100644 +index 1111111..2222222 100644 --- a/gsoapck++.pc.in +++ b/gsoapck++.pc.in @@ -9,4 +9,4 @@ Version: @VERSION@ @@ -63,7 +61,7 @@ index 9699198..7d023b2 100644 -Cflags: @SOAPCPP2_IPV6@ -DWITH_COOKIES -DWITH_DOM -I${includedir} +Cflags: @SOAPCPP2_IPV6@ -DWITH_COOKIES -DWITH_DOM -DWITH_NTLM -I${includedir} diff --git a/gsoapck.pc.in b/gsoapck.pc.in -index 96b94ee..3e01ef6 100644 +index 1111111..2222222 100644 --- a/gsoapck.pc.in +++ b/gsoapck.pc.in @@ -9,4 +9,4 @@ Version: @VERSION@ @@ -73,7 +71,7 @@ index 96b94ee..3e01ef6 100644 -Cflags: @SOAPCPP2_IPV6@ -DWITH_COOKIES -DWITH_DOM -I${includedir} +Cflags: @SOAPCPP2_IPV6@ -DWITH_COOKIES -DWITH_DOM -DWITH_NTLM -I${includedir} diff --git a/gsoapssl++.pc.in b/gsoapssl++.pc.in -index 6378d0e..2a68e09 100644 +index 1111111..2222222 100644 --- a/gsoapssl++.pc.in +++ b/gsoapssl++.pc.in @@ -9,4 +9,4 @@ Version: @VERSION@ @@ -83,7 +81,7 @@ index 6378d0e..2a68e09 100644 -Cflags: @SOAPCPP2_IPV6@ -DWITH_OPENSSL -DWITH_DOM -DWITH_COOKIES -DWITH_GZIP -I${includedir} +Cflags: @SOAPCPP2_IPV6@ -DWITH_OPENSSL -DWITH_DOM -DWITH_NTLM -DWITH_COOKIES -DWITH_GZIP -I${includedir} diff --git a/gsoapssl.pc.in b/gsoapssl.pc.in -index 365274b..82af331 100644 +index 1111111..2222222 100644 --- a/gsoapssl.pc.in +++ b/gsoapssl.pc.in @@ -9,4 +9,4 @@ Version: @VERSION@ @@ -92,6 +90,29 @@ index 365274b..82af331 100644 Libs.private: @SAMPLE_SSL_LIBS@ @SAMPLE_EXTRA_LIBS@ -Cflags: @SOAPCPP2_IPV6@ -DWITH_OPENSSL -DWITH_DOM -DWITH_COOKIES -DWITH_GZIP -I${includedir} +Cflags: @SOAPCPP2_IPV6@ -DWITH_OPENSSL -DWITH_DOM -DWITH_NTLM -DWITH_COOKIES -DWITH_GZIP -I${includedir} --- -2.1.4 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Wed, 1 Feb 2017 12:32:00 +1100 +Subject: [PATCH] workaround for building on newer OSX, can be removed in next + update. + +similar to https://github.com/unbit/uwsgi/pull/966 + +diff --git a/gsoap/stdsoap2.h b/gsoap/stdsoap2.h +index 1111111..2222222 100644 +--- a/gsoap/stdsoap2.h ++++ b/gsoap/stdsoap2.h +@@ -2859,6 +2859,12 @@ SOAP_FMAC1 int SOAP_FMAC2 soap_putsetcookies(struct soap *soap); + SOAP_FMAC1 int SOAP_FMAC2 soap_putcookies(struct soap *soap, const char *domain, const char *path, int secure); + #endif + ++#ifdef TCP_FASTOPEN ++ #ifndef SOL_TCP ++ #define SOL_TCP IPPROTO_TCP ++ #endif ++#endif ++ + #ifdef __cplusplus + } /* extern "C" */ + #endif diff --git a/src/gsoap.mk b/src/gsoap.mk index d98cf4b2..f32e648d 100644 --- a/src/gsoap.mk +++ b/src/gsoap.mk @@ -1,17 +1,18 @@ -# 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 := gsoap +$(PKG)_WEBSITE := https://www.genivia.com/dev.html +$(PKG)_DESCR := gSOAP $(PKG)_IGNORE := $(PKG)_VERSION := 2.8.22 $(PKG)_CHECKSUM := 30b045af2633ac5e92ea92fdb4baad784afe6e6548b5ef2f9cad48df6a7d3e48 $(PKG)_SUBDIR := gsoap-$(call SHORT_PKG_VERSION,$(PKG)) $(PKG)_FILE := gsoap_$($(PKG)_VERSION).zip -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/gsoap2/gSOAP/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/gsoap2/gsoap-$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc libgcrypt libntlm openssl define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/gsoap2/files/gSOAP/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/gsoap2/files/gsoap-2.8/' | \ $(SED) -n 's,.*gsoap_\([0-9][^>]*\)\.zip.*,\1,p' | \ head -1 endef @@ -21,7 +22,8 @@ define $(PKG)_BUILD cd '$(1)' && touch configure config.h.in # Native build to get tools wsdl2h and soapcpp2 - cd '$(1)' && ./configure + cd '$(1)' && ./configure \ + --disable-ssl # Work around parallel build problem $(MAKE) -C '$(1)'/gsoap/src -j '$(JOBS)' soapcpp2_yacc.h @@ -45,7 +47,7 @@ define $(PKG)_BUILD # Build for mingw. Static by default. # Prevent undefined reference to _rpl_malloc. - # http://groups.google.com/group/ikarus-users/browse_thread/thread/fd1d101eac32633f + # https://groups.google.com/group/ikarus-users/browse_thread/thread/fd1d101eac32633f cd '$(1)' && ac_cv_func_malloc_0_nonnull=yes ./configure \ --prefix='$(PREFIX)/$(TARGET)' \ --host='$(TARGET)' \ diff --git a/src/gst-libav.mk b/src/gst-libav.mk new file mode 100644 index 00000000..bfcac380 --- /dev/null +++ b/src/gst-libav.mk @@ -0,0 +1,25 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := gst-libav +$(PKG)_WEBSITE := https://gstreamer.freedesktop.org/modules/gst-libav.html +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.6.2 +$(PKG)_CHECKSUM := 2597acc00171006d49f0d300440a87df51b113d557466e532153abc740db3469 +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz +$(PKG)_URL := https://gstreamer.freedesktop.org/src/$(PKG)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc gst-plugins-base + +$(PKG)_UPDATE = $(subst gstreamer/refs,gst-libav/refs,$(gstreamer_UPDATE)) + +define $(PKG)_BUILD + cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \ + $(MXE_CONFIGURE_OPTS) + $(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) + $(MAKE) -C '$(BUILD_DIR)' -j 1 install + + # some .dlls are installed to lib - no obvious way to change + $(if $(BUILD_SHARED), + mv -vf '$(PREFIX)/$(TARGET)/lib/gstreamer-1.0/'*.dll '$(PREFIX)/$(TARGET)/bin/' + ) +endef diff --git a/src/gst-plugins-bad-1-fixes.patch b/src/gst-plugins-bad-1-fixes.patch new file mode 100644 index 00000000..cb72c24b --- /dev/null +++ b/src/gst-plugins-bad-1-fixes.patch @@ -0,0 +1,41 @@ +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: Fri, 30 Dec 2016 19:59:12 +0100 +Subject: [PATCH] fix neon headers location + +See https://github.com/mxe/mxe/issues/1619 + +diff --git a/ext/neon/gstneonhttpsrc.c b/ext/neon/gstneonhttpsrc.c +index 1111111..2222222 100644 +--- a/ext/neon/gstneonhttpsrc.c ++++ b/ext/neon/gstneonhttpsrc.c +@@ -25,7 +25,7 @@ + #include <unistd.h> + #endif /* _HAVE_UNISTD_H */ + +-#include <ne_redirect.h> ++#include <neon/ne_redirect.h> + + #define STATUS_IS_REDIRECTION(status) ((status) >= 300 && (status) < 400) + +diff --git a/ext/neon/gstneonhttpsrc.h b/ext/neon/gstneonhttpsrc.h +index 1111111..2222222 100644 +--- a/ext/neon/gstneonhttpsrc.h ++++ b/ext/neon/gstneonhttpsrc.h +@@ -23,9 +23,9 @@ + + G_BEGIN_DECLS + +-#include <ne_session.h> +-#include <ne_request.h> +-#include <ne_socket.h> ++#include <neon/ne_session.h> ++#include <neon/ne_request.h> ++#include <neon/ne_socket.h> + + #define GST_TYPE_NEONHTTP_SRC \ + (gst_neonhttp_src_get_type()) diff --git a/src/gst-plugins-bad.mk b/src/gst-plugins-bad.mk new file mode 100644 index 00000000..3a6e4095 --- /dev/null +++ b/src/gst-plugins-bad.mk @@ -0,0 +1,36 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := gst-plugins-bad +$(PKG)_WEBSITE := https://gstreamer.freedesktop.org/ +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.6.2 +$(PKG)_CHECKSUM := 650855e39ff56a8bb6cb0c192109c5926ce12f536d06e19ebf829de71ef396fe +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz +$(PKG)_URL := https://gstreamer.freedesktop.org/src/$(PKG)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc chromaprint faad2 fdk-aac gst-plugins-base gstreamer gtk3 \ + libass libbs2b libdvdnav libdvdread libgcrypt libmms libmodplug librsvg \ + librtmp libsndfile libwebp mpg123 neon openal opencv openexr \ + openjpeg openssl opus vo-aacenc vo-amrwbenc + +$(PKG)_UPDATE = $(subst gstreamer/refs,gst-plugins-bad/refs,$(gstreamer_UPDATE)) + +define $(PKG)_BUILD + find '$(1)' -name Makefile.in \ + -exec $(SED) -i 's,glib-mkenums,$(PREFIX)/$(TARGET)/bin/glib-mkenums,g' {} \; \ + -exec $(SED) -i 's,glib-genmarshal,$(PREFIX)/$(TARGET)/bin/glib-genmarshal,g' {} \; + cd '$(1)' && ./configure \ + $(MXE_CONFIGURE_OPTS) \ + --disable-debug \ + --disable-examples \ + --disable-opengl \ + --mandir='$(1)/sink' \ + --docdir='$(1)/sink' \ + --with-html-dir='$(1)/sink' + $(MAKE) -C '$(1)' -j '$(JOBS)' install + + # some .dlls are installed to lib - no obvious way to change + $(if $(BUILD_SHARED), + mv -vf '$(PREFIX)/$(TARGET)/lib/gstreamer-1.0/'*.dll '$(PREFIX)/$(TARGET)/bin/' + ) +endef diff --git a/src/gst-plugins-base-1-intrinsics.patch b/src/gst-plugins-base-1-intrinsics.patch index b01030b9..2ecdc81e 100644 --- a/src/gst-plugins-base-1-intrinsics.patch +++ b/src/gst-plugins-base-1-intrinsics.patch @@ -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 50e29104baadb7bd536cd75dce964743ff04518c Mon Sep 17 00:00:00 2001 From: Timothy Gu <timothygu99@gmail.com> diff --git a/src/gst-plugins-base.mk b/src/gst-plugins-base.mk index a4120455..6b3a0d75 100644 --- a/src/gst-plugins-base.mk +++ b/src/gst-plugins-base.mk @@ -1,13 +1,13 @@ -# 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 := gst-plugins-base +$(PKG)_WEBSITE := https://gstreamer.freedesktop.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 1.4.5 -$(PKG)_CHECKSUM := 77bd8199e7a312d3d71de9b7ddf761a3b78560a2c2a80829d0815ca39cbd551d +$(PKG)_VERSION := 1.6.2 +$(PKG)_CHECKSUM := c75dd400e451526ed71e1c4955e33d470a2581f5e71ecf84920a41c0a5c75322 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://gstreamer.freedesktop.org/src/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://gstreamer.freedesktop.org/src/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc glib gstreamer liboil libxml2 ogg pango theora vorbis $(PKG)_UPDATE = $(subst gstreamer/refs,gst-plugins-base/refs,$(gstreamer_UPDATE)) @@ -17,10 +17,7 @@ define $(PKG)_BUILD -exec $(SED) -i 's,glib-mkenums,$(PREFIX)/$(TARGET)/bin/glib-mkenums,g' {} \; \ -exec $(SED) -i 's,glib-genmarshal,$(PREFIX)/$(TARGET)/bin/glib-genmarshal,g' {} \; cd '$(1)' && ./configure \ - --host='$(TARGET)' \ - --build="`config.guess`" \ - --prefix='$(PREFIX)/$(TARGET)' \ - --disable-shared \ + $(MXE_CONFIGURE_OPTS) \ --disable-debug \ --disable-examples \ --disable-x \ @@ -28,6 +25,9 @@ define $(PKG)_BUILD --docdir='$(1)/sink' \ --with-html-dir='$(1)/sink' $(MAKE) -C '$(1)' -j '$(JOBS)' install -endef -$(PKG)_BUILD_SHARED = + # some .dlls are installed to lib - no obvious way to change + $(if $(BUILD_SHARED), + mv -vf '$(PREFIX)/$(TARGET)/lib/gstreamer-1.0/'*.dll '$(PREFIX)/$(TARGET)/bin/' + ) +endef diff --git a/src/gst-plugins-good.mk b/src/gst-plugins-good.mk index f96a87aa..6c893c98 100644 --- a/src/gst-plugins-good.mk +++ b/src/gst-plugins-good.mk @@ -1,15 +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 := gst-plugins-good +$(PKG)_WEBSITE := https://gstreamer.freedesktop.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 1.4.5 -$(PKG)_CHECKSUM := 79b1b5f3f7bcaa8a615202eb5e176121eeb8336960f70687e536ad78dbc7e641 +$(PKG)_VERSION := 1.6.2 +$(PKG)_CHECKSUM := 876e54dfce93274b98e024f353258d35fa4d49d1f9010069e676c530f6eb6a92 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://gstreamer.freedesktop.org/src/$(PKG)/$($(PKG)_FILE) -$(PKG)_DEPS := gcc cairo flac glib gst-plugins-base gstreamer gtk2 \ - jpeg liboil libpng libshout libxml2 speex taglib wavpack +$(PKG)_URL := https://gstreamer.freedesktop.org/src/$(PKG)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc cairo flac gdk-pixbuf glib gst-plugins-base gstreamer jpeg libcaca \ + liboil libpng libshout libsoup libvpx libxml2 speex taglib wavpack $(PKG)_UPDATE = $(subst gstreamer/refs,gst-plugins-good/refs,$(gstreamer_UPDATE)) @@ -18,21 +18,22 @@ define $(PKG)_BUILD -exec $(SED) -i 's,glib-mkenums,$(PREFIX)/$(TARGET)/bin/glib-mkenums,g' {} \; \ -exec $(SED) -i 's,glib-genmarshal,$(PREFIX)/$(TARGET)/bin/glib-genmarshal,g' {} \; # The value for WAVE_FORMAT_DOLBY_AC3_SPDIF comes from vlc and mplayer: - # http://www.videolan.org/developers/vlc/doc/doxygen/html/vlc__codecs_8h-source.html - # http://lists.mplayerhq.hu/pipermail/mplayer-cvslog/2004-August/019283.html + # https://www.videolan.org/developers/vlc/doc/doxygen/html/vlc__codecs_8h-source.html + # https://lists.mplayerhq.hu/pipermail/mplayer-cvslog/2004-August/019283.html cd '$(1)' && ./configure \ - --host='$(TARGET)' \ - --build="`config.guess`" \ - --prefix='$(PREFIX)/$(TARGET)' \ - --disable-shared \ + $(MXE_CONFIGURE_OPTS) \ --disable-debug \ --disable-examples \ --disable-aalib \ + $(if $(BUILD_SHARED), --disable-shout2) \ --disable-x \ --mandir='$(1)/sink' \ --docdir='$(1)/sink' \ --with-html-dir='$(1)/sink' $(MAKE) -C '$(1)' -j '$(JOBS)' install CFLAGS='-DWAVE_FORMAT_DOLBY_AC3_SPDIF=0x0092' -endef -$(PKG)_BUILD_SHARED = + # some .dlls are installed to lib - no obvious way to change + $(if $(BUILD_SHARED), + mv -vf '$(PREFIX)/$(TARGET)/lib/gstreamer-1.0/'*.dll '$(PREFIX)/$(TARGET)/bin/' + ) +endef diff --git a/src/gst-plugins-ugly.mk b/src/gst-plugins-ugly.mk new file mode 100644 index 00000000..e44df4a7 --- /dev/null +++ b/src/gst-plugins-ugly.mk @@ -0,0 +1,34 @@ +#This file is part of MXE. See LICENSE.md for licensing information. + +PKG := gst-plugins-ugly +$(PKG)_WEBSITE := https://gstreamer.freedesktop.org/ +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.6.2 +$(PKG)_CHECKSUM := e7f1b6321c8667fabc0dedce3998a3c6e90ce9ce9dea7186d33dc4359f9e9845 +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz +$(PKG)_URL := https://gstreamer.freedesktop.org/src/$(PKG)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc a52dec gst-plugins-base gstreamer lame libcdio libdvdread \ + libmad opencore-amr twolame x264 + +$(PKG)_UPDATE = $(subst gstreamer/refs,gst-plugins-ugly/refs,$(gstreamer_UPDATE)) + +define $(PKG)_BUILD + find '$(1)' -name Makefile.in \ + -exec $(SED) -i 's,glib-mkenums,$(PREFIX)/$(TARGET)/bin/glib-mkenums,g' {} \; \ + -exec $(SED) -i 's,glib-genmarshal,$(PREFIX)/$(TARGET)/bin/glib-genmarshal,g' {} \; + cd '$(1)' && ./configure \ + $(MXE_CONFIGURE_OPTS) \ + --disable-debug \ + --disable-examples \ + --disable-opengl \ + --mandir='$(1)/sink' \ + --docdir='$(1)/sink' \ + --with-html-dir='$(1)/sink' + $(MAKE) -C '$(1)' -j '$(JOBS)' install + + # some .dlls are installed to lib - no obvious way to change + $(if $(BUILD_SHARED), + mv -vf '$(PREFIX)/$(TARGET)/lib/gstreamer-1.0/'*.dll '$(PREFIX)/$(TARGET)/bin/' + ) +endef diff --git a/src/gstreamer-1-fixes.patch b/src/gstreamer-1-fixes.patch deleted file mode 100644 index 873dd2ba..00000000 --- a/src/gstreamer-1-fixes.patch +++ /dev/null @@ -1,27 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -Contains ad hoc patches for cross building. - -From 3c2f96d5bbadcff5724523612e5cf0e2d6a9ac51 Mon Sep 17 00:00:00 2001 -From: MXE -Date: Tue, 12 Nov 2013 02:49:49 +1100 -Subject: [PATCH] remove _chsize redefinition - - -diff --git a/plugins/elements/gstfilesink.c b/plugins/elements/gstfilesink.c -index 470ad5e..eb8dbe8 100644 ---- a/plugins/elements/gstfilesink.c -+++ b/plugins/elements/gstfilesink.c -@@ -56,8 +56,6 @@ - #define lseek _lseeki64 - #undef off_t - #define off_t guint64 --#undef ftruncate --#define ftruncate _chsize - #ifdef _MSC_VER /* Check if we are using MSVC, fileno is deprecated in favour */ - #define fileno _fileno /* of _fileno */ - #endif --- -1.8.4 - diff --git a/src/gstreamer.mk b/src/gstreamer.mk index 2509c356..7f83d4f5 100644 --- a/src/gstreamer.mk +++ b/src/gstreamer.mk @@ -1,17 +1,17 @@ -# 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 := gstreamer +$(PKG)_WEBSITE := https://gstreamer.freedesktop.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 1.4.5 -$(PKG)_CHECKSUM := 40801aa7f979024526258a0e94707ba42b8ab6f7d2206e56adbc4433155cb0ae +$(PKG)_VERSION := 1.6.2 +$(PKG)_CHECKSUM := 5896716bd8e089dba452932a2eff2bb6f6c9d58ff64a96635d157f1ffaf8feb2 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://gstreamer.freedesktop.org/src/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://gstreamer.freedesktop.org/src/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc glib libxml2 pthreads define $(PKG)_UPDATE - $(WGET) -q -O- 'http://cgit.freedesktop.org/gstreamer/gstreamer/refs/tags' | \ + $(WGET) -q -O- 'https://cgit.freedesktop.org/gstreamer/gstreamer/refs/tags' | \ $(SED) -n "s,.*<a href='[^']*/tag/?id=[^0-9]*\\([0-9]\.[02468]\.[0-9][^']*\\)'.*,\\1,p" | \ $(SORT) -Vr | \ head -1 @@ -21,10 +21,7 @@ define $(PKG)_BUILD $(SED) -i 's,glib-mkenums,$(PREFIX)/$(TARGET)/bin/glib-mkenums,g' '$(1)'/gst/Makefile.in $(SED) -i 's,glib-genmarshal,$(PREFIX)/$(TARGET)/bin/glib-genmarshal,g' '$(1)'/gst/Makefile.in cd '$(1)' && ./configure \ - --host='$(TARGET)' \ - --build="`config.guess`" \ - --prefix='$(PREFIX)/$(TARGET)' \ - --disable-shared \ + $(MXE_CONFIGURE_OPTS) \ --disable-debug \ --disable-check \ --disable-tests \ @@ -33,6 +30,9 @@ define $(PKG)_BUILD --docdir='$(1)/sink' \ --with-html-dir='$(1)/sink' $(MAKE) -C '$(1)' -j '$(JOBS)' install -endef -$(PKG)_BUILD_SHARED = + # some .dlls are installed to lib - no obvious way to change + $(if $(BUILD_SHARED), + mv -vf '$(PREFIX)/$(TARGET)/lib/gstreamer-1.0/'*.dll '$(PREFIX)/$(TARGET)/bin/' + ) +endef diff --git a/src/gta-test.c b/src/gta-test.c index efaeed5a..2820c045 100644 --- a/src/gta-test.c +++ b/src/gta-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <gta/gta.h> diff --git a/src/gta.mk b/src/gta.mk index d68abaf3..d6ec54fe 100644 --- a/src/gta.mk +++ b/src/gta.mk @@ -1,17 +1,17 @@ -# 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 := gta +$(PKG)_WEBSITE := http://www.nongnu.org/gta/ $(PKG)_IGNORE := $(PKG)_VERSION := 1.0.7 $(PKG)_CHECKSUM := 85763f6b1a223d89e4ac000f5048d1d5bcd39b315192bca4e123fd89c24a0db5 $(PKG)_SUBDIR := libgta-$($(PKG)_VERSION) $(PKG)_FILE := libgta-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://download.savannah.gnu.org/releases/gta/$($(PKG)_FILE) +$(PKG)_URL := https://download.savannah.gnu.org/releases/gta/$($(PKG)_FILE) $(PKG)_DEPS := gcc bzip2 xz zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.savannah.gnu.org/gitweb/?p=gta.git;a=tags' | \ + $(WGET) -q -O- 'https://git.savannah.gnu.org/gitweb/?p=gta.git;a=tags' | \ grep '<a class="list subject"' | \ $(SED) -n 's,.*<a[^>]*>libgta-\([0-9.]*\)<.*,\1,p' | \ head -1 @@ -26,7 +26,7 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-gta.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-gta.exe' \ `'$(TARGET)-pkg-config' gta --cflags --libs` endef diff --git a/src/gtk2-1-fixes.patch b/src/gtk2-1-fixes.patch index 2eb0c064..942cd4e0 100644 --- a/src/gtk2-1-fixes.patch +++ b/src/gtk2-1-fixes.patch @@ -1,16 +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. Contains ad hoc patches for cross building. -From 374c56944944128d57b33b3b5c1be978a02d3dbb Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Fri, 24 Sep 2010 14:43:43 +0200 -Subject: [PATCH 01/10] s,DllMain,static _disabled_DllMain, +Subject: [PATCH] s,DllMain,static _disabled_DllMain, diff --git a/gdk/win32/gdkmain-win32.c b/gdk/win32/gdkmain-win32.c -index dc139be..e68a490 100644 +index 1111111..2222222 100644 --- a/gdk/win32/gdkmain-win32.c +++ b/gdk/win32/gdkmain-win32.c @@ -65,7 +65,7 @@ const GOptionEntry _gdk_windowing_args[] = { @@ -23,7 +22,7 @@ index dc139be..e68a490 100644 LPVOID reserved) { diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c -index 56c92db..655f575 100644 +index 1111111..2222222 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -74,7 +74,7 @@ @@ -35,18 +34,15 @@ index 56c92db..655f575 100644 DWORD fdwReason, LPVOID lpvReserved) { --- -1.8.2.2 - -From 8e08b42e368166814289abf32958c979d8d480c6 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Fri, 24 Sep 2010 14:46:20 +0200 -Subject: [PATCH 02/10] s,__declspec(dllimport),, +Subject: [PATCH] s,__declspec(dllimport),, diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h -index eed3124..7ef1731 100644 +index 1111111..2222222 100644 --- a/gdk/gdktypes.h +++ b/gdk/gdktypes.h @@ -41,7 +41,7 @@ @@ -59,7 +55,7 @@ index eed3124..7ef1731 100644 #else # define GDKVAR extern diff --git a/gtk/gtkdebug.h b/gtk/gtkdebug.h -index 05964f8..a500a8e 100644 +index 1111111..2222222 100644 --- a/gtk/gtkdebug.h +++ b/gtk/gtkdebug.h @@ -66,7 +66,7 @@ typedef enum { @@ -72,7 +68,7 @@ index 05964f8..a500a8e 100644 #else # define GTKVAR extern diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h -index 02a1dae..59e0960 100644 +index 1111111..2222222 100644 --- a/gtk/gtkmain.h +++ b/gtk/gtkmain.h @@ -69,7 +69,7 @@ typedef gint (*GtkKeySnoopFunc) (GtkWidget *grab_widget, @@ -85,7 +81,7 @@ index 02a1dae..59e0960 100644 #else #define GTKMAIN_C_VAR extern diff --git a/gtk/gtktexttypes.h b/gtk/gtktexttypes.h -index c624aea..b792ea5 100644 +index 1111111..2222222 100644 --- a/gtk/gtktexttypes.h +++ b/gtk/gtktexttypes.h @@ -46,7 +46,7 @@ typedef struct _GtkTextMarkBody GtkTextMarkBody; @@ -97,18 +93,15 @@ index c624aea..b792ea5 100644 #endif #else #define VARIABLE extern --- -1.8.2.2 - -From 59408e4752be8277c26f9ae458a086874844ab2b Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Fri, 24 Sep 2010 15:03:28 +0200 -Subject: [PATCH 03/10] s,__declspec(dllexport),, +Subject: [PATCH] s,__declspec(dllexport),, diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h -index 7ef1731..7adb7fc 100644 +index 1111111..2222222 100644 --- a/gdk/gdktypes.h +++ b/gdk/gdktypes.h @@ -39,7 +39,7 @@ @@ -121,7 +114,7 @@ index 7ef1731..7adb7fc 100644 # define GDKVAR extern # endif diff --git a/gtk/gtkdebug.h b/gtk/gtkdebug.h -index a500a8e..4cc012f 100644 +index 1111111..2222222 100644 --- a/gtk/gtkdebug.h +++ b/gtk/gtkdebug.h @@ -64,7 +64,7 @@ typedef enum { @@ -134,7 +127,7 @@ index a500a8e..4cc012f 100644 # define GTKVAR extern # endif diff --git a/gtk/gtkmain.h b/gtk/gtkmain.h -index 59e0960..0d0c8d0 100644 +index 1111111..2222222 100644 --- a/gtk/gtkmain.h +++ b/gtk/gtkmain.h @@ -67,7 +67,7 @@ typedef gint (*GtkKeySnoopFunc) (GtkWidget *grab_widget, @@ -147,7 +140,7 @@ index 59e0960..0d0c8d0 100644 #define GTKMAIN_C_VAR extern #endif diff --git a/gtk/gtktexttypes.h b/gtk/gtktexttypes.h -index b792ea5..f382a64 100644 +index 1111111..2222222 100644 --- a/gtk/gtktexttypes.h +++ b/gtk/gtktexttypes.h @@ -44,7 +44,7 @@ typedef struct _GtkTextMarkBody GtkTextMarkBody; @@ -159,18 +152,15 @@ index b792ea5..f382a64 100644 #else #define VARIABLE extern #endif --- -1.8.2.2 - -From 15527e24127117bbaf24dec513daa6fb67a00a8c Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Fri, 24 Sep 2010 14:17:22 +0200 -Subject: [PATCH 04/10] fix gtk+-2.0.pc.in +Subject: [PATCH] fix gtk+-2.0.pc.in diff --git a/gtk+-2.0.pc.in b/gtk+-2.0.pc.in -index 46853e1..7f3eb22 100644 +index 1111111..2222222 100644 --- a/gtk+-2.0.pc.in +++ b/gtk+-2.0.pc.in @@ -11,5 +11,5 @@ Name: GTK+ @@ -180,44 +170,38 @@ index 46853e1..7f3eb22 100644 -Libs: -L${libdir} -lgtk-${target}-@GTK_API_VERSION@ @GTK_EXTRA_LIBS@ +Libs: -L${libdir} -lgtk-${target}-@GTK_API_VERSION@ @GTK_DEP_LIBS@ -lwinspool -lcomctl32 -lcomdlg32 Cflags: -I${includedir}/gtk-2.0 @GTK_EXTRA_CFLAGS@ --- -1.8.2.2 - -From 165597a3bbe73e830d79dbd2d109e3b075ea2985 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Fri, 24 Sep 2010 14:48:31 +0200 -Subject: [PATCH 05/10] disable gtkbuiltincache +Subject: [PATCH] disable gtkbuiltincache diff --git a/gtk/Makefile.in b/gtk/Makefile.in -index 54200e7..e984933 100644 +index 1111111..2222222 100644 --- a/gtk/Makefile.in +++ b/gtk/Makefile.in -@@ -5660,7 +5660,7 @@ stamp-icons: $(STOCK_ICONS) +@@ -5713,7 +5713,7 @@ stamp-icons: $(STOCK_ICONS) ) done \ && touch stamp-icons -gtkbuiltincache.h: @REBUILD@ stamp-icons +_disabled_gtkbuiltincache.h: @REBUILD@ stamp-icons - $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT) $(GTK_UPDATE_ICON_CACHE_MANIFEST) + $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT) $(gtk_update_icon_cache_program) --force --ignore-theme-index \ - --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \ --- -1.8.2.2 + --include-image-data \ - -From 465171f3b0ebba7760719c0ee86a0d0f216fe51e Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Fri, 24 Sep 2010 14:49:50 +0200 -Subject: [PATCH 06/10] disable test-inline-pixbufs.h +Subject: [PATCH] disable test-inline-pixbufs.h diff --git a/demos/Makefile.in b/demos/Makefile.in -index 97e9536..abf0f14 100644 +index 1111111..2222222 100644 --- a/demos/Makefile.in +++ b/demos/Makefile.in -@@ -488,7 +488,7 @@ LDADDS = \ +@@ -529,7 +529,7 @@ LDADDS = \ $(GTK_DEP_LIBS) \ $(MATH_LIB) @@ -226,21 +210,18 @@ index 97e9536..abf0f14 100644 testpixbuf_DEPENDENCIES = $(DEPS) testpixbuf_drawable_DEPENDENCIES = $(DEPS) testpixbuf_save_DEPENDENCIES = $(DEPS) --- -1.8.2.2 - -From 417065a8b000250f6553c2801a26eae4491041dd Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Fri, 24 Sep 2010 14:51:04 +0200 -Subject: [PATCH 07/10] permit static building +Subject: [PATCH] permit static building diff --git a/configure b/configure -index c61e096..34a116d 100755 +index 1111111..2222222 100755 --- a/configure +++ b/configure -@@ -4530,9 +4530,9 @@ if test "${enable_static+set}" = set; then : +@@ -4649,9 +4649,9 @@ if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -250,9 +231,9 @@ index c61e096..34a116d 100755 - enable_static=no + enable_static=yes # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do -@@ -4545,7 +4545,7 @@ if test "${enable_static+set}" = set; then : +@@ -4664,7 +4664,7 @@ if test "${enable_static+set}" = set; then : ;; esac else @@ -261,7 +242,7 @@ index c61e096..34a116d 100755 fi -@@ -5114,15 +5114,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +@@ -5233,15 +5233,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "$os_win32" = "yes"; then if test x$enable_static = xyes -o x$enable_static = x; then @@ -283,7 +264,7 @@ index c61e096..34a116d 100755 fi enable_win32_dll=yes -@@ -8951,7 +8951,7 @@ func_stripname_cnf () +@@ -9265,7 +9265,7 @@ func_stripname_cnf () if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in @@ -292,15 +273,15 @@ index c61e096..34a116d 100755 no) enable_shared=no ;; *) enable_shared=no -@@ -8960,14 +8960,14 @@ if test "${enable_shared+set}" = set; then : +@@ -9274,14 +9274,14 @@ if test "${enable_shared+set}" = set; then : for pkg in $enableval; do - IFS="$lt_save_ifs" + IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then - enable_shared=yes + enable_shared=no fi done - IFS="$lt_save_ifs" + IFS=$lt_save_ifs ;; esac else @@ -309,39 +290,36 @@ index c61e096..34a116d 100755 fi -@@ -12854,7 +12854,7 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } +@@ -13455,7 +13455,7 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } # are all built from PIC. case $host_os in aix3*) -- test "$enable_shared" = yes && enable_static=no -+ test "$enable_shared" = yes && enable_static=yes +- test yes = "$enable_shared" && enable_static=no ++ test yes = "$enable_shared" && enable_static=yes if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' -@@ -12863,7 +12863,7 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then -- test "$enable_shared" = yes && enable_static=no -+ test "$enable_shared" = yes && enable_static=yes +@@ -13467,7 +13467,7 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } + case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in + yes,aix,yes) ;; # shared object as lib.so file only + yes,svr4,*) ;; # shared object as lib.so archive member only +- yes,*) enable_static=no ;; # shared object in lib.a archive as well ++ yes,*) enable_static=yes ;; # shared object in lib.a archive as well + esac fi ;; - esac --- -1.8.2.2 - -From 907f9831f56004a322d785f34417e99735de3109 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Fri, 24 Sep 2010 14:53:18 +0200 -Subject: [PATCH 08/10] no -Wl +Subject: [PATCH] no -Wl diff --git a/configure b/configure -index 34a116d..3c12234 100755 +index 1111111..2222222 100755 --- a/configure +++ b/configure -@@ -23441,7 +23441,7 @@ fi +@@ -24018,7 +24018,7 @@ fi fi if test "x$gdktarget" = "xwin32"; then @@ -350,21 +328,18 @@ index 34a116d..3c12234 100755 if true; then USE_WIN32_TRUE= USE_WIN32_FALSE='#' --- -1.8.2.2 - -From 1e02f2e984433a899bc642af5622bea971a06a3a Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Fri, 24 Sep 2010 14:54:15 +0200 -Subject: [PATCH 09/10] gio not gio-unix +Subject: [PATCH] gio not gio-unix diff --git a/configure b/configure -index 3c12234..ce40ad1 100755 +index 1111111..2222222 100755 --- a/configure +++ b/configure -@@ -23673,9 +23673,9 @@ fi +@@ -24250,9 +24250,9 @@ fi CFLAGS="$saved_cflags" LDFLAGS="$saved_ldflags" @@ -376,18 +351,15 @@ index 3c12234..ce40ad1 100755 else GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 gdk-pixbuf-2.0 cairo-$cairo_backend" fi --- -1.8.2.2 - -From b9bd33ba09c0297b874b7e6955864e6a76b83364 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Fri, 24 Sep 2010 15:30:49 +0200 -Subject: [PATCH 10/10] removed duplicate _gtk_marshal_OBJECT__VOID() +Subject: [PATCH] removed duplicate _gtk_marshal_OBJECT__VOID() diff --git a/perf/marshalers.c b/perf/marshalers.c -index 9a8c715..14f5ab1 100644 +index 1111111..2222222 100644 --- a/perf/marshalers.c +++ b/perf/marshalers.c @@ -49,43 +49,6 @@ @@ -405,9 +377,9 @@ index 9a8c715..14f5ab1 100644 -{ - typedef GObject* (*GMarshalFunc_OBJECT__VOID) (gpointer data1, - gpointer data2); -- register GMarshalFunc_OBJECT__VOID callback; -- register GCClosure *cc = (GCClosure*) closure; -- register gpointer data1, data2; +- GMarshalFunc_OBJECT__VOID callback; +- GCClosure *cc = (GCClosure*) closure; +- gpointer data1, data2; - GObject* v_return; - - g_return_if_fail (return_value != NULL); @@ -434,6 +406,3 @@ index 9a8c715..14f5ab1 100644 /* VOID:ENUM,OBJECT,DOUBLE (./marshalers.list:2) */ void _gtk_marshal_VOID__ENUM_OBJECT_DOUBLE (GClosure *closure, --- -1.8.2.2 - diff --git a/src/gtk2-test.c b/src/gtk2-test.c index e0e7aba2..3c6d8f7f 100644 --- a/src/gtk2-test.c +++ b/src/gtk2-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <gtk/gtk.h> diff --git a/src/gtk2.mk b/src/gtk2.mk index 55137c8a..884bb030 100644 --- a/src/gtk2.mk +++ b/src/gtk2.mk @@ -1,17 +1,18 @@ -# 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 := gtk2 +$(PKG)_WEBSITE := https://gtk.org/ +$(PKG)_DESCR := GTK+ $(PKG)_IGNORE := -$(PKG)_VERSION := 2.24.22 -$(PKG)_CHECKSUM := b114b6e9fb389bf3aa8a6d09576538f58dce740779653084046852fb4140ae7f +$(PKG)_VERSION := 2.24.29 +$(PKG)_CHECKSUM := 0741c59600d3d810a223866453dc2bbb18ce4723828681ba24aa6519c37631b8 $(PKG)_SUBDIR := gtk+-$($(PKG)_VERSION) $(PKG)_FILE := gtk+-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/gtk+/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/gtk+/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc atk cairo gdk-pixbuf gettext glib jasper jpeg libpng pango tiff define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/gtk+/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/gtk+/refs/tags' | \ grep '<a href=' | \ $(SED) -n 's,.*<a[^>]*>\([0-9]*\.[0-9]*[02468]\.[^<]*\)<.*,\1,p' | \ grep -v '^2\.9' | \ @@ -35,7 +36,7 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-gtk2.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-gtk2.exe' \ `'$(TARGET)-pkg-config' gtk+-2.0 gmodule-2.0 --cflags --libs` endef diff --git a/src/gtk3-1-fixes.patch b/src/gtk3-1-fixes.patch index 33c5828e..8844b78a 100644 --- a/src/gtk3-1-fixes.patch +++ b/src/gtk3-1-fixes.patch @@ -1,39 +1,17 @@ -This file is part of MXE. -See index.html for further information. +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, 29 Jan 2017 21:47:39 +0100 +Subject: [PATCH] These were adapted from the gtk2 patchset. ---- -These were adapted from the gtk2 patchset. - ---- a/configure -+++ b/configure -@@ -7005,15 +7005,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - - if test "$os_win32" = "yes"; then - if test x$enable_static = xyes -o x$enable_static = x; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling static library build, must build as DLL on Windows." >&5 --$as_echo "$as_me: WARNING: Disabling static library build, must build as DLL on Windows." >&2;} -- enable_static=no -+ { $as_echo "(disabled warning)" >&5 -+$as_echo "(disabled warning)" >&2;} -+ enable_static=yes - fi - if test x$enable_shared = xno; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Enabling shared library build, must build as DLL on Windows." >&5 --$as_echo "$as_me: WARNING: Enabling shared library build, must build as DLL on Windows." >&2;} -+ { $as_echo "(disabled warning)" >&5 -+$as_echo "(disabled warning)" >&2;} - fi -- enable_shared=yes -+ enable_shared=no - fi - - ---- a/gdk/win32/gdkmain-win32.c 2015-07-25 23:15:29.947190754 +0200 -+++ b/gdk/win32/gdkmain-win32.c 2015-07-25 23:15:55.723190733 +0200 -@@ -64,7 +64,7 @@ +diff --git a/gdk/win32/gdkmain-win32.c b/gdk/win32/gdkmain-win32.c +index 1111111..2222222 100644 +--- a/gdk/win32/gdkmain-win32.c ++++ b/gdk/win32/gdkmain-win32.c +@@ -64,7 +64,7 @@ const GOptionEntry _gdk_windowing_args[] = { }; BOOL WINAPI @@ -42,8 +20,21 @@ These were adapted from the gtk2 patchset. DWORD dwReason, LPVOID reserved) { ---- a/gtk/gtkwin32.c 2015-07-25 23:20:57.735190485 +0200 -+++ b/gtk/gtkwin32.c 2015-07-25 23:21:13.447190472 +0200 +diff --git a/gtk+-3.0.pc.in b/gtk+-3.0.pc.in +index 1111111..2222222 100644 +--- a/gtk+-3.0.pc.in ++++ b/gtk+-3.0.pc.in +@@ -12,5 +12,5 @@ Description: GTK+ Graphical UI Library + Version: @VERSION@ + Requires: gdk-@GTK_API_VERSION@ @GTK_PACKAGES@ + Requires.private: @GTK_PRIVATE_PACKAGES@ +-Libs: -L${libdir} -lgtk-3 @GTK_EXTRA_LIBS@ ++Libs: -L${libdir} -lgtk-3 @GTK_DEP_LIBS@ -lwinspool -lcomctl32 -lcomdlg32 + Cflags: -I${includedir}/gtk-@GTK_API_VERSION@ @GTK_EXTRA_CFLAGS@ +diff --git a/gtk/gtkwin32.c b/gtk/gtkwin32.c +index 1111111..2222222 100644 +--- a/gtk/gtkwin32.c ++++ b/gtk/gtkwin32.c @@ -42,7 +42,7 @@ static HMODULE gtk_dll; @@ -53,87 +44,53 @@ These were adapted from the gtk2 patchset. DWORD fdwReason, LPVOID lpvReserved) { ---- a/gtk+-3.0.pc.in 2015-07-26 16:55:29.755170491 +0200 -+++ b/gtk+-3.0.pc.in 2015-07-26 16:56:23.655170447 +0200 -@@ -12,5 +12,5 @@ - Version: @VERSION@ - Requires: gdk-@GTK_API_VERSION@ @GTK_PACKAGES@ - Requires.private: @GTK_PRIVATE_PACKAGES@ --Libs: -L${libdir} -lgtk-3 @GTK_EXTRA_LIBS@ -+Libs: -L${libdir} -lgtk-3 @GTK_DEP_LIBS@ -lwinspool -lcomctl32 -lcomdlg32 - Cflags: -I${includedir}/gtk-@GTK_API_VERSION@ @GTK_EXTRA_CFLAGS@ ---- -Here there were two problems, one is that util/extract-strings.exe -was being cross-built while it should be built locally, the other is -that in fact it wasn't even being built because of some problem with -makefile variables (PROGRAMS appears to be empty even if it is set to -a nonempty value). ---- a/util/Makefile.in 2014-10-21 17:03:07.000000000 +0200 -+++ b/util/Makefile.in 2014-12-27 23:12:40.910506266 +0100 -@@ -107,9 +107,8 @@ - am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) - am__v_lt_0 = --silent - am__v_lt_1 = --extract_strings_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ -- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ -- $(extract_strings_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -+extract_strings_LINK = $(CC_FOR_BUILD) \ -+ $(extract_strings_CFLAGS) $(CFLAGS_FOR_BUILD) $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD) \ - -o $@ - AM_V_P = $(am__v_P_@AM_V@) - am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -@@ -485,7 +484,7 @@ - - extract-strings$(EXEEXT): $(extract_strings_OBJECTS) $(extract_strings_DEPENDENCIES) $(EXTRA_extract_strings_DEPENDENCIES) - @rm -f extract-strings$(EXEEXT) -- $(AM_V_CCLD)$(extract_strings_LINK) $(extract_strings_OBJECTS) $(extract_strings_LDADD) $(LIBS) -+ $(AM_V_CCLD)$(extract_strings_LINK) $(extract_strings_OBJECTS) $(extract_strings_LDADD) - - mostlyclean-compile: - -rm -f *.$(OBJEXT) -@@ -517,7 +516,7 @@ - @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - - extract_strings-extract-strings.o: extract-strings.c --@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(extract_strings_CFLAGS) $(CFLAGS) -MT extract_strings-extract-strings.o -MD -MP -MF $(DEPDIR)/extract_strings-extract-strings.Tpo -c -o extract_strings-extract-strings.o `test -f 'extract-strings.c' || echo '$(srcdir)/'`extract-strings.c -+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS_FOR_BUILD) $(extract_strings_CFLAGS) $(CFLAGS_FOR_BUILD) -MT extract_strings-extract-strings.o -MD -MP -MF $(DEPDIR)/extract_strings-extract-strings.Tpo -c -o extract_strings-extract-strings.o `test -f 'extract-strings.c' || echo '$(srcdir)/'`extract-strings.c - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/extract_strings-extract-strings.Tpo $(DEPDIR)/extract_strings-extract-strings.Po - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='extract-strings.c' object='extract_strings-extract-strings.o' libtool=no @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@@ -620,7 +619,7 @@ - done - check-am: all-am - check: check-am --all-am: Makefile $(PROGRAMS) -+all-am: Makefile extract-strings$(EXEEXT) - installdirs: - install: install-am - install-exec: install-exec-am ---- -This one fixes "cd $builddir" failing because neither $builddir nor -$HOME were set +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Sun, 29 Jan 2017 21:50:48 +0100 +Subject: [PATCH] Not sure what happens when this line is commented out ---- a/configure 2015-07-24 21:19:46.839151097 +0200 -+++ b/configure 2015-07-24 21:20:13.655151075 +0200 -@@ -23215,7 +23215,7 @@ - NATIVE_GDKPIXBUF_LIBS=`$PKG_CONFIG_FOR_BUILD --libs gdk-pixbuf-2.0` - # This is the native gtk-update-icon-cache which will be used at - # build time, NOT the one installed on the target host. -- GTK_UPDATE_ICON_CACHE="`cd $builddir && pwd`/gtk/native/native-update-icon-cache$BUILD_EXEEXT" -+ GTK_UPDATE_ICON_CACHE="`pwd`/gtk/native/native-update-icon-cache$BUILD_EXEEXT" - - - ---- -Not sure what happens when this line is commented out. ---- a/gtk/a11y/gtkaccessibility.c 2014-08-15 16:38:05.000000000 +0200 -+++ b/gtk/a11y/gtkaccessibility.c 2015-07-26 17:43:36.647168119 +0200 -@@ -991,5 +991,5 @@ +diff --git a/gtk/a11y/gtkaccessibility.c b/gtk/a11y/gtkaccessibility.c +index 1111111..2222222 100644 +--- a/gtk/a11y/gtkaccessibility.c ++++ b/gtk/a11y/gtkaccessibility.c +@@ -992,5 +992,5 @@ _gtk_accessibility_init (void) atk_bridge_adaptor_init (NULL, NULL); #endif - atk_misc_instance = g_object_new (GTK_TYPE_MISC_IMPL, NULL); + /* atk_misc_instance = g_object_new (GTK_TYPE_MISC_IMPL, NULL); */ } + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Sun, 29 Jan 2017 22:50:45 +0100 +Subject: [PATCH] disable gtk-update-icon-cache + +The error: https://gist.github.com/b3030a43a325ee7646a2bda2864465b5 + +diff --git a/demos/gtk-demo/Makefile.in b/demos/gtk-demo/Makefile.in +index 1111111..2222222 100644 +--- a/demos/gtk-demo/Makefile.in ++++ b/demos/gtk-demo/Makefile.in +@@ -1422,7 +1422,6 @@ uninstall-hook: uninstall-update-icon-cache + + install-update-icon-cache: + $(AM_V_at)$(POST_INSTALL) +- test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)" + + uninstall-update-icon-cache: + $(AM_V_at)$(POST_UNINSTALL) +diff --git a/demos/widget-factory/Makefile.in b/demos/widget-factory/Makefile.in +index 1111111..2222222 100644 +--- a/demos/widget-factory/Makefile.in ++++ b/demos/widget-factory/Makefile.in +@@ -1161,7 +1161,6 @@ uninstall-hook: uninstall-update-icon-cache + + install-update-icon-cache: + $(AM_V_at)$(POST_INSTALL) +- test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)" + + uninstall-update-icon-cache: + $(AM_V_at)$(POST_UNINSTALL) diff --git a/src/gtk3-test.c b/src/gtk3-test.c index 74420343..25243bd4 100644 --- a/src/gtk3-test.c +++ b/src/gtk3-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <gtk/gtk.h> @@ -14,7 +13,7 @@ static void activate(GtkApplication *app) button = gtk_button_new_with_label("Hello World"); g_signal_connect_swapped(button, "clicked", - G_CALLBACK(gtk_widget_destroy), window); + G_CALLBACK(gtk_widget_destroy), window); gtk_container_add(GTK_CONTAINER(window), button); gtk_widget_show_all(window); diff --git a/src/gtk3.mk b/src/gtk3.mk index 7c33736f..49ca20e5 100644 --- a/src/gtk3.mk +++ b/src/gtk3.mk @@ -1,17 +1,18 @@ -# 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 := gtk3 +$(PKG)_WEBSITE := https://gtk.org/ +$(PKG)_DESCR := GTK+ $(PKG)_IGNORE := -$(PKG)_VERSION := 3.14.4 -$(PKG)_CHECKSUM := a006c716d723dab0c623491566e3292af84c87d9198a30199051d23cfc7bef2f +$(PKG)_VERSION := 3.22.7 +$(PKG)_CHECKSUM := a3a27564bfb1679ebbc75c37cd2bcd6e727c8bdfbcd3984d29305bf9ee60d432 $(PKG)_SUBDIR := gtk+-$($(PKG)_VERSION) $(PKG)_FILE := gtk+-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/gtk+/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) -$(PKG)_DEPS := gcc atk cairo gdk-pixbuf gettext glib jasper jpeg libpng pango tiff +$(PKG)_URL := https://download.gnome.org/sources/gtk+/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_DEPS := gcc atk cairo gdk-pixbuf gettext glib jasper jpeg libepoxy libpng pango tiff define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/gtk+/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/gtk+/refs/tags' | \ grep '<a href=' | \ $(SED) -n 's,.*<a[^>]*>\([0-9]*\.[0-9]*[02468]\.[^<]*\)<.*,\1,p' | \ grep '^3\.' | \ @@ -21,21 +22,17 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ $(MXE_CONFIGURE_OPTS) \ - --enable-explicit-deps \ --disable-glibtest \ - --disable-modules \ --disable-cups \ --disable-test-print-backend \ --disable-gtk-doc \ --disable-man \ --with-included-immodules \ - --without-x + --enable-win32-backend $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= '$(TARGET)-gcc' \ -W -Wall -Werror -ansi \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-gtk3.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-gtk3.exe' \ `'$(TARGET)-pkg-config' gtk+-3.0 --cflags --libs` endef - -$(PKG)_BUILD_SHARED = diff --git a/src/gtkglarea-1-fixes.patch b/src/gtkglarea-1-fixes.patch index 81216e9a..921521a0 100644 --- a/src/gtkglarea-1-fixes.patch +++ b/src/gtkglarea-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/gtkglarea.mk b/src/gtkglarea.mk index 68d8c85c..f40993e4 100644 --- a/src/gtkglarea.mk +++ b/src/gtkglarea.mk @@ -1,17 +1,18 @@ -# 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 := gtkglarea +$(PKG)_WEBSITE := http://www.mono-project.com/GtkGLArea/ +$(PKG)_DESCR := GtkGLArea $(PKG)_IGNORE := $(PKG)_VERSION := 2.0.1 $(PKG)_CHECKSUM := dffe1cc0512d20d3840d0a1f3eff727bf2207c5c6714125155ca0cee0b177179 $(PKG)_SUBDIR := gtkglarea-$($(PKG)_VERSION) $(PKG)_FILE := gtkglarea-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://mirrors.ircam.fr/pub/GNOME/sources/gtkglarea/2.0/$($(PKG)_FILE) +$(PKG)_URL := https://mirrors.ircam.fr/pub/GNOME/sources/gtkglarea/2.0/$($(PKG)_FILE) $(PKG)_DEPS := gcc freeglut gtk2 define $(PKG)_UPDATE - $(WGET) -q -O- 'mirrors.ircam.fr/pub/GNOME/sources/gtkglarea/2.0' | \ + $(WGET) -q -O- 'https://mirrors.ircam.fr/pub/GNOME/sources/gtkglarea/2.0' | \ $(SED) -n 's,.*gtkglarea-\(2[^>]*\)\.tar.*,\1,ip' | \ $(SORT) | \ tail -1 diff --git a/src/gtkglext-1-fixes.patch b/src/gtkglext-1-fixes.patch index 2749cd1b..e2d9f18f 100644 --- a/src/gtkglext-1-fixes.patch +++ b/src/gtkglext-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/gtkglext-test.c b/src/gtkglext-test.c index 8f915f62..e1b9dd96 100644 --- a/src/gtkglext-test.c +++ b/src/gtkglext-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <gtk/gtk.h> diff --git a/src/gtkglext.mk b/src/gtkglext.mk index 83c45814..47e53750 100644 --- a/src/gtkglext.mk +++ b/src/gtkglext.mk @@ -1,17 +1,18 @@ -# 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 := gtkglext +$(PKG)_WEBSITE := https://gtkglext.sourceforge.io/ +$(PKG)_DESCR := GtkGLExt $(PKG)_IGNORE := $(PKG)_VERSION := 1.2.0 $(PKG)_CHECKSUM := e5073f3c6b816e7fa67d359d9745a5bb5de94a628ac85f624c992925a46844f9 $(PKG)_SUBDIR := gtkglext-$($(PKG)_VERSION) $(PKG)_FILE := gtkglext-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/gtkglext/gtkglext/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/gtkglext/gtkglext/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc gtk2 define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/cgit/gtkglext/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/cgit/gtkglext/refs/tags' | \ grep '<a href=' | \ $(SED) -n "s,.*<a href='[^']*/tag/?id=\\([0-9][^']*\\)'.*,\\1,p" | \ $(SORT) -V | \ @@ -40,7 +41,7 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-gtkglext.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-gtkglext.exe' \ `'$(TARGET)-pkg-config' gtkglext-1.0 --cflags --libs` endef diff --git a/src/gtkglextmm-1-fixes.patch b/src/gtkglextmm-1-fixes.patch index 178f748a..a4b3eb8c 100644 --- a/src/gtkglextmm-1-fixes.patch +++ b/src/gtkglextmm-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/gtkglextmm-test.cpp b/src/gtkglextmm-test.cpp index b0e36a6e..7416c36b 100644 --- a/src/gtkglextmm-test.cpp +++ b/src/gtkglextmm-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <gtkmm/main.h> diff --git a/src/gtkglextmm.mk b/src/gtkglextmm.mk index 5f7ea8b5..ea30eaa0 100644 --- a/src/gtkglextmm.mk +++ b/src/gtkglextmm.mk @@ -1,17 +1,18 @@ -# 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 := gtkglextmm +$(PKG)_WEBSITE := https://gtkglext.sourceforge.io/ +$(PKG)_DESCR := GtkGLExtmm $(PKG)_IGNORE := $(PKG)_VERSION := 1.2.0 $(PKG)_CHECKSUM := 8f499c1f95678c56cce908c10bf2c1d0f2267b87e0c480385fa4b128c75bdf7b $(PKG)_SUBDIR := gtkglextmm-$($(PKG)_VERSION) $(PKG)_FILE := gtkglextmm-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/gtkglext/gtkglextmm/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/gtkglext/gtkglextmm/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc gtkglext gtkmm2 define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/cgit/gtkglextmm/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/cgit/gtkglextmm/refs/tags' | \ grep '<a href=' | \ $(SED) -n "s,.*<a href='[^']*/tag/?id=\\([0-9][^']*\\)'.*,\\1,p" | \ $(SORT) -V | \ @@ -31,8 +32,8 @@ define $(PKG)_BUILD INFO_DEPS= '$(TARGET)-g++' \ - -W -Wall -Werror -pedantic -std=c++0x \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-gtkglextmm.exe' \ + -W -Wall -Werror -Wno-error=deprecated-declarations -pedantic -std=c++0x \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-gtkglextmm.exe' \ `'$(TARGET)-pkg-config' gtkglextmm-1.2 --cflags --libs` endef diff --git a/src/gtkimageview-1-configure.patch b/src/gtkimageview-1-configure.patch index 5ca49f6d..922c20b0 100644 --- a/src/gtkimageview-1-configure.patch +++ b/src/gtkimageview-1-configure.patch @@ -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. --- gtkimageview-1.6.4.orig/configure 2009-04-05 22:04:32.000000000 +0200 +++ gtkimageview-1.6.4/configure 2013-03-23 13:59:25.017941993 +0100 diff --git a/src/gtkimageview-test.c b/src/gtkimageview-test.c index e9626b48..fff2e73e 100644 --- a/src/gtkimageview-test.c +++ b/src/gtkimageview-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <gtkimageview/gtkimageview.h> diff --git a/src/gtkimageview.mk b/src/gtkimageview.mk index 1145d2ad..c6e0d902 100644 --- a/src/gtkimageview.mk +++ b/src/gtkimageview.mk @@ -1,7 +1,8 @@ -# 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 := gtkimageview +$(PKG)_WEBSITE := http://trac.bjourne.webfactional.com/ +$(PKG)_DESCR := GtkImageView $(PKG)_IGNORE := $(PKG)_VERSION := 1.6.4 $(PKG)_CHECKSUM := 4c681d38d127ee3950a29bce9aa7aa8a2abe3b4d915f7a0c88e526999c1a46f2 @@ -31,13 +32,14 @@ define $(PKG)_BUILD --prefix='$(PREFIX)/$(TARGET)' \ --disable-gtk-doc \ GLIB_GENMARSHAL='$(PREFIX)/$(TARGET)/bin/glib-genmarshal' \ - GLIB_MKENUMS='$(PREFIX)/$(TARGET)/bin/glib-mkenums' + GLIB_MKENUMS='$(PREFIX)/$(TARGET)/bin/glib-mkenums' \ + CFLAGS='-Wno-error=deprecated-declarations -std=c99' $(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= $(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= '$(TARGET)-gcc' \ -W -Wall -Werror -ansi \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-gtkimageview.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-gtkimageview.exe' \ `'$(TARGET)-pkg-config' gtkimageview --cflags --libs` endef diff --git a/src/gtkmm2-test.cpp b/src/gtkmm2-test.cpp index f5f1116a..1f1f883c 100644 --- a/src/gtkmm2-test.cpp +++ b/src/gtkmm2-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <gtkmm/window.h> diff --git a/src/gtkmm2.mk b/src/gtkmm2.mk index abc4de33..cb61e8ac 100644 --- a/src/gtkmm2.mk +++ b/src/gtkmm2.mk @@ -1,17 +1,18 @@ -# 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 := gtkmm2 +$(PKG)_WEBSITE := https://www.gtkmm.org/ +$(PKG)_DESCR := GTKMM $(PKG)_IGNORE := $(PKG)_VERSION := 2.24.4 $(PKG)_CHECKSUM := 443a2ff3fcb42a915609f1779000390c640a6d7fd19ad8816e6161053696f5ee $(PKG)_SUBDIR := gtkmm-$($(PKG)_VERSION) $(PKG)_FILE := gtkmm-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/gtkmm/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/gtkmm/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc atkmm cairomm gtk2 libsigc++ pangomm define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/gtkmm/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/gtkmm/refs/tags' | \ grep '<a href=' | \ $(SED) -n 's,.*<a[^>]*>\([0-9]*\.[0-9]*[02468]\.[^<]*\)<.*,\1,p' | \ grep -v '^2\.9' | \ @@ -30,8 +31,8 @@ define $(PKG)_BUILD $(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= doc_install='# DISABLED: doc-install.pl' '$(TARGET)-g++' \ - -W -Wall -Werror -pedantic -std=c++0x \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-gtkmm2.exe' \ + -W -Wall -Wno-deprecated-declarations -Werror -pedantic -std=c++11 \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-gtkmm2.exe' \ `'$(TARGET)-pkg-config' gtkmm-2.4 --cflags --libs` endef diff --git a/src/gtkmm3-test.cpp b/src/gtkmm3-test.cpp index 131cf6c5..42eac525 100644 --- a/src/gtkmm3-test.cpp +++ b/src/gtkmm3-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <gtkmm/application.h> diff --git a/src/gtkmm3.mk b/src/gtkmm3.mk index 0d55651a..3cef0de9 100644 --- a/src/gtkmm3.mk +++ b/src/gtkmm3.mk @@ -1,17 +1,18 @@ -# 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 := gtkmm3 +$(PKG)_WEBSITE := https://www.gtkmm.org/ +$(PKG)_DESCR := GTKMM $(PKG)_IGNORE := $(PKG)_VERSION := 3.14.0 $(PKG)_CHECKSUM := d9f528a62c6ec226fa08287c45c7465b2dce5aae5068e9ac48d30a64a378e48b $(PKG)_SUBDIR := gtkmm-$($(PKG)_VERSION) $(PKG)_FILE := gtkmm-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/gtkmm/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/gtkmm/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc atkmm cairomm gtk3 libsigc++ pangomm define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/gtkmm/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/gtkmm/refs/tags' | \ grep '<a href=' | \ $(SED) -n 's,.*<a[^>]*>\([0-9]*\.[0-9]*[02468]\.[^<]*\)<.*,\1,p' | \ grep '^3\.' | \ @@ -20,18 +21,13 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ - --host='$(TARGET)' \ - --build="`config.guess`" \ - --disable-shared \ - --prefix='$(PREFIX)/$(TARGET)' \ + $(MXE_CONFIGURE_OPTS) \ MAKE=$(MAKE) $(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= $(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= doc_install='# DISABLED: doc-install.pl' '$(TARGET)-g++' \ - -W -Wall -Werror -pedantic -std=c++0x \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-gtkmm3.exe' \ + -W -Wall -Wno-deprecated-declarations -Werror -pedantic -std=c++11 \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-gtkmm3.exe' \ `'$(TARGET)-pkg-config' gtkmm-3.0 --cflags --libs` endef - -$(PKG)_BUILD_SHARED = diff --git a/src/gtksourceview.mk b/src/gtksourceview.mk index 9f1b9aa3..8d0f4fcc 100644 --- a/src/gtksourceview.mk +++ b/src/gtksourceview.mk @@ -1,17 +1,18 @@ -# 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 := gtksourceview +$(PKG)_WEBSITE := https://projects.gnome.org/gtksourceview/ +$(PKG)_DESCR := GTKSourceView $(PKG)_IGNORE := $(PKG)_VERSION := 2.10.5 $(PKG)_CHECKSUM := c585773743b1df8a04b1be7f7d90eecdf22681490d6810be54c81a7ae152191e $(PKG)_SUBDIR := gtksourceview-$($(PKG)_VERSION) $(PKG)_FILE := gtksourceview-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/gtksourceview/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/gtksourceview/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc gtk2 libxml2 define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/gtksourceview/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/gtksourceview/refs/tags' | \ $(SED) -n 's,.*>GTKSOURCEVIEW_\([0-9]\+_[0-9]*[02468]_[0-9_]\+\)<.*,\1,p' | \ $(SED) 's,_,.,g' | \ grep -v '^2\.9[0-9]\.' | \ diff --git a/src/gtksourceviewmm2.mk b/src/gtksourceviewmm2.mk index 63f7adea..120b654c 100644 --- a/src/gtksourceviewmm2.mk +++ b/src/gtksourceviewmm2.mk @@ -1,17 +1,18 @@ -# 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 := gtksourceviewmm2 +$(PKG)_WEBSITE := https://projects.gnome.org/gtksourceview/ +$(PKG)_DESCR := GtkSourceViewmm $(PKG)_IGNORE := $(PKG)_VERSION := 2.10.3 $(PKG)_CHECKSUM := 0000df1b582d7be2e412020c5d748f21c0e6e5074c6b2ca8529985e70479375b $(PKG)_SUBDIR := gtksourceviewmm-$($(PKG)_VERSION) $(PKG)_FILE := $($(PKG)_SUBDIR).tar.xz -$(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/gtksourceviewmm/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/gtksourceviewmm/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc gtkmm2 gtksourceview define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/cgit/gtksourceviewmm/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/cgit/gtksourceviewmm/refs/tags' | \ grep '<a href=' | \ $(SED) -n "s,.*<a href='[^']*/tag/?id=gtksourceviewmm-\\([0-9][^']*\\)'.*,\\1,p" | \ grep -v '^2\.9[0-9]\.' | \ diff --git a/src/guile-1-fixes.patch b/src/guile-1-fixes.patch index 50fb5e7b..bff5c545 100644 --- a/src/guile-1-fixes.patch +++ b/src/guile-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/guile-test.c b/src/guile-test.c index dcb99429..e33eb02b 100644 --- a/src/guile-test.c +++ b/src/guile-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdlib.h> diff --git a/src/guile.mk b/src/guile.mk index d604ac6e..bc27696f 100644 --- a/src/guile.mk +++ b/src/guile.mk @@ -1,17 +1,18 @@ -# 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 := guile +$(PKG)_WEBSITE := https://www.gnu.org/software/guile/ +$(PKG)_DESCR := GNU Guile $(PKG)_IGNORE := 2% $(PKG)_VERSION := 1.8.8 $(PKG)_CHECKSUM := c3471fed2e72e5b04ad133bbaaf16369e8360283679bcf19800bc1b381024050 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc gc gettext gmp libffi libgnurx libiconv libltdl libunistring readline define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.savannah.gnu.org/gitweb/?p=guile.git;a=tags' | \ + $(WGET) -q -O- 'https://git.savannah.gnu.org/gitweb/?p=guile.git;a=tags' | \ grep '<a class="list subject"' | \ $(SED) -n 's,.*<a[^>]*>[^0-9>]*\([0-9][^< ]*\)\.<.*,\1,p' | \ grep -v 2.* | \ @@ -37,7 +38,7 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-guile.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-guile.exe' \ `'$(TARGET)-pkg-config' guile-$(call SHORT_PKG_VERSION,$(PKG)) --cflags --libs` \ -DGUILE_MAJOR_MINOR=\"$(call SHORT_PKG_VERSION,$(PKG))\" endef diff --git a/src/hamlib-test.c b/src/hamlib-test.c new file mode 100644 index 00000000..4248c306 --- /dev/null +++ b/src/hamlib-test.c @@ -0,0 +1,106 @@ +/* This file is part of MXE. See LICENSE.md for licensing information. + * This is a elementary program calling and testing Hamlib. + */ + +#include <stdio.h> +#include <string.h> +#include <hamlib/rig.h> +#include <hamlib/riglist.h> + +int main(int argc, char *argv[]) { + RIG *my_rig; + char *rig_file, *info_buf, *mm; + freq_t freq; + value_t rawstrength, power, strength; + float s_meter, rig_raw2val(); + int status, retcode, isz; + unsigned int mwpower; + rmode_t mode; + pbwidth_t width; + rig_model_t myrig_model; + char portname[64]; + port_t myport; + + strncpy(portname, argv[2], 63); + portname[63] = '\0'; + + if ((strcmp(argv[2], "--help") == 0) || (argc < 2)) { + printf("use like: ./%s <portname>\n", argv[0]); + printf("example: ./%s /dev/ttyS0\n", argv[0]); + return 0; + } + + /* Try to detect rig */ + /* may be overriden by backend probe */ + myport.type.rig = RIG_PORT_SERIAL; + myport.parm.serial.rate = 9600; + myport.parm.serial.data_bits = 8; + myport.parm.serial.stop_bits = 1; + myport.parm.serial.parity = RIG_PARITY_NONE; + myport.parm.serial.handshake = RIG_HANDSHAKE_NONE; + strncpy(myport.pathname, portname, FILPATHLEN); + + rig_load_all_backends(); + myrig_model = rig_probe(&myport); + /* Set verbosity level - errors only */ + rig_set_debug(RIG_DEBUG_ERR); + /* Instantiate a rig - your rig */ + /* my_rig = rig_init(RIG_MODEL_TT565); */ + my_rig = rig_init(myrig_model); + /* Set up serial port, baud rate - serial device + baudrate */ + rig_file = "/dev/ttyUSB0"; + strncpy(my_rig->state.rigport.pathname, rig_file, FILPATHLEN - 1); + my_rig->state.rigport.parm.serial.rate = 57600; + my_rig->state.rigport.parm.serial.rate = 9600; + /* Open my rig */ + retcode = rig_open(my_rig); + printf("retcode of rig_open = %d \n", retcode); + /* Give me ID info, e.g., firmware version. */ + info_buf = (char *)rig_get_info(my_rig); + printf("Rig_info: '%s'\n", info_buf); + + /* Note: As a general practice, we should check to see if a given + * function is within the rig's capabilities before calling it, but + * we are simplifying here. Also, we should check each call's returned + * status in case of error. (That's an inelegant way to catch an unsupported + * operation.) + */ + + /* Main VFO frequency */ + status = rig_get_freq(my_rig, RIG_VFO_CURR, &freq); + printf("status of rig_get_freq = %d \n", status); + printf("VFO freq. = %.1f Hz\n", freq); + /* Current mode */ + status = rig_get_mode(my_rig, RIG_VFO_CURR, &mode, &width); + printf("status of rig_get_mode = %d \n", status); + switch(mode) { + case RIG_MODE_USB: mm = "USB"; break; + case RIG_MODE_LSB: mm = "LSB"; break; + case RIG_MODE_CW: mm = "CW"; break; + case RIG_MODE_CWR: mm = "CWR"; break; + case RIG_MODE_AM: mm = "AM"; break; + case RIG_MODE_FM: mm = "FM"; break; + case RIG_MODE_WFM: mm = "WFM"; break; + case RIG_MODE_RTTY:mm = "RTTY"; break; + default: mm = "unrecognized"; break; /* there are more possibilities! */ + } + printf("Current mode = 0x%X = %s, width = %d\n", mode, mm, (int) width); + /* rig power output */ + status = rig_get_level(my_rig, RIG_VFO_CURR, RIG_LEVEL_RFPOWER, &power); + printf("RF Power relative setting = %.3f (0.0 - 1.0)\n", power.f); + /* Convert power reading to watts */ + status = rig_power2mW(my_rig, &mwpower, power.f, freq, mode); + printf("RF Power calibrated = %.1f Watts\n", mwpower/1000.); + /* Raw and calibrated S-meter values */ + status = rig_get_level(my_rig, RIG_VFO_CURR, RIG_LEVEL_RAWSTR, &rawstrength); + printf("Raw receive strength = %d\n", rawstrength.i); + isz = my_rig->caps->str_cal.size; + printf("isz = %d \n", isz); + s_meter = rig_raw2val(rawstrength.i, &my_rig->caps->str_cal); + printf("S-meter value = %.2f dB relative to S9\n", s_meter); + /* now try using RIG_LEVEL_STRENGTH itself */ + status = rig_get_strength(my_rig, RIG_VFO_CURR, &strength); + printf("status of rig_get_strength = %d \n", status); + printf("LEVEL_STRENGTH returns %d\n", strength.i); +return 0; +} diff --git a/src/hamlib.mk b/src/hamlib.mk new file mode 100644 index 00000000..e71f4ad1 --- /dev/null +++ b/src/hamlib.mk @@ -0,0 +1,51 @@ +# This file is part of MXE. See LICENSE.md for licensing information. +# visit http://hamlib.org or https://github.com/N0NB/hamlib +# 2016-12-24 Lars Holger Engelhard DL5RCW + +PKG := hamlib +$(PKG)_WEBSITE := http://www.hamlib.org/ +$(PKG)_DESCR := HamLib +$(PKG)_IGNORE := +$(PKG)_VERSION := 3.0.1 +$(PKG)_CHECKSUM := 3fec97ea326d02aa8f35834c4af34194a3f544e6212f391397d788c566b44e32 +$(PKG)_SUBDIR := hamlib-$($(PKG)_VERSION) +$(PKG)_FILE := Hamlib-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/hamlib/hamlib/$($(PKG)_VERSION)/hamlib-$($(PKG)_VERSION).tar.gz +$(PKG)_URL_2 := https://github.com/N0NB/$(PKG)/archive/$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := gcc libltdl libusb1 libxml2 pthreads + +# grabbing version from sourceforge +# prefered by Nate N0NB +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://sourceforge.net/projects/hamlib/files/hamlib/' | \ + $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ + head -1 +endef + +## grabbing version from github via MXE +#define $(PKG)_UPDATE +# $(call MXE_GET_GITHUB_TAGS, N0NB/hamlib) +#endef + +define $(PKG)_BUILD + cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \ + $(MXE_CONFIGURE_OPTS) \ + --with-included-ltdl \ + --disable-winradio + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' || $(MAKE) -C '$(BUILD_DIR)' -j 1 + $(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_CRUFT) + + # create pkg-config files + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' + (echo 'Name: $(PKG)'; \ + echo 'Version: $(hamlib_VERSION)'; \ + echo 'Description: $(PKG)'; \ + echo 'Cflags: -DHAMLIB_LIB'; \ + echo 'Libs: -lhamlib -lpthread -lws2_32';) \ + > '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc' + + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(PWD)/src/$(PKG)-test.c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' --cflags --libs hamlib pthreads` +endef diff --git a/src/harfbuzz-1-fixes.patch b/src/harfbuzz-1-fixes.patch index f129acab..86acf473 100644 --- a/src/harfbuzz-1-fixes.patch +++ b/src/harfbuzz-1-fixes.patch @@ -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 c26e8bf6eeba0d7ed230dbc659e7abd8ed8277a1 Mon Sep 17 00:00:00 2001 From: Niels Kristian Bech Jensen <nkbj1970@hotmail.com> diff --git a/src/harfbuzz.mk b/src/harfbuzz.mk index f5b3bcc8..db4a5132 100644 --- a/src/harfbuzz.mk +++ b/src/harfbuzz.mk @@ -1,25 +1,28 @@ -# 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 := harfbuzz +$(PKG)_WEBSITE := https://wiki.freedesktop.org/www/Software/HarfBuzz/ +$(PKG)_DESCR := HarfBuzz $(PKG)_IGNORE := -$(PKG)_VERSION := 1.0.6 -$(PKG)_CHECKSUM := f616a7fbdc78a627043f9029000bf08c0c71df59cde4143fc92a014f6a993b26 +$(PKG)_VERSION := 1.4.6 +$(PKG)_CHECKSUM := 21a78b81cd20cbffdb04b59ac7edfb410e42141869f637ae1d6778e74928d293 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://www.freedesktop.org/software/$(PKG)/release/$($(PKG)_FILE) +$(PKG)_URL := https://www.freedesktop.org/software/$(PKG)/release/$($(PKG)_FILE) $(PKG)_DEPS := gcc cairo freetype-bootstrap glib icu4c define $(PKG)_UPDATE - $(WGET) -q -O- 'http://cgit.freedesktop.org/harfbuzz/refs/tags' | \ + $(WGET) -q -O- 'https://cgit.freedesktop.org/harfbuzz/refs/tags' | \ $(SED) -n "s,.*<a href='[^']*/tag/?id=[^0-9]*\\([0-9.]*\\)'.*,\\1,p" | \ $(SORT) -V | \ tail -1 endef define $(PKG)_BUILD + # mman-win32 is only a partial implementation cd '$(1)' && ./configure \ $(MXE_CONFIGURE_OPTS) \ + ac_cv_header_sys_mman_h=no \ LIBS='-lstdc++' $(MAKE) -C '$(1)' -j '$(JOBS)' install endef diff --git a/src/hdf-eos2-1-fixes.patch b/src/hdf-eos2-1-fixes.patch new file mode 100644 index 00000000..f392aa9a --- /dev/null +++ b/src/hdf-eos2-1-fixes.patch @@ -0,0 +1,137 @@ +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: Thomas Danckaert <thomas.danckaert@gmail.com> +Date: Thu, 3 Mar 2016 17:13:29 +0100 +Subject: [PATCH] Remove AC_TRY_RUN to fix cross compiling. + + +diff --git a/configure.ac b/configure.ac +index 1111111..2222222 100755 +--- a/configure.ac ++++ b/configure.ac +@@ -160,17 +160,7 @@ dnl Check if -Df2cFortran is specified + dnl Running only the preprocessor may not be a good idea + dnl because this can be hard-coded. + AC_MSG_CHECKING([for fc2Fortran macro]) +-AC_CACHE_VAL([he2_cv_f2cFortran_defined], +- [AC_TRY_RUN([ +- int main(void) +- { +- #ifdef f2cFortran +- return 0; +- #else +- return 1; +- #endif +- } +- ], [he2_cv_f2cFortran_defined=yes], [he2_cv_f2cFortran_defined=no],)]) ++AC_CACHE_VAL([he2_cv_f2cFortran_defined],[he2_cv_f2cFortran_defined=yes]) + if test ${he2_cv_f2cFortran_defined} = "yes"; then + F2CFORTRAN_MACRO="yes" + AC_MSG_RESULT([defined]) +@@ -181,18 +171,7 @@ fi + + if test ${he2_cv_f2cFortran_defined} = "yes"; then + +- AC_CHECK_SIZEOF([int*]) +- AC_CACHE_VAL([he2_cv_32ptr], +- [AC_TRY_RUN([ +- int main(void) +- { +-#ifdef SIZEOF_INTP +- return SIZEOF_INTP == 4 ? 0 : 1; +-#else +-#error SIZEOF_INTP is not defined +-#endif +- } +- ], [he2_cv_32ptr=yes], [he2_cv_32ptr=no],)]) ++ AC_CACHE_VAL([he2_cv_32ptr],[he2_cv_32ptr=no]) + if test ${he2_cv_32ptr} = "yes"; then + AC_MSG_NOTICE([possibly 32 bit system]) + F2CFORTRAN_32PTR="yes" +@@ -346,32 +325,9 @@ if test "X$HAVE_SZLIB" = "Xyes"; then + + AC_MSG_CHECKING([for szlib encoder]) + +- AC_CACHE_VAL([he2_cv_szlib_functional], +- [AC_TRY_RUN([ +- #include <stddef.h> +- #include <szlib.h> +- +- int main(void) +- { +- SZ_encoder_enabled(); +- exit(0); +- } +- ], [he2_cv_szlib_functional=yes], [he2_cv_szlib_functional=no],)]) +- +- AC_CACHE_VAL([he2_cv_szlib_can_encode], +- [AC_TRY_RUN([ +- #include <stddef.h> +- #include <szlib.h> +- +- int main(void) +- { +- /* SZ_encoder_enabled returns 1 if encoder is present */ +- if(SZ_encoder_enabled() == 1) +- exit(0); +- else +- exit(1); +- } +- ], [he2_cv_szlib_can_encode=yes], [he2_cv_szlib_can_encode=no],)]) ++ AC_CACHE_VAL([he2_cv_szlib_functional],[he2_cv_szlib_functional=no]) ++ ++ AC_CACHE_VAL([he2_cv_szlib_can_encode],[he2_cv_szlib_can_encode=no]) + + CC="$saved_CC" + rm -f $SZIP_CC +@@ -477,22 +433,7 @@ if test "x$HAVE_HDF4" = "xyes"; then + dnl Check if HDF4 is linked with SZIP encoder + + AC_MSG_CHECKING([for hdf4 szip decoding filter]) +- AC_CACHE_VAL([he2_cv_hdf4_szip_can_decode], +- [AC_TRY_RUN([ +- #include <hdf.h> +- +- int main(void) +- { +- comp_coder_t codertype = COMP_CODE_SZIP; +- uint32 configinfo; +- int decoder = 0; +- +- HCget_config_info(codertype, &configinfo); +- decoder = configinfo & COMP_DECODER_ENABLED; +- if (decoder) exit(0); +- else exit(1); +- } +- ], [he2_cv_hdf4_szip_can_decode=yes], [he2_cv_hdf4_szip_can_decode=no],)]) ++ AC_CACHE_VAL([he2_cv_hdf4_szip_can_decode],[he2_cv_hdf4_szip_can_decode=no]) + if test ${he2_cv_hdf4_szip_can_decode} = "yes"; then + AC_DEFINE(HAVE_HDF4_SZIP_DECODER, 1, + [Define if HDF4 has szip decoder filter]) +@@ -502,22 +443,7 @@ if test "x$HAVE_HDF4" = "xyes"; then + fi + + AC_MSG_CHECKING([for hdf4 szip encoding filter]) +- AC_CACHE_VAL([he2_cv_hdf4_szip_can_encode], +- [AC_TRY_RUN([ +- #include <hdf.h> +- +- int main(void) +- { +- comp_coder_t codertype = COMP_CODE_SZIP; +- uint32 configinfo; +- int encoder = 0; +- +- HCget_config_info(codertype, &configinfo); +- encoder = configinfo & COMP_ENCODER_ENABLED; +- if (encoder) exit(0); +- else exit(1); +- } +- ], [he2_cv_hdf4_szip_can_encode=yes], [he2_cv_hdf4_szip_can_encode=no],)]) ++ AC_CACHE_VAL([he2_cv_hdf4_szip_can_encode],[he2_cv_hdf4_szip_can_encode=no]) + + if test ${he2_cv_hdf4_szip_can_encode} = "yes"; then + AC_DEFINE(HAVE_HDF4_SZIP_ENCODER, 1, diff --git a/src/hdf-eos2-test.c b/src/hdf-eos2-test.c new file mode 100644 index 00000000..bc09ab6d --- /dev/null +++ b/src/hdf-eos2-test.c @@ -0,0 +1,38 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include <hdf.h> +#include <HdfEosDef.h> +#include <mfhdf.h> + +#include <stdio.h> + +int main() { + char filename[] = "test.he4"; + int fid = SWopen(filename, DFACC_CREATE); + char swathname[] = "myswath"; + int swid = SWcreate(fid, swathname); + + char dimname[] = "mydim"; + const int32 dimlen = 10; + int rc = SWdefdim(swid, dimname, dimlen); + printf("SWdefdim: %d\n", rc); + char fieldname[] = "test_field"; + rc = SWdefdatafield(swid, fieldname, dimname, DFNT_FLOAT, 0); + printf("SWdefdatafield: %d\n", rc); + + int32 start = 0; + int32 edge = dimlen; + float data[dimlen]; + for (int i=0; i<dimlen; ++i) { + data[i] = 1.0 + i; + } + rc = SWwritefield(swid, fieldname, &start, NULL, &edge, data); + printf("SWwritefield: %d\n", rc); + + rc = SWdetach(swid); + printf("SWdetach: %d\n", rc); + rc = SWclose(fid); + printf("SWclose: %d\n", rc); +} diff --git a/src/hdf-eos2.mk b/src/hdf-eos2.mk new file mode 100644 index 00000000..7ead9bcc --- /dev/null +++ b/src/hdf-eos2.mk @@ -0,0 +1,37 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := hdf-eos2 +$(PKG)_WEBSITE := https://hdfeos.org/software/library.php +$(PKG)_DESCR := HDF-EOS2 +$(PKG)_IGNORE := +$(PKG)_VERSION := 19v1.00 +$(PKG)_CHECKSUM := 3fffa081466e85d2b9436d984bc44fe97bbb33ad9d8b7055a322095dc4672e31 +$(PKG)_SUBDIR := hdfeos +$(PKG)_FILE := HDF-EOS2.$($(PKG)_VERSION).tar.Z +$(PKG)_URL := ftp://edhs1.gsfc.nasa.gov/edhs/hdfeos/latest_release/$($(PKG)_FILE) +$(PKG)_DEPS := gcc hdf4 + +define $(PKG)_UPDATE + echo 'TODO: write update script for hdf-eos2.' >&2; + echo $(hdf-eos2_VERSION) +endef + +define $(PKG)_BUILD + cd '$(1)' && chmod -R ugo+w . + cd '$(1)' && autoconf + cd '$(1)' && \ + ac_cv_func_malloc_0_nonnull=yes \ + ac_cv_func_realloc_0_nonnull=yes \ + ./configure $(MXE_CONFIGURE_OPTS) \ + --enable-install-include + + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install + + '$(TARGET)-gcc' \ + -std=c99 -W -Wall -Werror -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + -lhdfeos -lmfhdf -ldf -lz -ljpeg -lportablexdr -lws2_32 +endef + +$(PKG)_BUILD_SHARED = diff --git a/src/hdf-eos5-1-fixes.patch b/src/hdf-eos5-1-fixes.patch new file mode 100644 index 00000000..645dd6ee --- /dev/null +++ b/src/hdf-eos5-1-fixes.patch @@ -0,0 +1,157 @@ +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: Thomas Danckaert <thomas.danckaert@gmail.com> +Date: Fri, 27 May 2016 17:39:23 +0200 +Subject: [PATCH] fixes + + +diff --git a/configure.ac b/configure.ac +index 1111111..2222222 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -104,17 +104,7 @@ dnl Check if -Df2cFortran is specified + dnl Running only the preprocessor may not be a good idea + dnl because this can be hard-coded. + AC_MSG_CHECKING([for fc2Fortran macro]) +-AC_CACHE_VAL([he5_cv_f2cFortran_defined], +- [AC_TRY_RUN([ +- int main(void) +- { +- #ifdef f2cFortran +- return 0; +- #else +- return 1; +- #endif +- } +- ], [he5_cv_f2cFortran_defined=yes], [he5_cv_f2cFortran_defined=no],)]) ++AC_CACHE_VAL([he5_cv_f2cFortran_defined],[he5_cv_f2cFortran_defined=yes]) + if test ${he5_cv_f2cFortran_defined} = "yes"; then + F2CFORTRAN_MACRO="yes" + AC_MSG_RESULT([defined]) +@@ -124,18 +114,7 @@ else + fi + + if test ${he5_cv_f2cFortran_defined} = "yes"; then +- AC_CHECK_SIZEOF([int*]) +- AC_CACHE_VAL([he5_cv_32ptr], +- [AC_TRY_RUN([ +- int main(void) +- { +-#ifdef SIZEOF_INTP +- return SIZEOF_INTP == 4 ? 0 : 1; +-#else +-#error SIZEOF_INTP is not defined +-#endif +- } +- ], [he5_cv_32ptr=yes], [he5_cv_32ptr=no],)]) ++ AC_CACHE_VAL([he5_cv_32ptr],[he5_cv_32ptr=no]) + if test ${he5_cv_32ptr} = "yes"; then + AC_MSG_NOTICE([possibly 32 bit system]) + F2CFORTRAN_32PTR="yes" +@@ -417,20 +396,7 @@ fi + + # Check whether HDF5 threadsafety is enabled + AC_MSG_CHECKING([if HDF5 threadsafe mode is enabled]) +-AC_TRY_RUN([ +-#include "hdf5.h" +- +-int main(void) { +-#ifdef H5_HAVE_THREADSAFE +- return 0; +-#else +- return 1; +-#endif +-} ], +- [ AC_MSG_RESULT([yes]) +- THREADSAFE="yes"], +- [AC_MSG_RESULT([no]) +- THREADSAFE="no"]) ++THREADSAFE=no + + # Record threadsafe status in config.h and for Makefiles + if test "X$THREADSAFE" = "Xyes"; then +@@ -445,24 +411,7 @@ if test "x$HAVE_HDF5" = "xyes"; then + dnl Check if HDF5 is linked with SZIP encoder + + AC_MSG_CHECKING([for hdf5 szip decoding filter]) +- AC_CACHE_VAL([he5_cv_hdf5_szip_can_decode], +- [AC_TRY_RUN([ +- #include <H5Ipublic.h> +- #include <H5Zpublic.h> +- +- int main(int argc, char **argv) +- { +- herr_t ret; +- unsigned int flags = 0; +- int decoder = 0; +- +- ret = H5Zget_filter_info(H5Z_FILTER_SZIP, &flags); +- if (ret < 0) exit(1); +- decoder = flags & H5Z_FILTER_CONFIG_DECODE_ENABLED; +- if (decoder) exit(0); +- else exit(1); +- } +- ], [he5_cv_hdf5_szip_can_decode=yes], [he5_cv_hdf5_szip_can_decode=no],)]) ++ AC_CACHE_VAL([he5_cv_hdf5_szip_can_decode],[he5_cv_hdf5_szip_can_decode=no]) + if test ${he5_cv_hdf5_szip_can_decode} = "yes"; then + AC_DEFINE(HAVE_HDF5_SZIP_DECODER, 1, + [Define if HDF5 has szip decoder filter]) +@@ -474,24 +423,7 @@ if test "x$HAVE_HDF5" = "xyes"; then + fi + + AC_MSG_CHECKING([for hdf5 szip encoding filter]) +- AC_CACHE_VAL([he5_cv_hdf5_szip_can_encode], +- [AC_TRY_RUN([ +- #include <H5Ipublic.h> +- #include <H5Zpublic.h> +- +- int main(int argc, char **argv) +- { +- herr_t ret; +- unsigned int flags = 0; +- int encoder = 0; +- +- ret = H5Zget_filter_info(H5Z_FILTER_SZIP, &flags); +- if (ret < 0) exit(1); +- encoder = flags & H5Z_FILTER_CONFIG_ENCODE_ENABLED; +- if (encoder) exit(0); +- else exit(1); +- } +- ], [he5_cv_hdf5_szip_can_encode=yes], [he5_cv_hdf5_szip_can_encode=no],)]) ++ AC_CACHE_VAL([he5_cv_hdf5_szip_can_encode],[he5_cv_hdf5_szip_can_encode=no]) + + if test ${he5_cv_hdf5_szip_can_encode} = "yes"; then + AC_DEFINE(HAVE_HDF5_SZIP_ENCODER, 1, + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Thomas Danckaert <thomas.danckaert@gmail.com> +Date: Fri, 27 May 2016 17:49:30 +0200 +Subject: [PATCH] Fix compilation without SZIP. + +A wrongly placed #endif causes a missing symbol 'HE5_EHHEisHE5' when +compiling without szip. Bug & fix reported upstream. + +diff --git a/src/EHapi.c b/src/EHapi.c +index 1111111..2222222 100755 +--- a/src/EHapi.c ++++ b/src/EHapi.c +@@ -11379,6 +11379,7 @@ int HE5_szip_can_encode(void ) + return(-1); + } + ++#endif /* H5_HAVE_FILTER_SZIP */ + + + /*----------------------------------------------------------------------------| +@@ -11509,8 +11510,6 @@ HE5_EHHEisHE5(char *filename) + } + } + +-#endif /* H5_HAVE_FILTER_SZIP */ +- + + #ifndef __cplusplus + diff --git a/src/hdf-eos5-test.c b/src/hdf-eos5-test.c new file mode 100644 index 00000000..1f90623f --- /dev/null +++ b/src/hdf-eos5-test.c @@ -0,0 +1,32 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include "HE5_HdfEosDef.h" + +int main() { + + char filename[] = "test.he5"; + hid_t output_file = HE5_SWopen(filename, H5F_ACC_TRUNC); + char swathname[] = "testswath"; + hid_t swath_id = HE5_SWcreate(output_file, swathname); + + char dimension[] = "dummydim"; + HE5_SWdefdim(swath_id, dimension, 10); + char fieldname[] = "test_field"; + HE5_SWdefdatafield(swath_id, fieldname, dimension, NULL, HE5T_NATIVE_FLOAT, 0); + + hssize_t start[HE5_DTSETRANKMAX] = {0}; + hsize_t edge[HE5_DTSETRANKMAX] = {10}; + float testdata[10]; + + for(unsigned int i=0; i<10; ++i) + testdata[i] = (float)i; + + HE5_SWwritefield(swath_id, fieldname, start, NULL, edge, testdata); + + HE5_SWdetach(swath_id); + HE5_SWclose(output_file); + + return 0; +} diff --git a/src/hdf-eos5.mk b/src/hdf-eos5.mk new file mode 100644 index 00000000..44525c8f --- /dev/null +++ b/src/hdf-eos5.mk @@ -0,0 +1,35 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := hdf-eos5 +$(PKG)_WEBSITE := https://hdfeos.org/software/library.php +$(PKG)_DESCR := HDF-EOS5 +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.15 +$(PKG)_CHECKSUM := 119588067abf139c1c600a4519b880d04a3933049576c88acdc8ff6fc71803dd +$(PKG)_SUBDIR := hdfeos5 +$(PKG)_FILE := HDF-EOS5.$($(PKG)_VERSION).tar.Z +$(PKG)_URL := ftp://edhs1.gsfc.nasa.gov/edhs/hdfeos5/latest_release/$($(PKG)_FILE) +$(PKG)_DEPS := gcc hdf5 + +define $(PKG)_UPDATE + echo 'TODO: write update script for hdf-eos5.' >&2; + echo $(hdf-eos5_VERSION) +endef + +define $(PKG)_BUILD + cd '$(1)' && chmod -R ugo+w . + cd '$(1)' && autoconf + cd '$(1)' && ./configure \ + $(MXE_CONFIGURE_OPTS) \ + --enable-install-include + + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install + + '$(TARGET)-gcc' \ + -std=c99 -W -Wall -Werror -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + -lhe5_hdfeos -lhdf5_hl -lhdf5 -lz +endef + +$(PKG)_BUILD_SHARED = diff --git a/src/hdf4-1-portability-fixes.patch b/src/hdf4-1-portability-fixes.patch index 12b07ee5..473955a3 100644 --- a/src/hdf4-1-portability-fixes.patch +++ b/src/hdf4-1-portability-fixes.patch @@ -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. --- a/configure.ac 2012-12-02 11:01:36.252405122 +0100 +++ b/configure.ac 2012-12-02 11:00:05.580408916 +0100 diff --git a/src/hdf4-2-dllimport.patch b/src/hdf4-2-dllimport.patch index 247be104..b2cb0828 100644 --- a/src/hdf4-2-dllimport.patch +++ b/src/hdf4-2-dllimport.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/hdf4.mk b/src/hdf4.mk index 946e474e..dfa22cc8 100644 --- a/src/hdf4.mk +++ b/src/hdf4.mk @@ -1,17 +1,18 @@ -# 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 := hdf4 +$(PKG)_WEBSITE := https://www.hdfgroup.org/hdf4/ +$(PKG)_DESCR := HDF4 $(PKG)_IGNORE := $(PKG)_VERSION := 4.2.10 $(PKG)_CHECKSUM := 44e9c7f5bdd463c4a01738f44ad4f0ee9c68e3f0cb9872eca160e3fddc8b994c $(PKG)_SUBDIR := hdf-$($(PKG)_VERSION) $(PKG)_FILE := hdf-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://www.hdfgroup.org/ftp/HDF/releases/HDF$($(PKG)_VERSION)/src/$($(PKG)_FILE) +$(PKG)_URL := https://support.hdfgroup.org/ftp/HDF/releases/HDF$($(PKG)_VERSION)/src/$($(PKG)_FILE) $(PKG)_DEPS := gcc jpeg portablexdr zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.hdfgroup.org/ftp/HDF/HDF_Current/src/' | \ + $(WGET) -q -O- 'https://www.hdfgroup.org/ftp/HDF/HDF_Current/src/' | \ grep '<a href.*hdf.*bz2' | \ $(SED) -n 's,.*hdf-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 diff --git a/src/hdf5-1-disable-configure-try-run.patch b/src/hdf5-1-disable-configure-try-run.patch index 1a7c6a89..ec2b06d2 100644 --- a/src/hdf5-1-disable-configure-try-run.patch +++ b/src/hdf5-1-disable-configure-try-run.patch @@ -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. --- a/configure.ac 2012-12-03 08:59:14.540462389 +0100 +++ b/configure.ac 2012-12-03 09:14:00.188485595 +0100 diff --git a/src/hdf5-2-platform-detection.patch b/src/hdf5-2-platform-detection.patch index 8d0b2649..ec759ffa 100644 --- a/src/hdf5-2-platform-detection.patch +++ b/src/hdf5-2-platform-detection.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/hdf5-3-fix-autoconf-version.patch b/src/hdf5-3-fix-autoconf-version.patch index 2208f8e2..b0fdfc3c 100644 --- a/src/hdf5-3-fix-autoconf-version.patch +++ b/src/hdf5-3-fix-autoconf-version.patch @@ -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. diff -ur a/configure.ac b/configure.ac --- a/configure.ac 2013-11-04 23:52:05.000000000 +0100 diff --git a/src/hdf5-test.cmake b/src/hdf5-test.cmake new file mode 100644 index 00000000..fce83dfb --- /dev/null +++ b/src/hdf5-test.cmake @@ -0,0 +1,13 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +# partial module - included by src/cmake/CMakeLists.txt + +set(TGT test-${PKG}-cmake) + +enable_language(CXX) +add_executable(${TGT} ${CMAKE_CURRENT_LIST_DIR}/${PKG}-test.cpp) + +find_package(HDF5 ${PKG_VERSION} EXACT REQUIRED COMPONENTS C HL) +target_link_libraries(${TGT} ${HDF5_HL_LIBRARIES} ${HDF5_LIBRARIES}) + +install(TARGETS ${TGT} DESTINATION bin) diff --git a/src/hdf5-test.cpp b/src/hdf5-test.cpp index 35254bf9..ad81a8c0 100644 --- a/src/hdf5-test.cpp +++ b/src/hdf5-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdlib.h> diff --git a/src/hdf5.mk b/src/hdf5.mk index de5d1607..7cf5dc11 100644 --- a/src/hdf5.mk +++ b/src/hdf5.mk @@ -1,17 +1,18 @@ -# 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 := hdf5 +$(PKG)_WEBSITE := https://www.hdfgroup.org/hdf5/ +$(PKG)_DESCR := HDF5 $(PKG)_IGNORE := $(PKG)_VERSION := 1.8.12 $(PKG)_CHECKSUM := 6d080f913a226a3ce390a11d9b571b2d5866581a2aa4434c398cd371c7063639 $(PKG)_SUBDIR := hdf5-$($(PKG)_VERSION) $(PKG)_FILE := hdf5-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://www.hdfgroup.org/ftp/HDF5/releases/$($(PKG)_SUBDIR)/src/$($(PKG)_FILE) +$(PKG)_URL := https://support.hdfgroup.org/ftp/HDF5/prev-releases/hdf5-$($(PKG)_VERSION)/src/$($(PKG)_FILE) $(PKG)_DEPS := gcc pthreads zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.hdfgroup.org/ftp/HDF5/current/src/' | \ + $(WGET) -q -O- 'https://www.hdfgroup.org/ftp/HDF5/current/src/' | \ grep '<a href.*hdf5.*bz2' | \ $(SED) -n 's,.*hdf5-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 @@ -67,6 +68,14 @@ define $(PKG)_BUILD ## test hdf5 '$(TARGET)-g++' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-hdf5.exe' \ + '$(PWD)/src/$(PKG)-test.cpp' -o '$(PREFIX)/$(TARGET)/bin/test-hdf5.exe' \ -lhdf5_hl -lhdf5 -lz + + # test cmake can find hdf5 + mkdir '$(1).test-cmake' + cd '$(1).test-cmake' && '$(TARGET)-cmake' \ + -DPKG=$(PKG) \ + -DPKG_VERSION=$($(PKG)_VERSION) \ + '$(PWD)/src/cmake/test' + $(MAKE) -C '$(1).test-cmake' -j 1 install VERBOSE=ON endef diff --git a/src/hunspell-test.cpp b/src/hunspell-test.cpp index 67393d50..1446f593 100644 --- a/src/hunspell-test.cpp +++ b/src/hunspell-test.cpp @@ -1,10 +1,11 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <iostream> #include <fstream> +#include <string> +#include <vector> #include <hunspell.hxx> int main(int argc, char *argv[]) @@ -20,18 +21,18 @@ int main(int argc, char *argv[]) aff.close(); Hunspell h("hunspell-test.aff", "hunspell-test.dic"); - if (h.spell("Hello") == 0) + if (h.spell(std::string("Hello")) == 0) { std::cerr << "Error: hunspell marked correct word as wrong" << std::endl; } - if (h.spell("wrld") != 0) + if (h.spell(std::string("wrld")) != 0) { std::cerr << "Error: hunspell marked wrong word as correct" << std::endl; } - char ** result; - int n = h.suggest(&result, "ell"); - for (int i = 0; i < n; i++) std::cout << result[i]; + std::vector<std::string> result; + result = h.suggest(std::string("ell")); + for (unsigned int i = 0; i < result.size(); i++) std::cout << result[i]; return 0; } diff --git a/src/hunspell.mk b/src/hunspell.mk index 02804e03..462fb737 100644 --- a/src/hunspell.mk +++ b/src/hunspell.mk @@ -1,33 +1,28 @@ -# 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 := hunspell +$(PKG)_WEBSITE := https://hunspell.github.io/ +$(PKG)_DESCR := Hunspell $(PKG)_IGNORE := -$(PKG)_VERSION := 1.3.3 -$(PKG)_CHECKSUM := a7b2c0de0e2ce17426821dc1ac8eb115029959b3ada9d80a81739fa19373246c -$(PKG)_SUBDIR := hunspell-$($(PKG)_VERSION) -$(PKG)_FILE := hunspell-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/hunspell/Hunspell/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_VERSION := 1.6.1 +$(PKG)_CHECKSUM := 30f593733c50b794016bb03d31fd2a2071e4610c6fa4708e33edad2335102c49 +$(PKG)_GH_CONF := hunspell/hunspell, v $(PKG)_DEPS := gcc gettext libiconv pthreads readline -define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/hunspell/files/Hunspell/' | \ - $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ - head -1 -endef - define $(PKG)_BUILD # Note: the configure file doesn't pick up pdcurses, so "ui" is disabled - cd '$(1)' && ./configure \ + cd '$(SOURCE_DIR)' && autoreconf -fi + cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \ $(MXE_CONFIGURE_OPTS) \ --with-warnings \ --without-ui \ --with-readline - $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_CRUFT) + $(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_CRUFT) # Test '$(TARGET)-g++' \ -W -Wall -Werror -std=c++0x -pedantic \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-hunspell.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-hunspell.exe' \ `'$(TARGET)-pkg-config' hunspell --cflags --libs` endef diff --git a/src/hyperscan-1-fixes.patch b/src/hyperscan-1-fixes.patch new file mode 100644 index 00000000..025c71dd --- /dev/null +++ b/src/hyperscan-1-fixes.patch @@ -0,0 +1,424 @@ +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: Wed, 25 Aug 2016 10:28:30 +0200 +Subject: [PATCH] update preprocessor conditions + +Add macro NATIVE_WIN32 = Windows && !MinGW. +Replace _WIN32 with NATIVE_WIN32 where it failed. + +diff --git a/cmake/config.h.in b/cmake/config.h.in +index 1111111..2222222 100644 +--- a/cmake/config.h.in ++++ b/cmake/config.h.in +@@ -89,3 +89,4 @@ + /* define if this is a release build. */ + #cmakedefine RELEASE_BUILD + ++#define NATIVE_WIN32 ((defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW__) && !defined(__MINGW32__)) +diff --git a/src/database.c b/src/database.c +index 1111111..2222222 100644 +--- a/src/database.c ++++ b/src/database.c +@@ -385,7 +385,7 @@ hs_database_t *dbCreate(const char *in_bytecode, size_t len, u64a platform) { + return db; + } + +-#if defined(_WIN32) ++#if NATIVE_WIN32 + #define SNPRINTF_COMPAT _snprintf + #else + #define SNPRINTF_COMPAT snprintf +diff --git a/src/nfa/limex_shuffle.h b/src/nfa/limex_shuffle.h +index 1111111..2222222 100644 +--- a/src/nfa/limex_shuffle.h ++++ b/src/nfa/limex_shuffle.h +@@ -41,7 +41,7 @@ + #include "util/bitutils.h" + #include "util/simd_utils.h" + +-#if defined(__BMI2__) || (defined(_WIN32) && defined(__AVX2__)) ++#if defined(__BMI2__) || (NATIVE_WIN32 && defined(__AVX2__)) + #define HAVE_PEXT + #endif + +diff --git a/src/nfa/mcclellan_common_impl.h b/src/nfa/mcclellan_common_impl.h +index 1111111..2222222 100644 +--- a/src/nfa/mcclellan_common_impl.h ++++ b/src/nfa/mcclellan_common_impl.h +@@ -26,7 +26,7 @@ + * POSSIBILITY OF SUCH DAMAGE. + */ + +-#if defined(__INTEL_COMPILER) || defined(__clang__) || defined(_WIN32) || defined(__GNUC__) && (__GNUC__ < 4) ++#if defined(__INTEL_COMPILER) || defined(__clang__) || NATIVE_WIN32 || defined(__GNUC__) && (__GNUC__ < 4) + #define really_flatten + #else + #define really_flatten __attribute__ ((flatten)) +diff --git a/src/nfa/nfa_internal.h b/src/nfa/nfa_internal.h +index 1111111..2222222 100644 +--- a/src/nfa/nfa_internal.h ++++ b/src/nfa/nfa_internal.h +@@ -195,7 +195,7 @@ int isMultiTopType(u8 t) { + + /** Macros used in place of unimplemented NFA API functions for a given + * engine. */ +-#if !defined(_WIN32) ++#if !NATIVE_WIN32 + + /* Use for functions that return an integer. */ + #define NFA_API_NO_IMPL(...) \ +diff --git a/src/ue2common.h b/src/ue2common.h +index 1111111..2222222 100644 +--- a/src/ue2common.h ++++ b/src/ue2common.h +@@ -46,7 +46,7 @@ + #include <stdint.h> + + /* ick */ +-#if defined(_WIN32) ++#if NATIVE_WIN32 + #define ALIGN_ATTR(x) __declspec(align(x)) + #else + #define ALIGN_ATTR(x) __attribute__((aligned((x)))) +@@ -78,7 +78,7 @@ typedef u32 ReportID; + + /* Shorthand for attribute to mark a function as part of our public API. + * Functions without this attribute will be hidden. */ +-#if !defined(_WIN32) ++#if !NATIVE_WIN32 + #define HS_PUBLIC_API __attribute__((visibility("default"))) + #else + // TODO: dllexport defines for windows +@@ -88,14 +88,14 @@ typedef u32 ReportID; + #define ARRAY_LENGTH(a) (sizeof(a)/sizeof((a)[0])) + + /** \brief Shorthand for the attribute to shut gcc about unused parameters */ +-#if !defined(_WIN32) ++#if !NATIVE_WIN32 + #define UNUSED __attribute__ ((unused)) + #else + #define UNUSED + #endif + + /* really_inline forces inlining always */ +-#if !defined(_WIN32) ++#if !NATIVE_WIN32 + #if defined(HS_OPTIMIZE) + #define really_inline inline __attribute__ ((always_inline, unused)) + #else +@@ -125,7 +125,7 @@ typedef u32 ReportID; + + + // We use C99-style "restrict". +-#ifdef _WIN32 ++#if NATIVE_WIN32 + #ifdef __cplusplus + #define restrict + #else +@@ -181,7 +181,7 @@ typedef u32 ReportID; + #define LIMIT_TO_AT_MOST(a, b) (*(a) = MIN(*(a),(b))) + #define ENSURE_AT_LEAST(a, b) (*(a) = MAX(*(a),(b))) + +-#ifndef _WIN32 ++#if !NATIVE_WIN32 + #ifndef likely + #define likely(x) __builtin_expect(!!(x), 1) + #endif +diff --git a/src/util/bitutils.h b/src/util/bitutils.h +index 1111111..2222222 100644 +--- a/src/util/bitutils.h ++++ b/src/util/bitutils.h +@@ -63,7 +63,7 @@ + #endif + + // MSVC has a different form of inline asm +-#ifdef _WIN32 ++#if NATIVE_WIN32 + #define NO_ASM + #endif + +@@ -74,7 +74,7 @@ + static really_inline + u32 clz32(u32 x) { + assert(x); // behaviour not defined for x == 0 +-#if defined(_WIN32) ++#if NATIVE_WIN32 + unsigned long r; + _BitScanReverse(&r, x); + return 31 - r; +@@ -86,11 +86,11 @@ u32 clz32(u32 x) { + static really_inline + u32 clz64(u64a x) { + assert(x); // behaviour not defined for x == 0 +-#if defined(_WIN64) ++#if NATIVE_WIN32 && defined(_WIN64) + unsigned long r; + _BitScanReverse64(&r, x); + return 63 - r; +-#elif defined(_WIN32) ++#elif NATIVE_WIN32 + unsigned long x1 = (u32)x; + unsigned long x2 = (u32)(x >> 32); + unsigned long r; +@@ -109,7 +109,7 @@ u32 clz64(u64a x) { + static really_inline + u32 ctz32(u32 x) { + assert(x); // behaviour not defined for x == 0 +-#if defined(_WIN32) ++#if NATIVE_WIN32 + unsigned long r; + _BitScanForward(&r, x); + return r; +@@ -121,11 +121,11 @@ u32 ctz32(u32 x) { + static really_inline + u32 ctz64(u64a x) { + assert(x); // behaviour not defined for x == 0 +-#if defined(_WIN64) ++#if NATIVE_WIN32 && defined(_WIN64) + unsigned long r; + _BitScanForward64(&r, x); + return r; +-#elif defined(_WIN32) ++#elif NATIVE_WIN32 + unsigned long r; + if (_BitScanForward(&r, (u32)x)) { + return (u32)r; +diff --git a/src/util/cpuid_flags.c b/src/util/cpuid_flags.c +index 1111111..2222222 100644 +--- a/src/util/cpuid_flags.c ++++ b/src/util/cpuid_flags.c +@@ -31,7 +31,7 @@ + #include "hs_compile.h" // for HS_MODE_ flags + #include "hs_internal.h" + +-#ifndef _WIN32 ++#if !NATIVE_WIN32 + #include <cpuid.h> + #endif + +@@ -60,7 +60,7 @@ + static __inline + void cpuid(unsigned int op, unsigned int leaf, unsigned int *eax, + unsigned int *ebx, unsigned int *ecx, unsigned int *edx) { +-#ifndef _WIN32 ++#if !NATIVE_WIN32 + __cpuid_count(op, leaf, *eax, *ebx, *ecx, *edx); + #else + unsigned int a[4]; +@@ -74,7 +74,7 @@ void cpuid(unsigned int op, unsigned int leaf, unsigned int *eax, + + static inline + u64a xgetbv(u32 op) { +-#if defined(_WIN32) || defined(__INTEL_COMPILER) ++#if NATIVE_WIN32 || defined(__INTEL_COMPILER) + return _xgetbv(op); + #else + u32 a, d; +diff --git a/src/util/make_unique.h b/src/util/make_unique.h +index 1111111..2222222 100644 +--- a/src/util/make_unique.h ++++ b/src/util/make_unique.h +@@ -29,7 +29,7 @@ + #ifndef UTIL_MAKE_UNIQUE_H + #define UTIL_MAKE_UNIQUE_H + +-#if (defined(_WIN32) || defined(_WIN64)) && (_MSC_VER > 1700) ++#if NATIVE_WIN32 && (_MSC_VER > 1700) + // VC++ 2013 onwards has make_unique in the STL + #define USE_STD + #include <memory> +diff --git a/src/util/popcount.h b/src/util/popcount.h +index 1111111..2222222 100644 +--- a/src/util/popcount.h ++++ b/src/util/popcount.h +@@ -38,7 +38,7 @@ + // We have a native popcount where the compiler has defined __POPCNT__. + #if defined(__POPCNT__) + #define HAVE_POPCOUNT_INSTR +-#elif defined(_WIN32) && defined(__AVX__) // TODO: fix win preproc ++#elif NATIVE_WIN32 && defined(__AVX__) // TODO: fix win preproc + #define HAVE_POPCOUNT_INSTR + #endif + +diff --git a/src/util/simd_utils.h b/src/util/simd_utils.h +index 1111111..2222222 100644 +--- a/src/util/simd_utils.h ++++ b/src/util/simd_utils.h +@@ -33,7 +33,7 @@ + #ifndef SIMD_UTILS + #define SIMD_UTILS + +-#if !defined(_WIN32) && !defined(__SSSE3__) ++#if !NATIVE_WIN32 && !defined(__SSSE3__) + #error SSSE3 instructions must be enabled + #endif + +diff --git a/src/util/unaligned.h b/src/util/unaligned.h +index 1111111..2222222 100644 +--- a/src/util/unaligned.h ++++ b/src/util/unaligned.h +@@ -35,7 +35,7 @@ + + #include "ue2common.h" + +-#if !defined(_WIN32) ++#if !NATIVE_WIN32 + #define PACKED__MAY_ALIAS __attribute__((packed, may_alias)) + #else + #define PACKED__MAY_ALIAS +@@ -89,7 +89,7 @@ void unaligned_store_u64a(void *ptr, u64a val) { + struct unaligned *uptr = (struct unaligned *)ptr; + uptr->u = val; + } +-#if defined(_WIN32) ++#if NATIVE_WIN32 + #pragma pack(pop) + #endif // win32 + +diff --git a/unit/hyperscan/test_util.h b/unit/hyperscan/test_util.h +index 1111111..2222222 100644 +--- a/unit/hyperscan/test_util.h ++++ b/unit/hyperscan/test_util.h +@@ -37,7 +37,7 @@ + #include "hs.h" + + #ifndef UNUSED +-#if defined(_WIN32) || defined(_WIN64) ++#if NATIVE_WIN32 + #define UNUSED + #else + #define UNUSED __attribute__ ((unused)) +diff --git a/util/expressions.cpp b/util/expressions.cpp +index 1111111..2222222 100644 +--- a/util/expressions.cpp ++++ b/util/expressions.cpp +@@ -37,7 +37,7 @@ + #include <boost/algorithm/string/trim.hpp> + #include <sys/types.h> + #include <sys/stat.h> +-#if !defined(_WIN32) ++#if !NATIVE_WIN32 + #include <dirent.h> + #include <unistd.h> + #else +@@ -96,7 +96,7 @@ void processLine(string &line, unsigned lineNum, + } + } + +-#if defined(_WIN32) ++#if NATIVE_WIN32 + #define stat _stat + #define S_ISDIR(st_m) (_S_IFDIR & (st_m)) + #define S_ISREG(st_m) (_S_IFREG & (st_m)) +@@ -141,7 +141,7 @@ bool isIgnorable(const std::string &f) { + return false; + } + +-#ifndef _WIN32 ++#if !NATIVE_WIN32 + void loadExpressions(const string &inPath, ExpressionMap &exprMap) { + // Is our input path a file or a directory? + struct stat st; + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Wed, 18 May 2016 07:38:29 +0200 +Subject: [PATCH] cmake: replace WIN32 with WIN32 AND NOT MINGW + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1111111..2222222 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -125,7 +125,7 @@ option(BUILD_SHARED_LIBS "Build shared libs instead of static" OFF) + option(BUILD_STATIC_AND_SHARED "Build shared libs as well as static" OFF) + + if (BUILD_STATIC_AND_SHARED OR BUILD_SHARED_LIBS) +- if (WIN32) ++ if (WIN32 AND NOT MINGW) + message(FATAL_ERROR "Windows DLLs currently not supported") + else() + message(STATUS "Building shared libraries") +@@ -274,7 +274,7 @@ include (${CMAKE_MODULE_PATH}/arch.cmake) + CHECK_C_SOURCE_COMPILES("void *aa_test(void *x) { return __builtin_assume_aligned(x, 16);}\nint main(void) { return 0; }" HAVE_CC_BUILTIN_ASSUME_ALIGNED) + CHECK_CXX_SOURCE_COMPILES("void *aa_test(void *x) { return __builtin_assume_aligned(x, 16);}\nint main(void) { return 0; }" HAVE_CXX_BUILTIN_ASSUME_ALIGNED) + +-if (NOT WIN32) ++if (MINGW OR NOT WIN32) + set(C_FLAGS_TO_CHECK + # Variable length arrays are way bad, most especially at run time + "-Wvla" +@@ -366,7 +366,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + set(FREEBSD true) + endif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + +-if(NOT WIN32) ++if(MINGW OR NOT WIN32) + if(CMAKE_C_COMPILER_ID MATCHES "Intel") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -diag-error 10006 -diag-disable 177 -diag-disable 2304 -diag-disable 2305 -diag-disable 2338 -diag-disable 1418 -diag-disable=remark") + endif() +@@ -386,7 +386,7 @@ endif() + configure_file(${CMAKE_MODULE_PATH}/config.h.in ${PROJECT_BINARY_DIR}/config.h) + configure_file(src/hs_version.h.in ${PROJECT_BINARY_DIR}/hs_version.h) + +-if (NOT WIN32) ++if (MINGW OR NOT WIN32) + # expand out library names for pkgconfig static link info + foreach (LIB ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES}) + # this is fragile, but protects us from toolchain specific files +@@ -405,7 +405,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_C_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXX_FLAGS}") + + +-if(NOT WIN32) ++if(MINGW OR NOT WIN32) + set(RAGEL_C_FLAGS "-Wno-unused") + endif() + +@@ -1058,6 +1058,6 @@ install(TARGETS hs_shared + LIBRARY DESTINATION lib) + endif() + +-if(NOT WIN32) ++if(MINGW OR NOT WIN32) + add_subdirectory(examples) + endif() + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Wed, 18 May 2016 07:55:44 +0200 +Subject: [PATCH] add compile flag "-posix" to fix printf %llu + +See https://lists.nongnu.org/archive/html/mingw-cross-env-list/2013-04/msg00024.html +The similar problem occurred in examples/simplegrep.c + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1111111..2222222 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -244,6 +244,11 @@ else() + + endif() + ++if (MINGW) ++ set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -posix") ++ set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -posix") ++endif() ++ + CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H) + CHECK_INCLUDE_FILES(intrin.h HAVE_C_INTRIN_H) + CHECK_INCLUDE_FILE_CXX(intrin.h HAVE_CXX_INTRIN_H) +diff --git a/libhs.pc.in b/libhs.pc.in +index 1111111..2222222 100644 +--- a/libhs.pc.in ++++ b/libhs.pc.in +@@ -8,4 +8,4 @@ Description: Intel(R) Hyperscan Library + Version: @HS_VERSION@ + Libs: -L${libdir} -lhs + Libs.private: @PRIVATE_LIBS@ +-Cflags: -I${includedir}/hs ++Cflags: -I${includedir}/hs -posix diff --git a/src/hyperscan.mk b/src/hyperscan.mk new file mode 100644 index 00000000..7e6d6966 --- /dev/null +++ b/src/hyperscan.mk @@ -0,0 +1,26 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := hyperscan +$(PKG)_WEBSITE := https://01.org/hyperscan +$(PKG)_DESCR := Hyperscan +$(PKG)_IGNORE := +$(PKG)_VERSION := 4.3.2 +$(PKG)_CHECKSUM := 6cd5820d6da51d6fe4ab12066d1efd9afecc1bc6fb7d6eca9c98f76fd391dbd5 +$(PKG)_GH_CONF := 01org/hyperscan, v +$(PKG)_DEPS := gcc boost +# $(PKG)_NATIVE_DEPS := ragel + +define $(PKG)_BUILD + # Add the following options to run on (virtual) machine without AVX2 + # -DCMAKE_C_FLAGS="-march=core2" -DCMAKE_CXX_FLAGS="-march=core2" + cd '$(BUILD_DIR)' && $(TARGET)-cmake \ + -DRAGEL='$(PREFIX)/$(BUILD)/bin/ragel' \ + '$(SOURCE_DIR)' + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install + + '$(TARGET)-gcc' \ + '$(1)/examples/simplegrep.c' \ + -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `$(TARGET)-pkg-config --cflags --libs libhs` +endef diff --git a/src/icu4c-1-fixes.patch b/src/icu4c-1-fixes.patch index 282f10a0..58196da6 100644 --- a/src/icu4c-1-fixes.patch +++ b/src/icu4c-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/icu4c.mk b/src/icu4c.mk index d91042c9..60458ea0 100644 --- a/src/icu4c.mk +++ b/src/icu4c.mk @@ -1,11 +1,12 @@ -# 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 := icu4c +$(PKG)_WEBSITE := http://site.icu-project.org/ +$(PKG)_DESCR := ICU4C $(PKG)_IGNORE := -$(PKG)_VERSION := 54.1 +$(PKG)_VERSION := 56.1 $(PKG)_MAJOR := $(word 1,$(subst ., ,$($(PKG)_VERSION))) -$(PKG)_CHECKSUM := d42bc9a8ca6a91c55eb0925c279f49e5b508d51ef26ac9850d9be55de5bb8ab3 +$(PKG)_CHECKSUM := 3a64e9105c734dcf631c0b3ed60404531bce6c0f5a64bfe1a6402a4cc2314816 $(PKG)_SUBDIR := icu $(PKG)_FILE := $(PKG)-$(subst .,_,$($(PKG)_VERSION))-src.tgz $(PKG)_URL := http://download.icu-project.org/files/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) diff --git a/src/id3lib-1-win32.patch b/src/id3lib-1-win32.patch index 43f2295c..d8995a25 100644 --- a/src/id3lib-1-win32.patch +++ b/src/id3lib-1-win32.patch @@ -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. diff -ru id3lib-3.8.3-orig/configure.in id3lib-3.8.3/configure.in --- id3lib-3.8.3-orig/configure.in 2003-03-02 01:23:00.000000000 +0100 diff --git a/src/id3lib.mk b/src/id3lib.mk index 7b566e7b..89f5b382 100644 --- a/src/id3lib.mk +++ b/src/id3lib.mk @@ -1,17 +1,17 @@ -# 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 := id3lib +$(PKG)_WEBSITE := https://id3lib.sourceforge.io/ $(PKG)_IGNORE := $(PKG)_VERSION := 3.8.3 $(PKG)_CHECKSUM := 2749cc3c0cd7280b299518b1ddf5a5bcfe2d1100614519b68702230e26c7d079 $(PKG)_SUBDIR := id3lib-$($(PKG)_VERSION) $(PKG)_FILE := id3lib-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/id3lib/files/id3lib/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/id3lib/files/id3lib/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef diff --git a/src/ilmbase.mk b/src/ilmbase.mk index c4d86285..0336d8fb 100644 --- a/src/ilmbase.mk +++ b/src/ilmbase.mk @@ -1,13 +1,14 @@ -# 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 := ilmbase +$(PKG)_WEBSITE := http://www.openexr.com/ +$(PKG)_DESCR := IlmBase $(PKG)_IGNORE := $(PKG)_VERSION := 2.2.0 $(PKG)_CHECKSUM := ecf815b60695555c1fbc73679e84c7c9902f4e8faa6e8000d2f905b8b86cedc7 $(PKG)_SUBDIR := ilmbase-$($(PKG)_VERSION) $(PKG)_FILE := ilmbase-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://download.savannah.nongnu.org/releases/openexr/$($(PKG)_FILE) +$(PKG)_URL := https://download.savannah.nongnu.org/releases/openexr/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE diff --git a/src/imagemagick-test.cpp b/src/imagemagick-test.cpp index 7c7305aa..a27efd54 100644 --- a/src/imagemagick-test.cpp +++ b/src/imagemagick-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <Magick++.h> diff --git a/src/imagemagick.mk b/src/imagemagick.mk index 55642706..28b4f6c3 100644 --- a/src/imagemagick.mk +++ b/src/imagemagick.mk @@ -1,19 +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 := imagemagick +$(PKG)_WEBSITE := https://www.imagemagick.org/ +$(PKG)_DESCR := ImageMagick $(PKG)_IGNORE := $(PKG)_VERSION := 6.9.0-0 $(PKG)_CHECKSUM := 12331c904c691cb128865fdc97e5f8a2654576f9b032e274b74dd7617aa1b9b6 $(PKG)_SUBDIR := ImageMagick-$($(PKG)_VERSION) $(PKG)_FILE := ImageMagick-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://www.imagemagick.org/download/releases/$($(PKG)_FILE) -$(PKG)_URL_2 := http://ftp.sunet.se/pub/multimedia/graphics/ImageMagick/$($(PKG)_FILE) +$(PKG)_URL := https://www.imagemagick.org/download/releases/$($(PKG)_FILE) +$(PKG)_URL_2 := https://ftp.sunet.se/pub/multimedia/graphics/ImageMagick/$($(PKG)_FILE) $(PKG)_DEPS := gcc bzip2 ffmpeg fftw freetype jasper jpeg lcms \ liblqr-1 libltdl libpng openexr pthreads tiff define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.imagemagick.org/' | \ + $(WGET) -q -O- 'https://www.imagemagick.org/' | \ $(SED) -n 's,.*<p>The current release is ImageMagick \([0-9][0-9.-]*\).*,\1,p' | \ head -1 endef @@ -33,6 +34,6 @@ define $(PKG)_BUILD '$(1)'/libtool --mode=link --tag=CXX \ '$(TARGET)-g++' -Wall -Wextra -std=gnu++0x \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-imagemagick.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-imagemagick.exe' \ `'$(TARGET)-pkg-config' ImageMagick++ --cflags --libs` endef diff --git a/src/isl.mk b/src/isl.mk index 348ea331..a4625b4c 100644 --- a/src/isl.mk +++ b/src/isl.mk @@ -1,10 +1,11 @@ -# 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 := isl +$(PKG)_WEBSITE := http://isl.gforge.inria.fr/ +$(PKG)_DESCR := Integer Set Library $(PKG)_IGNORE := -$(PKG)_VERSION := 0.14 -$(PKG)_CHECKSUM := 7e3c02ff52f8540f6a85534f54158968417fd676001651c8289c705bd0228f36 +$(PKG)_VERSION := 0.15 +$(PKG)_CHECKSUM := 8ceebbf4d9a81afa2b4449113cee4b7cb14a687d7a549a963deb5e2a41458b6b $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 $(PKG)_URL := http://isl.gforge.inria.fr/$($(PKG)_FILE) @@ -15,6 +16,8 @@ $(PKG)_DEPS := gcc gmp $(PKG)_DEPS_$(BUILD) := gmp # stick to tested versions from gcc +# while in gcc4 series specific versions are required: +# https://web.archive.org/web/20141031011459/https://gcc.gnu.org/install/prerequisites.html define $(PKG)_UPDATE $(WGET) -q -O- 'ftp://gcc.gnu.org/pub/gcc/infrastructure/' | \ $(SED) -n 's,.*isl-\([0-9][^>]*\)\.tar.*,\1,p' | \ @@ -26,8 +29,6 @@ define $(PKG)_BUILD cd '$(1)' && ./configure \ $(MXE_CONFIGURE_OPTS) \ --with-gmp-prefix='$(PREFIX)/$(TARGET)' - $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j '$(JOBS)' $(if $(BUILD_SHARED),LDFLAGS=-no-undefined) $(MAKE) -C '$(1)' -j '$(JOBS)' install endef - -$(PKG)_BUILD_SHARED = diff --git a/src/itk-1-fixes.patch b/src/itk-1-fixes.patch new file mode 100644 index 00000000..38e596c4 --- /dev/null +++ b/src/itk-1-fixes.patch @@ -0,0 +1,111 @@ +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: Rashad Kanavath <rashad.kanavath@c-s.fr> +Date: Wed, 2 Dec 2015 15:00:54 +0100 +Subject: [PATCH] fix shared build + + +diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/socketxx/socket++/CMakeLists.txt b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/socketxx/socket++/CMakeLists.txt +index 1111111..2222222 100644 +--- a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/socketxx/socket++/CMakeLists.txt ++++ b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/socketxx/socket++/CMakeLists.txt +@@ -6,6 +6,8 @@ set(PACKAGE "socket++") + include(CheckFunctionExists) + CHECK_FUNCTION_EXISTS(strsignal SOCKETXX_HAVE_STRSIGNAL) + ++add_definitions(-Dsocketxx_EXPORTS) ++ + # specific + if(WIN32) + else() +@@ -67,6 +69,8 @@ if(UNIX) + ) + endif() + ++set(GDCM_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) ++ + add_library(${SOCKETXX_LIBRARY_NAME} ${libsocket___la_SOURCES}) + set_target_properties (${SOCKETXX_LIBRARY_NAME} + PROPERTIES DEFINE_SYMBOL "socketxx_EXPORTS" ) +@@ -105,4 +109,3 @@ if(NOT SOCKETXX_INSTALL_NO_DEVELOPMENT) + DESTINATION ${SOCKETXX_INSTALL_INCLUDE_DIR} COMPONENT Headers + ) + endif() +- + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Mon, 24 Oct 2016 02:01:07 +0300 +Subject: [PATCH] disable try-run + +It is impossible to run while cross-compiling. + +Fix the following error: + + CMake Error at Modules/ThirdParty/VNL/src/vxl/config/cmake/config/VXLIntrospectionConfig.cmake:736 (message): + Compiler is required to have has_infinity. + Call Stack (most recent call first): + Modules/ThirdParty/VNL/src/vxl/CMakeLists.txt:184 (include) + +diff --git a/Modules/ThirdParty/VNL/src/vxl/config/cmake/config/VXLIntrospectionConfig.cmake b/Modules/ThirdParty/VNL/src/vxl/config/cmake/config/VXLIntrospectionConfig.cmake +index 1111111..2222222 100644 +--- a/Modules/ThirdParty/VNL/src/vxl/config/cmake/config/VXLIntrospectionConfig.cmake ++++ b/Modules/ThirdParty/VNL/src/vxl/config/cmake/config/VXLIntrospectionConfig.cmake +@@ -141,52 +141,8 @@ endmacro() + # and returns 0 (indicating success). + # + macro(PERFORM_CMAKE_TEST_RUN PLFM_TEST_FILE TEST) +- if( VXL_UPDATE_CONFIGURATION ) +- unset( ${TEST} ) +- endif() +- if(NOT DEFINED "${TEST}") +- # Perform test +- set(MACRO_CHECK_FUNCTION_DEFINITIONS +- "-D${TEST} ${CMAKE_REQUIRED_FLAGS}") +- if(CMAKE_REQUIRED_LIBRARIES) +- set(TEST_ADD_LIBRARIES +- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") +- endif() +- message(STATUS "Performing Test ${TEST}") +- +- try_run(${TEST} ${TEST}_COMPILED +- ${CMAKE_BINARY_DIR} +- ${PLFM_TEST_FILE} +- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} +- "${TEST_ADD_LIBRARIES}" +- OUTPUT_VARIABLE OUTPUT) +- if(${TEST}_COMPILED) +- if(${TEST}) +- message(STATUS "Performing Test ${TEST} - Failed") +- set(${TEST} 0 CACHE INTERNAL "Test ${FUNCTION} (failed to run)") +- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log +- "Performing Test ${TEST} failed with the following output:\n" +- "${OUTPUT}\n") +- else() +- set(${TEST} 1 CACHE INTERNAL "VXL test ${FUNCTION} (successful run)") +- message(STATUS "Performing Test ${TEST} - Success") +- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log +- "Performing Test ${TEST} succeeded with the following output:\n" +- "${OUTPUT}\n") +- endif() +- else() +- message(STATUS "Performing Try-Run Test ${TEST} - Test Compilation Failed") +- set(${TEST} 0 CACHE INTERNAL "Test ${FUNCTION} (failed to compile)") +- file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log +- "Performing Try-Run Test ${TEST} failed to compile with the following output:\n" +- "${OUTPUT}\n") +- endif() +- else() +- # Have result +- #foreach(tst ${TEST}) +- # message("Test ${TEST} resulted in ${${tst}}") +- #endforeach() +- endif() ++ # We are cross-compliling and can not run anything. ++ set( ${TEST} 1) + endmacro() + + # diff --git a/src/itk-1-tryrun.patch b/src/itk-1-tryrun.patch deleted file mode 100644 index 0a19da4f..00000000 --- a/src/itk-1-tryrun.patch +++ /dev/null @@ -1,79 +0,0 @@ -# This file is part of MXE. -# See index.html for further information. - ---- blubb 1970-01-01 01:00:00.000000000 +0100 -+++ ITK/TryRunResults.cmake 2011-09-27 08:44:04.563613261 +0200 -@@ -0,0 +1,72 @@ -+SET( KWSYS_CHAR_IS_SIGNED -+ "0" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+SET( KWSYS_CHAR_IS_SIGNED__TRYRUN_OUTPUT -+ "" -+ CACHE STRING "Output from TRY_RUN" FORCE) -+SET( VCL_HAS_SLICED_DESTRUCTOR_BUG -+ "0" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+SET( VCL_HAS_SLICED_DESTRUCTOR_BUG__TRYRUN_OUTPUT -+ "" -+ CACHE STRING "Output from TRY_RUN" FORCE) -+SET( VCL_HAS_WORKING_STRINGSTREAM -+ "0" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+SET( VCL_HAS_WORKING_STRINGSTREAM__TRYRUN_OUTPUT -+ "" -+ CACHE STRING "Output from TRY_RUN" FORCE) -+SET( VCL_HAS_LFS -+ "0" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+SET( VCL_HAS_LFS__TRYRUN_OUTPUT -+ "" -+ CACHE STRING "Output from TRY_RUN" FORCE) -+SET( VXL_SSE2_HARDWARE_SUPPORT_POSSIBLE -+ "0" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+SET( VXL_SSE2_HARDWARE_SUPPORT_POSSIBLE__TRYRUN_OUTPUT -+ "" -+ CACHE STRING "Output from TRY_RUN" FORCE) -+SET( VCL_COMPLEX_POW_WORKS -+ "0" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+SET( VCL_COMPLEX_POW_WORKS__TRYRUN_OUTPUT -+ "" -+ CACHE STRING "Output from TRY_RUN" FORCE) -+SET( VCL_CHAR_IS_SIGNED -+ "0" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+SET( VCL_CHAR_IS_SIGNED__TRYRUN_OUTPUT -+ "" -+ CACHE STRING "Output from TRY_RUN" FORCE) -+SET( VCL_NUMERIC_LIMITS_HAS_INFINITY -+ "0" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+SET( VCL_NUMERIC_LIMITS_HAS_INFINITY__TRYRUN_OUTPUT -+ "" -+ CACHE STRING "Output from TRY_RUN" FORCE) -+SET( VCL_PROCESSOR_HAS_INFINITY -+ "0" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+SET( VCL_PROCESSOR_HAS_INFINITY__TRYRUN_OUTPUT -+ "" -+ CACHE STRING "Output from TRY_RUN" FORCE) -+SET( QNANHIBIT_VALUE -+ "1" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+SET( QNANHIBIT_VALUE__TRYRUN_OUTPUT -+ "-DTEEM_QNANHIBIT=1" -+ CACHE STRING "Output from TRY_RUN" FORCE) -+SET( KWSYS_LFS_WORKS -+ "0" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+SET( KWSYS_LFS_WORKS__TRYRUN_OUTPUT -+ "" -+ CACHE STRING "Output from TRY_RUN" FORCE) -+SET( VXL_HAS_SSE2_HARDWARE_SUPPORT -+ "0" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+SET( VXL_HAS_SSE2_HARDWARE_SUPPORT__TRYRUN_OUTPUT -+ "" -+ CACHE STRING "Output from TRY_RUN" FORCE) - diff --git a/src/itk.mk b/src/itk.mk index 21639799..a8194fa9 100644 --- a/src/itk.mk +++ b/src/itk.mk @@ -1,35 +1,36 @@ -# 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 := itk +$(PKG)_WEBSITE := https://www.itk.org/ +$(PKG)_DESCR := Insight Segmentation and Registration Toolkit (ITK) $(PKG)_IGNORE := -$(PKG)_VERSION := 4.4.1 -$(PKG)_CHECKSUM := 7d6f5d50b4689daf710933ef99ec8764e4b1700f636e90b7fa94aeb9f99247fd +$(PKG)_VERSION := 4.10.1 +$(PKG)_CHECKSUM := 334312cc31925fd6c2622c9cd4ed33fecbbbd5b97e03b93f34b259d08352eed7 $(PKG)_SUBDIR := InsightToolkit-$($(PKG)_VERSION) $(PKG)_FILE := $($(PKG)_SUBDIR).tar.xz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) -$(PKG)_DEPS := gcc hdf5 +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_DEPS := gcc expat hdf5 jpeg libpng tiff zlib define $(PKG)_UPDATE - echo 'TODO: Updates for package ITK need to be written.' >&2; - echo $(itk_VERSION) + $(WGET) -q -O- 'https://itk.org/ITK/resources/software.html' | \ + $(SED) -n 's,.*InsightToolkit-\([0-9][^>]*\)\.tar\.xz.*,\1,p' | \ + $(SORT) -V | + tail -1 endef define $(PKG)_BUILD - $(SED) -i 's^# error "Dunno about this gcc"^# warning "Dunno about this gcc"^;' \ - '$(1)/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_compiler.h' mkdir '$(1).build' - cd '$(1).build' && cmake \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -C '$(1)/TryRunResults.cmake'\ - -DBUILD_SHARED_LIBS=FALSE \ + cd '$(1).build' && '$(TARGET)-cmake' \ -DCMAKE_VERBOSE_MAKEFILE=TRUE \ + -DITK_FORBID_DOWNLOADS=TRUE \ -DBUILD_TESTING=FALSE \ -DBUILD_EXAMPLES=FALSE \ + -DITK_USE_SYSTEM_EXPAT=TRUE \ -DITK_USE_SYSTEM_HDF5=TRUE \ - -DCMAKE_C_FLAGS='-std=gnu89' \ + -DITK_USE_SYSTEM_JPEG=TRUE \ + -DITK_USE_SYSTEM_PNG=TRUE \ + -DITK_USE_SYSTEM_TIFF=TRUE \ + -DITK_USE_SYSTEM_ZLIB=TRUE \ '$(1)' $(MAKE) -C '$(1).build' -j '$(JOBS)' install VERBOSE=1 endef - -$(PKG)_BUILD_SHARED = diff --git a/src/jack-1-fixes.patch b/src/jack-1-fixes.patch new file mode 100644 index 00000000..3984648f --- /dev/null +++ b/src/jack-1-fixes.patch @@ -0,0 +1,225 @@ +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: Harry Nakos <xnakos@gmail.com> +Date: Tue, 16 Jun 2015 21:55:31 +0300 +Subject: [PATCH] Patch wscript to link to FLAC, vorbis, vorbisenc, and ogg + libraries + +... which libsndfile is dependent on, since libsndfile will most probably +have not been built statically linked to those libraries. + +diff --git a/example-clients/wscript b/example-clients/wscript +index 1111111..2222222 100644 +--- a/example-clients/wscript ++++ b/example-clients/wscript +@@ -41,6 +41,10 @@ def configure(conf): + + if conf.is_defined('HAVE_SNDFILE'): + conf.env['LIB_SNDFILE'] = ['sndfile'] ++ conf.env['LIB_FLAC'] = ['FLAC'] ++ conf.env['LIB_VORBIS'] = ['vorbis'] ++ conf.env['LIB_VORBISENC'] = ['vorbisenc'] ++ conf.env['LIB_OGG'] = ['ogg'] + + conf.check_cfg(package='celt', atleast_version='0.5.0', args='--cflags --libs', mandatory=False) + +@@ -124,7 +128,7 @@ def build(bld): + if bld.env['IS_SUN']: + prog.use += ['RT', 'SNDFILE'] + if bld.env['IS_WINDOWS']: +- prog.uselib = ['SNDFILE'] ++ prog.uselib = ['SNDFILE', 'FLAC', 'VORBIS', 'VORBISENC', 'OGG'] + prog.target = 'jack_rec' + + if bld.env['IS_LINUX'] or bld.env['IS_MACOSX']: + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Mon, 31 Aug 2015 23:39:35 +0200 +Subject: [PATCH] disable SIGQUIT and SIGHUP + +Windows doesn't have them. + +Fixed error: + + ../example-clients/transport.c: In function 'main': + ../example-clients/transport.c:462:9: error: 'SIGQUIT' undeclared (first use in this function) + signal(SIGQUIT, signal_handler); + ^ + ../example-clients/transport.c:462:9: note: each undeclared identifier is reported only once for each function it appears in + ../example-clients/transport.c:464:9: error: 'SIGHUP' undeclared (first use in this function) + signal(SIGHUP, signal_handler); + ^ + +diff --git a/example-clients/transport.c b/example-clients/transport.c +index 1111111..2222222 100644 +--- a/example-clients/transport.c ++++ b/example-clients/transport.c +@@ -459,9 +459,13 @@ int main(int argc, char *argv[]) + return 1; + } + ++#ifndef _WIN32 + signal(SIGQUIT, signal_handler); ++#endif + signal(SIGTERM, signal_handler); ++#ifndef _WIN32 + signal(SIGHUP, signal_handler); ++#endif + signal(SIGINT, signal_handler); + + jack_on_shutdown(client, jack_shutdown, 0); + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Tue, 1 Sep 2015 22:59:47 +0200 +Subject: [PATCH] link transport.c -lreadline and -ltermcap + +Fixed error: + +src/jack-3-add-lreadline-to-linkflags-of-transport.patch: + + example-clients/transport.c.28.o:transport.c:(.text+0x2e0): undefined reference to `rl_cleanup_after_signal' + example-clients/transport.c.28.o:transport.c:(.text+0xa27): undefined reference to `rl_readline_name' + example-clients/transport.c.28.o:transport.c:(.text+0xa2d): undefined reference to `rl_completion_entry_function' + example-clients/transport.c.28.o:transport.c:(.text+0xa3e): undefined reference to `readline' + example-clients/transport.c.28.o:transport.c:(.text+0xa82): undefined reference to `add_history' + +diff --git a/example-clients/wscript b/example-clients/wscript +index 1111111..2222222 100644 +--- a/example-clients/wscript ++++ b/example-clients/wscript +@@ -49,12 +49,13 @@ def configure(conf): + conf.check_cfg(package='celt', atleast_version='0.5.0', args='--cflags --libs', mandatory=False) + + e = conf.check_cc(lib='readline', define_name="HAVE_READLINE", mandatory=False) ++ e = conf.check_cc(lib='termcap', define_name="HAVE_TERMCAP", mandatory=False) + + # define_name="HAVE_READLINE" has no effect, LIB_READLINE is defined if readline is available + #if conf.is_defined('HAVE_READLINE'): + # conf.env['LIB_READLINE'] = ['readline'] + +- conf.env['BUILD_EXAMPLE_CLIENT_TRANSPORT'] = bool(conf.env['LIB_READLINE']) ++ conf.env['BUILD_EXAMPLE_CLIENT_TRANSPORT'] = bool(conf.env['LIB_READLINE']) and bool(conf.env['LIB_TERMCAP']) + + conf.env['BUILD_EXAMPLE_CLIENT_REC'] = conf.is_defined('HAVE_SNDFILE') + +@@ -112,6 +113,7 @@ def build(bld): + if bld.env['IS_MACOSX']: + prog.use += ['READLINE'] + prog.target = 'jack_transport' ++ prog.use += ['READLINE', 'TERMCAP'] + + if bld.env['BUILD_EXAMPLE_CLIENT_REC']: + prog = bld(features = 'c cprogram') + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Tue, 1 Sep 2015 22:23:51 +0200 +Subject: [PATCH] install jack libs to lib/jack/ instead of lib/ + +Some Jack library names collide with other libraries, +namely portaudio. + +When Jack is installed first time, it adds libportaudio.dll.a to +usr/i686-w64-mingw32.static/lib/. Portaudio has library +usr/i686-w64-mingw32.static/lib/libportaudio.a. When Jack is compiled +second time, it uses its own libportaudio.dll.a instead of +libportaudio.a from portaudio. + +Removing usr/i686-w64-mingw32.static/lib/libportaudio.dll.a fixes build of Jack. + +For i686-w64-mingw32.shared, this can't be fixed by just removing +libportaudio.dll.a before building jack, because both portaudio and +jack have file usr/i686-w64-mingw32.shared/lib/libportaudio.dll.a. +Two packages must not have same file. + +jack's libraries should be installed to subdir of usr/<target>/lib/. + +Jack uses waf build system, which unpacks itself from file "waf". +Installation path for lib*.dll.a (PREFIX + /lib) is hardcoded in waf: + +waflib/Tools/ccroot.py: + + self.implib_install_task=self.bld.install_as('${PREFIX}/lib/%s'%implib.name,implib,self.env) + +The least ugly way to change subdir I can find is changing +function do_install in InstallContext class. Other approaches +either do not work or require changing contents of waflib +(which is unpacked from "waf" file in run-time). + +This patch replaces paths like "lib/libjack.dll.a" with +"lib/jack/libjack.dll.a", but doesn't replace +"/lib/pkgconfig/jack.pc". + +diff --git a/jack.pc.in b/jack.pc.in +index 1111111..2222222 100644 +--- a/jack.pc.in ++++ b/jack.pc.in +@@ -7,5 +7,5 @@ server_libs=-L@LIBDIR@ -l@SERVERLIB@ + Name: jack + Description: the Jack Audio Connection Kit: a low-latency synchronous callback-based media server + Version: @JACK_VERSION@ +-Libs: -L@LIBDIR@ -ljack ++Libs: -L@LIBDIR@/jack -ljack + Cflags: -I@INCLUDEDIR@ +diff --git a/wscript b/wscript +index 1111111..2222222 100644 +--- a/wscript ++++ b/wscript +@@ -378,8 +378,13 @@ def configure(conf): + print(Logs.colors.NORMAL, end=' ') + print() + ++class MyInstallContext(InstallContext): ++ def do_install(self, src, tgt, *args, **kvargs): ++ tgt = str(tgt).replace('/lib/lib', '/lib/jack/lib') ++ InstallContext.do_install(self, src, tgt, *args, **kvargs) ++ + def init(ctx): +- for y in (BuildContext, CleanContext, InstallContext, UninstallContext): ++ for y in (BuildContext, CleanContext, MyInstallContext, UninstallContext): + name = y.__name__.replace('Context','').lower() + class tmp(y): + cmd = name + '_' + lib32 + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Fri, 1 Jan 2016 15:21:46 +0300 +Subject: [PATCH] waf: disable function causing pickling errors + +According to Debian patch of py3cairo which also uses waf [1], + +80_fix pickle.patch: +> during the build process, a context instance is pickled, or at +> least attempted to be. This fails because self.node_class is assigned to a +> class which is nested inside the __init__() method. Because Python cannot +> find this class at unpickling time (i.e. it cannot be imported), Python +> refuses to pickle the Context instance, leading to a FTBFS. Since there's no +> obvious reason why the class has to be so nested, moving it to a module +> global solves the build failure. + +81_pickling again.patch: +> follow up to 80_fix-pickle.patch. just disable pickling +> altogether since the previous patch doesn't really fix the problem, and not +> storing the pickle seems to have no adverse effects on the build, while +> avoiding the observed traceback. + +[1] http://sources.debian.net/patches/summary/py3cairo/1.10.0+dfsg-5/ + +diff --git a/waf b/waf +index 1111111..2222222 100755 +--- a/waf ++++ b/waf +@@ -158,6 +158,8 @@ sys.path.insert(0, wafdir) + if __name__ == '__main__': + import waflib.extras.compat15 + from waflib import Scripting ++ from waflib import Build ++ Build.BuildContext.store = lambda self: True + Scripting.waf_entry_point(cwd, VERSION, wafdir) + + #==> diff --git a/src/jack-1-link-to-libsndfile-deps.patch b/src/jack-1-link-to-libsndfile-deps.patch deleted file mode 100644 index 5986ebb0..00000000 --- a/src/jack-1-link-to-libsndfile-deps.patch +++ /dev/null @@ -1,28 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -This patch has been taken from: -???? - ---- jack-1.9.10/example-clients/wscript.orig 2015-06-16 15:34:56.407346962 +0300 -+++ jack-1.9.10/example-clients/wscript 2015-06-16 21:15:40.923117183 +0300 -@@ -41,6 +41,10 @@ - - if conf.is_defined('HAVE_SNDFILE'): - conf.env['LIB_SNDFILE'] = ['sndfile'] -+ conf.env['LIB_FLAC'] = ['FLAC'] -+ conf.env['LIB_VORBIS'] = ['vorbis'] -+ conf.env['LIB_VORBISENC'] = ['vorbisenc'] -+ conf.env['LIB_OGG'] = ['ogg'] - - conf.check_cfg(package='celt', atleast_version='0.5.0', args='--cflags --libs', mandatory=False) - -@@ -124,7 +128,7 @@ - if bld.env['IS_SUN']: - prog.use += ['RT', 'SNDFILE'] - if bld.env['IS_WINDOWS']: -- prog.uselib = ['SNDFILE'] -+ prog.uselib = ['SNDFILE', 'FLAC', 'VORBIS', 'VORBISENC', 'OGG'] - prog.target = 'jack_rec' - - if bld.env['IS_LINUX'] or bld.env['IS_MACOSX']: diff --git a/src/jack-2-disable-sigquit-and-sighup.patch b/src/jack-2-disable-sigquit-and-sighup.patch deleted file mode 100644 index c9df0036..00000000 --- a/src/jack-2-disable-sigquit-and-sighup.patch +++ /dev/null @@ -1,45 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From 2e1760b4bc62715f12e90c1396f839521506db85 Mon Sep 17 00:00:00 2001 -From: Boris Nagaev <bnagaev@gmail.com> -Date: Mon, 31 Aug 2015 23:39:35 +0200 -Subject: [PATCH] disable SIGQUIT and SIGHUP - -Windows doesn't have them. - -Fixed error: - - ../example-clients/transport.c: In function 'main': - ../example-clients/transport.c:462:9: error: 'SIGQUIT' undeclared (first use in this function) - signal(SIGQUIT, signal_handler); - ^ - ../example-clients/transport.c:462:9: note: each undeclared identifier is reported only once for each function it appears in - ../example-clients/transport.c:464:9: error: 'SIGHUP' undeclared (first use in this function) - signal(SIGHUP, signal_handler); - ^ ---- - example-clients/transport.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/example-clients/transport.c b/example-clients/transport.c -index 76184df..f0e3924 100644 ---- a/example-clients/transport.c -+++ b/example-clients/transport.c -@@ -460,9 +460,13 @@ int main(int argc, char *argv[]) - return 1; - } - -+#ifndef _WIN32 - signal(SIGQUIT, signal_handler); -+#endif - signal(SIGTERM, signal_handler); -+#ifndef _WIN32 - signal(SIGHUP, signal_handler); -+#endif - signal(SIGINT, signal_handler); - - jack_on_shutdown(client, jack_shutdown, 0); --- -1.7.10.4 - diff --git a/src/jack-3-add-lreadline-to-linkflags-of-transport.patch b/src/jack-3-add-lreadline-to-linkflags-of-transport.patch deleted file mode 100644 index 48d13f1f..00000000 --- a/src/jack-3-add-lreadline-to-linkflags-of-transport.patch +++ /dev/null @@ -1,52 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From cd9319a5a5570aab7cfd6a51630a13e7f9db9658 Mon Sep 17 00:00:00 2001 -From: Boris Nagaev <bnagaev@gmail.com> -Date: Tue, 1 Sep 2015 22:59:47 +0200 -Subject: [PATCH] link transport.c -lreadline and -ltermcap - -Fixed error: - -src/jack-3-add-lreadline-to-linkflags-of-transport.patch: - - example-clients/transport.c.28.o:transport.c:(.text+0x2e0): undefined reference to `rl_cleanup_after_signal' - example-clients/transport.c.28.o:transport.c:(.text+0xa27): undefined reference to `rl_readline_name' - example-clients/transport.c.28.o:transport.c:(.text+0xa2d): undefined reference to `rl_completion_entry_function' - example-clients/transport.c.28.o:transport.c:(.text+0xa3e): undefined reference to `readline' - example-clients/transport.c.28.o:transport.c:(.text+0xa82): undefined reference to `add_history' - ---- - example-clients/wscript | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/example-clients/wscript b/example-clients/wscript -index fbf8999..8d6dfb9 100644 ---- a/example-clients/wscript -+++ b/example-clients/wscript -@@ -45,12 +45,13 @@ def configure(conf): - conf.check_cfg(package='celt', atleast_version='0.5.0', args='--cflags --libs', mandatory=False) - - e = conf.check_cc(lib='readline', define_name="HAVE_READLINE", mandatory=False) -+ e = conf.check_cc(lib='termcap', define_name="HAVE_TERMCAP", mandatory=False) - - # define_name="HAVE_READLINE" has no effect, LIB_READLINE is defined if readline is available - #if conf.is_defined('HAVE_READLINE'): - # conf.env['LIB_READLINE'] = ['readline'] - -- conf.env['BUILD_EXAMPLE_CLIENT_TRANSPORT'] = bool(conf.env['LIB_READLINE']) -+ conf.env['BUILD_EXAMPLE_CLIENT_TRANSPORT'] = bool(conf.env['LIB_READLINE']) and bool(conf.env['LIB_TERMCAP']) - - conf.env['BUILD_EXAMPLE_CLIENT_REC'] = conf.is_defined('HAVE_SNDFILE') - -@@ -108,6 +109,7 @@ def build(bld): - if bld.env['IS_MACOSX']: - prog.use += ['READLINE'] - prog.target = 'jack_transport' -+ prog.use += ['READLINE', 'TERMCAP'] - - if bld.env['BUILD_EXAMPLE_CLIENT_REC']: - prog = bld(features = 'c cprogram') --- -1.7.10.4 - diff --git a/src/jack-4-install-libs-to-subdir.patch b/src/jack-4-install-libs-to-subdir.patch deleted file mode 100644 index 6783846d..00000000 --- a/src/jack-4-install-libs-to-subdir.patch +++ /dev/null @@ -1,80 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From f388514f8cba7102eec857aa4c2675d1024cd25c Mon Sep 17 00:00:00 2001 -From: Boris Nagaev <bnagaev@gmail.com> -Date: Tue, 1 Sep 2015 22:23:51 +0200 -Subject: [PATCH] install jack libs to lib/jack/ instead of lib/ - -Some Jack library names collide with other libraries, -namely portaudio. - -When Jack is installed first time, it adds libportaudio.dll.a to -usr/i686-w64-mingw32.static/lib/. Portaudio has library -usr/i686-w64-mingw32.static/lib/libportaudio.a. When Jack is compiled -second time, it uses its own libportaudio.dll.a instead of -libportaudio.a from portaudio. - -Removing usr/i686-w64-mingw32.static/lib/libportaudio.dll.a fixes build of Jack. - -For i686-w64-mingw32.shared, this can't be fixed by just removing -libportaudio.dll.a before building jack, because both portaudio and -jack have file usr/i686-w64-mingw32.shared/lib/libportaudio.dll.a. -Two packages must not have same file. - -jack's libraries should be installed to subdir of usr/<target>/lib/. - -Jack uses waf build system, which unpacks itself from file "waf". -Installation path for lib*.dll.a (PREFIX + /lib) is hardcoded in waf: - -waflib/Tools/ccroot.py: - - self.implib_install_task=self.bld.install_as('${PREFIX}/lib/%s'%implib.name,implib,self.env) - -The least ugly way to change subdir I can find is changing -function do_install in InstallContext class. Other approaches -either do not work or require changing contents of waflib -(which is unpacked from "waf" file in run-time). - -This patch replaces paths like "lib/libjack.dll.a" with -"lib/jack/libjack.dll.a", but doesn't replace -"/lib/pkgconfig/jack.pc". - ---- - jack.pc.in | 2 +- - wscript | 7 ++++++- - 2 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/jack.pc.in b/jack.pc.in -index fbda3a4..c67772b 100644 ---- a/jack.pc.in -+++ b/jack.pc.in -@@ -7,5 +7,5 @@ server_libs=-L@LIBDIR@ -l@SERVERLIB@ - Name: jack - Description: the Jack Audio Connection Kit: a low-latency synchronous callback-based media server - Version: @JACK_VERSION@ --Libs: -L@LIBDIR@ -ljack -+Libs: -L@LIBDIR@/jack -ljack - Cflags: -I@INCLUDEDIR@ -diff --git a/wscript b/wscript -index aef4bd8..16507e7 100644 ---- a/wscript -+++ b/wscript -@@ -378,8 +378,13 @@ def configure(conf): - print(Logs.colors.NORMAL, end=' ') - print() - -+class MyInstallContext(InstallContext): -+ def do_install(self, src, tgt, *args, **kvargs): -+ tgt = str(tgt).replace('/lib/lib', '/lib/jack/lib') -+ InstallContext.do_install(self, src, tgt, *args, **kvargs) -+ - def init(ctx): -- for y in (BuildContext, CleanContext, InstallContext, UninstallContext): -+ for y in (BuildContext, CleanContext, MyInstallContext, UninstallContext): - name = y.__name__.replace('Context','').lower() - class tmp(y): - cmd = name + '_' + lib32 --- -1.7.10.4 - diff --git a/src/jack.mk b/src/jack.mk index b13afa9f..07102171 100644 --- a/src/jack.mk +++ b/src/jack.mk @@ -1,7 +1,8 @@ -# 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 := jack +$(PKG)_WEBSITE := http://jackaudio.org/ +$(PKG)_DESCR := JACK Audio Connection Kit $(PKG)_IGNORE := $(PKG)_VERSION := 1.9.10 $(PKG)_CHECKSUM := 5bc6336e6ac9799e3cb241915e2ba5d01b030589bbb2afae39579a59ef0f2f56 @@ -17,6 +18,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD + # TODO: use waf installed by MXE package waf cd '$(1)' && \ AR='$(TARGET)-ar' \ CC='$(TARGET)-gcc' \ @@ -27,3 +29,5 @@ define $(PKG)_BUILD --prefix='$(PREFIX)/$(TARGET)' \ --dist-target=mingw endef + +$(PKG)_BUILD_STATIC = diff --git a/src/jansson.mk b/src/jansson.mk index 44102921..4b9bcc0e 100644 --- a/src/jansson.mk +++ b/src/jansson.mk @@ -1,7 +1,8 @@ -# 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 := jansson +$(PKG)_WEBSITE := http://www.digip.org/jansson/ +$(PKG)_DESCR := Jansson $(PKG)_IGNORE := $(PKG)_VERSION := 2.7 $(PKG)_CHECKSUM := 459f2b7cf22fb676286723f26169a17cf111fbfb6f54e3dc2ec6b6f9f4a97bdc diff --git a/src/jasper.mk b/src/jasper.mk index a3fa1731..7449646e 100644 --- a/src/jasper.mk +++ b/src/jasper.mk @@ -1,17 +1,18 @@ -# 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 := jasper +$(PKG)_WEBSITE := https://www.ece.uvic.ca/~mdadams/jasper/ +$(PKG)_DESCR := JasPer $(PKG)_IGNORE := $(PKG)_VERSION := 1.900.1 $(PKG)_CHECKSUM := 6b905a9c2aca2e275544212666eefc4eb44d95d0a57e4305457b407fe63f9494 $(PKG)_SUBDIR := jasper-$($(PKG)_VERSION) $(PKG)_FILE := jasper-$($(PKG)_VERSION).zip -$(PKG)_URL := http://www.ece.uvic.ca/~mdadams/jasper/software/$($(PKG)_FILE) +$(PKG)_URL := https://www.ece.uvic.ca/~mdadams/jasper/software/$($(PKG)_FILE) $(PKG)_DEPS := gcc jpeg define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.ece.uvic.ca/~mdadams/jasper/' | \ + $(WGET) -q -O- 'https://www.ece.uvic.ca/~mdadams/jasper/' | \ grep 'jasper-' | \ $(SED) -n 's,.*jasper-\([0-9][^>]*\)\.zip.*,\1,p' | \ head -1 diff --git a/src/jpeg-1-fixes.patch b/src/jpeg-1-fixes.patch index 93834e5c..0ce3c99f 100644 --- a/src/jpeg-1-fixes.patch +++ b/src/jpeg-1-fixes.patch @@ -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 e523bccfefbf105ebe00d986bb1f057dfc304247 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> diff --git a/src/jpeg-2-jmorecfg.patch b/src/jpeg-2-jmorecfg.patch index be1f38b8..2a24b6a3 100644 --- a/src/jpeg-2-jmorecfg.patch +++ b/src/jpeg-2-jmorecfg.patch @@ -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 76b68a405c4e597d04564a0fb1fbe061aaeac2c6 Mon Sep 17 00:00:00 2001 From: Timothy Gu <timothygu99@gmail.com> diff --git a/src/jpeg-test.c b/src/jpeg-test.c index 569c6e6f..9a7b47c7 100644 --- a/src/jpeg-test.c +++ b/src/jpeg-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdio.h> diff --git a/src/jpeg.mk b/src/jpeg.mk index 93d21726..f73c3eef 100644 --- a/src/jpeg.mk +++ b/src/jpeg.mk @@ -1,10 +1,10 @@ -# 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 := jpeg +$(PKG)_WEBSITE := http://www.ijg.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 9a -$(PKG)_CHECKSUM := 3a753ea48d917945dd54a2d97de388aa06ca2eb1066cbfdc6652036349fe05a7 +$(PKG)_VERSION := 9b +$(PKG)_CHECKSUM := 240fd398da741669bf3c90366f58452ea59041cacc741a489b99f2f6a0bad052 $(PKG)_SUBDIR := jpeg-$($(PKG)_VERSION) $(PKG)_FILE := jpegsrc.v$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://www.ijg.org/files/$($(PKG)_FILE) @@ -31,6 +31,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-jpeg.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-jpeg.exe' \ `'$(TARGET)-pkg-config' jpeg --libs` endef diff --git a/src/json-c-1-patch-remove-rpl.patch b/src/json-c-1-patch-remove-rpl.patch index 153ce114..0a2d211b 100644 --- a/src/json-c-1-patch-remove-rpl.patch +++ b/src/json-c-1-patch-remove-rpl.patch @@ -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. see http://lists.fedoraproject.org/pipermail/mingw/2009-May/001567.html diff --git a/src/json-c-2-fix-wincrypt-include.patch b/src/json-c-2-fix-wincrypt-include.patch index 83c5553b..0911d604 100644 --- a/src/json-c-2-fix-wincrypt-include.patch +++ b/src/json-c-2-fix-wincrypt-include.patch @@ -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. mingw32 doesn't include wincrypt.h in windows.h, so the build fails. diff --git a/src/json-c-test.c b/src/json-c-test.c index 967beca7..e8bf2e44 100644 --- a/src/json-c-test.c +++ b/src/json-c-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <json-c/json.h> diff --git a/src/json-c.mk b/src/json-c.mk index 6d347ae0..8413550c 100644 --- a/src/json-c.mk +++ b/src/json-c.mk @@ -1,7 +1,7 @@ -# 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 := json-c +$(PKG)_WEBSITE := https://github.com/json-c/json-c/wiki $(PKG)_IGNORE := $(PKG)_VERSION := 0.12 $(PKG)_CHECKSUM := 6fd6d2311d610b279e1bcdd5c6d4f699700159d3e0786de8306af7b4bc94fb35 @@ -27,7 +27,7 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-json-c.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-json-c.exe' \ `'$(TARGET)-pkg-config' json-c --cflags --libs` endef diff --git a/src/json-glib.mk b/src/json-glib.mk new file mode 100644 index 00000000..fcdc6675 --- /dev/null +++ b/src/json-glib.mk @@ -0,0 +1,25 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := json-glib +$(PKG)_WEBSITE := https://wiki.gnome.org/action/show/Projects/JsonGlib +$(PKG)_DESCR := JSON-Glib +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.0.4 +$(PKG)_CHECKSUM := 80f3593cb6bd13f1465828e46a9f740e2e9bd3cd2257889442b3e62bd6de05cd +$(PKG)_SUBDIR := json-glib-$($(PKG)_VERSION) +$(PKG)_FILE := json-glib-$($(PKG)_VERSION).tar.xz +$(PKG)_URL := https://download.gnome.org/sources/json-glib/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_DEPS := gcc glib + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://git.gnome.org/browse/json-glib/refs/tags' | \ + grep '<a href=' | \ + $(SED) -n 's,.*<a[^>]*>\([0-9]*\.[0-9]*[02468]\.[^<]*\)<.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + cd '$(1)' && ./configure \ + $(MXE_CONFIGURE_OPTS) + $(MAKE) -C '$(1)/json-glib' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= +endef diff --git a/src/json_spirit.mk b/src/json_spirit.mk index 0d190525..356aec82 100644 --- a/src/json_spirit.mk +++ b/src/json_spirit.mk @@ -1,7 +1,7 @@ -# 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 := json_spirit +$(PKG)_WEBSITE := https://www.codeproject.com/Articles/20027/JSON-Spirit-A-C-JSON-Parser-Generator-Implemented $(PKG)_IGNORE := $(PKG)_VERSION := 4.08 $(PKG)_CHECKSUM := 082798e46b3ee4c2b9613c212308f770cd9988c7a08b8ae3c345bf64fdad125f @@ -9,7 +9,7 @@ $(PKG)_SUBDIR := $(PKG)_v$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)_v$($(PKG)_VERSION).zip # The original source of this file at -# http://www.codeproject.com/KB/recipes/JSON_Spirit/json_spirit_v4.08.zip +# https://www.codeproject.com/KB/recipes/JSON_Spirit/json_spirit_v4.08.zip # is behind a login screen. Use manually downloaded cache on the S3 bucket. $(PKG)_URL = $(PKG_MIRROR)/$($(PKG)_FILE) $(PKG)_DEPS := gcc boost @@ -18,7 +18,7 @@ define $(PKG)_UPDATE echo 'TODO: json_spirit automatic update explicitly disabled. Please ' >&2; echo ' manually check and update.' >&2; echo 'Latest:' >&2; - $(WGET) -q -O- 'http://www.codeproject.com/Articles/20027/JSON-Spirit-A-C-JSON-Parser-Generator-Implemented' | \ + $(WGET) -q -O- 'https://www.codeproject.com/Articles/20027/JSON-Spirit-A-C-JSON-Parser-Generator-Implemented' | \ $(SED) -n 's,.*/JSON_Spirit/json_spirit_v\([0-9.]*\)[.]zip.*".*,\1,p' | \ head -1 >&2; echo 'Current:' >&2; @@ -29,9 +29,7 @@ endef define $(PKG)_BUILD mkdir '$(1).build' cd '$(1).build' && \ - cmake '$(1)' \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -DCMAKE_BUILD_TYPE=Release \ + '$(TARGET)-cmake' '$(1)' \ -DCMAKE_RELEASE_POSTFIX='' \ -DBoost_THREADAPI=win32 $(MAKE) -C '$(1).build' -j '$(JOBS)' VERBOSE=1 || $(MAKE) -C '$(1)' -j 1 VERBOSE=1 diff --git a/src/jsoncpp.mk b/src/jsoncpp.mk index c812fa1d..d1866f19 100644 --- a/src/jsoncpp.mk +++ b/src/jsoncpp.mk @@ -1,28 +1,22 @@ -# 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 := jsoncpp +$(PKG)_WEBSITE := https://github.com/open-source-parsers/jsoncpp +$(PKG)_DESCR := A C++ library for interacting with JSON $(PKG)_IGNORE := -$(PKG)_VERSION := 1.6.5 -$(PKG)_CHECKSUM := a2b121eaff56ec88cfd034d17685821a908d0d87bc319329b04f91a6552c1ac2 -$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) -$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := https://github.com/open-source-parsers/jsoncpp/archive/$($(PKG)_VERSION).tar.gz +$(PKG)_VERSION := 1.8.0 +$(PKG)_CHECKSUM := 5deb2462cbf0c0121c9d6c9823ec72fe71417e34242e3509bc7c003d526465bc +$(PKG)_GH_CONF := open-source-parsers/jsoncpp,,,svn $(PKG)_DEPS := gcc -define $(PKG)_UPDATE - $(WGET) -q -O- 'https://github.com/open-source-parsers/jsoncpp/archive/' | \ - $(SED) -n 's,.*/\([0-9][^"]*\)/"\.tar.*,\1,p' | \ - sort | uniq | \ - head -1 -endef +# workaround for builds with GCC >= 6.x +$(PKG)_CXXFLAGS := -Wno-error=conversion -Wno-shift-negative-value define $(PKG)_BUILD - mkdir '$(1)/build' - cd '$(1)/build' && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \ -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF \ - -DBUILD_STATIC_LIBS=$(if $(BUILD_STATIC),true,false) \ - -DBUILD_SHARED_LIBS=$(if $(BUILD_STATIC),false,true) - $(MAKE) -C '$(1)/build' -j '$(JOBS)' install + -DCMAKE_CXX_FLAGS="$($(PKG)_CXXFLAGS)" \ + -DJSONCPP_WITH_CMAKE_PACKAGE=ON + $(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) + $(MAKE) -C '$(BUILD_DIR)' -j 1 install endef diff --git a/src/lame-1-fix-xmmintrin-errors.patch b/src/lame-1-fix-xmmintrin-errors.patch index 7297e2b6..e74299f7 100644 --- a/src/lame-1-fix-xmmintrin-errors.patch +++ b/src/lame-1-fix-xmmintrin-errors.patch @@ -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. Fix compilation of SSE2 sources with GCC 4.9. Since this requires an autoreconf run, we manually disable the GTK 1.2 dependency, because we don't have the GTK diff --git a/src/lame-2-update-autotools.patch b/src/lame-2-update-autotools.patch index 0bc17076..ea590cd0 100644 --- a/src/lame-2-update-autotools.patch +++ b/src/lame-2-update-autotools.patch @@ -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. This patch has been taken from: https://github.com/rbrito/lame/commit/a6552b532919dcc2fbfb32d1dfdaab80c1534200 diff --git a/src/lame.mk b/src/lame.mk index 3129b899..8372ad2a 100644 --- a/src/lame.mk +++ b/src/lame.mk @@ -1,13 +1,13 @@ -# 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 := lame +$(PKG)_WEBSITE := https://lame.sourceforge.io/ $(PKG)_IGNORE := $(PKG)_VERSION := 3.99.5 $(PKG)_CHECKSUM := 24346b4158e4af3bd9f2e194bb23eb473c75fb7377011523353196b19b9a23ff $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE diff --git a/src/lapack-test.c b/src/lapack-test.c index 00bf092a..6a63796d 100644 --- a/src/lapack-test.c +++ b/src/lapack-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ /* taken from http://www.netlib.org/lapack/lapacke.html */ diff --git a/src/lapack-test.f b/src/lapack-test.f index 9872d3b2..f2787cb1 100644 --- a/src/lapack-test.f +++ b/src/lapack-test.f @@ -1,6 +1,5 @@ * -* This file is part of MXE. -* See index.html for further information. +* This file is part of MXE. See LICENSE.md for licensing information. * INTEGER MAJOR, MINOR, PATCH * diff --git a/src/lapack.mk b/src/lapack.mk index b25a84df..ddfb3bf2 100644 --- a/src/lapack.mk +++ b/src/lapack.mk @@ -1,9 +1,9 @@ -# 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 := lapack -$(PKG)_VERSION := 3.5.0 -$(PKG)_CHECKSUM := 9ad8f0d3f3fb5521db49f2dd716463b8fb2b6bc9dc386a9956b8c6144f726352 +$(PKG)_WEBSITE := http://www.netlib.org/lapack/ +$(PKG)_VERSION := 3.6.0 +$(PKG)_CHECKSUM := a9a0082c918fe14e377bbd570057616768dca76cbdc713457d8199aaa233ffc3 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tgz $(PKG)_URL := http://www.netlib.org/$(PKG)/$($(PKG)_FILE) @@ -17,24 +17,22 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - cd '$(1)' && cmake \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + cd '$(1)' && '$(TARGET)-cmake' \ -DCMAKE_AR='$(PREFIX)/bin/$(TARGET)-ar' \ -DCMAKE_RANLIB='$(PREFIX)/bin/$(TARGET)-ranlib' \ -DLAPACKE=ON \ - -DCMAKE_Fortran_FLAGS=$(if $(findstring x86_64,$(TARGET)),-fdefault-integer-8) \ . - cp '$(1)/lapacke/include/lapacke_mangling_with_flags.h' '$(1)/lapacke/include/lapacke_mangling.h' + cp '$(1)/LAPACKE/include/lapacke_mangling_with_flags.h' '$(1)/LAPACKE/include/lapacke_mangling.h' $(MAKE) -C '$(1)/SRC' -j '$(JOBS)' install - $(MAKE) -C '$(1)/lapacke' -j '$(JOBS)' install + $(MAKE) -C '$(1)/LAPACKE' -j '$(JOBS)' install '$(TARGET)-gfortran' \ -W -Wall -Werror -pedantic \ - '$(2).f' -o '$(PREFIX)/$(TARGET)/bin/test-lapack.exe' \ + '$(PWD)/src/$(PKG)-test.f' -o '$(PREFIX)/$(TARGET)/bin/test-lapack.exe' \ -llapack '$(TARGET)-gcc' \ -W -Wall -Werror -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-lapacke.exe' \ + '$(PWD)/src/$(PKG)-test.c' -o '$(PREFIX)/$(TARGET)/bin/test-lapacke.exe' \ -llapacke -llapack -lcblas -lblas -lgfortran -lquadmath endef diff --git a/src/lcms-1-fixes.patch b/src/lcms-1-fixes.patch index 471480b8..f1d88441 100644 --- a/src/lcms-1-fixes.patch +++ b/src/lcms-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/lcms.mk b/src/lcms.mk index 795f3d50..e612a9da 100644 --- a/src/lcms.mk +++ b/src/lcms.mk @@ -1,17 +1,17 @@ -# 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 := lcms +$(PKG)_WEBSITE := http://www.littlecms.com/ $(PKG)_IGNORE := -$(PKG)_VERSION := 2.7 -$(PKG)_CHECKSUM := 4524234ae7de185e6b6da5d31d6875085b2198bc63b1211f7dde6e2d197d6a53 +$(PKG)_VERSION := 2.8 +$(PKG)_CHECKSUM := 66d02b229d2ea9474e62c2b6cd6720fde946155cd1d0d2bffdab829790a0fb22 $(PKG)_SUBDIR := $(PKG)$(word 1,$(subst ., ,$($(PKG)_VERSION)))-$(subst a,,$($(PKG)_VERSION)) $(PKG)_FILE := $(PKG)$(word 1,$(subst ., ,$($(PKG)_VERSION)))-$(subst a,,$($(PKG)_VERSION)).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$(subst a,,$($(PKG)_VERSION))/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$(subst a,,$($(PKG)_VERSION))/$($(PKG)_FILE) $(PKG)_DEPS := gcc jpeg tiff zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/lcms/files/lcms/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/lcms/files/lcms/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef diff --git a/src/lcms1-1-fixes.patch b/src/lcms1-1-fixes.patch index ccc4b770..3e0d6732 100644 --- a/src/lcms1-1-fixes.patch +++ b/src/lcms1-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/lcms1.mk b/src/lcms1.mk index e59dfc7d..9286b5d5 100644 --- a/src/lcms1.mk +++ b/src/lcms1.mk @@ -1,17 +1,17 @@ -# 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 := lcms1 +$(PKG)_WEBSITE := http://www.littlecms.com/ $(PKG)_IGNORE := $(PKG)_VERSION := 1.19 $(PKG)_CHECKSUM := 80ae32cb9f568af4dc7ee4d3c05a4c31fc513fc3e31730fed0ce7378237273a9 $(PKG)_SUBDIR := lcms-$($(PKG)_VERSION) $(PKG)_FILE := lcms-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/lcms/lcms/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/lcms/lcms/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc jpeg tiff zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/lcms/files/lcms/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/lcms/files/lcms/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ grep '^1\.' | \ head -1 diff --git a/src/lensfun-1-fixes.patch b/src/lensfun-1-fixes.patch index f4cebd35..7dc5b102 100644 --- a/src/lensfun-1-fixes.patch +++ b/src/lensfun-1-fixes.patch @@ -1,10 +1,11 @@ -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 fd0f1a46e5220cb13c5b445b9447f2fbc26ff7eb Mon Sep 17 00:00:00 2001 +Contains ad hoc patches for cross building. + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Timothy Gu <timothygu99@gmail.com> Date: Tue, 21 Oct 2014 18:24:56 -0700 -Subject: [PATCH 1/3] build system: Detect POSIX regex lib more properly +Subject: [PATCH] build system: Detect POSIX regex lib more properly Previously, if the regex lib has to be linked separately, as in the case of MinGW/libgnurx, it is not detected properly, and build fails for shared @@ -17,10 +18,10 @@ and is licensed under the LGPL 3, same as this library. Signed-off-by: Timothy Gu <timothygu99@gmail.com> diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8416fe6..bbdf75a 100644 +index 1111111..2222222 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -16,16 +16,18 @@ SET(VERSION_BUGFIX 0) +@@ -20,15 +20,17 @@ SET(LENSFUN_DB_VERSION 1) # check if some include are available INCLUDE(CheckIncludeFiles) @@ -31,7 +32,6 @@ index 8416fe6..bbdf75a 100644 # set include directories INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include/lensfun) - INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include/auxfun) -IF(NOT HAVE_REGEX_H) +IF(NOT REGEX_FOUND) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include/regex) @@ -41,20 +41,20 @@ index 8416fe6..bbdf75a 100644 ENDIF() # options controlling the build process -@@ -153,7 +155,7 @@ ENDIF() +@@ -148,7 +150,7 @@ ADD_SUBDIRECTORY(apps) # install include files - INSTALL(FILES ${CMAKE_BINARY_DIR}/lensfun.h DESTINATION ${INCLUDEDIR}/lensfun) + INSTALL(FILES ${CMAKE_BINARY_DIR}/lensfun.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lensfun) -IF(NOT HAVE_REGEX_H) +IF(NOT REGEX_FOUND) - INSTALL(FILES include/regex/regex.h DESTINATION ${INCLUDEDIR}/regex) + INSTALL(FILES include/regex/regex.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/regex) ENDIF() - IF(BUILD_AUXFUN) -diff --git a/build/CMakeModules/FindRegex.cmake b/build/CMakeModules/FindRegex.cmake + +diff --git a/cmake/modules/FindRegex.cmake b/cmake/modules/FindRegex.cmake new file mode 100644 -index 0000000..cae186f +index 1111111..2222222 --- /dev/null -+++ b/build/CMakeModules/FindRegex.cmake ++++ b/cmake/modules/FindRegex.cmake @@ -0,0 +1,64 @@ +# -*- cmake -*- +# @@ -121,7 +121,7 @@ index 0000000..cae186f + +MARK_AS_ADVANCED(REGEX_INCLUDE_DIR REGEX_LIBRARIES) diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt -index 9e210f3..ab6ce9a 100644 +index 1111111..2222222 100644 --- a/libs/CMakeLists.txt +++ b/libs/CMakeLists.txt @@ -1,4 +1,4 @@ @@ -131,12 +131,12 @@ index 9e210f3..ab6ce9a 100644 ENDIF() diff --git a/libs/lensfun/CMakeLists.txt b/libs/lensfun/CMakeLists.txt -index 7eaadcc..23262f5 100644 +index 1111111..2222222 100644 --- a/libs/lensfun/CMakeLists.txt +++ b/libs/lensfun/CMakeLists.txt @@ -17,8 +17,10 @@ ELSE() ENDIF() - SET_TARGET_PROPERTIES(lensfun PROPERTIES SOVERSION "${VERSION_MAJOR}" VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}") + SET_TARGET_PROPERTIES(lensfun PROPERTIES SOVERSION "${VERSION_API}" VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}") -IF(NOT HAVE_REGEX_H) +IF(NOT REGEX_FOUND) @@ -147,7 +147,7 @@ index 7eaadcc..23262f5 100644 TARGET_LINK_LIBRARIES(lensfun ${GLIB2_LIBRARIES}) diff --git a/libs/lensfun/lensfun.pc.cmake b/libs/lensfun/lensfun.pc.cmake -index 6d14b12..5f91d44 100644 +index 1111111..2222222 100644 --- a/libs/lensfun/lensfun.pc.cmake +++ b/libs/lensfun/lensfun.pc.cmake @@ -10,4 +10,5 @@ Description: A photographic lens database and access library @@ -157,7 +157,7 @@ index 6d14b12..5f91d44 100644 +Libs.private: @REGEX_LIBRARIES@ Cflags: -I${includedir} -I${includedir}/lensfun diff --git a/libs/regex/CMakeLists.txt b/libs/regex/CMakeLists.txt -index 27bc6c6..bcddcf0 100644 +index 1111111..2222222 100644 --- a/libs/regex/CMakeLists.txt +++ b/libs/regex/CMakeLists.txt @@ -1,5 +1,5 @@ @@ -167,22 +167,19 @@ index 27bc6c6..bcddcf0 100644 FILE(GLOB REGEX_SRC *.c *.h) LIST(APPEND REGEX_SRC ../../include/regex/regex.h) ADD_LIBRARY(tre_regex STATIC ${REGEX_SRC}) --- -1.9.1 - -From bed1d4d5ed265083b340aed398403cbaba46e340 Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Timothy Gu <timothygu99@gmail.com> Date: Tue, 21 Oct 2014 18:36:15 -0700 -Subject: [PATCH 2/3] Only install glib DLL on MSVC +Subject: [PATCH] Only install glib DLL on MSVC Signed-off-by: Timothy Gu <timothygu99@gmail.com> diff --git a/CMakeLists.txt b/CMakeLists.txt -index bbdf75a..7690630 100644 +index 1111111..2222222 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -172,7 +172,7 @@ IF(BUILD_DOC) +@@ -164,7 +164,7 @@ IF(BUILD_DOC) ADD_SUBDIRECTORY(docs) ENDIF() @@ -191,41 +188,24 @@ index bbdf75a..7690630 100644 FIND_FILE(GLIB2_DLL NAMES glib-2.dll glib-2-vs9.dll PATHS "${GLIB2_BASE_DIR}/bin" --- -1.9.1 - -From ccdd4f111b4c45bd654531650e4cdb25fdd38b6c Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Timothy Gu <timothygu99@gmail.com> -Date: Tue, 21 Oct 2014 18:41:09 -0700 -Subject: [PATCH 3/3] Add option whether or not to install into source tree on - WIN32 +Date: Tue, 21 Oct 2014 18:54:03 -0700 +Subject: [PATCH] pkgconfig: Explicitly depend on libstdc++ + +Fixes MinGW static. Signed-off-by: Timothy Gu <timothygu99@gmail.com> -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7690630..ef8cf65 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -38,6 +38,9 @@ OPTION(BUILD_FOR_SSE "Build with support for SSE" ON) - OPTION(BUILD_FOR_SSE2 "Build with support for SSE2" ON) - OPTION(BUILD_DOC "Build documentation with doxygen" OFF) - OPTION(INSTALL_HELPER_SCRIPTS "Install various helper scripts" ON) -+IF(WIN32) -+ OPTION(INSTALL_IN_TREE "Install into source tree" ON) -+ENDIF() - - IF(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE Debug CACHE STRING -@@ -102,7 +105,7 @@ IF(BUILD_DOC) - SET(DOCDIR share/doc/lensfun-${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}.${VERSION_BUGFIX} CACHE PATH "Directory to put library documentation in") - ENDIF(BUILD_DOC) - --IF(WIN32) -+IF(WIN32 AND INSTALL_IN_TREE) - # install into place in build-dir - SET(LENSFUN_INSTALL_PREFIX "${SOURCE_BASE_DIR}/lensfun" CACHE PATH "Install prefix for lensfun") - ELSE() --- -1.9.1 - +diff --git a/libs/lensfun/lensfun.pc.cmake b/libs/lensfun/lensfun.pc.cmake +index 1111111..2222222 100644 +--- a/libs/lensfun/lensfun.pc.cmake ++++ b/libs/lensfun/lensfun.pc.cmake +@@ -10,5 +10,5 @@ Description: A photographic lens database and access library + Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_MICRO@.@VERSION_BUGFIX@ + Requires.private: glib-2.0 + Libs: -L${libdir} -llensfun +-Libs.private: @REGEX_LIBRARIES@ ++Libs.private: @REGEX_LIBRARIES@ -lstdc++ + Cflags: -I${includedir} -I${includedir}/lensfun diff --git a/src/lensfun-2-pkg-config.patch b/src/lensfun-2-pkg-config.patch deleted file mode 100644 index ab0c3e2d..00000000 --- a/src/lensfun-2-pkg-config.patch +++ /dev/null @@ -1,29 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From da0bb87d6e520c042f98204c35105bcf4be7ea0f Mon Sep 17 00:00:00 2001 -From: Timothy Gu <timothygu99@gmail.com> -Date: Tue, 21 Oct 2014 18:54:03 -0700 -Subject: [PATCH] pkgconfig: Explicitly depend on libstdc++ - -Fixes MinGW static. - -Signed-off-by: Timothy Gu <timothygu99@gmail.com> ---- - libs/lensfun/lensfun.pc.cmake | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libs/lensfun/lensfun.pc.cmake b/libs/lensfun/lensfun.pc.cmake -index 5f91d44..9c291f8 100644 ---- a/libs/lensfun/lensfun.pc.cmake -+++ b/libs/lensfun/lensfun.pc.cmake -@@ -10,5 +10,5 @@ Description: A photographic lens database and access library - Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_MICRO@.@VERSION_BUGFIX@ - Requires.private: glib-2.0 - Libs: -L${libdir} -llensfun --Libs.private: @REGEX_LIBRARIES@ -+Libs.private: @REGEX_LIBRARIES@ -lstdc++ - Cflags: -I${includedir} -I${includedir}/lensfun --- -1.9.1 - diff --git a/src/lensfun-test.c b/src/lensfun-test.c index f00a13fe..bac1a292 100644 --- a/src/lensfun-test.c +++ b/src/lensfun-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ /* diff --git a/src/lensfun.mk b/src/lensfun.mk index 1062b55c..2cb46597 100644 --- a/src/lensfun.mk +++ b/src/lensfun.mk @@ -1,17 +1,17 @@ -# 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 := lensfun +$(PKG)_WEBSITE := https://lensfun.sourceforge.io/ $(PKG)_IGNORE := -$(PKG)_VERSION := 0.3.0 -$(PKG)_CHECKSUM := c2c3c03873cb549d49d42f118fcb0ffa95d1e45b9ff395e19facb63bf699bec1 +$(PKG)_VERSION := 0.3.2 +$(PKG)_CHECKSUM := ae8bcad46614ca47f5bda65b00af4a257a9564a61725df9c74cb260da544d331 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) -$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/lensfun/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/lensfun/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc glib libgnurx libpng define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/lensfun/files/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/lensfun/files/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ $(SORT) -V | \ tail -1 @@ -19,15 +19,13 @@ endef define $(PKG)_BUILD mkdir '$(1)/building' - cd '$(1)/building' && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -DBUILD_STATIC=$(if $(BUILD_STATIC),TRUE,FALSE) \ - -DINSTALL_IN_TREE=NO + cd '$(1)/building' && '$(TARGET)-cmake' .. \ + -DCMAKE_INSTALL_PREFIX='$(PREFIX)/$(TARGET)' $(MAKE) -C '$(1)/building' -j '$(JOBS)' install VERBOSE=1 # Don't use `-ansi`, as lensfun uses C++-style `//` comments. '$(TARGET)-gcc' \ -W -Wall -Werror \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-lensfun.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-lensfun.exe' \ `'$(TARGET)-pkg-config' lensfun glib-2.0 --cflags --libs` endef diff --git a/src/levmar.mk b/src/levmar.mk index cd260bf7..3427c05e 100644 --- a/src/levmar.mk +++ b/src/levmar.mk @@ -1,17 +1,18 @@ -# 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 := levmar +$(PKG)_WEBSITE := https://www.ics.forth.gr/~lourakis/levmar $(PKG)_IGNORE := $(PKG)_VERSION := 2.6 $(PKG)_CHECKSUM := 3bf4ef1ea4475ded5315e8d8fc992a725f2e7940a74ca3b0f9029d9e6e94bad7 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tgz -$(PKG)_URL := http://www.ics.forth.gr/~lourakis/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://www.ics.forth.gr/~lourakis/$(PKG)/$($(PKG)_FILE) +$(PKG)_UA := MXE $(PKG)_DEPS := gcc blas lapack libf2c define $(PKG)_UPDATE - $(WGET) -q -O- "http://www.ics.forth.gr/~lourakis/levmar/" | \ + $(WGET) -q -O- "https://www.ics.forth.gr/~lourakis/levmar/" | \ $(SED) -n 's_.*Latest:.*levmar-\([0-9]\.[0-9]\).*_\1_ip' | \ head -1; endef diff --git a/src/libaacs-1.patch b/src/libaacs-1.patch index 985fdce1..161104a7 100644 --- a/src/libaacs-1.patch +++ b/src/libaacs-1.patch @@ -1,37 +1,4 @@ -This file is part of MXE. -See index.html for further information. - -From 5ebe4419738fd337f5c2f8e2849dd8e7c1f55d01 Mon Sep 17 00:00:00 2001 -From: Timothy Gu <timothygu99@gmail.com> -Date: Sat, 28 Mar 2015 21:06:26 +0100 -Subject: [PATCH 1/2] fix configure - - -diff --git a/configure.ac b/configure.ac -index 155acad..8cb7e79 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -126,7 +126,7 @@ if test x$libgcrypt_config_prefix != x ; then - fi - fi - --AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) -+AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no) - if test x"$LIBGCRYPT_CONFIG" = xno; then - AC_MSG_ERROR([libgcrypt not found on system]) - else -@@ -149,7 +149,7 @@ if test x$gpg_error_config_prefix != x ; then - fi - fi - --AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) -+AC_PATH_TOOL(GPG_ERROR_CONFIG, gpg-error-config, no) - if test x"$GPG_ERROR_CONFIG" = xno; then - AC_MSG_ERROR([gpg-error not found on system]) - else --- -2.1.0 - +This file is part of MXE. See LICENSE.md for licensing information. From c807305d0df68e88aa04fabd3275aff4f34d4368 Mon Sep 17 00:00:00 2001 From: Timothy Gu <timothygu99@gmail.com> diff --git a/src/libaacs-test.c b/src/libaacs-test.c index 35701e4d..40de196e 100644 --- a/src/libaacs-test.c +++ b/src/libaacs-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <libaacs/aacs.h> diff --git a/src/libaacs.mk b/src/libaacs.mk index e1f0e8a2..1ce07ca8 100644 --- a/src/libaacs.mk +++ b/src/libaacs.mk @@ -1,18 +1,18 @@ -# 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 := libaacs +$(PKG)_WEBSITE := https://www.videolan.org/developers/libaacs.html $(PKG)_IGNORE := -$(PKG)_VERSION := 0.7.1 -$(PKG)_CHECKSUM := ecc49a22ae2a645cfb5b8e732b51fe0e2684e6488a68debc5edd6e07edadb2b0 +$(PKG)_VERSION := 0.8.1 +$(PKG)_CHECKSUM := 95c344a02c47c9753c50a5386fdfb8313f9e4e95949a5c523a452f0bcb01bbe8 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $($(PKG)_SUBDIR).tar.bz2 -$(PKG)_URL := http://ftp.videolan.org/pub/videolan/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) -$(PKG)_URL_2 := ftp://ftp.videolan.org/pub/videolan/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://download.videolan.org/pub/videolan/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL_2 := http://videolan-nyc.defaultroute.com/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc libgcrypt libgpg_error define $(PKG)_UPDATE - $(WGET) -q -O- 'http://ftp.videolan.org/pub/videolan/libaacs/' | \ + $(WGET) -q -O- 'https://download.videolan.org/pub/videolan/libaacs/' | \ $(SED) -n 's,<a href="\([0-9][^<]*\)/".*,\1,p' | \ $(SORT) -Vr | \ head -1 @@ -28,7 +28,7 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -std=c99 -pedantic \ - '$(2).c' \ + '$(TEST_FILE)' \ -o '$(PREFIX)/$(TARGET)/bin/test-libaacs.exe' \ `'$(TARGET)-pkg-config' libaacs --cflags --libs` endef diff --git a/src/libarchive-1-fixes.patch b/src/libarchive-1-fixes.patch index 6f91917e..8576f8df 100644 --- a/src/libarchive-1-fixes.patch +++ b/src/libarchive-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/libarchive-test.c b/src/libarchive-test.c index daeca815..65f87b3a 100644 --- a/src/libarchive-test.c +++ b/src/libarchive-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <archive.h> diff --git a/src/libarchive.mk b/src/libarchive.mk index be970ba2..e60b59d7 100644 --- a/src/libarchive.mk +++ b/src/libarchive.mk @@ -1,17 +1,18 @@ -# 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 := libarchive +$(PKG)_WEBSITE := https://www.libarchive.org/ +$(PKG)_DESCR := Libarchive $(PKG)_IGNORE := $(PKG)_VERSION := 3.1.2 $(PKG)_CHECKSUM := eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.libarchive.org/downloads/$($(PKG)_FILE) +$(PKG)_URL := https://www.libarchive.org/downloads/$($(PKG)_FILE) $(PKG)_DEPS := gcc bzip2 libiconv libxml2 openssl xz zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.libarchive.org/downloads/' | \ + $(WGET) -q -O- 'https://www.libarchive.org/downloads/' | \ $(SED) -n 's,.*libarchive-\([0-9][^<]*\)\.tar.*,\1,p' | \ $(SORT) -V | \ tail -1 @@ -32,6 +33,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libarchive.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libarchive.exe' \ `'$(TARGET)-pkg-config' --libs-only-l libarchive` endef diff --git a/src/libass-test.c b/src/libass-test.c index ea3b6850..b748cbc9 100644 --- a/src/libass-test.c +++ b/src/libass-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <ass/ass.h> diff --git a/src/libass.mk b/src/libass.mk index d54d3006..28af3b04 100644 --- a/src/libass.mk +++ b/src/libass.mk @@ -1,26 +1,30 @@ -# 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 := libass +$(PKG)_WEBSITE := https://code.google.com/p/libass/ $(PKG)_IGNORE := -$(PKG)_VERSION := 0.13.0 -$(PKG)_CHECKSUM := e0071a3b2e95411c8d474014678368e3f0b852f7d663e0564b344e7335eb0671 +# remove autoreconf step after 0.13.1 +# https://github.com/libass/libass/issues/209 +$(PKG)_VERSION := 0.13.1 +$(PKG)_CHECKSUM := 4aa36b1876a61cab46fc9284fee84224b9e2840fe7b3e63d96a8d32574343fe7 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $($(PKG)_SUBDIR).tar.xz $(PKG)_URL := https://github.com/libass/libass/releases/download/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc fontconfig freetype fribidi harfbuzz define $(PKG)_UPDATE - $(WGET) -q -O- 'http://code.google.com/p/libass/downloads/list?sort=-uploaded' | \ - $(SED) -n 's,.*libass-\([0-9][^<]*\)\.tar.*,\1,p' | \ + $(WGET) -q -O- "https://api.github.com/repos/libass/libass/releases" | \ + grep 'tag_name' | \ + $(SED) -n 's,.*tag_name": "\([0-9][^>]*\)".*,\1,p' | \ + $(SORT) -Vr | \ head -1 endef define $(PKG)_BUILD + cd '$(1)' && $(LIBTOOLIZE) && autoreconf -fi # fontconfig is only required for legacy XP support cd '$(1)' && ./configure \ $(MXE_CONFIGURE_OPTS) \ - --disable-enca \ --enable-fontconfig \ --enable-harfbuzz $(MAKE) -C '$(1)' -j '$(JOBS)' @@ -28,6 +32,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libass.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libass.exe' \ `'$(TARGET)-pkg-config' libass --cflags --libs` endef diff --git a/src/libbluray-1.patch b/src/libbluray-1.patch deleted file mode 100644 index ce6ceb75..00000000 --- a/src/libbluray-1.patch +++ /dev/null @@ -1,31 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From b9d39febfd23198c1f9758ffe400cb35a97c1223 Mon Sep 17 00:00:00 2001 -From: Timothy Gu <timothygu99@gmail.com> -Date: Sat, 28 Mar 2015 10:57:00 +0100 -Subject: [PATCH] fix strncasecmp - - -diff --git a/src/libbluray/bdnav/meta_parse.c b/src/libbluray/bdnav/meta_parse.c -index a74ed6e..73ea57b 100644 ---- a/src/libbluray/bdnav/meta_parse.c -+++ b/src/libbluray/bdnav/meta_parse.c -@@ -29,6 +29,13 @@ - #include "meta_parse.h" - #include "libbluray/register.h" - -+#if (defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)) -+#define strncasecmp _strnicmp -+#ifdef __STRICT_ANSI__ -+#undef __STRICT_ANSI__ -+#endif -+#endif -+ - #include <stdlib.h> - #include <string.h> - #include <errno.h> --- -2.1.0 - - diff --git a/src/libbluray.mk b/src/libbluray.mk index cd012a33..18f68917 100644 --- a/src/libbluray.mk +++ b/src/libbluray.mk @@ -1,18 +1,18 @@ -# 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 := libbluray +$(PKG)_WEBSITE := https://www.videolan.org/developers/libbluray.html $(PKG)_IGNORE := -$(PKG)_VERSION := 0.7.0 -$(PKG)_CHECKSUM := f79beb9fbb24117cbb1264c919e686ae9e6349c0ad08b48c4b6233b2887eb68d +$(PKG)_VERSION := 0.9.2 +$(PKG)_CHECKSUM := efc994f42d2bce6af2ce69d05ba89dbbd88bcec7aca065de094fb3a7880ce7ea $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $($(PKG)_SUBDIR).tar.bz2 -$(PKG)_URL := http://ftp.videolan.org/pub/videolan/libbluray/$($(PKG)_VERSION)/$($(PKG)_FILE) -$(PKG)_URL_2 := ftp://ftp.videolan.org/pub/videolan/libbluray/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://download.videolan.org/pub/videolan/libbluray/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL_2 := http://videolan-nyc.defaultroute.com/libbluray/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc freetype libxml2 define $(PKG)_UPDATE - $(WGET) -q -O- 'http://ftp.videolan.org/pub/videolan/libbluray/' | \ + $(WGET) -q -O- 'https://download.videolan.org/pub/videolan/libbluray/' | \ $(SED) -n 's,<a href="\([0-9][^<]*\)/".*,\1,p' | \ $(SORT) -Vr | \ head -1 diff --git a/src/libbs2b-1-fixes.patch b/src/libbs2b-1-fixes.patch index 39433335..555447ed 100644 --- a/src/libbs2b-1-fixes.patch +++ b/src/libbs2b-1-fixes.patch @@ -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 e91b3a8a4edb0d574f0c71372eddf9889c13dc8e Mon Sep 17 00:00:00 2001 From: Timothy Gu <timothygu99@gmail.com> diff --git a/src/libbs2b.mk b/src/libbs2b.mk index 0c294f27..7aff2186 100644 --- a/src/libbs2b.mk +++ b/src/libbs2b.mk @@ -1,17 +1,18 @@ -# 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 := libbs2b +$(PKG)_WEBSITE := https://bs2b.sourceforge.io/ +$(PKG)_DESCR := Bauer Stereophonic-to-Binaural library $(PKG)_IGNORE := $(PKG)_VERSION := 3.1.0 $(PKG)_CHECKSUM := 4799974becdeeedf0db00115bc63f60ea3fe4b25f1dfdb6903505839a720e46f $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/bs2b/libbs2b/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/bs2b/libbs2b/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/bs2b/files/libbs2b/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/bs2b/files/libbs2b/' | \ $(SED) -n 's,.*<a href="/projects/bs2b/files/libbs2b/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef diff --git a/src/libcaca-1-fixes.patch b/src/libcaca-1-fixes.patch index 534b3ea7..a363133a 100644 --- a/src/libcaca-1-fixes.patch +++ b/src/libcaca-1-fixes.patch @@ -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 b9f723cf31e007004ccc748a0e16c594fa7fdf35 Mon Sep 17 00:00:00 2001 From: Timothy Gu <timothygu99@gmail.com> diff --git a/src/libcaca-2-vsnprintf.patch b/src/libcaca-2-vsnprintf.patch index b3b31052..922e6eb6 100644 --- a/src/libcaca-2-vsnprintf.patch +++ b/src/libcaca-2-vsnprintf.patch @@ -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 28a0c250320661a3fe15d3f0373ace044cccd8e5 Mon Sep 17 00:00:00 2001 From: Timothy Gu <timothygu99@gmail.com> diff --git a/src/libcaca.mk b/src/libcaca.mk index c09c9c5e..b658694a 100644 --- a/src/libcaca.mk +++ b/src/libcaca.mk @@ -1,13 +1,13 @@ -# 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 := libcaca +$(PKG)_WEBSITE := http://caca.zoy.org/wiki/libcaca $(PKG)_IGNORE := $(PKG)_VERSION := 0.99.beta19 $(PKG)_CHECKSUM := 128b467c4ed03264c187405172a4e83049342cc8cc2f655f53a2d0ee9d3772f4 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://caca.zoy.org/raw-attachment/wiki/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := http://caca.zoy.org/files/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc freeglut ncurses zlib define $(PKG)_UPDATE diff --git a/src/libcddb-1-fixes.patch b/src/libcddb-1-fixes.patch new file mode 100644 index 00000000..c02e34bc --- /dev/null +++ b/src/libcddb-1-fixes.patch @@ -0,0 +1,90 @@ +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: Norbert Schlia <nschlia@oblivion-software.de> +Date: Mon, 12 Dec 2016 08:48:17 +0100 +Subject: [PATCH] Newer versions winioctl.h contain a #define SEARCH_ALL .. + which collides with the enum in cddb_conn.h. + + +diff --git a/include/cddb/cddb_conn.h b/include/cddb/cddb_conn.h +index 1111111..2222222 100644 +--- a/include/cddb/cddb_conn.h ++++ b/include/cddb/cddb_conn.h +@@ -59,6 +59,10 @@ typedef struct cddb_conn_s cddb_conn_t; + * Which fields to use for the full text search is defined by one or + * more of the constants below. + */ ++#ifdef SEARCH_ALL ++#undef SEARCH_ALL // Defined in winioctl.h, causes havoc under windoze ++#endif ++ + typedef enum { + SEARCH_NONE = 0, /**< no fields */ + SEARCH_ARTIST = 1, /**< artist name field */ + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Norbert Schlia <nschlia@oblivion-software.de> +Date: Mon, 12 Dec 2016 08:50:10 +0100 +Subject: [PATCH] configure falsely detects an alarm() function available, + causing compile errors. + + +diff --git a/configure b/configure +index 1111111..2222222 100755 +--- a/configure ++++ b/configure +@@ -13622,7 +13622,7 @@ rm -f conftest* + + + +-for ac_func in mkdir regcomp socket strdup strtol strchr memset alarm select realloc ++for ac_func in mkdir regcomp socket strdup strtol strchr memset select realloc + do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` + { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Norbert Schlia <nschlia@oblivion-software.de> +Date: Mon, 12 Dec 2016 08:51:37 +0100 +Subject: [PATCH] libccdb crashes in strlen() under windows because s = + getenv("HOME"); returns NULL + + +diff --git a/lib/cddb_conn.c b/lib/cddb_conn.c +index 1111111..2222222 100644 +--- a/lib/cddb_conn.c ++++ b/lib/cddb_conn.c +@@ -100,6 +100,13 @@ cddb_conn_t *cddb_new(void) + c->use_cache = CACHE_ON; + /* construct cache dir '$HOME/[DEFAULT_CACHE]' */ + s = getenv("HOME"); ++ if (s == NULL) ++ s = getenv("TEMP"); ++ if (s == NULL) ++ s = getenv("TMP"); ++ if (s == NULL) ++ s = "."; ++ + c->cache_dir = (char*)malloc(strlen(s) + 1 + sizeof(DEFAULT_CACHE) + 1); + sprintf(c->cache_dir, "%s/%s", s, DEFAULT_CACHE); + c->cache_read = FALSE; + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Fri, 16 Dec 2016 03:55:31 +0100 +Subject: [PATCH] pc: add private libs -lgnurx -lregex -lws2_32 + + +diff --git a/libcddb.pc.in b/libcddb.pc.in +index 1111111..2222222 100644 +--- a/libcddb.pc.in ++++ b/libcddb.pc.in +@@ -7,4 +7,5 @@ Name: libcddb + Description: CDDB server access library + Version: @VERSION@ + Libs: -L${libdir} -lcddb @LIBICONV@ ++Libs.private: -L${libdir} -lgnurx -lregex -lws2_32 + Cflags: -I${includedir} diff --git a/src/libcddb-test.c b/src/libcddb-test.c new file mode 100644 index 00000000..3d7a2f61 --- /dev/null +++ b/src/libcddb-test.c @@ -0,0 +1,19 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +// Based on: http://libcddb.sourceforge.net/tutorial.html + +#include <stdio.h> + +#include <cddb/cddb.h> + +int main() { + cddb_track_t *track = NULL; + track = cddb_track_new(); + if (track == NULL) { + fprintf(stderr, "out of memory, unable to create track"); + } + cddb_track_destroy(track); + return 0; +} diff --git a/src/libcddb.mk b/src/libcddb.mk new file mode 100644 index 00000000..fc1f93d6 --- /dev/null +++ b/src/libcddb.mk @@ -0,0 +1,39 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := libcddb +$(PKG)_WEBSITE := https://sourceforge.net/projects/libcddb/ +$(PKG)_DESCR := Access data on a CDDB +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.3.2 +$(PKG)_CHECKSUM := 35ce0ee1741ea38def304ddfe84a958901413aa829698357f0bee5bb8f0a223b +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/libcddb/libcddb/$($(PKG)_VERSION)/$(PKG)-$($(PKG)_VERSION).tar.bz2 +$(PKG)_DEPS := gcc libiconv libgnurx + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://downloads.sourceforge.net/project/libcddb/libcddb/' | \ + $(SED) -n 's,.*libcddb-\([0-9][^>]*\)\.tar.*,\1,p' | \ + sort | uniq | \ + head -1 +endef + +# lt_cv_deplibs_check_method="pass_all" allow all libs (avoid static lib creation for x64 because of ws2_32.lib) +# ac_cv_func_malloc_0_nonnull=yes avoid unresolved external +# ac_cv_func_realloc_0_nonnull=yes avoid unresolved external +define $(PKG)_BUILD + cd '$(BUILD_DIR)' && \ + lt_cv_deplibs_check_method="pass_all" \ + ac_cv_func_malloc_0_nonnull=yes \ + ac_cv_func_realloc_0_nonnull=yes \ + '$(SOURCE_DIR)'/configure \ + $(MXE_CONFIGURE_OPTS) + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_PROGRAMS) + $(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_PROGRAMS) + + # create test binary + $(TARGET)-gcc \ + -W -Wall -Werror \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `$(TARGET)-pkg-config libcddb --cflags --libs` +endef diff --git a/src/libcdio-paranoia.mk b/src/libcdio-paranoia.mk index ec61ccd4..2724e655 100644 --- a/src/libcdio-paranoia.mk +++ b/src/libcdio-paranoia.mk @@ -1,13 +1,14 @@ -# 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 := libcdio-paranoia +$(PKG)_WEBSITE := https://www.gnu.org/software/libcdio/ +$(PKG)_DESCR := Libcdio-paranoia $(PKG)_IGNORE := $(PKG)_VERSION := 10.2+0.93+1 $(PKG)_CHECKSUM := ec1d9b1d5a28cc042f2cb33a7cc0a2b5ce5525f102bc4c15db1fac322559a493 $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) -$(PKG)_URL := http://ftp.gnu.org/gnu/libcdio/$(PKG)-$($(PKG)_VERSION).tar.bz2 +$(PKG)_URL := https://ftp.gnu.org/gnu/libcdio/$(PKG)-$($(PKG)_VERSION).tar.bz2 $(PKG)_DEPS := gcc libcdio define $(PKG)_UPDATE diff --git a/src/libcdio.mk b/src/libcdio.mk index 4972d942..1d344ffd 100644 --- a/src/libcdio.mk +++ b/src/libcdio.mk @@ -1,13 +1,14 @@ -# 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 := libcdio +$(PKG)_WEBSITE := https://www.gnu.org/software/libcdio/ +$(PKG)_DESCR := Libcdio $(PKG)_IGNORE := $(PKG)_VERSION := 0.93 $(PKG)_CHECKSUM := f8276629226c7e1e74209b66ca421d09d6aec87f72f60ae9b1d3debd0a13dda8 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://ftp.gnu.org/gnu/libcdio/$(PKG)-$($(PKG)_VERSION).tar.bz2 +$(PKG)_URL := https://ftp.gnu.org/gnu/libcdio/$(PKG)-$($(PKG)_VERSION).tar.bz2 $(PKG)_DEPS := gcc define $(PKG)_UPDATE diff --git a/src/libcomm14cux.mk b/src/libcomm14cux.mk index 456cb401..1ef10d36 100644 --- a/src/libcomm14cux.mk +++ b/src/libcomm14cux.mk @@ -1,10 +1,10 @@ -# 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 := libcomm14cux +$(PKG)_WEBSITE := https://github.com/colinbourassa/libcomm14cux/ $(PKG)_IGNORE := -$(PKG)_VERSION := 2.1.0 -$(PKG)_CHECKSUM := 579c34b529600debd4a4216959e583fac5836d878de2bf2bec1115c4567d4623 +$(PKG)_VERSION := 2.1.1 +$(PKG)_CHECKSUM := 4b3d0969e2226a0f3c1250c609858e487631507ed62bf6732ce82f13f0d9fcc9 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz $(PKG)_URL := https://github.com/colinbourassa/libcomm14cux/archive/$($(PKG)_VERSION).tar.gz @@ -12,9 +12,7 @@ $(PKG)_DEPS := gcc define $(PKG)_BUILD mkdir '$(1)/build' - cd '$(1)/build' && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -DBUILD_STATIC=$(if $(BUILD_STATIC),ON,OFF) + cd '$(1)/build' && '$(TARGET)-cmake' .. $(MAKE) -C '$(1)/build' -j '$(JOBS)' install endef diff --git a/src/libcroco.mk b/src/libcroco.mk index 13adfaee..d845dadf 100644 --- a/src/libcroco.mk +++ b/src/libcroco.mk @@ -1,17 +1,18 @@ -# 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 := libcroco +$(PKG)_WEBSITE := http://www.linuxfromscratch.org/blfs/view/svn/general/libcroco.html +$(PKG)_DESCR := Libcroco $(PKG)_IGNORE := $(PKG)_VERSION := 0.6.2 $(PKG)_CHECKSUM := be24853f64c09b63d39e563fb0222e29bae1a33c3d9f6cbffc0bc27669371749 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://ftp.gnome.org/pub/GNOME/sources/libcroco/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/libcroco/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc glib libxml2 define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/libcroco/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/libcroco/refs/tags' | \ $(SED) -n 's,.*<a[^>]*>LIBCROCO_\([0-9][0-9_]*\)<.*,\1,p' | \ $(SED) 's,_,.,g' | \ head -1 diff --git a/src/libdca-1-mark-tables-as-static-constants.patch b/src/libdca-1-mark-tables-as-static-constants.patch deleted file mode 100644 index 4e4414da..00000000 --- a/src/libdca-1-mark-tables-as-static-constants.patch +++ /dev/null @@ -1,719 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -Taken from libdca svn: svn://svn.videolan.org/libdca/trunk. - -r83 | gbazin | 2008-05-26 12:48:45 +0000 (Mon, 26 May 2008) | 1 line -Mark tables as static constants. Patch by Diego Flameeyes Petten?\195?\178 - ---- libdca.orig/libdca/tables_fir.h -+++ libdca/libdca/tables_fir.h -@@ -21,7 +21,7 @@ - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - --double fir_32bands_perfect[] = -+static const double fir_32bands_perfect[] = - { - +1.135985195E-010, - -6.022448247E-007, -@@ -537,7 +537,7 @@ - -1.135985195E-010 - }; - --double fir_32bands_nonperfect[] = -+static const double fir_32bands_nonperfect[] = - { - -1.390191784E-007, - -1.693738625E-007, -@@ -1053,7 +1053,7 @@ - +1.390191784E-007 - }; - --double lfe_fir_64[] = -+static const double lfe_fir_64[] = - { - 2.6584343868307770E-004, - 8.1793652498163280E-005, -@@ -1569,7 +1569,7 @@ - 2.6584343868307770E-004 - }; - --double lfe_fir_128[] = -+static const double lfe_fir_128[] = - { - 0.00053168571, - 0.00016358691, ---- libdca.orig/libdca/tables_huffman.h -+++ libdca/libdca/tables_huffman.h -@@ -29,7 +29,7 @@ - - } huff_entry_t; - --huff_entry_t bitalloc_a_12[] = -+static const huff_entry_t bitalloc_a_12[] = - { - { 1, 0, 1}, { 2, 2, 2}, { 3, 6, 3}, { 4, 14, 4}, - { 5, 30, 5}, { 6, 62, 6}, { 8, 255, 7}, { 8, 254, 8}, -@@ -37,7 +37,7 @@ - { 0, 0, 0} - }; - --huff_entry_t bitalloc_b_12[] = -+static const huff_entry_t bitalloc_b_12[] = - { - { 1, 1, 1}, { 2, 0, 2}, { 3, 2, 3}, { 5, 15, 4}, - { 5, 12, 5}, { 6, 29, 6}, { 7, 57, 7}, { 7, 56, 8}, -@@ -45,7 +45,7 @@ - { 0, 0, 0} - }; - --huff_entry_t bitalloc_c_12[] = -+static const huff_entry_t bitalloc_c_12[] = - { - { 2, 0, 1}, { 3, 7, 2}, { 3, 5, 3}, { 3, 4, 4}, - { 3, 2, 5}, { 4, 13, 6}, { 4, 12, 7}, { 4, 6, 8}, -@@ -53,7 +53,7 @@ - { 0, 0, 0} - }; - --huff_entry_t bitalloc_d_12[] = -+static const huff_entry_t bitalloc_d_12[] = - { - { 2, 3, 1}, { 2, 2, 2}, { 2, 0, 3}, { 3, 2, 4}, - { 4, 6, 5}, { 5, 14, 6}, { 6, 30, 7}, { 7, 62, 8}, -@@ -61,7 +61,7 @@ - { 0, 0, 0} - }; - --huff_entry_t bitalloc_e_12[] = -+static const huff_entry_t bitalloc_e_12[] = - { - { 1, 1, 1}, { 2, 0, 2}, { 3, 2, 3}, { 4, 6, 4}, - { 5, 14, 5}, { 7, 63, 6}, { 7, 61, 7}, { 8, 124, 8}, -@@ -69,7 +69,7 @@ - { 0, 0, 0} - }; - --huff_entry_t *bitalloc_12[] = -+static const huff_entry_t *const bitalloc_12[] = - { - bitalloc_a_12, - bitalloc_b_12, -@@ -78,7 +78,7 @@ - bitalloc_e_12 - }; - --huff_entry_t scales_a_129[] = -+static const huff_entry_t scales_a_129[] = - { - { 2, 1, 0}, { 3, 6, 1}, { 3, 5, -1}, { 3, 0, 2}, - { 4, 15, -2}, { 4, 8, 3}, { 4, 3, -3}, { 5, 28, 4}, -@@ -115,7 +115,7 @@ - {14, 15024,-64}, { 0, 0, 0} - }; - --huff_entry_t scales_b_129[] = -+static const huff_entry_t scales_b_129[] = - { - { 3, 3, 0}, { 3, 2, 1}, { 3, 1, -1}, { 4, 15, 2}, - { 4, 14, -2}, { 4, 12, 3}, { 4, 11, -3}, { 4, 10, 4}, -@@ -152,7 +152,7 @@ - {15, 3936,-64}, { 0, 0, 0} - }; - --huff_entry_t scales_c_129[] = -+static const huff_entry_t scales_c_129[] = - { - { 3, 4, 0}, { 3, 1, 1}, { 3, 0, -1}, { 4, 13, 2}, - { 4, 12, -2}, { 4, 7, 3}, { 4, 6, -3}, { 5, 31, 4}, -@@ -189,7 +189,7 @@ - {15, 20944,-64}, { 0, 0, 0} - }; - --huff_entry_t scales_d_129[] = -+static const huff_entry_t scales_d_129[] = - { - { 2, 0, 0}, { 3, 5, 1}, { 3, 4, -1}, { 4, 15, 2}, - { 4, 14, -2}, { 4, 7, 3}, { 4, 6, -3}, { 5, 26, 4}, -@@ -226,7 +226,7 @@ - {15, 28516,-64}, { 0, 0, 0} - }; - --huff_entry_t scales_e_129[] = -+static const huff_entry_t scales_e_129[] = - { - { 4, 14, 0}, { 4, 11, 1}, { 4, 10, -1}, { 4, 7, 2}, - { 4, 6, -2}, { 4, 3, 3}, { 4, 2, -3}, { 5, 31, 4}, -@@ -263,7 +263,7 @@ - {16, 57172,-64}, { 0, 0, 0} - }; - --huff_entry_t *scales_129[] = -+static const huff_entry_t *const scales_129[] = - { - scales_a_129, - scales_b_129, -@@ -272,36 +272,36 @@ - scales_e_129 - }; - --huff_entry_t bitalloc_a_3[] = -+static const huff_entry_t bitalloc_a_3[] = - { - { 1, 0, 0}, { 2, 2, 1}, { 2, 3, -1}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_a_4[] = -+static const huff_entry_t bitalloc_a_4[] = - { - { 1, 0, 0}, { 2, 2, 1}, { 3, 6, 2}, { 3, 7, 3}, - { 0, 0, 0} - }; - --huff_entry_t bitalloc_b_4[] = -+static const huff_entry_t bitalloc_b_4[] = - { - { 2, 2, 0}, { 3, 6, 1}, { 3, 7, 2}, { 1, 0, 3}, - { 0, 0, 0} - }; - --huff_entry_t bitalloc_c_4[] = -+static const huff_entry_t bitalloc_c_4[] = - { - { 3, 6, 0}, { 3, 7, 1}, { 1, 0, 2}, { 2, 2, 3}, - { 0, 0, 0} - }; - --huff_entry_t bitalloc_d_4[] = -+static const huff_entry_t bitalloc_d_4[] = - { - { 2, 0, 0}, { 2, 1, 1}, { 2, 2, 2}, { 2, 3, 3}, - { 0, 0, 0} - }; - --huff_entry_t *tmode[] = -+static const huff_entry_t *const tmode[] = - { - bitalloc_a_4, - bitalloc_b_4, -@@ -309,64 +309,64 @@ - bitalloc_d_4 - }; - --huff_entry_t bitalloc_a_5[] = -+static const huff_entry_t bitalloc_a_5[] = - { - { 1, 0, 0}, { 2, 2, 1}, { 3, 6, -1}, { 4, 14, 2}, - { 4, 15, -2}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_b_5[] = -+static const huff_entry_t bitalloc_b_5[] = - { - { 2, 2, 0}, { 2, 0, 1}, { 2, 1, -1}, { 3, 6, 2}, - { 3, 7, -2}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_c_5[] = -+static const huff_entry_t bitalloc_c_5[] = - { - { 1, 0, 0}, { 3, 4, 1}, { 3, 5, -1}, { 3, 6, 2}, - { 3, 7, -2}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_a_7[] = -+static const huff_entry_t bitalloc_a_7[] = - { - { 1, 0, 0}, { 3, 6, 1}, { 3, 5, -1}, { 3, 4, 2}, - { 4, 14, -2}, { 5, 31, 3}, { 5, 30, -3}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_b_7[] = -+static const huff_entry_t bitalloc_b_7[] = - { - { 2, 3, 0}, { 2, 1, 1}, { 2, 0, -1}, { 3, 4, 2}, - { 4, 11, -2}, { 5, 21, 3}, { 5, 20, -3}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_c_7[] = -+static const huff_entry_t bitalloc_c_7[] = - { - { 2, 3, 0}, { 2, 2, 1}, { 2, 1, -1}, { 4, 3, 2}, - { 4, 2, -2}, { 4, 1, 3}, { 4, 0, -3}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_a_9[] = -+static const huff_entry_t bitalloc_a_9[] = - { - { 1, 0, 0}, { 3, 7, 1}, { 3, 5, -1}, { 4, 13, 2}, - { 4, 9, -2}, { 4, 8, 3}, { 5, 25, -3}, { 6, 49, 4}, - { 6, 48, -4}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_b_9[] = -+static const huff_entry_t bitalloc_b_9[] = - { - { 2, 2, 0}, { 2, 0, 1}, { 3, 7, -1}, { 3, 3, 2}, - { 3, 2, -2}, { 5, 27, 3}, { 5, 26, -3}, { 5, 25, 4}, - { 5, 24, -4}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_c_9[] = -+static const huff_entry_t bitalloc_c_9[] = - { - { 2, 2, 0}, { 2, 0, 1}, { 3, 7, -1}, { 3, 6, 2}, - { 3, 2, -2}, { 4, 6, 3}, { 5, 15, -3}, { 6, 29, 4}, - { 6, 28, -4}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_a_13[] = -+static const huff_entry_t bitalloc_a_13[] = - { - { 1, 0, 0}, { 3, 4, 1}, { 4, 15, -1}, { 4, 13, 2}, - { 4, 12, -2}, { 4, 10, 3}, { 5, 29, -3}, { 5, 22, 4}, -@@ -374,7 +374,7 @@ - { 7, 112, -6}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_b_13[] = -+static const huff_entry_t bitalloc_b_13[] = - { - { 2, 0, 0}, { 3, 6, 1}, { 3, 5, -1}, { 3, 2, 2}, - { 4, 15, -2}, { 4, 9, 3}, { 4, 7, -3}, { 4, 6, 4}, -@@ -382,7 +382,7 @@ - { 6, 56, -6}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_c_13[] = -+static const huff_entry_t bitalloc_c_13[] = - { - { 3, 5, 0}, { 3, 4, 1}, { 3, 3, -1}, { 3, 2, 2}, - { 3, 0, -2}, { 4, 15, 3}, { 4, 14, -3}, { 4, 12, 4}, -@@ -390,7 +390,7 @@ - { 5, 4, -6}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_a_17[] = -+static const huff_entry_t bitalloc_a_17[] = - { - { 2, 1, 0}, { 3, 7, 1}, { 3, 6, -1}, { 3, 4, 2}, - { 3, 1, -2}, { 4, 11, 3}, { 4, 10, -3}, { 4, 0, 4}, -@@ -399,7 +399,7 @@ - {12, 340, -8}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_b_17[] = -+static const huff_entry_t bitalloc_b_17[] = - { - { 2, 0, 0}, { 3, 6, 1}, { 3, 5, -1}, { 3, 2, 2}, - { 4, 15, -2}, { 4, 9, 3}, { 4, 8, -3}, { 5, 29, 4}, -@@ -408,7 +408,7 @@ - { 8, 124, -8}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_c_17[] = -+static const huff_entry_t bitalloc_c_17[] = - { - { 3, 6, 0}, { 3, 4, 1}, { 3, 3, -1}, { 3, 0, 2}, - { 4, 15, -2}, { 4, 11, 3}, { 4, 10, -3}, { 4, 4, 4}, -@@ -417,7 +417,7 @@ - { 7, 44, -8}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_d_17[] = -+static const huff_entry_t bitalloc_d_17[] = - { - { 1, 0, 0}, { 3, 7, 1}, { 3, 6, -1}, { 4, 11, 2}, - { 4, 10, -2}, { 5, 19, 3}, { 5, 18, -3}, { 6, 35, 4}, -@@ -426,7 +426,7 @@ - { 9, 256, -8}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_e_17[] = -+static const huff_entry_t bitalloc_e_17[] = - { - { 1, 0, 0}, { 3, 5, 1}, { 3, 4, -1}, { 4, 12, 2}, - { 5, 31, -2}, { 5, 28, 3}, { 5, 27, -3}, { 6, 60, 4}, -@@ -435,7 +435,7 @@ - { 8, 232, -8}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_f_17[] = -+static const huff_entry_t bitalloc_f_17[] = - { - { 3, 6, 0}, { 3, 5, 1}, { 3, 4, -1}, { 3, 2, 2}, - { 3, 1, -2}, { 4, 15, 3}, { 4, 14, -3}, { 4, 6, 4}, -@@ -444,7 +444,7 @@ - { 8, 4, -8}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_g_17[] = -+static const huff_entry_t bitalloc_g_17[] = - { - { 2, 2, 0}, { 3, 7, 1}, { 3, 6, -1}, { 3, 1, 2}, - { 3, 0, -2}, { 4, 5, 3}, { 4, 4, -3}, { 5, 14, 4}, -@@ -453,7 +453,7 @@ - { 8, 96, -8}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_a_25[] = -+static const huff_entry_t bitalloc_a_25[] = - { - { 3, 6, 0}, { 3, 4, 1}, { 3, 3, -1}, { 3, 1, 2}, - { 3, 0, -2}, { 4, 15, 3}, { 4, 14, -3}, { 4, 5, 4}, -@@ -464,7 +464,7 @@ - {14, 10324,-12}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_b_25[] = -+static const huff_entry_t bitalloc_b_25[] = - { - { 3, 5, 0}, { 3, 2, 1}, { 3, 1, -1}, { 4, 15, 2}, - { 4, 14, -2}, { 4, 9, 3}, { 4, 8, -3}, { 4, 6, 4}, -@@ -475,7 +475,7 @@ - { 9, 28,-12}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_c_25[] = -+static const huff_entry_t bitalloc_c_25[] = - { - { 3, 1, 0}, { 4, 15, 1}, { 4, 14, -1}, { 4, 12, 2}, - { 4, 11, -2}, { 4, 9, 3}, { 4, 8, -3}, { 4, 6, 4}, -@@ -486,7 +486,7 @@ - { 8, 76,-12}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_d_25[] = -+static const huff_entry_t bitalloc_d_25[] = - { - { 2, 2, 0}, { 3, 7, 1}, { 3, 6, -1}, { 3, 1, 2}, - { 3, 0, -2}, { 4, 5, 3}, { 4, 4, -3}, { 5, 13, 4}, -@@ -497,7 +497,7 @@ - {12, 1920,-12}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_e_25[] = -+static const huff_entry_t bitalloc_e_25[] = - { - { 2, 3, 0}, { 3, 3, 1}, { 3, 2, -1}, { 4, 11, 2}, - { 4, 10, -2}, { 4, 1, 3}, { 4, 0, -3}, { 5, 17, 4}, -@@ -508,7 +508,7 @@ - { 8, 60,-12}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_f_25[] = -+static const huff_entry_t bitalloc_f_25[] = - { - { 3, 1, 0}, { 3, 0, 1}, { 4, 15, -1}, { 4, 14, 2}, - { 4, 13, -2}, { 4, 11, 3}, { 4, 10, -3}, { 4, 8, 4}, -@@ -519,7 +519,7 @@ - {10, 804,-12}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_g_25[] = -+static const huff_entry_t bitalloc_g_25[] = - { - { 2, 1, 0}, { 3, 6, 1}, { 3, 5, -1}, { 3, 0, 2}, - { 4, 15, -2}, { 4, 8, 3}, { 4, 3, -3}, { 5, 28, 4}, -@@ -530,7 +530,7 @@ - {10, 936,-12}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_a_33[] = -+static const huff_entry_t bitalloc_a_33[] = - { - { 3, 2, 0}, { 3, 1, 1}, { 3, 0, -1}, { 4, 14, 2}, - { 4, 13, -2}, { 4, 12, 3}, { 4, 11, -3}, { 4, 9, 4}, -@@ -543,7 +543,7 @@ - {13, 5504,-16}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_b_33[] = -+static const huff_entry_t bitalloc_b_33[] = - { - { 3, 1, 0}, { 4, 15, 1}, { 4, 14, -1}, { 4, 11, 2}, - { 4, 10, -2}, { 4, 8, 3}, { 4, 7, -3}, { 4, 4, 4}, -@@ -556,7 +556,7 @@ - {10, 780,-16}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_c_33[] = -+static const huff_entry_t bitalloc_c_33[] = - { - { 4, 13, 0}, { 4, 11, 1}, { 4, 10, -1}, { 4, 8, 2}, - { 4, 7, -2}, { 4, 4, 3}, { 4, 3, -3}, { 4, 2, 4}, -@@ -569,7 +569,7 @@ - { 9, 204,-16}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_d_33[] = -+static const huff_entry_t bitalloc_d_33[] = - { - { 2, 1, 0}, { 3, 6, 1}, { 3, 5, -1}, { 3, 0, 2}, - { 4, 15, -2}, { 4, 8, 3}, { 4, 3, -3}, { 5, 28, 4}, -@@ -582,7 +582,7 @@ - {14, 15096,-16}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_e_33[] = -+static const huff_entry_t bitalloc_e_33[] = - { - { 2, 2, 0}, { 3, 2, 1}, { 3, 1, -1}, { 4, 12, 2}, - { 4, 7, -2}, { 4, 0, 3}, { 5, 31, -3}, { 5, 27, 4}, -@@ -595,7 +595,7 @@ - { 9, 456,-16}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_f_33[] = -+static const huff_entry_t bitalloc_f_33[] = - { - { 4, 13, 0}, { 4, 12, 1}, { 4, 11, -1}, { 4, 9, 2}, - { 4, 8, -2}, { 4, 7, 3}, { 4, 6, -3}, { 4, 4, 4}, -@@ -608,7 +608,7 @@ - {11, 1828,-16}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_g_33[] = -+static const huff_entry_t bitalloc_g_33[] = - { - { 3, 6, 0}, { 3, 3, 1}, { 3, 2, -1}, { 4, 15, 2}, - { 4, 14, -2}, { 4, 9, 3}, { 4, 8, -3}, { 4, 1, 4}, -@@ -621,7 +621,7 @@ - {10, 644,-16}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_a_65[] = -+static const huff_entry_t bitalloc_a_65[] = - { - { 4, 6, 0}, { 4, 5, 1}, { 4, 4, -1}, { 4, 2, 2}, - { 4, 1, -2}, { 4, 0, 3}, { 5, 31, -3}, { 5, 29, 4}, -@@ -642,7 +642,7 @@ - {16, 40540,-32}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_b_65[] = -+static const huff_entry_t bitalloc_b_65[] = - { - { 4, 4, 0}, { 4, 2, 1}, { 4, 1, -1}, { 5, 30, 2}, - { 5, 29, -2}, { 5, 26, 3}, { 5, 25, -3}, { 5, 23, 4}, -@@ -663,7 +663,7 @@ - {12, 2700,-32}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_c_65[] = -+static const huff_entry_t bitalloc_c_65[] = - { - { 5, 28, 0}, { 5, 25, 1}, { 5, 24, -1}, { 5, 23, 2}, - { 5, 22, -2}, { 5, 19, 3}, { 5, 18, -3}, { 5, 16, 4}, -@@ -684,7 +684,7 @@ - {11, 1116,-32}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_d_65[] = -+static const huff_entry_t bitalloc_d_65[] = - { - { 3, 4, 0}, { 3, 1, 1}, { 3, 0, -1}, { 4, 13, 2}, - { 4, 12, -2}, { 4, 7, 3}, { 4, 6, -3}, { 5, 31, 4}, -@@ -705,7 +705,7 @@ - {15, 28848,-32}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_e_65[] = -+static const huff_entry_t bitalloc_e_65[] = - { - { 3, 4, 0}, { 3, 0, 1}, { 4, 15, -1}, { 4, 7, 2}, - { 4, 6, -2}, { 5, 29, 3}, { 5, 28, -3}, { 5, 23, 4}, -@@ -726,7 +726,7 @@ - {10, 812,-32}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_f_65[] = -+static const huff_entry_t bitalloc_f_65[] = - { - { 3, 6, 0}, { 3, 3, 1}, { 3, 2, -1}, { 4, 15, 2}, - { 4, 14, -2}, { 4, 9, 3}, { 4, 8, -3}, { 4, 1, 4}, -@@ -747,7 +747,7 @@ - {14, 4064,-32}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_g_65[] = -+static const huff_entry_t bitalloc_g_65[] = - { - { 4, 14, 0}, { 4, 11, 1}, { 4, 10, -1}, { 4, 8, 2}, - { 4, 6, -2}, { 4, 4, 3}, { 4, 3, -3}, { 4, 0, 4}, -@@ -768,7 +768,7 @@ - {11, 268,-32}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_a_129[] = -+static const huff_entry_t bitalloc_a_129[] = - { - { 4, 8, 0}, { 4, 10, 1}, { 4, 9, -1}, { 4, 0, 2}, - { 5, 31, -2}, { 5, 24, 3}, { 5, 23, -3}, { 5, 12, 4}, -@@ -805,7 +805,7 @@ - {11, 1632,-64}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_b_129[] = -+static const huff_entry_t bitalloc_b_129[] = - { - { 5, 10, 0}, { 5, 7, 1}, { 5, 6, -1}, { 5, 4, 2}, - { 5, 3, -2}, { 5, 0, 3}, { 6, 63, -3}, { 6, 60, 4}, -@@ -842,7 +842,7 @@ - {14, 10716,-64}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_c_129[] = -+static const huff_entry_t bitalloc_c_129[] = - { - { 6, 58, 0}, { 6, 55, 1}, { 6, 54, -1}, { 6, 52, 2}, - { 6, 51, -2}, { 6, 49, 3}, { 6, 48, -3}, { 6, 46, 4}, -@@ -879,7 +879,7 @@ - {13, 3676,-64}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_d_129[] = -+static const huff_entry_t bitalloc_d_129[] = - { - { 4, 9, 0}, { 4, 6, 1}, { 4, 5, -1}, { 4, 2, 2}, - { 4, 1, -2}, { 5, 30, 3}, { 5, 29, -3}, { 5, 26, 4}, -@@ -916,7 +916,7 @@ - {16, 42392,-64}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_e_129[] = -+static const huff_entry_t bitalloc_e_129[] = - { - { 5, 12, 0}, { 5, 11, 1}, { 5, 10, -1}, { 5, 9, 2}, - { 5, 8, -2}, { 5, 7, 3}, { 5, 6, -3}, { 5, 4, 4}, -@@ -953,7 +953,7 @@ - {16, 41276,-64}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_f_129[] = -+static const huff_entry_t bitalloc_f_129[] = - { - { 6, 56, 0}, { 6, 55, 1}, { 6, 54, -1}, { 6, 52, 2}, - { 6, 51, -2}, { 6, 50, 3}, { 6, 49, -3}, { 6, 48, 4}, -@@ -990,7 +990,7 @@ - {15, 30252,-64}, { 0, 0, 0} - }; - --huff_entry_t bitalloc_g_129[] = -+static const huff_entry_t bitalloc_g_129[] = - { - { 4, 0, 0}, { 5, 29, 1}, { 5, 28, -1}, { 5, 25, 2}, - { 5, 24, -2}, { 5, 21, 3}, { 5, 20, -3}, { 5, 17, 4}, -@@ -1027,7 +1027,7 @@ - {13, 7712,-64}, { 0, 0, 0} - }; - --huff_entry_t *bitalloc_select[11][8] = -+static const huff_entry_t *const bitalloc_select[11][8] = - { - { 0 }, - { bitalloc_a_3, 0 }, -@@ -1047,7 +1047,7 @@ - bitalloc_e_129, bitalloc_f_129, bitalloc_g_129, 0 }, - }; - --static int InverseQ( dca_state_t * state, huff_entry_t * huff ) -+static int InverseQ( dca_state_t * state, const huff_entry_t * huff ) - { - int value = 0; - int length = 0, j; ---- libdca.orig/libdca/tables_quantization.h -+++ libdca/libdca/tables_quantization.h -@@ -21,7 +21,7 @@ - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - --int scale_factor_quant6[] = -+static const int scale_factor_quant6[] = - { - 1, 2, 2, 3, 3, 4, 6, 7, - 10, 12, 16, 20, 26, 34, 44, 56, -@@ -33,7 +33,7 @@ - 1819701, 2344229, 3019952, 3890451, 5011872, 6456542, 8317638, 0 - }; - --int scale_factor_quant7[] = -+static const int scale_factor_quant7[] = - { - 1, 1, 2, 2, 2, 2, 3, 3, - 3, 4, 4, 5, 6, 7, 7, 8, -@@ -54,7 +54,7 @@ - }; - - /* 20bits unsigned fractional binary codes */ --int lossy_quant[] = -+static const int lossy_quant[] = - { - 0, 6710886, 4194304, 3355443, 2474639, 2097152, 1761608, 1426063, - 796918, 461373, 251658, 146801, 79692, 46137, 27263, 16777, -@@ -62,7 +62,7 @@ - 84, 42, 21, 0, 0, 0, 0, 0 - }; - --double lossy_quant_d[] = -+static const double lossy_quant_d[] = - { - 0, 1.6, 1.0, 0.8, 0.59, 0.50, 0.42, 0.34, - 0.19, 0.11, 0.06, 0.035, 0.019, 0.011, 0.0065, 0.0040, -@@ -71,7 +71,7 @@ - }; - - /* 20bits unsigned fractional binary codes */ --int lossless_quant[] = -+static const int lossless_quant[] = - { - 0, 4194304, 2097152, 1384120, 1048576, 696254, 524288, 348127, - 262144, 131072, 65431, 33026, 16450, 8208, 4100, 2049, -@@ -79,7 +79,7 @@ - 4, 2, 1, 0, 0, 0, 0, 0 - }; - --double lossless_quant_d[] = -+static const double lossless_quant_d[] = - { - 0, 1.0, 0.5, 0.33, 0.25, 0.166, 0.125, - 0.083, 0.0625, 0.03125, 0.0156, 7.874E-3, 3.922E-3, 1.957E-3, ---- libdca.orig/libdca/parse.c -+++ libdca/libdca/parse.c -@@ -548,7 +548,7 @@ - /* Scale factors */ - for (j = 0; j < state->prim_channels; j++) - { -- int *scale_table; -+ const int *scale_table; - int scale_sum; - - for (k = 0; k < state->subband_activity[j]; k++) -@@ -761,7 +761,7 @@ - int k, l; - int subsubframe = state->current_subsubframe; - -- double *quant_step_table; -+ const double *quant_step_table; - - /* FIXME */ - double subband_samples[DCA_PRIM_CHANNELS_MAX][DCA_SUBBANDS][8]; -@@ -1145,7 +1145,7 @@ - double samples_in[32][8], sample_t *samples_out, - double scale, sample_t bias) - { -- double *prCoeff; -+ const double *prCoeff; - int i, j, k; - double raXin[32]; - -@@ -1236,7 +1236,7 @@ - */ - - int nDeciFactor, k, J; -- double *prCoeff; -+ const double *prCoeff; - - int NumFIRCoef = 512; /* Number of FIR coefficients */ - int nInterpIndex = 0; /* Index to the interpolated samples */ diff --git a/src/libdca-2-normalisation-factor-sqrt2+output-bias.patch b/src/libdca-2-normalisation-factor-sqrt2+output-bias.patch deleted file mode 100644 index 2d4cdb56..00000000 --- a/src/libdca-2-normalisation-factor-sqrt2+output-bias.patch +++ /dev/null @@ -1,112 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -Taken from libdca svn: svn://svn.videolan.org/libdca/trunk. - -r84 | gbazin | 2008-06-01 16:13:33 +0000 (Sun, 01 Jun 2008) | 3 lines - * libdca/parse.c: Change output normalisation factor from 3/2 to sqrt(2). - Thanks to Alexander E. Patrakov for finding that this is the proper normalisation factor. - Fixed a bug where the output bias wasn't applied when downmixing wasn't being done. - ---- libdca.orig/libdca/parse.c -+++ libdca/libdca/parse.c -@@ -59,12 +59,11 @@ - static int decode_blockcode (int code, int levels, int *values); - - static void qmf_32_subbands (dca_state_t * state, int chans, -- double samples_in[32][8], sample_t *samples_out, -- double rScale, sample_t bias); -+ double samples_in[32][8], sample_t *samples_out); - - static void lfe_interpolation_fir (int nDecimationSelect, int nNumDeciSample, - double *samples_in, sample_t *samples_out, -- double rScale, sample_t bias ); -+ sample_t bias); - - static void pre_calc_cosmod( dca_state_t * state ); - -@@ -123,7 +122,9 @@ - bitstream_get (state, 1); - - *frame_length = (bitstream_get (state, 7) + 1) * 32; -+ if (*frame_length < 6 * 32) return 0; - frame_size = bitstream_get (state, 14) + 1; -+ if (frame_size < 96) return 0; - if (!state->word_mode) frame_size = frame_size * 8 / 14 * 2; - - /* Audio channel arrangement */ -@@ -981,14 +982,7 @@ - /* 32 subbands QMF */ - for (k = 0; k < state->prim_channels; k++) - { -- /*static double pcm_to_float[8] = -- {32768.0, 32768.0, 524288.0, 524288.0, 0, 8388608.0, 8388608.0};*/ -- -- qmf_32_subbands (state, k, -- subband_samples[k], -- &state->samples[256*k], -- /*WTF ???*/ 32768.0*3/2/*pcm_to_float[state->source_pcm_res]*/, -- 0/*state->bias*/); -+ qmf_32_subbands (state, k, subband_samples[k], &state->samples[256*k]); - } - - /* Down/Up mixing */ -@@ -1000,6 +994,10 @@ - { - dca_downmix (state->samples, state->amode, state->output, state->bias, - state->clev, state->slev); -+ } else if (state->bias) -+ { -+ for ( k = 0; k < 256*state->prim_channels; k++ ) -+ state->samples[k] += state->bias; - } - - /* Generate LFE samples for this subsubframe FIXME!!! */ -@@ -1011,8 +1009,7 @@ - lfe_interpolation_fir (state->lfe, 2 * state->lfe, - state->lfe_data + lfe_samples + - 2 * state->lfe * subsubframe, -- &state->samples[256*i_channels], -- 8388608.0, state->bias); -+ &state->samples[256*i_channels], state->bias); - /* Outputs 20bits pcm samples */ - } - -@@ -1142,9 +1139,9 @@ - } - - static void qmf_32_subbands (dca_state_t * state, int chans, -- double samples_in[32][8], sample_t *samples_out, -- double scale, sample_t bias) -+ double samples_in[32][8], sample_t *samples_out) - { -+ static const double scale = 1.4142135623730951 /* sqrt(2) */ * 32768.0; - const double *prCoeff; - int i, j, k; - double raXin[32]; -@@ -1211,7 +1208,7 @@ - - /* Create 32 PCM output samples */ - for (i=0;i<32;i++) -- samples_out[nChIndex++] = subband_fir_hist2[i] / scale + bias; -+ samples_out[nChIndex++] = subband_fir_hist2[i] / scale; - - /* Update working arrays */ - for (i=511;i>=32;i--) -@@ -1225,7 +1222,7 @@ - - static void lfe_interpolation_fir (int nDecimationSelect, int nNumDeciSample, - double *samples_in, sample_t *samples_out, -- double scale, sample_t bias) -+ sample_t bias) - { - /* samples_in: An array holding decimated samples. - * Samples in current subframe starts from samples_in[0], -@@ -1235,6 +1232,7 @@ - * samples_out: An array holding interpolated samples - */ - -+ static const double scale = 8388608.0; - int nDeciFactor, k, J; - const double *prCoeff; - diff --git a/src/libdca-3-sanity-check-for-subframes-and-prim_channels.patch b/src/libdca-3-sanity-check-for-subframes-and-prim_channels.patch deleted file mode 100644 index 25bdb4c9..00000000 --- a/src/libdca-3-sanity-check-for-subframes-and-prim_channels.patch +++ /dev/null @@ -1,27 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -Taken from libdca svn: svn://svn.videolan.org/libdca/trunk. - -r87 | sam | 2008-07-18 19:22:47 +0000 (Fri, 18 Jul 2008) | 2 lines - * parse.c: sanity check for subframes and prim_channels to avoid crashes - with invalid streams. - ---- libdca.orig/libdca/parse.c -+++ libdca/libdca/parse.c -@@ -305,8 +305,15 @@ - - /* Primary audio coding header */ - state->subframes = bitstream_get (state, 4) + 1; -+ -+ if (state->subframes > DCA_SUBFRAMES_MAX) -+ state->subframes = DCA_SUBFRAMES_MAX; -+ - state->prim_channels = bitstream_get (state, 3) + 1; - -+ if (state->prim_channels > DCA_PRIM_CHANNELS_MAX) -+ state->prim_channels = DCA_PRIM_CHANNELS_MAX; -+ - #ifdef DEBUG - fprintf (stderr, "subframes: %i\n", state->subframes); - fprintf (stderr, "prim channels: %i\n", state->prim_channels); diff --git a/src/libdca-4-fix-random-crashes-caused-by-invalid-32-bit-shifts.patch b/src/libdca-4-fix-random-crashes-caused-by-invalid-32-bit-shifts.patch deleted file mode 100644 index f247802d..00000000 --- a/src/libdca-4-fix-random-crashes-caused-by-invalid-32-bit-shifts.patch +++ /dev/null @@ -1,48 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -Taken from libdca svn: svn://svn.videolan.org/libdca/trunk. - -r88 | sam | 2008-07-19 22:26:13 +0000 (Sat, 19 Jul 2008) | 2 lines - * bitstream.c: fix random crashes caused by invalid 32-bit shifts on 32-bit - values. - ---- libdca.orig/libdca/bitstream.c -+++ libdca/libdca/bitstream.c -@@ -25,6 +25,7 @@ - - #include "config.h" - -+#include <stdio.h> - #include <inttypes.h> - - #include "dca.h" -@@ -46,7 +47,7 @@ - state->bigendian_mode = bigendian_mode; - bitstream_get (state, align * 8); - } --#include<stdio.h> -+ - static inline void bitstream_fill_current (dca_state_t * state) - { - uint32_t tmp; -@@ -76,12 +77,14 @@ - - uint32_t dca_bitstream_get_bh (dca_state_t * state, uint32_t num_bits) - { -- uint32_t result; -- -- num_bits -= state->bits_left; -+ uint32_t result = 0; - -- result = ((state->current_word << (32 - state->bits_left)) >> -- (32 - state->bits_left)); -+ if (state->bits_left) -+ { -+ num_bits -= state->bits_left; -+ result = ((state->current_word << (32 - state->bits_left)) >> -+ (32 - state->bits_left)); -+ } - - if ( !state->word_mode && num_bits > 28 ) { - bitstream_fill_current (state); diff --git a/src/libdca-5-avoid-crashing-with-invalid-frames.patch b/src/libdca-5-avoid-crashing-with-invalid-frames.patch deleted file mode 100644 index cd144445..00000000 --- a/src/libdca-5-avoid-crashing-with-invalid-frames.patch +++ /dev/null @@ -1,31 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -Taken from libdca svn: svn://svn.videolan.org/libdca/trunk. - -r89 | sam | 2008-07-19 22:26:17 +0000 (Sat, 19 Jul 2008) | 2 lines - * parse.c: avoid crashing with invalid frames setting a bitalloc_huffman - component to 7. - ---- libdca.orig/libdca/parse.c -+++ libdca/libdca/parse.c -@@ -364,7 +364,10 @@ - for (i = 0; i < state->prim_channels; i++) - { - state->bitalloc_huffman[i] = bitstream_get (state, 3); -- /* if (state->bitalloc_huffman[i] == 7) bailout */ -+ /* There might be a way not to trash the whole frame, but for -+ * now we must bail out or we will buffer overflow later. */ -+ if (state->bitalloc_huffman[i] == 7) -+ return 1; - #ifdef DEBUG - fprintf (stderr, "bit allocation quantizer: %i\n", - state->bitalloc_huffman[i]); -@@ -541,6 +544,7 @@ - k < state->vq_start_subband[j] && - state->bitalloc[j][k] > 0) - { -+ /* tmode cannot overflow since transient_huffman[j] < 4 */ - state->transition_mode[j][k] = InverseQ (state, - tmode[state->transient_huffman[j]]); - } diff --git a/src/libdca-test.c b/src/libdca-test.c deleted file mode 100644 index 3028f34e..00000000 --- a/src/libdca-test.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * This file is part of MXE. - * See index.html for further information. - */ - -#include <stdint.h> -#include <dca.h> - -int main(int argc, char *argv[]) -{ - dca_state_t *state; - - (void)argc; - (void)argv; - - state = dca_init(0); - if (!state) { - return 1; - } - - dca_free(state); - return 0; -} diff --git a/src/libdca.mk b/src/libdca.mk deleted file mode 100644 index 1fde84b3..00000000 --- a/src/libdca.mk +++ /dev/null @@ -1,30 +0,0 @@ -# This file is part of MXE. -# See index.html for further information. - -PKG := libdca -$(PKG)_IGNORE := -$(PKG)_VERSION := 0.0.5 -$(PKG)_CHECKSUM := dba022e022109a5bacbe122d50917769ff27b64a7bba104bd38ced8de8510642 -$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) -$(PKG)_FILE := $($(PKG)_SUBDIR).tar.bz2 -$(PKG)_URL := http://download.videolan.org/pub/videolan/libdca/$($(PKG)_VERSION)/$($(PKG)_FILE) -$(PKG)_DEPS := gcc - -define $(PKG)_UPDATE - $(WGET) -q -O- 'https://www.videolan.org/developers/libdca.html' | \ - $(SED) -n 's,.*libdca-\([0-9][^"]*\)\.tar.*,\1,p' | \ - head -1 -endef - -define $(PKG)_BUILD - cd '$(1)' && ./configure \ - $(MXE_CONFIGURE_OPTS) \ - CFLAGS='-std=gnu89' - $(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= - $(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= - - '$(TARGET)-gcc' \ - -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libdca.exe' \ - `'$(TARGET)-pkg-config' libdca --cflags --libs` -endef diff --git a/src/libdnet-1-fixes.patch b/src/libdnet-1-fixes.patch index 55fb4c51..806c5fc8 100644 --- a/src/libdnet-1-fixes.patch +++ b/src/libdnet-1-fixes.patch @@ -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. Patch taken from http://sourceforge.net/mailarchive/message.php?msg_id=27995461 diff --git a/src/libdnet.mk b/src/libdnet.mk index 3302bfeb..2e166ac7 100644 --- a/src/libdnet.mk +++ b/src/libdnet.mk @@ -1,17 +1,17 @@ -# 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 := libdnet +$(PKG)_WEBSITE := https://libdnet.sourceforge.io/ $(PKG)_IGNORE := $(PKG)_VERSION := 1.11 $(PKG)_CHECKSUM := 0eb78415c8f2564c2f1e8ad36e98473348d9c94852f796a226360c716cc7ca53 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$(PKG)-$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$(PKG)-$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc winpcap define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/libdnet/files/libdnet/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/libdnet/files/libdnet/' | \ $(SED) -n 's,.*/libdnet-\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef diff --git a/src/libdvbpsi-1-fix-include.patch b/src/libdvbpsi-1-fix-include.patch index 4e0c5405..0fdc7cfd 100644 --- a/src/libdvbpsi-1-fix-include.patch +++ b/src/libdvbpsi-1-fix-include.patch @@ -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. Submitted to upstream at https://mailman.videolan.org/pipermail/libdvbpsi-devel/2014-June/000737.html diff --git a/src/libdvbpsi-2-fix-no-asprintf.patch b/src/libdvbpsi-2-fix-no-asprintf.patch index 8e71a475..207dd0fe 100644 --- a/src/libdvbpsi-2-fix-no-asprintf.patch +++ b/src/libdvbpsi-2-fix-no-asprintf.patch @@ -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. Submitted to upstream at https://mailman.videolan.org/pipermail/libdvbpsi-devel/2014-June/000738.html diff --git a/src/libdvbpsi.mk b/src/libdvbpsi.mk index b125717c..802c292a 100644 --- a/src/libdvbpsi.mk +++ b/src/libdvbpsi.mk @@ -1,18 +1,18 @@ -# 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 := libdvbpsi +$(PKG)_WEBSITE := https://www.videolan.org/developers/libdvbpsi.html $(PKG)_IGNORE := $(PKG)_VERSION := 1.2.0 $(PKG)_CHECKSUM := 36d9b233306e48b58999e87864253b564e20932ed46a485e44ef7058f1f927e8 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $($(PKG)_SUBDIR).tar.bz2 -$(PKG)_URL := http://download.videolan.org/pub/libdvbpsi/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://download.videolan.org/pub/libdvbpsi/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.videolan.org/developers/libdvbpsi.html' | \ - $(SED) -n 's,.*http://www.videolan.org/pub/libdvbpsi/\([0-9][^<]*\)/.*,\1,p' | \ + $(WGET) -q -O- 'https://www.videolan.org/developers/libdvbpsi.html' | \ + $(SED) -n 's,.*https://www.videolan.org/pub/libdvbpsi/\([0-9][^<]*\)/.*,\1,p' | \ $(SORT) -Vr | \ head -1 endef diff --git a/src/libdvdcss.mk b/src/libdvdcss.mk index 5892bd02..fdf12dfa 100644 --- a/src/libdvdcss.mk +++ b/src/libdvdcss.mk @@ -1,17 +1,17 @@ -# 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 := libdvdcss +$(PKG)_WEBSITE := https://www.videolan.org/developers/libdvdcss.html $(PKG)_IGNORE := $(PKG)_VERSION := 1.3.0 $(PKG)_CHECKSUM := 7c414acd520c4e4dd7267952f72d738ff50321a7869af4d75c65aefad44f1395 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $($(PKG)_SUBDIR).tar.bz2 -$(PKG)_URL := http://download.videolan.org/pub/libdvdcss/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://download.videolan.org/pub/libdvdcss/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://download.videolan.org/pub/libdvdcss/' | \ + $(WGET) -q -O- 'https://download.videolan.org/pub/libdvdcss/' | \ $(SED) -n 's,.*<a href="\([0-9][^<]*\)/".*,\1,p' | \ $(SORT) -Vr | \ head -1 diff --git a/src/libdvdetect.mk b/src/libdvdetect.mk new file mode 100644 index 00000000..a3816f74 --- /dev/null +++ b/src/libdvdetect.mk @@ -0,0 +1,48 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := libdvdetect +$(PKG)_WEBSITE := https://www.dvdetect.de/ +$(PKG)_DESCR := Fast database lookup for DVDs +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.71.0 +$(PKG)_CHECKSUM := b098e04660532df78836f50bc0a8044b66c6659b07a6bff6609724ad30a87192 +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://github.com/nschlia/libdvdetect/releases/download/RELEASE_0_71/$(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := gcc openssl tinyxml + +define $(PKG)_UPDATE + $(call MXE_GET_GITHUB_TAGS, libdvdetect/libdvdetect, release-) +endef + +define $(PKG)_BUILD + cd '$(BUILD_DIR)' && \ + '$(SOURCE_DIR)'/configure \ + $(MXE_CONFIGURE_OPTS) + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)/include' -j '$(JOBS)' install + $(MAKE) -C '$(BUILD_DIR)/lib' -j '$(JOBS)' install + + # create pkg-config file + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' + (echo 'prefix=$(PREFIX)/$(TARGET)'; \ + echo 'exec_prefix=$${prefix}'; \ + echo 'libdir=$${exec_prefix}/lib'; \ + echo 'includedir=$${prefix}/include'; \ + echo ''; \ + echo 'Name: $(PKG)'; \ + echo 'Version: $($(PKG)_VERSION)'; \ + echo 'Description: fast database lookup for DVDs'; \ + echo 'Requires.private: openssl'; \ + echo 'Libs: -L$${libdir} -ldvdetect -lws2_32'; \ + echo 'Libs.private: -L$${libdir} -ltinyxml -lstdc++'; \ + echo 'Cflags: -I$${includedir}'; \ + ) \ + > '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc' + + # create test binary + $(TARGET)-gcc \ + -W -Wall -Werror \ + '$(SOURCE_DIR)/examples/c/dvdinfo.c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `$(TARGET)-pkg-config libdvdetect --cflags --libs` +endef diff --git a/src/libdvdnav.mk b/src/libdvdnav.mk index 9c4095d9..9632ab70 100644 --- a/src/libdvdnav.mk +++ b/src/libdvdnav.mk @@ -1,7 +1,7 @@ -# 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 := libdvdnav +$(PKG)_WEBSITE := https://dvdnav.mplayerhq.hu/ $(PKG)_IGNORE := $(PKG)_VERSION := 5.0.1 $(PKG)_CHECKSUM := 72b1cb8266f163d4a1481b92c7b6c53e6dc9274d2a6befb08ffc351fe7a4a2a9 @@ -9,13 +9,13 @@ $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 # Later releases seem to be hosted on VideoLAN's server # $(PKG)_URL := https://dvdnav.mplayerhq.hu/releases/$($(PKG)_FILE) -$(PKG)_URL := http://download.videolan.org/pub/videolan/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://download.videolan.org/pub/videolan/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc libdvdread # $(PKG)_UPDATE = $(call MXE_GET_GITHUB_SHA, mirror/libdvdnav, master) define $(PKG)_UPDATE - $(WGET) -q -O- 'http://download.videolan.org/pub/videolan/libdvdnav/' | \ + $(WGET) -q -O- 'https://download.videolan.org/pub/videolan/libdvdnav/' | \ $(SED) -n 's,.*href="\([0-9][^<]*\)/".*,\1,p' | \ grep -v 'alpha\|beta\|rc' | \ $(SORT) -V | \ diff --git a/src/libdvdread.mk b/src/libdvdread.mk index 2abaf206..4de9e1db 100644 --- a/src/libdvdread.mk +++ b/src/libdvdread.mk @@ -1,7 +1,7 @@ -# 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 := libdvdread +$(PKG)_WEBSITE := https://dvdnav.mplayerhq.hu/ $(PKG)_IGNORE := $(PKG)_VERSION := 5.0.0 $(PKG)_CHECKSUM := 66fb1a3a42aa0c56b02547f69c7eb0438c5beeaf21aee2ae2c6aa23ea8305f14 @@ -10,7 +10,7 @@ $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 # Later releases seem to be hosted on VideoLAN's server # $(PKG)_URL := https://dvdnav.mplayerhq.hu/releases/$($(PKG)_FILE) -$(PKG)_URL := http://download.videolan.org/pub/videolan/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://download.videolan.org/pub/videolan/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) # libdvdread supports libdvdcss either by dynamic loading (dlfcn-win32) or # directly linking to libdvdcss. We directly links to the library here. @@ -19,7 +19,7 @@ $(PKG)_DEPS := gcc libdvdcss $(PKG)_UPDATE_GIT = $(call MXE_GET_GITHUB_SHA, mirror/libdvdread, master) define $(PKG)_UPDATE - $(WGET) -q -O- 'http://download.videolan.org/pub/videolan/libdvdread/' | \ + $(WGET) -q -O- 'https://download.videolan.org/pub/videolan/libdvdread/' | \ $(SED) -n 's,.*href="\([0-9][^<]*\)/".*,\1,p' | \ grep -v 'alpha\|beta\|rc' | \ $(SORT) -V | \ diff --git a/src/libechonest-test.cpp b/src/libechonest-test.cpp new file mode 100644 index 00000000..b627c7b0 --- /dev/null +++ b/src/libechonest-test.cpp @@ -0,0 +1,7 @@ +#include <echonest/Song.h> + +int main() +{ + Echonest::Song a; + return 0; +} diff --git a/src/libechonest.mk b/src/libechonest.mk new file mode 100644 index 00000000..2aeb718e --- /dev/null +++ b/src/libechonest.mk @@ -0,0 +1,38 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := libechonest +$(PKG)_WEBSITE := https://github.com/lfranchi/libechonest +$(PKG)_IGNORE := +$(PKG)_VERSION := 2.3.1 +$(PKG)_CHECKSUM := ab961ab952df30c5234b548031594d7e281e7c9f2a9d1ce91fe5421ddde85e7c +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://github.com/lfranchi/$(PKG)/archive/$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := gcc qjson qt + +define $(PKG)_UPDATE + $(call MXE_GET_GITHUB_TAGS, lfranchi/libechonest) +endef + +define $(PKG)_BUILD + mkdir '$(1).build' + cd '$(1).build' && '$(TARGET)-cmake' '$(1)' + $(MAKE) -C '$(1).build' -j '$(JOBS)' + $(MAKE) -C '$(1).build' -j 1 install + + # create pkg-config file + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' + (echo 'Name: $(PKG)'; \ + echo 'Version: $($(PKG)_VERSION)'; \ + echo 'Description: $(PKG)'; \ + echo 'Requires: QtCore QtNetwork'; \ + echo 'Libs: -lechonest';) \ + > '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc' + + '$(TARGET)-g++' \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' libechonest --cflags --libs` +endef + +$(PKG)_BUILD_STATIC = diff --git a/src/libepoxy-1-fixes.patch b/src/libepoxy-1-fixes.patch new file mode 100644 index 00000000..dda8e3ca --- /dev/null +++ b/src/libepoxy-1-fixes.patch @@ -0,0 +1,34 @@ +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: Tue, 31 Jan 2017 02:03:55 +0100 +Subject: [PATCH] fix EPOXY_IMPORTEXPORT for static targets + +Based on https://github.com/mxe/mxe/issues/1647#issuecomment-275967915 + +diff --git a/include/epoxy/gl.h b/include/epoxy/gl.h +index 1111111..2222222 100644 +--- a/include/epoxy/gl.h ++++ b/include/epoxy/gl.h +@@ -71,7 +71,17 @@ extern "C" { + #endif + + #ifndef EPOXY_IMPORTEXPORT +-#define EPOXY_IMPORTEXPORT __declspec(dllimport) ++# ifdef EPOXY_SHARED ++# ifdef EPOXY_DLL ++# define EPOXY_IMPORTEXPORT __declspec(dllexport) ++# else ++# define EPOXY_IMPORTEXPORT __declspec(dllimport) ++# endif ++# elif EPOXY_STATIC ++# define EPOXY_IMPORTEXPORT ++# else ++# error "Please define EPOXY_STATIC or EPOXY_SHARED" ++# endif + #endif + + #ifndef GLAPI diff --git a/src/libepoxy-test.c b/src/libepoxy-test.c new file mode 100644 index 00000000..c8d1c19e --- /dev/null +++ b/src/libepoxy-test.c @@ -0,0 +1,10 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include <epoxy/gl.h> + +int main() { + glGetString(GL_SHADING_LANGUAGE_VERSION); + return 0; +} diff --git a/src/libepoxy.mk b/src/libepoxy.mk index 484de948..64a9f037 100644 --- a/src/libepoxy.mk +++ b/src/libepoxy.mk @@ -1,7 +1,7 @@ -# 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 := libepoxy +$(PKG)_WEBSITE := https://github.com/anholt/libepoxy $(PKG)_IGNORE := $(PKG)_VERSION := 1.3.1 $(PKG)_CHECKSUM := 6700ddedffb827b42c72cce1e0be6fba67b678b19bf256e1b5efd3ea38cc2bb4 @@ -19,7 +19,17 @@ endef define $(PKG)_BUILD cd '$(1)' && autoreconf -fi -I'$(PREFIX)/$(TARGET)/share/aclocal' - cd '$(1)' && ./configure \ + cd '$(1)' && \ + CFLAGS='$(if $(BUILD_STATIC),-DEPOXY_STATIC,-DEPOXY_SHARED -DEPOXY_DLL)' \ + ./configure \ $(MXE_CONFIGURE_OPTS) $(MAKE) -C '$(1)' -j '$(JOBS)' install $(MXE_DISABLE_CRUFT) + $(SED) 's/Cflags:/Cflags: -DEPOXY_$(if $(BUILD_STATIC),STATIC,SHARED)/' \ + -i '$(PREFIX)/$(TARGET)/lib/pkgconfig/epoxy.pc' + + # compile test + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' epoxy --cflags --libs` endef diff --git a/src/libevent-1-fixes.patch b/src/libevent-1-fixes.patch index 133c19f0..4be096a5 100644 --- a/src/libevent-1-fixes.patch +++ b/src/libevent-1-fixes.patch @@ -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 cf3aef0903fef54aa0ae4bdf997c4bafb7128bb5 Mon Sep 17 00:00:00 2001 From: MXE diff --git a/src/libevent.mk b/src/libevent.mk index d523307b..afeb7398 100644 --- a/src/libevent.mk +++ b/src/libevent.mk @@ -1,22 +1,13 @@ -# 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 := libevent +$(PKG)_WEBSITE := http://libevent.org/ $(PKG)_IGNORE := $(PKG)_VERSION := 2.0.21 $(PKG)_CHECKSUM := 872b7cdc199ead2edd9f0d1e93b4d900e67d892c014545bd3314b3ae49505eff -$(PKG)_SUBDIR := libevent-release-$($(PKG)_VERSION)-stable -$(PKG)_FILE := release-$($(PKG)_VERSION)-stable.tar.gz -$(PKG)_URL := https://github.com/$(PKG)/$(PKG)/archive/$($(PKG)_FILE) +$(PKG)_GH_CONF := libevent/libevent, release-, -stable $(PKG)_DEPS := gcc openssl -define $(PKG)_UPDATE - $(WGET) -q -O- 'http://libevent.org/' | \ - grep 'libevent-' | \ - $(SED) -n 's,.*libevent-\([0-9][^>]*\)-stable\.tar.*,\1,p' | \ - head -1 -endef - define $(PKG)_BUILD cd '$(1)' && ./autogen.sh && OPENSSL_LIBADD=-lz ./configure \ $(MXE_CONFIGURE_OPTS) diff --git a/src/libf2c-1.patch b/src/libf2c-1.patch index 2446e2ae..99fd22ce 100644 --- a/src/libf2c-1.patch +++ b/src/libf2c-1.patch @@ -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. diff -ur libf2c.orig/makefile.u libf2c/makefile.u --- libf2c.orig/makefile.u 2012-05-04 01:39:36.000000000 +1000 diff --git a/src/libf2c.mk b/src/libf2c.mk index 3263281c..d5eb364c 100644 --- a/src/libf2c.mk +++ b/src/libf2c.mk @@ -1,14 +1,16 @@ -# 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 := libf2c +$(PKG)_WEBSITE := http://www.netlib.org/f2c/ $(PKG)_IGNORE := $(PKG)_VERSION := 1 -$(PKG)_CHECKSUM := 5dff29c58b428fa00cd36b1220e2d71b9882a658fdec1aa094fb7e6e482d6765 +$(PKG)_CHECKSUM := ca404070e9ce0a9aaa6a71fc7d5489d014ade952c5d6de7efb88de8e24f2e8e0 $(PKG)_SUBDIR := $(PKG)_FILE := $(PKG).zip $(PKG)_URL := http://www.netlib.org/f2c/$($(PKG)_FILE) -$(PKG)_URL_2 := http://netlib.sandia.gov/f2c/$($(PKG)_FILE) +# $(PKG)_URL_2 was disabled in https://github.com/mxe/mxe/issues/1719 +# because it has old version of the file. +# $(PKG)_URL_2 := http://netlib.sandia.gov/f2c/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE diff --git a/src/libffi-test.c b/src/libffi-test.c index 86c781a9..21645214 100644 --- a/src/libffi-test.c +++ b/src/libffi-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdio.h> diff --git a/src/libffi.mk b/src/libffi.mk index 6ebb17a6..27bbbd5e 100644 --- a/src/libffi.mk +++ b/src/libffi.mk @@ -1,23 +1,17 @@ -# 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 := libffi +$(PKG)_WEBSITE := https://sourceware.org/libffi/ $(PKG)_IGNORE := $(PKG)_VERSION := 3.2.1 $(PKG)_CHECKSUM := d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37 +$(PKG)_GH_CONF := atgreen/libffi, v $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.mirrorservice.org/sites/sourceware.org/pub/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://www.mirrorservice.org/sites/sourceware.org/pub/$(PKG)/$($(PKG)_FILE) $(PKG)_URL_2 := ftp://sourceware.org/pub/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc -define $(PKG)_UPDATE - $(WGET) -q -O- 'https://github.com/atgreen/libffi/tags' | \ - grep '<a href="/atgreen/libffi/archive/' | \ - $(SED) -n 's,.*href="/atgreen/libffi/archive/v\([0-9][^"]*\)\.tar.*,\1,p' | \ - head -1 -endef - define $(PKG)_BUILD cd '$(1)' && ./configure \ $(MXE_CONFIGURE_OPTS) @@ -26,6 +20,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -std=c99 -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libffi.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libffi.exe' \ `'$(TARGET)-pkg-config' libffi --cflags --libs` endef diff --git a/src/libftdi.mk b/src/libftdi.mk index 39f71e53..bbb54465 100644 --- a/src/libftdi.mk +++ b/src/libftdi.mk @@ -1,13 +1,14 @@ -# 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 := libftdi +$(PKG)_WEBSITE := https://www.intra2net.com/en/developer/libftdi/index.php +$(PKG)_DESCR := LibFTDI $(PKG)_IGNORE := $(PKG)_VERSION := 0.20 $(PKG)_CHECKSUM := 3176d5b5986438f33f5208e690a8bfe90941be501cc0a72118ce3d338d4b838e $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.intra2net.com/en/developer/libftdi/download/$($(PKG)_FILE) +$(PKG)_URL := https://www.intra2net.com/en/developer/libftdi/download/$($(PKG)_FILE) $(PKG)_DEPS := gcc libusb $(PKG)_MESSAGE :=*** libftdi is deprecated - please use libftdi1 *** @@ -18,7 +19,7 @@ define $(PKG)_UPDATE endef define $(PKG)_UPDATE_DISABLED - $(WGET) -q -O- 'http://www.intra2net.com/en/developer/libftdi/download.php' | \ + $(WGET) -q -O- 'https://www.intra2net.com/en/developer/libftdi/download.php' | \ $(SED) -n 's,.*libftdi-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef diff --git a/src/libftdi1-1-dont-build-tests.patch b/src/libftdi1-1-dont-build-tests.patch index bba3a444..341c9cfc 100644 --- a/src/libftdi1-1-dont-build-tests.patch +++ b/src/libftdi1-1-dont-build-tests.patch @@ -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. diff -Naur a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt.orig 2013-08-22 17:27:01.000000000 +0200 diff --git a/src/libftdi1-2-shared-build.patch b/src/libftdi1-2-shared-build.patch index 8a292e6e..effa2ac4 100644 --- a/src/libftdi1-2-shared-build.patch +++ b/src/libftdi1-2-shared-build.patch @@ -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. diff --git a/CMakeLists.txt b/CMakeLists.txt index e8688d4..66c1ba2 100644 diff --git a/src/libftdi1-test.c b/src/libftdi1-test.c index 8252cf37..df6cd8a8 100644 --- a/src/libftdi1-test.c +++ b/src/libftdi1-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdio.h> diff --git a/src/libftdi1.mk b/src/libftdi1.mk index d337b02c..49dc8b39 100644 --- a/src/libftdi1.mk +++ b/src/libftdi1.mk @@ -1,27 +1,26 @@ -# 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 := libftdi1 +$(PKG)_WEBSITE := https://www.intra2net.com/en/developer/libftdi/index.php +$(PKG)_DESCR := LibFTDI1 $(PKG)_IGNORE := $(PKG)_VERSION := 1.2 $(PKG)_CHECKSUM := a6ea795c829219015eb372b03008351cee3fb39f684bff3bf8a4620b558488d6 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://www.intra2net.com/en/developer/libftdi/download/$($(PKG)_FILE) +$(PKG)_URL := https://www.intra2net.com/en/developer/libftdi/download/$($(PKG)_FILE) $(PKG)_DEPS := gcc libusb1 define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.intra2net.com/en/developer/libftdi/download.php' | \ + $(WGET) -q -O- 'https://www.intra2net.com/en/developer/libftdi/download.php' | \ $(SED) -n 's,.*libftdi1-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef define $(PKG)_BUILD - cd '$(1)' && cmake . \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -DCMAKE_BUILD_TYPE=Release \ - -DSHAREDLIBS=$(if $(BUILD_SHARED),yes,no) \ - -DSTATICLIBS=$(if $(BUILD_SHARED),no,yes) \ + cd '$(1)' && '$(TARGET)-cmake' . \ + -DSHAREDLIBS=$(CMAKE_SHARED_BOOL) \ + -DSTATICLIBS=$(CMAKE_STATIC_BOOL) \ -DLIBUSB_INCLUDE_DIR=$(PREFIX)/$(TARGET)/include/libusb-1.0 \ -DDOCUMENTATION=no \ -DEXAMPLES=no \ @@ -32,6 +31,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Wextra -Werror \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libftdi1.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libftdi1.exe' \ `'$(TARGET)-pkg-config' libftdi1 --cflags --libs` endef diff --git a/src/libgcrypt-1-fixes.patch b/src/libgcrypt-1-fixes.patch index 51f8e3d9..cd93e5bb 100644 --- a/src/libgcrypt-1-fixes.patch +++ b/src/libgcrypt-1-fixes.patch @@ -1,30 +1,30 @@ -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. Contains ad hoc patches for cross building. -From 51d564de8fec65610977732baf46987db3dd2f1c Mon Sep 17 00:00:00 2001 -From: MXE +From 6e118d36f8c15474065fe357446cf288cdc1e179 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> Date: Thu, 4 Dec 2014 15:07:43 +1100 -Subject: [PATCH] Taken from: +Subject: [PATCH 1/3] fix for mingw cross building +Taken from: https://aur.archlinux.org/packages/mingw-w64-libgcrypt/ diff --git a/acinclude.m4 b/acinclude.m4 -index 0791b84..b520db1 100644 +index 96be833..9e14e12 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -102,7 +102,9 @@ AC_DEFUN([GNUPG_SYS_SYMBOL_UNDERSCORE], [tmp_do_check="no" case "${host}" in - *-mingw32*) + i?86-mingw32* | i?86-*-mingw32*) - ac_cv_sys_symbol_underscore=yes + if test "x$ac_cv_sys_symbol_underscore" = x ; then + ac_cv_sys_symbol_underscore=yes + fi ;; - i386-emx-os2 | i[3456]86-pc-os2*emx | i386-pc-msdosdjgpp) - ac_cv_sys_symbol_underscore=yes + x86_64-*-mingw32*) + ac_cv_sys_symbol_underscore=no diff --git a/mpi/generic/mpi-asm-defs.h b/mpi/generic/mpi-asm-defs.h index e607806..4c57111 100644 --- a/mpi/generic/mpi-asm-defs.h @@ -108,7 +108,7 @@ index 898ca47..afd1a1f 100644 /* Define stuff for longlong.h. */ diff --git a/src/libgcrypt.def b/src/libgcrypt.def -index a90efce..b5f476d 100644 +index 067cb84..df71bba 100644 --- a/src/libgcrypt.def +++ b/src/libgcrypt.def @@ -1,3 +1,4 @@ @@ -125,5 +125,84 @@ index a90efce..b5f476d 100644 gcry_control @2 -- -1.9.3 (Apple Git-50) +2.7.4 + + +From 9ff9c0ae66b9f51decfda8dffa2024d8dbaa9fe6 Mon Sep 17 00:00:00 2001 +From: Saikrishna Arcot <saiarcot895@gmail.com> +Date: Fri, 12 Jun 2015 14:53:55 -0700 +Subject: [PATCH 2/3] Don't call git to determine the revision. + + +diff --git a/configure.ac b/configure.ac +index f683e21..d43c012 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -38,13 +38,10 @@ m4_define(mym4_version_micro, [0]) + # processing is done by autoconf and not during the configure run. + m4_define(mym4_version, + [mym4_version_major.mym4_version_minor.mym4_version_micro]) +-m4_define([mym4_revision], +- m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r'])) ++m4_define([mym4_revision], [4091]) + m4_define([mym4_revision_dec], + m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))])) +-m4_define([mym4_betastring], +- m4_esyscmd_s([git describe --match 'libgcrypt-[0-9].*[0-9]' --long|\ +- awk -F- '$3!=0{print"-beta"$3}'])) ++m4_define([mym4_betastring], []) + m4_define([mym4_isgit],m4_if(mym4_betastring,[],[no],[yes])) + m4_define([mym4_full_version],[mym4_version[]mym4_betastring]) + +-- +2.7.4 + + +From 7a22846e84ca5047b2f5cae7eb12ccab53c03026 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" <rjones@redhat.com> +Date: Sun, 28 Jun 2015 17:17:25 +0200 +Subject: [PATCH 3/3] configure.ac: no serial-tests if automake < 1.12 + +Earlier versions of automake complain if they get a configuration +parameter which they don't understand. The error is: + +configure.ac:27: error: option 'serial-tests' not recognized + +Use some m4 hackery to work around this. + +Fix libgcrypt build under x86_64 +See https://www.redhat.com/archives/libguestfs/2013-February/msg00102.html + +diff --git a/configure.ac b/configure.ac +index d43c012..b6f20ae 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -71,7 +71,24 @@ VERSION=$PACKAGE_VERSION + + AC_CONFIG_AUX_DIR([build-aux]) + AC_CONFIG_SRCDIR([src/libgcrypt.vers]) +-AM_INIT_AUTOMAKE([serial-tests dist-bzip2]) ++ ++dnl Initialize automake. automake < 1.12 didn't have serial-tests and ++dnl gives an error if it sees this, but for automake >= 1.13 ++dnl serial-tests is required so we have to include it. Solution is to ++dnl test for the version of automake (by running an external command) ++dnl and provide it if necessary. Note we have to do this entirely using ++dnl m4 macros since automake queries this macro by running ++dnl 'autoconf --trace ...'. ++m4_define([serial_tests], [ ++ m4_esyscmd([automake --version | ++ head -1 | ++ awk '{split ($NF,a,"."); if (a[1] == 1 && a[2] >= 12) { '\ ++ 'print "serial-tests" }}' ++ ]) ++]) ++dnl NB: Do not [quote] this parameter. ++AM_INIT_AUTOMAKE(serial_tests dist-bzip2) ++ + AC_CONFIG_HEADER(config.h) + AC_CONFIG_MACRO_DIR([m4]) + AC_CONFIG_LIBOBJ_DIR([compat]) +-- +2.7.4 diff --git a/src/libgcrypt-2-no-git.patch b/src/libgcrypt-2-no-git.patch deleted file mode 100644 index ebde54d9..00000000 --- a/src/libgcrypt-2-no-git.patch +++ /dev/null @@ -1,34 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -Contains ad hoc patches for cross building. - -From bb6a01f7a13be69e9ba395977dacd2ac0b9efbcd Mon Sep 17 00:00:00 2001 -From: MXE -Date: Fri, 12 Jun 2015 14:53:55 -0700 -Subject: [PATCH] Don't call git to determine the revision. - - -diff --git a/configure.ac b/configure.ac -index d9a1670..ab98441 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -38,13 +38,10 @@ m4_define(mym4_version_micro, [3]) - # processing is done by autoconf and not during the configure run. - m4_define(mym4_version, - [mym4_version_major.mym4_version_minor.mym4_version_micro]) --m4_define([mym4_revision], -- m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r'])) -+m4_define([mym4_revision], [4091]) - m4_define([mym4_revision_dec], - m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))])) --m4_define([mym4_betastring], -- m4_esyscmd_s([git describe --match 'libgcrypt-[0-9].*[0-9]' --long|\ -- awk -F- '$3!=0{print"-beta"$3}'])) -+m4_define([mym4_betastring], []) - m4_define([mym4_isgit],m4_if(mym4_betastring,[],[no],[yes])) - m4_define([mym4_full_version],[mym4_version[]mym4_betastring]) - --- -2.1.4 - diff --git a/src/libgcrypt-3-no-serial-tests.patch b/src/libgcrypt-3-no-serial-tests.patch deleted file mode 100644 index cde1d539..00000000 --- a/src/libgcrypt-3-no-serial-tests.patch +++ /dev/null @@ -1,48 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -Fix libgcrypt build under x86_64 -See https://www.redhat.com/archives/libguestfs/2013-February/msg00102.html - -From e19ba5689148df7cdcb6c515f44a897cc3a08418 Mon Sep 17 00:00:00 2001 -From: Boris Nagaev <bnagaev@gmail.com> -Date: Sun, 28 Jun 2015 17:17:25 +0200 -Subject: [PATCH] configure.ac: no serial-tests if automake < 1.12 - ---- - configure.ac | 19 ++++++++++++++++++- - 1 file changed, 18 insertions(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index ab98441..a015787 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -71,7 +71,24 @@ VERSION=$PACKAGE_VERSION - - AC_CONFIG_AUX_DIR([build-aux]) - AC_CONFIG_SRCDIR([src/libgcrypt.vers]) --AM_INIT_AUTOMAKE([serial-tests dist-bzip2]) -+ -+dnl Initialize automake. automake < 1.12 didn't have serial-tests and -+dnl gives an error if it sees this, but for automake >= 1.13 -+dnl serial-tests is required so we have to include it. Solution is to -+dnl test for the version of automake (by running an external command) -+dnl and provide it if necessary. Note we have to do this entirely using -+dnl m4 macros since automake queries this macro by running -+dnl 'autoconf --trace ...'. -+m4_define([serial_tests], [ -+ m4_esyscmd([automake --version | -+ head -1 | -+ awk '{split ($NF,a,"."); if (a[1] == 1 && a[2] >= 12) { '\ -+ 'print "serial-tests" }}' -+ ]) -+]) -+dnl NB: Do not [quote] this parameter. -+AM_INIT_AUTOMAKE(serial_tests dist-bzip2) -+ - AC_CONFIG_HEADER(config.h) - AC_CONFIG_MACRO_DIR([m4]) - AC_CONFIG_LIBOBJ_DIR([compat]) --- -1.7.10.4 - diff --git a/src/libgcrypt-test.c b/src/libgcrypt-test.c index 5b4ec310..d8a49969 100644 --- a/src/libgcrypt-test.c +++ b/src/libgcrypt-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdio.h> diff --git a/src/libgcrypt.mk b/src/libgcrypt.mk index 7392fcc0..e17a873b 100644 --- a/src/libgcrypt.mk +++ b/src/libgcrypt.mk @@ -1,18 +1,18 @@ -# 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 := libgcrypt +$(PKG)_WEBSITE := https://directory.fsf.org/wiki/Libgcrypt $(PKG)_IGNORE := -$(PKG)_VERSION := 1.6.4 -$(PKG)_CHECKSUM := c9bc2c7fe2e5f4ea13b0c74f9d24bcbb1ad889bb39297d8082aebf23f4336026 +$(PKG)_VERSION := 1.7.7 +$(PKG)_CHECKSUM := b9b85eba0793ea3e6e66b896eb031fa05e1a4517277cc9ab10816b359254cd9a $(PKG)_SUBDIR := libgcrypt-$($(PKG)_VERSION) $(PKG)_FILE := libgcrypt-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://mirrors.dotsrc.org/gcrypt/libgcrypt/$($(PKG)_FILE) -$(PKG)_URL_2 := ftp://ftp.gnupg.org/gcrypt/libgcrypt/$($(PKG)_FILE) +$(PKG)_URL := https://gnupg.org/ftp/gcrypt/libgcrypt/$($(PKG)_FILE) +$(PKG)_URL_2 := https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/libgcrypt/$($(PKG)_FILE) $(PKG)_DEPS := gcc libgpg_error define $(PKG)_UPDATE - $(WGET) -q -O- 'ftp://ftp.gnupg.org/gcrypt/libgcrypt/' | \ + $(WGET) -q -O- 'https://gnupg.org/ftp/gcrypt/libgcrypt/' | \ $(SED) -n 's,.*libgcrypt-\([0-9][^>]*\)\.tar.*,\1,p' | \ $(SORT) -V | \ tail -1 @@ -30,7 +30,7 @@ define $(PKG)_MAKE '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libgcrypt.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libgcrypt.exe' \ `$(TARGET)-libgcrypt-config --cflags --libs` endef diff --git a/src/libgda-1-fixes.patch b/src/libgda-1-fixes.patch new file mode 100644 index 00000000..68c508db --- /dev/null +++ b/src/libgda-1-fixes.patch @@ -0,0 +1,71 @@ +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: Vivien Malerba <malerba@gnome-db.org> +Date: Sun, 22 Feb 2015 21:41:46 +0100 +Subject: [PATCH] Misc. demos/ corrections + +Fix of libgda-ui/demos/ddl_queries.c was excluded, because +we need this only to fix Perl failure. + + +diff --git a/libgda-ui/demos/geninclude.pl.in b/libgda-ui/demos/geninclude.pl.in +index 1111111..2222222 100755 +--- a/libgda-ui/demos/geninclude.pl.in ++++ b/libgda-ui/demos/geninclude.pl.in +@@ -40,7 +40,7 @@ foreach $href (@demos) { + my $do_next = 0; + + # parent detected +- if (defined @parents) { ++ if (@parents) { + foreach $foo (@parents) { + if ($foo eq $parent_name) { + $do_next = 1; +@@ -54,7 +54,7 @@ foreach $href (@demos) { + + push @parents, $parent_name; + +- $tmp = (defined @child_arrays)?($#child_arrays + 1):0; ++ $tmp = (@child_arrays)?($#child_arrays + 1):0; + push @child_arrays, "child$tmp"; + + push @demos, {"title" => $parent_name, "file" => "NULL", +@@ -62,7 +62,7 @@ foreach $href (@demos) { + } + } + +-if (defined @parents) { ++if (@parents) { + $i = 0; + for ($i = 0; $i <= $#parents; $i++) { + $first = 1; +@@ -73,7 +73,7 @@ if (defined @parents) { + for ($j = 0; $j <= $#demos; $j++) { + $href = $demos[$j]; + +- if (!defined $demos[$j]) { ++ if (!$demos[$j]) { + next; + } + +@@ -105,7 +105,7 @@ if (defined @parents) { + } @demos_old; + + # sort the child arrays +-if (defined @child_arrays) { ++if (@child_arrays) { + for ($i = 0; $i <= $#child_arrays; $i++) { + @foo_old = @{$child_arrays[$i]}; + +@@ -133,7 +133,7 @@ foreach $href (@demos) { + print ", \n"; + } + +- if (defined @parents) { ++ if (@parents) { + for ($i = 0; $i <= $#parents; $i++) { + if ($parents[$i] eq $href->{title}) { + diff --git a/src/libgda.mk b/src/libgda.mk index 09e4a3a9..d02819da 100644 --- a/src/libgda.mk +++ b/src/libgda.mk @@ -1,13 +1,13 @@ -# 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 := libgda +$(PKG)_WEBSITE := http://www.gnome-db.org/ $(PKG)_IGNORE := $(PKG)_VERSION := 4.2.13 $(PKG)_CHECKSUM := 25b75951f8f38fd58a403389566a0aae2f83b39d4225bc3acf5f2d68895ab4c3 $(PKG)_SUBDIR := libgda-$($(PKG)_VERSION) $(PKG)_FILE := libgda-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/libgda/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/libgda/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc glib libxml2 mdbtools define $(PKG)_UPDATE diff --git a/src/libgdamm.mk b/src/libgdamm.mk index 81523a7c..d2a667f2 100644 --- a/src/libgdamm.mk +++ b/src/libgdamm.mk @@ -1,17 +1,17 @@ -# 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 := libgdamm +$(PKG)_WEBSITE := https://launchpad.net/libgdamm $(PKG)_IGNORE := $(PKG)_VERSION := 4.1.3 $(PKG)_CHECKSUM := 9e7c04544fb580d8b00216ca191ab863dff73abec0e569159f4aa640f6319881 $(PKG)_SUBDIR := libgdamm-$($(PKG)_VERSION) $(PKG)_FILE := libgdamm-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/libgdamm/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/libgdamm/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc glibmm libgda define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/libgdamm/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/libgdamm/refs/tags' | \ grep '<a href=' | \ $(SED) -n 's,.*<a[^>]*>\([0-9][^<]*\)<.*,\1,p' | \ head -1 diff --git a/src/libgee.mk b/src/libgee.mk index 9bbb636a..3ec10252 100644 --- a/src/libgee.mk +++ b/src/libgee.mk @@ -1,17 +1,17 @@ -# 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 := libgee +$(PKG)_WEBSITE := https://wiki.gnome.org/Projects/Libgee $(PKG)_IGNORE := $(PKG)_VERSION := 0.5.0 $(PKG)_CHECKSUM := aa6a2563867d3e3d56921bd1f7a7869d24599e1b5beb70e83f55b718fdddff51 $(PKG)_SUBDIR := libgee-$($(PKG)_VERSION) $(PKG)_FILE := libgee-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/libgee/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/libgee/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc glib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/libgee/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/libgee/refs/tags' | \ grep '<a href=' | \ $(SED) -n "s,.*<a href='[^']*/tag/?id=LIBGEE_\\([0-9]*_[0-9]*_[^<]*\\)'.*,\\1,p" | \ $(SED) 's,_,.,g' | \ diff --git a/src/libgeotiff.mk b/src/libgeotiff.mk index b9f54b81..1d0320ad 100644 --- a/src/libgeotiff.mk +++ b/src/libgeotiff.mk @@ -1,7 +1,8 @@ -# 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 := libgeotiff +$(PKG)_WEBSITE := https://trac.osgeo.org/geotiff/ +$(PKG)_DESCR := GeoTiff $(PKG)_IGNORE := $(PKG)_VERSION := 1.4.0 $(PKG)_CHECKSUM := d0acb8d341fd6a8f2c673456e09fdb8f50f91e3166ac934719fe05b30d328329 @@ -12,7 +13,7 @@ $(PKG)_URL_2 := ftp://ftp.remotesensing.org/geotiff/libgeotiff/$($(PKG)_FILE) $(PKG)_DEPS := gcc jpeg proj tiff zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://trac.osgeo.org/geotiff/' | \ + $(WGET) -q -O- 'https://trac.osgeo.org/geotiff/' | \ $(SED) -n 's,.*libgeotiff-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef diff --git a/src/libgit2.mk b/src/libgit2.mk index 011b6be4..3467f380 100644 --- a/src/libgit2.mk +++ b/src/libgit2.mk @@ -1,7 +1,7 @@ -# 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 := libgit2 +$(PKG)_WEBSITE := https://libgit2.github.com/ $(PKG)_IGNORE := $(PKG)_VERSION := 0.23.2 $(PKG)_CHECKSUM := 20c0a6ee92c0e19207dac6ddc336b4ae4a1c4ddf91be0891e4b6e6ccba16df0b @@ -12,10 +12,8 @@ $(PKG)_DEPS := gcc libssh2 define $(PKG)_BUILD mkdir '$(1).build' - cd '$(1).build' && cmake \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + cd '$(1).build' && '$(TARGET)-cmake' \ -DDLLTOOL='$(PREFIX)/bin/$(TARGET)-dlltool' \ - -DBUILD_SHARED_LIBS=$(if $(BUILD_STATIC),OFF,ON) \ '$(1)' $(MAKE) -C '$(1).build' -j '$(JOBS)' VERBOSE=1 || $(MAKE) -C '$(1).build' -j 1 VERBOSE=1 $(MAKE) -C '$(1).build' -j 1 install VERBOSE=1 diff --git a/src/libglade-1-fixes.patch b/src/libglade-1-fixes.patch index 52cd435f..527d7627 100644 --- a/src/libglade-1-fixes.patch +++ b/src/libglade-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/libglade.mk b/src/libglade.mk index 926b5d2e..aab5b6f0 100644 --- a/src/libglade.mk +++ b/src/libglade.mk @@ -1,17 +1,18 @@ -# 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 := libglade +$(PKG)_WEBSITE := https://glade.gnome.org/ +$(PKG)_DESCR := glade $(PKG)_IGNORE := $(PKG)_VERSION := 2.6.4 $(PKG)_CHECKSUM := c41d189b68457976069073e48d6c14c183075d8b1d8077cb6dfb8b7c5097add3 $(PKG)_SUBDIR := libglade-$($(PKG)_VERSION) $(PKG)_FILE := libglade-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://ftp.gnome.org/pub/GNOME/sources/libglade/2.6/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/libglade/2.6/$($(PKG)_FILE) $(PKG)_DEPS := gcc atk glib gtk2 libxml2 define $(PKG)_UPDATE - $(WGET) -q -O- 'http://ftp.gnome.org/pub/GNOME/sources/libglade/2.6/' | \ + $(WGET) -q -O- 'https://download.gnome.org/sources/libglade/2.6/' | \ $(SED) -n 's,.*"libglade-\([0-9][^"]*\)\.tar.gz.*,\1,p' | \ tail -1 endef diff --git a/src/libgnurx-1-additional-makefile-rules.patch b/src/libgnurx-1-additional-makefile-rules.patch index 1a78809f..915f0686 100644 --- a/src/libgnurx-1-additional-makefile-rules.patch +++ b/src/libgnurx-1-additional-makefile-rules.patch @@ -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. diff -Nur mingw-libgnurx-2.5.1/Makefile.mxe mingw-libgnurx-2.5.1-mxe/Makefile.mxe --- mingw-libgnurx-2.5.1/Makefile.mxe 1970-01-01 01:00:00.000000000 +0100 diff --git a/src/libgnurx.mk b/src/libgnurx.mk index 1958bf1a..1a4527da 100644 --- a/src/libgnurx.mk +++ b/src/libgnurx.mk @@ -1,22 +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 := libgnurx +$(PKG)_WEBSITE := https://sourceforge.net/projects/mingw/files/UserContributed/regex/ $(PKG)_IGNORE := -$(PKG)_VERSION := 2.5.1 -$(PKG)_CHECKSUM := 7147b7f806ec3d007843b38e19f42a5b7c65894a57ffc297a76b0dcd5f675d76 +$(PKG)_VERSION := 2.6.1 +$(PKG)_CHECKSUM := ee6edc110c6b63d0469f4f05ef187564b310cc8a88b6566310a4aebd48b612c7 $(PKG)_SUBDIR := mingw-libgnurx-$($(PKG)_VERSION) $(PKG)_FILE := mingw-libgnurx-$($(PKG)_VERSION)-src.tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/mingw/Other/UserContributed/regex/mingw-regex-$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://github.com/TimothyGu/libgnurx/releases/download/libgnurx-$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/mingw/files/Other/UserContributed/regex/' | \ - grep 'mingw-regex-' | \ - $(SED) -n 's,.*mingw-regex-\([0-9\.]*\).*,\1,p' | \ - $(SORT) | \ - uniq | \ - tail -1 + $(WGET) -q -O- 'https://api.github.com/repos/TimothyGu/libgnurx/git/refs/tags/' \ + | $(SED) -n 's#.*"ref": "refs/tags/libgnurx-\([^"]*\).*#\1#p' \ + | $(SORT) -V \ + | tail -1 endef define $(PKG)_BUILD diff --git a/src/libgpg_error.mk b/src/libgpg_error.mk index 32090c78..d48a50b8 100644 --- a/src/libgpg_error.mk +++ b/src/libgpg_error.mk @@ -1,18 +1,19 @@ -# 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 := libgpg_error +$(PKG)_WEBSITE := https://www.gnupg.org/related_software/libgpg-error/ +$(PKG)_DESCR := libgpg-error $(PKG)_IGNORE := -$(PKG)_VERSION := 1.20 -$(PKG)_CHECKSUM := 3266895ce3419a7fb093e63e95e2ee3056c481a9bc0d6df694cfd26f74e72522 +$(PKG)_VERSION := 1.27 +$(PKG)_CHECKSUM := 4f93aac6fecb7da2b92871bb9ee33032be6a87b174f54abf8ddf0911a22d29d2 $(PKG)_SUBDIR := libgpg-error-$($(PKG)_VERSION) $(PKG)_FILE := libgpg-error-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://mirrors.dotsrc.org/gcrypt/libgpg-error/$($(PKG)_FILE) -$(PKG)_URL_2 := ftp://ftp.gnupg.org/gcrypt/libgpg-error/$($(PKG)_FILE) +$(PKG)_URL := https://gnupg.org/ftp/gcrypt/libgpg-error/$($(PKG)_FILE) +$(PKG)_URL_2 := https://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/libgpg-error/$($(PKG)_FILE) $(PKG)_DEPS := gcc gettext define $(PKG)_UPDATE - $(WGET) -q -O- 'ftp://ftp.gnupg.org/gcrypt/libgpg-error/' | \ + $(WGET) -q -O- 'https://gnupg.org/ftp/gcrypt/libgpg-error/' | \ $(SED) -n 's,.*libgpg-error-\([1-9]\.[1-9][0-9][^>]*\)\.tar.*,\1,p' | \ tail -1 endef diff --git a/src/libgsasl-test.c b/src/libgsasl-test.c index 8b650d2b..ca9e0a34 100644 --- a/src/libgsasl-test.c +++ b/src/libgsasl-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <gsasl.h> diff --git a/src/libgsasl.mk b/src/libgsasl.mk index afdf9728..320242be 100644 --- a/src/libgsasl.mk +++ b/src/libgsasl.mk @@ -1,17 +1,18 @@ -# 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 := libgsasl +$(PKG)_WEBSITE := https://www.gnu.org/software/gsasl/ +$(PKG)_DESCR := Libgsasl $(PKG)_IGNORE := $(PKG)_VERSION := 1.8.0 $(PKG)_CHECKSUM := 3adfb49f9c92a719dea855fd1840d698cde55d4648d332a69032ba8bea207720 $(PKG)_SUBDIR := libgsasl-$($(PKG)_VERSION) $(PKG)_FILE := libgsasl-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://ftp.gnu.org/gnu/gsasl/$($(PKG)_FILE) +$(PKG)_URL := https://ftp.gnu.org/gnu/gsasl/$($(PKG)_FILE) $(PKG)_DEPS := gcc libgcrypt libiconv libidn libntlm define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.savannah.gnu.org/gitweb/?p=gsasl.git;a=tags' | \ + $(WGET) -q -O- 'https://git.savannah.gnu.org/gitweb/?p=gsasl.git;a=tags' | \ grep '<a class="list subject"' | \ $(SED) -n 's,.*<a[^>]*>\([0-9]*\.[0-9]*[02468]\.[^<]*\)<.*,\1,p' | \ head -1 @@ -29,6 +30,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libgsasl.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libgsasl.exe' \ `'$(TARGET)-pkg-config' libgsasl --cflags --libs` endef diff --git a/src/libgsf-1-fixes.patch b/src/libgsf-1-fixes.patch index 09909a07..fdca3b29 100644 --- a/src/libgsf-1-fixes.patch +++ b/src/libgsf-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/libgsf.mk b/src/libgsf.mk index 0d712b3c..743379ce 100644 --- a/src/libgsf.mk +++ b/src/libgsf.mk @@ -1,17 +1,17 @@ -# 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 := libgsf +$(PKG)_WEBSITE := https://developer.gnome.org/gsf/ $(PKG)_IGNORE := $(PKG)_VERSION := 1.14.30 $(PKG)_CHECKSUM := cb48c3480be4a691963548e664308f497d93c9d7bc12cf6a68d5ebae930a5b70 $(PKG)_SUBDIR := libgsf-$($(PKG)_VERSION) $(PKG)_FILE := libgsf-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/libgsf/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/libgsf/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc bzip2 glib libxml2 zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/libgsf/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/libgsf/refs/tags' | \ grep '<a href=' | \ $(SED) -n "s,.*<a href='[^']*/tag/?id=LIBGSF_\\([0-9]*_[0-9]*[02468]_[^<]*\\)'.*,\\1,p" | \ $(SED) 's,_,.,g' | \ diff --git a/src/libharu-1-fixes.patch b/src/libharu-1-fixes.patch index fd1e230b..a27ebdc4 100644 --- a/src/libharu-1-fixes.patch +++ b/src/libharu-1-fixes.patch @@ -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 531d2a9af8c51ad8badc32bc9ba43bb3b87b0e9f Mon Sep 17 00:00:00 2001 From: Antony Dovgal <tony@daylessday.org> diff --git a/src/libharu.mk b/src/libharu.mk index 650ec8fb..a4052404 100644 --- a/src/libharu.mk +++ b/src/libharu.mk @@ -1,7 +1,7 @@ -# 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 := libharu +$(PKG)_WEBSITE := http://libharu.org/ $(PKG)_IGNORE := $(PKG)_VERSION := 2.2.1 $(PKG)_CHECKSUM := 45fd57044042c0e290ad0f11fc19eeb31b50c4b9edadf9d89dd5a7d9ae4865a7 diff --git a/src/libiberty-test.c b/src/libiberty-test.c index 48d00f3a..fb50f727 100644 --- a/src/libiberty-test.c +++ b/src/libiberty-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #define _GNU_SOURCE diff --git a/src/libiberty.mk b/src/libiberty.mk index 08c38486..e7d49346 100644 --- a/src/libiberty.mk +++ b/src/libiberty.mk @@ -1,7 +1,7 @@ -# 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 := libiberty +$(PKG)_WEBSITE := https://gcc.gnu.org/onlinedocs/libiberty/ $(PKG)_IGNORE = $(binutils_IGNORE) $(PKG)_VERSION = $(binutils_VERSION) $(PKG)_CHECKSUM = $(binutils_CHECKSUM) @@ -27,7 +27,7 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libiberty.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libiberty.exe' \ -I$(PREFIX)/$(TARGET)/include/libiberty -liberty endef diff --git a/src/libical-1-fixes.patch b/src/libical-1-fixes.patch new file mode 100644 index 00000000..d0961d00 --- /dev/null +++ b/src/libical-1-fixes.patch @@ -0,0 +1,132 @@ +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: Wed, 13 Apr 2016 20:54:43 +0300 +Subject: [PATCH] fix definitions of gmtime/gmtime_r + +Fix the following error: +config.h:508:37: error: expected initializer before '?' token + +The error is caused by the following combination: + + #include <unistd.h> + #define gmtime_r(tp,tmp) ((gmtime(tp))?(*(tmp)=*(gmtime(tp)),(tmp)):0) + #include <time.h> + +time.h declares and defines gmtime_r. Because of the macro, the definition +of gmtime_r is broken. This commit moves time.h before the macro define. + +diff --git a/config.h.cmake b/config.h.cmake +index 1111111..2222222 100644 +--- a/config.h.cmake ++++ b/config.h.cmake +@@ -495,6 +495,7 @@ typedef ssize_t IO_SSIZE_T; + #endif + #endif + ++#include <time.h> + /* gmtime_r - thread safe gmtime() really only needed on Unix */ + #if !defined(HAVE_GMTIME_R) + #if !defined(_WIN32) +@@ -507,7 +508,6 @@ typedef ssize_t IO_SSIZE_T; + /* FYI: The gmtime() in Microsoft's C library is MT-safe */ + #define gmtime_r(tp,tmp) (gmtime(tp)?(*(tmp)=*gmtime(tp),(tmp)):0) + #endif +-#include <time.h> + + /* localtime_r - thread safe localtime() really only needed on Unix */ + #if !defined(HAVE_LOCALTIME_R) + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Thu, 14 Apr 2016 01:33:47 +0300 +Subject: [PATCH] test, examples: fix linking with static library + +Fix errors like the following: + +> No rule to make target `bin/libical-static.lib', +> needed by `src/test/copycluster.exe'. + +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index 1111111..2222222 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -23,19 +23,11 @@ add_dependencies(doesnothing ical icalss icalvcal) + if(NOT STATIC_ONLY) + target_link_libraries(doesnothing ical icalss icalvcal) + else() +- if(NOT WIN32) +- target_link_libraries(doesnothing +- ${CMAKE_BINARY_DIR}/lib/libical.a +- ${CMAKE_BINARY_DIR}/lib/libicalss.a +- ${CMAKE_BINARY_DIR}/lib/libicalvcal.a +- ) +- else() +- target_link_libraries(doesnothing +- ${CMAKE_BINARY_DIR}/bin/libical-static.lib +- ${CMAKE_BINARY_DIR}/bin/libicalss-static.lib +- ${CMAKE_BINARY_DIR}/bin/libicalvcal-static.lib +- ) +- endif() ++ target_link_libraries(doesnothing ++ ical-static ++ icalss-static ++ icalvcal-static ++ ) + target_link_libraries(doesnothing ${CMAKE_THREAD_LIBS_INIT}) + if(ICU_FOUND) + target_link_libraries(doesnothing ${ICU_LIBRARY}) +diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt +index 1111111..2222222 100644 +--- a/src/test/CMakeLists.txt ++++ b/src/test/CMakeLists.txt +@@ -50,19 +50,11 @@ macro(buildme _name _srcs) + endif() + else() + add_dependencies(${_name} ical-static icalss-static icalvcal-static) +- if(NOT WIN32) +- target_link_libraries(${_name} +- ${CMAKE_BINARY_DIR}/lib/libical.a +- ${CMAKE_BINARY_DIR}/lib/libicalss.a +- ${CMAKE_BINARY_DIR}/lib/libicalvcal.a +- ) +- else() +- target_link_libraries(${_name} +- ${CMAKE_BINARY_DIR}/bin/libical-static.lib +- ${CMAKE_BINARY_DIR}/bin/libicalss-static.lib +- ${CMAKE_BINARY_DIR}/bin/libicalvcal-static.lib +- ) +- endif() ++ target_link_libraries(${_name} ++ ical-static ++ icalss-static ++ icalvcal-static ++ ) + target_link_libraries(${_name} ${CMAKE_THREAD_LIBS_INIT}) + if(ICU_FOUND) + target_link_libraries(${_name} ${ICU_LIBRARY}) +@@ -74,17 +66,10 @@ macro(buildme _name _srcs) + target_link_libraries(${_name} ${BDB_LIBRARY}) + endif() + if(WITH_CXX_BINDINGS) +- if(NOT WIN32) +- target_link_libraries(${_name} +- ${CMAKE_BINARY_DIR}/lib/libical_cxx.a +- ${CMAKE_BINARY_DIR}/lib/libicalss_cxx.a +- ) +- else() +- target_link_libraries(${_name} +- ${CMAKE_BINARY_DIR}/bin/libical_cxx-static.lib +- ${CMAKE_BINARY_DIR}/bin/libicalss_cxx-static.lib +- ) +- endif() ++ target_link_libraries(${_name} ++ ical_cxx-static ++ icalss_cxx-static ++ ) + endif() + endif() + endmacro() diff --git a/src/libical-test.c b/src/libical-test.c index 3e0de84b..5b3da074 100644 --- a/src/libical-test.c +++ b/src/libical-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdio.h> diff --git a/src/libical.mk b/src/libical.mk index b64ca0d7..6be39c7a 100644 --- a/src/libical.mk +++ b/src/libical.mk @@ -1,31 +1,32 @@ -# 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 := libical -$(PKG)_VERSION := 1.0.1 -$(PKG)_CHECKSUM := 089ce3c42d97fbd7a5d4b3c70adbdd82115dd306349c1f5c46a8fb3f8c949592 +$(PKG)_WEBSITE := https://freeassociation.sourceforge.io/ +$(PKG)_VERSION := 2.0.0 +$(PKG)_CHECKSUM := 654c11f759c19237be39f6ad401d917e5a05f36f1736385ed958e60cf21456da $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz $(PKG)_URL := https://github.com/$(PKG)/$(PKG)/releases/download/v$($(PKG)_VERSION)//$($(PKG)_FILE) $(PKG)_DEPS := gcc icu4c define $(PKG)_UPDATE - echo 'TODO: Updates for package libical need to be written.' >&2; - echo $(libical_VERSION) + $(call MXE_GET_GITHUB_TAGS, libical/libical, v) endef define $(PKG)_BUILD - cd '$(1)' && mkdir build - cd '$(1)/build' && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + cd '$(BUILD_DIR)' && '$(TARGET)-cmake' \ -DUSE_BUILTIN_TZDATA=true \ - -DSTATIC_ONLY=$(if $(BUILD_STATIC),true,false) \ - -DSHARED_ONLY=$(if $(BUILD_STATIC),false,true) - $(MAKE) -C '$(1)/build' -j '$(JOBS)' - $(MAKE) -C '$(1)/build' -j 1 install + -DSTATIC_ONLY=$(CMAKE_STATIC_BOOL) \ + -DSHARED_ONLY=$(CMAKE_SHARED_BOOL) \ + '$(SOURCE_DIR)' + + # libs are built twice, causing parallel failures + # https://github.com/libical/libical/issues/174 + $(MAKE) -C '$(BUILD_DIR)' -j 1 VERBOSE=1 + $(MAKE) -C '$(BUILD_DIR)' -j 1 install VERBOSE=1 '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libical.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libical.exe' \ `'$(TARGET)-pkg-config' libical --cflags --libs` endef diff --git a/src/libiconv-1-fixes.patch b/src/libiconv-1-fixes.patch deleted file mode 100644 index cf3fef5a..00000000 --- a/src/libiconv-1-fixes.patch +++ /dev/null @@ -1,46 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -Contains ad hoc patches for cross building. - -From 47345f5dcfb91da8afed7c4e6c29faa2056db447 Mon Sep 17 00:00:00 2001 -From: MXE -Date: Fri, 7 Jun 2013 17:44:24 +1000 -Subject: [PATCH] remove gets since c++11 removed it - https://lists.gnu.org/archive/html/bug-gnulib/2012-03/msg00186.html - - -diff --git a/srclib/stdio.in.h b/srclib/stdio.in.h -index 473c84c..dfb59eb 100644 ---- a/srclib/stdio.in.h -+++ b/srclib/stdio.in.h -@@ -679,22 +679,11 @@ _GL_WARN_ON_USE (getline, "getline is unportable - " - # endif - #endif - --#if @GNULIB_GETS@ --# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ --# if !(defined __cplusplus && defined GNULIB_NAMESPACE) --# undef gets --# define gets rpl_gets --# endif --_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1))); --_GL_CXXALIAS_RPL (gets, char *, (char *s)); --# else --_GL_CXXALIAS_SYS (gets, char *, (char *s)); --# undef gets --# endif --_GL_CXXALIASWARN (gets); - /* It is very rare that the developer ever has full control of stdin, -- so any use of gets warrants an unconditional warning. Assume it is -- always declared, since it is required by C89. */ -+ so any use of gets warrants an unconditional warning; besides, C11 -+ removed it. */ -+#undef gets -+#if HAVE_RAW_DECL_GETS - _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); - #endif - --- -1.8.2.3 - diff --git a/src/libiconv.mk b/src/libiconv.mk index 724c39b6..39eee944 100644 --- a/src/libiconv.mk +++ b/src/libiconv.mk @@ -1,17 +1,17 @@ -# 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 := libiconv +$(PKG)_WEBSITE := https://www.gnu.org/software/libiconv/ $(PKG)_IGNORE := -$(PKG)_VERSION := 1.14 -$(PKG)_CHECKSUM := 72b24ded17d687193c3366d0ebe7cde1e6b18f0df8c55438ac95be39e8a30613 +$(PKG)_VERSION := 1.15 +$(PKG)_CHECKSUM := ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178 $(PKG)_SUBDIR := libiconv-$($(PKG)_VERSION) $(PKG)_FILE := libiconv-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://ftp.gnu.org/pub/gnu/libiconv/$($(PKG)_FILE) +$(PKG)_URL := https://ftp.gnu.org/gnu/libiconv/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.gnu.org/software/libiconv/' | \ + $(WGET) -q -O- 'https://www.gnu.org/software/libiconv/' | \ grep 'libiconv-' | \ $(SED) -n 's,.*libiconv-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 diff --git a/src/libid3tag.mk b/src/libid3tag.mk new file mode 100644 index 00000000..e856d868 --- /dev/null +++ b/src/libid3tag.mk @@ -0,0 +1,29 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := libid3tag +$(PKG)_WEBSITE := https://sourceforge.net/projects/mad/files/libid3tag/ +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.15.1b +$(PKG)_CHECKSUM := 63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151 +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/mad/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc zlib + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://sourceforge.net/projects/mad/files/libid3tag/' | \ + $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + cd '$(1)' && ./configure \ + $(MXE_CONFIGURE_OPTS) + + # libtool misses some dependency libs and there's no lt_cv* etc. options + # can be removed after 0.15.1b if recent libtool et al. is used + $(if $(BUILD_SHARED),\ + $(SED) -i 's#^postdeps=""#postdeps="-lz"#g' '$(1)/libtool') + + $(MAKE) -C '$(1)' -j '$(JOBS)' install LDFLAGS='-no-undefined' +endef diff --git a/src/libidn-1-fixes.patch b/src/libidn-1-fixes.patch index 405f0f16..5a5401ce 100644 --- a/src/libidn-1-fixes.patch +++ b/src/libidn-1-fixes.patch @@ -1,16 +1,13 @@ -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. -Contains ad hoc patches for cross building. - -From 2d8680323de1e709bfec5194db0119a7395ab78a Mon Sep 17 00:00:00 2001 -From: MXE +From 6c79d4a98dca226b41987ecccd7919b698df597e Mon Sep 17 00:00:00 2001 +From: "a@mxe.org" <a@mxe.org> Date: Fri, 25 Nov 2011 15:58:28 +0100 -Subject: [PATCH] fix Libs.private +Subject: [PATCH 1/4] fix Libs.private diff --git a/libidn.pc.in b/libidn.pc.in -index a69d5d3..2d36472 100644 +index 74b84be6..629de30a 100644 --- a/libidn.pc.in +++ b/libidn.pc.in @@ -19,5 +19,5 @@ Description: IETF stringprep, nameprep, punycode, IDNA text processing. @@ -21,5 +18,1034 @@ index a69d5d3..2d36472 100644 +Libs.private: -lintl -liconv Cflags: -I${includedir} -- -1.7.8 +2.11.0 + + +From 884d44d1d9752062c86c4dd2bddd8b40d9f80222 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de> +Date: Wed, 1 Feb 2017 10:44:36 +0100 +Subject: [PATCH 2/4] Update intprops.h for gcc-7 compatibility + +(cherry picked from commit 230930b3bc3e431b819eb45420cb42475d83ca93) + +diff --git a/gl/intprops.h b/gl/intprops.h +index e1fce5c9..eb06b691 100644 +--- a/gl/intprops.h ++++ b/gl/intprops.h +@@ -1,18 +1,18 @@ + /* intprops.h -- properties of integer types + +- Copyright (C) 2001-2016 Free Software Foundation, Inc. ++ Copyright (C) 2001-2017 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it +- under the terms of the GNU General Public License as published +- by the Free Software Foundation; either version 3 of the License, or ++ under the terms of the GNU Lesser General Public License as published ++ by the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- GNU General Public License for more details. ++ GNU Lesser General Public License for more details. + +- You should have received a copy of the GNU General Public License ++ You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + + /* Written by Paul Eggert. */ +@@ -47,12 +47,16 @@ + + /* Minimum and maximum values for integer types and expressions. */ + ++/* The width in bits of the integer type or expression T. ++ Padding bits are not supported; this is checked at compile-time below. */ ++#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) ++ + /* The maximum and minimum values for the integer type T. */ + #define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t)) + #define TYPE_MAXIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) -1 \ +- : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) ++ : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1))) + + /* The maximum and minimum values for the type of the expression E, + after integer promotion. E should not have side effects. */ +@@ -65,7 +69,13 @@ + ? _GL_SIGNED_INT_MAXIMUM (e) \ + : _GL_INT_NEGATE_CONVERT (e, 1)) + #define _GL_SIGNED_INT_MAXIMUM(e) \ +- (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1) ++ (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1) ++ ++/* Work around OpenVMS incompatibility with C99. */ ++#if !defined LLONG_MAX && defined __INT64_MAX ++# define LLONG_MAX __INT64_MAX ++# define LLONG_MIN __INT64_MIN ++#endif + + /* This include file assumes that signed types are two's complement without + padding bits; the above macros have undefined behavior otherwise. +@@ -84,10 +94,15 @@ verify (TYPE_MAXIMUM (long int) == LONG_MAX); + verify (TYPE_MINIMUM (long long int) == LLONG_MIN); + verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); + #endif ++/* Similarly, sanity-check one ISO/IEC TS 18661-1:2014 macro if defined. */ ++#ifdef UINT_WIDTH ++verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH); ++#endif + + /* Does the __typeof__ keyword work? This could be done by + 'configure', but for now it's easier to do it by hand. */ +-#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ ++#if (2 <= __GNUC__ \ ++ || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ + || (0x5110 <= __SUNPRO_C && !__STDC__)) + # define _GL_HAVE___TYPEOF__ 1 + #else +@@ -116,8 +131,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); + signed, this macro may overestimate the true bound by one byte when + applied to unsigned types of size 2, 4, 16, ... bytes. */ + #define INT_STRLEN_BOUND(t) \ +- (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \ +- - _GL_SIGNED_TYPE_OR_EXPR (t)) \ ++ (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \ + + _GL_SIGNED_TYPE_OR_EXPR (t)) + + /* Bound on buffer size needed to represent an integer type or expression T, +@@ -222,20 +236,23 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); + ? (a) < (min) >> (b) \ + : (max) >> (b) < (a)) + +-/* True if __builtin_add_overflow (A, B, P) works when P is null. */ +-#define _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL (7 <= __GNUC__) ++/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */ ++#define _GL_HAS_BUILTIN_OVERFLOW (5 <= __GNUC__) ++ ++/* True if __builtin_add_overflow_p (A, B, C) works. */ ++#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__) + + /* The _GL*_OVERFLOW macros have the same restrictions as the + *_RANGE_OVERFLOW macros, except that they do not assume that operands + (e.g., A and B) have the same type as MIN and MAX. Instead, they assume + that the result (e.g., A + B) has that type. */ +-#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL +-# define _GL_ADD_OVERFLOW(a, b, min, max) +- __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0) +-# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) +- __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0) +-# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) +- __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0) ++#if _GL_HAS_BUILTIN_OVERFLOW_P ++# define _GL_ADD_OVERFLOW(a, b, min, max) \ ++ __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0) ++# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ ++ __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0) ++# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ ++ __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0) + #else + # define _GL_ADD_OVERFLOW(a, b, min, max) \ + ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \ +@@ -315,7 +332,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); + _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW) + #define INT_SUBTRACT_OVERFLOW(a, b) \ + _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW) +-#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL ++#if _GL_HAS_BUILTIN_OVERFLOW_P + # define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a) + #else + # define INT_NEGATE_OVERFLOW(a) \ +@@ -349,10 +366,6 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); + #define INT_MULTIPLY_WRAPV(a, b, r) \ + _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW) + +-#ifndef __has_builtin +-# define __has_builtin(x) 0 +-#endif +- + /* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See: + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193 + https://llvm.org/bugs/show_bug.cgi?id=25390 +@@ -369,7 +382,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); + the operation. BUILTIN is the builtin operation, and OVERFLOW the + overflow predicate. Return 1 if the result overflows. See above + for restrictions. */ +-#if 5 <= __GNUC__ || __has_builtin (__builtin_add_overflow) ++#if _GL_HAS_BUILTIN_OVERFLOW + # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r) + #elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS + # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ +@@ -412,7 +425,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); + # else + # define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ +- long int, LONG_MIN, LONG_MAX)) ++ long int, LONG_MIN, LONG_MAX) + # endif + #endif + +diff --git a/lib/gltests/intprops.h b/lib/gltests/intprops.h +index e1fce5c9..eb06b691 100644 +--- a/lib/gltests/intprops.h ++++ b/lib/gltests/intprops.h +@@ -1,18 +1,18 @@ + /* intprops.h -- properties of integer types + +- Copyright (C) 2001-2016 Free Software Foundation, Inc. ++ Copyright (C) 2001-2017 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it +- under the terms of the GNU General Public License as published +- by the Free Software Foundation; either version 3 of the License, or ++ under the terms of the GNU Lesser General Public License as published ++ by the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- GNU General Public License for more details. ++ GNU Lesser General Public License for more details. + +- You should have received a copy of the GNU General Public License ++ You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + + /* Written by Paul Eggert. */ +@@ -47,12 +47,16 @@ + + /* Minimum and maximum values for integer types and expressions. */ + ++/* The width in bits of the integer type or expression T. ++ Padding bits are not supported; this is checked at compile-time below. */ ++#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT) ++ + /* The maximum and minimum values for the integer type T. */ + #define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t)) + #define TYPE_MAXIMUM(t) \ + ((t) (! TYPE_SIGNED (t) \ + ? (t) -1 \ +- : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) ++ : ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1))) + + /* The maximum and minimum values for the type of the expression E, + after integer promotion. E should not have side effects. */ +@@ -65,7 +69,13 @@ + ? _GL_SIGNED_INT_MAXIMUM (e) \ + : _GL_INT_NEGATE_CONVERT (e, 1)) + #define _GL_SIGNED_INT_MAXIMUM(e) \ +- (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1) ++ (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH ((e) + 0) - 2)) - 1) * 2 + 1) ++ ++/* Work around OpenVMS incompatibility with C99. */ ++#if !defined LLONG_MAX && defined __INT64_MAX ++# define LLONG_MAX __INT64_MAX ++# define LLONG_MIN __INT64_MIN ++#endif + + /* This include file assumes that signed types are two's complement without + padding bits; the above macros have undefined behavior otherwise. +@@ -84,10 +94,15 @@ verify (TYPE_MAXIMUM (long int) == LONG_MAX); + verify (TYPE_MINIMUM (long long int) == LLONG_MIN); + verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); + #endif ++/* Similarly, sanity-check one ISO/IEC TS 18661-1:2014 macro if defined. */ ++#ifdef UINT_WIDTH ++verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH); ++#endif + + /* Does the __typeof__ keyword work? This could be done by + 'configure', but for now it's easier to do it by hand. */ +-#if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ ++#if (2 <= __GNUC__ \ ++ || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \ + || (0x5110 <= __SUNPRO_C && !__STDC__)) + # define _GL_HAVE___TYPEOF__ 1 + #else +@@ -116,8 +131,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); + signed, this macro may overestimate the true bound by one byte when + applied to unsigned types of size 2, 4, 16, ... bytes. */ + #define INT_STRLEN_BOUND(t) \ +- (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \ +- - _GL_SIGNED_TYPE_OR_EXPR (t)) \ ++ (INT_BITS_STRLEN_BOUND (TYPE_WIDTH (t) - _GL_SIGNED_TYPE_OR_EXPR (t)) \ + + _GL_SIGNED_TYPE_OR_EXPR (t)) + + /* Bound on buffer size needed to represent an integer type or expression T, +@@ -222,20 +236,23 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); + ? (a) < (min) >> (b) \ + : (max) >> (b) < (a)) + +-/* True if __builtin_add_overflow (A, B, P) works when P is null. */ +-#define _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL (7 <= __GNUC__) ++/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */ ++#define _GL_HAS_BUILTIN_OVERFLOW (5 <= __GNUC__) ++ ++/* True if __builtin_add_overflow_p (A, B, C) works. */ ++#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__) + + /* The _GL*_OVERFLOW macros have the same restrictions as the + *_RANGE_OVERFLOW macros, except that they do not assume that operands + (e.g., A and B) have the same type as MIN and MAX. Instead, they assume + that the result (e.g., A + B) has that type. */ +-#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL +-# define _GL_ADD_OVERFLOW(a, b, min, max) +- __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0) +-# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) +- __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0) +-# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) +- __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0) ++#if _GL_HAS_BUILTIN_OVERFLOW_P ++# define _GL_ADD_OVERFLOW(a, b, min, max) \ ++ __builtin_add_overflow_p (a, b, (__typeof__ ((a) + (b))) 0) ++# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ ++ __builtin_sub_overflow_p (a, b, (__typeof__ ((a) - (b))) 0) ++# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ ++ __builtin_mul_overflow_p (a, b, (__typeof__ ((a) * (b))) 0) + #else + # define _GL_ADD_OVERFLOW(a, b, min, max) \ + ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \ +@@ -315,7 +332,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); + _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW) + #define INT_SUBTRACT_OVERFLOW(a, b) \ + _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW) +-#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL ++#if _GL_HAS_BUILTIN_OVERFLOW_P + # define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a) + #else + # define INT_NEGATE_OVERFLOW(a) \ +@@ -349,10 +366,6 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); + #define INT_MULTIPLY_WRAPV(a, b, r) \ + _GL_INT_OP_WRAPV (a, b, r, *, __builtin_mul_overflow, INT_MULTIPLY_OVERFLOW) + +-#ifndef __has_builtin +-# define __has_builtin(x) 0 +-#endif +- + /* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See: + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193 + https://llvm.org/bugs/show_bug.cgi?id=25390 +@@ -369,7 +382,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); + the operation. BUILTIN is the builtin operation, and OVERFLOW the + overflow predicate. Return 1 if the result overflows. See above + for restrictions. */ +-#if 5 <= __GNUC__ || __has_builtin (__builtin_add_overflow) ++#if _GL_HAS_BUILTIN_OVERFLOW + # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r) + #elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS + # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ +@@ -412,7 +425,7 @@ verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); + # else + # define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \ +- long int, LONG_MIN, LONG_MAX)) ++ long int, LONG_MIN, LONG_MAX) + # endif + #endif + +-- +2.11.0 + + +From e2cb42d99c6dccb4436bdeb8ecfeb2db9de08f18 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de> +Date: Wed, 1 Feb 2017 10:45:29 +0100 +Subject: [PATCH 3/4] Increase value for -Wframe-larger-than (gcc-7) + +(cherry picked from commit a6fcdb4f953e40ea162a9104cac034bce01706af) + +diff --git a/configure.ac b/configure.ac +index 649ddcd5..c802c5df 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -128,7 +128,7 @@ AC_ARG_ENABLE([gcc-warnings], + + if test "$gl_gcc_warnings" = yes; then + gl_WARN_ADD([-Werror], [WERROR_CFLAGS]) +- gl_WARN_ADD([-Wframe-larger-than=112], [WSTACK_CFLAGS]) ++ gl_WARN_ADD([-Wframe-larger-than=160], [WSTACK_CFLAGS]) + + nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings + nw="$nw -Wpadded" # Struct in src/idn_cmd.h is not padded +-- +2.11.0 + + +From 94e4faf96e711d10e04fae12c90c1be20e490391 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de> +Date: Wed, 1 Feb 2017 11:06:39 +0100 +Subject: [PATCH 4/4] Fix -Wformat warnings + +(cherry picked from commit 7148adf34dae30345c2e4d9d437838a45ba6f6e8) + +diff --git a/examples/example.c b/examples/example.c +index 6e917838..24f64e04 100644 +--- a/examples/example.c ++++ b/examples/example.c +@@ -55,7 +55,7 @@ main (void) + + printf ("Before locale2utf8 (length %ld): ", (long int) strlen (buf)); + for (i = 0; i < strlen (buf); i++) +- printf ("%02x ", buf[i] & 0xFF); ++ printf ("%02x ", (unsigned) buf[i] & 0xFF); + printf ("\n"); + + p = stringprep_locale_to_utf8 (buf); +@@ -69,7 +69,7 @@ main (void) + + printf ("Before stringprep (length %ld): ", (long int) strlen (buf)); + for (i = 0; i < strlen (buf); i++) +- printf ("%02x ", buf[i] & 0xFF); ++ printf ("%02x ", (unsigned) buf[i] & 0xFF); + printf ("\n"); + + rc = stringprep (buf, BUFSIZ, 0, stringprep_nameprep); +@@ -79,7 +79,7 @@ main (void) + { + printf ("After stringprep (length %ld): ", (long int) strlen (buf)); + for (i = 0; i < strlen (buf); i++) +- printf ("%02x ", buf[i] & 0xFF); ++ printf ("%02x ", (unsigned) buf[i] & 0xFF); + printf ("\n"); + } + +diff --git a/examples/example3.c b/examples/example3.c +index fc11c1c0..ffb90424 100644 +--- a/examples/example3.c ++++ b/examples/example3.c +@@ -56,7 +56,7 @@ main (void) + + printf ("Read string (length %ld): ", (long int) strlen (buf)); + for (i = 0; i < strlen (buf); i++) +- printf ("%02x ", buf[i] & 0xFF); ++ printf ("%02x ", (unsigned) buf[i] & 0xFF); + printf ("\n"); + + rc = idna_to_ascii_lz (buf, &p, 0); +@@ -68,7 +68,7 @@ main (void) + + printf ("ACE label (length %ld): '%s'\n", (long int) strlen (p), p); + for (i = 0; i < strlen (p); i++) +- printf ("%02x ", p[i] & 0xFF); ++ printf ("%02x ", (unsigned) p[i] & 0xFF); + printf ("\n"); + + free (p); +diff --git a/examples/example4.c b/examples/example4.c +index 1b319c94..a3315a14 100644 +--- a/examples/example4.c ++++ b/examples/example4.c +@@ -56,7 +56,7 @@ main (void) + + printf ("Read string (length %ld): ", (long int) strlen (buf)); + for (i = 0; i < strlen (buf); i++) +- printf ("%02x ", buf[i] & 0xFF); ++ printf ("%02x ", (unsigned) buf[i] & 0xFF); + printf ("\n"); + + rc = idna_to_unicode_lzlz (buf, &p, 0); +@@ -68,7 +68,7 @@ main (void) + + printf ("ACE label (length %ld): '%s'\n", (long int) strlen (p), p); + for (i = 0; i < strlen (p); i++) +- printf ("%02x ", p[i] & 0xFF); ++ printf ("%02x ", (unsigned) p[i] & 0xFF); + printf ("\n"); + + free (p); +diff --git a/examples/example5.c b/examples/example5.c +index df557984..29d40b9d 100644 +--- a/examples/example5.c ++++ b/examples/example5.c +@@ -68,7 +68,7 @@ main (void) + + printf ("Read string (length %ld): ", (long int) strlen (buf)); + for (i = 0; i < strlen (buf); i++) +- printf ("%02x ", buf[i] & 0xFF); ++ printf ("%02x ", (unsigned) buf[i] & 0xFF); + printf ("\n"); + + p = stringprep_locale_to_utf8 (buf); +diff --git a/src/idn.c b/src/idn.c +index be1c7d1b..13eb3c9c 100644 +--- a/src/idn.c ++++ b/src/idn.c +@@ -419,7 +419,7 @@ main (int argc, char *argv[]) + size_t i; + for (i = 0; p[i]; i++) + fprintf (stderr, "output[%lu] = U+%04x\n", +- (unsigned long) i, p[i]); ++ (unsigned long) i, (unsigned) p[i]); + } + + fprintf (stdout, "%s\n", p); +diff --git a/tests/tst_idna.c b/tests/tst_idna.c +index 415764ee..4ac046fd 100644 +--- a/tests/tst_idna.c ++++ b/tests/tst_idna.c +@@ -220,13 +220,14 @@ doit (void) + char label[100]; + uint32_t *ucs4label = NULL; + uint32_t tmp[100]; +- size_t len, len2, i; ++ size_t len, len2; + int rc; ++ unsigned i; + + for (i = 0; i < sizeof (idna) / sizeof (idna[0]); i++) + { + if (debug) +- printf ("IDNA entry %ld: %s\n", i, idna[i].name); ++ printf ("IDNA entry %u: %s\n", i, idna[i].name); + + if (debug) + { +@@ -237,7 +238,7 @@ doit (void) + rc = idna_to_ascii_4i (idna[i].in, idna[i].inlen, label, idna[i].flags); + if (rc != idna[i].toasciirc) + { +- fail ("IDNA entry %ld failed: %d\n", i, rc); ++ fail ("IDNA entry %u failed: %d\n", i, rc); + if (debug) + printf ("FATAL\n"); + continue; +@@ -256,7 +257,7 @@ doit (void) + if (strlen (idna[i].out) != strlen (label) || + strcasecmp (idna[i].out, label) != 0) + { +- fail ("IDNA entry %ld failed\n", i); ++ fail ("IDNA entry %u failed\n", i); + if (debug) + printf ("ERROR\n"); + } +@@ -273,8 +274,8 @@ doit (void) + + if (debug) + { +- printf ("in: %s (%ld==%ld)\n", idna[i].out, strlen (idna[i].out), +- len); ++ printf ("in: %s (%d==%d)\n", idna[i].out, (int) strlen (idna[i].out), ++ (int) len); + ucs4print (ucs4label, len); + } + +@@ -282,20 +283,20 @@ doit (void) + rc = idna_to_unicode_44i (ucs4label, len, tmp, &len2, idna[i].flags); + if (debug) + { +- printf ("expected out (%ld):\n", ++ printf ("expected out (%lu):\n", + rc == IDNA_SUCCESS ? idna[i].inlen : len); + if (rc == IDNA_SUCCESS) + ucs4print (idna[i].in, idna[i].inlen); + else + ucs4print (ucs4label, len); + +- printf ("computed out (%ld):\n", len2); ++ printf ("computed out (%d):\n", (int) len2); + ucs4print (tmp, len2); + } + + if (rc != idna[i].tounicoderc) + { +- fail ("IDNA entry %ld failed: %d\n", i, rc); ++ fail ("IDNA entry %u failed: %d\n", i, rc); + if (debug) + printf ("FATAL\n"); + continue; +@@ -309,11 +310,11 @@ doit (void) + if (debug) + { + if (rc == IDNA_SUCCESS) +- printf ("len=%ld len2=%ld\n", len2, idna[i].inlen); ++ printf ("len=%d len2=%d\n", (int) len2, (int) idna[i].inlen); + else +- printf ("len=%ld len2=%ld\n", len, len2); ++ printf ("len=%d len2=%d\n", (int) len, (int) len2); + } +- fail ("IDNA entry %ld failed\n", i); ++ fail ("IDNA entry %u failed\n", i); + if (debug) + printf ("ERROR\n"); + } +diff --git a/tests/tst_idna2.c b/tests/tst_idna2.c +index 65b3a4d8..38932caa 100644 +--- a/tests/tst_idna2.c ++++ b/tests/tst_idna2.c +@@ -461,14 +461,14 @@ static const struct idna idna[] = { + void + doit (void) + { +- size_t i; ++ unsigned i; + char *out; + int rc; + + for (i = 0; i < sizeof (idna) / sizeof (idna[0]); i++) + { + if (debug) +- printf ("IDNA2 entry %ld\n", i); ++ printf ("IDNA2 entry %u\n", i); + + if (debug) + { +@@ -487,7 +487,7 @@ doit (void) + IDNA_USE_STD3_ASCII_RULES); + if (rc != IDNA_SUCCESS && strlen (idna[i].out) > 0) + { +- fail ("IDNA2 entry %ld failed: %d\n", i, rc); ++ fail ("IDNA2 entry %u failed: %d\n", i, rc); + continue; + } + +@@ -504,7 +504,7 @@ doit (void) + if (strlen (idna[i].out) != strlen (out) || + strcasecmp (idna[i].out, out) != 0) + { +- fail ("IDNA2 entry %ld failed\n", i); ++ fail ("IDNA2 entry %u failed\n", i); + if (debug) + printf ("ERROR\n"); + } +diff --git a/tests/tst_idna3.c b/tests/tst_idna3.c +index a189378f..f65628c1 100644 +--- a/tests/tst_idna3.c ++++ b/tests/tst_idna3.c +@@ -59,13 +59,13 @@ doit (void) + { + int rc; + char *out = NULL; +- size_t i; ++ unsigned i; + + for (i = 0; i < sizeof (idna) / sizeof (idna[0]); i++) + { + rc = idna_to_unicode_8z8z (idna[i].in, &out, 0); + if (rc != IDNA_SUCCESS) +- fail ("IDNA3[%ld] failed %d\n", i, rc); ++ fail ("IDNA3[%u] failed %d\n", i, rc); + + if (debug && rc == IDNA_SUCCESS) + { +@@ -75,9 +75,9 @@ doit (void) + } + + if (strcmp (out, idna[i].out) != 0) +- fail ("IDNA3[%ld] failed\n", i); ++ fail ("IDNA3[%u] failed\n", i); + else if (debug) +- printf ("IDNA3[%ld] success\n", i); ++ printf ("IDNA3[%u] success\n", i); + + if (out) + idn_free (out); +diff --git a/tests/tst_nfkc.c b/tests/tst_nfkc.c +index d150fecf..f5af9c6a 100644 +--- a/tests/tst_nfkc.c ++++ b/tests/tst_nfkc.c +@@ -68,18 +68,18 @@ void + doit (void) + { + char *out; +- size_t i; ++ unsigned i; + + for (i = 0; i < sizeof (nfkc) / sizeof (nfkc[0]); i++) + { + if (debug) +- printf ("NFKC entry %ld\n", i); ++ printf ("NFKC entry %u\n", i); + + out = stringprep_utf8_nfkc_normalize (nfkc[i].in, + (ssize_t) strlen (nfkc[i].in)); + if (out == NULL) + { +- fail ("NFKC entry %ld failed fatally\n", i); ++ fail ("NFKC entry %u failed fatally\n", i); + continue; + } + +@@ -114,7 +114,7 @@ doit (void) + if (strlen (nfkc[i].out) != strlen (out) || + memcmp (nfkc[i].out, out, strlen (out)) != 0) + { +- fail ("NFKC entry %ld failed\n", i); ++ fail ("NFKC entry %u failed\n", i); + if (debug) + printf ("ERROR\n"); + } +diff --git a/tests/tst_pr29.c b/tests/tst_pr29.c +index 3dc5466d..11d0ede1 100644 +--- a/tests/tst_pr29.c ++++ b/tests/tst_pr29.c +@@ -91,7 +91,7 @@ static const struct tv tv[] = { + void + doit (void) + { +- size_t i; ++ unsigned i; + int rc; + + for (i = 0; i < sizeof (tv) / sizeof (tv[0]); i++) +@@ -100,7 +100,7 @@ doit (void) + { + uint32_t *p, *q; + +- printf ("PR29 entry %ld: %s\n", i, tv[i].name); ++ printf ("PR29 entry %u: %s\n", i, tv[i].name); + + printf ("in:\n"); + ucs4print (tv[i].in, tv[i].inlen); +@@ -120,7 +120,7 @@ doit (void) + rc = pr29_4 (tv[i].in, tv[i].inlen); + if (rc != tv[i].rc) + { +- fail ("PR29 entry %ld failed (expected %d): %d\n", i, tv[i].rc, rc); ++ fail ("PR29 entry %u failed (expected %d): %d\n", i, tv[i].rc, rc); + if (debug) + printf ("FATAL\n"); + continue; +@@ -129,7 +129,7 @@ doit (void) + rc = pr29_4z (tv[i].in); + if (rc != tv[i].rc) + { +- fail ("PR29 entry %ld failed (expected %d): %d\n", i, tv[i].rc, rc); ++ fail ("PR29 entry %u failed (expected %d): %d\n", i, tv[i].rc, rc); + if (debug) + printf ("FATAL\n"); + continue; +@@ -142,7 +142,7 @@ doit (void) + p = stringprep_ucs4_to_utf8 (tv[i].in, (ssize_t) tv[i].inlen, + &items_read, &items_written); + if (p == NULL) +- fail ("FAIL: stringprep_ucs4_to_utf8(tv[%ld]) == NULL\n", i); ++ fail ("FAIL: stringprep_ucs4_to_utf8(tv[%u]) == NULL\n", i); + if (debug) + hexprint (p, strlen (p)); + +@@ -150,7 +150,7 @@ doit (void) + free (p); + if (rc != tv[i].rc) + { +- fail ("PR29 entry %ld failed (expected %d): %d\n", ++ fail ("PR29 entry %u failed (expected %d): %d\n", + i, tv[i].rc, rc); + if (debug) + printf ("FATAL\n"); +diff --git a/tests/tst_punycode.c b/tests/tst_punycode.c +index 493b8a21..997744a5 100644 +--- a/tests/tst_punycode.c ++++ b/tests/tst_punycode.c +@@ -173,7 +173,8 @@ doit (void) + char *p; + uint32_t *q; + int rc; +- size_t i, outlen; ++ size_t outlen; ++ unsigned i; + + p = malloc (sizeof (*p) * BUFSIZ); + if (p == NULL) +@@ -186,7 +187,7 @@ doit (void) + for (i = 0; i < sizeof (punycode) / sizeof (punycode[0]); i++) + { + if (debug) +- printf ("PUNYCODE entry %ld: %s\n", i, punycode[i].name); ++ printf ("PUNYCODE entry %u: %s\n", i, punycode[i].name); + + if (debug) + { +@@ -199,7 +200,7 @@ doit (void) + NULL, &outlen, p); + if (rc != punycode[i].rc) + { +- fail ("punycode_encode() entry %ld failed: %d\n", i, rc); ++ fail ("punycode_encode() entry %u failed: %d\n", i, rc); + if (debug) + printf ("FATAL\n"); + continue; +@@ -221,7 +222,7 @@ doit (void) + if (strlen (punycode[i].out) != strlen (p) || + memcmp (punycode[i].out, p, strlen (p)) != 0) + { +- fail ("punycode() entry %ld failed\n", i); ++ fail ("punycode() entry %u failed\n", i); + if (debug) + printf ("ERROR\n"); + } +@@ -241,7 +242,7 @@ doit (void) + &outlen, q, NULL); + if (rc != punycode[i].rc) + { +- fail ("punycode() entry %ld failed: %d\n", i, rc); ++ fail ("punycode() entry %u failed: %d\n", i, rc); + if (debug) + printf ("FATAL\n"); + continue; +@@ -262,7 +263,7 @@ doit (void) + if (punycode[i].inlen != outlen || + memcmp (punycode[i].in, q, outlen) != 0) + { +- fail ("punycode_decode() entry %ld failed\n", i); ++ fail ("punycode_decode() entry %u failed\n", i); + if (debug) + printf ("ERROR\n"); + } +diff --git a/tests/tst_strerror.c b/tests/tst_strerror.c +index 71fff59a..730f5e49 100644 +--- a/tests/tst_strerror.c ++++ b/tests/tst_strerror.c +@@ -110,7 +110,7 @@ doit (void) + /* Iterate through all error codes. */ + + { +- size_t i; ++ unsigned i; + const char *last_p = NULL; + + for (i = 0;; i++) +@@ -126,13 +126,13 @@ doit (void) + break; + } + if (debug) +- printf ("idna %ld: %s\n", i, p); ++ printf ("idna %u: %s\n", i, p); + last_p = p; + } + } + + { +- size_t i; ++ unsigned i; + const char *last_p = NULL; + + for (i = 0;; i++) +@@ -141,13 +141,13 @@ doit (void) + if (p == last_p) + break; + if (debug) +- printf ("pr29 %ld: %s\n", i, p); ++ printf ("pr29 %u: %s\n", i, p); + last_p = p; + } + } + + { +- size_t i; ++ unsigned i; + const char *last_p = NULL; + + for (i = 0;; i++) +@@ -156,13 +156,13 @@ doit (void) + if (p == last_p) + break; + if (debug) +- printf ("punycode %ld: %s\n", i, p); ++ printf ("punycode %u: %s\n", i, p); + last_p = p; + } + } + + { +- size_t i; ++ unsigned i; + const char *last_p = NULL; + + for (i = 0;; i++) +@@ -183,13 +183,13 @@ doit (void) + break; + } + if (debug) +- printf ("stringprep %ld: %s\n", i, p); ++ printf ("stringprep %u: %s\n", i, p); + last_p = p; + } + } + + { +- size_t i; ++ unsigned i; + const char *last_p = NULL; + + for (i = 0;; i++) +@@ -198,7 +198,7 @@ doit (void) + if (p == last_p) + break; + if (debug) +- printf ("tld %ld: %s\n", i, p); ++ printf ("tld %u: %s\n", i, p); + last_p = p; + } + } +diff --git a/tests/tst_stringprep.c b/tests/tst_stringprep.c +index 149ce6f5..7c9ab06e 100644 +--- a/tests/tst_stringprep.c ++++ b/tests/tst_stringprep.c +@@ -205,7 +205,7 @@ doit (void) + { + char *p; + int rc; +- size_t i; ++ unsigned i; + + if (!stringprep_check_version (STRINGPREP_VERSION)) + fail ("stringprep_check_version failed (header %s runtime %s)\n", +@@ -224,7 +224,7 @@ doit (void) + for (i = 0; i < sizeof (strprep) / sizeof (strprep[0]); i++) + { + if (debug) +- printf ("STRINGPREP entry %ld\n", i); ++ printf ("STRINGPREP entry %u\n", i); + + if (debug) + { +@@ -247,12 +247,12 @@ doit (void) + continue; + else if (l == NULL) + { +- fail ("bad UTF-8 in entry %ld\n", i); ++ fail ("bad UTF-8 in entry %u\n", i); + continue; + } + else if (strcmp (strprep[i].in, x) != 0) + { +- fail ("bad UTF-8 in entry %ld\n", i); ++ fail ("bad UTF-8 in entry %u\n", i); + if (debug) + { + puts ("expected:"); +@@ -274,7 +274,7 @@ doit (void) + "Nameprep", strprep[i].flags); + if (rc != strprep[i].rc) + { +- fail ("stringprep() entry %ld failed: %d\n", i, rc); ++ fail ("stringprep() entry %u failed: %d\n", i, rc); + if (debug) + printf ("FATAL\n"); + if (rc == STRINGPREP_OK) +@@ -302,7 +302,7 @@ doit (void) + if (strlen (strprep[i].out) != strlen (p) || + memcmp (strprep[i].out, p, strlen (p)) != 0) + { +- fail ("stringprep() entry %ld failed\n", i); ++ fail ("stringprep() entry %ld failed\n", (long) i); + if (debug) + printf ("ERROR\n"); + } +diff --git a/tests/tst_tld.c b/tests/tst_tld.c +index 2f8e12e8..d038c790 100644 +--- a/tests/tst_tld.c ++++ b/tests/tst_tld.c +@@ -80,7 +80,7 @@ const Tld_table * my_tld_tables[] = + void + doit (void) + { +- size_t i; ++ unsigned i; + const Tld_table *tldtable; + char *out; + size_t errpos; +@@ -206,7 +206,7 @@ doit (void) + for (i = 0; i < sizeof (tld) / sizeof (tld[0]); i++) + { + if (debug) +- printf ("TLD entry %ld: %s\n", i, tld[i].name); ++ printf ("TLD entry %u: %s\n", i, tld[i].name); + + if (debug) + { +@@ -217,7 +217,7 @@ doit (void) + tldtable = tld_default_table (tld[i].tld, NULL); + if (tldtable == NULL) + { +- fail ("TLD entry %ld tld_get_table (%s)\n", i, tld[i].tld); ++ fail ("TLD entry %u tld_get_table (%s)\n", i, tld[i].tld); + if (debug) + printf ("FATAL\n"); + continue; +@@ -226,7 +226,7 @@ doit (void) + rc = tld_check_4t (tld[i].in, tld[i].inlen, &errpos, tldtable); + if (rc != tld[i].rc) + { +- fail ("TLD entry %ld failed: %d\n", i, rc); ++ fail ("TLD entry %u failed: %d\n", i, rc); + if (debug) + printf ("FATAL\n"); + continue; +@@ -237,7 +237,7 @@ doit (void) + + if (rc != tld[i].rc) + { +- fail ("TLD entry %ld failed\n", i); ++ fail ("TLD entry %u failed\n", i); + if (debug) + printf ("ERROR\n"); + } +@@ -245,12 +245,12 @@ doit (void) + { + if (debug) + printf ("returned errpos %ld expected errpos %ld\n", +- errpos, tld[i].errpos); ++ (long) errpos, (long) tld[i].errpos); + + if (tld[i].errpos != errpos) + { +- fail ("TLD entry %ld failed because errpos %ld != %ld\n", i, +- tld[i].errpos, errpos); ++ fail ("TLD entry %u failed because errpos %ld != %ld\n", i, ++ (long) tld[i].errpos, (long) errpos); + if (debug) + printf ("ERROR\n"); + } +@@ -262,12 +262,12 @@ doit (void) + rc = tld_check_8z (tld[i].example, &errpos, NULL); + if (rc != tld[i].rc) + { +- fail ("TLD entry %ld failed\n", i); ++ fail ("TLD entry %u failed\n", i); + if (debug) + printf ("ERROR\n"); + } + if (debug) +- printf ("TLD entry %ld tld_check_8z (%s)\n", i, tld[i].example); ++ printf ("TLD entry %u tld_check_8z (%s)\n", i, tld[i].example); + } + } + } +diff --git a/tests/utils.c b/tests/utils.c +index 717ee012..5577dc32 100644 +--- a/tests/utils.c ++++ b/tests/utils.c +@@ -49,7 +49,7 @@ escapeprint (const char *str, size_t len) + { + size_t i; + +- printf (" (length %ld bytes):\n\t", len); ++ printf (" (length %ld bytes):\n\t", (long) len); + for (i = 0; i < len; i++) + { + if (((str[i] & 0xFF) >= 'A' && (str[i] & 0xFF) <= 'Z') || +@@ -58,7 +58,7 @@ escapeprint (const char *str, size_t len) + || (str[i] & 0xFF) == ' ' || (str[i] & 0xFF) == '.') + printf ("%c", (str[i] & 0xFF)); + else +- printf ("\\x%02X", (str[i] & 0xFF)); ++ printf ("\\x%02X", (unsigned) (str[i] & 0xFF)); + if ((i + 1) % 16 == 0 && (i + 1) < len) + printf ("'\n\t'"); + } +@@ -73,7 +73,7 @@ hexprint (const char *str, size_t len) + printf ("\t;; "); + for (i = 0; i < len; i++) + { +- printf ("%02x ", (str[i] & 0xFF)); ++ printf ("%02x ", (unsigned) (str[i] & 0xFF)); + if ((i + 1) % 8 == 0) + printf (" "); + if ((i + 1) % 16 == 0 && i + 1 < len) +-- +2.11.0 diff --git a/src/libidn-test.c b/src/libidn-test.c index 7831a9b6..77661b23 100644 --- a/src/libidn-test.c +++ b/src/libidn-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdlib.h> diff --git a/src/libidn.mk b/src/libidn.mk index b176cc5f..61411d35 100644 --- a/src/libidn.mk +++ b/src/libidn.mk @@ -1,24 +1,28 @@ -# 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 := libidn +$(PKG)_WEBSITE := https://www.gnu.org/software/libidn/ +$(PKG)_DESCR := Libidn $(PKG)_IGNORE := -$(PKG)_VERSION := 1.32 -$(PKG)_CHECKSUM := ba5d5afee2beff703a34ee094668da5c6ea5afa38784cebba8924105e185c4f5 +$(PKG)_VERSION := 1.33 +$(PKG)_CHECKSUM := 44a7aab635bb721ceef6beecc4d49dfd19478325e1b47f3196f7d2acc4930e19 $(PKG)_SUBDIR := libidn-$($(PKG)_VERSION) $(PKG)_FILE := libidn-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://ftp.gnu.org/gnu/libidn/$($(PKG)_FILE) -$(PKG)_URL_2 := ftp://ftp.gnu.org/gnu/libidn/$($(PKG)_FILE) +$(PKG)_URL := https://ftp.gnu.org/gnu/libidn/$($(PKG)_FILE) +$(PKG)_URL_2 := https://ftpmirror.gnu.org/libidn/$($(PKG)_FILE) $(PKG)_DEPS := gcc gettext libiconv define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.savannah.gnu.org/gitweb/?p=libidn.git;a=tags' | \ + $(WGET) -q -O- 'https://git.savannah.gnu.org/gitweb/?p=libidn.git;a=tags' | \ grep '<a class="list subject"' | \ $(SED) -n 's,.*<a[^>]*>\([0-9][^<]*\)<.*,\1,p' | \ head -1 endef define $(PKG)_BUILD + cd '$(1)' && rm aclocal.m4 && autoreconf -fi + # don't build and install docs + (echo '# DISABLED'; echo 'all:'; echo 'install:') > '$(1)/doc/Makefile.in' cd '$(1)' && ./configure \ $(MXE_CONFIGURE_OPTS) \ --disable-csharp \ @@ -27,6 +31,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libidn.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libidn.exe' \ `'$(TARGET)-pkg-config' libidn --cflags --libs` endef diff --git a/src/libidn2-1-fixes.patch b/src/libidn2-1-fixes.patch new file mode 100644 index 00000000..74dec675 --- /dev/null +++ b/src/libidn2-1-fixes.patch @@ -0,0 +1,87 @@ +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, 5 Mar 2017 03:01:18 +0100 +Subject: [PATCH] disable gentr46map.exe + +This tool was used to regenerate tr46map_data.c. +The release has recent version of this file anyway. + +diff --git a/Makefile.in b/Makefile.in +index 1111111..2222222 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -94,7 +94,6 @@ PRE_UNINSTALL = : + POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ +-noinst_PROGRAMS = gentr46map$(EXEEXT) + @HAVE_LD_VERSION_SCRIPT_TRUE@am__append_1 = -Wl,--version-script=$(srcdir)/idn2.map + @HAVE_LD_VERSION_SCRIPT_FALSE@am__append_2 = -export-symbols-regex '^idn2_.*|_idn2_punycode_..code' + subdir = . +@@ -198,9 +197,6 @@ libidn2_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libidn2_la_LDFLAGS) $(LDFLAGS) -o $@ + PROGRAMS = $(noinst_PROGRAMS) +-gentr46map_SOURCES = gentr46map.c +-gentr46map_OBJECTS = gentr46map.$(OBJEXT) +-gentr46map_DEPENDENCIES = $(am__DEPENDENCIES_1) + AM_V_P = $(am__v_P_@AM_V@) + am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) + am__v_P_0 = false +@@ -235,8 +231,8 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) + am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) + am__v_CCLD_0 = @echo " CCLD " $@; + am__v_CCLD_1 = +-SOURCES = $(libidn2_la_SOURCES) gentr46map.c +-DIST_SOURCES = $(libidn2_la_SOURCES) gentr46map.c ++SOURCES = $(libidn2_la_SOURCES) ++DIST_SOURCES = $(libidn2_la_SOURCES) + RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ +@@ -635,10 +631,9 @@ TR46MAP = IdnaMappingTable.txt + TR46MAP_URL = http://www.unicode.org/Public/idna/6.3.0/IdnaMappingTable.txt + NFCQC = DerivedNormalizationProps.txt + NFCQC_URL = http://www.unicode.org/Public/6.3.0/ucd/DerivedNormalizationProps.txt +-BUILT_SOURCES = data.c tr46map_data.c ++BUILT_SOURCES = data.c + DISTCLEANFILES = tr46map_data.c + MAINTAINERCLEANFILES = $(IDNA_TABLE) $(TR46MAP) $(NFCQC) +-gentr46map_LDADD = $(LTLIBUNISTRING) + LCOV_INFO = libidn2.info + all: $(BUILT_SOURCES) config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive +@@ -744,10 +739,6 @@ clean-noinstPROGRAMS: + echo " rm -f" $$list; \ + rm -f $$list + +-gentr46map$(EXEEXT): $(gentr46map_OBJECTS) $(gentr46map_DEPENDENCIES) $(EXTRA_gentr46map_DEPENDENCIES) +- @rm -f gentr46map$(EXEEXT) +- $(AM_V_CCLD)$(LINK) $(gentr46map_OBJECTS) $(gentr46map_LDADD) $(LIBS) +- + mostlyclean-compile: + -rm -f *.$(OBJEXT) + +@@ -759,7 +750,6 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/free.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gentr46map.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idna.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lookup.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/punycode.Plo@am__quote@ +@@ -1261,10 +1251,6 @@ data.c: $(srcdir)/gen-tables-from-iana.pl $(IDNA_TABLE) + cat $(IDNA_TABLE) | $(srcdir)/gen-tables-from-iana.pl > $@.new + mv $@.new $@ + +-tr46map_data.c: gentr46map.c gentr46map$(EXEEXT) $(TR46MAP) $(NFCQC) +- $(builddir)/gentr46map$(EXEEXT) > $@.new +- mv $@.new $@ +- + $(IDNA_TABLE): + if ! echo "4ebaf0c72061474d20078897d254768d894507de $(IDNA_TABLE)" | sha1sum -c -; then \ + rm -f $(IDNA_TABLE); \ diff --git a/src/libidn2-test.c b/src/libidn2-test.c new file mode 100644 index 00000000..65cd0995 --- /dev/null +++ b/src/libidn2-test.c @@ -0,0 +1,44 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + * + * Based on https://www.gnu.org/software/libidn/libidn2/manual/libidn2.html#Lookup + */ + +#include <stdio.h> /* printf, fflush, fgets, stdin, perror, fprintf */ +#include <string.h> /* strlen */ +#include <locale.h> /* setlocale */ +#include <stdlib.h> /* free */ +#include <idn2.h> /* idn2_lookup_ul, IDN2_OK, idn2_strerror, idn2_strerror_name */ + +int +main () +{ + int rc; + char src[BUFSIZ]; + char *lookupname; + + setlocale (LC_ALL, ""); + + printf ("Enter (possibly non-ASCII) domain name to lookup: "); + fflush (stdout); + if (!fgets (src, sizeof (src), stdin)) + { + perror ("fgets"); + return 1; + } + src[strlen (src) - 1] = '\0'; + + rc = idn2_lookup_ul (src, &lookupname, 0); + if (rc != IDN2_OK) + { + fprintf (stderr, "error: %s (%s, %d)\n", + idn2_strerror (rc), idn2_strerror_name (rc), rc); + return 1; + } + + printf ("IDNA2008 domain name to lookup in DNS: %s\n", lookupname); + + free (lookupname); + + return 0; +} diff --git a/src/libidn2.mk b/src/libidn2.mk new file mode 100644 index 00000000..4b57a92e --- /dev/null +++ b/src/libidn2.mk @@ -0,0 +1,42 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := libidn2 +$(PKG)_WEBSITE := https://www.gnu.org/software/libidn/\#libidn2 +$(PKG)_DESCR := implementation of IDNA2008/TR46 internationalized domain names +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.16 +$(PKG)_CHECKSUM := 2fad9efff4082ae2143f69df76339ca99379e0e0f4231455f5d3d9d2089c688f +$(PKG)_SUBDIR := libidn2-$($(PKG)_VERSION) +$(PKG)_FILE := libidn2-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://alpha.gnu.org/gnu/libidn/$($(PKG)_FILE) +$(PKG)_DEPS := gcc libiconv libunistring + +define $(PKG)_UPDATE + $(WGET) -q -O- https://alpha.gnu.org/gnu/libidn/ | \ + $(SED) -n 's,.*libidn2-\([0-9][^t]*\).tar.gz.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + # build and install the library + cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \ + $(MXE_CONFIGURE_OPTS) + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_CRUFT) + $(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_CRUFT) + + # create pkg-config files + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' + (echo 'Name: $(PKG)'; \ + echo 'Version: $($(PKG)_VERSION)'; \ + echo 'Description: implementation of IDNA2008/TR46 internationalized domain names'; \ + echo 'Libs: -lidn2'; \ + echo 'Libs.private: -lunistring -liconv -lcharset';) \ + > '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc' + # TODO create pc files for iconv and unistring. + + # compile test + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' $(PKG) --cflags --libs` +endef diff --git a/src/libieee1284-1-fixes.patch b/src/libieee1284-1-fixes.patch new file mode 100644 index 00000000..626ebd8c --- /dev/null +++ b/src/libieee1284-1-fixes.patch @@ -0,0 +1,264 @@ +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: =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= <daniel-gl@gmx.net> +Date: Sun, 3 Jan 2016 05:48:59 +0100 +Subject: [PATCH] make configure determine if basetsd.h is needed for ssize_t + +The result is hardcoded in ieee1284.h. +Duplicate logic in detect.h is replaced by including that file. + +diff --git a/configure.in b/configure.in +index 1111111..2222222 100644 +--- a/configure.in ++++ b/configure.in +@@ -72,7 +72,17 @@ if test $ac_cv_use_python = yes; then + AM_PATH_PYTHON + fi + ++AC_CHECK_TYPE([ssize_t],,,[#include <sys/types.h>]) ++if test $ac_cv_type_ssize_t != yes; then ++ AC_CHECK_TYPE([SSIZE_T], ++ AC_SUBST([SSIZE_T_IN_BASETSD_H], 1), ++ AC_MSG_ERROR([No definition of ssize_t found.]), ++ [#include <basetsd.h>]) ++else ++ AC_SUBST([SSIZE_T_IN_BASETSD_H], 0) ++fi ++ + dnl Checks for library functions. + +-AC_CONFIG_FILES(Makefile libieee1284.spec) ++AC_CONFIG_FILES([Makefile libieee1284.spec include/ieee1284.h]) + AC_OUTPUT +diff --git a/include/ieee1284.h b/include/ieee1284.h.in +similarity index 99% +rename from include/ieee1284.h +rename to include/ieee1284.h.in +index 1111111..2222222 100644 +--- a/include/ieee1284.h ++++ b/include/ieee1284.h.in +@@ -27,7 +27,7 @@ + #include <winsock2.h> /* for struct timeval */ + #endif + +-#if (defined __MINGW32__ || defined _MSC_VER) && !defined OWN_SSIZE_T ++#if @SSIZE_T_IN_BASETSD_H@ && !defined OWN_SSIZE_T + #include <basetsd.h> /* for SSIZE_T */ + #define OWN_SSIZE_T + typedef SSIZE_T ssize_t; +diff --git a/src/detect.h b/src/detect.h +index 1111111..2222222 100644 +--- a/src/detect.h ++++ b/src/detect.h +@@ -24,18 +24,7 @@ + #ifndef _DETECT_H_ + #define _DETECT_H_ + +-#include <stdlib.h> +-#ifndef _MSC_VER +-#include <sys/time.h> +-#else +-#include <winsock2.h> +-#endif +- +-#if (defined __MINGW32__ || defined _MSC_VER) && !defined OWN_SSIZE_T +-#include <basetsd.h> /* for SSIZE_T */ +-#define OWN_SSIZE_T +-typedef SSIZE_T ssize_t; +-#endif ++#include "ieee1284.h" + + struct parport; + struct parport_internal; + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= <daniel-gl@gmx.net> +Date: Sun, 20 Sep 2015 19:14:18 +0200 +Subject: [PATCH] persuade libtool build a DLL on windows + + +diff --git a/Makefile.am b/Makefile.am +index 1111111..2222222 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -8,7 +8,7 @@ libieee1284_la_SOURCES = src/detect.c src/detect.h src/ports.c src/deviceid.c \ + src/par_nt.h src/io.h src/conf.h src/conf.c libieee1284.sym + # When rolling a release, remember to adjust the version info. + # It's current:release:age. +-libieee1284_la_LDFLAGS = -version-info 5:2:2 \ ++libieee1284_la_LDFLAGS = -version-info 5:2:2 -no-undefined \ + -export-symbols $(top_srcdir)/libieee1284.sym + include_HEADERS = include/ieee1284.h + INCLUDES = -I$(top_srcdir)/include + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= <daniel-gl@gmx.net> +Date: Sun, 20 Sep 2015 19:15:15 +0200 +Subject: [PATCH] search for windows.h + +instead of relying on the __CYGWIN__ macro + +diff --git a/configure.in b/configure.in +index 1111111..2222222 100644 +--- a/configure.in ++++ b/configure.in +@@ -37,21 +37,16 @@ case "{$host}" in + AC_DEFINE(HAVE_SOLARIS,1,enable solaris iop access) + solaris_io=true + ;; +-*-*-cygwin*) +- dnl Strip version number from uname and make sure we're on NT not 9x +- case `uname -s | sed 's/-.*$//'` in +- CYGWIN_NT*) +- AC_CHECK_HEADER(w32api/windows.h, [ +- AC_DEFINE(HAVE_CYGWIN_NT,1,enable w32api access) +- ], AC_MSG_ERROR(You need the cygwin w32api files on NT)) +- ;; +- *) +- AC_DEFINE(HAVE_CYGWIN_9X,1,enable win95 access) +- ;; +- esac +-;; +-*-*-mingw*) +-dnl AC_DEFINE(HAVE_CYGWIN_9X,1,enable win95 access) ++*-*-cygwin* | *-*-mingw*) ++ windows_h_found=false ++ AC_CHECK_HEADERS([windows.h] [w32api/windows.h], [ ++ windows_h_found=true ++ break ++ ]) ++ AS_VAR_IF(windows_h_found, [false], [ ++ AC_MSG_ERROR(windows.h not found) ++ ]) ++ AC_DEFINE(HAVE_CYGWIN_9X,1,enable win95 access) + AC_DEFINE(HAVE_CYGWIN_NT,1,enable w32api access) + ;; + *) +diff --git a/src/access_lpt.c b/src/access_lpt.c +index 1111111..2222222 100644 +--- a/src/access_lpt.c ++++ b/src/access_lpt.c +@@ -51,7 +51,7 @@ + + #ifdef HAVE_CYGWIN_NT + +-#ifdef __CYGWIN__ ++#ifdef HAVE_W32API_WINDOWS_H + #include <w32api/windows.h> + #else + #include <windows.h> +diff --git a/src/detect.c b/src/detect.c +index 1111111..2222222 100644 +--- a/src/detect.c ++++ b/src/detect.c +@@ -50,7 +50,7 @@ + #include <sys/ddi.h> + #include <sys/sunddi.h> + #elif defined(HAVE_CYGWIN_NT) +-#ifdef __CYGWIN__ ++#ifdef HAVE_W32API_WINDOWS_H + #include <w32api/windows.h> + #else + #include <windows.h> +diff --git a/src/ports.c b/src/ports.c +index 1111111..2222222 100644 +--- a/src/ports.c ++++ b/src/ports.c +@@ -36,7 +36,7 @@ + #include "detect.h" + + #ifdef HAVE_CYGWIN_NT +-#ifdef __CYGWIN__ ++#ifdef HAVE_W32API_WINDOWS_H + #include <w32api/windows.h> + #else /* Not cygwin really */ + /* Don't include windows.h if it isn't necessary. That's why this is here and + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= <daniel-gl@gmx.net> +Date: Sat, 19 Sep 2015 01:39:15 +0200 +Subject: [PATCH] check Windows version before allowing IO access + + +diff --git a/src/detect.c b/src/detect.c +index 1111111..2222222 100644 +--- a/src/detect.c ++++ b/src/detect.c +@@ -49,7 +49,7 @@ + #elif defined(HAVE_SOLARIS) + #include <sys/ddi.h> + #include <sys/sunddi.h> +-#elif defined(HAVE_CYGWIN_NT) ++#elif defined(HAVE_CYGWIN_NT) || defined(HAVE_CYGWIN_9X) + #ifdef HAVE_W32API_WINDOWS_H + #include <w32api/windows.h> + #else +@@ -191,10 +191,12 @@ check_io (void) + } + debugprintf ("We can't use IOP, nothing will work\n"); + #elif defined(HAVE_CYGWIN_9X) +- /* note: 95 allows apps direct IO access */ +- debugprintf ("Taking a guess on port availability (win9x)\n"); +- capabilities |= IO_CAPABLE; +- return 1; ++ /* note: Win32s/95/98/ME allows apps direct IO access */ ++ if (GetVersion() & (1 << 31)) { ++ debugprintf ("Taking a guess on port availability (win9x)\n"); ++ capabilities |= IO_CAPABLE; ++ return 1; ++ } + #endif + + return 0; + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= <daniel-gl@gmx.net> +Date: Mon, 4 Jan 2016 00:49:41 +0100 +Subject: [PATCH] add pkg-config metadata file + + +diff --git a/Makefile.am b/Makefile.am +index 1111111..2222222 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -30,6 +30,9 @@ bin_PROGRAMS = libieee1284_test + libieee1284_test_SOURCES = tests/test.c + libieee1284_test_LDADD = libieee1284.la + ++pkgconfigdir = $(libdir)/pkgconfig ++pkgconfig_DATA = libieee1284.pc ++ + # Python bindings + src_ieee1284module_la_SOURCES = src/ieee1284module.c + if PYTHON +diff --git a/configure.in b/configure.in +index 1111111..2222222 100644 +--- a/configure.in ++++ b/configure.in +@@ -79,5 +79,5 @@ fi + + dnl Checks for library functions. + +-AC_CONFIG_FILES([Makefile libieee1284.spec include/ieee1284.h]) ++AC_CONFIG_FILES([Makefile libieee1284.spec libieee1284.pc include/ieee1284.h]) + AC_OUTPUT +diff --git a/libieee1284.pc.in b/libieee1284.pc.in +new file mode 100644 +index 1111111..2222222 +--- /dev/null ++++ b/libieee1284.pc.in +@@ -0,0 +1,11 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: @PACKAGE@ ++Version: @VERSION@ ++Description: IEEE1284 parallel port library ++URL: http://cyberelk.net/tim/software/libieee1284/ ++Libs: -L${libdir} -lieee1284 ++Cflags: -I${includedir} diff --git a/src/libieee1284.mk b/src/libieee1284.mk new file mode 100644 index 00000000..b52f1635 --- /dev/null +++ b/src/libieee1284.mk @@ -0,0 +1,26 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := libieee1284 +$(PKG)_WEBSITE := http://cyberelk.net/tim/software/libieee1284/ +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.2.11 +$(PKG)_CHECKSUM := 7730de107782e5d2b071bdcb5b06a44da74856f00ef4a9be85d1ba4806a38f1a +$(PKG)_SUBDIR := libieee1284-$($(PKG)_VERSION) +$(PKG)_FILE := libieee1284-$($(PKG)_VERSION).tar.bz2 +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc + +define $(PKG)_UPDATE + $(WGET) -q -O - https://sourceforge.net/projects/libieee1284/files/ | \ + tr '\n' ' ' | \ + $(SED) 's/.*Looking for the latest version//;s/\(libieee1284-[0-9.]\+\)\.[^0-9].*/\1/;s/.*-//' +endef + +define $(PKG)_BUILD + cd '$(1)' && autoreconf -fi + cd '$(1)' && ./configure \ + $(MXE_CONFIGURE_OPTS) \ + --without-python + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install $(MXE_DISABLE_DOCS) +endef diff --git a/src/libircclient-1-fixes.patch b/src/libircclient-1-fixes.patch index b22e4280..f22302ee 100644 --- a/src/libircclient-1-fixes.patch +++ b/src/libircclient-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/libircclient-test.cpp b/src/libircclient-test.cpp index 9d8141c5..ff457288 100644 --- a/src/libircclient-test.cpp +++ b/src/libircclient-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <libircclient/libircclient.h> diff --git a/src/libircclient.mk b/src/libircclient.mk index 98bcb31d..038ea1cb 100644 --- a/src/libircclient.mk +++ b/src/libircclient.mk @@ -1,19 +1,19 @@ -# This file is part of MXE. -# See index.html for further information. +# This file is part of MXE. See LICENSE.md for licensing information. # Note that IPv6 support is partly broken and therefore disabled. PKG := libircclient +$(PKG)_WEBSITE := https://sourceforge.net/projects/libircclient/ $(PKG)_IGNORE := $(PKG)_VERSION := 1.8 $(PKG)_CHECKSUM := 2cf8523ac683588f2785b08159a2df3e4d15939ee655c0024aa86334149de8f6 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/libircclient/files/libircclient/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/libircclient/files/libircclient/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef @@ -37,7 +37,7 @@ define $(PKG)_BUILD '$(TARGET)-g++' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-libircclient.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libircclient.exe' \ -lircclient -lws2_32 endef diff --git a/src/libjpeg-turbo-1-fixes.patch b/src/libjpeg-turbo-1-fixes.patch index 69d97063..ff448f21 100644 --- a/src/libjpeg-turbo-1-fixes.patch +++ b/src/libjpeg-turbo-1-fixes.patch @@ -1,96 +1,31 @@ -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. Contains ad hoc patches for cross building. -From aba5b24329e9f7209e47d400648e01a1de516e5e Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: MXE Date: Sun, 6 Sep 2015 23:16:12 +1000 -Subject: [PATCH 1/3] fix typedef conflicts +Subject: [PATCH] fix typedef conflicts taken from: https://aur.archlinux.org/cgit/aur.git/tree/0001-header-compat.mingw.patch?h=mingw-w64-libjpeg-turbo + diff --git a/jmorecfg.h b/jmorecfg.h -index 108e7de..ea74b4f 100644 +index 1111111..2222222 100644 --- a/jmorecfg.h +++ b/jmorecfg.h -@@ -12,6 +12,12 @@ +@@ -14,7 +14,13 @@ * optimizations. Most users will not need to touch this file. */ +/* prevents conflicts */ +#if defined(__MINGW32__) +#include <shlwapi.h> /* typedefs INT16 and INT32 */ -+ + +#define HAVE_BOOLEAN +#endif - ++ /* * Maximum number of components (color channels) allowed in JPEG image. -@@ -112,6 +118,7 @@ typedef char JOCTET; - #endif /* HAVE_UNSIGNED_CHAR */ - - -+#ifndef _BASETSD_H_ /* basestd.h from mingw-w64 defines UINT8, UINT16, INT16, INT32 */ - /* These typedefs are used for various table entries and so forth. - * They must be at least as wide as specified; but making them too big - * won't cost a huge amount of memory, so we don't provide special -@@ -150,6 +157,7 @@ typedef short INT16; - #ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ - typedef long INT32; - #endif -+#endif - - /* Datatype used for image dimensions. The JPEG standard only supports - * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore --- -2.3.2 (Apple Git-55) - - -From 49614a87a8a028fd7ce93edbbe8b5b79b9c97213 Mon Sep 17 00:00:00 2001 -From: MXE -Date: Sun, 6 Sep 2015 23:17:23 +1000 -Subject: [PATCH 2/3] include stdio.h - -taken from: -https://aur.archlinux.org/cgit/aur.git/tree/libjpeg-turbo-1.3.1-libmng-compatibility.patch?h=mingw-w64-libjpeg-turbo - -diff --git a/jpeglib.h b/jpeglib.h -index 9615c5d..f5fffe5 100644 ---- a/jpeglib.h -+++ b/jpeglib.h -@@ -28,6 +28,7 @@ - #endif - #include "jmorecfg.h" /* seldom changed options */ - -+#include <stdio.h> - - #ifdef __cplusplus - #ifndef DONT_USE_EXTERN_C --- -2.3.2 (Apple Git-55) - - -From e7a2f20d69b45f76834aeb71ff08c3f4b487f944 Mon Sep 17 00:00:00 2001 -From: MXE -Date: Mon, 21 Sep 2015 20:34:03 +1000 -Subject: [PATCH 3/3] install dll to bin - - -diff --git a/ltmain.sh b/ltmain.sh -index a968835..f9cf33d 100644 ---- a/ltmain.sh -+++ b/ltmain.sh -@@ -5229,7 +5229,7 @@ fi\ - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in -- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; -+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../../bin/$dlname ;; - esac - $echo > $output "\ - # $outputname - a libtool library file --- -2.3.2 (Apple Git-55) - + * To meet the letter of the JPEG spec, set this to 255. However, darn diff --git a/src/libjpeg-turbo.mk b/src/libjpeg-turbo.mk index c4157d97..c473365a 100644 --- a/src/libjpeg-turbo.mk +++ b/src/libjpeg-turbo.mk @@ -1,17 +1,17 @@ -# 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 := libjpeg-turbo +$(PKG)_WEBSITE := http://libjpeg-turbo.virtualgl.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 1.4.1 -$(PKG)_CHECKSUM := 4bf5bad4ce85625bffbbd9912211e06790e00fb982b77724af7211034efafb08 +$(PKG)_VERSION := 1.5.1 +$(PKG)_CHECKSUM := 41429d3d253017433f66e3d472b8c7d998491d2f41caa7306b8d9a6f2a2c666c $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc yasm define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/$(PKG)/files/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/$(PKG)/files/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef @@ -22,7 +22,8 @@ define $(PKG)_BUILD --libdir='$(PREFIX)/$(TARGET)/lib/$(PKG)' \ --includedir='$(PREFIX)/$(TARGET)/include/$(PKG)' \ NASM=$(TARGET)-yasm - $(MAKE) -C '$(1)' -j '$(JOBS)' install $(MXE_DISABLE_CRUFT) + $(MAKE) -C '$(1)' -j '$(JOBS)' || $(MAKE) -C '$(1)' -j 1 + $(MAKE) -C '$(1)' -j 1 install $(MXE_DISABLE_CRUFT) # create pkg-config file $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' diff --git a/src/liblastfm-1-fixes.patch b/src/liblastfm-1-fixes.patch new file mode 100644 index 00000000..d625d01c --- /dev/null +++ b/src/liblastfm-1-fixes.patch @@ -0,0 +1,30 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +Contains ad hoc patches for cross building. + +From 480e2ec663ef867e7892dbbc624737cae176c717 Mon Sep 17 00:00:00 2001 +From: Dominik Schmidt <dev@dominik-schmidt.de> +Date: Fri, 6 Feb 2015 01:55:40 +0100 +Subject: [PATCH] Add LASTFM_LIB_VERSION_SUFFIX to include dir as well + https://github.com/lastfm/liblastfm/commit/480e2ec663ef867e7892dbbc624737cae176c717 + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 211ca7e..0f872fb 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -105,4 +105,4 @@ install(TARGETS ${LASTFM_LIB_TARGET_NAME} + + file(GLOB liblastfm_HEADERS ${CMAKE_CURRENT_LIST_DIR}/*.h) + list(APPEND liblastfm_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/global.h) +-install(FILES ${liblastfm_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lastfm/) ++install(FILES ${liblastfm_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lastfm${LASTFM_LIB_VERSION_SUFFIX}/) +diff --git a/src/fingerprint/CMakeLists.txt b/src/fingerprint/CMakeLists.txt +index fbc492c..126f8d9 100644 +--- a/src/fingerprint/CMakeLists.txt ++++ b/src/fingerprint/CMakeLists.txt +@@ -48,4 +48,4 @@ install(TARGETS ${FINGERPRINT_LIB_TARGET_NAME} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + +-install(FILES ${lastfm_fingerprint_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lastfm/) ++install(FILES ${lastfm_fingerprint_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lastfm${LASTFM_LIB_VERSION_SUFFIX}/) diff --git a/src/liblastfm-test.cpp b/src/liblastfm-test.cpp new file mode 100644 index 00000000..f18df1c0 --- /dev/null +++ b/src/liblastfm-test.cpp @@ -0,0 +1,13 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include <lastfm5/Track.h> + +int main() +{ + lastfm::MutableTrack track; + track.setTitle("Track"); + + return 0; +} diff --git a/src/liblastfm.mk b/src/liblastfm.mk new file mode 100644 index 00000000..1d1f0658 --- /dev/null +++ b/src/liblastfm.mk @@ -0,0 +1,46 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := liblastfm +$(PKG)_WEBSITE := https://github.com/lastfm/liblastfm +$(PKG)_DESCR := A Qt C++ library for the Last.fm webservices +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.0.9 +$(PKG)_CHECKSUM := 5276b5fe00932479ce6fe370ba3213f3ab842d70a7d55e4bead6e26738425f7b +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://github.com/lastfm/$(PKG)/archive/$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := gcc fftw libsamplerate qtbase + +define $(PKG)_UPDATE + $(call MXE_GET_GITHUB_TAGS, lastfm/liblastfm) +endef + +define $(PKG)_BUILD + cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \ + -DBUILD_WITH_QT4=OFF + + $(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) + $(MAKE) -C '$(BUILD_DIR)' -j 1 install + + # create pkg-config file + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' + (echo 'prefix=$(PREFIX)/$(TARGET)'; \ + echo 'exec_prefix=$${prefix}'; \ + echo 'libdir=$${exec_prefix}/lib'; \ + echo 'includedir=$${prefix}/include'; \ + echo ''; \ + echo 'Name: $(PKG)'; \ + echo 'Version: $($(PKG)_VERSION)'; \ + echo 'Description: A Qt C++ library for the Last.fm webservices'; \ + echo 'Requires: Qt5Core Qt5Network Qt5Xml'; \ + echo 'Libs: -L$${libdir} -llastfm5'; \ + echo 'Cflags: -I$${includedir}';) \ + > '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG)5.pc' + + $(TARGET)-g++ \ + -W -Wall -Werror -std=c++11 -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `$(TARGET)-pkg-config $(PKG)5 --cflags --libs` +endef + +$(PKG)_BUILD_STATIC = diff --git a/src/liblastfm_qt4-test.cpp b/src/liblastfm_qt4-test.cpp new file mode 100644 index 00000000..270a8001 --- /dev/null +++ b/src/liblastfm_qt4-test.cpp @@ -0,0 +1,13 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include <lastfm/Track.h> + +int main() +{ + lastfm::MutableTrack track; + track.setTitle("Track"); + + return 0; +} diff --git a/src/liblastfm_qt4.mk b/src/liblastfm_qt4.mk new file mode 100644 index 00000000..a1a7f4d3 --- /dev/null +++ b/src/liblastfm_qt4.mk @@ -0,0 +1,46 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := liblastfm_qt4 +$(PKG)_WEBSITE := https://github.com/lastfm/liblastfm +$(PKG)_DESCR := A Qt C++ library for the Last.fm webservices +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.0.9 +$(PKG)_CHECKSUM := 5276b5fe00932479ce6fe370ba3213f3ab842d70a7d55e4bead6e26738425f7b +$(PKG)_SUBDIR := liblastfm-$($(PKG)_VERSION) +$(PKG)_FILE := liblastfm-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://github.com/lastfm/liblastfm/archive/$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := gcc fftw libsamplerate qt + +define $(PKG)_UPDATE + $(call MXE_GET_GITHUB_TAGS, lastfm/liblastfm) +endef + +define $(PKG)_BUILD + cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \ + -DBUILD_WITH_QT4=ON + + $(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) + $(MAKE) -C '$(BUILD_DIR)' -j 1 install + + # create pkg-config file + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' + (echo 'prefix=$(PREFIX)/$(TARGET)'; \ + echo 'exec_prefix=$${prefix}'; \ + echo 'libdir=$${exec_prefix}/lib'; \ + echo 'includedir=$${prefix}/include'; \ + echo ''; \ + echo 'Name: liblastfm'; \ + echo 'Version: $($(PKG)_VERSION)'; \ + echo 'Description: A Qt C++ library for the Last.fm webservices'; \ + echo 'Requires: QtCore QtNetwork QtXml'; \ + echo 'Libs: -L$${libdir} -llastfm'; \ + echo 'Cflags: -I$${includedir}';) \ + > '$(PREFIX)/$(TARGET)/lib/pkgconfig/liblastfm.pc' + + $(TARGET)-g++ \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `$(TARGET)-pkg-config liblastfm --cflags --libs` +endef + +$(PKG)_BUILD_STATIC = diff --git a/src/liblaxjson-1-fixes.patch b/src/liblaxjson-1-fixes.patch index bf1f0463..f8d69588 100644 --- a/src/liblaxjson-1-fixes.patch +++ b/src/liblaxjson-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/liblaxjson-test.c b/src/liblaxjson-test.c index dae2b9db..3c3aef42 100644 --- a/src/liblaxjson-test.c +++ b/src/liblaxjson-test.c @@ -1,13 +1,12 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ /* * Copyright (c) 2013 Andrew Kelley * * This file is part of liblaxjson, which is MIT licensed. - * See http://opensource.org/licenses/MIT + * See https://opensource.org/licenses/MIT */ #include <laxjson.h> diff --git a/src/liblaxjson.mk b/src/liblaxjson.mk index 6268a2aa..8baa591b 100644 --- a/src/liblaxjson.mk +++ b/src/liblaxjson.mk @@ -1,7 +1,7 @@ -# 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 := liblaxjson +$(PKG)_WEBSITE := https://github.com/andrewrk/liblaxjson $(PKG)_IGNORE := $(PKG)_VERSION := 1.0.5 $(PKG)_CHECKSUM := ffc495b5837e703b13af3f5a5790365dc3a6794f12f0fa93fb8593b162b0b762 @@ -31,6 +31,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic -std=c99 \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-liblaxjson.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-liblaxjson.exe' \ -llaxjson endef diff --git a/src/liblo.mk b/src/liblo.mk index 7e3021e3..f506c605 100644 --- a/src/liblo.mk +++ b/src/liblo.mk @@ -1,28 +1,24 @@ -# 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 := liblo +$(PKG)_WEBSITE := https://liblo.sourceforge.io/ $(PKG)_IGNORE := -$(PKG)_VERSION := 0.28rc -$(PKG)_CHECKSUM := 38bcde108c351aef715c6199905c5d9fc8f5f72763cb19474485aa3fd2443bb1 +$(PKG)_VERSION := 0.28 +$(PKG)_CHECKSUM := da94a9b67b93625354dd89ff7fe31e5297fc9400b6eaf7378c82ee1caf7db909 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc pthreads define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/liblo/files/liblo/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/liblo/files/liblo/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef define $(PKG)_BUILD - cd '$(1)' && ./configure \ - --host='$(TARGET)' \ - --disable-shared \ - --prefix='$(PREFIX)/$(TARGET)' - $(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= - $(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= + cd '$(BUILD_DIR)' && '$(SOURCE_DIR)'/configure \ + $(MXE_CONFIGURE_OPTS) + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_CRUFT) + $(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_CRUFT) endef - -$(PKG)_BUILD_SHARED = diff --git a/src/liblqr-1-1-pkg-config.patch b/src/liblqr-1-1-pkg-config.patch index f6719de9..0fb82c47 100644 --- a/src/liblqr-1-1-pkg-config.patch +++ b/src/liblqr-1-1-pkg-config.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/liblqr-1.mk b/src/liblqr-1.mk index 0c9a2933..d940d87b 100644 --- a/src/liblqr-1.mk +++ b/src/liblqr-1.mk @@ -1,17 +1,17 @@ -# 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 := liblqr-1 +$(PKG)_WEBSITE := https://liblqr.wikidot.com/ $(PKG)_IGNORE := $(PKG)_VERSION := 0.4.2 $(PKG)_CHECKSUM := 173a822efd207d72cda7d7f4e951c5000f31b10209366ff7f0f5972f7f9ff137 $(PKG)_SUBDIR := liblqr-1-$($(PKG)_VERSION) $(PKG)_FILE := liblqr-1-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://liblqr.wdfiles.com/local--files/en:download-page/$($(PKG)_FILE) +$(PKG)_URL := https://liblqr.wdfiles.com/local--files/en:download-page/$($(PKG)_FILE) $(PKG)_DEPS := gcc glib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://liblqr.wikidot.com/en:download-page' | \ + $(WGET) -q -O- 'https://liblqr.wikidot.com/en:download-page' | \ $(SED) -n 's,.*liblqr-1-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef diff --git a/src/liblsmash-1.patch b/src/liblsmash-1.patch new file mode 100644 index 00000000..14f9da56 --- /dev/null +++ b/src/liblsmash-1.patch @@ -0,0 +1,12 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +--- a/configure ++++ b/configure +@@ -198,6 +198,7 @@ + case "$TARGET_OS" in + *mingw*) + EXT=".exe" ++ SHARED_NAME="liblsmash-$MAJVER" + SHARED_EXT=".dll" + IMPLIB="liblsmash.dll.a" + SO_LDFLAGS="-shared -Wl,--out-implib,$IMPLIB" diff --git a/src/liblsmash.mk b/src/liblsmash.mk new file mode 100644 index 00000000..a1918415 --- /dev/null +++ b/src/liblsmash.mk @@ -0,0 +1,28 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := liblsmash +$(PKG)_WEBSITE := https://l-smash.github.io/l-smash/ +$(PKG)_DESCR := L-SMASH +$(PKG)_IGNORE := +$(PKG)_VERSION := 2.9.1 +$(PKG)_CHECKSUM := 17f24fc8bffba753f8c628f1732fc3581b80362341274747ef6fb96af1cac45c +$(PKG)_SUBDIR := l-smash-$($(PKG)_VERSION) +$(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz +$(PKG)_URL := https://github.com/l-smash/l-smash/archive/v$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := gcc + +define $(PKG)_UPDATE + $(call MXE_GET_GITHUB_TAGS, l-smash/l-smash, v) +endef + +# L-SMASH uses a custom made configure script that doesn't recognize +# the option --host and fails on unknown options. +# Therefor $(MXE_CONFIGURE_OPTS) can't be used here. +define $(PKG)_BUILD + cd '$(1)' && ./configure \ + --prefix='$(PREFIX)/$(TARGET)' \ + --cross-prefix=$(TARGET)- \ + $(if $(BUILD_SHARED), --enable-shared --disable-static) + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install +endef diff --git a/src/libltdl.mk b/src/libltdl.mk index 345e136f..2c0ecf13 100644 --- a/src/libltdl.mk +++ b/src/libltdl.mk @@ -1,7 +1,8 @@ -# 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 := libltdl +$(PKG)_WEBSITE := https://www.gnu.org/software/libtool/manual/html_node/Using-libltdl.html#Using-libltdl +$(PKG)_DESCR := GNU Libtool Library (libltdl) $(PKG)_IGNORE = $(libtool_IGNORE) $(PKG)_VERSION = $(libtool_VERSION) $(PKG)_CHECKSUM = $(libtool_CHECKSUM) diff --git a/src/libmad.mk b/src/libmad.mk index 01e1f8aa..36a6eab5 100644 --- a/src/libmad.mk +++ b/src/libmad.mk @@ -1,17 +1,17 @@ -# 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 := libmad +$(PKG)_WEBSITE := http://www.underbit.com/products/mad/ $(PKG)_IGNORE := $(PKG)_VERSION := 0.15.1b $(PKG)_CHECKSUM := bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/mad/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/mad/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/mad/files/libmad/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/mad/files/libmad/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef diff --git a/src/libmicrohttpd-1-fixes.patch b/src/libmicrohttpd-1-fixes.patch index 31891be0..1cdf3778 100644 --- a/src/libmicrohttpd-1-fixes.patch +++ b/src/libmicrohttpd-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/libmicrohttpd-test.c b/src/libmicrohttpd-test.c index 31570602..26d602d8 100644 --- a/src/libmicrohttpd-test.c +++ b/src/libmicrohttpd-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdio.h> diff --git a/src/libmicrohttpd.mk b/src/libmicrohttpd.mk index 8e933ec3..00427fe3 100644 --- a/src/libmicrohttpd.mk +++ b/src/libmicrohttpd.mk @@ -1,18 +1,19 @@ -# 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 := libmicrohttpd +$(PKG)_WEBSITE := https://www.gnu.org/software/libmicrohttpd/ +$(PKG)_DESCR := GNU Libmicrohttpd $(PKG)_IGNORE := $(PKG)_VERSION := 0.9.38 $(PKG)_CHECKSUM := 8df2b4dd863c98799a4775a530d905363fbc02fec850af9094da890b28b9e721 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://ftp.gnu.org/pub/gnu/libmicrohttpd/$($(PKG)_FILE) -$(PKG)_URL_2 := ftp://ftp.gnu.org/pub/gnu/libmicrohttpd/$($(PKG)_FILE) +$(PKG)_URL := https://ftp.gnu.org/gnu/libmicrohttpd/$($(PKG)_FILE) +$(PKG)_URL_2 := https://ftpmirror.gnu.org/libmicrohttpd/$($(PKG)_FILE) $(PKG)_DEPS := gcc plibc pthreads define $(PKG)_UPDATE - $(WGET) -q -O- 'http://ftp.gnu.org/gnu/libmicrohttpd/?C=M;O=D' | \ + $(WGET) -q -O- 'https://ftp.gnu.org/gnu/libmicrohttpd/?C=M;O=D' | \ $(SED) -n 's,.*<a href="libmicrohttpd-\([0-9][^"]*\)\.tar.*,\1,p' | \ $(SORT) -V | \ tail -1 @@ -33,7 +34,7 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -std=c99 -pedantic -Wno-error=unused-parameter \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libmicrohttpd.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libmicrohttpd.exe' \ `'$(TARGET)-pkg-config' --cflags --libs libmicrohttpd` endef diff --git a/src/libmikmod-test.c b/src/libmikmod-test.c index a497bfe0..0956f90d 100644 --- a/src/libmikmod-test.c +++ b/src/libmikmod-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <mikmod.h> diff --git a/src/libmikmod.mk b/src/libmikmod.mk index a3c3e366..68c63269 100644 --- a/src/libmikmod.mk +++ b/src/libmikmod.mk @@ -1,17 +1,18 @@ -# 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 := libmikmod +$(PKG)_WEBSITE := http://mikmod.raphnet.net/ +$(PKG)_DESCR := libMikMod $(PKG)_IGNORE := $(PKG)_VERSION := 3.3.7 $(PKG)_CHECKSUM := 4cf41040a9af99cb960580210ba900c0a519f73ab97b503c780e82428b9bd9a2 $(PKG)_SUBDIR := libmikmod-$($(PKG)_VERSION) $(PKG)_FILE := libmikmod-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/mikmod/libmikmod/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/mikmod/libmikmod/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/mikmod/files/libmikmod/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/mikmod/files/libmikmod/' | \ $(SED) -n 's,.*<a href="/projects/mikmod/files/libmikmod/\([0-9][^>]*\)/".*,\1,p' | \ $(SORT) -Vr | \ head -1 @@ -27,6 +28,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -std=c99 -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libmikmod.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libmikmod.exe' \ `'$(PREFIX)/$(TARGET)/bin/libmikmod-config' --cflags --libs` endef diff --git a/src/libmms-1-fixes.patch b/src/libmms-1-fixes.patch new file mode 100644 index 00000000..2c87e24b --- /dev/null +++ b/src/libmms-1-fixes.patch @@ -0,0 +1,106 @@ +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: John Lindgren <john.lindgren@aol.com> +Date: Thu, 29 May 2014 22:42:53 -0400 +Subject: [PATCH] Remove "Requires: glib-2.0" since libmms no longer depends on + GLib. +https://sourceforge.net/p/libmms/code/ci/b9bbe17c08e5dcbe3ce841e6bed52ce8d8b10f9e/ + +diff --git a/pkgconfig/libmms.pc.in b/pkgconfig/libmms.pc.in +index 1111111..2222222 100644 +--- a/pkgconfig/libmms.pc.in ++++ b/pkgconfig/libmms.pc.in +@@ -4,8 +4,7 @@ libdir=@libdir@ + includedir=@includedir@/ + + Name: libmms +-Description: Library implementing the MMS protocol +-Requires: glib-2.0 ++Description: Library implementing the MMS protocol + Version: @VERSION@ + Libs: -L${libdir} -lmms -lm + Cflags: -I${includedir} + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: John Lindgren <john.lindgren@tds.net> +Date: Thu, 19 Nov 2015 13:39:27 +0100 +Subject: [PATCH] Fix build if strndup() is missing +https://sourceforge.net/p/libmms/code/ci/67d54003b8075b8ea8102bc4a808df4543ab113a/ + +diff --git a/configure.in b/configure.in +index 1111111..2222222 100755 +--- a/configure.in ++++ b/configure.in +@@ -14,6 +14,7 @@ AC_PROG_INSTALL + + dnl Checks for header files. + AC_CHECK_HEADERS([sys/socket.h netinet/in.h netdb.h windows.h winsock2.h]) ++AC_CHECK_FUNCS([strndup]) + + case $host in + *beos*) +diff --git a/src/uri.c b/src/uri.c +index 1111111..2222222 100644 +--- a/src/uri.c ++++ b/src/uri.c +@@ -17,6 +17,10 @@ + * Boston, MA 02111-1307, USA. + */ + ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++ + #include <string.h> + #include <stdlib.h> + #include <ctype.h> +@@ -125,6 +129,29 @@ for ($i = 0; $i < 32; $i++) + #define ISSPACE(C) (((C) >= 9 && (C) <= 13) || (C) == ' ') + + ++/* Implement the strndup function. ++ Copyright (C) 2005 Free Software Foundation, Inc. ++ Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>. */ ++#ifndef HAVE_STRNDUP ++char * ++strndup (const char *s, size_t n) ++{ ++ char *result; ++ size_t len = strlen (s); ++ ++ if (n < len) ++ len = n; ++ ++ result = (char *) malloc (len + 1); ++ if (!result) ++ return 0; ++ ++ result[len] = '\0'; ++ return (char *) memcpy (result, s, len); ++} ++#endif ++ ++ + static int split_user_passwd(const char* in, char** user, char** passwd) + { + char *pass, *tmp = g_strdup(in); + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Pavel Vatagin <pavelvat@gmail.com> +Date: Sun, 5 Mar 2017 00:31:24 +0300 +Subject: [PATCH] fix pc + + +diff --git a/pkgconfig/libmms.pc.in b/pkgconfig/libmms.pc.in +index 1111111..2222222 100644 +--- a/pkgconfig/libmms.pc.in ++++ b/pkgconfig/libmms.pc.in +@@ -7,4 +7,5 @@ Name: libmms + Description: Library implementing the MMS protocol + Version: @VERSION@ + Libs: -L${libdir} -lmms -lm ++Libs.private: -lws2_32 + Cflags: -I${includedir} diff --git a/src/libmms-test.c b/src/libmms-test.c new file mode 100644 index 00000000..2b22dd4f --- /dev/null +++ b/src/libmms-test.c @@ -0,0 +1,13 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include <libmms/mms.h> + +int main() +{ + mms_t* p = mms_connect (NULL, NULL, NULL, 0); + mms_close (p); + + return 0; +} diff --git a/src/libmms.mk b/src/libmms.mk new file mode 100644 index 00000000..418516f8 --- /dev/null +++ b/src/libmms.mk @@ -0,0 +1,30 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := libmms +$(PKG)_WEBSITE := https://sourceforge.net/projects/libmms/ +$(PKG)_DESCR := a library for downloading (streaming) media files using the mmst and mmsh protocols +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.6.4 +$(PKG)_CHECKSUM := 3c05e05aebcbfcc044d9e8c2d4646cd8359be39a3f0ba8ce4e72a9094bee704f +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := gcc + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://sourceforge.net/projects/libmms/files/libmms/' | \ + $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \ + $(MXE_CONFIGURE_OPTS) + $(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) + $(MAKE) -C '$(BUILD_DIR)' -j 1 install + + $(TARGET)-gcc \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `$(TARGET)-pkg-config $(PKG) --cflags --libs` +endef diff --git a/src/libmng.mk b/src/libmng.mk index 6dd69e29..460a2bb8 100644 --- a/src/libmng.mk +++ b/src/libmng.mk @@ -1,17 +1,17 @@ -# 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 := libmng +$(PKG)_WEBSITE := https://www.libmng.com/ $(PKG)_IGNORE := $(PKG)_VERSION := 2.0.3 $(PKG)_CHECKSUM := 4a462fdd48d4bc82c1d7a21106c8a18b62f8cc0042454323058e6da0dbb57dd3 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)-devel/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)-devel/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc jpeg lcms zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/libmng/files/libmng-devel/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/libmng/files/libmng-devel/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef @@ -20,5 +20,5 @@ define $(PKG)_BUILD echo 'Requires: zlib lcms2 jpeg' >> '$(1)/libmng.pc.in' cd '$(1)' && ./configure \ $(MXE_CONFIGURE_OPTS) - $(MAKE) -C '$(1)' -j '$(JOBS)' install + $(MAKE) -C '$(1)' -j '$(JOBS)' install LDFLAGS='-no-undefined' endef diff --git a/src/libmodplug-test.c b/src/libmodplug-test.c index 5ce15859..5709c8b1 100644 --- a/src/libmodplug-test.c +++ b/src/libmodplug-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <modplug.h> diff --git a/src/libmodplug.mk b/src/libmodplug.mk index 560431ff..4b04581a 100644 --- a/src/libmodplug.mk +++ b/src/libmodplug.mk @@ -1,17 +1,17 @@ -# 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 := libmodplug +$(PKG)_WEBSITE := https://modplug-xmms.sourceforge.io/ $(PKG)_IGNORE := $(PKG)_VERSION := 0.8.8.4 $(PKG)_CHECKSUM := 5c5ee13dddbed144be26276e5f102da17ff5b1c992f3100389983082da2264f7 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/modplug-xmms/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/modplug-xmms/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/modplug-xmms/files/libmodplug/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/modplug-xmms/files/libmodplug/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef @@ -23,6 +23,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libmodplug.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libmodplug.exe' \ `'$(TARGET)-pkg-config' libmodplug --cflags --libs` endef diff --git a/src/libmpcdec-1-configure_ac.patch b/src/libmpcdec-1-configure_ac.patch index fe117593..8bd1795d 100644 --- a/src/libmpcdec-1-configure_ac.patch +++ b/src/libmpcdec-1-configure_ac.patch @@ -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. diff -urN libmpcdec-1.2.6/configure.ac libmpcdec-1.2.6-patch/configure.ac --- libmpcdec-1.2.6/configure.ac 2007-04-17 22:05:32.000000000 +0300 diff --git a/src/libmpcdec.mk b/src/libmpcdec.mk index 616e1938..33ca2505 100644 --- a/src/libmpcdec.mk +++ b/src/libmpcdec.mk @@ -1,17 +1,17 @@ -# 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 := libmpcdec +$(PKG)_WEBSITE := https://www.musepack.net/ $(PKG)_IGNORE := $(PKG)_VERSION := 1.2.6 $(PKG)_CHECKSUM := 4bd54929a80850754f27b568d7891e1e3e1b8d2f208d371f27d1fda09e6f12a8 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://files.musepack.net/source/$(PKG)-$($(PKG)_VERSION).tar.bz2 +$(PKG)_URL := https://files.musepack.net/source/$(PKG)-$($(PKG)_VERSION).tar.bz2 $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://files.musepack.net/source/$(PKG)-$($(PKG)_VERSION)' | \ + $(WGET) -q -O- 'https://files.musepack.net/source/$(PKG)-$($(PKG)_VERSION)' | \ $(SED) -n 's,.*$(PKG)-\([0-9][^>]*\)\.tar.*,\1,p' | \ grep -v 'alpha' | \ grep -v 'beta' | \ diff --git a/src/libmysqlclient-1-fixes.patch b/src/libmysqlclient-1-fixes.patch index 73611b47..121de67f 100644 --- a/src/libmysqlclient-1-fixes.patch +++ b/src/libmysqlclient-1-fixes.patch @@ -1,17 +1,16 @@ -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. Contains ad hoc patches for cross building. -From 93f3a29abe0397e5a6681c07c3223372b5451bb0 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Sun, 6 Sep 2015 22:34:47 +0100 -Subject: [PATCH 1/7] use comp_err tool built in native build +Subject: [PATCH] use comp_err tool built in native build See http://www.vtk.org/Wiki/CMake_Cross_Compiling#Using_executables_in_the_build_created_during_the_build diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt -index ac28c62..b2cbb75 100644 +index 1111111..2222222 100644 --- a/extra/CMakeLists.txt +++ b/extra/CMakeLists.txt @@ -20,13 +20,29 @@ ${ZLIB_INCLUDE_DIR}) @@ -44,19 +43,16 @@ index ac28c62..b2cbb75 100644 ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_BINARY_DIR}/include/mysqld_error.h ${PROJECT_BINARY_DIR}/sql/share/english/errmsg.sys COMMAND comp_err --- -2.3.8 (Apple Git-58) - -From e45e5c21360b12cb9f271a29bd1d4d183ed55060 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Sun, 6 Sep 2015 22:53:33 +0100 -Subject: [PATCH 2/7] fix extra qualification 'Handshake::' +Subject: [PATCH] fix extra qualification 'Handshake::' Compilation error. diff --git a/libmysql/authentication_win/handshake.h b/libmysql/authentication_win/handshake.h -index 14b1386..395af36 100644 +index 1111111..2222222 100644 --- a/libmysql/authentication_win/handshake.h +++ b/libmysql/authentication_win/handshake.h @@ -100,7 +100,7 @@ public: @@ -68,18 +64,15 @@ index 14b1386..395af36 100644 bool virtual is_complete() const { --- -2.3.8 (Apple Git-58) - -From a2deca6cb6f87bb926d12149595c84f29ae00d0e Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Mon, 7 Sep 2015 22:59:18 +0100 -Subject: [PATCH 3/7] fix case in headers and libs (should be lowercase) +Subject: [PATCH] fix case in headers and libs (should be lowercase) diff --git a/extra/yassl/src/yassl_int.cpp b/extra/yassl/src/yassl_int.cpp -index 2993a1a..04b1fda 100644 +index 1111111..2222222 100644 --- a/extra/yassl/src/yassl_int.cpp +++ b/extra/yassl/src/yassl_int.cpp @@ -20,7 +20,7 @@ @@ -92,7 +85,7 @@ index 2993a1a..04b1fda 100644 #include <pthread.h> #endif diff --git a/include/mysql/psi/mysql_socket.h b/include/mysql/psi/mysql_socket.h -index 41a7cb4..5f6d91d 100644 +index 1111111..2222222 100644 --- a/include/mysql/psi/mysql_socket.h +++ b/include/mysql/psi/mysql_socket.h @@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA @@ -105,7 +98,7 @@ index 41a7cb4..5f6d91d 100644 #else #include <netinet/in.h> diff --git a/libmysql/authentication_win/CMakeLists.txt b/libmysql/authentication_win/CMakeLists.txt -index f2979fb..83e5441 100644 +index 1111111..2222222 100644 --- a/libmysql/authentication_win/CMakeLists.txt +++ b/libmysql/authentication_win/CMakeLists.txt @@ -26,7 +26,7 @@ SET(HEADERS common.h handshake.h) @@ -118,7 +111,7 @@ index f2979fb..83e5441 100644 # In IDE, group headers in a separate folder. diff --git a/libmysql/authentication_win/plugin_client.cc b/libmysql/authentication_win/plugin_client.cc -index d25aae8..ecfee79 100644 +index 1111111..2222222 100644 --- a/libmysql/authentication_win/plugin_client.cc +++ b/libmysql/authentication_win/plugin_client.cc @@ -26,7 +26,7 @@ @@ -130,20 +123,17 @@ index d25aae8..ecfee79 100644 #endif static int win_auth_client_plugin_init(char*, size_t, int, va_list) --- -2.3.8 (Apple Git-58) - -From 7517a9a4ce9b123470ff8cc040acfa1777acc832 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Mon, 7 Sep 2015 23:01:35 +0100 -Subject: [PATCH 4/7] define missing types +Subject: [PATCH] define missing types We do not use types CERT_NAME_BLOB and CRYPT_HASH_BLOB, though they are used in mprapi.h. And are not defined! diff --git a/mysys/my_gethwaddr.c b/mysys/my_gethwaddr.c -index 780c765..e2cd321 100644 +index 1111111..2222222 100644 --- a/mysys/my_gethwaddr.c +++ b/mysys/my_gethwaddr.c @@ -137,6 +137,9 @@ my_bool my_gethwaddr(uchar *to) @@ -156,14 +146,11 @@ index 780c765..e2cd321 100644 #include <iphlpapi.h> /* --- -2.3.8 (Apple Git-58) - -From 12358baf55265ff6d2764771199645e811863853 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Mon, 7 Sep 2015 23:04:23 +0100 -Subject: [PATCH 5/7] macro NATIVE_WIN32 for stuff we don't have here +Subject: [PATCH] macro NATIVE_WIN32 for stuff we don't have here Macro NATIVE_WIN32 is undefined in MXE. It is used instead of _WIN32 in #ifdef's where working variant is Unix and not Win32: @@ -173,7 +160,7 @@ in #ifdef's where working variant is Unix and not Win32: * MXE has Unix-like stacktrace reader diff --git a/include/m_string.h b/include/m_string.h -index e1576af..5417192 100644 +index 1111111..2222222 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -127,7 +127,7 @@ static inline ulonglong my_strtoull(const char *nptr, char **endptr, int base) @@ -186,7 +173,7 @@ index e1576af..5417192 100644 #else return strtok_r(str, delim, saveptr); diff --git a/include/my_global.h b/include/my_global.h -index acadb44..8c3c3cd 100644 +index 1111111..2222222 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -205,7 +205,7 @@ C_MODE_START @@ -236,7 +223,7 @@ index acadb44..8c3c3cd 100644 ts1->tv_nsec - ts2->tv_nsec; #else diff --git a/include/thr_cond.h b/include/thr_cond.h -index 480e936..03fbc24 100644 +index 1111111..2222222 100644 --- a/include/thr_cond.h +++ b/include/thr_cond.h @@ -39,7 +39,7 @@ typedef CONDITION_VARIABLE native_cond_t; @@ -258,7 +245,7 @@ index 480e936..03fbc24 100644 return ETIMEDOUT; return 0; diff --git a/mysys/stacktrace.c b/mysys/stacktrace.c -index 226d469..db94096 100644 +index 1111111..2222222 100644 --- a/mysys/stacktrace.c +++ b/mysys/stacktrace.c @@ -15,7 +15,7 @@ @@ -270,18 +257,15 @@ index 226d469..db94096 100644 #include "my_pthread.h" #include "m_string.h" #include <signal.h> --- -2.3.8 (Apple Git-58) - -From 4f6b41efba4a862d34de3d03980d283d60c57c28 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Thu, 8 Oct 2015 13:30:53 +1100 -Subject: [PATCH 6/7] fix shared lib names +Subject: [PATCH] fix shared lib names diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt -index 17c8c03..9e2980b 100644 +index 1111111..2222222 100644 --- a/libmysql/CMakeLists.txt +++ b/libmysql/CMakeLists.txt @@ -216,7 +216,7 @@ MACRO(GET_TARGET_NAME target out_name) @@ -311,18 +295,15 @@ index 17c8c03..9e2980b 100644 # libtool compatability IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR APPLE) SET(OS_SHARED_LIB_VERSION "${SHARED_LIB_MAJOR_VERSION}") --- -2.3.8 (Apple Git-58) - -From d57fefef1a1eb15d14dc64d4c59267746f02369d Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Thu, 8 Oct 2015 19:36:35 +1100 -Subject: [PATCH 7/7] allow install of mysql_config +Subject: [PATCH] allow install of mysql_config diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt -index 69d19b8..738563b 100644 +index 1111111..2222222 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -92,7 +92,7 @@ ENDIF() @@ -334,6 +315,158 @@ index 69d19b8..738563b 100644 # On Windows, some .sh and some .pl.in files are configured # The resulting files will have .pl extension (those are perl scripts) --- -2.3.8 (Apple Git-58) +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Wed, 11 Nov 2015 07:44:44 +0000 +Subject: [PATCH] add 'static' to some inline functions + +Fix https://gist.github.com/starius/71d5f276d62e58f36d2f +See also http://stackoverflow.com/a/8502046 + +diff --git a/include/my_global.h b/include/my_global.h +index 1111111..2222222 100644 +--- a/include/my_global.h ++++ b/include/my_global.h +@@ -340,7 +340,7 @@ typedef socket_len_t SOCKET_SIZE_TYPE; /* Used by NDB */ + + #if (_WIN32) + #if !defined(_WIN64) +-inline double my_ulonglong2double(unsigned long long value) ++static inline double my_ulonglong2double(unsigned long long value) + { + long long nr=(long long) value; + if (nr >= 0) +@@ -350,7 +350,7 @@ inline double my_ulonglong2double(unsigned long long value) + #define ulonglong2double my_ulonglong2double + #define my_off_t2double my_ulonglong2double + #endif /* _WIN64 */ +-inline unsigned long long my_double2ulonglong(double d) ++static inline unsigned long long my_double2ulonglong(double d) + { + double t= d - (double) 0x8000000000000000ULL; + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Wed, 16 Dec 2015 17:39:28 +0100 +Subject: [PATCH] fix CMake error if dir contains special regex char + +See https://github.com/mxe/mxe/issues/1030 + +diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt +index 1111111..2222222 100644 +--- a/scripts/CMakeLists.txt ++++ b/scripts/CMakeLists.txt +@@ -59,7 +59,10 @@ MACRO(EXTRACT_LINK_LIBRARIES target var) + FOREACH(lib ${${target}_LIB_DEPENDS}) + # Filter out "general", it is not a library, just CMake hint + # Also, remove duplicates +- IF(NOT lib STREQUAL "general" AND NOT ${var} MATCHES "-l${lib} ") ++ # To check if "${var}" contains "-l${lib} ", use replace ++ # can't use MATCHES because ${lib} may contain special chars. ++ STRING(REPLACE "-l${lib} " "" var_repl ${var}) ++ IF(NOT lib STREQUAL "general" AND ${var} STREQUAL ${var_repl}) + IF (lib MATCHES "^\\-l") + SET(${var} "${${var}} ${lib} ") + ELSEIF(lib MATCHES "^/") + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> +Date: Fri, 13 Nov 2015 10:22:12 -0500 +Subject: [PATCH] For Windows, check if POSIX thread model or win32 thread + model is being used. + + +diff --git a/configure.cmake b/configure.cmake +index 1111111..2222222 100644 +--- a/configure.cmake ++++ b/configure.cmake +@@ -389,6 +389,7 @@ CHECK_INCLUDE_FILES (fnmatch.h HAVE_FNMATCH_H) + CHECK_INCLUDE_FILES (sys/un.h HAVE_SYS_UN_H) + CHECK_INCLUDE_FILES (vis.h HAVE_VIS_H) # Used by libedit + CHECK_INCLUDE_FILES (sasl/sasl.h HAVE_SASL_SASL_H) # Used by memcached ++CHECK_INCLUDE_FILES (pthread.h HAVE_PTHREAD_H) + + # For libevent + CHECK_INCLUDE_FILES(sys/devpoll.h HAVE_DEVPOLL) +diff --git a/include/my_pthread.h b/include/my_pthread.h +index 1111111..2222222 100644 +--- a/include/my_pthread.h ++++ b/include/my_pthread.h +@@ -20,7 +20,7 @@ + + #include "my_global.h" /* myf */ + +-#if !defined(_WIN32) ++#if !(defined(_WIN32) && !defined(USING_PTHREADS)) + #include <pthread.h> + #endif + +@@ -35,7 +35,7 @@ extern "C" { + #define EXTERNC + #endif /* __cplusplus */ + +-#if defined(_WIN32) ++#if defined(_WIN32) && !defined(__WINPTHREADS_VERSION) + typedef DWORD pthread_t; + #define pthread_self() GetCurrentThreadId() + #define pthread_handler_t EXTERNC void * __cdecl +@@ -51,7 +51,7 @@ typedef DWORD pthread_t; + #include "thr_cond.h" + #include "thr_rwlock.h" + +-#if defined(_WIN32) ++#if defined(_WIN32) && !defined(__WINPTHREADS_VERSION) + /* + Existing mysql_thread_create() or pthread_create() does not work well + in windows platform when threads are joined because +diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt +index 1111111..2222222 100644 +--- a/mysys/CMakeLists.txt ++++ b/mysys/CMakeLists.txt +@@ -78,6 +78,11 @@ IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=") + TARGET_LINK_LIBRARIES(mysys pthread) + ENDIF() + ++IF(HAVE_PTHREAD_H) ++ ADD_DEFINITIONS(-DUSING_PTHREADS) ++ TARGET_LINK_LIBRARIES(mysys pthread) ++ENDIF() ++ + IF(WITH_UNIT_TESTS) + + ADD_EXECUTABLE(thr_lock thr_lock.c) +diff --git a/mysys/my_winthread.c b/mysys/my_winthread.c +index 1111111..2222222 100644 +--- a/mysys/my_winthread.c ++++ b/mysys/my_winthread.c +@@ -16,7 +16,7 @@ + /***************************************************************************** + ** Simulation of posix threads calls for Windows + *****************************************************************************/ +-#if defined (_WIN32) ++#if defined (_WIN32) && !defined (USING_PTHREADS) + #include "mysys_priv.h" + #include <process.h> + #include <signal.h> + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Wed, 8 Feb 2017 11:51:42 +1100 +Subject: [PATCH] only define localtime_r and gmtime_r when pthreads isn't used + + +diff --git a/include/my_global.h b/include/my_global.h +index 1111111..2222222 100644 +--- a/include/my_global.h ++++ b/include/my_global.h +@@ -629,7 +629,7 @@ enum loglevel { + }; + + +-#ifdef _WIN32 ++#if defined(_WIN32) && !defined(_POSIX_THREAD_SAFE_FUNCTIONS) + /**************************************************************************** + ** Replacements for localtime_r and gmtime_r + ****************************************************************************/ diff --git a/src/libmysqlclient-test.c b/src/libmysqlclient-test.c index bea00460..617a68c1 100644 --- a/src/libmysqlclient-test.c +++ b/src/libmysqlclient-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <mysql.h> diff --git a/src/libmysqlclient.mk b/src/libmysqlclient.mk index ee222055..d72fa445 100644 --- a/src/libmysqlclient.mk +++ b/src/libmysqlclient.mk @@ -1,7 +1,7 @@ -# 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 := libmysqlclient +$(PKG)_WEBSITE := https://dev.mysql.com/downloads/connector/c/ $(PKG)_IGNORE := $(PKG)_VERSION := 6.1.6 $(PKG)_CHECKSUM := 2222433012c415871958b61bc4f3683e1ebe77e3389f698b267058c12533ea78 @@ -25,9 +25,7 @@ define $(PKG)_BUILD $(MAKE) -C '$(1).native' -j '$(JOBS)' VERBOSE=1 # cross-compilation mkdir '$(1).build' - cd '$(1).build' && cmake \ - -DCMAKE_INSTALL_PREFIX=$(PREFIX)/$(TARGET) \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + cd '$(1).build' && '$(TARGET)-cmake' \ -DIMPORT_COMP_ERR='$(1).native/ImportCompErr.cmake' \ -DHAVE_GCC_ATOMIC_BUILTINS=1 \ -DDISABLE_SHARED=$(CMAKE_STATIC_BOOL) \ @@ -53,6 +51,6 @@ define $(PKG)_BUILD # build test with mysql_config '$(TARGET)-g++' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ `'$(PREFIX)/$(TARGET)/bin/mysql_config' --cflags --libs` endef diff --git a/src/libnice.mk b/src/libnice.mk new file mode 100644 index 00000000..6de77161 --- /dev/null +++ b/src/libnice.mk @@ -0,0 +1,32 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := libnice +$(PKG)_WEBSITE := https://nice.freedesktop.org/wiki/ +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.1.13 +$(PKG)_CHECKSUM := 61112d9f3be933a827c8365f20551563953af6718057928f51f487bfe88419e1 +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz +$(PKG)_URL := https://nice.freedesktop.org/releases/$($(PKG)_FILE) +$(PKG)_DEPS := gcc glib + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://cgit.freedesktop.org/libnice/libnice/refs/tags' | \ + grep '<a href=' | \ + $(SED) -n 's,.*<a[^>]*>\([0-9]*\.[0-9]*\.[^<]*\)<.*,\1,p' | \ + $(SORT) -Vr | \ + head -1 +endef + +define $(PKG)_BUILD + cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \ + $(MXE_CONFIGURE_OPTS) \ + PKG_CONFIG='$(TARGET)-pkg-config' \ + GLIB_COMPILE_SCHEMAS='$(PREFIX)/$(TARGET)/bin/glib-compile-schemas' \ + MAKE=$(MAKE) + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_PROGRAMS) + $(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_PROGRAMS) + $(TARGET)-gcc \ + '$(SOURCE_DIR)/examples/simple-example.c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `$(TARGET)-pkg-config nice --cflags --libs` +endef diff --git a/src/libntlm.mk b/src/libntlm.mk index 837795c8..048cf72d 100644 --- a/src/libntlm.mk +++ b/src/libntlm.mk @@ -1,7 +1,8 @@ -# 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 := libntlm +$(PKG)_WEBSITE := http://www.nongnu.org/libntlm/ +$(PKG)_DESCR := Libntlm $(PKG)_IGNORE := $(PKG)_VERSION := 1.4 $(PKG)_CHECKSUM := 8415d75e31d3135dc7062787eaf4119b984d50f86f0d004b964cdc18a3182589 @@ -11,7 +12,7 @@ $(PKG)_URL := http://www.nongnu.org/libntlm/releases/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.savannah.gnu.org/gitweb/?p=libntlm.git;a=tags' | \ + $(WGET) -q -O- 'https://git.savannah.gnu.org/gitweb/?p=libntlm.git;a=tags' | \ grep '<a class="list subject"' | \ $(SED) -n 's,.*<a[^>]*>\([0-9][^<]*\)<.*,\1,p' | \ head -1 diff --git a/src/liboauth-test.c b/src/liboauth-test.c index ebd459f4..72332b69 100644 --- a/src/liboauth-test.c +++ b/src/liboauth-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdio.h> diff --git a/src/liboauth.mk b/src/liboauth.mk index c8f78f69..f65173c0 100644 --- a/src/liboauth.mk +++ b/src/liboauth.mk @@ -1,17 +1,17 @@ -# 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 := liboauth +$(PKG)_WEBSITE := https://liboauth.sourceforge.io/ $(PKG)_IGNORE := $(PKG)_VERSION := 1.0.3 $(PKG)_CHECKSUM := 0df60157b052f0e774ade8a8bac59d6e8d4b464058cc55f9208d72e41156811f $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc curl openssl define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/liboauth/files/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/liboauth/files/' | \ $(SED) -n 's,.*liboauth-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef @@ -25,6 +25,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-liboauth.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-liboauth.exe' \ `'$(TARGET)-pkg-config' oauth --cflags --libs` endef diff --git a/src/libodbc++-1-win32.patch b/src/libodbc++-1-win32.patch index 2503a33f..0413e15f 100644 --- a/src/libodbc++-1-win32.patch +++ b/src/libodbc++-1-win32.patch @@ -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. --- libodbc++-0.2.5.orig/configure.ac 2009-08-20 23:39:08.000000000 +0200 +++ libodbc++-0.2.5/configure.ac 2010-02-04 22:40:32.000000000 +0100 diff --git a/src/libodbc++.mk b/src/libodbc++.mk index abe1dbff..65386f4b 100644 --- a/src/libodbc++.mk +++ b/src/libodbc++.mk @@ -1,17 +1,17 @@ -# 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 := libodbc++ +$(PKG)_WEBSITE := https://libodbcxx.sourceforge.io/ $(PKG)_IGNORE := $(PKG)_VERSION := 0.2.5 $(PKG)_CHECKSUM := ba3030a27b34e4aafbececa2ddbbf42a38815e9534f34c051620540531b5e23e $(PKG)_SUBDIR := libodbc++-$($(PKG)_VERSION) $(PKG)_FILE := libodbc++-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/libodbcxx/libodbc++/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/libodbcxx/libodbc++/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- "http://sourceforge.net/projects/libodbcxx/files/libodbc%2B%2B" | \ + $(WGET) -q -O- "https://sourceforge.net/projects/libodbcxx/files/libodbc%2B%2B" | \ grep 'libodbcxx/files/libodbc%2B%2B/' | \ $(SED) -n 's,.*/\([0-9][^>]*\)/.*,\1,p' | \ head -1 diff --git a/src/liboil-1-fixes.patch b/src/liboil-1-fixes.patch new file mode 100644 index 00000000..c24f105a --- /dev/null +++ b/src/liboil-1-fixes.patch @@ -0,0 +1,162 @@ +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: David Schleef <ds@schleef.org> +Date: Tue, 20 Jul 2010 14:05:26 -0700 +Subject: [PATCH] x86: Fix cpuid function on x86-64 + +Taken from: +http://cgit.freedesktop.org/liboil/commit/?id=705916007fba0a845229a02dc6474cb523eff150 + +diff --git a/liboil/liboilcpu-x86.c b/liboil/liboilcpu-x86.c +index 1111111..2222222 100644 +--- a/liboil/liboilcpu-x86.c ++++ b/liboil/liboilcpu-x86.c +@@ -162,13 +162,10 @@ get_cpuid (uint32_t op, uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d) + static void + get_cpuid (uint32_t op, uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d) + { ++ *a = op; + __asm__ ( +- " pushq %%rbx\n" + " cpuid\n" +- " mov %%ebx, %%esi\n" +- " popq %%rbx\n" +- : "=a" (*a), "=S" (*b), "=c" (*c), "=d" (*d) +- : "0" (op)); ++ : "+a" (*a), "=b" (*b), "=c" (*c), "=d" (*d)); + } + #endif + +@@ -185,7 +182,7 @@ oil_cpu_detect_cpuid (void) + { + uint32_t eax, ebx, ecx, edx; + uint32_t level; +- char vendor[13] = { 0 }; ++ char vendor[13+4] = { 0 }; + int ret; + + oil_fault_check_enable (); + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Sat, 9 Jan 2016 11:21:30 +1100 +Subject: [PATCH] Win64 Support + +Taken from: +https://bugs.freedesktop.org/show_bug.cgi?id=26651 + +diff --git a/liboil/amd64/wavelet.c b/liboil/amd64/wavelet.c +index 1111111..2222222 100644 +--- a/liboil/amd64/wavelet.c ++++ b/liboil/amd64/wavelet.c +@@ -2,7 +2,7 @@ + #include <liboil/liboilfunction.h> + #include <liboil/liboilclasses.h> + #include <stddef.h> +- ++#include <stdint.h> + + void + deinterleave2_asm (int16_t *d1, int16_t *d2, int16_t *s_2xn, int n) +@@ -1409,7 +1409,7 @@ multiply_and_acc_12xn_s16_u8_mmx (int16_t *i1, int is1, int16_t *s1, + " jnz 1b\n" + " emms\n" + : "+r" (i1), "+r" (s1), "+r" (s2), "+r" (n) +- : "r" ((long)is1), "r" ((long)ss1), "r" ((long)ss2) ++ : "r" ((intptr_t)is1), "r" ((intptr_t)ss1), "r" ((intptr_t)ss2) + ); + } + OIL_DEFINE_IMPL_FULL (multiply_and_acc_12xn_s16_u8_mmx, +@@ -1596,7 +1596,7 @@ mas4_across_add_s16_mmx (int16_t *d, int16_t *s1, int16_t *s2_nx4, int sstr2, + [s2_nx4_off] "+r" (s2_nx4_off), + [n] "+m" (n), + [s1] "+r" (s1) +- : [sstr] "r" ((long)(sstr2)) ++ : [sstr] "r" ((intptr_t)(sstr2)) + ); + } + OIL_DEFINE_IMPL_FULL (mas4_across_add_s16_mmx, mas4_across_add_s16, +@@ -1753,8 +1753,8 @@ mas8_across_add_s16_mmx (int16_t *d, int16_t *s1, int16_t *s2_nx8, int sstr2, + [s3_8] "+r" (s3_8), + [d] "+r" (d), + [n] "+m" (n), +- [s1] "+r" ((long)(s1)) +- : [sstr] "r" ((long)(sstr2)) ++ [s1] "+r" ((intptr_t)(s1)) ++ : [sstr] "r" ((intptr_t)(sstr2)) + ); + } + OIL_DEFINE_IMPL_FULL (mas8_across_add_s16_mmx, mas8_across_add_s16, +diff --git a/liboil/i386_amd64/mas.c b/liboil/i386_amd64/mas.c +index 1111111..2222222 100644 +--- a/liboil/i386_amd64/mas.c ++++ b/liboil/i386_amd64/mas.c +@@ -1,7 +1,7 @@ + + #include <liboil/liboilfunction.h> + #include <liboil/liboilclasses.h> +- ++#include <stdint.h> + + void + mas10_u8_mmx (uint8_t *d, const uint8_t *s1_np9, const int16_t *s2_10, +@@ -1106,7 +1106,7 @@ mas8_across_u8_mmx_3 (uint8_t *d, const uint8_t *s1_nx8, int ss1, + " packuswb %%mm2, %%mm2\n" + " movd %%mm2, 0(%[d])\n" + : [p] "+r" (p) +- : [d] "r" (d), [ss1] "r" ((long)ss1)); ++ : [d] "r" (d), [ss1] "r" ((intptr_t)ss1)); + d+=4; + s1_nx8+=4; + n--; +diff --git a/liboil/i386_amd64/multiply_and_acc.c b/liboil/i386_amd64/multiply_and_acc.c +index 1111111..2222222 100644 +--- a/liboil/i386_amd64/multiply_and_acc.c ++++ b/liboil/i386_amd64/multiply_and_acc.c +@@ -1,6 +1,7 @@ + + #include <liboil/liboilfunction.h> + #include <liboil/liboilclasses.h> ++#include <stdint.h> + + void + multiply_and_acc_6xn_s16_u8_mmx (int16_t *i1, int is1, int16_t *s1, +@@ -32,7 +33,7 @@ multiply_and_acc_6xn_s16_u8_mmx (int16_t *i1, int is1, int16_t *s1, + #ifdef __i386__ + : "m" (is1), "m" (ss1), "m" (ss2) + #else +- : "r" ((long)is1), "r" ((long)ss1), "r" ((long)ss2) ++ : "r" ((intptr_t)is1), "r" ((intptr_t)ss1), "r" ((intptr_t)ss2) + #endif + ); + } +@@ -68,7 +69,7 @@ multiply_and_acc_8xn_s16_u8_mmx (int16_t *i1, int is1, int16_t *s1, + #ifdef __i386__ + : "m" (is1), "m" (ss1), "m" (ss2) + #else +- : "r" ((long)is1), "r" ((long)ss1), "r" ((long)ss2) ++ : "r" ((intptr_t)is1), "r" ((intptr_t)ss1), "r" ((intptr_t)ss2) + #endif + ); + } +@@ -114,7 +115,7 @@ multiply_and_acc_16xn_s16_u8_mmx (int16_t *i1, int is1, int16_t *s1, + #ifdef __i386__ + : "m" (is1), "m" (ss1), "m" (ss2) + #else +- : "r" ((long)is1), "r" ((long)ss1), "r" ((long)ss2) ++ : "r" ((intptr_t)is1), "r" ((intptr_t)ss1), "r" ((intptr_t)ss2) + #endif + ); + } +@@ -170,7 +171,7 @@ multiply_and_acc_24xn_s16_u8_mmx (int16_t *i1, int is1, int16_t *s1, + #ifdef __i386__ + : "m" (is1), "m" (ss1), "m" (ss2) + #else +- : "r" ((long)is1), "r" ((long)ss1), "r" ((long)ss2) ++ : "r" ((intptr_t)is1), "r" ((intptr_t)ss1), "r" ((intptr_t)ss2) + #endif + ); + } diff --git a/src/liboil.mk b/src/liboil.mk index f13c7760..ef0b3518 100644 --- a/src/liboil.mk +++ b/src/liboil.mk @@ -1,7 +1,7 @@ -# 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 := liboil +$(PKG)_WEBSITE := https://liboil.freedesktop.org/ $(PKG)_IGNORE := $(PKG)_VERSION := 0.3.17 $(PKG)_CHECKSUM := 105f02079b0b50034c759db34b473ecb5704ffa20a5486b60a8b7698128bfc69 @@ -11,24 +11,25 @@ $(PKG)_URL := http://$(PKG).freedesktop.org/download/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://cgit.freedesktop.org/liboil/refs/tags' | \ + $(WGET) -q -O- 'https://cgit.freedesktop.org/liboil/refs/tags' | \ $(SED) -n "s,.*<a href='[^']*/tag/?id=[^0-9]*\\([0-9][^']*\\)'.*,\\1,p" | \ head -1 endef +# liboil is in maintenance-only phase: +# https://cgit.freedesktop.org/liboil/commit/?id=04b154aa118c0fdf244932dadc3d085f6290db7a + +# configure doesn't wildcard host test for x86_64 +# `as_cv_unaligned_access` so set it manually + define $(PKG)_BUILD cd '$(1)' && ./configure \ - --host='$(TARGET)' \ - --prefix='$(PREFIX)/$(TARGET)' \ - --disable-shared \ + $(MXE_CONFIGURE_OPTS) \ --disable-debug \ --disable-examples \ --mandir='$(1)/sink' \ --docdir='$(1)/sink' \ - --with-html-dir='$(1)/sink' + --with-html-dir='$(1)/sink' \ + as_cv_unaligned_access=yes $(MAKE) -C '$(1)' -j '$(JOBS)' install endef - -$(PKG)_BUILD_x86_64-w64-mingw32 = - -$(PKG)_BUILD_SHARED = diff --git a/src/libomemo-test.c b/src/libomemo-test.c new file mode 100644 index 00000000..ef1cbc7c --- /dev/null +++ b/src/libomemo-test.c @@ -0,0 +1,38 @@ +// This file is part of MXE. See LICENSE.md for licensing information. + +#include <libomemo.h> +#include <libomemo_crypto.h> +#include <stdio.h> + +int main(int argc, char *argv[]) +{ + char * msg_p = "<message xmlns='jabber:client' type='chat' to='alice@example.com'>" + "<body>hello</body>" + "</message>"; + + printf("Original message:\n%s\n\n", msg_p); + fflush(stdout); + + omemo_crypto_provider crypto = { + .random_bytes_func = omemo_default_crypto_random_bytes, + .aes_gcm_encrypt_func = omemo_default_crypto_aes_gcm_encrypt, + .aes_gcm_decrypt_func = omemo_default_crypto_aes_gcm_decrypt, + (void *) 0 + }; + + uint32_t sid = 9178; + + omemo_message * msg_out_p; + if (omemo_message_prepare_encryption(msg_p, sid, &crypto, &msg_out_p) != 0) + return 1; + + char * xml_out_p; + if (omemo_message_export_encrypted(msg_out_p, &xml_out_p) != 0) + return 1; + + printf("Encrypted message:\n%s\n\n", xml_out_p); + fflush(stdout); + + return 0; +} + diff --git a/src/libomemo-test.cmake b/src/libomemo-test.cmake new file mode 100644 index 00000000..44e7fc54 --- /dev/null +++ b/src/libomemo-test.cmake @@ -0,0 +1,22 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +# partial module - included by src/cmake/CMakeLists.txt + +set(TGT test-${PKG}-cmake) + +enable_language(C) +add_executable(${TGT} ${CMAKE_CURRENT_LIST_DIR}/${PKG}-test.c) + +find_package(PkgConfig REQUIRED) +pkg_check_modules(GLIB2 glib-2.0) + +include_directories(${GLIB2_INCLUDE_DIRS}) +target_link_libraries(${TGT} omemo-conversations + mxml + gcrypt + gpg-error + pthread + ${GLIB2_LIBRARIES}) + +install(TARGETS ${TGT} DESTINATION bin) + diff --git a/src/libomemo.mk b/src/libomemo.mk new file mode 100644 index 00000000..e5b67050 --- /dev/null +++ b/src/libomemo.mk @@ -0,0 +1,32 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := libomemo +$(PKG)_WEBSITE := https://github.com/gkdr/libomemo +$(PKG)_DESCR := Implementation of OMEMO in C +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.4.1 +$(PKG)_CHECKSUM := af66fd2958dc5d6b23bc488b69e9f431bfb308d79bdd1b1c31de4575862c5142 +$(PKG)_GH_CONF := gkdr/libomemo, v +$(PKG)_DEPS := gcc glib libgcrypt mxml sqlite + +define $(PKG)_BUILD + $(MAKE) -C '$(SOURCE_DIR)' -j '$(JOBS)' all \ + CC='$(TARGET)-gcc' \ + LD='$(TARGET)-ld' \ + AR='$(TARGET)-ar' \ + PKG_CONFIG='$(TARGET)-pkg-config' \ + LIBGCRYPT_CONFIG='$(PREFIX)/$(TARGET)/bin/libgcrypt-config' + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' + $(INSTALL) -d '$(PREFIX)/$(TARGET)/include' + $(INSTALL) -m644 '$(SOURCE_DIR)/build'/libomemo*.a '$(PREFIX)/$(TARGET)/lib/' + $(INSTALL) -m644 '$(SOURCE_DIR)/src'/libomemo*.h '$(PREFIX)/$(TARGET)/include/' + + # test cmake + mkdir '$(SOURCE_DIR).test-cmake' + cd '$(SOURCE_DIR).test-cmake' && '$(TARGET)-cmake' \ + -DPKG=$(PKG) \ + '$(PWD)/src/cmake/test' + $(MAKE) -C '$(SOURCE_DIR).test-cmake' -j 1 install +endef + +$(PKG)_BUILD_SHARED = diff --git a/src/libotr-1-fixes.patch b/src/libotr-1-fixes.patch new file mode 100644 index 00000000..77d44251 --- /dev/null +++ b/src/libotr-1-fixes.patch @@ -0,0 +1,43 @@ +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, 16 Mar 2017 04:09:42 +0100 +Subject: [PATCH] fix out-of-tree build + +Fix the error: +libotr-4.1.1/toolkit/otr_parse.c:26:19: fatal error: proto.h: + No such file or directory + +diff --git a/toolkit/Makefile.am b/toolkit/Makefile.am +index 1111111..2222222 100644 +--- a/toolkit/Makefile.am ++++ b/toolkit/Makefile.am +@@ -1,4 +1,4 @@ +-AM_CPPFLAGS = -I$(includedir) -I../src @LIBGCRYPT_CFLAGS@ ++AM_CPPFLAGS = -I$(includedir) -I$(top_srcdir)/src @LIBGCRYPT_CFLAGS@ + + noinst_HEADERS = aes.h ctrmode.h parse.h sesskeys.h readotr.h sha1hmac.h + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Thu, 16 Mar 2017 06:09:50 +0100 +Subject: [PATCH] .pc: add -fstack-protector-all and private libs + +The flags taken from the build log. + +diff --git a/libotr.pc.in b/libotr.pc.in +index 1111111..2222222 100644 +--- a/libotr.pc.in ++++ b/libotr.pc.in +@@ -7,5 +7,6 @@ Name: libotr + Description: Off-the-Record Messaging Library + Version: @VERSION@ + URL: https://otr.cypherpunks.ca/ +-Libs: -L${libdir} -lotr ++Libs: -L${libdir} -lotr -fstack-protector-all ++Libs.private: -lgcrypt -lgpg-error -lintl -liconv + Cflags: -I${includedir} diff --git a/src/libotr-test.c b/src/libotr-test.c new file mode 100644 index 00000000..77a6b07b --- /dev/null +++ b/src/libotr-test.c @@ -0,0 +1,14 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include <libotr/proto.h> +#include <libotr/userstate.h> + +int main() { + OtrlUserState userstate; + OTRL_INIT; + userstate = otrl_userstate_create(); + otrl_userstate_free(userstate); + return 0; +} diff --git a/src/libotr.mk b/src/libotr.mk new file mode 100644 index 00000000..5b30e46e --- /dev/null +++ b/src/libotr.mk @@ -0,0 +1,34 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := libotr +$(PKG)_WEBSITE := https://otr.cypherpunks.ca/ +$(PKG)_DESCR := Off-the-Record Messaging +$(PKG)_IGNORE := +$(PKG)_VERSION := 4.1.1 +$(PKG)_CHECKSUM := 8b3b182424251067a952fb4e6c7b95a21e644fbb27fbd5f8af2b2ed87ca419f5 +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://otr.cypherpunks.ca/$($(PKG)_FILE) +$(PKG)_DEPS := gcc libgcrypt libgpg_error libiconv + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://otr.cypherpunks.ca/' | \ + $(SED) -n 's,.*<a href="libotr-\([0-9][^>]*\)\.tar\.gz">.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + cd '$(SOURCE_DIR)' && ACLOCAL_PATH='$(PREFIX)/$(TARGET)/share/aclocal' autoreconf -fi + cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \ + $(MXE_CONFIGURE_OPTS) \ + --with-libgcrypt-prefix='$(PREFIX)/$(TARGET)' + + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' \ + $(if $(BUILD_SHARED), LDFLAGS=-no-undefined) $(MXE_DISABLE_CRUFT) + $(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_CRUFT) + + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' $(PKG) --cflags --libs` +endef diff --git a/src/libpano13.mk b/src/libpano13.mk index e56dcf90..71eba6e6 100644 --- a/src/libpano13.mk +++ b/src/libpano13.mk @@ -1,17 +1,17 @@ -# 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 := libpano13 +$(PKG)_WEBSITE := https://panotools.sourceforge.io/ $(PKG)_IGNORE := $(PKG)_VERSION := 2.9.18 $(PKG)_CHECKSUM := de5d4e43f15c3430e95c0faa1c50c9503516e1b570d0ec0522f610a578caa172 $(PKG)_SUBDIR := $(PKG)-$(word 1,$(subst _, ,$($(PKG)_VERSION))) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/panotools/$(PKG)/$($(PKG)_SUBDIR)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/panotools/$(PKG)/$($(PKG)_SUBDIR)/$($(PKG)_FILE) $(PKG)_DEPS := gcc jpeg libpng tiff zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/api/file/index/project-id/96188/rss?path=/libpano13' | \ + $(WGET) -q -O- 'https://sourceforge.net/api/file/index/project-id/96188/rss?path=/libpano13' | \ $(SED) -n 's,.*libpano13-\([0-9].*\)\.tar.*,\1,p' | \ grep -v beta | \ grep -v rc | \ diff --git a/src/libpaper.mk b/src/libpaper.mk index 14948abb..e9a57f5b 100644 --- a/src/libpaper.mk +++ b/src/libpaper.mk @@ -1,7 +1,7 @@ -# 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 := libpaper +$(PKG)_WEBSITE := https://packages.debian.org/unstable/libpaper1 $(PKG)_IGNORE := $(PKG)_VERSION := 1.1.24+nmu4 $(PKG)_CHECKSUM := 2491fce3f590d922d2d3070555df4425921b89c76a18e1c62e36336d6657526a @@ -12,7 +12,7 @@ $(PKG)_URL_2 := http://linux.mirrors.es.net/pub/ubuntu/pool/main/libp/$(PKG)/ $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://packages.debian.org/unstable/source/libpaper' | \ + $(WGET) -q -O- 'https://packages.debian.org/unstable/source/libpaper' | \ $(SED) -n 's,.*libpaper_\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef diff --git a/src/libplist.mk b/src/libplist.mk index 8c116688..c2f1b7da 100644 --- a/src/libplist.mk +++ b/src/libplist.mk @@ -1,7 +1,7 @@ -# 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 := libplist +$(PKG)_WEBSITE := https://github.com/libimobiledevice/libplist $(PKG)_IGNORE := $(PKG)_VERSION := 1.12 $(PKG)_CHECKSUM := b8e860ef2e01154e79242438252b2a7ed185df351f02c167147a8a602a0aa63e diff --git a/src/libpng-test.c b/src/libpng-test.c index b084de11..ba7266a7 100644 --- a/src/libpng-test.c +++ b/src/libpng-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. * * This is a slightly modified version of: * http://ironalbatross.net/wiki/index.php5?title=CPP_LIBPNG#Minimal_Example_of_writing_a_PNG_File diff --git a/src/libpng.mk b/src/libpng.mk index 37de5fc2..f15ebe2f 100644 --- a/src/libpng.mk +++ b/src/libpng.mk @@ -1,18 +1,18 @@ -# 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 := libpng +$(PKG)_WEBSITE := http://www.libpng.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 1.6.18 -$(PKG)_CHECKSUM := 2e10c13b7949883ac961db6177c516d778184432d440317e9f0391305c360963 +$(PKG)_VERSION := 1.6.29 +$(PKG)_CHECKSUM := 4245b684e8fe829ebb76186327bb37ce5a639938b219882b53d64bd3cfc5f239 $(PKG)_SUBDIR := libpng-$($(PKG)_VERSION) $(PKG)_FILE := libpng-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/libpng/libpng16/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/libpng/libpng16/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_URL_2 := ftp://ftp.simplesystems.org/pub/$(PKG)/png/src/libpng16/$($(PKG)_FILE) $(PKG)_DEPS := gcc zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/p/libpng/code/ref/master/tags/' | \ + $(WGET) -q -O- 'https://sourceforge.net/p/libpng/code/ref/master/tags/' | \ $(SED) -n 's,.*<a[^>]*>v\([0-9][^<]*\)<.*,\1,p' | \ grep -v alpha | \ grep -v beta | \ @@ -29,6 +29,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -std=c99 -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libpng.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libpng.exe' \ `'$(PREFIX)/$(TARGET)/bin/libpng-config' --static --cflags --libs` endef diff --git a/src/librosco.mk b/src/librosco.mk new file mode 100644 index 00000000..7924daae --- /dev/null +++ b/src/librosco.mk @@ -0,0 +1,22 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := librosco +$(PKG)_WEBSITE := https://github.com/colinbourassa/librosco/ +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.1.11 +$(PKG)_CHECKSUM := 48bb2d07c2575f39bdb6cf022889f20bd855eb9100bb19d4e2536a771198e3a4 +$(PKG)_GH_CONF := colinbourassa/librosco,,,v +$(PKG)_DEPS := gcc + +define $(PKG)_BUILD + cd '$(BUILD_DIR)' && $(TARGET)-cmake \ + -DENABLE_DOC_INSTALL=off \ + -DENABLE_TESTAPP_INSTALL=off \ + '$(SOURCE_DIR)' + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install + + '$(TARGET)-gcc' $(1)/src/readmems.c \ + -o '$(PREFIX)/$(TARGET)/bin/test-librosco.exe' \ + `'$(TARGET)-pkg-config' --libs librosco` +endef diff --git a/src/librsvg-1-fixes.patch b/src/librsvg-1-fixes.patch index 3ee7de1f..3c9777d4 100644 --- a/src/librsvg-1-fixes.patch +++ b/src/librsvg-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/librsvg-test.c b/src/librsvg-test.c index 4edea83d..7771bf16 100644 --- a/src/librsvg-test.c +++ b/src/librsvg-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <librsvg/rsvg.h> diff --git a/src/librsvg.mk b/src/librsvg.mk index 75d865ec..61db3634 100644 --- a/src/librsvg.mk +++ b/src/librsvg.mk @@ -1,17 +1,17 @@ -# 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 := librsvg +$(PKG)_WEBSITE := https://librsvg.sourceforge.io/ $(PKG)_IGNORE := $(PKG)_VERSION := 2.40.5 $(PKG)_CHECKSUM := d14d7b3e25023ce34302022fd7c9b3a468629c94dff6c177874629686bfc71a7 $(PKG)_SUBDIR := librsvg-$($(PKG)_VERSION) $(PKG)_FILE := librsvg-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://ftp.gnome.org/pub/GNOME/sources/librsvg/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/librsvg/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc cairo gdk-pixbuf glib libcroco libgsf pango define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/librsvg/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/librsvg/refs/tags' | \ $(SED) -n 's,.*<a[^>]*>\([0-9][^<]*\).*,\1,p' | \ head -1 endef @@ -27,6 +27,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -mwindows -W -Wall -Werror -Wno-error=deprecated-declarations \ -std=c99 -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-librsvg.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-librsvg.exe' \ `'$(TARGET)-pkg-config' librsvg-2.0 --cflags --libs` endef diff --git a/src/librtmp.mk b/src/librtmp.mk index e7b1a35d..e3022071 100644 --- a/src/librtmp.mk +++ b/src/librtmp.mk @@ -1,10 +1,10 @@ -# 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 := librtmp +$(PKG)_WEBSITE := https://rtmpdump.mplayerhq.hu/ $(PKG)_IGNORE := -$(PKG)_VERSION := a1900c3 -$(PKG)_CHECKSUM := fa4edd83cb6ed19d97f89a6d83aef6231c1bd8079aea5d33c083f827459a9ab2 +$(PKG)_VERSION := a107cef +$(PKG)_CHECKSUM := aea53f2a2c6596c93eeb288d97266e89a97b31795b678daccedc31d70dad28c4 $(PKG)_SUBDIR := mirror-rtmpdump-$($(PKG)_VERSION) $(PKG)_FILE := rtmpdump-$($(PKG)_VERSION).tar.gz $(PKG)_URL := https://github.com/mirror/rtmpdump/tarball/$($(PKG)_VERSION)/$($(PKG)_FILE) diff --git a/src/libsamplerate.mk b/src/libsamplerate.mk index 7e002be4..4eb3d378 100644 --- a/src/libsamplerate.mk +++ b/src/libsamplerate.mk @@ -1,10 +1,10 @@ -# 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 := libsamplerate +$(PKG)_WEBSITE := http://www.mega-nerd.com/SRC/ $(PKG)_IGNORE := -$(PKG)_VERSION := 0.1.8 -$(PKG)_CHECKSUM := 93b54bdf46d5e6d2354b7034395fe329c222a966790de34520702bb9642f1c06 +$(PKG)_VERSION := 0.1.9 +$(PKG)_CHECKSUM := 0a7eb168e2f21353fb6d84da152e4512126f7dc48ccb0be80578c565413444c1 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://www.mega-nerd.com/SRC/$(PKG)-$($(PKG)_VERSION).tar.gz @@ -20,7 +20,11 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - cd '$(1)' && ./configure \ - $(MXE_CONFIGURE_OPTS) - $(MAKE) -C '$(1)' -j 1 install LDFLAGS='-no-undefined' + # fftw and sndfile are only used for tests/examples + cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \ + $(MXE_CONFIGURE_OPTS) \ + --disable-fftw \ + --disable-sndfile + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' $(MXE_DISABLE_PROGRAMS) $(MXE_DISABLE_DOCS) + $(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_PROGRAMS) $(MXE_DISABLE_DOCS) endef diff --git a/src/libshout-1-fixes.patch b/src/libshout-1-fixes.patch index 715ccb40..4a25029a 100644 --- a/src/libshout-1-fixes.patch +++ b/src/libshout-1-fixes.patch @@ -1,32 +1,43 @@ -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. Contains ad hoc patches for cross building. -From b05b2d82333e13f637dffb93f821907f775eb585 Mon Sep 17 00:00:00 2001 -From: Mark Brand <mabrand@mabrand.nl> -Date: Sun, 20 May 2012 23:23:37 +0200 -Subject: [PATCH] mingw fixes +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jean-Baptiste Kempf <jb@videolan.org> +Date: Mon, 30 Nov 2015 17:19:26 +0100 +Subject: [PATCH] Fix: test arpa/inet.h presence before using it ---- - include/shout/shout.h.in | 2 ++ - 1 file changed, 2 insertions(+) +Fix: test arpa/inet.h presence before using it -diff --git a/include/shout/shout.h.in b/include/shout/shout.h.in -index 682ad49..f412cdc 100644 ---- a/include/shout/shout.h.in -+++ b/include/shout/shout.h.in -@@ -23,8 +23,10 @@ +This fixes the Windows build. + +Taken from: +https://git.xiph.org/?p=icecast-libshout.git;a=commit;h=53aa028d13ac624e2c1e71796d529e773867d1d4 + +diff --git a/configure.ac b/configure.ac +index 1111111..2222222 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -74,7 +74,7 @@ dnl Checks for programs. + dnl Checks for header files. + AC_HEADER_STDC + AC_HEADER_TIME +-AC_CHECK_HEADERS([strings.h sys/timeb.h]) ++AC_CHECK_HEADERS([strings.h sys/timeb.h arpa/inet.h]) - #include <sys/types.h> - #ifdef WIN32 -+#ifndef __MINGW32__ - #include <os.h> + dnl Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST +diff --git a/src/proto_roaraudio.c b/src/proto_roaraudio.c +index 1111111..2222222 100644 +--- a/src/proto_roaraudio.c ++++ b/src/proto_roaraudio.c +@@ -28,7 +28,9 @@ #endif + + /* for htonl(). */ ++#ifdef HAVE_ARPA_INET_H + #include <arpa/inet.h> +#endif - #define SHOUTERR_SUCCESS (0) - #define SHOUTERR_INSANE (-1) --- -1.7.9.2 - + #include <stdio.h> + #include <stdlib.h> diff --git a/src/libshout.mk b/src/libshout.mk index b2d9f4eb..117a94a4 100644 --- a/src/libshout.mk +++ b/src/libshout.mk @@ -1,14 +1,14 @@ -# 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 := libshout +$(PKG)_WEBSITE := http://www.icecast.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 2.3.1 -$(PKG)_CHECKSUM := cf3c5f6b4a5e3fcfbe09fb7024aa88ad4099a9945f7cb037ec06bcee7a23926e +$(PKG)_VERSION := 2.4.1 +$(PKG)_CHECKSUM := f3acb8dec26f2dbf6df778888e0e429a4ce9378a9d461b02a7ccbf2991bbf24d $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://downloads.us.xiph.org/releases/$(PKG)/$($(PKG)_FILE) -$(PKG)_DEPS := gcc ogg speex theora vorbis +$(PKG)_DEPS := gcc ogg openssl speex theora vorbis define $(PKG)_UPDATE $(WGET) -q -O- 'http://www.icecast.org/download.php' | \ @@ -18,10 +18,8 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ - --host='$(TARGET)' \ - --build="`config.guess`" \ - --prefix='$(PREFIX)/$(TARGET)' \ - --disable-shared \ + $(MXE_CONFIGURE_OPTS) \ + ac_cv_prog_PKGCONFIG='$(PREFIX)/bin/$(TARGET)-pkg-config' \ --disable-thread \ --infodir='$(1)/sink' \ --mandir='$(1)/sink' diff --git a/src/libsigc++.mk b/src/libsigc++.mk index f788de28..4eff4e61 100644 --- a/src/libsigc++.mk +++ b/src/libsigc++.mk @@ -1,17 +1,17 @@ -# 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 := libsigc++ +$(PKG)_WEBSITE := https://libsigc.sourceforge.io/ $(PKG)_IGNORE := $(PKG)_VERSION := 2.4.0 $(PKG)_CHECKSUM := 7593d5fa9187bbad7c6868dce375ce3079a805f3f1e74236143bceb15a37cd30 $(PKG)_SUBDIR := libsigc++-$($(PKG)_VERSION) $(PKG)_FILE := libsigc++-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/libsigc++/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/libsigc++/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/libsigc++2/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/libsigc++2/refs/tags' | \ grep '<a href=' | \ $(SED) -n 's,.*<a[^>]*>\([0-9][^<]*\)<.*,\1,p' | \ head -1 diff --git a/src/libsndfile-1-fixes.patch b/src/libsndfile-1-fixes.patch deleted file mode 100644 index 23f51d9c..00000000 --- a/src/libsndfile-1-fixes.patch +++ /dev/null @@ -1,28 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -Taken from https://github.com/erikd/libsndfile/pull/76 - -From 9ce0175df1fcb3db7a63ba8a72712b4676a3af86 Mon Sep 17 00:00:00 2001 -From: Timothy Gu <timothygu99@gmail.com> -Date: Mon, 1 Sep 2014 11:05:13 -0700 -Subject: [PATCH] configure.ac: Fix detection of MinGW - -Signed-off-by: Timothy Gu <timothygu99@gmail.com> - -diff --git a/configure.ac b/configure.ac -index 20ba55a..d25201c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -168,7 +168,7 @@ unset ac_cv_sizeof_off_t - AC_CHECK_SIZEOF(off_t,1) # Fake default value. - - case "$host_os" in -- mingw32msvc | mingw32) -+ mingw32*) - TYPEOF_SF_COUNT_T="__int64" - SF_COUNT_MAX="0x7FFFFFFFFFFFFFFFLL" - SIZEOF_SF_COUNT_T=8 --- -1.9.1 - diff --git a/src/libsndfile.mk b/src/libsndfile.mk index 5292bdf6..2ff6e2bf 100644 --- a/src/libsndfile.mk +++ b/src/libsndfile.mk @@ -1,10 +1,10 @@ -# 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 := libsndfile +$(PKG)_WEBSITE := http://www.mega-nerd.com/libsndfile/ $(PKG)_IGNORE := -$(PKG)_VERSION := 1.0.25 -$(PKG)_CHECKSUM := 59016dbd326abe7e2366ded5c344c853829bebfd1702ef26a07ef662d6aa4882 +$(PKG)_VERSION := 1.0.28 +$(PKG)_CHECKSUM := 1ff33929f042fa333aed1e8923aa628c3ee9e1eb85512686c55092d1e5a9dfa9 $(PKG)_SUBDIR := libsndfile-$($(PKG)_VERSION) $(PKG)_FILE := libsndfile-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://www.mega-nerd.com/libsndfile/files/$($(PKG)_FILE) diff --git a/src/libsodium.mk b/src/libsodium.mk new file mode 100644 index 00000000..cce277ed --- /dev/null +++ b/src/libsodium.mk @@ -0,0 +1,26 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := libsodium +$(PKG)_WEBSITE := https://download.libsodium.org/doc/ +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.0.6 +$(PKG)_CHECKSUM := 940d03ea7d2caa7940e24564bf6d9f66d6edd1df1e0111ff8e3655f3b864fb59 +$(PKG)_SUBDIR := libsodium-$($(PKG)_VERSION) +$(PKG)_FILE := libsodium-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://download.libsodium.org/libsodium/releases/$($(PKG)_FILE) +$(PKG)_URL_2 := https://github.com/jedisct1/libsodium/releases/download/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://download.libsodium.org/libsodium/releases/' | \ + $(SED) -n 's,.*libsodium-\([0-9][^>]*\)\.tar.*,\1,p' | \ + grep -v mingw | \ + tail -1 +endef + +define $(PKG)_BUILD + cd '$(1)' && ./configure \ + $(MXE_CONFIGURE_OPTS) + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install +endef diff --git a/src/libsoup-1-fixes.patch b/src/libsoup-1-fixes.patch new file mode 100644 index 00000000..c65b7d6a --- /dev/null +++ b/src/libsoup-1-fixes.patch @@ -0,0 +1,53 @@ +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, 18 Feb 2017 20:26:34 +0300 +Subject: [PATCH] fix build + + +diff --git a/Makefile.am b/Makefile.am +index 1111111..2222222 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,7 +1,7 @@ + ## Process this file with automake to produce Makefile.in + ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} + +-SUBDIRS = libsoup po tests examples docs build/win32 ++SUBDIRS = libsoup tests docs build/win32 + + EXTRA_DIST = \ + data/effective_tld_names.dat \ +diff --git a/autogen.sh b/autogen.sh +index 1111111..2222222 100755 +--- a/autogen.sh ++++ b/autogen.sh +@@ -19,13 +19,6 @@ if test -z $INTLTOOLIZE; then + exit 1 + fi + +-GTKDOCIZE=`which gtkdocize` +-if test -z $GTKDOCIZE; then +- echo "*** No GTK-Doc found, please install it ***" +- exit 1 +-fi +- +-gtkdocize || exit $? + intltoolize --automake --copy + autoreconf --force --install --verbose + +diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am +index 1111111..2222222 100644 +--- a/docs/reference/Makefile.am ++++ b/docs/reference/Makefile.am +@@ -77,7 +77,6 @@ GTKDOC_LIBS = \ + $(GLIB_LIBS) + + # include common portion ... +-include $(top_srcdir)/gtk-doc.make + + # kludges + $(srcdir)/tmpl/*.sgml: diff --git a/src/libsoup-test.c b/src/libsoup-test.c new file mode 100644 index 00000000..8faed28a --- /dev/null +++ b/src/libsoup-test.c @@ -0,0 +1,16 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include <libsoup/soup.h> + +int main() +{ + SoupServer *server; + GError *error; + + server = soup_server_new (SOUP_SERVER_SERVER_HEADER, "simple-httpd ", SOUP_SERVER_TLS_CERTIFICATE, NULL, NULL); + soup_server_listen_all (server, 1234, SOUP_SERVER_LISTEN_HTTPS, &error); + + return 0; +} diff --git a/src/libsoup.mk b/src/libsoup.mk new file mode 100644 index 00000000..23c2793b --- /dev/null +++ b/src/libsoup.mk @@ -0,0 +1,30 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := libsoup +$(PKG)_WEBSITE := https://github.com/GNOME/libsoup +$(PKG)_DESCR := HTTP client/server library for GNOME +$(PKG)_IGNORE := +$(PKG)_VERSION := 2.57.1 +$(PKG)_APIVER := 2.4 +$(PKG)_CHECKSUM := 675c3bc11c2a6347625ca5215720d41c84fd8e9498dd664cda8a635fd5105a26 +$(PKG)_GH_CONF := GNOME/libsoup,,,pre\|SOUP\|base +$(PKG)_DEPS := gcc glib libxml2 sqlite + +define $(PKG)_BUILD + cd '$(SOURCE_DIR)' && \ + NOCONFIGURE=1 \ + ACLOCAL_FLAGS=-I'$(PREFIX)/$(TARGET)/share/aclocal' \ + ./autogen.sh + cd '$(BUILD_DIR)' && '$(SOURCE_DIR)'/configure \ + $(MXE_CONFIGURE_OPTS) \ + --disable-vala \ + --without-apache-httpd \ + --without-gssapi + $(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) + $(MAKE) -C '$(BUILD_DIR)' -j 1 install + + $(TARGET)-gcc \ + -W -Wall -Werror -ansi \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `$(TARGET)-pkg-config $(PKG)-$($(PKG)_APIVER) --cflags --libs` +endef diff --git a/src/libspectre-1-fixes.patch b/src/libspectre-1-fixes.patch new file mode 100644 index 00000000..389f0d52 --- /dev/null +++ b/src/libspectre-1-fixes.patch @@ -0,0 +1,49 @@ +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: darealshinji <djcj@gmx.de> +Date: Thu, 21 Jul 2016 12:00:00 +0200 +Subject: [PATCH] add PKG_CHECK_MODULES macro to configure.ac + + +diff --git a/configure.ac b/configure.ac +index 1111111..2222222 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -65,6 +65,7 @@ AC_CHECK_FUNC(_vscprintf, [ AC_DEFINE(HAVE__VSCPRINTF, 1, [Define if the '_vscpr + + LIBGS_REQUIRED="8.62" + ++PKG_CHECK_MODULES(GHOSTSCRIPT, [ghostscript >= $LIBGS_REQUIRED], [LIB_GS="$GHOSTSCRIPT_LIBS"], [ + AC_CHECK_LIB(gs, gsapi_new_instance, have_libgs=yes, have_libgs=no) + if test "x$have_libgs" = "xyes"; then + LIB_GS="-lgs" +@@ -97,6 +98,7 @@ if test "x$have_libgs" = "xyes"; then + else + AC_MSG_ERROR([You need libgs in order to compile libspectre]) + fi ++]) + AC_SUBST(LIB_GS) + + AC_ARG_ENABLE(asserts, + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: darealshinji <djcj@gmx.de> +Date: Thu, 21 Jul 2016 12:00:00 +0200 +Subject: [PATCH] enable out-of-tree builds + + +diff --git a/libspectre/Makefile.am b/libspectre/Makefile.am +index 1111111..2222222 100644 +--- a/libspectre/Makefile.am ++++ b/libspectre/Makefile.am +@@ -42,6 +42,7 @@ libspectre_la_SOURCES = \ + $(gv_sources) + + libspectre_la_CPPFLAGS = \ ++ -I@top_srcdir@ \ + $(SPECTRE_CFLAGS) + + libspectre_la_LIBADD = $(LIB_GS) diff --git a/src/libspectre-test.c b/src/libspectre-test.c new file mode 100644 index 00000000..0e468524 --- /dev/null +++ b/src/libspectre-test.c @@ -0,0 +1,22 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include <libspectre/spectre.h> + +int main(int argc, char *argv[]) +{ + SpectreDocument *document; + SpectreRenderContext *rc; + + (void)argc; + (void)argv; + + document = spectre_document_new(); + rc = spectre_render_context_new(); + + spectre_document_free(document); + spectre_render_context_free(rc); + + return 0; +} diff --git a/src/libspectre.mk b/src/libspectre.mk new file mode 100644 index 00000000..448b2c3e --- /dev/null +++ b/src/libspectre.mk @@ -0,0 +1,32 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := libspectre +$(PKG)_WEBSITE := https://libspectre.freedesktop.org/ +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.2.8 +$(PKG)_CHECKSUM := 65256af389823bbc4ee4d25bfd1cc19023ffc29ae9f9677f2d200fa6e98bc7a8 +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://libspectre.freedesktop.org/releases/$($(PKG)_FILE) +$(PKG)_DEPS := gcc cairo ghostscript + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://libspectre.freedesktop.org/releases/' | \ + $(SED) -n 's:.*>LATEST-libspectre-::p' | \ + $(SED) -n 's:<.*::p' +endef + +define $(PKG)_BUILD + cd '$(SOURCE_DIR)' && autoreconf -f -i + cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \ + $(MXE_CONFIGURE_OPTS) \ + --disable-silent-rules \ + --enable-test + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' install + echo "Requires: cairo ghostscript" >> '$(PREFIX)/$(TARGET)/lib/pkgconfig/libspectre.pc' + + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' $(PKG) --cflags --libs` +endef diff --git a/src/libssh2-1-fixes.patch b/src/libssh2-1-fixes.patch index f5b6239f..004d07ba 100644 --- a/src/libssh2-1-fixes.patch +++ b/src/libssh2-1-fixes.patch @@ -1,25 +1,61 @@ -This file is part of MXE. -See index.html for further information. - -From a1d0ed70e2c94d89d0b598eacca6ac79b8cd5508 Mon Sep 17 00:00:00 2001 +From 65ae975e2a670869580e289d5d9bf255d2a10209 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> Date: Sun, 2 Sep 2012 00:55:28 +0200 -Subject: [PATCH] include gpg-error with gcrypt for static linking +Subject: [PATCH 1/2] include gpg-error with gcrypt for static linking (mxe-specific) +Git rid of the extra -lgcrypt here since we have to pass the +whole list via LIBS. Otherwise, LIBS gets simplified with +-lgcrypt appearing only after its static dependencies. -diff --git a/configure.ac b/configure.ac -index 563fb04..16caa88 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -124,6 +124,7 @@ if test "$ac_cv_libgcrypt" = "yes"; then - AC_DEFINE(LIBSSH2_LIBGCRYPT, 1, [Use libgcrypt]) - LIBSREQUIRED= # libgcrypt doesn't provide a .pc file. sad face. - LIBS="$LIBS -lgcrypt" -+ LIBS="$LIBS `${prefix}/bin/gpg-error-config --libs`" - found_crypto=libgcrypt - fi - AM_CONDITIONAL(LIBGCRYPT, test "$ac_cv_libgcrypt" = "yes") +diff --git a/acinclude.m4 b/acinclude.m4 +index 734ef07..a6ee65a 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -423,7 +423,6 @@ AC_DEFUN([LIBSSH2_CHECKFOR_GCRYPT], [ + if test "$ac_cv_libgcrypt" = "yes"; then + AC_DEFINE(LIBSSH2_LIBGCRYPT, 1, [Use libgcrypt]) + LIBSREQUIRED= # libgcrypt doesn't provide a .pc file. sad face. +- LIBS="$LIBS -lgcrypt" + found_crypto=libgcrypt + else + # restore -- -2.1.0 +2.9.3 + + +From fb65371e600772e72491f06a368a727c96d525c7 Mon Sep 17 00:00:00 2001 +From: Mark Brand <mabrand@mabrand.nl> +Date: Mon, 7 Nov 2016 10:47:13 +0100 +Subject: [PATCH 2/2] fix yes/no in lib path + + +diff --git a/acinclude.m4 b/acinclude.m4 +index a6ee65a..510a0d3 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -386,10 +386,6 @@ AC_DEFUN([LIBSSH2_CHECKFOR_MBEDTLS], [ + + old_LDFLAGS=$LDFLAGS + old_CFLAGS=$CFLAGS +- if test -n "$use_mbedtls" && test "$use_mbedtls" != "no"; then +- LDFLAGS="$LDFLAGS -L$use_mbedtls/lib" +- CFLAGS="$CFLAGS -I$use_mbedtls/include" +- fi + + AC_LIB_HAVE_LINKFLAGS([mbedtls], [], [ + #include <mbedtls/version.h> +@@ -412,10 +408,6 @@ AC_DEFUN([LIBSSH2_CHECKFOR_GCRYPT], [ + + old_LDFLAGS=$LDFLAGS + old_CFLAGS=$CFLAGS +- if test -n "$use_libgcrypt" && test "$use_libgcrypt" != "no"; then +- LDFLAGS="$LDFLAGS -L$use_libgcrypt/lib" +- CFLAGS="$CFLAGS -I$use_libgcrypt/include" +- fi + AC_LIB_HAVE_LINKFLAGS([gcrypt], [], [ + #include <gcrypt.h> + ]) +-- +2.9.3 diff --git a/src/libssh2-test.c b/src/libssh2-test.c index 3587c026..baf5a875 100644 --- a/src/libssh2-test.c +++ b/src/libssh2-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdio.h> diff --git a/src/libssh2.mk b/src/libssh2.mk index c66e949e..d827de08 100644 --- a/src/libssh2.mk +++ b/src/libssh2.mk @@ -1,17 +1,17 @@ -# 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 := libssh2 +$(PKG)_WEBSITE := https://www.libssh2.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 1.6.0 -$(PKG)_CHECKSUM := 5a202943a34a1d82a1c31f74094f2453c207bf9936093867f41414968c8e8215 +$(PKG)_VERSION := 1.8.0 +$(PKG)_CHECKSUM := 39f34e2f6835f4b992cafe8625073a88e5a28ba78f83e8099610a7b3af4676d4 $(PKG)_SUBDIR := libssh2-$($(PKG)_VERSION) $(PKG)_FILE := libssh2-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.libssh2.org/download/$($(PKG)_FILE) +$(PKG)_URL := https://www.libssh2.org/download/$($(PKG)_FILE) $(PKG)_DEPS := gcc libgcrypt zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.libssh2.org/download/?C=M;O=D' | \ + $(WGET) -q -O- 'https://www.libssh2.org/download/?C=M;O=D' | \ grep 'libssh2-' | \ $(SED) -n 's,.*libssh2-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 @@ -24,11 +24,12 @@ define $(PKG)_BUILD --disable-examples-build \ --without-openssl \ --with-libgcrypt \ + LIBS="`$(PREFIX)/$(TARGET)/bin/libgcrypt-config --libs`" \ PKG_CONFIG='$(TARGET)-pkg-config' $(MAKE) -C '$(1)' -j '$(JOBS)' install $(MXE_DISABLE_CRUFT) '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libssh2.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libssh2.exe' \ `'$(TARGET)-pkg-config' --cflags --libs libssh2` endef diff --git a/src/libsvm-1-cmakelists.patch b/src/libsvm-1-cmakelists.patch index f10518a9..d7e559fb 100644 --- a/src/libsvm-1-cmakelists.patch +++ b/src/libsvm-1-cmakelists.patch @@ -4,9 +4,9 @@ diff -burN libsvm-3.20.orig/CMakeLists.txt libsvm-3.20/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 2.8) + -+add_library(libsvm svm.cpp) ++add_library(svm svm.cpp) + -+install(TARGETS libsvm ++install(TARGETS svm + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) diff --git a/src/libsvm.mk b/src/libsvm.mk index d122e86e..bc2e56a5 100644 --- a/src/libsvm.mk +++ b/src/libsvm.mk @@ -1,27 +1,24 @@ -# 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 := libsvm +$(PKG)_WEBSITE := https://www.csie.ntu.edu.tw/~cjlin/libsvm $(PKG)_IGNORE := -$(PKG)_VERSION := 3.20 -$(PKG)_CHECKSUM := 0f122480bef44dec4df6dae056f468c208e4e08c00771ec1b6dae2707fd945be +$(PKG)_VERSION := 3.22 +$(PKG)_CHECKSUM := 6d81c67d3b13073eb5a25aa77188f141b242ec328518fad95367ede253d0a77d $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.csie.ntu.edu.tw/~cjlin/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://www.csie.ntu.edu.tw/~cjlin/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.csie.ntu.edu.tw/~cjlin/libsvm/' | \ + $(WGET) -q -O- 'https://www.csie.ntu.edu.tw/~cjlin/libsvm/' | \ $(SED) -n 's,.*>v\([0-9][^<]*\)<.*,\1,p' | \ head -1 endef define $(PKG)_BUILD mkdir '$(1).build' - cd '$(1).build' && cmake \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -DBUILD_SHARED_LIBS=$(if $(BUILD_STATIC),FALSE,TRUE) \ - '$(1)' + cd '$(1).build' && '$(TARGET)-cmake' '$(1)' $(MAKE) -C '$(1).build' install diff --git a/src/libtool.mk b/src/libtool.mk index e2c703b3..34c36429 100644 --- a/src/libtool.mk +++ b/src/libtool.mk @@ -1,25 +1,18 @@ -# 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 := libtool +$(PKG)_WEBSITE := https://www.gnu.org/software/libtool/ +$(PKG)_DESCR := GNU Libtool $(PKG)_IGNORE := $(PKG)_VERSION := 2.4.4 $(PKG)_CHECKSUM := 159d4e20c201f929e3562536d3ae6b5e605403fa4bb4e72ef197a4e162c3fedf $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE) -$(PKG)_DEPS := autoconf automake +$(PKG)_URL := https://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE) +$(PKG)_DEPS := define $(PKG)_UPDATE - $(WGET) -q -O- 'http://ftp.gnu.org/gnu/libtool/?C=M;O=D' | \ + $(WGET) -q -O- 'https://ftp.gnu.org/gnu/libtool/?C=M;O=D' | \ $(SED) -n 's,.*<a href="libtool-\([0-9][^"]*\)\.tar.*,\1,p' | \ head -1 endef - -define $(PKG)_BUILD_$(BUILD) - mkdir '$(1).build' - cd '$(1).build' && '$(1)/configure' \ - --prefix='$(PREFIX)/$(TARGET)' - $(MAKE) -C '$(1).build' -j '$(JOBS)' - $(MAKE) -C '$(1).build' -j 1 install -endef diff --git a/src/libtorrent-rasterbar-1-fixes.patch b/src/libtorrent-rasterbar-1-fixes.patch new file mode 100644 index 00000000..fd946d99 --- /dev/null +++ b/src/libtorrent-rasterbar-1-fixes.patch @@ -0,0 +1,32 @@ +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, 30 May 2016 00:10:30 +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/include/libtorrent/config.hpp b/include/libtorrent/config.hpp +index 1111111..2222222 100644 +--- a/include/libtorrent/config.hpp ++++ b/include/libtorrent/config.hpp +@@ -64,10 +64,6 @@ POSSIBILITY OF SUCH DAMAGE. + #error TORRENT_DEBUG_BUFFERS only works if you also disable pool allocators with TORRENT_DISABLE_POOL_ALLOCATOR + #endif + +-#if !defined BOOST_ASIO_SEPARATE_COMPILATION && !defined BOOST_ASIO_DYN_LINK +-#define BOOST_ASIO_SEPARATE_COMPILATION +-#endif +- + #ifndef _MSC_VER + #ifndef __STDC_FORMAT_MACROS + #define __STDC_FORMAT_MACROS 1 diff --git a/src/libtorrent-rasterbar-1-getfileattributesex.patch b/src/libtorrent-rasterbar-1-getfileattributesex.patch deleted file mode 100644 index ec7abc61..00000000 --- a/src/libtorrent-rasterbar-1-getfileattributesex.patch +++ /dev/null @@ -1,30 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From 679ad4e2331484fda9da250cb269779daf703698 Mon Sep 17 00:00:00 2001 -From: Boris Nagaev <bnagaev@gmail.com> -Date: Sat, 29 Aug 2015 10:28:59 +0200 -Subject: [PATCH] file.cpp: use defined GetFileAttributesEx - -This macro was defined as GetFileAttributesEx_ but used -as GetFileAttributesEx. Strange. ---- - src/file.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/file.cpp b/src/file.cpp -index a3219b0..0276033 100644 ---- a/src/file.cpp -+++ b/src/file.cpp -@@ -208,7 +208,7 @@ namespace libtorrent - std::string f = convert_to_native(inf); - #endif - WIN32_FILE_ATTRIBUTE_DATA data; -- if (!GetFileAttributesEx(f.c_str(), GetFileExInfoStandard, &data)) -+ if (!GetFileAttributesEx_(f.c_str(), GetFileExInfoStandard, &data)) - { - ec.assign(GetLastError(), get_system_category()); - return; --- -1.7.10.4 - diff --git a/src/libtorrent-rasterbar-2-geoip-win32.patch b/src/libtorrent-rasterbar-2-geoip-win32.patch deleted file mode 100644 index f37b09aa..00000000 --- a/src/libtorrent-rasterbar-2-geoip-win32.patch +++ /dev/null @@ -1,29 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From 258068273e70f25b723c4813805e76f92b18264c Mon Sep 17 00:00:00 2001 -From: Boris Nagaev <bnagaev@gmail.com> -Date: Sat, 29 Aug 2015 11:03:49 +0200 -Subject: [PATCH] GeoIP.c: disable POSIX section - -WIN32 is not defined for some reason. ---- - src/GeoIP.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/GeoIP.c b/src/GeoIP.c -index cb4437e..be2c5e4 100644 ---- a/src/GeoIP.c -+++ b/src/GeoIP.c -@@ -22,7 +22,7 @@ - - #include "libtorrent/ConvertUTF.h" - --#ifndef WIN32 -+#ifndef _WIN32 - #include <netdb.h> - #include <sys/socket.h> - #include <netinet/in.h> /* For ntohl */ --- -1.7.10.4 - diff --git a/src/libtorrent-rasterbar-3-geoip-include-winsock2-before-windows.patch b/src/libtorrent-rasterbar-3-geoip-include-winsock2-before-windows.patch deleted file mode 100644 index c15fd129..00000000 --- a/src/libtorrent-rasterbar-3-geoip-include-winsock2-before-windows.patch +++ /dev/null @@ -1,37 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From 09eb90c58226b667e5ad327520c7bc3ec18617b8 Mon Sep 17 00:00:00 2001 -From: Boris Nagaev <bnagaev@gmail.com> -Date: Sat, 29 Aug 2015 11:15:52 +0200 -Subject: [PATCH] GeoIP.c: include winsock2.h before windows.h - -Fix a warning: - -In file included from GeoIP.c:35:0: -mxe/usr/i686-w64-mingw32.static/include/winsock2.h:15:2: -warning: #warning Please include winsock2.h before windows.h -[-Wcpp] - #warning Please include winsock2.h before windows.h - ^ ---- - src/GeoIP.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/GeoIP.c b/src/GeoIP.c -index be2c5e4..e1250e0 100644 ---- a/src/GeoIP.c -+++ b/src/GeoIP.c -@@ -31,8 +31,8 @@ - #include <sys/mman.h> - - #else --#include <windows.h> - #include <winsock2.h> -+#include <windows.h> - #define snprintf _snprintf - #endif - #include <errno.h> --- -1.7.10.4 - diff --git a/src/libtorrent-rasterbar-4-ed25519-seed-fix-includes.patch b/src/libtorrent-rasterbar-4-ed25519-seed-fix-includes.patch deleted file mode 100644 index 43d8887b..00000000 --- a/src/libtorrent-rasterbar-4-ed25519-seed-fix-includes.patch +++ /dev/null @@ -1,30 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From eddde6d65c1ec97ab473e40ce44cfef2a20e6bd6 Mon Sep 17 00:00:00 2001 -From: Boris Nagaev <bnagaev@gmail.com> -Date: Sat, 29 Aug 2015 11:20:16 +0200 -Subject: [PATCH] ed25519/src/seed.cpp: fix includes - ---- - ed25519/src/seed.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/ed25519/src/seed.cpp b/ed25519/src/seed.cpp -index 7619c66..d9dd1c1 100644 ---- a/ed25519/src/seed.cpp -+++ b/ed25519/src/seed.cpp -@@ -3,8 +3,8 @@ - #ifndef ED25519_NO_SEED - - #ifdef _WIN32 --#include <Windows.h> --#include <Wincrypt.h> -+#include <windows.h> -+#include <wincrypt.h> - #else - #include <stdio.h> - #endif --- -1.7.10.4 - diff --git a/src/libtorrent-rasterbar.mk b/src/libtorrent-rasterbar.mk index a8613c88..39188574 100644 --- a/src/libtorrent-rasterbar.mk +++ b/src/libtorrent-rasterbar.mk @@ -1,13 +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 := libtorrent-rasterbar +$(PKG)_WEBSITE := http://www.rasterbar.com/products/libtorrent/ $(PKG)_IGNORE := -$(PKG)_VERSION := 1.0.6 -$(PKG)_CHECKSUM := c97de804b77f44591801631aca3869567671df2d3e2afe7f5453d8db2478fd61 +$(PKG)_VERSION := 1.1.0 +$(PKG)_CHECKSUM := 2713df7da4aec5263ac11b6626ea966f368a5a8081103fd8f2f2ed97b5cd731d $(PKG)_SUBDIR := libtorrent-rasterbar-$($(PKG)_VERSION) $(PKG)_FILE := libtorrent-rasterbar-$($(PKG)_VERSION).tar.gz $(PKG)_URL := https://github.com/arvidn/libtorrent/releases/download/libtorrent-$(subst .,_,$($(PKG)_VERSION))/libtorrent-rasterbar-$($(PKG)_VERSION).tar.gz +# this will likely revert to standard naming in future releases +$(PKG)_URL := https://github.com/arvidn/libtorrent/releases/download/libtorrent-1_1/libtorrent-rasterbar-$($(PKG)_VERSION).tar.gz $(PKG)_DEPS := gcc boost openssl define $(PKG)_UPDATE @@ -17,14 +19,14 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - cd '$(1)' && \ - ./configure \ + cd '$(1)' && ./configure \ $(MXE_CONFIGURE_OPTS) \ PKG_CONFIG='$(PREFIX)/bin/$(TARGET)-pkg-config' \ - --with-boost-system=boost_system-mt \ + --with-boost='$(PREFIX)/$(TARGET)' \ --disable-debug \ --disable-tests \ - --disable-examples + --disable-examples \ + CXXFLAGS='-D_WIN32_WINNT=0x0501 -g -O2' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/libunistring.mk b/src/libunistring.mk index 3f5c5a77..12c91481 100644 --- a/src/libunistring.mk +++ b/src/libunistring.mk @@ -1,17 +1,17 @@ -# 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 := libunistring +$(PKG)_WEBSITE := https://www.gnu.org/software/libunistring/ $(PKG)_IGNORE := -$(PKG)_VERSION := 0.9.4 -$(PKG)_CHECKSUM := f5246d63286a42902dc096d6d44541fbe4204b6c02d6d5d28b457c9882ddd8a6 +$(PKG)_VERSION := 0.9.7 +$(PKG)_CHECKSUM := 9ce081cbee1951b55597b30e7030bda9d7b2f034ef901a135ff3a020be5a41e5 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc libiconv define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.savannah.gnu.org/gitweb/?p=libunistring.git;a=tags' | \ + $(WGET) -q -O- 'https://git.savannah.gnu.org/gitweb/?p=libunistring.git;a=tags' | \ grep '<a class="list name"' | \ $(SED) -n 's,.*<a[^>]*>v\([0-9][^<]*\)<.*,\1,p' | \ head -1 diff --git a/src/libusb.mk b/src/libusb.mk index dcdc9e5f..053ac5b2 100644 --- a/src/libusb.mk +++ b/src/libusb.mk @@ -1,13 +1,14 @@ -# 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 := libusb +$(PKG)_WEBSITE := https://libusb-win32.sourceforge.io/ +$(PKG)_DESCR := LibUsb $(PKG)_IGNORE := $(PKG)_VERSION := 1.2.6.0 $(PKG)_CHECKSUM := f3faf094c9b3415ede42eeb5032feda2e71945f13f0ca3da58ca10dcb439bfee $(PKG)_SUBDIR := $(PKG)-win32-src-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-win32-src-$($(PKG)_VERSION).zip -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)-win32/$(PKG)-win32-releases/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)-win32/$(PKG)-win32-releases/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc $(PKG)_MESSAGE :=*** libusb is deprecated - please use libusb1 *** @@ -18,7 +19,7 @@ define $(PKG)_UPDATE endef define $(PKG)_UPDATE_DISABLED - $(WGET) -q -O- 'http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef diff --git a/src/libusb1-test.c b/src/libusb1-test.c index 6cd6bf51..db381d86 100644 --- a/src/libusb1-test.c +++ b/src/libusb1-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdio.h> diff --git a/src/libusb1.mk b/src/libusb1.mk index 71e9efeb..2645409f 100644 --- a/src/libusb1.mk +++ b/src/libusb1.mk @@ -1,17 +1,18 @@ -# 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 := libusb1 +$(PKG)_WEBSITE := http://libusb.org/ +$(PKG)_DESCR := LibUsb-1.0 $(PKG)_IGNORE := -$(PKG)_VERSION := 1.0.19 -$(PKG)_CHECKSUM := 6c502c816002f90d4f76050a6429c3a7e0d84204222cbff2dce95dd773ba6840 +$(PKG)_VERSION := 1.0.21 +$(PKG)_CHECKSUM := 7dce9cce9a81194b7065ee912bcd55eeffebab694ea403ffb91b67db66b1824b $(PKG)_SUBDIR := libusb-$($(PKG)_VERSION) $(PKG)_FILE := libusb-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/libusb/libusb-1.0/libusb-$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/libusb/libusb-1.0/libusb-$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/libusb/files/libusb-1.0/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/libusb/files/libusb-1.0/' | \ grep -i 'libusb/files/libusb-1.0' | \ $(SED) -n 's,.*/libusb-1.0/libusb-\([0-9\.]*\)/.*,\1,p' | \ head -1 @@ -25,6 +26,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Wextra -Werror \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libusb1.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libusb1.exe' \ `'$(TARGET)-pkg-config' libusb-1.0 --cflags --libs` endef diff --git a/src/libuv-test.c b/src/libuv-test.c new file mode 100644 index 00000000..a31bf88a --- /dev/null +++ b/src/libuv-test.c @@ -0,0 +1,15 @@ +#include <stdio.h> +#include <stdlib.h> +#include <uv.h> + +int main() { + uv_loop_t *loop = malloc(sizeof(uv_loop_t)); + uv_loop_init(loop); + + printf("Now quitting.\n"); + uv_run(loop, UV_RUN_DEFAULT); + + uv_loop_close(loop); + free(loop); + return 0; +} diff --git a/src/libuv.mk b/src/libuv.mk new file mode 100644 index 00000000..b15e8965 --- /dev/null +++ b/src/libuv.mk @@ -0,0 +1,28 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := libuv +$(PKG)_WEBSITE := http://libuv.org/ +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.9.1 +$(PKG)_CHECKSUM := e83953782c916d7822ef0b94e8115ce5756fab5300cca173f0de5f5b0e0ae928 +$(PKG)_SUBDIR := $(PKG)-v$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-v$($(PKG)_VERSION).tar.gz +$(PKG)_URL := http://dist.libuv.org/dist/v$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc + +define $(PKG)_UPDATE + $(call MXE_GET_GITHUB_TAGS, libuv/libuv, v) +endef + +define $(PKG)_BUILD + cd '$(1)' && sh autogen.sh + cd '$(1)' && ./configure \ + $(MXE_CONFIGURE_OPTS) + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install + + '$(TARGET)-gcc' \ + -W -Wall -Werror -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' $(PKG) --libs` +endef diff --git a/src/libvpx-1-fixes.patch b/src/libvpx-1-fixes.patch index 211de0ae..a9cc7c8b 100644 --- a/src/libvpx-1-fixes.patch +++ b/src/libvpx-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/libvpx.mk b/src/libvpx.mk index 3bff844a..f335e0b8 100644 --- a/src/libvpx.mk +++ b/src/libvpx.mk @@ -1,13 +1,14 @@ -# 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 := libvpx +$(PKG)_WEBSITE := https://code.google.com/p/webm/ +$(PKG)_DESCR := vpx $(PKG)_IGNORE := -$(PKG)_VERSION := 1.4.0 -$(PKG)_CHECKSUM := f582d9b2d60a592a4a3d8c32965ca2d2167e9ade38c6c30bac8801ff66a118e4 +$(PKG)_VERSION := 1.5.0 +$(PKG)_CHECKSUM := 306d67908625675f8e188d37a81fbfafdf5068b09d9aa52702b6fbe601c76797 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://storage.googleapis.com/downloads.webmproject.org/releases/webm/$($(PKG)_FILE) +$(PKG)_URL := https://storage.googleapis.com/downloads.webmproject.org/releases/webm/$($(PKG)_FILE) $(PKG)_DEPS := gcc pthreads yasm define $(PKG)_UPDATE diff --git a/src/libwebp-1-fixes.patch b/src/libwebp-1-fixes.patch index 38e49617..a0a4cf3c 100644 --- a/src/libwebp-1-fixes.patch +++ b/src/libwebp-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/libwebp.mk b/src/libwebp.mk index e9e5d88c..6a784e9f 100644 --- a/src/libwebp.mk +++ b/src/libwebp.mk @@ -1,10 +1,10 @@ -# 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 := libwebp +$(PKG)_WEBSITE := https://developers.google.com/speed/webp/ $(PKG)_IGNORE := -$(PKG)_VERSION := 0.4.2 -$(PKG)_CHECKSUM := 14d825d7c2ef7d49621bcb6b83466be455585e671ae0a2ebc1f2e07775a1722d +$(PKG)_VERSION := 0.4.4 +$(PKG)_CHECKSUM := c65d34edb57338e331ba4d622227a2b3179444cfca17d02c34f1ead63f603e86 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://downloads.webmproject.org/releases/webp/$($(PKG)_FILE) diff --git a/src/libwebsockets-1-fixes.patch b/src/libwebsockets-1-fixes.patch index a292567d..ce7becce 100644 --- a/src/libwebsockets-1-fixes.patch +++ b/src/libwebsockets-1-fixes.patch @@ -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 e34eaa834b15533c6280b67d93d505432bd2fa94 Mon Sep 17 00:00:00 2001 From: Timothy Gu <timothygu99@gmail.com> diff --git a/src/libwebsockets.mk b/src/libwebsockets.mk index 6368e394..472c65f3 100644 --- a/src/libwebsockets.mk +++ b/src/libwebsockets.mk @@ -1,26 +1,23 @@ -# 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 := libwebsockets +$(PKG)_WEBSITE := https://libwebsockets.org/ $(PKG)_IGNORE := $(PKG)_VERSION := 1.4-chrome43-firefox-36 $(PKG)_CHECKSUM := e11492477e582ef0b1a6ea2f18d81a9619b449170a3a5c43f32a9468461a9798 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/snapshot/$($(PKG)_FILE) +$(PKG)_URL := https://github.com/warmcat/libwebsockets/archive/v$($(PKG)_VERSION).tar.gz $(PKG)_DEPS := gcc openssl zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.libwebsockets.org/cgi-bin/cgit/libwebsockets/' | \ - $(SED) -n 's,.*libwebsockets-\([0-9][^"]*\)\.tar.*,\1,p' | \ - head -1 + $(call MXE_GET_GITHUB_TAGS, warmcat/libwebsockets, \(v\|.[^0-9].*\)) endef define $(PKG)_BUILD - cd '$(1)' && cmake \ + cd '$(1)' && '$(TARGET)-cmake' \ -DLWS_WITHOUT_TESTAPPS=ON \ - -DLWS_USE_EXTERNAL_ZLIB=ON \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' + -DLWS_USE_EXTERNAL_ZLIB=ON $(MAKE) -C '$(1)' -j $(JOBS) $(MAKE) -C '$(1)' install endef diff --git a/src/libxml++.mk b/src/libxml++.mk index e81083db..43ca42da 100644 --- a/src/libxml++.mk +++ b/src/libxml++.mk @@ -1,17 +1,18 @@ -# 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 := libxml++ +$(PKG)_WEBSITE := https://libxmlplusplus.sourceforge.io/ +$(PKG)_DESCR := libxml2 $(PKG)_IGNORE := $(PKG)_VERSION := 2.37.2 $(PKG)_CHECKSUM := bb3e10a2148e90fc61098499a0923b4de786b1dd86466d7ec6255e154baa773b $(PKG)_SUBDIR := libxml++-$($(PKG)_VERSION) $(PKG)_FILE := libxml++-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://ftp.gnome.org/pub/GNOME/sources/libxml++/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/libxml++/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc glibmm libxml2 define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/libxml++/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/libxml++/refs/tags' | \ grep '<a href=' | \ $(SED) -n "s,.*<a href='[^']*/tag/?id=\\([0-9][^']*\\)'.*,\\1,p" | \ head -1 diff --git a/src/libxml2-1-fixes.patch b/src/libxml2-1-fixes.patch index 56e44796..0bbae070 100644 --- a/src/libxml2-1-fixes.patch +++ b/src/libxml2-1-fixes.patch @@ -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 91a883b212d0ea5f1d36618362baeca2f35abb29 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> diff --git a/src/libxml2.mk b/src/libxml2.mk index b9cc8bbd..f1c83678 100644 --- a/src/libxml2.mk +++ b/src/libxml2.mk @@ -1,18 +1,18 @@ -# 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 := libxml2 +$(PKG)_WEBSITE := http://www.xmlsoft.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 2.9.2 -$(PKG)_CHECKSUM := 5178c30b151d044aefb1b08bf54c3003a0ac55c59c866763997529d60770d5bc +$(PKG)_VERSION := 2.9.4 +$(PKG)_CHECKSUM := ffb911191e509b966deb55de705387f14156e1a56b21824357cdf0053233633c $(PKG)_SUBDIR := libxml2-$($(PKG)_VERSION) $(PKG)_FILE := libxml2-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://xmlsoft.org/sources/$($(PKG)_FILE) $(PKG)_URL_2 := ftp://xmlsoft.org/libxml2/$($(PKG)_FILE) -$(PKG)_DEPS := gcc xz +$(PKG)_DEPS := gcc xz zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/libxml2/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/libxml2/refs/tags' | \ grep '<a href=' | \ $(SED) -n "s,.*<a href='[^']*/tag/?id=v\\([0-9][^']*\\)'.*,\\1,p" | \ head -1 @@ -22,6 +22,7 @@ define $(PKG)_BUILD $(SED) -i 's,`uname`,MinGW,g' '$(1)/xml2-config.in' cd '$(1)' && ./configure \ $(MXE_CONFIGURE_OPTS) \ + --with-zlib='$(PREFIX)/$(TARGET)/lib' \ --without-debug \ --without-python \ --without-threads diff --git a/src/libxslt-1-fixes.patch b/src/libxslt-1-fixes.patch index 78b797ce..fae4db1e 100644 --- a/src/libxslt-1-fixes.patch +++ b/src/libxslt-1-fixes.patch @@ -1,11 +1,10 @@ -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. Contains ad hoc patches for cross building. From 5cdef88cc0bd288b4814509062234b72d27dc176 Mon Sep 17 00:00:00 2001 From: MXE -Date: Tue, 4 Jun 2013 17:28:16 +1000 +Date: Tue, 05 Jul 2016 21:12:38 +0300 Subject: [PATCH] fix for deprecated mkdir @@ -18,7 +17,7 @@ index 965175f..be36f4b 100644 ret = xsltCheckWritePath(sec, ctxt, directory); if (ret == 1) - ret = mkdir(directory, 0755); -+ ret = _mkdir(directory, 0755); ++ ret = _mkdir(directory); } xmlFree(directory); if (ret < 0) diff --git a/src/libxslt.mk b/src/libxslt.mk index 1e9675e1..478421ef 100644 --- a/src/libxslt.mk +++ b/src/libxslt.mk @@ -1,10 +1,10 @@ -# 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 := libxslt +$(PKG)_WEBSITE := http://xmlsoft.org/XSLT/ $(PKG)_IGNORE := -$(PKG)_VERSION := 1.1.28 -$(PKG)_CHECKSUM := 5fc7151a57b89c03d7b825df5a0fae0a8d5f05674c0e7cf2937ecec4d54a028c +$(PKG)_VERSION := 1.1.29 +$(PKG)_CHECKSUM := b5976e3857837e7617b29f2249ebb5eeac34e249208d31f1fbf7a6ba7a4090ce $(PKG)_SUBDIR := libxslt-$($(PKG)_VERSION) $(PKG)_FILE := libxslt-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://xmlsoft.org/sources/$($(PKG)_FILE) @@ -12,7 +12,7 @@ $(PKG)_URL_2 := ftp://xmlsoft.org/libxslt/$($(PKG)_FILE) $(PKG)_DEPS := gcc libgcrypt libxml2 define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/libxslt/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/libxslt/refs/tags' | \ grep '<a href=' | \ $(SED) -n "s,.*<a href='[^']*/tag/?id=v\\([0-9][^']*\\)'.*,\\1,p" | \ head -1 @@ -20,15 +20,10 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ - --host='$(TARGET)' \ - --build="`config.guess`" \ - --disable-shared \ + $(MXE_CONFIGURE_OPTS) \ --without-debug \ - --prefix='$(PREFIX)/$(TARGET)' \ --with-libxml-prefix='$(PREFIX)/$(TARGET)' \ --without-python \ --without-plugins $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= endef - -$(PKG)_BUILD_SHARED = diff --git a/src/libzip-1-fixes.patch b/src/libzip-1-fixes.patch new file mode 100644 index 00000000..03ff8457 --- /dev/null +++ b/src/libzip-1-fixes.patch @@ -0,0 +1,50 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +From 8aa28e38f7b753c40fa1d107d88a5e1281a09dec Mon Sep 17 00:00:00 2001 +From: Sylvain Beucler <beuc@beuc.net> +Date: Sun, 15 Jan 2017 17:25:49 +0100 +Subject: [PATCH 1/2] static build fixes + + +diff --git a/lib/zip.h b/lib/zip.h +index 27141b3..8d85e61 100644 +--- a/lib/zip.h ++++ b/lib/zip.h +@@ -37,9 +37,9 @@ + + #ifndef ZIP_EXTERN + # ifndef ZIP_STATIC +-# ifdef _WIN32 ++# ifdef _MSC_VER + # define ZIP_EXTERN __declspec(dllimport) +-# elif defined(__GNUC__) && __GNUC__ >= 4 ++# elif (defined(__GNUC__) && __GNUC__ >= 4) && !defined(_WIN32) + # define ZIP_EXTERN __attribute__ ((visibility ("default"))) + # else + # define ZIP_EXTERN +-- +2.9.3 + + +From d7b8bf5ccfbedfc10bddaa46f19c08635f1fa17f Mon Sep 17 00:00:00 2001 +From: Sylvain Beucler <beuc@beuc.net> +Date: Sun, 15 Jan 2017 17:28:42 +0100 +Subject: [PATCH 2/2] pkgconfig private + + +diff --git a/libzip.pc.in b/libzip.pc.in +index ef8af2d..f053510 100644 +--- a/libzip.pc.in ++++ b/libzip.pc.in +@@ -9,6 +9,7 @@ zipcmp=@prefix@/bin/zipcmp + Name: libzip + Description: library for handling zip archives + Version: @VERSION@ +-Libs: @PKG_CONFIG_RPATH@ -L${libdir} -lzip @LIBS@ ++Libs: @PKG_CONFIG_RPATH@ -L${libdir} -lzip + Cflags: -I${includedir} -I${libincludedir} ++Requires.private: zlib + +-- +2.9.3 + diff --git a/src/libzip-1-static_build.patch b/src/libzip-1-static_build.patch deleted file mode 100644 index c9d03b03..00000000 --- a/src/libzip-1-static_build.patch +++ /dev/null @@ -1,22 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -This is a quick&dirty fix. - -The bug is being discussed at -http://www.nih.at/listarchive/libzip-discuss/msg00304.html - ---- a/lib/zip.h 2013-03-19 11:09:51.000000000 +0100 -+++ b/lib/zip.h 2013-05-23 16:50:53.881403133 +0200 -@@ -37,9 +37,9 @@ - - - #ifndef ZIP_EXTERN --#ifdef _WIN32 -+#ifdef _MSC_VER - #define ZIP_EXTERN __declspec(dllimport) --#elif defined(__GNUC__) && __GNUC__ >= 4 -+#elif (defined(__GNUC__) && __GNUC__ >= 4) && !defined(_WIN32) - #define ZIP_EXTERN __attribute__ ((visibility ("default"))) - #else - #define ZIP_EXTERN diff --git a/src/libzip-2-pkgconfig_private.patch b/src/libzip-2-pkgconfig_private.patch deleted file mode 100644 index e253cf1a..00000000 --- a/src/libzip-2-pkgconfig_private.patch +++ /dev/null @@ -1,16 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -Only advertise -lz for static builds. - ---- a/libzip.pc.in 2012-03-15 10:28:05.000000000 +0100 -+++ b/libzip.pc.in 2012-12-18 22:48:27.807773881 +0100 -@@ -9,6 +9,7 @@ - Name: libzip - Description: library for handling zip archives - Version: @VERSION@ --Libs: -L${libdir} -lzip @LIBS@ -+Libs: -L${libdir} -lzip - Cflags: -I${includedir} -I${libincludedir} -+Requires.private: zlib - diff --git a/src/libzip-test.c b/src/libzip-test.c index e23b3255..26615929 100644 --- a/src/libzip-test.c +++ b/src/libzip-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <zip.h> diff --git a/src/libzip.mk b/src/libzip.mk index 9d1e1891..e0b81a33 100644 --- a/src/libzip.mk +++ b/src/libzip.mk @@ -1,17 +1,17 @@ -# 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 := libzip +$(PKG)_WEBSITE := https://www.nih.at/libzip/ $(PKG)_IGNORE := -$(PKG)_VERSION := 0.11.2 -$(PKG)_CHECKSUM := 7cfbbc2c540e154b933b6e9ec781e2671086bd8114eb744ae1a1ade34d2bb6bb +$(PKG)_VERSION := 1.1.3 +$(PKG)_CHECKSUM := 729a295a59a9fd6e5b9fe9fd291d36ae391a9d2be0b0824510a214cfaa05ceee $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://www.nih.at/libzip/$($(PKG)_FILE) +$(PKG)_URL := https://www.nih.at/libzip/$($(PKG)_FILE) $(PKG)_DEPS := gcc zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.nih.at/libzip/' | \ + $(WGET) -q -O- 'https://www.nih.at/libzip/' | \ $(SED) -n 's,.*libzip-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef @@ -23,6 +23,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libzip.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-libzip.exe' \ `'$(TARGET)-pkg-config' libzip --cflags --libs` endef diff --git a/src/llvm.mk b/src/llvm.mk index 8d6cfced..33a337e4 100644 --- a/src/llvm.mk +++ b/src/llvm.mk @@ -1,17 +1,17 @@ -# 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 := llvm +$(PKG)_WEBSITE := http://llvm.org/ $(PKG)_IGNORE := $(PKG)_VERSION := 3.4 $(PKG)_CHECKSUM := 25a5612d692c48481b9b397e2b55f4870e447966d66c96d655241702d44a2628 $(PKG)_SUBDIR := llvm-$($(PKG)_VERSION) $(PKG)_FILE := llvm-$($(PKG)_VERSION).src.tar.gz -$(PKG)_URL := http://llvm.org/releases/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := http://releases.llvm.org/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://llvm.org/releases/download.html' | \ + $(WGET) -q -O- 'http://releases.llvm.org/download.html' | \ grep 'Download LLVM' | \ $(SED) -n 's,.*LLVM \([0-9][^<]*\).*,\1,p' | \ head -1 @@ -19,10 +19,7 @@ endef define $(PKG)_BUILD mkdir '$(1)/build' - cd '$(1)/build' && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -DLIBTYPE=$(if $(BUILD_STATIC),STATIC,SHARED) \ - -DBUILD_SHARED_LIBS=$(if $(BUILD_STATIC),OFF,ON) \ + cd '$(1)/build' && '$(TARGET)-cmake' .. \ -DLLVM_BUILD_TOOLS=OFF $(MAKE) -C '$(1)/build' -j $(JOBS) llvm-tblgen $(MAKE) -C '$(1)/build' -j $(JOBS) intrinsics_gen diff --git a/src/log4cxx-1-gcc.4.4.patch b/src/log4cxx-1-gcc.4.4.patch index 51e8598d..3252b933 100644 --- a/src/log4cxx-1-gcc.4.4.patch +++ b/src/log4cxx-1-gcc.4.4.patch @@ -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. These changes have already been applied to log4cxx trunk to update inclusions for recent gcc's. diff --git a/src/log4cxx-2-pkgconfig.patch b/src/log4cxx-2-pkgconfig.patch index f86d360c..680b7df1 100644 --- a/src/log4cxx-2-pkgconfig.patch +++ b/src/log4cxx-2-pkgconfig.patch @@ -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. This patch ensures that the correct dependencies can always be found for static mingw builds. Submitted upstream: diff --git a/src/log4cxx-3-warnings.patch b/src/log4cxx-3-warnings.patch index 93983541..a1e67762 100644 --- a/src/log4cxx-3-warnings.patch +++ b/src/log4cxx-3-warnings.patch @@ -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. Already applied to log4cxx trunk. diff --git a/src/log4cxx-4-cmake.patch b/src/log4cxx-4-cmake.patch index 7628fb69..89380e4f 100644 --- a/src/log4cxx-4-cmake.patch +++ b/src/log4cxx-4-cmake.patch @@ -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. diff -NBaur vanilla/log4cxx-config.cmake mingw_cross/log4cxx-config.cmake --- vanilla/log4cxx-config.cmake 1970-01-01 09:00:00.000000000 +0900 diff --git a/src/log4cxx-test.cpp b/src/log4cxx-test.cpp index 460ee33e..c38d5c5f 100644 --- a/src/log4cxx-test.cpp +++ b/src/log4cxx-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <cstdlib> diff --git a/src/log4cxx.mk b/src/log4cxx.mk index 6a14190d..dcfacb24 100644 --- a/src/log4cxx.mk +++ b/src/log4cxx.mk @@ -1,7 +1,7 @@ -# 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 := log4cxx +$(PKG)_WEBSITE := https://logging.apache.org/log4cxx/ $(PKG)_IGNORE := $(PKG)_VERSION := 0.10.0 $(PKG)_CHECKSUM := 0de0396220a9566a580166e66b39674cb40efd2176f52ad2c65486c99c920c8c @@ -12,17 +12,14 @@ $(PKG)_URL_2 := http://apache.mirror.cdnetworks.com//logging/log4cxx/0.10.0/$ $(PKG)_DEPS := gcc apr-util define $(PKG)_UPDATE - $(WGET) -q -O- 'http://logging.apache.org/log4cxx/download.html' | \ + $(WGET) -q -O- 'https://logging.apache.org/log4cxx/download.html' | \ $(SED) -n 's,.*log4cxx-\([0-9.]*\)\.tar.*,\1,p' | \ head -1 endef define $(PKG)_BUILD cd '$(1)' && ./configure \ - --prefix='$(PREFIX)/$(TARGET)' \ - --host='$(TARGET)' \ - --disable-shared \ - --enable-static \ + $(MXE_CONFIGURE_OPTS) \ --with-apr='$(PREFIX)/$(TARGET)' \ --with-apr-util='$(PREFIX)/$(TARGET)' \ CFLAGS=-D_WIN32_WINNT=0x0500 \ @@ -33,7 +30,7 @@ define $(PKG)_BUILD '$(TARGET)-g++' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-log4cxx.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-log4cxx.exe' \ `$(TARGET)-pkg-config liblog4cxx --libs` endef diff --git a/src/lua-1-fixes.patch b/src/lua-1-fixes.patch new file mode 100644 index 00000000..e364ed3d --- /dev/null +++ b/src/lua-1-fixes.patch @@ -0,0 +1,52 @@ +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, 4 Jan 2016 01:00:02 +0300 +Subject: [PATCH] disable readline on linux, macosx and freebsd + + +diff --git a/src/Makefile b/src/Makefile +index 1111111..2222222 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -102,15 +102,15 @@ c89: + + + freebsd: +- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -lreadline" ++ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" + + generic: $(ALL) + + linux: +- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline" ++ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl" + + macosx: +- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" CC=cc ++ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" CC=cc + + mingw: + $(MAKE) "LUA_A=lua53.dll" "LUA_T=lua.exe" \ +diff --git a/src/luaconf.h b/src/luaconf.h +index 1111111..2222222 100644 +--- a/src/luaconf.h ++++ b/src/luaconf.h +@@ -61,14 +61,12 @@ + #if defined(LUA_USE_LINUX) + #define LUA_USE_POSIX + #define LUA_USE_DLOPEN /* needs an extra library: -ldl */ +-#define LUA_USE_READLINE /* needs some extra libraries */ + #endif + + + #if defined(LUA_USE_MACOSX) + #define LUA_USE_POSIX + #define LUA_USE_DLOPEN /* MacOS does not need -ldl */ +-#define LUA_USE_READLINE /* needs an extra library: -lreadline */ + #endif + + diff --git a/src/lua-test.c b/src/lua-test.c index 68de286b..3e95237c 100644 --- a/src/lua-test.c +++ b/src/lua-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdio.h> diff --git a/src/lua.mk b/src/lua.mk index eadfa790..377dec91 100644 --- a/src/lua.mk +++ b/src/lua.mk @@ -1,24 +1,30 @@ -# 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 := lua +$(PKG)_WEBSITE := https://www.lua.org/ +$(PKG)_DESCR := Lua $(PKG)_IGNORE := -$(PKG)_VERSION := 5.3.1 -# Shared version -$(PKG)_SOVERS := 53 -$(PKG)_CHECKSUM := 072767aad6cc2e62044a66e8562f51770d941e972dc1e4068ba719cd8bffac17 +$(PKG)_VERSION := 5.3.3 +# Shared version and luarocks subdir +$(PKG)_SHORTVER := $(call SHORT_PKG_VERSION,$(PKG)) +$(PKG)_DLLVER := $(subst .,,$($(PKG)_SHORTVER)) +$(PKG)_CHECKSUM := 5113c06884f7de453ce57702abaac1d618307f33f6789fa870e87a59d772aca2 $(PKG)_SUBDIR := lua-$($(PKG)_VERSION) $(PKG)_FILE := lua-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.lua.org/ftp/$($(PKG)_FILE) +$(PKG)_URL := https://www.lua.org/ftp/$($(PKG)_FILE) $(PKG)_DEPS := gcc +$(PKG)_DEPS_$(BUILD) := define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.lua.org/download.html' | \ + $(WGET) -q -O- 'https://www.lua.org/download.html' | \ $(SED) -n 's,.*lua-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef define $(PKG)_BUILD_COMMON + touch '$(PREFIX)/$(TARGET)/lib/lua/$($(PKG)_SHORTVER)/.gitkeep' + touch '$(PREFIX)/$(TARGET)/share/lua/$($(PKG)_SHORTVER)/.gitkeep' + #pkg-config file (echo 'Name: $(PKG)'; \ echo 'Version: $($(PKG)_VERSION)'; \ @@ -26,9 +32,11 @@ define $(PKG)_BUILD_COMMON echo 'Libs: -l$(PKG)';) \ > '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc' + cp '$(1)/src/lua' '$(PREFIX)/$(TARGET)/bin/lua.exe' + '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-lua.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-lua.exe' \ `$(TARGET)-pkg-config --libs lua` endef @@ -38,7 +46,7 @@ define $(PKG)_BUILD CC='$(TARGET)-gcc' \ AR='$(TARGET)-ar rcu' \ RANLIB='$(TARGET)-ranlib' \ - a + a lua # lua.h is installed to noinstall/ to avoid error when executing an empty # 'install' command. @@ -49,6 +57,7 @@ define $(PKG)_BUILD TO_BIN='lua.h' \ INSTALL='$(INSTALL)' \ install + $($(PKG)_BUILD_COMMON) endef @@ -59,26 +68,25 @@ define $(PKG)_BUILD_SHARED AR='$(TARGET)-gcc -Wl,--out-implib,liblua.dll.a -shared -o' \ RANLIB='echo skipped ranlib' \ SYSCFLAGS='-DLUA_BUILD_AS_DLL' \ - LUA_A=lua$($(PKG)_SOVERS).dll \ - a + LUA_A=lua$($(PKG)_DLLVER).dll \ + a lua $(MAKE) -C '$(1)' -j 1 \ INSTALL_TOP='$(PREFIX)/$(TARGET)' \ INSTALL_MAN='$(1)/noinstall' \ - TO_BIN='lua$($(PKG)_SOVERS).dll' \ + TO_BIN='lua$($(PKG)_DLLVER).dll' \ INSTALL='$(INSTALL)' \ TO_LIB='liblua.dll.a' \ install + $($(PKG)_BUILD_COMMON) endef -# disable native build temporarily -define $(PKG)_BUILD_DISABLED +define $(PKG)_BUILD_$(BUILD) $(MAKE) -C '$(1)/src' -j '$(JOBS)' \ - INSTALL_TOP='$(PREFIX)/$(TARGET)' \ - INSTALL='$(INSTALL)' \ + CC='$(BUILD_CC)' \ PLAT=$(shell ([ `uname -s` == Darwin ] && echo "macosx") || echo `uname -s` | tr '[:upper:]' '[:lower:]') - $(MAKE) -C '$(1)' -j 1 \ - INSTALL_TOP='$(PREFIX)/$(TARGET)' \ - INSTALL='$(INSTALL)' \ - install + $(INSTALL) '$(1)/src/lua' '$(PREFIX)/bin/$(BUILD)-lua' + ln -sf '$(PREFIX)/bin/$(BUILD)-lua' '$(PREFIX)/$(BUILD)/bin/lua' + $(INSTALL) '$(1)/src/luac' '$(PREFIX)/bin/$(BUILD)-luac' + ln -sf '$(PREFIX)/bin/$(BUILD)-luac' '$(PREFIX)/$(BUILD)/bin/luac' endef diff --git a/src/luabind-1-cmakelists.patch b/src/luabind-1-cmakelists.patch index cef6d17e..5f36ca9e 100644 --- a/src/luabind-1-cmakelists.patch +++ b/src/luabind-1-cmakelists.patch @@ -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. commit 9b4639e25442a3b6d0337d8e602a8332ec0e26e0 Author: Boris Nagaev <bnagaev@gmail.com> diff --git a/src/luabind-2-elif.patch b/src/luabind-2-elif.patch index db57ffd6..5debafca 100644 --- a/src/luabind-2-elif.patch +++ b/src/luabind-2-elif.patch @@ -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. commit eb5ec7b7b1deb7301eba0333e6736a975b4396df Author: Boris Nagaev <bnagaev@gmail.com> diff --git a/src/luabind-3-globalsindex.patch b/src/luabind-3-globalsindex.patch index e34c00b4..74a2687a 100644 --- a/src/luabind-3-globalsindex.patch +++ b/src/luabind-3-globalsindex.patch @@ -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. commit 7325c469a8eb443cd2d46c9860f278cd2672dace Author: Boris Nagaev <bnagaev@gmail.com> diff --git a/src/luabind-4-fenv.patch b/src/luabind-4-fenv.patch index ca01fe53..5d2178d0 100644 --- a/src/luabind-4-fenv.patch +++ b/src/luabind-4-fenv.patch @@ -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. commit eb4c3507be8a468da07d6ad9f8019c90fbd31b76 Author: Boris Nagaev <bnagaev@gmail.com> diff --git a/src/luabind-5-lua-resume.patch b/src/luabind-5-lua-resume.patch index 7ead13f6..aab5f757 100644 --- a/src/luabind-5-lua-resume.patch +++ b/src/luabind-5-lua-resume.patch @@ -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. commit 61587d1b0ffa1d08874154fcdaf0644f8b5b2461 Author: Boris Nagaev <bnagaev@gmail.com> diff --git a/src/luabind-7-compatibility-Lua-macro.patch b/src/luabind-7-compatibility-Lua-macro.patch index 69b2c0d6..923e48f0 100644 --- a/src/luabind-7-compatibility-Lua-macro.patch +++ b/src/luabind-7-compatibility-Lua-macro.patch @@ -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 456cad416f81c985b726fbf63fd7734e472c8b5f Mon Sep 17 00:00:00 2001 From: Boris Nagaev <bnagaev@gmail.com> diff --git a/src/luabind.mk b/src/luabind.mk index c8c2e9d7..120b2a1e 100644 --- a/src/luabind.mk +++ b/src/luabind.mk @@ -1,32 +1,32 @@ -# 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 := luabind +$(PKG)_WEBSITE := http://www.rasterbar.com/products/luabind.html +$(PKG)_DESCR := Luabind $(PKG)_IGNORE := $(PKG)_VERSION := 0.9.1 $(PKG)_CHECKSUM := 80de5e04918678dd8e6dac3b22a34b3247f74bf744c719bae21faaa49649aaae $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/luabind/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/luabind/$($(PKG)_FILE) $(PKG)_DEPS := gcc boost lua define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/luabind/files/luabind/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/luabind/files/luabind/' | \ $(SED) -n 's,.*<a href="/projects/luabind/files/luabind/\([0-9][^>]*\)/.*,\1,p' | \ head -1 endef define $(PKG)_BUILD mkdir '$(1).build' - cd '$(1).build' && cmake \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + cd '$(1).build' && '$(TARGET)-cmake' \ '$(1)' $(MAKE) -C '$(1).build' -j '$(JOBS)' VERBOSE=1 || $(MAKE) -C '$(1).build' -j 1 VERBOSE=1 $(MAKE) -C '$(1).build' -j 1 install VERBOSE=1 '$(TARGET)-g++' \ -W -Wall \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-luabind.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-luabind.exe' \ -llua -lluabind endef diff --git a/src/luajit-1-fixes.patch b/src/luajit-1-fixes.patch index 2b8ebc97..15b2acc4 100644 --- a/src/luajit-1-fixes.patch +++ b/src/luajit-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/luajit.mk b/src/luajit.mk index 73457e96..e79fd125 100644 --- a/src/luajit.mk +++ b/src/luajit.mk @@ -1,14 +1,17 @@ -# 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 := luajit +$(PKG)_WEBSITE := https://luajit.org/luajit.html +$(PKG)_DESCR := LuaJIT $(PKG)_IGNORE := $(PKG)_VERSION := 2.0.4 +$(PKG)_ABIVER := 5.1 $(PKG)_CHECKSUM := 620fa4eb12375021bef6e4f237cbd2dd5d49e56beb414bee052c746beef1807d $(PKG)_SUBDIR := LuaJIT-$($(PKG)_VERSION) $(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz -$(PKG)_URL := http://luajit.org/download/$($(PKG)_FILE) +$(PKG)_URL := https://luajit.org/download/$($(PKG)_FILE) $(PKG)_DEPS := gcc dlfcn-win32 +$(PKG)_DEPS_$(BUILD) := define $(PKG)_BUILD $(MAKE) -C '$(1)' -j '$(JOBS)' \ @@ -21,6 +24,13 @@ define $(PKG)_BUILD install endef +define $(PKG)_BUILD_$(BUILD) + $(MAKE) -C '$(1)' -j '$(JOBS)' \ + BUILDMODE=static \ + PREFIX='$(PREFIX)/$(BUILD)' \ + install +endef + # gcc -m64 is only available on 64-bit machines ifeq (,$(findstring 64,$(BUILD))) $(PKG)_BUILD_x86_64-w64-mingw32 = diff --git a/src/lz4-test.c b/src/lz4-test.c new file mode 100644 index 00000000..c083f67e --- /dev/null +++ b/src/lz4-test.c @@ -0,0 +1,36 @@ +#include <lz4.h> + +#include <string.h> +#include <stdio.h> + +int +main(int argc, char *argv[]) +{ + const char *data; + int data_len; + char compressed[100]; + int compressed_size; + char decompressed[100]; + + (void)argc; + (void)argv; + + data = "Some data to compress"; + data_len = strlen(data); + + /* compress */ + compressed_size = LZ4_compress_default(data, compressed, data_len, 100); + if (compressed_size <= 0) { + printf("Error compressing the data\n"); + return 1; + } + + LZ4_decompress_fast(compressed, decompressed, data_len); + if (strcmp(data, decompressed) != 0) { + printf("Error: the compression was not lossless. Original='%s' Result='%s'\n", data, decompressed); + return 3; + } + + printf("Successfully compressed and decompressed!\n"); + return 0; +} diff --git a/src/lz4.mk b/src/lz4.mk new file mode 100644 index 00000000..a76e3010 --- /dev/null +++ b/src/lz4.mk @@ -0,0 +1,27 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := lz4 +$(PKG)_WEBSITE := https://github.com/$(PKG)/$(PKG) +$(PKG)_DESCR := lossless compression algorithm optimized for speed +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.7.5 +$(PKG)_CHECKSUM := 0190cacd63022ccb86f44fa5041dc6c3804407ad61550ca21c382827319e7e7e +$(PKG)_GH_CONF := lz4/lz4,v +$(PKG)_DEPS := gcc + +define $(PKG)_BUILD + # build and install the library + cd '$(BUILD_DIR)' && $(TARGET)-cmake \ + -DCMAKE_INSTALL_BINDIR=$(BUILD_DIR)/null \ + -DCMAKE_INSTALL_MANDIR=$(BUILD_DIR)/null \ + '$(SOURCE_DIR)/contrib/cmake_unofficial' + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install + $(if $(BUILD_SHARED), $(INSTALL) '$(BUILD_DIR)/liblz4.dll' '$(PREFIX)/$(TARGET)/bin/') + + # compile test + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' lib$(PKG) --cflags --libs` +endef diff --git a/src/lzma-1-include-stdio.h.patch b/src/lzma-1-include-stdio.h.patch index dfcda630..f560fc46 100644 --- a/src/lzma-1-include-stdio.h.patch +++ b/src/lzma-1-include-stdio.h.patch @@ -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 dd3c0c213571d2ff8acbb3b19966cfa4d6bff3cc Mon Sep 17 00:00:00 2001 From: Boris Nagaev <bnagaev@gmail.com> diff --git a/src/lzma-2-mystring-include-windows.patch b/src/lzma-2-mystring-include-windows.patch index 1b157642..f58783c8 100644 --- a/src/lzma-2-mystring-include-windows.patch +++ b/src/lzma-2-mystring-include-windows.patch @@ -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 7798a70fa69dc4994cc25f82ec3e9b2b368d50fe Mon Sep 17 00:00:00 2001 From: Boris Nagaev <bnagaev@gmail.com> diff --git a/src/lzma.mk b/src/lzma.mk index 239ae39c..2ff18a0e 100644 --- a/src/lzma.mk +++ b/src/lzma.mk @@ -1,18 +1,21 @@ -# 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 := lzma +$(PKG)_WEBSITE := http://www.7-zip.org/sdk.html +$(PKG)_DESCR := LZMA SDK $(PKG)_IGNORE := -$(PKG)_VERSION := 920 -$(PKG)_CHECKSUM := 8ac221acdca8b6f6dd110120763af42b3707363752fc04e63c7bbff76774a445 +$(PKG)_VERSION := 1700 +$(PKG)_CHECKSUM := 2e87fbd0f61560187d40d23dd5ed6eecb871070d58acabd0ed7b349860c352f4 $(PKG)_SUBDIR := . -$(PKG)_FILE := lzma$(subst .,,$($(PKG)_VERSION)).tar.bz2 +$(PKG)_FILE := lzma$(subst .,,$($(PKG)_VERSION)).7z $(PKG)_URL := http://www.7-zip.org/a/$($(PKG)_FILE) $(PKG)_DEPS := gcc +$(PKG)_DEPS_$(BUILD) := +$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) define $(PKG)_UPDATE $(WGET) -q -O- 'http://www.7-zip.org/sdk.html' | \ - $(SED) -n 's,.*lzma\([0-9][^"]*\)\.tar.*,\1,p' | \ + $(SED) -n 's,.*lzma\([0-9][^"]*\)\.7z.*,\1,p' | \ head -1 endef @@ -40,3 +43,5 @@ define $(PKG)_BUILD cp '$(1)/CPP/7zip/Bundles/LzmaCon/lzma.exe' \ '$(PREFIX)/$(TARGET)/bin/lzma-cxx.exe' endef + +$(PKG)_BUILD_$(BUILD) := diff --git a/src/lzo.mk b/src/lzo.mk index 379630b3..d8dfc1f1 100644 --- a/src/lzo.mk +++ b/src/lzo.mk @@ -1,17 +1,17 @@ -# 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 := lzo +$(PKG)_WEBSITE := https://www.oberhumer.com/opensource/lzo/ $(PKG)_IGNORE := -$(PKG)_VERSION := 2.08 -$(PKG)_CHECKSUM := ac1b3e4dee46febe9fd28737eb7f5692d3232ef1a01da10444394c3d47536614 +$(PKG)_VERSION := 2.09 +$(PKG)_CHECKSUM := f294a7ced313063c057c504257f437c8335c41bfeed23531ee4e6a2b87bcb34c $(PKG)_SUBDIR := lzo-$($(PKG)_VERSION) $(PKG)_FILE := lzo-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.oberhumer.com/opensource/lzo/download/$($(PKG)_FILE) +$(PKG)_URL := https://www.oberhumer.com/opensource/lzo/download/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.oberhumer.com/opensource/lzo/download/' | \ + $(WGET) -q -O- 'https://www.oberhumer.com/opensource/lzo/download/' | \ grep 'lzo-' | \ grep -v 'minilzo-' | \ $(SED) -n 's,.*lzo-\([0-9][^>]*\)\.tar.*,\1,p' | \ diff --git a/src/matio-1-portability.patch b/src/matio-1-portability.patch index 8949ab84..47993483 100644 --- a/src/matio-1-portability.patch +++ b/src/matio-1-portability.patch @@ -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. --- a/src/matio_private.h 2013-01-25 22:56:35.791936384 +0100 +++ b/src/matio_private.h 2013-01-25 22:56:48.915937755 +0100 diff --git a/src/matio.mk b/src/matio.mk index 5c0e3172..cccf09c6 100644 --- a/src/matio.mk +++ b/src/matio.mk @@ -1,17 +1,17 @@ -# 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 := matio +$(PKG)_WEBSITE := https://sourceforge.net/projects/matio/ $(PKG)_IGNORE := $(PKG)_VERSION := 1.5.2 $(PKG)_CHECKSUM := db02d0fb3373c3d766a606309b17e64a5d8da55610e921a9f1a0ec171e911d45 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc hdf5 zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/matio/files/matio/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/matio/files/matio/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef diff --git a/src/mdbtools.mk b/src/mdbtools.mk index e3575268..0ac7dc99 100644 --- a/src/mdbtools.mk +++ b/src/mdbtools.mk @@ -1,13 +1,13 @@ -# 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 := mdbtools +$(PKG)_WEBSITE := https://sourceforge.net/projects/mdbtools/ $(PKG)_IGNORE := $(PKG)_VERSION := 0.7.1 $(PKG)_CHECKSUM := 4eac1bce55066a38d9ea6c52a8e8ecc101b79afe75118ecc16852990472c4721 $(PKG)_SUBDIR := brianb-mdbtools-f8ce1cc $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://github.com/brianb/$(PKG)/tarball/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://github.com/brianb/$(PKG)/tarball/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc glib define $(PKG)_UPDATE diff --git a/src/mingw-w64-1.patch b/src/mingw-w64-1.patch index 24587eae..792af2c1 100644 --- a/src/mingw-w64-1.patch +++ b/src/mingw-w64-1.patch @@ -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 1b750c225c874854ed1fc254b6bee7c50376d537 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> diff --git a/src/mingw-w64.mk b/src/mingw-w64.mk index 7e10f962..b081b1b6 100644 --- a/src/mingw-w64.mk +++ b/src/mingw-w64.mk @@ -1,17 +1,18 @@ -# 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 := mingw-w64 +$(PKG)_WEBSITE := https://mingw-w64.sourceforge.io/ +$(PKG)_DESCR := MinGW-w64 Runtime $(PKG)_IGNORE := -$(PKG)_VERSION := 4.0.4 -$(PKG)_CHECKSUM := 89356a0aa8cf9f8b9dc8d92bc8dd01a131d4750c3acb30c6350a406316c42199 +$(PKG)_VERSION := 5.0.2 +$(PKG)_CHECKSUM := 5f46e80ff1a9102a37a3453743dae9df98262cba7c45306549ef7432cfd92cfd $(PKG)_SUBDIR := $(PKG)-v$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-v$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$(PKG)-release/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$(PKG)-release/$($(PKG)_FILE) $(PKG)_DEPS := define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/' | \ $(SED) -n 's,.*mingw-w64-v\([0-9.]*\)\.tar.*,\1,p' | \ $(SORT) -V | \ tail -1 diff --git a/src/miniupnpc-1-fixes.patch b/src/miniupnpc-1-fixes.patch new file mode 100644 index 00000000..fe6a3519 --- /dev/null +++ b/src/miniupnpc-1-fixes.patch @@ -0,0 +1,29 @@ +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, 13 Dec 2015 16:56:42 +0300 +Subject: [PATCH] cmake: add headers to install + + * bsdqueue.h + * miniupnpctypes.h + * portlistingparse.h + +See https://github.com/mxe/mxe/issues/1051#issuecomment-164260560 + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1111111..2222222 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -166,6 +166,9 @@ install (FILES + upnpreplyparse.h + upnperrors.h + declspec.h ++ bsdqueue.h ++ miniupnpctypes.h ++ portlistingparse.h + DESTINATION include/miniupnpc + ) + diff --git a/src/miniupnpc.mk b/src/miniupnpc.mk new file mode 100644 index 00000000..1327f6fd --- /dev/null +++ b/src/miniupnpc.mk @@ -0,0 +1,30 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := miniupnpc +$(PKG)_WEBSITE := http://miniupnp.free.fr/ +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.9 +$(PKG)_CHECKSUM := 2923e453e880bb949e3d4da9f83dd3cb6f08946d35de0b864d0339cf70934464 +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := http://miniupnp.free.fr/files/$($(PKG)_FILE) +$(PKG)_URL_2 := https://miniupnp.tuxfamily.org/files/$($(PKG)_FILE) +$(PKG)_DEPS := gcc + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://api.github.com/repos/miniupnp/miniupnp/git/refs/tags/' | \ + $(SED) -n 's#.*"ref": "refs/tags/miniupnpc_\([^"]*\).*#\1#p' | \ + $(SED) 's,_,.,g' | \ + $(SORT) -V | \ + tail -1 +endef + +define $(PKG)_BUILD + mkdir '$(1).build' + cd '$(1).build' && '$(TARGET)-cmake' '$(1)' \ + -DUPNPC_BUILD_STATIC=$(CMAKE_STATIC_BOOL) \ + -DUPNPC_BUILD_SHARED=$(CMAKE_SHARED_BOOL) \ + -DUPNPC_BUILD_TESTS=OFF + $(MAKE) -C '$(1).build' -j '$(JOBS)' + $(MAKE) -C '$(1).build' -j 1 install +endef diff --git a/src/minizip-1-unzOpenBuffer.patch b/src/minizip-1-unzOpenBuffer.patch index ae26beaf..f8d1f285 100644 --- a/src/minizip-1-unzOpenBuffer.patch +++ b/src/minizip-1-unzOpenBuffer.patch @@ -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. This patch has been taken from: https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-zlib diff --git a/src/minizip.mk b/src/minizip.mk index 028a2d13..17096075 100644 --- a/src/minizip.mk +++ b/src/minizip.mk @@ -1,7 +1,7 @@ -# 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 := minizip +$(PKG)_WEBSITE := http://www.winimage.com/zLibDll/minizip.html $(PKG)_IGNORE := $(PKG)_VERSION := 0b46a2b $(PKG)_CHECKSUM := 2ecc8da9bcc3b3c42de915567dfceb6fcb4a70a2b2704f59c6447b54da811a65 diff --git a/src/mman-win32-1-include_name_change.patch b/src/mman-win32-1-include_name_change.patch index 7b894fd7..5a2c4750 100644 --- a/src/mman-win32-1-include_name_change.patch +++ b/src/mman-win32-1-include_name_change.patch @@ -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. diff -urN mman-win32-master/Makefile mman-win32-master-patch/Makefile --- mman-win32-master/Makefile 2013-04-23 07:36:23.000000000 +0300 diff --git a/src/mman-win32.mk b/src/mman-win32.mk index 1912ae14..0cce9da8 100644 --- a/src/mman-win32.mk +++ b/src/mman-win32.mk @@ -1,25 +1,26 @@ -# 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 := mman-win32 +$(PKG)_WEBSITE := https://code.google.com/p/mman-win32/ +$(PKG)_DESCR := MMA-Win32 $(PKG)_IGNORE := -$(PKG)_VERSION := 378ed6b69bb7220511dd9cd0973c22b3f6773ce7 -$(PKG)_CHECKSUM := 93a4afbcf9664b2a644b4d45f4145f68a8f51865e8c1270f606d528690ddec52 -$(PKG)_SUBDIR := mman-win32-$($(PKG)_VERSION) -$(PKG)_FILE := mman-win32-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := https://github.com/witwall/mman-win32/archive/$($(PKG)_VERSION).tar.gz +$(PKG)_VERSION := b7ec370 +$(PKG)_CHECKSUM := 6f94db28ddf30711c7b227e97c5142f72f77aca2c5cc034a7d012db242cc2f7b +$(PKG)_SUBDIR := witwall-mman-win32-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://github.com/witwall/mman-win32/tarball/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc -$(PKG)_UPDATE = $(call MXE_GET_GITHUB_SHA, witwall/mman-win32, master) +$(PKG)_UPDATE = $(call MXE_GET_GITHUB_SHA, witwall/mman-win32, master) | $(SED) 's/^\(.......\).*/\1/;' define $(PKG)_BUILD - cd '$(1)' && chmod +x configure - cd '$(1)' && ./configure \ - --cross-prefix='$(TARGET)'- \ - $(if $(BUILD_STATIC),--enable-static ) \ - --prefix='$(PREFIX)/$(TARGET)' \ - --libdir='$(PREFIX)/$(TARGET)/lib' \ - --incdir='$(PREFIX)/$(TARGET)/include/sys' - $(MAKE) -C '$(1)' -j 1 - $(MAKE) -C '$(1)' -j 1 install + mkdir '$(1).build' + cd '$(1).build' && '$(TARGET)-cmake' '$(1)'\ + -DBUILD_TESTS=OFF + $(MAKE) -C '$(1).build' -j '$(JOBS)' + $(MAKE) -C '$(1).build' -j 1 install + + '$(TARGET)-gcc' -W -Wall \ + '$(1)/test.c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + -lmman endef diff --git a/src/mpc.mk b/src/mpc.mk index 5a7de48b..b5d6e61b 100644 --- a/src/mpc.mk +++ b/src/mpc.mk @@ -1,13 +1,14 @@ -# 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 := mpc +$(PKG)_WEBSITE := http://www.multiprecision.org/ +$(PKG)_DESCR := GNU MPC $(PKG)_IGNORE := $(PKG)_VERSION := 1.0.2 $(PKG)_CHECKSUM := b561f54d8a479cee3bc891ee52735f18ff86712ba30f036f8b8537bae380c488 $(PKG)_SUBDIR := mpc-$($(PKG)_VERSION) $(PKG)_FILE := mpc-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.multiprecision.org/mpc/download/$($(PKG)_FILE) +$(PKG)_URL := https://ftp.gnu.org/gnu/mpc/$($(PKG)_FILE) $(PKG)_URL_2 := http://ftp.debian.org/debian/pool/main/m/mpclib/mpclib_$($(PKG)_VERSION).orig.tar.gz $(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) $(PKG)_DEPS := gcc gmp mpfr diff --git a/src/mpfr.mk b/src/mpfr.mk index 43fe8c04..233a66ed 100644 --- a/src/mpfr.mk +++ b/src/mpfr.mk @@ -1,13 +1,13 @@ -# 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 := mpfr +$(PKG)_WEBSITE := http://www.mpfr.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 3.1.3 -$(PKG)_CHECKSUM := 6835a08bd992c8257641791e9a6a2b35b02336c8de26d0a8577953747e514a16 +$(PKG)_VERSION := 3.1.5 +$(PKG)_CHECKSUM := 015fde82b3979fbe5f83501986d328331ba8ddf008c1ff3da3c238f49ca062bc $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := ftp://ftp.gnu.org/pub/gnu/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE) $(PKG)_URL_2 := http://www.mpfr.org/mpfr-$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) $(PKG)_DEPS := gcc gmp diff --git a/src/mpg123.mk b/src/mpg123.mk index 87b6a1c9..f1aff025 100644 --- a/src/mpg123.mk +++ b/src/mpg123.mk @@ -1,17 +1,17 @@ -# 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 := mpg123 +$(PKG)_WEBSITE := https://www.mpg123.de/ $(PKG)_IGNORE := -$(PKG)_VERSION := 1.21.0 -$(PKG)_CHECKSUM := 3ad197f77c9ffdf3601e1c3183ae0709ccb3c3de68309527ce9375fcfb15dcba +$(PKG)_VERSION := 1.22.4 +$(PKG)_CHECKSUM := 5069e02e50138600f10cc5f7674e44e9bf6f1930af81d0e1d2f869b3c0ee40d2 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/mpg123/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/mpg123/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc sdl define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/mpg123/files/mpg123/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/mpg123/files/mpg123/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef diff --git a/src/muparser-1-fixes.patch b/src/muparser-1-fixes.patch new file mode 100644 index 00000000..6f42ecb9 --- /dev/null +++ b/src/muparser-1-fixes.patch @@ -0,0 +1,46 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +Taken from: +https://github.com/beltoforion/muparser/pull/17 + +From d70b948b5ef9c854ed253f01303480b85a7bd8bd Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Sat, 21 Nov 2015 15:38:02 +1100 +Subject: [PATCH] fix dll install directory + +--- + Makefile.in | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 157be77..005ada6 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -29,6 +29,7 @@ BK_DEPS = @BK_DEPS@ + srcdir = @srcdir@ + top_builddir = @top_builddir@ + libdir = @libdir@ ++dlldir = @dlldir@ + DLLPREFIX = @DLLPREFIX@ + LIBS = @LIBS@ + AR = @AR@ +@@ -266,13 +267,14 @@ distclean: clean + + @COND_SHARED_1@install_muParser_dll: $(__muParser_dll___depname) + @COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir) ++@COND_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(dlldir) + @COND_SHARED_1@ $(INSTALL_DATA) $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir) +-@COND_SHARED_1@ $(INSTALL_PROGRAM) $(top_builddir)/lib/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) $(DESTDIR)$(libdir) ++@COND_SHARED_1@ $(INSTALL_PROGRAM) $(top_builddir)/lib/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) $(DESTDIR)$(dlldir) + @COND_SHARED_1@ (cd $(DESTDIR)$(libdir) ; $(__muParser_dll___so_symlinks_inst_cmd)) + + @COND_SHARED_1@uninstall_muParser_dll: + @COND_SHARED_1@ rm -f $(DESTDIR)$(libdir)/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) +-@COND_SHARED_1@ rm -f $(DESTDIR)$(libdir)/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) ++@COND_SHARED_1@ rm -f $(DESTDIR)$(dlldir)/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) + @COND_SHARED_1@ (cd $(DESTDIR)$(libdir) ; $(__muParser_dll___so_symlinks_uninst_cmd)) + + @COND_SHARED_1@install_muParser_dll_headers: +-- +2.4.9 (Apple Git-60) + diff --git a/src/muparser.mk b/src/muparser.mk index 3783074c..da66579d 100644 --- a/src/muparser.mk +++ b/src/muparser.mk @@ -1,7 +1,8 @@ -# 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 := muparser +$(PKG)_WEBSITE := http://muparser.beltoforion.de/ +$(PKG)_DESCR := muParser $(PKG)_IGNORE := $(PKG)_VERSION := 2.2.5 $(PKG)_CHECKSUM := 0666ef55da72c3e356ca85b6a0084d56b05dd740c3c21d26d372085aa2c6e708 @@ -11,18 +12,13 @@ $(PKG)_URL := https://github.com/beltoforion/$(PKG)/archive/v$($(PKG)_VERSI $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(call MXE_GET_GITHUB_TAGS, beltoforion/muparser) | \ - $(SED) 's,^v,,g' + $(call MXE_GET_GITHUB_TAGS, beltoforion/muparser, v) endef define $(PKG)_BUILD cd '$(1)' && ./configure \ - --host='$(TARGET)' \ - --prefix='$(PREFIX)/$(TARGET)' \ - --disable-shared \ + $(MXE_CONFIGURE_OPTS) \ --disable-samples \ --disable-debug $(MAKE) -C '$(1)' -j '$(JOBS)' install endef - -$(PKG)_BUILD_SHARED = diff --git a/src/muparserx-test.cpp b/src/muparserx-test.cpp new file mode 100644 index 00000000..10dcbdd0 --- /dev/null +++ b/src/muparserx-test.cpp @@ -0,0 +1,47 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + * + * based on: + * http://articles.beltoforion.de/article.php?a=muparserx&hl=en&p=using&s=idInclude#idEval + */ + +#include "mpParser.h" + +using namespace mup; + +int main(int argc, char *argv[]) +{ + (void)argc; + (void)argv; + + // Create the parser instance + ParserX p; + + // Create an array of mixed type + Value arr(3, 0); + arr.At(0) = 2.0; + arr.At(1) = "this is a string"; + + // Create some basic values + Value cVal(cmplx_type(1, 1)); + Value sVal("Hello World"); + Value fVal(1.1); + + // Now add the variable to muParser + p.DefineVar("va", Variable(&arr)); + p.DefineVar("a", Variable(&cVal)); + p.DefineVar("b", Variable(&sVal)); + p.DefineVar("c", Variable(&fVal)); + + p.SetExpr("va[0]+a*strlen(b)-c"); + for (int i=0; i<<10; ++i) + { + // evaluate the expression and change the value of + // the variable c in each turn + cVal = 1.1 * i; + Value result = p.Eval(); + + // print the result + console() << result << "\n"; + } +} diff --git a/src/muparserx.mk b/src/muparserx.mk new file mode 100644 index 00000000..9594c6f0 --- /dev/null +++ b/src/muparserx.mk @@ -0,0 +1,27 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := muparserx +$(PKG)_WEBSITE := http://muparserx.beltoforion.de/ +$(PKG)_DESCR := muParserX +$(PKG)_IGNORE := +$(PKG)_VERSION := 4.0.4 +$(PKG)_CHECKSUM := d7ebcab8cb1de88e6dcba21651db8f6055b3e904c45afc387b06b5f4218dda40 +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz +$(PKG)_URL := https://github.com/beltoforion/$(PKG)/archive/v$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := gcc + +define $(PKG)_UPDATE + $(call MXE_GET_GITHUB_TAGS, beltoforion/muparserx, v) +endef + +define $(PKG)_BUILD + cd '$(1)' && '$(TARGET)-cmake' \ + -DBUILD_EXAMPLES=OFF + $(MAKE) -C '$(1)' -j '$(JOBS)' install + + '$(TARGET)-g++' \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' $(PKG) --cflags --libs` +endef diff --git a/src/mxe-conf.mk b/src/mxe-conf.mk index 558d3070..ef67b471 100644 --- a/src/mxe-conf.mk +++ b/src/mxe-conf.mk @@ -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 := mxe-conf $(PKG)_VERSION := 1 @@ -7,72 +6,23 @@ $(PKG)_UPDATE := echo 1 $(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) define $(PKG)_BUILD + # create basic non-empty directory hierarchy + for d in bin include lib share; do \ + mkdir -p "$(PREFIX)/$(TARGET)/$$d" && \ + touch "$(PREFIX)/$(TARGET)/$$d/.gitkeep" ; \ + done + # install target-specific autotools config file - $(INSTALL) -d '$(PREFIX)/$(TARGET)/share' # setting ac_cv_build bypasses the config.guess check in every package echo "ac_cv_build=$(BUILD)" > '$(PREFIX)/$(TARGET)/share/config.site' - # create the CMake toolchain file - # individual packages (e.g. hdf5) should add their - # own files under CMAKE_TOOLCHAIN_DIR - [ -d '$(CMAKE_TOOLCHAIN_DIR)' ] || mkdir -p '$(CMAKE_TOOLCHAIN_DIR)' - (echo 'set(CMAKE_SYSTEM_NAME Windows)'; \ - echo 'set(MSYS 1)'; \ - echo 'set(BUILD_SHARED_LIBS $(if $(BUILD_SHARED),ON,OFF))'; \ - echo 'set(LIBTYPE $(if $(BUILD_SHARED),SHARED,STATIC))'; \ - echo 'set(CMAKE_PREFIX_PATH $(PREFIX)/$(TARGET))'; \ - echo 'set(CMAKE_FIND_ROOT_PATH $(PREFIX)/$(TARGET))'; \ - echo 'set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)'; \ - echo 'set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)'; \ - echo 'set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)'; \ - echo 'set(CMAKE_C_COMPILER $(PREFIX)/bin/$(TARGET)-gcc)'; \ - echo 'set(CMAKE_CXX_COMPILER $(PREFIX)/bin/$(TARGET)-g++)'; \ - echo 'set(CMAKE_Fortran_COMPILER $(PREFIX)/bin/$(TARGET)-gfortran)'; \ - echo 'set(CMAKE_RC_COMPILER $(PREFIX)/bin/$(TARGET)-windres)'; \ - echo 'set(CMAKE_MODULE_PATH "$(PREFIX)/share/cmake/modules" $${CMAKE_MODULE_PATH}) # For mxe FindPackage scripts'; \ - echo 'set(CMAKE_INSTALL_PREFIX $(PREFIX)/$(TARGET) CACHE PATH "Installation Prefix")'; \ - echo 'set(CMAKE_BUILD_TYPE Release CACHE STRING "Debug|Release|RelWithDebInfo|MinSizeRel")'; \ - echo 'set(CMAKE_CROSS_COMPILING ON) # Workaround for http://www.cmake.org/Bug/view.php?id=14075'; \ - echo 'set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <FLAGS> <DEFINES> -o <OBJECT> <SOURCE>") # Workaround for buggy windres rules'; \ - echo ''; \ - echo 'file(GLOB mxe_cmake_files'; \ - echo ' "$(CMAKE_TOOLCHAIN_DIR)/*.cmake"'; \ - echo ')'; \ - echo 'foreach(mxe_cmake_file $${mxe_cmake_files})'; \ - echo ' include($${mxe_cmake_file})'; \ - echo 'endforeach()'; \ - ) > '$(CMAKE_TOOLCHAIN_FILE)' - - #create prefixed cmake wrapper script - (echo '#!/usr/bin/env bash'; \ - echo 'echo "== Using MXE wrapper: $(PREFIX)/bin/$(TARGET)-cmake"'; \ - echo 'unset NO_MXE_TOOLCHAIN'; \ - echo 'if echo -- "$$@" | grep -Ewq "(--build|-E|--system-information)" ; then'; \ - echo ' NO_MXE_TOOLCHAIN=1'; \ - echo 'fi'; \ - echo 'if [[ "$$NO_MXE_TOOLCHAIN" == "1" ]]; then'; \ - echo ' echo "== Skip using MXE toolchain: $(CMAKE_TOOLCHAIN_FILE)"'; \ - echo ' # see https://github.com/mxe/mxe/issues/932'; \ - echo ' exec cmake "$$@"'; \ - echo 'else'; \ - echo ' echo "== Using MXE toolchain: $(CMAKE_TOOLCHAIN_FILE)"'; \ - echo ' exec cmake -DCMAKE_TOOLCHAIN_FILE="$(CMAKE_TOOLCHAIN_FILE)" "$$@"'; \ - echo 'fi'; \ - ) \ - > '$(PREFIX)/bin/$(TARGET)-cmake' - chmod 0755 '$(PREFIX)/bin/$(TARGET)-cmake' - - #create readonly directory to force wine to fail - $(INSTALL) -m444 -d "$$WINEPREFIX" - # create pkg-config files for OpenGL/GLU - $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' + mkdir -p '$(PREFIX)/$(TARGET)/lib/pkgconfig' (echo 'Name: gl'; \ echo 'Version: 0'; \ echo 'Description: OpenGL'; \ echo 'Libs: -lopengl32';) \ > '$(PREFIX)/$(TARGET)/lib/pkgconfig/gl.pc' - (echo 'Name: glu'; \ echo 'Version: 0'; \ echo 'Description: OpenGL'; \ @@ -83,13 +33,9 @@ endef define $(PKG)_BUILD_$(BUILD) # install config.guess for general use - $(INSTALL) -d '$(PREFIX)/bin' + mkdir -p '$(PREFIX)/bin' $(INSTALL) -m755 '$(EXT_DIR)/config.guess' '$(PREFIX)/bin/' - # install cmake modules - $(INSTALL) -d '$(PREFIX)/share/cmake/modules' - $(INSTALL) -m644 '$(PWD)/src/cmake/modules/'* '$(PREFIX)/share/cmake/modules' - # fail early if autotools can't autoreconf # 1. detect mismatches in installation locations # 2. ??? @@ -101,4 +47,12 @@ define $(PKG)_BUILD_$(BUILD) > '$(1)/configure.ac' cd '$(1)' && autoreconf -fiv cd '$(1)' && ./configure + + #create script "wine" in a directory which is in PATH + mkdir -p '$(PREFIX)/$(BUILD)/bin/' + (echo '#!/usr/bin/env bash'; \ + echo 'exit 1'; \ + ) \ + > '$(PREFIX)/$(BUILD)/bin/wine' + chmod 0755 '$(PREFIX)/$(BUILD)/bin/wine' endef diff --git a/src/mxml-test.c b/src/mxml-test.c index b0294558..92ceba7b 100644 --- a/src/mxml-test.c +++ b/src/mxml-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <mxml.h> diff --git a/src/mxml.mk b/src/mxml.mk index 876c41df..651f2a14 100644 --- a/src/mxml.mk +++ b/src/mxml.mk @@ -1,21 +1,17 @@ -# 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 := mxml +$(PKG)_WEBSITE := https://michaelrsweet.github.io/mxml/ +$(PKG)_DESCR := Mini-XML $(PKG)_IGNORE := -$(PKG)_VERSION := 2.9 -$(PKG)_CHECKSUM := cded54653c584b24c4a78a7fa1b3b4377d49ac4f451ddf170ebbc8161d85ff92 +$(PKG)_VERSION := 2.10 +$(PKG)_CHECKSUM := 267ff58b64ddc767170d71dab0c729c06f45e1df9a9b6f75180b564f09767891 +$(PKG)_GH_CONF := michaelrsweet/mxml, release- $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.msweet.org/files/project3/$($(PKG)_FILE) +$(PKG)_URL := https://github.com/michaelrsweet/mxml/releases/download/release-$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc pthreads -define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.msweet.org/downloads.php?L+Z3' | \ - $(SED) -n 's,.*<a href="files.*mxml-\([0-9\.]*\)\.tar.*,\1,p' | \ - head -1 -endef - define $(PKG)_BUILD cd '$(1)' && ./configure \ --host='$(TARGET)' \ @@ -31,7 +27,7 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-mxml.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-mxml.exe' \ `'$(TARGET)-pkg-config' mxml --cflags --libs` endef diff --git a/src/ncurses.mk b/src/ncurses.mk index a7a29fd8..0aac0e07 100644 --- a/src/ncurses.mk +++ b/src/ncurses.mk @@ -1,21 +1,22 @@ -# 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 := ncurses +$(PKG)_WEBSITE := https://www.gnu.org/software/ncurses/ +$(PKG)_DESCR := Ncurses $(PKG)_IGNORE := $(PKG)_VERSION := e14300b $(PKG)_CHECKSUM := 3564ffa540cc069854607a0fb10d258c12769f8f6ee752f66038ba95a5e5f650 # $(PKG)_VERSION := 5.9 # $(PKG)_SUBDIR := ncurses-$($(PKG)_VERSION) # $(PKG)_FILE := ncurses-$($(PKG)_VERSION).tar.gz -# $(PKG)_URL := http://ftp.gnu.org/pub/gnu/ncurses/$($(PKG)_FILE) +# $(PKG)_URL := https://ftp.gnu.org/gnu/ncurses/$($(PKG)_FILE) $(PKG)_SUBDIR := mirror-$(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz $(PKG)_URL := https://github.com/mirror/$(PKG)/tarball/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc libgnurx define $(PKG)_UPDATE_RELEASE - $(WGET) -q -O- 'http://ftp.gnu.org/pub/gnu/ncurses/?C=M;O=D' | \ + $(WGET) -q -O- 'https://ftp.gnu.org/gnu/ncurses/?C=M;O=D' | \ $(SED) -n 's,.*<a href="ncurses-\([0-9][^"]*\)\.tar.*,\1,p' | \ head -1 endef diff --git a/src/neon-test.c b/src/neon-test.c new file mode 100644 index 00000000..9d66506d --- /dev/null +++ b/src/neon-test.c @@ -0,0 +1,26 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +// Based on: http://webdav.org/neon/doc/html/refresolve.html + +#include <stdio.h> + +#include <neon/ne_basic.h> + +int main() { + ne_sock_addr* addr = ne_addr_resolve("yandex.ru", 0); + char buf[256]; + if (ne_addr_result(addr)) { + printf("Could not resolve yandex.ru: %s\n", + ne_addr_error(addr, buf, sizeof buf)); + } else { + printf("yandex.ru:"); + for (const ne_inet_addr* ia = ne_addr_first(addr); ia != NULL; ia = ne_addr_next(addr)) { + printf(" %s", ne_iaddr_print(ia, buf, sizeof buf)); + } + printf("\n"); + } + ne_addr_destroy(addr); + return 0; +} diff --git a/src/neon.mk b/src/neon.mk new file mode 100644 index 00000000..7446d6b9 --- /dev/null +++ b/src/neon.mk @@ -0,0 +1,60 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := neon +$(PKG)_WEBSITE := http://webdav.org/neon/ +$(PKG)_DESCR := HTTP and WebDAV client library (libneon) +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.30.2 +$(PKG)_CHECKSUM := db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := http://webdav.org/$(PKG)/$(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := gcc openssl expat gettext + +define $(PKG)_UPDATE + $(WGET) -q -O- 'http://webdav.org/$(PKG)/' | \ + $(SED) -n 's,.*/\([0-9][^"]*\)/"\.tar.*,\1,p' | \ + sort | uniq | \ + head -1 +endef + +define $(PKG)_BUILD + cd '$(BUILD_DIR)' && \ + ne_cv_fmt_size_t=%lu \ + ne_cv_fmt_ssize_t=%lu \ + ne_cv_fmt_off64_t=%I64u \ + ne_cv_fmt_time_t=%lu \ + ne_cv_libsfor_socket=-lws2_32 \ + ne_cv_libsfor_gethostbyname=-lws2_32 \ + ne_cv_os_uname= \ + '$(SOURCE_DIR)'/configure \ + $(MXE_CONFIGURE_OPTS) \ + $(MXE_DISABLE_DOCS) \ + PKG_CONFIG='$(PREFIX)/bin/$(TARGET)-pkg-config' \ + --with-ssl=yes + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install-lib install-headers install-nls + + # create pkg-config file + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' + (echo 'prefix=$(PREFIX)/$(TARGET)'; \ + echo 'exec_prefix=$${prefix}'; \ + echo 'libdir=$${exec_prefix}/lib'; \ + echo 'includedir=$${prefix}/include'; \ + echo ''; \ + echo 'Name: $(PKG)'; \ + echo 'Version: $($(PKG)_VERSION)'; \ + echo 'Description: neon is an HTTP and WebDAV client library'; \ + echo 'Requires.private: openssl'; \ + echo 'Libs: -L$${libdir} -lneon'; \ + echo 'Libs.private: -L$${libdir} -lintl -liconv'; \ + echo 'Cflags: -I$${includedir}'; \ + ) \ + > '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc' + + # create test binary + $(TARGET)-gcc \ + -W -Wall -Werror -std=c11 \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `$(TARGET)-pkg-config neon --cflags --libs` +endef diff --git a/src/netcdf.mk b/src/netcdf.mk index 734bbb3c..8de16f40 100644 --- a/src/netcdf.mk +++ b/src/netcdf.mk @@ -1,7 +1,8 @@ -# 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 := netcdf +$(PKG)_WEBSITE := https://www.unidata.ucar.edu/software/netcdf/ +$(PKG)_DESCR := NetCDF $(PKG)_IGNORE := $(PKG)_VERSION := 4.3.0 $(PKG)_CHECKSUM := e796413d27da6b053e07a18f567a1d0c23d2a317cef905faa2a05fe4f725fc63 @@ -11,7 +12,7 @@ $(PKG)_URL := ftp://ftp.unidata.ucar.edu/pub/netcdf/old/$($(PKG)_FILE) $(PKG)_DEPS := gcc curl hdf4 hdf5 portablexdr zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.unidata.ucar.edu/downloads/netcdf/index.jsp' | \ + $(WGET) -q -O- 'https://www.unidata.ucar.edu/downloads/netcdf/index.jsp' | \ grep netcdf | \ $(SED) -n 's,.*href="netcdf-\([0-9_]*\)">.*,\1,p' | \ head -1 | \ diff --git a/src/netpbm-1-portability-fixes.patch b/src/netpbm-1-portability-fixes.patch index 52ae2eb1..182b0eb2 100644 --- a/src/netpbm-1-portability-fixes.patch +++ b/src/netpbm-1-portability-fixes.patch @@ -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. --- a/GNUmakefile 2012-12-08 08:05:26.678456631 +0100 +++ b/GNUmakefile 2012-12-08 08:13:02.002469110 +0100 diff --git a/src/netpbm.mk b/src/netpbm.mk index 3972c6d9..560d4478 100644 --- a/src/netpbm.mk +++ b/src/netpbm.mk @@ -1,17 +1,18 @@ -# 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 := netpbm +$(PKG)_WEBSITE := https://netpbm.sourceforge.io/ +$(PKG)_DESCR := Netpbm $(PKG)_IGNORE := $(PKG)_VERSION := 10.35.96 $(PKG)_CHECKSUM := e652f3642e930156afaffb4c28e135efe026b41cd64be20e245b0c8124819eee $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tgz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/netpbm/super_stable/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/netpbm/super_stable/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/netpbm/files/super_stable/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/netpbm/files/super_stable/' | \ $(SED) -n 's,.*netpbm-\([0-9][^>]*\)\.tgz.*,\1,p' | \ head -1 endef diff --git a/src/nettle-1.patch b/src/nettle-1.patch index 25436b22..4e0db3db 100644 --- a/src/nettle-1.patch +++ b/src/nettle-1.patch @@ -1,7 +1,6 @@ -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 29cb19fb27ec834473d638fb13a947e0e004116d Mon Sep 17 00:00:00 2001 +From c5836bef883966beb9b5be562ef0a6d0c6048879 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> Date: Sun, 12 Apr 2015 10:07:58 +0200 Subject: [PATCH] Revert "Include private dependencies automatically in @@ -9,29 +8,6 @@ Subject: [PATCH] Revert "Include private dependencies automatically in This reverts commit c8b1d2fafff16c57ec50d413c999796ec2085413. -diff --git a/configure.ac b/configure.ac -index 5a16151..e6cd467 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -803,10 +803,8 @@ fi - - if test "x$enable_shared" = xyes ; then - IF_SHARED='' -- IF_NOT_SHARED='#' - else - IF_SHARED='#' -- IF_NOT_SHARED='' - fi - - # Documentation tools -@@ -840,7 +838,6 @@ fi - AC_SUBST(IF_HOGWEED) - AC_SUBST(IF_STATIC) - AC_SUBST(IF_SHARED) --AC_SUBST(IF_NOT_SHARED) - AC_SUBST(IF_DOCUMENTATION) - AC_SUBST(IF_DLL) - AC_SUBST(IF_MINI_GMP) diff --git a/hogweed.pc.in b/hogweed.pc.in index 97fb9d4..839f7d0 100644 --- a/hogweed.pc.in @@ -50,5 +26,5 @@ index 97fb9d4..839f7d0 100644 Cflags: -I${includedir} -- -2.1.4 +2.5.0 diff --git a/src/nettle.mk b/src/nettle.mk index 23b17853..164d7b5f 100644 --- a/src/nettle.mk +++ b/src/nettle.mk @@ -1,17 +1,17 @@ -# 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 := nettle +$(PKG)_WEBSITE := https://www.lysator.liu.se/~nisse/nettle/ $(PKG)_IGNORE := -$(PKG)_VERSION := 3.1 -$(PKG)_CHECKSUM := f6859d4ec88e70805590af9862b4b8c43a2d1fc7991df0a7a711b1e7ca9fc9d3 +$(PKG)_VERSION := 3.3 +$(PKG)_CHECKSUM := 46942627d5d0ca11720fec18d81fc38f7ef837ea4197c1f630e71ce0d470b11e $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.lysator.liu.se/~nisse/archive/$($(PKG)_FILE) +$(PKG)_URL := https://www.lysator.liu.se/~nisse/archive/$($(PKG)_FILE) $(PKG)_DEPS := gcc gmp define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.lysator.liu.se/~nisse/archive/' | \ + $(WGET) -q -O- 'https://www.lysator.liu.se/~nisse/archive/' | \ $(SED) -n 's,.*nettle-\([0-9][^>]*\)\.tar.*,\1,p' | \ grep -v 'pre' | \ grep -v 'rc' | \ diff --git a/src/nlopt.mk b/src/nlopt.mk index 690bac01..e0216984 100644 --- a/src/nlopt.mk +++ b/src/nlopt.mk @@ -1,7 +1,8 @@ -# 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 := nlopt +$(PKG)_WEBSITE := http://ab-initio.mit.edu/wiki/index.php/NLopt +$(PKG)_DESCR := NLopt $(PKG)_IGNORE := $(PKG)_VERSION := 2.4.2 $(PKG)_CHECKSUM := 8099633de9d71cbc06cd435da993eb424bbcdbded8f803cdaa9fb8c6e09c8e89 @@ -25,6 +26,6 @@ define $(PKG)_BUILD --without-matlab \ --without-octave \ --without-python - $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j '$(JOBS)' LDFLAGS='-no-undefined' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/nsis-1-fixes.patch b/src/nsis-1-fixes.patch index ce535242..db7192c7 100644 --- a/src/nsis-1-fixes.patch +++ b/src/nsis-1-fixes.patch @@ -1,777 +1,47 @@ -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 1cc3dd0dfd47bab82e06be916f9e57ef783406f9 Mon Sep 17 00:00:00 2001 +Contains ad hoc patches for cross building. + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> Date: Sun, 12 Aug 2012 12:33:26 +0200 -Subject: [PATCH 1/4] explicit mingw cross prefix +Subject: [PATCH] explicit mingw cross prefix This patch has been taken from: http://sourceforge.net/tracker/index.php?func=detail&aid=3305366&group_id=22049&atid=373085 diff --git a/SCons/Tools/crossmingw.py b/SCons/Tools/crossmingw.py -index d27e01c..fef9150 100755 +index 1111111..2222222 100755 --- a/SCons/Tools/crossmingw.py +++ b/SCons/Tools/crossmingw.py -@@ -61,6 +61,9 @@ prefixes = SCons.Util.Split(""" +@@ -65,6 +65,9 @@ prefixes = SCons.Util.Split(""" """) def find(env): + if env.has_key('MINGW_CROSS_PREFIX'): + return env['MINGW_CROSS_PREFIX'] + - for prefix in prefixes: - # First search in the SCons path and then the OS path: - if env.WhereIs(prefix + 'gcc') or SCons.Util.WhereIs(prefix + 'gcc'): + # Explicitly specified toolchain to build Windows executables + # takes predominance. + prefix = SCons.Script.ARGUMENTS.get('XGCC_W32_PREFIX', None) diff --git a/SConstruct b/SConstruct -index 80872bc..4f113dd 100755 +index 1111111..2222222 100755 --- a/SConstruct +++ b/SConstruct -@@ -59,6 +59,7 @@ doc = [ - +@@ -67,6 +67,7 @@ doctypes = [ path = ARGUMENTS.get('PATH', '') toolset = ARGUMENTS.get('TOOLSET', '') + arch = ARGUMENTS.get('TARGET_ARCH', 'x86') +mingw_cross_prefix = ARGUMENTS.get('MINGW_CROSS_PREFIX', '') if toolset and path: - defenv = Environment(ENV = {'PATH' : path}, TOOLS = toolset.split(',') + ['zip']) -@@ -69,6 +70,8 @@ else: - defenv = Environment(TOOLS = toolset.split(',') + ['zip']) + defenv = Environment(TARGET_ARCH = arch, ENV = {'PATH' : path}, TOOLS = toolset.split(',') + ['zip']) +@@ -77,6 +78,8 @@ else: + defenv = Environment(TARGET_ARCH = arch, TOOLS = toolset.split(',') + ['zip']) if not toolset and not path: - defenv = Environment() + defenv = Environment(TARGET_ARCH = arch) +if mingw_cross_prefix: + defenv['MINGW_CROSS_PREFIX'] = mingw_cross_prefix Export('defenv') --- -2.1.0 - - -From 7df0fa80a65279ee7d99da8ec6abdddff7e040b0 Mon Sep 17 00:00:00 2001 -From: freeman <free.man.uu@gmail.com> -Date: Sun, 12 Aug 2012 12:36:39 +0200 -Subject: [PATCH 2/4] add missing header - - -diff --git a/Source/util.h b/Source/util.h -index 4259a6a..664923e 100755 ---- a/Source/util.h -+++ b/Source/util.h -@@ -25,6 +25,7 @@ - #ifndef _WIN32 - # include <iconv.h> - # include <stdio.h> -+# include <unistd.h> - #endif - - --- -2.1.0 - - -From 9a40694c9177db6fa5db3f28d7d68c042d0a6144 Mon Sep 17 00:00:00 2001 -From: Tony Theodore <tonyt@logyst.com> -Date: Fri, 3 May 2013 17:28:44 +1000 -Subject: [PATCH 3/4] Enable native 64-bit build - -Taken from: -http://anonscm.debian.org/gitweb/?p=collab-maint/nsis.git;a=blob;f=debian/patches/makensis_native_64bit.patch;h=2256a0e193db894dd99507ac0de66f8ae060b46b;hb=HEAD - -diff --git a/SCons/Config/gnu b/SCons/Config/gnu -index a1f917f..adfcbd1 100755 ---- a/SCons/Config/gnu -+++ b/SCons/Config/gnu -@@ -95,8 +95,6 @@ makensis_env.Append(CXXFLAGS = ['-Wno-non-virtual-dtor']) # ignore virtual dtor - makensis_env.Append(CXXFLAGS = ['-Wall']) # all warnings - - conf = FlagsConfigure(makensis_env) --conf.CheckCompileFlag('-m32') # --conf.CheckLinkFlag('-m32') # - conf.CheckLinkFlag('$MAP_FLAG') # generate map file - if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_CP']: - TestStrip(conf) # strip -@@ -149,8 +147,6 @@ conf.Finish() - ### cross-platform util environment adjustments - - conf = FlagsConfigure(cp_util_env) --conf.CheckCompileFlag('-m32') --conf.CheckLinkFlag('-m32') - if not defenv['DEBUG'] and defenv['STRIP'] and defenv['STRIP_CP']: - TestStrip(conf) # strip - conf.Finish() -@@ -160,8 +156,6 @@ conf.Finish() - test_env = defenv.Clone() - test_env.Append(CPPPATH = ['#$BUILD_CONFIG']) - conf = FlagsConfigure(test_env) --conf.CheckCompileFlag('-m32') --conf.CheckLinkFlag('-m32') - conf.Finish() - - ### weird GCC requirements -diff --git a/Source/DialogTemplate.cpp b/Source/DialogTemplate.cpp -index 109a1d7..f821a05 100755 ---- a/Source/DialogTemplate.cpp -+++ b/Source/DialogTemplate.cpp -@@ -74,7 +74,7 @@ void ReadVarLenArr(LPBYTE &seeker, WCHAR* &readInto, unsigned int uCodePage) { - if (IS_INTRESOURCE(x)) { \ - *(WORD*)seeker = 0xFFFF; \ - seeker += sizeof(WORD); \ -- *(WORD*)seeker = ConvertEndianness(WORD(DWORD(x))); \ -+ *(WORD*)seeker = ConvertEndianness(WORD((ULONG_PTR)(x))); \ - seeker += sizeof(WORD); \ - } \ - else { \ -@@ -444,7 +444,7 @@ void CDialogTemplate::ConvertToRTL() { - szClass = winchar_toansi(m_vItems[i]->szClass); - - // Button -- if (long(m_vItems[i]->szClass) == 0x80) { -+ if ((ULONG_PTR)(m_vItems[i]->szClass) == 0x80) { - m_vItems[i]->dwStyle ^= BS_LEFTTEXT; - m_vItems[i]->dwStyle ^= BS_RIGHT; - m_vItems[i]->dwStyle ^= BS_LEFT; -@@ -458,13 +458,13 @@ void CDialogTemplate::ConvertToRTL() { - } - } - // Edit -- else if (long(m_vItems[i]->szClass) == 0x81) { -+ else if ((ULONG_PTR)(m_vItems[i]->szClass) == 0x81) { - if ((m_vItems[i]->dwStyle & ES_CENTER) == 0) { - m_vItems[i]->dwStyle ^= ES_RIGHT; - } - } - // Static -- else if (long(m_vItems[i]->szClass) == 0x82) { -+ else if ((ULONG_PTR)(m_vItems[i]->szClass) == 0x82) { - if ((m_vItems[i]->dwStyle & SS_TYPEMASK) == SS_LEFT || (m_vItems[i]->dwStyle & SS_TYPEMASK) == SS_LEFTNOWORDWRAP) - { - m_vItems[i]->dwStyle &= ~SS_TYPEMASK; -@@ -571,7 +571,7 @@ BYTE* CDialogTemplate::Save(DWORD& dwSize) { - // Write all of the items - for (unsigned int i = 0; i < m_vItems.size(); i++) { - // DLGITEMTEMPLATE[EX]s must be aligned on DWORD boundary -- if (DWORD(seeker - pbDlg) % sizeof(DWORD)) -+ if ((seeker - pbDlg) % sizeof(DWORD)) - seeker += sizeof(WORD); - - if (m_bExtended) { -@@ -622,7 +622,7 @@ BYTE* CDialogTemplate::Save(DWORD& dwSize) { - } - } - -- assert((DWORD) seeker - (DWORD) pbDlg == dwSize); -+ assert((DWORD)(seeker - pbDlg) == dwSize); - - // DONE! - return pbDlg; -diff --git a/Source/Platform.h b/Source/Platform.h -index 52eb9bc..3cdfe32 100755 ---- a/Source/Platform.h -+++ b/Source/Platform.h -@@ -53,6 +53,7 @@ typedef unsigned char UCHAR; - typedef const char *LPCCH, *PCSTR, *LPCSTR; - typedef unsigned short WCHAR, OLECHAR, *PWCHAR, *LPWCH, *PWCH, *NWPSTR, *LPWSTR, *PWSTR, *BSTR; - typedef const unsigned short *LPCWCH, *PCWCH, *LPCWSTR, *PCWSTR, *LPCOLESTR; -+typedef int INT_PTR; - typedef unsigned int UINT_PTR; - // basic stuff - typedef void * HANDLE; -@@ -60,8 +61,8 @@ typedef HANDLE HWND; - typedef HANDLE HMODULE; - typedef unsigned long HKEY; - // some gdi --typedef unsigned long COLORREF; --typedef unsigned long HBRUSH; -+typedef DWORD COLORREF; -+typedef UINT32 HBRUSH; - // bool - # define FALSE 0 - # define TRUE 1 -@@ -166,7 +167,7 @@ typedef DWORDLONG ULONGLONG,*PULONGLONG; - # define MAKEINTRESOURCE MAKEINTRESOURCEA - # endif - # ifndef IMAGE_FIRST_SECTION --# define IMAGE_FIRST_SECTION(h) ( PIMAGE_SECTION_HEADER( (DWORD) h + \ -+# define IMAGE_FIRST_SECTION(h) ( PIMAGE_SECTION_HEADER( (ULONG_PTR) h + \ - FIELD_OFFSET(IMAGE_NT_HEADERS, OptionalHeader) + \ - FIX_ENDIAN_INT16(PIMAGE_NT_HEADERS(h)->FileHeader.SizeOfOptionalHeader) ) ) - # endif -@@ -174,7 +175,7 @@ typedef DWORDLONG ULONGLONG,*PULONGLONG; - # define RGB(r,g,b) ((DWORD)(((BYTE)(r)|((WORD)(g)<<8))|(((DWORD)(BYTE)(b))<<16))) - # endif - # ifndef MAKELONG --# define MAKELONG(a,b) ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16))) -+# define MAKELONG(a,b) ((DWORD)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16))) - # endif - #endif - #ifndef IS_INTRESOURCE -@@ -197,8 +198,10 @@ typedef DWORDLONG ULONGLONG,*PULONGLONG; - # define FOF_NOERRORUI 0x0400 - #endif - --#ifndef ULONG_PTR --# define ULONG_PTR DWORD -+// mingw32 and w64-mingw32 do not define ULONG_PTR -+// but rather declare ULONG_PTR via typedef (see basetsd.h) -+#if !defined(__MINGW32__) && !defined(ULONG_PTR) -+# define ULONG_PTR unsigned long - #endif - - #ifndef IDC_HAND -@@ -238,7 +241,7 @@ typedef DWORDLONG ULONGLONG,*PULONGLONG; - # undef INVALID_FILE_ATTRIBUTES - #endif - #ifndef INVALID_FILE_ATTRIBUTES --# define INVALID_FILE_ATTRIBUTES ((unsigned long) -1) -+# define INVALID_FILE_ATTRIBUTES ((DWORD) -1) - #endif - - // shell folders -diff --git a/Source/Plugins.cpp b/Source/Plugins.cpp -index 6872b28..90ad393 100755 ---- a/Source/Plugins.cpp -+++ b/Source/Plugins.cpp -@@ -29,7 +29,7 @@ - #include "dirreader.h" - - #ifdef _WIN32 --# include <WinNT.h> -+# include <winnt.h> - #else - # include <sys/stat.h> - #endif -@@ -136,8 +136,8 @@ void Plugins::GetExports(const string &pathToDll, bool displayInfo) - DWORD prd = FIX_ENDIAN_INT32(sections[i].PointerToRawData); - PIMAGE_EXPORT_DIRECTORY exports = PIMAGE_EXPORT_DIRECTORY(&dlldata[0] + prd + ExportDirVA - va); - DWORD na = FIX_ENDIAN_INT32(exports->AddressOfNames); -- unsigned long *names = (unsigned long*)((unsigned long) exports + (char *) na - ExportDirVA); -- for (unsigned long j = 0; j < FIX_ENDIAN_INT32(exports->NumberOfNames); j++) -+ LPDWORD names = (LPDWORD)((ULONG_PTR)exports + na - ExportDirVA); -+ for (DWORD j = 0; j < FIX_ENDIAN_INT32(exports->NumberOfNames); j++) - { - const string name = string((char*)exports + FIX_ENDIAN_INT32(names[j]) - ExportDirVA); - const string signature = dllName + "::" + name; -diff --git a/Source/ResourceEditor.cpp b/Source/ResourceEditor.cpp -index 8509414..b819f4e 100755 ---- a/Source/ResourceEditor.cpp -+++ b/Source/ResourceEditor.cpp -@@ -27,20 +27,10 @@ using namespace std; - #define ALIGN(dwToAlign, dwAlignOn) dwToAlign = (dwToAlign%dwAlignOn == 0) ? dwToAlign : dwToAlign - (dwToAlign%dwAlignOn) + dwAlignOn - #define RALIGN(dwToAlign, dwAlignOn) ((dwToAlign%dwAlignOn == 0) ? dwToAlign : dwToAlign - (dwToAlign%dwAlignOn) + dwAlignOn) - --#ifndef _WIN32 --static inline ULONG ConvertEndianness(ULONG u) { -- return FIX_ENDIAN_INT32(u); --} --#endif -- - static inline DWORD ConvertEndianness(DWORD d) { - return FIX_ENDIAN_INT32(d); - } - --static inline LONG ConvertEndianness(LONG l) { -- return FIX_ENDIAN_INT32(l); --} -- - static inline WORD ConvertEndianness(WORD w) { - return FIX_ENDIAN_INT16(w); - } -@@ -52,7 +42,7 @@ PIMAGE_NT_HEADERS CResourceEditor::GetNTHeaders(BYTE* pbPE) { - throw runtime_error("PE file contains invalid DOS header"); - - // Get NT headers -- PIMAGE_NT_HEADERS ntHeaders = (PIMAGE_NT_HEADERS)(pbPE + ConvertEndianness(dosHeader->e_lfanew)); -+ PIMAGE_NT_HEADERS ntHeaders = (PIMAGE_NT_HEADERS)(pbPE + ConvertEndianness((DWORD)dosHeader->e_lfanew)); - if (ntHeaders->Signature != IMAGE_NT_SIGNATURE) - throw runtime_error("PE file missing NT signature"); - -@@ -684,7 +674,7 @@ void CResourceEditor::WriteRsrcSec(BYTE* pbRsrcSec) { - rdDir.NumberOfIdEntries = ConvertEndianness(rdDir.NumberOfIdEntries); - - CopyMemory(seeker, &rdDir, sizeof(IMAGE_RESOURCE_DIRECTORY)); -- crd->m_dwWrittenAt = DWORD(seeker); -+ crd->m_ulWrittenAt = (ULONG_PTR)(seeker); - seeker += sizeof(IMAGE_RESOURCE_DIRECTORY); - - for (int i = 0; i < crd->CountEntries(); i++) { -@@ -705,7 +695,7 @@ void CResourceEditor::WriteRsrcSec(BYTE* pbRsrcSec) { - rDirE.UName.NameString.NameIsString = (crd->GetEntry(i)->HasName()) ? 1 : 0; - - CopyMemory(seeker, &rDirE, sizeof(MY_IMAGE_RESOURCE_DIRECTORY_ENTRY)); -- crd->GetEntry(i)->m_dwWrittenAt = DWORD(seeker); -+ crd->GetEntry(i)->m_ulWrittenAt = (ULONG_PTR)(seeker); - seeker += sizeof(MY_IMAGE_RESOURCE_DIRECTORY_ENTRY); - } - qDirs.pop(); -@@ -721,7 +711,7 @@ void CResourceEditor::WriteRsrcSec(BYTE* pbRsrcSec) { - rDataE.Size = ConvertEndianness(cRDataE->GetSize()); - - CopyMemory(seeker, &rDataE, sizeof(IMAGE_RESOURCE_DATA_ENTRY)); -- cRDataE->m_dwWrittenAt = DWORD(seeker); -+ cRDataE->m_ulWrittenAt = (ULONG_PTR)(seeker); - seeker += sizeof(IMAGE_RESOURCE_DATA_ENTRY); - - qDataEntries.pop(); -@@ -733,7 +723,7 @@ void CResourceEditor::WriteRsrcSec(BYTE* pbRsrcSec) { - while (!qStrings.empty()) { - CResourceDirectoryEntry* cRDirE = qStrings.front(); - -- PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY(cRDirE->m_dwWrittenAt)->UName.NameString.NameOffset = ConvertEndianness(DWORD(seeker) - DWORD(pbRsrcSec)); -+ PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY(cRDirE->m_ulWrittenAt)->UName.NameString.NameOffset = ConvertEndianness((DWORD) (seeker - pbRsrcSec)); - - WCHAR* szName = cRDirE->GetName(); - WORD iLen = winchar_strlen(szName) + 1; -@@ -754,7 +744,7 @@ void CResourceEditor::WriteRsrcSec(BYTE* pbRsrcSec) { - while (!qDataEntries2.empty()) { - CResourceDataEntry* cRDataE = qDataEntries2.front(); - CopyMemory(seeker, cRDataE->GetData(), cRDataE->GetSize()); -- PIMAGE_RESOURCE_DATA_ENTRY(cRDataE->m_dwWrittenAt)->OffsetToData = ConvertEndianness(seeker - pbRsrcSec + m_dwResourceSectionVA); -+ PIMAGE_RESOURCE_DATA_ENTRY(cRDataE->m_ulWrittenAt)->OffsetToData = ConvertEndianness((DWORD)(seeker - pbRsrcSec) + m_dwResourceSectionVA); - - seeker += RALIGN(cRDataE->GetSize(), 8); - -@@ -764,21 +754,21 @@ void CResourceEditor::WriteRsrcSec(BYTE* pbRsrcSec) { - /* - * Set all of the directory entries offsets. - */ -- SetOffsets(m_cResDir, DWORD(pbRsrcSec)); -+ SetOffsets(m_cResDir, (ULONG_PTR)(pbRsrcSec)); - } - - // Sets the offsets in directory entries --void CResourceEditor::SetOffsets(CResourceDirectory* resDir, DWORD newResDirAt) { -+void CResourceEditor::SetOffsets(CResourceDirectory* resDir, ULONG_PTR newResDirAt) { - for (int i = 0; i < resDir->CountEntries(); i++) { -- PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY rde = PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY(resDir->GetEntry(i)->m_dwWrittenAt); -+ PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY rde = PMY_IMAGE_RESOURCE_DIRECTORY_ENTRY(resDir->GetEntry(i)->m_ulWrittenAt); - if (resDir->GetEntry(i)->IsDataDirectory()) { - rde->UOffset.DirectoryOffset.DataIsDirectory = 1; -- rde->UOffset.DirectoryOffset.OffsetToDirectory = resDir->GetEntry(i)->GetSubDirectory()->m_dwWrittenAt - newResDirAt; -+ rde->UOffset.DirectoryOffset.OffsetToDirectory = resDir->GetEntry(i)->GetSubDirectory()->m_ulWrittenAt - newResDirAt; - rde->UOffset.OffsetToData = ConvertEndianness(rde->UOffset.OffsetToData); - SetOffsets(resDir->GetEntry(i)->GetSubDirectory(), newResDirAt); - } - else { -- rde->UOffset.OffsetToData = ConvertEndianness(resDir->GetEntry(i)->GetDataEntry()->m_dwWrittenAt - newResDirAt); -+ rde->UOffset.OffsetToData = ConvertEndianness((DWORD)(resDir->GetEntry(i)->GetDataEntry()->m_ulWrittenAt - newResDirAt)); - } - } - } -@@ -887,7 +877,7 @@ int CResourceDirectory::CountEntries() { - // Returns -1 if can not be found - int CResourceDirectory::Find(WCHAR* szName) { - if (IS_INTRESOURCE(szName)) -- return Find((WORD) (DWORD) szName); -+ return Find((WORD) (ULONG_PTR) szName); - else - if (szName[0] == '#') - return Find(WORD(winchar_stoi(szName + 1))); -@@ -965,7 +955,7 @@ CResourceDirectoryEntry::CResourceDirectoryEntry(WCHAR* szName, CResourceDirecto - if (IS_INTRESOURCE(szName)) { - m_bHasName = false; - m_szName = 0; -- m_wId = (WORD) (DWORD) szName; -+ m_wId = (WORD) (ULONG_PTR) szName; - } - else { - m_bHasName = true; -@@ -979,7 +969,7 @@ CResourceDirectoryEntry::CResourceDirectoryEntry(WCHAR* szName, CResourceDataEnt - if (IS_INTRESOURCE(szName)) { - m_bHasName = false; - m_szName = 0; -- m_wId = (WORD) (DWORD) szName; -+ m_wId = (WORD) (ULONG_PTR) szName; - } - else { - m_bHasName = true; -diff --git a/Source/ResourceEditor.h b/Source/ResourceEditor.h -index 59def2e..d25be31 100755 ---- a/Source/ResourceEditor.h -+++ b/Source/ResourceEditor.h -@@ -27,7 +27,7 @@ - - #include "Platform.h" - #ifdef _WIN32 --# include <WinNT.h> -+# include <winnt.h> - #else - // all definitions for non Win32 platforms were taken from MinGW's free Win32 library - # define IMAGE_DIRECTORY_ENTRY_RESOURCE 2 -@@ -156,7 +156,7 @@ private: - CResourceDirectory* ScanDirectory(PRESOURCE_DIRECTORY rdRoot, PRESOURCE_DIRECTORY rdToScan); - - void WriteRsrcSec(BYTE* pbRsrcSec); -- void SetOffsets(CResourceDirectory* resDir, DWORD newResDirAt); -+ void SetOffsets(CResourceDirectory* resDir, ULONG_PTR newResDirAt); - - DWORD AdjustVA(DWORD dwVirtualAddress, DWORD dwAdjustment); - DWORD AlignVA(DWORD dwVirtualAddress); -@@ -180,7 +180,7 @@ public: - - void Destroy(); - -- DWORD m_dwWrittenAt; -+ ULONG_PTR m_ulWrittenAt; - - private: - IMAGE_RESOURCE_DIRECTORY m_rdDir; -@@ -204,7 +204,7 @@ public: - - CResourceDataEntry* GetDataEntry(); - -- DWORD m_dwWrittenAt; -+ ULONG_PTR m_ulWrittenAt; - - private: - bool m_bHasName; -@@ -232,7 +232,7 @@ public: - DWORD GetCodePage(); - DWORD GetOffset(); - -- DWORD m_dwWrittenAt; -+ ULONG_PTR m_ulWrittenAt; - - private: - BYTE* m_pbData; -diff --git a/Source/ResourceVersionInfo.cpp b/Source/ResourceVersionInfo.cpp -index 71df19e..7ed0ccf 100755 ---- a/Source/ResourceVersionInfo.cpp -+++ b/Source/ResourceVersionInfo.cpp -@@ -146,7 +146,7 @@ int GetVersionHeader (LPSTR &p, WORD &wLength, WORD &wValueLength, WORD &wType) - p += sizeof(WORD); - szKey = (WCHAR*)p; - p += (winchar_strlen(szKey) + 1) * sizeof (WCHAR); -- while ( ((long)p % 4) != 0 ) -+ while ( ((ULONG_PTR)p % 4) != 0 ) - p++; - return p - baseP; - } -diff --git a/Source/fileform.cpp b/Source/fileform.cpp -index 72296ba..e879ad5 100755 ---- a/Source/fileform.cpp -+++ b/Source/fileform.cpp -@@ -149,7 +149,7 @@ void ctlcolors_writer::write(const ctlcolors *data) - m_sink->write_int(data->text); - m_sink->write_int(data->bkc); - m_sink->write_int(data->lbStyle); -- m_sink->write_int((int) data->bkb); -+ m_sink->write_int((INT_PTR) data->bkb); - m_sink->write_int(data->bkmode); - m_sink->write_int(data->flags); - } -diff --git a/Source/mmap.cpp b/Source/mmap.cpp -index 1e0be7a..562a7ed 100755 ---- a/Source/mmap.cpp -+++ b/Source/mmap.cpp -@@ -322,7 +322,7 @@ void MMapFile::release(void *pView, int size) - if (!pView) - return; - -- unsigned int alignment = ((unsigned int)pView) % m_iAllocationGranularity; -+ unsigned int alignment = ((ULONG_PTR)pView) % m_iAllocationGranularity; - pView = (char *)pView - alignment; - size += alignment; - #ifdef _WIN32 -diff --git a/Source/script.cpp b/Source/script.cpp -index a492051..2951d98 100755 ---- a/Source/script.cpp -+++ b/Source/script.cpp -@@ -2129,7 +2129,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) - int k=line.gettoken_enum(1,rootkeys[0]); - if (k == -1) k=line.gettoken_enum(1,rootkeys[1]); - if (k == -1) PRINTHELP() -- build_header.install_reg_rootkey=(int)rootkey_tab[k]; -+ build_header.install_reg_rootkey=(INT_PTR)rootkey_tab[k]; - if (!build_header.install_reg_rootkey) PRINTHELP() // SHCTX is invalid here - build_header.install_reg_key_ptr = add_string(line.gettoken_str(2),0); - if (line.gettoken_str(2)[0] == '\\') -@@ -5184,7 +5184,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) - int k=line.gettoken_enum(2,rootkeys[0]); - if (k == -1) k=line.gettoken_enum(2,rootkeys[1]); - if (ent.offsets[0] == -1 || k == -1) PRINTHELP() -- ent.offsets[1]=(int)rootkey_tab[k]; -+ ent.offsets[1]=(INT_PTR)rootkey_tab[k]; - ent.offsets[2]=add_string(line.gettoken_str(3)); - ent.offsets[3]=add_string(line.gettoken_str(4)); - if (which_token == TOK_READREGDWORD) ent.offsets[4]=1; -@@ -5216,7 +5216,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) - if (k == -1) k=line.gettoken_enum(a,rootkeys[1]); - if (k == -1) PRINTHELP() - ent.which=EW_DELREG; -- ent.offsets[1]=(int)rootkey_tab[k]; -+ ent.offsets[1]=(INT_PTR)rootkey_tab[k]; - ent.offsets[2]=add_string(line.gettoken_str(a+1)); - ent.offsets[3]=(which_token==TOK_DELETEREGKEY)?0:add_string(line.gettoken_str(a+2)); - if (line.gettoken_str(a+1)[0] == '\\') -@@ -5236,7 +5236,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) - if (k == -1) k=line.gettoken_enum(1,rootkeys[1]); - if (k == -1) PRINTHELP() - ent.which=EW_WRITEREG; -- ent.offsets[0]=(int)rootkey_tab[k]; -+ ent.offsets[0]=(INT_PTR)rootkey_tab[k]; - ent.offsets[1]=add_string(line.gettoken_str(2)); - if (line.gettoken_str(2)[0] == '\\') - warning_fl("%s: registry path name begins with \'\\\', may cause problems",line.gettoken_str(0)); -@@ -5305,7 +5305,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) - int k=line.gettoken_enum(2,rootkeys[0]); - if (k == -1) k=line.gettoken_enum(2,rootkeys[1]); - if (ent.offsets[0] == -1 || k == -1) PRINTHELP() -- ent.offsets[1]=(int)rootkey_tab[k]; -+ ent.offsets[1]=(INT_PTR)rootkey_tab[k]; - ent.offsets[2]=add_string(line.gettoken_str(3)); - ent.offsets[3]=add_string(line.gettoken_str(4)); - ent.offsets[4]=which_token == TOK_ENUMREGKEY; -diff --git a/Source/util.cpp b/Source/util.cpp -index 2c0b07f..18c31a2 100755 ---- a/Source/util.cpp -+++ b/Source/util.cpp -@@ -77,9 +77,9 @@ int update_bitmap(CResourceEditor* re, WORD id, const char* filename, int width/ - } - - if (width != 0) { -- LONG biWidth; -+ INT32 biWidth; - fseek(f, 18, SEEK_SET); // Seek to the width member of the header -- fread(&biWidth, sizeof(LONG), 1, f); -+ fread(&biWidth, sizeof(INT32), 1, f); - FIX_ENDIAN_INT32_INPLACE(biWidth); - if (width != biWidth) { - fclose(f); -@@ -88,9 +88,9 @@ int update_bitmap(CResourceEditor* re, WORD id, const char* filename, int width/ - } - - if (height != 0) { -- LONG biHeight; -+ INT32 biHeight; - fseek(f, 22, SEEK_SET); // Seek to the height member of the header -- fread(&biHeight, sizeof(LONG), 1, f); -+ fread(&biHeight, sizeof(INT32), 1, f); - FIX_ENDIAN_INT32_INPLACE(biHeight); - // Bitmap height can be negative too... - if (height != abs(biHeight)) { -@@ -689,8 +689,8 @@ static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData ) - } - - // Find the beginning of the NT header at offset e_lfanew. -- pNtExeHdr = (PIMAGE_NT_HEADERS) ( (DWORD) pView -- + (DWORD) pDosExeHdr->e_lfanew ); -+ pNtExeHdr = (PIMAGE_NT_HEADERS) ( (ULONG_PTR) pView -+ + pDosExeHdr->e_lfanew ); - - // Check to make sure the file is a VxD. - if ( (DWORD) pNtExeHdr->Signature != IMAGE_VXD_SIGNATURE ) -@@ -728,8 +728,8 @@ static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData ) - } - - // e32_winresoff contains the offset of the resource in the VxD. -- pVerRes = (VXD_VERSION_RESOURCE *) ( (DWORD) pView -- + (DWORD) pLEHdr->e32_winresoff ); -+ pVerRes = (VXD_VERSION_RESOURCE *) ( (ULONG_PTR) pView -+ + pLEHdr->e32_winresoff ); - dwSize = pVerRes->dwResSize; - pRawRes = &(pVerRes->bVerData); - -@@ -780,7 +780,7 @@ static DWORD GetVxdVersionInfoSize( LPCSTR szFile ) - - // GetVxdVersion() will fail with ERROR_INSUFFICIENT_BUFFER and - // the required buffer size will be returned in dwResult. -- if ( GetLastError() == ERROR_INSUFFICIENT_BUFFER ) -+ if ( dwError == ERROR_INSUFFICIENT_BUFFER ) - { - SetLastError( 0 ); - return dwResult; --- -2.1.0 - - -From eb6e12dd7173f4c259fd31c9074b0c95bc567487 Mon Sep 17 00:00:00 2001 -From: Tony Theodore <tonyt@logyst.com> -Date: Thu, 9 May 2013 13:08:59 +1000 -Subject: [PATCH 4/4] i686-w64-mingw32 fixes - - -diff --git a/Contrib/InstallOptions/InstallerOptions.cpp b/Contrib/InstallOptions/InstallerOptions.cpp -index d8303b0..fefc8f8 100755 ---- a/Contrib/InstallOptions/InstallerOptions.cpp -+++ b/Contrib/InstallOptions/InstallerOptions.cpp -@@ -13,6 +13,7 @@ - #include <cderr.h> - #include "resource.h" - #include "shellapi.h" -+#include <algorithm> - - #include <nsis/pluginapi.h> // nsis plugin - -@@ -149,7 +150,7 @@ struct FieldType { - int nField; // field number in INI file - char *pszHwndEntry; // "HWND" or "HWND2" - -- long wndProc; -+ long wndProc; - }; - - // initial buffer size. buffers will grow as required. -@@ -759,7 +760,7 @@ BOOL CALLBACK cfgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) - DrawText(lpdis->hDC, pField->pszText, -1, &rc, DT_VCENTER | DT_WORDBREAK | DT_CALCRECT); - - // Make some more room so the focus rect won't cut letters off -- rc.right = min(rc.right + 2, lpdis->rcItem.right); -+ rc.right = std::min(rc.right + 2, lpdis->rcItem.right); - - // Move rect to right if in RTL mode - if (bRTL) -@@ -877,7 +878,7 @@ int WINAPI NumbersOnlyPasteWndProc(HWND hWin, UINT uMsg, WPARAM wParam, LPARAM l - if (OpenClipboard(hWin)) - { - HGLOBAL hData = GetClipboardData(CF_TEXT); -- -+ - if (hData) - { - char *lpData = (char *) GlobalLock(hData); -@@ -1346,7 +1347,7 @@ int WINAPI createCfgDlg() - - int keycolor = *bmp & 0xFFFFFF; - -- // Search for transparent pixels -+ // Search for transparent pixels - for (y = bm.bmHeight - 1; y >= 0; y--) { - for (x = 0; x < bm.bmWidth;) { - if ((*bmp & 0xFFFFFF) == keycolor) { -diff --git a/Contrib/Makensisw/afxres.h b/Contrib/Makensisw/afxres.h -index d4c5e1f..16b729d 100755 ---- a/Contrib/Makensisw/afxres.h -+++ b/Contrib/Makensisw/afxres.h -@@ -1,4 +1,4 @@ --#define _WIN32_IE 0x0400 -+#define _WIN32_IE 0x0501 - #include <windows.h> - - #ifndef IDC_STATIC -diff --git a/Contrib/Makensisw/makensisw.h b/Contrib/Makensisw/makensisw.h -index beadc3f..1479b2f 100755 ---- a/Contrib/Makensisw/makensisw.h -+++ b/Contrib/Makensisw/makensisw.h -@@ -22,7 +22,7 @@ - #ifndef MAKENSIS_H - #define MAKENSIS_H - --#define _WIN32_IE 0x0400 -+#define _WIN32_IE 0x0501 - #include <windows.h> - #include <commctrl.h> - #include "utils.h" -diff --git a/Source/SConscript b/Source/SConscript -index 505e438..f9aee9d 100755 ---- a/Source/SConscript -+++ b/Source/SConscript -@@ -71,7 +71,7 @@ AddAvailableLibs(env, libs) - - ##### Defines - --env.Append(CPPDEFINES = ['_WIN32_IE=0x0500']) -+env.Append(CPPDEFINES = ['_WIN32_IE=0x0501']) - - ##### Set PCH - -diff --git a/Source/exehead/SConscript b/Source/exehead/SConscript -index bebdd54..2f4e490 100755 ---- a/Source/exehead/SConscript -+++ b/Source/exehead/SConscript -@@ -53,7 +53,7 @@ Import('env compression solid_compression') - - env.Append(CPPDEFINES = ['EXEHEAD']) - env.Append(CPPDEFINES = ['WIN32_LEAN_AND_MEAN']) --env.Append(CPPDEFINES = ['_WIN32_IE=0x0500']) -+env.Append(CPPDEFINES = ['_WIN32_IE=0x0501']) - - ### Some other settings - -diff --git a/Source/util.cpp b/Source/util.cpp -index 18c31a2..fc9443f 100755 ---- a/Source/util.cpp -+++ b/Source/util.cpp -@@ -1,15 +1,15 @@ - /* - * util.cpp -- * -+ * - * This file is a part of NSIS. -- * -+ * - * Copyright (C) 1999-2009 Nullsoft and Contributors -- * -+ * - * Licensed under the zlib/libpng license (the "License"); - * you may not use this file except in compliance with the License. -- * -+ * - * Licence details can be found in the file COPYING. -- * -+ * - * This software is provided 'as-is', without any express or implied - * warranty. - */ -@@ -616,7 +616,7 @@ typedef struct _VXD_VERSION_RESOURCE { - } VXD_VERSION_RESOURCE, *PVXD_VERSION_RESOURCE; - #pragma pack( pop, pre_vxd_ver ) - --static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData ) -+static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData ) - { - - HANDLE hFile = NULL; -@@ -673,7 +673,7 @@ static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData ) - pDosExeHdr = (PIMAGE_DOS_HEADER) pView; - - // Check to make sure the file has a DOS EXE header. -- if ( pDosExeHdr->e_magic != IMAGE_DOS_SIGNATURE ) -+ if ( pDosExeHdr->e_magic != IMAGE_DOS_SIGNATURE ) - { - if ( pView ) - UnmapViewOfFile( pView ); -@@ -693,7 +693,7 @@ static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData ) - + pDosExeHdr->e_lfanew ); - - // Check to make sure the file is a VxD. -- if ( (DWORD) pNtExeHdr->Signature != IMAGE_VXD_SIGNATURE ) -+ if ( (DWORD) pNtExeHdr->Signature != IMAGE_VXD_SIGNATURE ) - { - if ( pView ) - UnmapViewOfFile( pView ); -@@ -769,18 +769,18 @@ static BOOL GetVxdVersion( LPCSTR szFile, LPDWORD lpdwLen, LPVOID lpData ) - return TRUE; - } - --static DWORD GetVxdVersionInfoSize( LPCSTR szFile ) -+static DWORD GetVxdVersionInfoSize( LPCSTR szFile ) - { - DWORD dwResult = 0; - - // Call GetVxdVersion() with NULL for the pointer to the buffer. -- if ( !GetVxdVersion( szFile, &dwResult, NULL ) ) -+ if ( !GetVxdVersion( szFile, &dwResult, NULL ) ) - { - DWORD dwError = GetLastError(); - - // GetVxdVersion() will fail with ERROR_INSUFFICIENT_BUFFER and - // the required buffer size will be returned in dwResult. -- if ( dwError == ERROR_INSUFFICIENT_BUFFER ) -+ if ( dwError == ERROR_INSUFFICIENT_BUFFER ) - { - SetLastError( 0 ); - return dwResult; -@@ -791,7 +791,7 @@ static DWORD GetVxdVersionInfoSize( LPCSTR szFile ) - return 0; - } - --static BOOL GetVxdVersionInfo( LPCSTR szFile, DWORD dwLen, LPVOID lpData ) -+static BOOL GetVxdVersionInfo( LPCSTR szFile, DWORD dwLen, LPVOID lpData ) - { - return GetVxdVersion( szFile, &dwLen, lpData ); - } --- -2.1.0 - - diff --git a/src/nsis.mk b/src/nsis.mk index 113b8b47..1a036966 100644 --- a/src/nsis.mk +++ b/src/nsis.mk @@ -1,32 +1,34 @@ -# 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 := nsis +$(PKG)_WEBSITE := https://nsis.sourceforge.io/ +$(PKG)_DESCR := NSIS $(PKG)_IGNORE := -$(PKG)_VERSION := 2.46 -$(PKG)_CHECKSUM := f5f9e5e22505e44b25aea14fe17871c1ed324c1f3cc7a753ef591f76c9e8a1ae +$(PKG)_VERSION := 3.01 +$(PKG)_CHECKSUM := 604c011593be484e65b2141c50a018f1b28ab28c994268e4ecd377773f3ffba1 $(PKG)_SUBDIR := nsis-$($(PKG)_VERSION)-src $(PKG)_FILE := nsis-$($(PKG)_VERSION)-src.tar.bz2 -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/nsis/NSIS 2/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/nsis/NSIS 3/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/p/nsis/code/HEAD/tree/NSIS/tags/' | \ - grep '<a href="' | \ - $(SED) -n 's,.*<a href="v\([0-9]\)\([^"]*\)".*,\1.\2,p' | \ + $(WGET) -q -O- 'https://nsis.sourceforge.io/Download' | \ + $(SED) -n 's,.*nsis-\([0-9.]\+\)-src.tar.*,\1,p' | \ tail -1 endef define $(PKG)_BUILD + $(if $(findstring x86_64-w64-mingw32,$(TARGET)),\ + $(SED) -i 's/pei-i386/pei-x86-64/' '$(1)/SCons/Config/linker_script') cd '$(1)' && scons \ MINGW_CROSS_PREFIX='$(TARGET)-' \ PREFIX='$(PREFIX)/$(TARGET)' \ `[ -d /usr/local/include ] && echo APPEND_CPPPATH=/usr/local/include` \ `[ -d /usr/local/lib ] && echo APPEND_LIBPATH=/usr/local/lib` \ - SKIPUTILS='NSIS Menu' \ + $(if $(findstring x86_64-w64-mingw32,$(TARGET)),\ + SKIPPLUGINS='System') \ + SKIPUTILS='MakeLangId,Makensisw,NSIS Menu,zip2exe' \ NSIS_MAX_STRLEN=8192 \ install $(INSTALL) -m755 '$(PREFIX)/$(TARGET)/bin/makensis' '$(PREFIX)/bin/$(TARGET)-makensis' endef - -$(PKG)_BUILD_x86_64-w64-mingw32 = diff --git a/src/ocaml-cairo-1-fixes.patch b/src/ocaml-cairo-1-fixes.patch index 4bb2b810..3841ce94 100644 --- a/src/ocaml-cairo-1-fixes.patch +++ b/src/ocaml-cairo-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/ocaml-cairo-test.ml b/src/ocaml-cairo-test.ml index e26e32f3..ddf75a05 100644 --- a/src/ocaml-cairo-test.ml +++ b/src/ocaml-cairo-test.ml @@ -1,6 +1,5 @@ (* -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. *) let on_expose_event widget _ = diff --git a/src/ocaml-cairo.mk b/src/ocaml-cairo.mk index c93914a4..889dc316 100644 --- a/src/ocaml-cairo.mk +++ b/src/ocaml-cairo.mk @@ -1,17 +1,18 @@ -# 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 := ocaml-cairo +$(PKG)_WEBSITE := https://cairographics.org/cairo-ocaml/ +$(PKG)_DESCR := cairo-ocaml $(PKG)_IGNORE := $(PKG)_VERSION := 1.2.0 $(PKG)_CHECKSUM := 4beae96acfc13dbb8b0a798a0664380429c6a94357e7dc5747d76599deabdfc7 $(PKG)_SUBDIR := cairo-ocaml-$($(PKG)_VERSION) $(PKG)_FILE := cairo-ocaml_$($(PKG)_VERSION).orig.tar.gz -$(PKG)_URL := http://ftp.de.debian.org/debian/pool/main/c/cairo-ocaml/$($(PKG)_FILE) +$(PKG)_URL := https://ftp.de.debian.org/debian/pool/main/c/cairo-ocaml/$($(PKG)_FILE) $(PKG)_DEPS := gcc ocaml-core ocaml-findlib ocaml-lablgtk2 define $(PKG)_UPDATE - $(WGET) -q -O- 'http://ftp.de.debian.org/debian/pool/main/c/cairo-ocaml/?C=M;O=D' | \ + $(WGET) -q -O- 'https://ftp.de.debian.org/debian/pool/main/c/cairo-ocaml/?C=M;O=D' | \ $(SED) -n 's,.*cairo-ocaml_\([0-9][^>]*\)\.orig\.tar.*,\1,ip' | \ head -1 endef @@ -30,7 +31,7 @@ define $(PKG)_BUILD -package lablgtk2.auto-init \ -package cairo.lablgtk2 \ -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ - < '$(2).ml' + < '$(TEST_FILE)' endef $(PKG)_BUILD_x86_64-w64-mingw32 = diff --git a/src/ocaml-camlimages-1-fixes.patch b/src/ocaml-camlimages-1-fixes.patch index 4f87fa54..4744196c 100644 --- a/src/ocaml-camlimages-1-fixes.patch +++ b/src/ocaml-camlimages-1-fixes.patch @@ -1,19 +1,19 @@ -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. Contains ad hoc patches for cross building. -From c09e9baa34783c7dd44cc5afc65f1f4b4030ebf2 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Sun, 12 Aug 2012 20:55:49 +0200 -Subject: [PATCH 1/4] set back configure build system that enables cross compilation (instead of OMake) +Subject: [PATCH] set back configure build system that enables cross + compilation (instead of OMake) this patch and next ones are taken from camlimages bug tracker : http://modulogic.inria.fr/bugtracker/view.php?id=7 diff --git a/Makefile.am b/Makefile.am new file mode 100644 -index 0000000..cdaf30d +index 1111111..2222222 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,58 @@ @@ -77,7 +77,7 @@ index 0000000..cdaf30d +# $(INSTALL) -g caml -m g+w $(DISTFILE) $(FTPSITEDIR) diff --git a/Makefile.rules b/Makefile.rules new file mode 100644 -index 0000000..a2a41d9 +index 1111111..2222222 --- /dev/null +++ b/Makefile.rules @@ -0,0 +1,36 @@ @@ -119,7 +119,7 @@ index 0000000..a2a41d9 +@AMDEP_TRUE@@am__include@ @am__quote@.depend@am__quote@ diff --git a/Makefile.variables b/Makefile.variables new file mode 100644 -index 0000000..c29c97b +index 1111111..2222222 --- /dev/null +++ b/Makefile.variables @@ -0,0 +1,49 @@ @@ -173,7 +173,7 @@ index 0000000..c29c97b + $(OCAMLSOURCES:.ml=.cmi) \ + $(COBJS) diff --git a/configure.ac b/configure.ac -index 06464b3..12269c9 100644 +index 1111111..2222222 100644 --- a/configure.ac +++ b/configure.ac @@ -1,68 +1,62 @@ @@ -472,7 +472,7 @@ index 06464b3..12269c9 100644 Lablgtk2 support: $SUPPORT_LABLGTK2 diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 -index 0000000..3c4ac76 +index 1111111..2222222 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,36 @@ @@ -514,7 +514,7 @@ index 0000000..3c4ac76 + mv eng.html.tmp eng.html diff --git a/doc/sphinx/Makefile b/doc/sphinx/Makefile new file mode 100644 -index 0000000..45073fd +index 1111111..2222222 --- /dev/null +++ b/doc/sphinx/Makefile @@ -0,0 +1,89 @@ @@ -609,7 +609,7 @@ index 0000000..45073fd + "results in $(BUILDDIR)/doctest/output.txt." diff --git a/examples/Makefile.am b/examples/Makefile.am new file mode 100644 -index 0000000..38d4474 +index 1111111..2222222 --- /dev/null +++ b/examples/Makefile.am @@ -0,0 +1,37 @@ @@ -652,7 +652,7 @@ index 0000000..38d4474 +endif diff --git a/examples/converter/Makefile.am b/examples/converter/Makefile.am new file mode 100644 -index 0000000..1de0339 +index 1111111..2222222 --- /dev/null +++ b/examples/converter/Makefile.am @@ -0,0 +1,43 @@ @@ -701,7 +701,7 @@ index 0000000..1de0339 +include ../../Makefile.rules diff --git a/examples/crop/Makefile.am b/examples/crop/Makefile.am new file mode 100644 -index 0000000..23e3852 +index 1111111..2222222 --- /dev/null +++ b/examples/crop/Makefile.am @@ -0,0 +1,44 @@ @@ -751,7 +751,7 @@ index 0000000..23e3852 +include ../../Makefile.rules diff --git a/examples/edgedetect/Makefile.am b/examples/edgedetect/Makefile.am new file mode 100644 -index 0000000..556730a +index 1111111..2222222 --- /dev/null +++ b/examples/edgedetect/Makefile.am @@ -0,0 +1,42 @@ @@ -799,7 +799,7 @@ index 0000000..556730a +include ../../Makefile.rules diff --git a/examples/gifanim/Makefile.am b/examples/gifanim/Makefile.am new file mode 100644 -index 0000000..1c8c5e0 +index 1111111..2222222 --- /dev/null +++ b/examples/gifanim/Makefile.am @@ -0,0 +1,50 @@ @@ -855,7 +855,7 @@ index 0000000..1c8c5e0 +include ../../Makefile.rules diff --git a/examples/imgstat/Makefile.am b/examples/imgstat/Makefile.am new file mode 100644 -index 0000000..b74f90c +index 1111111..2222222 --- /dev/null +++ b/examples/imgstat/Makefile.am @@ -0,0 +1,42 @@ @@ -903,7 +903,7 @@ index 0000000..b74f90c +include ../../Makefile.rules diff --git a/examples/liv-furuse/Makefile.am b/examples/liv-furuse/Makefile.am new file mode 100644 -index 0000000..7c993d8 +index 1111111..2222222 --- /dev/null +++ b/examples/liv-furuse/Makefile.am @@ -0,0 +1,77 @@ @@ -986,7 +986,7 @@ index 0000000..7c993d8 +include ../../Makefile.rules diff --git a/examples/liv/Makefile.am b/examples/liv/Makefile.am new file mode 100644 -index 0000000..7c993d8 +index 1111111..2222222 --- /dev/null +++ b/examples/liv/Makefile.am @@ -0,0 +1,77 @@ @@ -1069,7 +1069,7 @@ index 0000000..7c993d8 +include ../../Makefile.rules diff --git a/examples/monochrome/Makefile.am b/examples/monochrome/Makefile.am new file mode 100644 -index 0000000..9cfb0bc +index 1111111..2222222 --- /dev/null +++ b/examples/monochrome/Makefile.am @@ -0,0 +1,42 @@ @@ -1117,7 +1117,7 @@ index 0000000..9cfb0bc +include ../../Makefile.rules diff --git a/examples/normalize/Makefile.am b/examples/normalize/Makefile.am new file mode 100644 -index 0000000..6af840b +index 1111111..2222222 --- /dev/null +++ b/examples/normalize/Makefile.am @@ -0,0 +1,42 @@ @@ -1165,7 +1165,7 @@ index 0000000..6af840b +include ../../Makefile.rules diff --git a/examples/resize/Makefile.am b/examples/resize/Makefile.am new file mode 100644 -index 0000000..10a181c +index 1111111..2222222 --- /dev/null +++ b/examples/resize/Makefile.am @@ -0,0 +1,42 @@ @@ -1213,7 +1213,7 @@ index 0000000..10a181c +include ../../Makefile.rules diff --git a/examples/tiffps/Makefile.am b/examples/tiffps/Makefile.am new file mode 100644 -index 0000000..56e657d +index 1111111..2222222 --- /dev/null +++ b/examples/tiffps/Makefile.am @@ -0,0 +1,42 @@ @@ -1261,7 +1261,7 @@ index 0000000..56e657d +include ../../Makefile.rules diff --git a/examples/ttfimg/Makefile.am b/examples/ttfimg/Makefile.am new file mode 100644 -index 0000000..32a518d +index 1111111..2222222 --- /dev/null +++ b/examples/ttfimg/Makefile.am @@ -0,0 +1,42 @@ @@ -1308,7 +1308,7 @@ index 0000000..32a518d + +include ../../Makefile.rules diff --git a/ocaml.m4 b/ocaml.m4 -index 9a59648..6431281 100644 +index 1111111..2222222 100644 --- a/ocaml.m4 +++ b/ocaml.m4 @@ -1,279 +1,197 @@ @@ -1787,7 +1787,7 @@ index 9a59648..6431281 100644 +]) diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 -index 0000000..6d90c5d +index 1111111..2222222 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,256 @@ @@ -2049,7 +2049,7 @@ index 0000000..6d90c5d +include ../Makefile.rules diff --git a/test/Makefile.am b/test/Makefile.am new file mode 100644 -index 0000000..a02b0bf +index 1111111..2222222 --- /dev/null +++ b/test/Makefile.am @@ -0,0 +1,54 @@ @@ -2107,18 +2107,15 @@ index 0000000..a02b0bf + + +include ../Makefile.rules --- -1.7.2.5 - -From 79be4b11cf6e32056ac199efb48728fd7a09bbe9 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Sun, 12 Aug 2012 20:56:46 +0200 -Subject: [PATCH 2/4] modify META file with ad-hock patch to make it usable in MXE +Subject: [PATCH] modify META file with ad-hock patch to make it usable in MXE diff --git a/src/META.in b/src/META.in -index 45e96d6..e1b1c18 100644 +index 1111111..2222222 100644 --- a/src/META.in +++ b/src/META.in @@ -2,68 +2,15 @@ name = "CamlImages" @@ -2194,18 +2191,16 @@ index 45e96d6..e1b1c18 100644 + archive(byte) = "camlimages.cma" + archive(native) = "camlimages.cmxa" ) --- -1.7.2.5 - -From 7ecf7a9c4ca35e5f43514cfc634d09999ee0a099 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Sun, 12 Aug 2012 20:58:10 +0200 -Subject: [PATCH 3/4] update gifread.c and gifwrite.c for new giflib-5.0.0, and png for similar purpose +Subject: [PATCH] update gifread.c and gifwrite.c for new giflib-5.0.0, and png + for similar purpose diff --git a/src/gifread.c b/src/gifread.c -index ecf40c4..097db1d 100644 +index 1111111..2222222 100644 --- a/src/gifread.c +++ b/src/gifread.c @@ -140,7 +140,7 @@ value dGifOpenFileName( value name ) @@ -2232,7 +2227,7 @@ index ecf40c4..097db1d 100644 } CAMLreturn(buf); diff --git a/src/gifwrite.c b/src/gifwrite.c -index 4b6399f..caf04c0 100644 +index 1111111..2222222 100644 --- a/src/gifwrite.c +++ b/src/gifwrite.c @@ -25,7 +25,7 @@ @@ -2285,7 +2280,7 @@ index 4b6399f..caf04c0 100644 failwith("EGifPutExtension"); } diff --git a/src/pngread.c b/src/pngread.c -index cc576e8..ce25110 100644 +index 1111111..2222222 100644 --- a/src/pngread.c +++ b/src/pngread.c @@ -69,7 +69,7 @@ value read_png_file_as_rgb24( name ) @@ -2325,7 +2320,7 @@ index cc576e8..ce25110 100644 png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); fclose(fp); diff --git a/src/pngwrite.c b/src/pngwrite.c -index 3248562..6937cd8 100644 +index 1111111..2222222 100644 --- a/src/pngwrite.c +++ b/src/pngwrite.c @@ -62,7 +62,7 @@ value write_png_file_rgb( name, buffer, width, height, with_alpha ) @@ -2346,18 +2341,16 @@ index 3248562..6937cd8 100644 /* Free all of the memory associated with the png_ptr and info_ptr */ png_destroy_write_struct(&png_ptr, &info_ptr); fclose(fp); --- -1.7.2.5 - -From f35cfc4a23431f0da77f9fa75f6d102a7b09e094 Mon Sep 17 00:00:00 2001 -From: MXE +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "fix@me" <fix@me> Date: Wed, 3 Oct 2012 09:37:05 +0200 -Subject: [PATCH 4/4] META : add camlimages.lablgtk2 and camlimages.freetype (referencing camlimages.all_formats) +Subject: [PATCH] META : add camlimages.lablgtk2 and camlimages.freetype + (referencing camlimages.all_formats) diff --git a/src/META.in b/src/META.in -index e1b1c18..5994beb 100644 +index 1111111..2222222 100644 --- a/src/META.in +++ b/src/META.in @@ -9,8 +9,16 @@ package "core" ( @@ -2378,6 +2371,36 @@ index e1b1c18..5994beb 100644 archive(byte) = "camlimages.cma" archive(native) = "camlimages.cmxa" ) --- -1.7.2.5 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Sun, 17 Jul 2016 12:16:43 +1000 +Subject: [PATCH] fix for giflib >=5.1 + + +diff --git a/src/gifread.c b/src/gifread.c +index 1111111..2222222 100644 +--- a/src/gifread.c ++++ b/src/gifread.c +@@ -161,7 +161,7 @@ value dGifCloseFile( value hdl ) + segmentation faults */ + ((GifFileType *)hdl)->Image.ColorMap = NULL; + +- DGifCloseFile( (GifFileType *) hdl ); ++ DGifCloseFile( (GifFileType *) hdl, NULL ); + CAMLreturn(Val_unit); + } + +diff --git a/src/gifwrite.c b/src/gifwrite.c +index 1111111..2222222 100644 +--- a/src/gifwrite.c ++++ b/src/gifwrite.c +@@ -88,7 +88,7 @@ value eGifCloseFile( value hdl ) + segmentation faults */ + ((GifFileType *)hdl)->Image.ColorMap = NULL; + +- EGifCloseFile( (GifFileType *) hdl ); ++ EGifCloseFile( (GifFileType *) hdl, NULL ); + CAMLreturn(Val_unit); + } + diff --git a/src/ocaml-camlimages-test.ml b/src/ocaml-camlimages-test.ml index 94462dee..8d8e800d 100644 --- a/src/ocaml-camlimages-test.ml +++ b/src/ocaml-camlimages-test.ml @@ -1,6 +1,5 @@ (* -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. *) open Images diff --git a/src/ocaml-camlimages.mk b/src/ocaml-camlimages.mk index 7e49b6e2..3d74ec4b 100644 --- a/src/ocaml-camlimages.mk +++ b/src/ocaml-camlimages.mk @@ -1,7 +1,8 @@ -# 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 := ocaml-camlimages +$(PKG)_WEBSITE := http://gallium.inria.fr/camlimages +$(PKG)_DESCR := camlimages $(PKG)_IGNORE := $(PKG)_VERSION := 4.0.1 $(PKG)_CHECKSUM := b40237c1505487049799a7af296eb3996b3fa08eab94415546f46d61355747c4 @@ -34,7 +35,7 @@ define $(PKG)_BUILD '$(TARGET)-ocamlfind' opt -linkpkg \ -package camlimages \ -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ - < '$(2).ml' + < '$(TEST_FILE)' endef $(PKG)_BUILD_x86_64-w64-mingw32 = diff --git a/src/ocaml-core-1-fixes.patch b/src/ocaml-core-1-fixes.patch index d68db399..dfe9bd51 100644 --- a/src/ocaml-core-1-fixes.patch +++ b/src/ocaml-core-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/ocaml-core-test.ml b/src/ocaml-core-test.ml index c0066b59..8bca7d91 100644 --- a/src/ocaml-core-test.ml +++ b/src/ocaml-core-test.ml @@ -1,6 +1,5 @@ (* -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. *) open Printf diff --git a/src/ocaml-core.mk b/src/ocaml-core.mk index d587716e..751cb858 100644 --- a/src/ocaml-core.mk +++ b/src/ocaml-core.mk @@ -1,7 +1,8 @@ -# 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 := ocaml-core +$(PKG)_WEBSITE := https://caml.inria.fr/ +$(PKG)_DESCR := ocaml $(PKG)_IGNORE = $(ocaml-native_IGNORE) $(PKG)_VERSION = $(ocaml-native_VERSION) $(PKG)_CHECKSUM = $(ocaml-native_CHECKSUM) @@ -113,10 +114,10 @@ define $(PKG)_BUILD done # test ocamlopt - cp '$(2).ml' '$(1)/test.ml' + cp '$(TEST_FILE)' '$(1)/test.ml' cd '$(1)' && '$(TARGET)-ocamlopt' test.ml # test ocamlbuild from package ocaml-native, now that ocamlopt works - mkdir '$(1)/tmp' && cp '$(2).ml' '$(1)/tmp/test.ml' + mkdir '$(1)/tmp' && cp '$(TEST_FILE)' '$(1)/tmp/test.ml' cd '$(1)/tmp' && $(TARGET)-ocamlbuild test.native endef diff --git a/src/ocaml-findlib-test.ml b/src/ocaml-findlib-test.ml index c0066b59..8bca7d91 100644 --- a/src/ocaml-findlib-test.ml +++ b/src/ocaml-findlib-test.ml @@ -1,6 +1,5 @@ (* -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. *) open Printf diff --git a/src/ocaml-findlib.mk b/src/ocaml-findlib.mk index d4036a51..4f41a32d 100644 --- a/src/ocaml-findlib.mk +++ b/src/ocaml-findlib.mk @@ -1,7 +1,8 @@ -# 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 := ocaml-findlib +$(PKG)_WEBSITE := http://download.camlcity.org/ +$(PKG)_DESCR := findlib $(PKG)_IGNORE := $(PKG)_VERSION := 1.4 $(PKG)_CHECKSUM := 6e4065e5d79d31176ec213ff94599c4eae17c3904c2896e845d0379a99f1bdf8 @@ -52,7 +53,7 @@ define $(PKG)_BUILD # test '$(TARGET)-ocamlfind' opt \ -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ - < '$(2).ml' + < '$(TEST_FILE)' endef diff --git a/src/ocaml-flexdll-1-fixes.patch b/src/ocaml-flexdll-1-fixes.patch index dd5c983d..15ec73cc 100644 --- a/src/ocaml-flexdll-1-fixes.patch +++ b/src/ocaml-flexdll-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/ocaml-flexdll-test.c b/src/ocaml-flexdll-test.c old mode 100755 new mode 100644 index 25354252..943a5f9d --- a/src/ocaml-flexdll-test.c +++ b/src/ocaml-flexdll-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ /***************************************************************** diff --git a/src/ocaml-flexdll.mk b/src/ocaml-flexdll.mk index 55e1afeb..76bf18f5 100644 --- a/src/ocaml-flexdll.mk +++ b/src/ocaml-flexdll.mk @@ -1,7 +1,8 @@ -# 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 := ocaml-flexdll +$(PKG)_WEBSITE := http://alain.frisch.fr/ +$(PKG)_DESCR := flexdll $(PKG)_IGNORE := $(PKG)_VERSION := 0.31 $(PKG)_CHECKSUM := f01d90a8b89a82a6021f3d96a2977a54cb858c561f062a43e5dd451618119e2c diff --git a/src/ocaml-lablgl-1-fixes.patch b/src/ocaml-lablgl-1-fixes.patch index 857a4a8b..30fe3241 100644 --- a/src/ocaml-lablgl-1-fixes.patch +++ b/src/ocaml-lablgl-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/ocaml-lablgl.mk b/src/ocaml-lablgl.mk index 695dbed9..93e5e359 100644 --- a/src/ocaml-lablgl.mk +++ b/src/ocaml-lablgl.mk @@ -1,7 +1,8 @@ -# 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 := ocaml-lablgl +$(PKG)_WEBSITE := http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgl.html +$(PKG)_DESCR := lablgl $(PKG)_IGNORE := $(PKG)_VERSION := 1.05 $(PKG)_CHECKSUM := d8ff03e35b970d2b23a942f9e6ed65da5a6c123986bd0ecf5424a6205af34b61 diff --git a/src/ocaml-lablgtk2-1-fixes.patch b/src/ocaml-lablgtk2-1-fixes.patch index 2bbcd12f..bfc9b821 100644 --- a/src/ocaml-lablgtk2-1-fixes.patch +++ b/src/ocaml-lablgtk2-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/ocaml-lablgtk2-test.ml b/src/ocaml-lablgtk2-test.ml index e543fb71..3f265a71 100644 --- a/src/ocaml-lablgtk2-test.ml +++ b/src/ocaml-lablgtk2-test.ml @@ -1,6 +1,5 @@ (* -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. *) open GlGtk diff --git a/src/ocaml-lablgtk2.mk b/src/ocaml-lablgtk2.mk index e362fa84..d547db99 100644 --- a/src/ocaml-lablgtk2.mk +++ b/src/ocaml-lablgtk2.mk @@ -1,7 +1,8 @@ -# 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 := ocaml-lablgtk2 +$(PKG)_WEBSITE := https://forge.ocamlcore.org/ +$(PKG)_DESCR := lablgtk2 $(PKG)_IGNORE := $(PKG)_VERSION := 2.16.0 $(PKG)_CHECKSUM := a0ea9752eb257dadcfc2914408fff339d4c34357802f02c63329dd41b777de2f @@ -11,7 +12,7 @@ $(PKG)_URL := https://forge.ocamlcore.org/frs/download.php/979/$($(PKG)_FIL $(PKG)_DEPS := gcc gtk2 gtkglarea gtksourceview libglade ocaml-findlib ocaml-lablgl define $(PKG)_UPDATE - $(WGET) -q -O- 'http://forge.ocamlcore.org/frs/?group_id=220' | \ + $(WGET) -q -O- 'https://forge.ocamlcore.org/frs/?group_id=220' | \ $(SED) -n 's,.*lablgtk-\(2[^>]*\)\.tar.*,\1,ip' | \ $(SORT) | \ tail -1 @@ -30,7 +31,7 @@ define $(PKG)_BUILD '$(TARGET)-ocamlfind' opt -linkpkg \ -package lablgtk2.gl \ -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ - < '$(2).ml' + < '$(TEST_FILE)' endef $(PKG)_BUILD_x86_64-w64-mingw32 = diff --git a/src/ocaml-native-1-fixes.patch b/src/ocaml-native-1-fixes.patch index 8c328938..bccc680f 100644 --- a/src/ocaml-native-1-fixes.patch +++ b/src/ocaml-native-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/ocaml-native.mk b/src/ocaml-native.mk index cdc546f7..b8744ed1 100644 --- a/src/ocaml-native.mk +++ b/src/ocaml-native.mk @@ -1,17 +1,18 @@ -# 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 := ocaml-native +$(PKG)_WEBSITE := https://caml.inria.fr/ +$(PKG)_DESCR := ocaml $(PKG)_IGNORE := $(PKG)_VERSION := 4.00.1 $(PKG)_CHECKSUM := b48d5c7d3bf4a0cd6125f8fdfc1f654dd65586087399dc9f14716d7b9535e87a $(PKG)_SUBDIR := ocaml-$($(PKG)_VERSION) $(PKG)_FILE := ocaml-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://caml.inria.fr/pub/distrib/ocaml-$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://caml.inria.fr/pub/distrib/ocaml-$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://caml.inria.fr/download.en.html' | \ + $(WGET) -q -O- 'https://caml.inria.fr/download.en.html' | \ $(SED) -n 's,.*ocaml-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef diff --git a/src/ocaml-xml-light-1-fixes.patch b/src/ocaml-xml-light-1-fixes.patch index f9a7b33f..f4ec62c1 100644 --- a/src/ocaml-xml-light-1-fixes.patch +++ b/src/ocaml-xml-light-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/ocaml-xml-light.mk b/src/ocaml-xml-light.mk index 2da3633b..1c453695 100644 --- a/src/ocaml-xml-light.mk +++ b/src/ocaml-xml-light.mk @@ -1,7 +1,8 @@ -# 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 := ocaml-xml-light +$(PKG)_WEBSITE := http://tech.motion-twin.com/xmllight.html +$(PKG)_DESCR := xml-light $(PKG)_IGNORE := $(PKG)_VERSION := 2.2 $(PKG)_CHECKSUM := fdb205e8b3a25922e46fca52aea449b9a2de4000c5442487e7e74d79f1e2274a diff --git a/src/oce.mk b/src/oce.mk index 79a70e67..dda13ff1 100644 --- a/src/oce.mk +++ b/src/oce.mk @@ -1,10 +1,11 @@ -# 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 := oce +$(PKG)_WEBSITE := https://github.com/tpaviot/oce +$(PKG)_DESCR := Open CASCADE Community Edition $(PKG)_IGNORE := -$(PKG)_VERSION := 0.16.1 -$(PKG)_CHECKSUM := d31030c8da4a1b33f767d0d59895a995c8eabc8fc65cbe0558734f6021ea2f57 +$(PKG)_VERSION := 0.17.2 +$(PKG)_CHECKSUM := 8d9995360cd531cbd4a7aa4ca5ed969f08ec7c7a37755e2f3d4ef832c1b2f56e $(PKG)_SUBDIR := $(PKG)-OCE-$($(PKG)_VERSION) $(PKG)_FILE := OCE-$($(PKG)_VERSION).tar.gz $(PKG)_URL := https://github.com/tpaviot/oce/archive/$($(PKG)_FILE) @@ -18,17 +19,19 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - cd '$(1)' && cmake . \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + mkdir '$(1).build' + cd '$(1).build' && '$(TARGET)-cmake' '$(1)' \ -DOCE_BUILD_SHARED_LIB=$(if $(BUILD_STATIC),FALSE,TRUE) \ -DOCE_INSTALL_PREFIX=$(PREFIX)/$(TARGET) \ -DOCE_INSTALL_BIN_DIR=$(PREFIX)/$(TARGET)/bin \ -DOCE_INSTALL_LIB_DIR=$(PREFIX)/$(TARGET)/lib \ - -DOCE_INSTALL_CMAKE_DATA_DIR=$(PREFIX)/$(TARGET)/lib/cmake/OCE + -DOCE_INSTALL_CMAKE_DATA_DIR=$(PREFIX)/$(TARGET)/lib/cmake/OCE \ + -DOCE_AUTOINSTALL_DEPENDENT_LIBS=OFF - $(MAKE) -C '$(1)' -j '$(JOBS)' install VERBOSE=1 + $(MAKE) -C '$(1).build' -j '$(JOBS)' VERBOSE=1 + $(MAKE) -C '$(1).build' -j 1 install - cd '$(1)/examples/find_package_oce' && cmake . -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' + cd '$(1)/examples/find_package_oce' && '$(TARGET)-cmake' . $(MAKE) -C '$(1)/examples/find_package_oce' endef diff --git a/src/ogg.mk b/src/ogg.mk index 83f1e6e1..bfdaeb86 100644 --- a/src/ogg.mk +++ b/src/ogg.mk @@ -1,7 +1,8 @@ -# 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 := ogg +$(PKG)_WEBSITE := https://www.xiph.org/ogg/ +$(PKG)_DESCR := OGG $(PKG)_IGNORE := $(PKG)_VERSION := 1.3.2 $(PKG)_CHECKSUM := e19ee34711d7af328cb26287f4137e70630e7261b17cbe3cd41011d73a654692 @@ -11,7 +12,7 @@ $(PKG)_URL := http://downloads.xiph.org/releases/ogg/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.xiph.org/downloads/' | \ + $(WGET) -q -O- 'https://www.xiph.org/downloads/' | \ $(SED) -n 's,.*libogg-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef diff --git a/src/old.mk b/src/old.mk index 8031b054..d46d7cf7 100644 --- a/src/old.mk +++ b/src/old.mk @@ -1,17 +1,17 @@ -# 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 := old +$(PKG)_WEBSITE := https://blitiri.com.ar/p/old/ $(PKG)_IGNORE := $(PKG)_VERSION := 0.17 $(PKG)_CHECKSUM := d24b0d28bbce308b68d62815df8edc2806af0b7b86129f9e8078bd9381dc5eb5 $(PKG)_SUBDIR := old-$($(PKG)_VERSION) $(PKG)_FILE := old-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://blitiri.com.ar/p/old/files/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://blitiri.com.ar/p/old/files/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://blitiri.com.ar/p/old/' | \ + $(WGET) -q -O- 'https://blitiri.com.ar/p/old/' | \ grep 'old-' | \ $(SED) -n 's,.*old-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 diff --git a/src/openal-1-fixes.patch b/src/openal-1-fixes.patch index a023a87b..f189b49e 100644 --- a/src/openal-1-fixes.patch +++ b/src/openal-1-fixes.patch @@ -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 25b591198c896959ca5b7dc9ad3a35605c66dc63 Mon Sep 17 00:00:00 2001 From: Guilherme Lima Bernal <dev@lbguilherme.com> Date: Sat, 28 Mar 2015 20:52:05 +0100 diff --git a/src/openal-test.c b/src/openal-test.c index 516545d4..82962401 100644 --- a/src/openal-test.c +++ b/src/openal-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <AL/alc.h> diff --git a/src/openal.mk b/src/openal.mk index 268d7fd0..096c07e1 100644 --- a/src/openal.mk +++ b/src/openal.mk @@ -1,7 +1,7 @@ -# 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 := openal +$(PKG)_WEBSITE := http://kcat.strangesoft.net/openal.html $(PKG)_IGNORE := $(PKG)_VERSION := 1.16.0 $(PKG)_CHECKSUM := 2f3dcd313fe26391284fbf8596863723f99c65d6c6846dccb48e79cadaf40d5f @@ -18,15 +18,13 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - cd '$(1)/build' && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -DLIBTYPE=$(if $(BUILD_SHARED),SHARED,STATIC) \ - -DEXAMPLES=FALSE \ + cd '$(1)/build' && '$(TARGET)-cmake' .. \ + -DALSOFT_EXAMPLES=FALSE \ -DALSOFT_UTILS=FALSE $(MAKE) -C '$(1)/build' -j '$(JOBS)' install '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-openal.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-openal.exe' \ `'$(TARGET)-pkg-config' openal --cflags --libs` endef diff --git a/src/openblas.mk b/src/openblas.mk index 89eb3ee3..498c6a4c 100644 --- a/src/openblas.mk +++ b/src/openblas.mk @@ -1,14 +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 := openblas +$(PKG)_WEBSITE := http://www.openblas.net/ +$(PKG)_DESCR := OpenBLAS $(PKG)_IGNORE := -$(PKG)_VERSION := 0.2.12 -$(PKG)_CHECKSUM := b41f71f46faab1215f6f6d17541113dc01fd4d8fee0694f3f459bc2e3c2aaaaf +$(PKG)_VERSION := 0.2.15 +$(PKG)_CHECKSUM := 73c40ace5978282224e5e122a41c8388c5a19e65a6f2329c2b7c0b61bacc9044 $(PKG)_SUBDIR := OpenBLAS-$($(PKG)_VERSION) $(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz -$(PKG)_URL := http://github.com/xianyi/OpenBLAS/archive/v$($(PKG)_VERSION).tar.gz -$(PKG)_DEPS := gcc +$(PKG)_URL := https://github.com/xianyi/OpenBLAS/archive/v$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := gcc pthreads define $(PKG)_UPDATE $(WGET) -q -O- 'https://github.com/xianyi/OpenBLAS/releases' | \ diff --git a/src/opencore-amr.mk b/src/opencore-amr.mk index 516b9b61..57774e64 100644 --- a/src/opencore-amr.mk +++ b/src/opencore-amr.mk @@ -1,17 +1,17 @@ -# 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 := opencore-amr +$(PKG)_WEBSITE := https://opencore-amr.sourceforge.io/ $(PKG)_IGNORE := $(PKG)_VERSION := 0.1.3 $(PKG)_CHECKSUM := 106bf811c1f36444d7671d8fd2589f8b2e0cca58a2c764da62ffc4a070595385 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/opencore-amr/files/opencore-amr/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/opencore-amr/files/opencore-amr/' | \ $(SED) -n 's,.*opencore-amr-\([0-9][^"]*\)\.tar.*,\1,p' | \ head -1 endef diff --git a/src/opencsg-1-fixes.patch b/src/opencsg-1-fixes.patch index 46239235..bcc8a667 100644 --- a/src/opencsg-1-fixes.patch +++ b/src/opencsg-1-fixes.patch @@ -1,11 +1,10 @@ -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. Contains ad hoc patches for cross building. -diff -ur OpenCSG-1.4.0.orig/example/example.pro OpenCSG-1.4.0/example/example.pro ---- OpenCSG-1.4.0.orig/example/example.pro 2014-09-15 22:25:33.000000000 +0200 -+++ OpenCSG-1.4.0/example/example.pro 2015-03-22 14:08:27.706916987 +0100 +diff -ur OpenCSG-1.4.1.orig/example/example.pro OpenCSG-1.4.1/example/example.pro +--- OpenCSG-1.4.1.orig/example/example.pro 2016-09-08 23:08:33.000000000 +0200 ++++ OpenCSG-1.4.1/example/example.pro 2016-09-11 14:24:18.839741352 +0200 @@ -1,10 +1,10 @@ TEMPLATE = app TARGET = opencsgexample @@ -29,19 +28,20 @@ diff -ur OpenCSG-1.4.0.orig/example/example.pro OpenCSG-1.4.0/example/example.pr } HEADERS = displaylistPrimitive.h -diff -ur OpenCSG-1.4.0.orig/src/src.pro OpenCSG-1.4.0/src/src.pro ---- OpenCSG-1.4.0.orig/src/src.pro 2014-09-15 22:25:33.000000000 +0200 -+++ OpenCSG-1.4.0/src/src.pro 2015-03-22 14:05:18.275029066 +0100 -@@ -2,10 +2,10 @@ - TARGET = opencsg - VERSION = 1.4.0 +diff -ur OpenCSG-1.4.1.orig/src/src.pro OpenCSG-1.4.1/src/src.pro +--- OpenCSG-1.4.1.orig/src/src.pro 2016-09-08 23:08:33.000000000 +0200 ++++ OpenCSG-1.4.1/src/src.pro 2016-09-11 14:25:15.833496135 +0200 +@@ -6,10 +6,11 @@ + INSTALLDIR = /usr/local + } -CONFIG += opengl warn_on release +CONFIG += opengl warn_on release link_pkgconfig - INCLUDEPATH += ../include ../ + INCLUDEPATH += ../include ../ $$INSTALLDIR/include CONFIG -= qt --LIBS += -lGLEW +-LIBS += -L$$INSTALLDIR/lib -lGLEW ++LIBS += -L$$INSTALLDIR/lib +PKGCONFIG += glew glut DESTDIR = ../lib - INSTALLDIR = /usr/local + headers.files = ../include/opencsg.h diff --git a/src/opencsg.mk b/src/opencsg.mk index f111a410..deb67d1e 100644 --- a/src/opencsg.mk +++ b/src/opencsg.mk @@ -1,10 +1,10 @@ -# 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 := opencsg +$(PKG)_WEBSITE := http://www.opencsg.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 1.4.0 -$(PKG)_CHECKSUM := ecb46be54cfb8a338d2a9b62dec90ec8da6c769078c076f58147d4a6ba1c878d +$(PKG)_VERSION := 1.4.1 +$(PKG)_CHECKSUM := 48182c8233e6f89cd6752679bde44ef6cc9eda4c06f4db845ec7de2cae2bb07a $(PKG)_SUBDIR := OpenCSG-$($(PKG)_VERSION) $(PKG)_FILE := OpenCSG-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://www.opencsg.org/$($(PKG)_FILE) diff --git a/src/opencv-1-fixes.patch b/src/opencv-1-fixes.patch index 4701053c..8cb17b9a 100644 --- a/src/opencv-1-fixes.patch +++ b/src/opencv-1-fixes.patch @@ -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. diff --git a/CMakeLists.txt b/CMakeLists.txt index 579312d..53e4132 100644 diff --git a/src/opencv-2-fixes-cmake.patch b/src/opencv-2-fixes-cmake.patch index 66061d59..baad1b14 100644 --- a/src/opencv-2-fixes-cmake.patch +++ b/src/opencv-2-fixes-cmake.patch @@ -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. diff -ru a/cmake/OpenCVGenConfig.cmake b/cmake/OpenCVGenConfig.cmake --- a/cmake/OpenCVGenConfig.cmake 2014-10-01 08:33:36.000000000 +0100 diff --git a/src/opencv-3-fixes-pkgconfig.patch b/src/opencv-3-fixes-pkgconfig.patch index 2134c201..ba3cd42b 100644 --- a/src/opencv-3-fixes-pkgconfig.patch +++ b/src/opencv-3-fixes-pkgconfig.patch @@ -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. This patch was commited to OpenCV's 2.4 branch and we should be able to drop it in the next point release. diff --git a/src/opencv-4-reverse-deps-sublist.patch b/src/opencv-4-reverse-deps-sublist.patch index 9fc49de3..fbd36dcc 100644 --- a/src/opencv-4-reverse-deps-sublist.patch +++ b/src/opencv-4-reverse-deps-sublist.patch @@ -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 20cf852345e364f7e18c8721561d7c4d1ebd1d6e Mon Sep 17 00:00:00 2001 From: Boris Nagaev <bnagaev@gmail.com> diff --git a/src/opencv-5-fix-in-bad-dir.patch b/src/opencv-5-fix-in-bad-dir.patch new file mode 100644 index 00000000..3d28d246 --- /dev/null +++ b/src/opencv-5-fix-in-bad-dir.patch @@ -0,0 +1,65 @@ +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 Dec 2015 18:14:56 +0300 +Subject: [PATCH] fix CMake error if a directory contains ++ + +See https://github.com/mxe/mxe/issues/1091 + +diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake +index 1111111..2222222 100644 +--- a/cmake/OpenCVModule.cmake ++++ b/cmake/OpenCVModule.cmake +@@ -364,12 +364,16 @@ function(__ocv_resolve_dependencies) + # process private deps + foreach(m ${OPENCV_MODULES_BUILD}) + foreach(d ${OPENCV_MODULE_${m}_PRIVATE_REQ_DEPS}) +- if(NOT (";${deps_${m}};" MATCHES ";${d};")) ++ # can't use MATCH because file paths can include regexp special chars ++ string(FIND ";${deps_${m}};" ";${d};" d_offset) ++ if(${d_offset} EQUAL -1) + list(APPEND deps_${m} ${d}) + endif() + endforeach() + foreach(d ${OPENCV_MODULE_${m}_PRIVATE_OPT_DEPS}) +- if(NOT (";${deps_${m}};" MATCHES ";${d};")) ++ # can't use MATCH because file paths can include regexp special chars ++ string(FIND ";${deps_${m}};" ";${d};" d_offset) ++ if(${d_offset} EQUAL -1) + if(HAVE_${d} OR TARGET ${d}) + list(APPEND deps_${m} ${d}) + endif() +diff --git a/cmake/OpenCVPCHSupport.cmake b/cmake/OpenCVPCHSupport.cmake +index 1111111..2222222 100644 +--- a/cmake/OpenCVPCHSupport.cmake ++++ b/cmake/OpenCVPCHSupport.cmake +@@ -54,7 +54,9 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags) + + GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES ) + FOREACH(item ${DIRINC}) +- if(item MATCHES "^${OpenCV_SOURCE_DIR}/modules/") ++ # can't use MATCH because file paths can include regexp special chars ++ string(FIND "${item}" "${OpenCV_SOURCE_DIR}/modules/" modules_offset) ++ if(${modules_offset} EQUAL 0) + LIST(APPEND ${_out_compile_flags} "${_PCH_include_prefix}\"${item}\"") + else() + LIST(APPEND ${_out_compile_flags} "${_PCH_isystem_prefix}\"${item}\"") +diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake +index 1111111..2222222 100644 +--- a/cmake/OpenCVUtils.cmake ++++ b/cmake/OpenCVUtils.cmake +@@ -39,7 +39,10 @@ function(ocv_include_directories) + set(__add_before "") + foreach(dir ${ARGN}) + get_filename_component(__abs_dir "${dir}" ABSOLUTE) +- if("${__abs_dir}" MATCHES "^${OpenCV_SOURCE_DIR}" OR "${__abs_dir}" MATCHES "^${OpenCV_BINARY_DIR}") ++ # can't use MATCH because file paths can include regexp special chars ++ string(FIND "${__abs_dir}" "${OpenCV_SOURCE_DIR}" OpenCV_SOURCE_DIR_offset) ++ string(FIND "${__abs_dir}" "${OpenCV_BINARY_DIR}" OpenCV_BINARY_DIR_offset) ++ if($OpenCV_BINARY_DIR_offset} EQUAL 0 OR ${OpenCV_BINARY_DIR_offset} EQUAL 0) + list(APPEND __add_before "${dir}") + else() + include_directories(AFTER SYSTEM "${dir}") diff --git a/src/opencv.mk b/src/opencv.mk index 05e19139..9d99814f 100644 --- a/src/opencv.mk +++ b/src/opencv.mk @@ -1,18 +1,19 @@ -# 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 := opencv +$(PKG)_WEBSITE := http://opencv.org/ +$(PKG)_DESCR := OpenCV $(PKG)_IGNORE := $(PKG)_VERSION := 2.4.10 $(PKG)_CHECKSUM := 1bf4cb87283797fd91669d4f90b622a677a903c20b4a577b7958a2164f7596c6 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := opencv-$($(PKG)_VERSION).zip -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)library/$(PKG)-unix/$($(PKG)_VERSION)/$($(PKG)_FILE) -$(PKG)_URL_2 := http://distfiles.macports.org/opencv/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)library/$(PKG)-unix/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL_2 := https://distfiles.macports.org/opencv/$($(PKG)_FILE) $(PKG)_DEPS := gcc eigen ffmpeg jasper jpeg lcms1 libpng openexr tiff xz zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/opencvlibrary/files/opencv-unix/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef @@ -20,14 +21,13 @@ endef define $(PKG)_BUILD # build mkdir '$(1).build' - cd '$(1).build' && cmake \ + cd '$(1).build' && '$(TARGET)-cmake' \ -DWITH_QT=OFF \ -DWITH_OPENGL=ON \ -DWITH_GSTREAMER=OFF \ -DWITH_GTK=OFF \ -DWITH_VIDEOINPUT=ON \ -DWITH_XINE=OFF \ - -DBUILD_SHARED_LIBS=$(if $(BUILD_STATIC),OFF,ON) \ -DBUILD_opencv_apps=OFF \ -DBUILD_DOCS=OFF \ -DBUILD_EXAMPLES=OFF \ @@ -43,7 +43,6 @@ define $(PKG)_BUILD -DBUILD_PNG=OFF \ -DBUILD_OPENEXR=OFF \ -DCMAKE_VERBOSE=ON \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ -DCMAKE_CXX_FLAGS='-D_WIN32_WINNT=0x0500' \ '$(1)' diff --git a/src/openexr-2-64-bit-fixes.patch b/src/openexr-2-64-bit-fixes.patch index e3667f53..ffbc867f 100644 --- a/src/openexr-2-64-bit-fixes.patch +++ b/src/openexr-2-64-bit-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/openexr-test.cpp b/src/openexr-test.cpp index bb1292ad..63bcedaf 100644 --- a/src/openexr-test.cpp +++ b/src/openexr-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <ImfChannelList.h> diff --git a/src/openexr.mk b/src/openexr.mk index 57a59a12..70c36208 100644 --- a/src/openexr.mk +++ b/src/openexr.mk @@ -1,13 +1,14 @@ -# 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 := openexr +$(PKG)_WEBSITE := http://www.openexr.com/ +$(PKG)_DESCR := OpenEXR $(PKG)_IGNORE := $(PKG)_VERSION := 2.2.0 $(PKG)_CHECKSUM := 36a012f6c43213f840ce29a8b182700f6cf6b214bea0d5735594136b44914231 $(PKG)_SUBDIR := openexr-$($(PKG)_VERSION) $(PKG)_FILE := openexr-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://download.savannah.nongnu.org/releases/openexr/$($(PKG)_FILE) +$(PKG)_URL := https://download.savannah.nongnu.org/releases/openexr/$($(PKG)_FILE) $(PKG)_DEPS := gcc ilmbase pthreads zlib define $(PKG)_UPDATE @@ -62,6 +63,6 @@ define $(PKG)_BUILD '$(TARGET)-g++' \ -Wall -Wextra -std=gnu++0x \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-openexr.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-openexr.exe' \ `'$(TARGET)-pkg-config' OpenEXR --cflags --libs` endef diff --git a/src/openjpeg-1-dllfix.patch b/src/openjpeg-1-dllfix.patch index ce38dba4..d9ee235b 100644 --- a/src/openjpeg-1-dllfix.patch +++ b/src/openjpeg-1-dllfix.patch @@ -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. #Author: Julien Michel <julien.michel@orfeo-toolbox.org> diff -bur openjpeg-2.0.1.orig/src/lib/openjp2/openjpeg.c openjpeg-2.0.1/src/lib/openjp2/openjpeg.c diff --git a/src/openjpeg-2-dllmacro.patch b/src/openjpeg-2-dllmacro.patch index 09b30463..68a144f2 100644 --- a/src/openjpeg-2-dllmacro.patch +++ b/src/openjpeg-2-dllmacro.patch @@ -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. #Author: Julien Michel <julien.michel@orfeo-toolbox.org> diff -bur openjpeg-2.0.1.orig/src/lib/openjp2/openjpeg.h openjpeg-2.0.1.diff/src/lib/openjp2/openjpeg.h --- openjpeg-2.0.1.orig/src/lib/openjp2/openjpeg.h 2014-04-22 13:24:20.000000000 +0530 diff --git a/src/openjpeg.mk b/src/openjpeg.mk index 1b56950d..bac08280 100644 --- a/src/openjpeg.mk +++ b/src/openjpeg.mk @@ -1,8 +1,9 @@ -# This file is part of MXE. -# See index.html for further information. +# This file is part of MXE. See LICENSE.md for licensing information. #Author: Julien Michel <julien.michel@orfeo-toolbox.org> PKG := openjpeg +$(PKG)_WEBSITE := http://www.openjpeg.org/ +$(PKG)_DESCR := OpenJPEG $(PKG)_IGNORE := $(PKG)_VERSION := 2.1.0 $(PKG)_CHECKSUM := 1232bb814fd88d8ed314c94f0bfebb03de8559583a33abbe8c64ef3fc0a8ff03 @@ -20,9 +21,7 @@ endef define $(PKG)_BUILD mkdir '$(1).build' - cd '$(1).build' && cmake \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -DBUILD_SHARED_LIBS=$(if $(BUILD_STATIC),FALSE,TRUE) \ + cd '$(1).build' && '$(TARGET)-cmake' \ -DBUILD_TESTING=FALSE \ '$(1)' $(MAKE) -C '$(1).build' install diff --git a/src/openmp-validation-1-fixes.patch b/src/openmp-validation-1-fixes.patch index f37e165d..dfdacb87 100644 --- a/src/openmp-validation-1-fixes.patch +++ b/src/openmp-validation-1-fixes.patch @@ -1,10 +1,18 @@ -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. -diff -u OpenMP3.1_Validation/Makefile OpenMP3.1_Validation.new/Makefile ---- OpenMP3.1_Validation/Makefile 2013-07-18 00:19:20.000000000 +1000 -+++ OpenMP3.1_Validation.new/Makefile 2014-02-22 16:23:37.000000000 +1100 -@@ -185,14 +185,21 @@ +Contains ad hoc patches for cross building. + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Sun, 23 Feb 2014 05:22:26 +1100 +Subject: [PATCH] Overwrite built-in rules to allow .exe suffix + + +diff --git a/Makefile b/Makefile +index 1111111..2222222 100644 +--- a/Makefile ++++ b/Makefile +@@ -185,14 +185,21 @@ omp_testsuite.h: ompts-c.conf c/* .c.o: omp_testsuite omp_my_sleep $(CC) $(CFLAGS) -c $< @@ -28,12 +36,10 @@ diff -u OpenMP3.1_Validation/Makefile OpenMP3.1_Validation.new/Makefile print_compile_options: @echo "-------------------" -Only in OpenMP3.1_Validation.new: bin -Common subdirectories: OpenMP3.1_Validation/c and OpenMP3.1_Validation.new/c -Common subdirectories: OpenMP3.1_Validation/fortran and OpenMP3.1_Validation.new/fortran -diff -u OpenMP3.1_Validation/omp_my_sleep.h OpenMP3.1_Validation.new/omp_my_sleep.h ---- OpenMP3.1_Validation/omp_my_sleep.h 2013-07-18 00:19:04.000000000 +1000 -+++ OpenMP3.1_Validation.new/omp_my_sleep.h 2014-02-22 15:07:33.000000000 +1100 +diff --git a/omp_my_sleep.h b/omp_my_sleep.h +index 1111111..2222222 100644 +--- a/omp_my_sleep.h ++++ b/omp_my_sleep.h @@ -5,7 +5,6 @@ #include<stdlib.h> #include<unistd.h> @@ -42,5 +48,56 @@ diff -u OpenMP3.1_Validation/omp_my_sleep.h OpenMP3.1_Validation.new/omp_my_slee #include <sys/time.h> #include <time.h> #include <errno.h> -Only in OpenMP3.1_Validation.new: ompts.log -Only in OpenMP3.1_Validation.new: results.txt + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Sun, 23 Feb 2014 05:22:26 +1100 +Subject: [PATCH] add Batchfile with test to run on host + + +diff --git a/all-tests-openmp-validation.bat b/all-tests-openmp-validation.bat +new file mode 100644 +index 1111111..2222222 +--- /dev/null ++++ b/all-tests-openmp-validation.bat +@@ -0,0 +1,40 @@ ++setlocal enableextensions enabledelayedexpansion ++set /a TEST_COUNT=0 ++set /a FAIL_COUNT=0 ++set /a PASS_COUNT=0 ++set LOG_FILE=%~n0.log ++set BLANK= ++for /l %%I in (1,1,79) do set SPACER=%BLANK% %BLANK%!SPACER! ++date /t > %LOG_FILE% ++time /t >> %LOG_FILE% ++echo. >> %LOG_FILE% ++echo L=Language (c=c, n=fortran) >> %LOG_FILE% ++echo Pass 0=Y >> %LOG_FILE% ++echo. >> %LOG_FILE% ++echo L Test Name %SPACER:~0,50% Pass Certainty%%>> %LOG_FILE% ++echo %SPACER: =-%>> %LOG_FILE% ++for /r %%F in (test*.exe) do ( ++ set /a TEST_COUNT += 1 ++ %%F ++ set ERR=!errorlevel! ++ if !ERR! neq 0 (set /a FAIL_COUNT += 1) else set /a PASS_COUNT += 1 ++ set TEST_LANG=%%~pF ++ set TEST_NAME=%%~nF%SPACER% ++ set ERR_SPC=!ERR!%SPACER% ++ set /p "=!TEST_LANG:~-2,-1! !TEST_NAME:~0,60! !ERR_SPC:~0,5! " < nul >> %LOG_FILE% ++ %%~dpFc%%~nxF ++ echo !errorlevel!%% >> %LOG_FILE% ++ if exist %%~dpForph_%%~nxF ( ++ set /a TEST_COUNT += 1 ++ %%~dpForph_%%~nxF ++ set ERR=!errorlevel! ++ if !ERR! neq 0 (set /a FAIL_COUNT += 1) else set /a PASS_COUNT += 1 ++ set TEST_NAME=orph_%%~nF%SPACER% ++ set ERR_SPC=!ERR!%SPACER% ++ set /p "=!TEST_LANG:~-2,-1! !TEST_NAME:~0,60! !ERR_SPC:~0,5! " < nul >> %LOG_FILE% ++ %%~dpForph_c%%~nxF ++ echo !errorlevel!%% >> %LOG_FILE% ++ ) ++) ++echo. >> %LOG_FILE% ++echo Total tests: !TEST_COUNT! Total Failed: !FAIL_COUNT! Total Passed: !PASS_COUNT!>> %LOG_FILE% diff --git a/src/openmp-validation-2-test-crlf.patch b/src/openmp-validation-2-test-crlf.patch deleted file mode 100644 index cb14d2f6..00000000 --- a/src/openmp-validation-2-test-crlf.patch +++ /dev/null @@ -1,47 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -diff -urN OpenMP3.1_Validation.orig/all-tests-openmp-validation.bat OpenMP3.1_Validation/all-tests-openmp-validation.bat ---- OpenMP3.1_Validation.orig/all-tests-openmp-validation.bat 1970-01-01 10:00:00.000000000 +1000 -+++ OpenMP3.1_Validation/all-tests-openmp-validation.bat 2014-02-23 04:35:51.000000000 +1100 -@@ -0,0 +1,40 @@ -+setlocal enableextensions enabledelayedexpansion -+set /a TEST_COUNT=0 -+set /a FAIL_COUNT=0 -+set /a PASS_COUNT=0 -+set LOG_FILE=%~n0.log -+set BLANK= -+for /l %%I in (1,1,79) do set SPACER=%BLANK% %BLANK%!SPACER! -+date /t > %LOG_FILE% -+time /t >> %LOG_FILE% -+echo. >> %LOG_FILE% -+echo L=Language (c=c, n=fortran) >> %LOG_FILE% -+echo Pass 0=Y >> %LOG_FILE% -+echo. >> %LOG_FILE% -+echo L Test Name %SPACER:~0,50% Pass Certainty%%>> %LOG_FILE% -+echo %SPACER: =-%>> %LOG_FILE% -+for /r %%F in (test*.exe) do ( -+ set /a TEST_COUNT += 1 -+ %%F -+ set ERR=!errorlevel! -+ if !ERR! neq 0 (set /a FAIL_COUNT += 1) else set /a PASS_COUNT += 1 -+ set TEST_LANG=%%~pF -+ set TEST_NAME=%%~nF%SPACER% -+ set ERR_SPC=!ERR!%SPACER% -+ set /p "=!TEST_LANG:~-2,-1! !TEST_NAME:~0,60! !ERR_SPC:~0,5! " < nul >> %LOG_FILE% -+ %%~dpFc%%~nxF -+ echo !errorlevel!%% >> %LOG_FILE% -+ if exist %%~dpForph_%%~nxF ( -+ set /a TEST_COUNT += 1 -+ %%~dpForph_%%~nxF -+ set ERR=!errorlevel! -+ if !ERR! neq 0 (set /a FAIL_COUNT += 1) else set /a PASS_COUNT += 1 -+ set TEST_NAME=orph_%%~nF%SPACER% -+ set ERR_SPC=!ERR!%SPACER% -+ set /p "=!TEST_LANG:~-2,-1! !TEST_NAME:~0,60! !ERR_SPC:~0,5! " < nul >> %LOG_FILE% -+ %%~dpForph_c%%~nxF -+ echo !errorlevel!%% >> %LOG_FILE% -+ ) -+) -+echo. >> %LOG_FILE% -+echo Total tests: !TEST_COUNT! Total Failed: !FAIL_COUNT! Total Passed: !PASS_COUNT!>> %LOG_FILE% diff --git a/src/openmp-validation.mk b/src/openmp-validation.mk index 28a12197..56efccf3 100644 --- a/src/openmp-validation.mk +++ b/src/openmp-validation.mk @@ -1,7 +1,8 @@ -# 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 := openmp-validation +$(PKG)_WEBSITE := https://github.com/uhhpctools/omp-validation +$(PKG)_DESCR := OpenMP Validation Suite $(PKG)_IGNORE := $(PKG)_VERSION := 3.1 $(PKG)_CHECKSUM := 9dbfe3cf49ab6187def83c85b57e133e11fbb667aa111f0fd70775166254dbff diff --git a/src/openscenegraph-1-fix-case-in-headers.patch b/src/openscenegraph-1-fix-case-in-headers.patch deleted file mode 100644 index 04ef6ba5..00000000 --- a/src/openscenegraph-1-fix-case-in-headers.patch +++ /dev/null @@ -1,58 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From 31fe54c6c787bc3b66dd22a17528aeaeb0544752 Mon Sep 17 00:00:00 2001 -From: Boris Nagaev <bnagaev@gmail.com> -Date: Fri, 9 Oct 2015 11:13:12 +0200 -Subject: [PATCH] fix case in headers windows.h, winsock2.h - ---- - examples/osghangglide/hat.cpp | 2 +- - src/osg/DisplaySettings.cpp | 2 +- - src/osgPlugins/ply/typedefs.h | 4 ++-- - 3 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/examples/osghangglide/hat.cpp b/examples/osghangglide/hat.cpp -index 4ef9e79..2884770 100644 ---- a/examples/osghangglide/hat.cpp -+++ b/examples/osghangglide/hat.cpp -@@ -17,7 +17,7 @@ - */ - - #ifdef _MSC_VER --#include <Windows.h> -+#include <windows.h> - #pragma warning( disable : 4244 ) - #endif - -diff --git a/src/osg/DisplaySettings.cpp b/src/osg/DisplaySettings.cpp -index 8ebae0d..8731c10 100644 ---- a/src/osg/DisplaySettings.cpp -+++ b/src/osg/DisplaySettings.cpp -@@ -24,7 +24,7 @@ using namespace osg; - using namespace std; - - #if defined(WIN32) && !defined(__CYGWIN__) --#include<Windows.h> -+#include<windows.h> - extern "C" { OSG_EXPORT DWORD NvOptimusEnablement=0x00000001; } - #else - extern "C" { int NvOptimusEnablement=0x00000001; } -diff --git a/src/osgPlugins/ply/typedefs.h b/src/osgPlugins/ply/typedefs.h -index 4d6c833..7a1e334 100644 ---- a/src/osgPlugins/ply/typedefs.h -+++ b/src/osgPlugins/ply/typedefs.h -@@ -13,8 +13,8 @@ - #define MESH_TYPEDEFS_H - - # if defined(_MSC_VER) --# include <Winsock2.h> --# include <Windows.h> -+# include <winsock2.h> -+# include <windows.h> - # endif - - # include <osg/Notify> --- -1.7.10.4 - diff --git a/src/openscenegraph-1-fixes.patch b/src/openscenegraph-1-fixes.patch new file mode 100644 index 00000000..e3350f53 --- /dev/null +++ b/src/openscenegraph-1-fixes.patch @@ -0,0 +1,206 @@ +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: Fri, 9 Oct 2015 11:13:12 +0200 +Subject: [PATCH] fix case in headers windows.h, winsock2.h + + +diff --git a/examples/osghangglide/hat.cpp b/examples/osghangglide/hat.cpp +index 1111111..2222222 100644 +--- a/examples/osghangglide/hat.cpp ++++ b/examples/osghangglide/hat.cpp +@@ -17,7 +17,7 @@ + */ + + #ifdef _MSC_VER +-#include <Windows.h> ++#include <windows.h> + #pragma warning( disable : 4244 ) + #endif + +diff --git a/src/osg/DisplaySettings.cpp b/src/osg/DisplaySettings.cpp +index 1111111..2222222 100644 +--- a/src/osg/DisplaySettings.cpp ++++ b/src/osg/DisplaySettings.cpp +@@ -24,7 +24,7 @@ using namespace osg; + using namespace std; + + #if defined(WIN32) && !defined(__CYGWIN__) +-#include<Windows.h> ++#include<windows.h> + extern "C" { OSG_EXPORT DWORD NvOptimusEnablement=0x00000001; } + #else + extern "C" { int NvOptimusEnablement=0x00000001; } +diff --git a/src/osgPlugins/ply/typedefs.h b/src/osgPlugins/ply/typedefs.h +index 1111111..2222222 100644 +--- a/src/osgPlugins/ply/typedefs.h ++++ b/src/osgPlugins/ply/typedefs.h +@@ -13,8 +13,8 @@ + #define MESH_TYPEDEFS_H + + # if defined(_MSC_VER) +-# include <Winsock2.h> +-# include <Windows.h> ++# include <winsock2.h> ++# include <windows.h> + # endif + + # include <osg/Notify> + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Fri, 9 Oct 2015 12:54:07 +0200 +Subject: [PATCH] fix case in library ws2_32 + + +diff --git a/src/osgPlugins/ZeroConfDevice/CMakeLists.txt b/src/osgPlugins/ZeroConfDevice/CMakeLists.txt +index 1111111..2222222 100644 +--- a/src/osgPlugins/ZeroConfDevice/CMakeLists.txt ++++ b/src/osgPlugins/ZeroConfDevice/CMakeLists.txt +@@ -19,7 +19,7 @@ IF(WIN32) + mdns_win/dns_sd.h + mdns_win/dns-sd.c + ) +- SET(TARGET_EXTERNAL_LIBRARIES "${TARGET_EXTERNAL_LIBRARIES};Ws2_32.lib;winmm") ++ SET(TARGET_EXTERNAL_LIBRARIES "${TARGET_EXTERNAL_LIBRARIES};ws2_32.lib;winmm") + SET(TARGET_LIBRARIES_VARS ZEROCONF_LIBRARY) + ADD_DEFINITIONS(-DNOT_HAVE_GETOPT) + ADD_DEFINITIONS(-DNOT_HAVE_SETLINEBUF) +diff --git a/src/osgPlugins/osc/CMakeLists.txt b/src/osgPlugins/osc/CMakeLists.txt +index 1111111..2222222 100644 +--- a/src/osgPlugins/osc/CMakeLists.txt ++++ b/src/osgPlugins/osc/CMakeLists.txt +@@ -35,7 +35,7 @@ if(WIN32 AND NOT ANDROID) + ip/win32/NetworkingUtils.cpp + ip/win32/UdpSocket.cpp + ) +- SET(TARGET_EXTERNAL_LIBRARIES "${TARGET_EXTERNAL_LIBRARIES};Ws2_32.lib;winmm") ++ SET(TARGET_EXTERNAL_LIBRARIES "${TARGET_EXTERNAL_LIBRARIES};ws2_32.lib;winmm") + ELSE() + SET(TARGET_SRC + ${TARGET_SRC} +diff --git a/src/osgPlugins/vrml/CMakeLists.txt b/src/osgPlugins/vrml/CMakeLists.txt +index 1111111..2222222 100644 +--- a/src/osgPlugins/vrml/CMakeLists.txt ++++ b/src/osgPlugins/vrml/CMakeLists.txt +@@ -27,7 +27,7 @@ IF (WIN32) + PNG_LIBRARY + ZLIB_LIBRARY) + SET(TARGET_EXTERNAL_LIBRARIES +- Ws2_32.lib) ++ ws2_32.lib) + ELSE() + SET(TARGET_LIBRARIES_VARS + OPENVRML_LIBRARY) + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Fri, 9 Oct 2015 14:00:54 +0200 +Subject: [PATCH] fix pointer to int conversion on 64bit + + +diff --git a/src/osgPlugins/osgjs/WriteVisitor.cpp b/src/osgPlugins/osgjs/WriteVisitor.cpp +index 1111111..2222222 100644 +--- a/src/osgPlugins/osgjs/WriteVisitor.cpp ++++ b/src/osgPlugins/osgjs/WriteVisitor.cpp +@@ -225,7 +225,7 @@ JSONObject* createImage(osg::Image* image, bool inlineImages, int maxTextureDime + // no image file so use this inline name image and create a file + std::stringstream ss; + ss << osgDB::getFilePath(baseName) << osgDB::getNativePathSeparator(); +- ss << (long int)image << ".inline_conv_generated.png"; // write the pointer location ++ ss << (uintptr_t)image << ".inline_conv_generated.png"; // write the pointer location + std::string filename = ss.str(); + if (osgDB::writeImageFile(*image, filename)) { + image->setFileName(filename); + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Rashad Kanavath <rashad.kanavath@c-s.fr> +Date: Sun, 10 Jan 2016 14:04:18 +1100 +Subject: [PATCH] openscenegraph: use previously built openthreads + + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 1111111..2222222 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -8,7 +8,6 @@ ENDIF() + + #the old construct SUBDIRS( was substituded by ADD_SUBDIRECTORY that is to be preferred according on CMake docs. + FOREACH( mylibfolder +- OpenThreads + osg + osgDB + osgUtil + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Sun, 10 Jan 2016 14:19:57 +1100 +Subject: [PATCH] use pkg-config for gstreamer detection in mingw + + +diff --git a/CMakeModules/FindGStreamer.cmake b/CMakeModules/FindGStreamer.cmake +index 1111111..2222222 100644 +--- a/CMakeModules/FindGStreamer.cmake ++++ b/CMakeModules/FindGStreamer.cmake +@@ -65,7 +65,7 @@ + # ) + #endmacro() + +-if (WIN32) ++if (WIN32 AND NOT MINGW) + macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library) + find_path(${_component_prefix}_INCLUDE_DIRS + NAMES ${_header} + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Mon, 22 Feb 2016 03:35:28 +0300 +Subject: [PATCH] disable ffmpeg + +OpenSceneGraph is using removed features of ffmpeg, which have +been deprecated for 3+ years. + +See https://github.com/mxe/mxe/issues/1230#issuecomment-186936198 +Source of patch: http://forum.openscenegraph.org/viewtopic.php?t=10485 + +diff --git a/src/osgPlugins/CMakeLists.txt b/src/osgPlugins/CMakeLists.txt +index 1111111..2222222 100644 +--- a/src/osgPlugins/CMakeLists.txt ++++ b/src/osgPlugins/CMakeLists.txt +@@ -199,10 +199,6 @@ IF(XINE_FOUND) + ADD_SUBDIRECTORY(xine) + ENDIF() + +-IF(FFMPEG_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE) +- ADD_SUBDIRECTORY(ffmpeg) +-ENDIF() +- + IF(GSTREAMER_FOUND AND GLIB_FOUND) + ADD_SUBDIRECTORY(gstreamer) + ENDIF() + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Saikrishna Arcot <saiarcot895@gmail.com> +Date: Mon, 6 Jun 2016 19:06:00 -0500 +Subject: [PATCH] Require the presence of either qt5 or qt4. + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1111111..2222222 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -712,9 +712,9 @@ IF(OSG_USE_QT AND NOT ANDROID) + + IF (DESIRED_QT_VERSION) + IF (DESIRED_QT_VERSION MATCHES 5) +- FIND_PACKAGE(Qt5Widgets) ++ FIND_PACKAGE(Qt5Widgets REQUIRED) + ELSEIF (DESIRED_QT_VERSION MATCHES 4) +- FIND_PACKAGE(Qt4) ++ FIND_PACKAGE(Qt4 REQUIRED) + ELSE() + FIND_PACKAGE(Qt3) + ENDIF() diff --git a/src/openscenegraph-2-fix-case-in-library-ws2-32.patch b/src/openscenegraph-2-fix-case-in-library-ws2-32.patch deleted file mode 100644 index 7221e20d..00000000 --- a/src/openscenegraph-2-fix-case-in-library-ws2-32.patch +++ /dev/null @@ -1,56 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From c78dde633089cdff3142eb30cc01c5bd77a3c617 Mon Sep 17 00:00:00 2001 -From: Boris Nagaev <bnagaev@gmail.com> -Date: Fri, 9 Oct 2015 12:54:07 +0200 -Subject: [PATCH] fix case in library ws2_32 - ---- - src/osgPlugins/ZeroConfDevice/CMakeLists.txt | 2 +- - src/osgPlugins/osc/CMakeLists.txt | 2 +- - src/osgPlugins/vrml/CMakeLists.txt | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/osgPlugins/ZeroConfDevice/CMakeLists.txt b/src/osgPlugins/ZeroConfDevice/CMakeLists.txt -index 5287cfc..fab449e 100644 ---- a/src/osgPlugins/ZeroConfDevice/CMakeLists.txt -+++ b/src/osgPlugins/ZeroConfDevice/CMakeLists.txt -@@ -19,7 +19,7 @@ IF(WIN32) - mdns_win/dns_sd.h - mdns_win/dns-sd.c - ) -- SET(TARGET_EXTERNAL_LIBRARIES "${TARGET_EXTERNAL_LIBRARIES};Ws2_32.lib;winmm") -+ SET(TARGET_EXTERNAL_LIBRARIES "${TARGET_EXTERNAL_LIBRARIES};ws2_32.lib;winmm") - SET(TARGET_LIBRARIES_VARS ZEROCONF_LIBRARY) - ADD_DEFINITIONS(-DNOT_HAVE_GETOPT) - ADD_DEFINITIONS(-DNOT_HAVE_SETLINEBUF) -diff --git a/src/osgPlugins/osc/CMakeLists.txt b/src/osgPlugins/osc/CMakeLists.txt -index 6bf6127..0529e17 100644 ---- a/src/osgPlugins/osc/CMakeLists.txt -+++ b/src/osgPlugins/osc/CMakeLists.txt -@@ -35,7 +35,7 @@ if(WIN32 AND NOT ANDROID) - ip/win32/NetworkingUtils.cpp - ip/win32/UdpSocket.cpp - ) -- SET(TARGET_EXTERNAL_LIBRARIES "${TARGET_EXTERNAL_LIBRARIES};Ws2_32.lib;winmm") -+ SET(TARGET_EXTERNAL_LIBRARIES "${TARGET_EXTERNAL_LIBRARIES};ws2_32.lib;winmm") - ELSE() - SET(TARGET_SRC - ${TARGET_SRC} -diff --git a/src/osgPlugins/vrml/CMakeLists.txt b/src/osgPlugins/vrml/CMakeLists.txt -index 867e0df..5e5eb26 100644 ---- a/src/osgPlugins/vrml/CMakeLists.txt -+++ b/src/osgPlugins/vrml/CMakeLists.txt -@@ -27,7 +27,7 @@ IF (WIN32) - PNG_LIBRARY - ZLIB_LIBRARY) - SET(TARGET_EXTERNAL_LIBRARIES -- Ws2_32.lib) -+ ws2_32.lib) - ELSE() - SET(TARGET_LIBRARIES_VARS - OPENVRML_LIBRARY) --- -1.7.10.4 - diff --git a/src/openscenegraph-3-fix-pointer-to-int-conversion-on-64bit.patch b/src/openscenegraph-3-fix-pointer-to-int-conversion-on-64bit.patch deleted file mode 100644 index c6484770..00000000 --- a/src/openscenegraph-3-fix-pointer-to-int-conversion-on-64bit.patch +++ /dev/null @@ -1,28 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From 9858a76d8daebe3e26f67eb530c89a8f00d5cd28 Mon Sep 17 00:00:00 2001 -From: Boris Nagaev <bnagaev@gmail.com> -Date: Fri, 9 Oct 2015 14:00:54 +0200 -Subject: [PATCH] fix pointer to int conversion on 64bit - ---- - src/osgPlugins/osgjs/WriteVisitor.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/osgPlugins/osgjs/WriteVisitor.cpp b/src/osgPlugins/osgjs/WriteVisitor.cpp -index 9f2b3c7..98e0c19 100644 ---- a/src/osgPlugins/osgjs/WriteVisitor.cpp -+++ b/src/osgPlugins/osgjs/WriteVisitor.cpp -@@ -225,7 +225,7 @@ JSONObject* createImage(osg::Image* image, bool inlineImages, int maxTextureDime - // no image file so use this inline name image and create a file - std::stringstream ss; - ss << osgDB::getFilePath(baseName) << osgDB::getNativePathSeparator(); -- ss << (long int)image << ".inline_conv_generated.png"; // write the pointer location -+ ss << (uintptr_t)image << ".inline_conv_generated.png"; // write the pointer location - std::string filename = ss.str(); - if (osgDB::writeImageFile(*image, filename)) { - image->setFileName(filename); --- -1.7.10.4 - diff --git a/src/openscenegraph.mk b/src/openscenegraph.mk index 952f160e..bd958da5 100644 --- a/src/openscenegraph.mk +++ b/src/openscenegraph.mk @@ -1,14 +1,17 @@ -# 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 := openscenegraph +$(PKG)_WEBSITE := http://www.openscenegraph.org/ +$(PKG)_DESCR := OpenSceneGraph $(PKG)_IGNORE := $(PKG)_VERSION := 3.4.0 $(PKG)_CHECKSUM := 5c727d84755da276adf8c4a4a3a8ba9c9570fc4b4969f06f1d2e9f89b1e3040e $(PKG)_SUBDIR := OpenSceneGraph-$($(PKG)_VERSION) $(PKG)_FILE := OpenSceneGraph-$($(PKG)_VERSION).zip $(PKG)_URL := http://trac.openscenegraph.org/downloads/developer_releases/$($(PKG)_FILE) -$(PKG)_DEPS := gcc boost curl dcmtk ffmpeg freetype gdal giflib gta jasper jpeg libpng openal openexr poppler qt tiff xine-lib zlib +$(PKG)_DEPS := gcc boost curl dcmtk freetype gdal giflib gstreamer \ + gta jasper jpeg libpng openal openexr openthreads poppler \ + qt tiff zlib define $(PKG)_UPDATE $(WGET) -q -O- 'http://trac.openscenegraph.org/downloads/developer_releases/?C=M;O=D' | \ @@ -20,8 +23,7 @@ endef define $(PKG)_BUILD mkdir '$(1).build' - cd '$(1).build' && cmake '$(1)' \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + cd '$(1).build' && '$(TARGET)-cmake' '$(1)' \ -DCMAKE_CXX_FLAGS='-D__STDC_CONSTANT_MACROS' \ -DCMAKE_HAVE_PTHREAD_H=OFF \ -DPKG_CONFIG_EXECUTABLE='$(PREFIX)/bin/$(TARGET)-pkg-config' \ @@ -30,6 +32,9 @@ define $(PKG)_BUILD -DBUILD_OSG_APPLICATIONS=OFF \ -DPOPPLER_HAS_CAIRO_EXITCODE=0 \ -D_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS_EXITCODE=1 \ - -D_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED=1 + -D_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED=1 \ + $(if $(filter qtbase,$($(PKG)_DEPS)), \ + -DDESIRED_QT_VERSION=5, \ + -DDESIRED_QT_VERSION=4) $(MAKE) -C '$(1).build' -j '$(JOBS)' install VERBOSE=1 endef diff --git a/src/openssl-1-fixes.patch b/src/openssl-1-fixes.patch index 6f6a51b7..2ab85fbc 100644 --- a/src/openssl-1-fixes.patch +++ b/src/openssl-1-fixes.patch @@ -1,7 +1,6 @@ -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 1ac04c802cf192e09bcfad270a39030fb23bcdb1 Mon Sep 17 00:00:00 2001 +From 81a26ea97cb0c66a21069ddb1d07d285427791e9 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> Date: Wed, 8 Jan 2014 02:19:10 +0100 Subject: [PATCH 1/2] winsock2 @@ -10,7 +9,7 @@ Subject: [PATCH 1/2] winsock2 -http://rt.openssl.org/Ticket/Display.html?id=2285&user=guest&pass=guest diff --git a/ssl/dtls1.h b/ssl/dtls1.h -index 4af7e4a..48a3714 100644 +index 30bbcf2..ef9f336 100644 --- a/ssl/dtls1.h +++ b/ssl/dtls1.h @@ -68,7 +68,7 @@ @@ -23,10 +22,10 @@ index 4af7e4a..48a3714 100644 # include <sys/timeval.h> # else diff --git a/ssl/ssltest.c b/ssl/ssltest.c -index 0113b65..53114fd 100644 +index 890e476..ca1fbfd 100644 --- a/ssl/ssltest.c +++ b/ssl/ssltest.c -@@ -197,7 +197,7 @@ +@@ -198,7 +198,7 @@ #define _XOPEN_SOURCE_EXTENDED 1 #ifdef OPENSSL_SYS_WINDOWS @@ -36,10 +35,10 @@ index 0113b65..53114fd 100644 # include OPENSSL_UNISTD #endif -- -2.1.2 +2.9.3 -From 564e3c9850584b3dd57b9ffba85574dbfcf6910b Mon Sep 17 00:00:00 2001 +From fe545f8c5ae1296dcd388c27b5e82c787c3e9f81 Mon Sep 17 00:00:00 2001 From: Tom Molesworth <tom@entitymodel.com> Date: Wed, 8 Jan 2014 02:20:21 +0100 Subject: [PATCH 2/2] Patch OpenSSL POD docs for perl-5.16+ @@ -50,10 +49,10 @@ stage fails without these applied. Should be harmless for earlier versions of perl. diff --git a/doc/apps/cms.pod b/doc/apps/cms.pod -index 76dbf2c..7f2e678 100644 +index ac69804..170588b 100644 --- a/doc/apps/cms.pod +++ b/doc/apps/cms.pod -@@ -478,28 +478,28 @@ with caution. For a fuller description see L<CMS_decrypt(3)|CMS_decrypt(3)>). +@@ -482,28 +482,28 @@ with caution. For a fuller description see L<CMS_decrypt(3)|CMS_decrypt(3)>). =over 4 @@ -89,10 +88,10 @@ index 76dbf2c..7f2e678 100644 the message was verified correctly but an error occurred writing out the signers certificates. diff --git a/doc/apps/smime.pod b/doc/apps/smime.pod -index d39a59a..1a5cfa6 100644 +index 04a83ca..728cde5 100644 --- a/doc/apps/smime.pod +++ b/doc/apps/smime.pod -@@ -308,28 +308,28 @@ remains DER. +@@ -312,28 +312,28 @@ remains DER. =over 4 @@ -128,7 +127,7 @@ index d39a59a..1a5cfa6 100644 the message was verified correctly but an error occurred writing out the signers certificates. diff --git a/doc/crypto/rand.pod b/doc/crypto/rand.pod -index d102df2..f422bb0 100644 +index b754854..19037d3 100644 --- a/doc/crypto/rand.pod +++ b/doc/crypto/rand.pod @@ -74,16 +74,16 @@ First up I will state the things I believe I need for a good RNG. @@ -183,10 +182,10 @@ index d102df2..f422bb0 100644 Given the random number output stream, it should not be possible to determine the RNG state or the next random number. diff --git a/doc/ssl/SSL_COMP_add_compression_method.pod b/doc/ssl/SSL_COMP_add_compression_method.pod -index f4d191c..5f2a3f1 100644 +index 2bb4403..add6b0e 100644 --- a/doc/ssl/SSL_COMP_add_compression_method.pod +++ b/doc/ssl/SSL_COMP_add_compression_method.pod -@@ -53,11 +53,11 @@ SSL_COMP_add_compression_method() may return the following values: +@@ -59,11 +59,11 @@ SSL_COMP_add_compression_method() may return the following values: =over 4 @@ -446,33 +445,29 @@ index 89260b5..1207658 100644 The file descriptor linked to B<ssl>. diff --git a/doc/ssl/SSL_read.pod b/doc/ssl/SSL_read.pod -index 8ca0ce5..14c472f 100644 +index ef983c9..e99d659 100644 --- a/doc/ssl/SSL_read.pod +++ b/doc/ssl/SSL_read.pod -@@ -81,12 +81,12 @@ The following return values can occur: +@@ -81,16 +81,16 @@ The following return values can occur: =over 4 --=item E<gt>0 -+=item * E<gt>0 +-=item E<gt> 0 ++=item * E<gt> 0 - The read operation was successful; the return value is the number of - bytes actually read from the TLS/SSL connection. + The read operation was successful. + The return value is the number of bytes actually read from the TLS/SSL + connection. --=item Z<>0 -+=item * Z<>0 +-=item Z<><= 0 ++=item * Z<><= 0 - The read operation was not successful. The reason may either be a clean - shutdown due to a "close notify" alert sent by the peer (in which case -@@ -103,7 +103,7 @@ only be detected, whether the underlying connection was closed. It cannot - be checked, whether the closure was initiated by the peer or by something - else. -=item E<lt>0 +=item * E<lt>0 - The read operation was not successful, because either an error occurred - or action must be taken by the calling process. Call SSL_get_error() with the + The read operation was not successful, because either the connection was closed, + an error occurred or action must be taken by the calling process. diff --git a/doc/ssl/SSL_session_reused.pod b/doc/ssl/SSL_session_reused.pod index b09d8a7..7f49da1 100644 --- a/doc/ssl/SSL_session_reused.pod @@ -579,33 +574,24 @@ index efbff5a..56c48b2 100644 The shutdown was not successful because a fatal error occurred either at the protocol level or a connection failure occurred. It can also occur if diff --git a/doc/ssl/SSL_write.pod b/doc/ssl/SSL_write.pod -index a57617f..70c1630 100644 +index 4c1a7ee..e006b41 100644 --- a/doc/ssl/SSL_write.pod +++ b/doc/ssl/SSL_write.pod @@ -74,12 +74,12 @@ The following return values can occur: =over 4 --=item E<gt>0 -+=item * E<gt>0 +-=item E<gt> 0 ++=item * E<gt> 0 The write operation was successful, the return value is the number of bytes actually written to the TLS/SSL connection. --=item Z<>0 -+=item * Z<>0 +-=item Z<><= 0 ++=item * Z<><= 0 - The write operation was not successful. Probably the underlying connection - was closed. Call SSL_get_error() with the return value B<ret> to find out, -@@ -90,7 +90,7 @@ SSLv2 (deprecated) does not support a shutdown alert protocol, so it can - only be detected, whether the underlying connection was closed. It cannot - be checked, why the closure happened. - --=item E<lt>0 -+=item * E<lt>0 - - The write operation was not successful, because either an error occurred - or action must be taken by the calling process. Call SSL_get_error() with the + The write operation was not successful, because either the connection was + closed, an error occurred or action must be taken by the calling process. -- -2.1.2 +2.9.3 diff --git a/src/openssl.mk b/src/openssl.mk index 72ff8de7..67ba9581 100644 --- a/src/openssl.mk +++ b/src/openssl.mk @@ -1,25 +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. PKG := openssl +$(PKG)_WEBSITE := https://www.openssl.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 1.0.2d -$(PKG)_CHECKSUM := 671c36487785628a703374c652ad2cebea45fa920ae5681515df25d9f2c9a8c8 +$(PKG)_VERSION := 1.0.2l +$(PKG)_CHECKSUM := ce07195b659e75f4e1db43552860070061f156a98bb37b672b101ba6e3ddf30c $(PKG)_SUBDIR := openssl-$($(PKG)_VERSION) $(PKG)_FILE := openssl-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.openssl.org/source/$($(PKG)_FILE) -$(PKG)_URL_2 := ftp://ftp.openssl.org/source/$($(PKG)_FILE) -$(PKG)_DEPS := gcc libgcrypt zlib +$(PKG)_URL := https://www.openssl.org/source/$($(PKG)_FILE) +$(PKG)_URL_2 := https://www.openssl.org/source/old/$(call tr,$([a-z]),,$($(PKG)_VERSION))/$($(PKG)_FILE) +$(PKG)_DEPS := gcc zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.openssl.org/source/' | \ + $(WGET) -q -O- 'https://www.openssl.org/source/' | \ $(SED) -n 's,.*openssl-\([0-9][0-9a-z.]*\)\.tar.*,\1,p' | \ $(SORT) -V | \ tail -1 endef define $(PKG)_BUILD - cd '$(1)' && CC='$(TARGET)-gcc' ./Configure \ + cd '$(1)' && CC='$(TARGET)-gcc' RC='$(TARGET)-windres' ./Configure \ @openssl-target@ \ zlib \ $(if $(BUILD_STATIC),no-,)shared \ @@ -30,6 +30,11 @@ define $(PKG)_BUILD RANLIB='$(TARGET)-ranlib' \ AR='$(TARGET)-ar rcu' \ CROSS_COMPILE='$(TARGET)-' + + # no way to configure engines subdir install + $(if $(BUILD_SHARED), + rm -rf '$(PREFIX)/$(TARGET)/bin/engines' && \ + mv -vf '$(PREFIX)/$(TARGET)/lib/engines' '$(PREFIX)/$(TARGET)/bin/') endef $(PKG)_BUILD_i686-w64-mingw32 = $(subst @openssl-target@,mingw,$($(PKG)_BUILD)) diff --git a/src/openthreads.mk b/src/openthreads.mk new file mode 100644 index 00000000..81bc0042 --- /dev/null +++ b/src/openthreads.mk @@ -0,0 +1,30 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := openthreads +$(PKG)_WEBSITE := http://www.openscenegraph.org/ +$(PKG)_DESCR := OpenThreads +$(PKG)_IGNORE = $(openscenegraph_IGNORE) +$(PKG)_VERSION = $(openscenegraph_VERSION) +$(PKG)_CHECKSUM = $(openscenegraph_CHECKSUM) +$(PKG)_SUBDIR = $(openscenegraph_SUBDIR) +$(PKG)_FILE = $(openscenegraph_FILE) +$(PKG)_URL = $(openscenegraph_URL) +$(PKG)_DEPS := gcc + +define $(PKG)_UPDATE + echo $openscenegraph_VERSION) +endef + +define $(PKG)_BUILD + mkdir '$(1).build' + cd '$(1).build' && '$(TARGET)-cmake' \ + -DDYNAMIC_OPENTHREADS=$(CMAKE_SHARED_BOOL) \ + -DCMAKE_VERBOSE_MAKEFILE=TRUE \ + -DOSG_USE_QT=FALSE \ + -DPOPPLER_HAS_CAIRO_EXITCODE=0 \ + -D_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS_EXITCODE=1 \ + -D_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED=1 \ + '$(1)' + + $(MAKE) -C '$(1).build/src/OpenThreads' -j '$(JOBS)' install VERBOSE=1 +endef diff --git a/src/opus.mk b/src/opus.mk index bb499f0a..6c8b8480 100644 --- a/src/opus.mk +++ b/src/opus.mk @@ -1,17 +1,17 @@ -# 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 := opus +$(PKG)_WEBSITE := https://opus-codec.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 1.1 -$(PKG)_CHECKSUM := b9727015a58affcf3db527322bf8c4d2fcf39f5f6b8f15dbceca20206cbe1d95 +$(PKG)_VERSION := 1.1.1 +$(PKG)_CHECKSUM := 9b84ff56bd7720d5554103c557664efac2b8b18acc4bbcc234cb881ab9a3371e $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://downloads.xiph.org/releases/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://archive.mozilla.org/pub/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://downloads.xiph.org/releases/opus/?C=M;O=D' | \ + $(WGET) -q -O- 'https://archive.mozilla.org/pub/opus/?C=M;O=D' | \ $(SED) -n 's,.*opus-\([0-9][^>]*\)\.tar.*,\1,p' | \ grep -v 'alpha' | \ grep -v 'beta' | \ diff --git a/src/opusfile.mk b/src/opusfile.mk index 229e4036..357cc720 100644 --- a/src/opusfile.mk +++ b/src/opusfile.mk @@ -1,17 +1,17 @@ -# 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 := opusfile +$(PKG)_WEBSITE := https://opus-codec.org/ $(PKG)_IGNORE := $(PKG)_VERSION := 0.6 $(PKG)_CHECKSUM := 2428717b356e139f18ed2fdb5ad990b5654a238907a0058200b39c46a7d03ea6 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://downloads.xiph.org/releases/opus/$($(PKG)_FILE) +$(PKG)_URL := https://archive.mozilla.org/pub/opus/$($(PKG)_FILE) $(PKG)_DEPS := gcc ogg opus define $(PKG)_UPDATE - $(WGET) -q -O- 'http://downloads.xiph.org/releases/opus/?C=M;O=D' | \ + $(WGET) -q -O- 'https://archive.mozilla.org/pub/opus/?C=M;O=D' | \ $(SED) -n 's,.*opusfile-\([0-9][^>]*\)\.tar.*,\1,p' | \ grep -v 'alpha' | \ grep -v 'beta' | \ diff --git a/src/ossim.mk b/src/ossim.mk index 6d93560a..48b2f422 100644 --- a/src/ossim.mk +++ b/src/ossim.mk @@ -1,14 +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 := ossim +$(PKG)_WEBSITE := https://trac.osgeo.org/ossim +$(PKG)_DESCR := OSSIM $(PKG)_IGNORE := -$(PKG)_VERSION := 1.8.18 -$(PKG)_CHECKSUM := 2dd070c2174dab08c04092345e5165ec45dcd5b63be88771c942843a250518ae -$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) -$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://download.osgeo.org/ossim/source/$($(PKG)_SUBDIR)/$($(PKG)_FILE) -$(PKG)_DEPS := gcc freetype geos jpeg libpng openscenegraph proj tiff zlib +$(PKG)_VERSION := 1.8.20 +$(PKG)_CHECKSUM := d7981d0d7e84bdbc26d5bda9e5b80c583d806164e4d6e5fab276c9255a2b407c +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)-3 +$(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz +$(PKG)_URL := http://download.osgeo.org/ossim/source/$(PKG)-$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc freetype geos jpeg libgeotiff libpng openthreads proj tiff zlib define $(PKG)_UPDATE $(WGET) -q -O- 'http://download.osgeo.org/ossim/source/latest/' | \ @@ -18,13 +19,16 @@ endef define $(PKG)_BUILD mkdir '$(1).build' - cd '$(1).build' && cmake \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + cd '$(1).build' && '$(TARGET)-cmake' \ + -DCMAKE_VERBOSE_MAKEFILE=TRUE \ + -DPKG_CONFIG_EXECUTABLE='$(PREFIX)/bin/$(TARGET)-pkg-config' \ -DCMAKE_MODULE_PATH='$(1)/ossim_package_support/cmake/CMakeModules' \ + -DBUILD_OSSIM_FREETYPE_SUPPORT=TRUE \ + -DBUILD_OSSIM_CURL_APPS=FALSE \ + -DBUILD_OSSIM_TEST_APPS=FALSE \ + -DBUILD_OSSIM_APPS=FALSE \ -DCMAKE_CXX_FLAGS='-DGEOS_INLINE=1' \ - -DBUILD_SHARED_LIBS=$(CMAKE_SHARED_BOOL) \ - -DBUILD_OSSIM_FREETYPE_SUPPORT=ON \ '$(1)/ossim' - $(MAKE) -C '$(1).build/src/ossim' -j '$(JOBS)' - $(MAKE) -C '$(1).build/src/ossim' -j 1 install + + $(MAKE) -C '$(1).build' -j '$(JOBS)' install VERBOSE=1 endef diff --git a/src/pango-1-fixes.patch b/src/pango-1-fixes.patch index d6e443ea..d39654c1 100644 --- a/src/pango-1-fixes.patch +++ b/src/pango-1-fixes.patch @@ -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 525d3bc5b5f7e7d2c705c2b53cc8bf91d56e4641 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> diff --git a/src/pango.mk b/src/pango.mk index b070cb83..d22b16b9 100644 --- a/src/pango.mk +++ b/src/pango.mk @@ -1,17 +1,18 @@ -# 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 := pango +$(PKG)_WEBSITE := http://www.pango.org/ +$(PKG)_DESCR := Pango $(PKG)_IGNORE := $(PKG)_VERSION := 1.37.4 $(PKG)_CHECKSUM := ae2446f1c23c81d78e935054a37530336818c214f54bed2351bdd4ad0acebcbe $(PKG)_SUBDIR := pango-$($(PKG)_VERSION) $(PKG)_FILE := pango-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/pango/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/pango/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc cairo fontconfig freetype glib harfbuzz define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/pango/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/pango/refs/tags' | \ grep '<a href=' | \ $(SED) -n "s,.*<a href='[^']*/tag/?id=\\([0-9][^']*\\)'.*,\\1,p" | \ head -1 diff --git a/src/pangomm.mk b/src/pangomm.mk index 369feb44..974bb45a 100644 --- a/src/pangomm.mk +++ b/src/pangomm.mk @@ -1,17 +1,18 @@ -# 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 := pangomm +$(PKG)_WEBSITE := http://www.pango.org/ +$(PKG)_DESCR := Pangomm $(PKG)_IGNORE := $(PKG)_VERSION := 2.34.0 $(PKG)_CHECKSUM := 0e82bbff62f626692a00f3772d8b17169a1842b8cc54d5f2ddb1fec2cede9e41 $(PKG)_SUBDIR := pangomm-$($(PKG)_VERSION) $(PKG)_FILE := pangomm-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://ftp.gnome.org/pub/gnome/sources/pangomm/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) +$(PKG)_URL := https://download.gnome.org/sources/pangomm/$(call SHORT_PKG_VERSION,$(PKG))/$($(PKG)_FILE) $(PKG)_DEPS := gcc cairomm glibmm pango define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.gnome.org/browse/pangomm/refs/tags' | \ + $(WGET) -q -O- 'https://git.gnome.org/browse/pangomm/refs/tags' | \ grep '<a href=' | \ $(SED) -n "s,.*<a href='[^']*/tag/?id=\\([0-9][^']*\\)'.*,\\1,p" | \ head -1 @@ -19,12 +20,7 @@ endef define $(PKG)_BUILD cd '$(1)' && ./configure \ - --host='$(TARGET)' \ - --build="`config.guess`" \ - --disable-shared \ - --prefix='$(PREFIX)/$(TARGET)' \ + $(MXE_CONFIGURE_OPTS) \ MAKE=$(MAKE) $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= endef - -$(PKG)_BUILD_SHARED = diff --git a/src/pcl-1-cmake-policy-cmp0017.patch b/src/pcl-1-cmake-policy-cmp0017.patch deleted file mode 100644 index 4f70ec85..00000000 --- a/src/pcl-1-cmake-policy-cmp0017.patch +++ /dev/null @@ -1,28 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From 0a5d7e96ad3d5ce39284968258fe78f39fe5f4ca Mon Sep 17 00:00:00 2001 -From: Boris Nagaev <bnagaev@gmail.com> -Date: Thu, 27 Aug 2015 08:16:41 +0200 -Subject: [PATCH] cmake_policy CMP0017 - ---- - CMakeLists.txt | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f0a5600..ea9ebcf 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -5,6 +5,8 @@ if(POLICY CMP0048) - cmake_policy(SET CMP0048 OLD) # do not use VERSION option in project() command - endif() - -+cmake_policy(SET CMP0017 NEW) -+ - set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "possible configurations" FORCE) - - # In case the user does not setup CMAKE_BUILD_TYPE, assume it's RelWithDebInfo --- -1.7.10.4 - diff --git a/src/pcl.mk b/src/pcl.mk index 6ba02d2f..54a67484 100644 --- a/src/pcl.mk +++ b/src/pcl.mk @@ -1,10 +1,11 @@ -# 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 := pcl +$(PKG)_WEBSITE := http://www.pointclouds.org/ +$(PKG)_DESCR := PCL (Point Cloud Library) $(PKG)_IGNORE := -$(PKG)_VERSION := 1.7.2 -$(PKG)_CHECKSUM := 479f84f2c658a6319b78271111251b4c2d6cf07643421b66bbc351d9bed0ae93 +$(PKG)_VERSION := 1.8.0 +$(PKG)_CHECKSUM := 9e54b0c1b59a67a386b9b0f4acb2d764272ff9a0377b825c4ed5eedf46ebfcf4 $(PKG)_SUBDIR := $(PKG)-$(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz $(PKG)_URL := https://github.com/PointCloudLibrary/pcl/archive/$($(PKG)_FILE) @@ -27,10 +28,8 @@ define $(PKG)_BUILD mkdir '$(1).build' cd '$(1).build' && \ CXXFLAGS="-D__FLOAT_H -DFLT_MAX=__FLT_MAX__ -DFLT_MIN=__FLT_MIN__ -DDBL_MAX=__DBL_MAX__ -DDBL_MIN=__DBL_MIN__ -DDBL_EPSILON=__DBL_EPSILON__" \ - cmake '$(1)' \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + '$(TARGET)-cmake' '$(1)' \ -DVTK_DIR='$(PREFIX)/$(TARGET)/lib/vtk-5.8' \ - -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_RELEASE_POSTFIX='' \ -DBoost_THREADAPI=win32 \ -DPCL_SHARED_LIBS=OFF \ @@ -39,10 +38,12 @@ define $(PKG)_BUILD -DBUILD_examples=OFF \ -DBUILD_global_tests=OFF \ -DBUILD_tools=OFF \ + -DWITH_CUDA=OFF \ -DWITH_PCAP=OFF \ -DHAVE_MM_MALLOC_EXITCODE=0 \ -DHAVE_SSE4_2_EXTENSIONS_EXITCODE=0 \ -DHAVE_SSE4_1_EXTENSIONS_EXITCODE=0 \ + -DHAVE_SSSE3_EXTENSIONS_EXITCODE=0 \ -DHAVE_SSE3_EXTENSIONS_EXITCODE=0 \ -DHAVE_SSE2_EXTENSIONS_EXITCODE=0 \ -DHAVE_SSE_EXTENSIONS_EXITCODE=0 diff --git a/src/pcre.mk b/src/pcre.mk index 41c16081..7c32426f 100644 --- a/src/pcre.mk +++ b/src/pcre.mk @@ -1,18 +1,19 @@ -# 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 := pcre +$(PKG)_WEBSITE := http://www.pcre.org/ +$(PKG)_DESCR := PCRE $(PKG)_IGNORE := -$(PKG)_VERSION := 8.37 -$(PKG)_CHECKSUM := 51679ea8006ce31379fb0860e46dd86665d864b5020fc9cd19e71260eef4789d +$(PKG)_VERSION := 8.40 +$(PKG)_CHECKSUM := 00e27a29ead4267e3de8111fcaa59b132d0533cdfdbdddf4b0604279acbcf4f4 $(PKG)_SUBDIR := pcre-$($(PKG)_VERSION) $(PKG)_FILE := pcre-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/pcre/pcre/$($(PKG)_VERSION)/$($(PKG)_FILE) -$(PKG)_URL_2 := ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/$($(PKG)_FILE) +$(PKG)_URL := https://ftp.pcre.org/pub/pcre/$($(PKG)_FILE) +$(PKG)_URL_2 := https://$(SOURCEFORGE_MIRROR)/project/pcre/pcre/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/pcre/files/pcre/' | \ + $(WGET) -q -O- 'https://ftp.pcre.org/pub/pcre/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef @@ -23,7 +24,7 @@ define $(PKG)_BUILD_SHARED --enable-pcre16 \ --enable-utf \ --enable-unicode-properties \ - --disable-cpp \ + --enable-cpp \ --disable-pcregrep-libz \ --disable-pcregrep-libbz2 \ --disable-pcretest-libreadline diff --git a/src/pcre2.mk b/src/pcre2.mk new file mode 100644 index 00000000..b0f6602f --- /dev/null +++ b/src/pcre2.mk @@ -0,0 +1,42 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := pcre2 +$(PKG)_WEBSITE := http://www.pcre.org/ +$(PKG)_DESCR := PCRE2 +$(PKG)_IGNORE := +$(PKG)_VERSION := 10.23 +$(PKG)_CHECKSUM := dfc79b918771f02d33968bd34a749ad7487fa1014aeb787fad29dd392b78c56e +$(PKG)_SUBDIR := pcre2-$($(PKG)_VERSION) +$(PKG)_FILE := pcre2-$($(PKG)_VERSION).tar.bz2 +$(PKG)_URL := https://ftp.pcre.org/pub/pcre/$($(PKG)_FILE) +$(PKG)_URL_2 := https://$(SOURCEFORGE_MIRROR)/project/pcre/pcre2/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://ftp.pcre.org/pub/pcre/' | \ + $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD_SHARED + cd '$(1)' && ./configure \ + $(MXE_CONFIGURE_OPTS) \ + --enable-pcre2-16 \ + --enable-utf \ + --enable-unicode-properties \ + --enable-cpp \ + --disable-pcre2grep-libz \ + --disable-pcre2grep-libbz2 \ + --disable-pcre2test-libreadline + $(MAKE) -C '$(1)' -j '$(JOBS)' install $(MXE_DISABLE_PROGRAMS) dist_html_DATA= dist_doc_DATA= + rm -f '$(PREFIX)/$(TARGET)'/share/man/man1/pcre*.1 + rm -f '$(PREFIX)/$(TARGET)'/share/man/man3/pcre*.3 + ln -sf '$(PREFIX)/$(TARGET)/bin/pcre2-config' '$(PREFIX)/bin/$(TARGET)-pcre2-config' +endef + +define $(PKG)_BUILD + $(SED) -i 's,__declspec(dllimport),,' '$(1)/src/pcre2.h.in' + $(SED) -i 's,__declspec(dllimport),,' '$(1)/src/pcre2posix.h' + $(SED) -i 's,__declspec(dllimport),,' '$(1)/src/pcre2.h.generic' + $($(PKG)_BUILD_SHARED) +endef diff --git a/src/pdcurses.mk b/src/pdcurses.mk index d3a18976..79618b46 100644 --- a/src/pdcurses.mk +++ b/src/pdcurses.mk @@ -1,17 +1,18 @@ -# 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 := pdcurses +$(PKG)_WEBSITE := https://pdcurses.sourceforge.io/ +$(PKG)_DESCR := PDcurses $(PKG)_IGNORE := $(PKG)_VERSION := 3.4 $(PKG)_CHECKSUM := 46ad8fd439e71d44819ea884d775ccbf653b9f8b1f7a418a0cce3a510aa2e64b $(PKG)_SUBDIR := PDCurses-$($(PKG)_VERSION) $(PKG)_FILE := PDCurses-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/pdcurses/pdcurses/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/pdcurses/pdcurses/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/pdcurses/files/pdcurses/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/pdcurses/files/pdcurses/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef diff --git a/src/pdflib_lite-1-mingw.patch b/src/pdflib_lite-1-mingw.patch index 629e0ddf..abf20cda 100644 --- a/src/pdflib_lite-1-mingw.patch +++ b/src/pdflib_lite-1-mingw.patch @@ -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 ad526da840d636da440ce31a6c7f7909ed7ce61c Mon Sep 17 00:00:00 2001 From: a <a@mxe.cc> diff --git a/src/pdflib_lite.mk b/src/pdflib_lite.mk index 95c3cf64..15f5924b 100644 --- a/src/pdflib_lite.mk +++ b/src/pdflib_lite.mk @@ -1,17 +1,18 @@ -# 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 := pdflib_lite +$(PKG)_WEBSITE := https://www.pdflib.com/download/free-software/pdflib-lite-7/ +$(PKG)_DESCR := PDFlib Lite $(PKG)_IGNORE := $(PKG)_VERSION := 7.0.5p3 $(PKG)_CHECKSUM := e5fb30678165d28b2bf066f78d5f5787e73a2a28d4902b63e3e07ce1678616c9 $(PKG)_SUBDIR := PDFlib-Lite-$($(PKG)_VERSION) $(PKG)_FILE := PDFlib-Lite-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.pdflib.com/binaries/PDFlib/$(subst .,,$(word 1,$(subst p, ,$($(PKG)_VERSION))))/$($(PKG)_FILE) +$(PKG)_URL := https://www.pdflib.com/binaries/PDFlib/$(subst .,,$(word 1,$(subst p, ,$($(PKG)_VERSION))))/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.pdflib.com/download/free-software/pdflib-lite-7/' | \ + $(WGET) -q -O- 'https://www.pdflib.com/download/free-software/pdflib-lite-7/' | \ $(SED) -n 's,.*PDFlib-Lite-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef diff --git a/src/pfstools-test.cpp b/src/pfstools-test.cpp index d344923b..ecd94e44 100644 --- a/src/pfstools-test.cpp +++ b/src/pfstools-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <pfs/pfs.h> diff --git a/src/pfstools.mk b/src/pfstools.mk index 5e5ed02f..9082eecc 100644 --- a/src/pfstools.mk +++ b/src/pfstools.mk @@ -1,17 +1,17 @@ -# 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 := pfstools +$(PKG)_WEBSITE := https://pfstools.sourceforge.io/ $(PKG)_IGNORE := -$(PKG)_VERSION := 2.0.0 -$(PKG)_CHECKSUM := 5e109d09f0c02cebf6800e04fc56851975f5d5e92d5a4ae626e31b58b347ff71 +$(PKG)_VERSION := 2.0.4 +$(PKG)_CHECKSUM := 4a6c1880193d3d1924d98b8dc2d2fe25827e7b2508823dc38f535653a4fd9942 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tgz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/pfstools/files/pfstools/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/pfstools/files/pfstools/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef @@ -20,8 +20,7 @@ endef # only want the library so we don't need them. define $(PKG)_BUILD mkdir '$(1).build' - cd '$(1).build' && cmake '$(1)' \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + cd '$(1).build' && '$(TARGET)-cmake' '$(1)' \ -DPKG_CONFIG_EXECUTABLE='$(PREFIX)/bin/$(TARGET)-pkg-config' \ -DWITH_OpenEXR=false \ -DWITH_ImageMagick=false \ @@ -38,7 +37,7 @@ define $(PKG)_BUILD '$(TARGET)-g++' \ -Wall -Wextra -Werror \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-pfstools.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-pfstools.exe' \ `'$(TARGET)-pkg-config' pfs --cflags --libs` endef diff --git a/src/physfs-1-cast-fixes.patch b/src/physfs-1-cast-fixes.patch new file mode 100644 index 00000000..b469d6f0 --- /dev/null +++ b/src/physfs-1-cast-fixes.patch @@ -0,0 +1,46 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +This patch was adapted for PhysicsFS 2.0.3's file layout from +https://hg.icculus.org/icculus/physfs/rev/67031168b061. + +# HG changeset patch +# User David Yip <dwyip@peach-bun.com> +# Date 1471367884 18000 +# Tue Aug 16 12:18:04 2016 -0500 +# Branch stable-2.0 +# Node ID 990fd55ba0c4979db59888283c7dde6c359927e2 +# Parent 34ebe997c5c07f57aff8e56695cd89856800d11d +Replace unsigned long cast with cast to uintptr_t. + +When targeting MinGW-w64's x86_64 target, unsigned long is 4 bytes but void* is +8 bytes. This mismatch triggers the pointer-to-int-cast warning. + +diff -r 34ebe997c5c0 -r 990fd55ba0c4 archivers/lzma.c +--- a/archivers/lzma.c Fri Jan 01 12:53:41 2016 -0500 ++++ b/archivers/lzma.c Tue Aug 16 12:18:04 2016 -0500 +@@ -9,6 +9,7 @@ + + #if (defined PHYSFS_SUPPORTS_7Z) + ++#include <stdint.h> + #include <stdlib.h> + #include <string.h> + #include <time.h> +@@ -130,7 +131,7 @@ + SZ_RESULT SzFileReadImp(void *object, void *buffer, size_t size, + size_t *processedSize) + { +- FileInputStream *s = (FileInputStream *)((unsigned long)object - offsetof(FileInputStream, inStream)); /* HACK! */ ++ FileInputStream *s = (FileInputStream *)((uintptr_t)object - offsetof(FileInputStream, inStream)); /* HACK! */ + size_t processedSizeLoc = __PHYSFS_platformRead(s->file, buffer, 1, size); + if (processedSize != 0) + *processedSize = processedSizeLoc; +@@ -145,7 +146,7 @@ + */ + SZ_RESULT SzFileSeekImp(void *object, CFileSize pos) + { +- FileInputStream *s = (FileInputStream *)((unsigned long)object - offsetof(FileInputStream, inStream)); /* HACK! */ ++ FileInputStream *s = (FileInputStream *)((uintptr_t)object - offsetof(FileInputStream, inStream)); /* HACK! */ + if (__PHYSFS_platformSeek(s->file, (PHYSFS_uint64) pos)) + return SZ_OK; + return SZE_FAIL; diff --git a/src/physfs-test.c b/src/physfs-test.c index d4164571..1ba5afe0 100644 --- a/src/physfs-test.c +++ b/src/physfs-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. * * This is a slightly modified version of: * test/physfs_test.c diff --git a/src/physfs.mk b/src/physfs.mk index 596d89b8..76862089 100644 --- a/src/physfs.mk +++ b/src/physfs.mk @@ -1,25 +1,24 @@ -# 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 := physfs +$(PKG)_WEBSITE := https://icculus.org/physfs/ $(PKG)_IGNORE := $(PKG)_VERSION := 2.0.3 $(PKG)_CHECKSUM := ca862097c0fb451f2cacd286194d071289342c107b6fe69079c079883ff66b69 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $($(PKG)_SUBDIR).tar.bz2 -$(PKG)_URL := http://icculus.org/physfs/downloads/$($(PKG)_FILE) +$(PKG)_URL := https://icculus.org/physfs/downloads/$($(PKG)_FILE) $(PKG)_DEPS := gcc zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://icculus.org/physfs/downloads/?M=D' | \ + $(WGET) -q -O- 'https://icculus.org/physfs/downloads/?M=D' | \ $(SED) -n 's,.*<a href="physfs-\([0-9][^"]*\)\.tar.*,\1,pI' | \ $(SORT) -V | \ tail -1 endef define $(PKG)_BUILD - cd '$(1)' && cmake . \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + cd '$(1)' && '$(TARGET)-cmake' . \ $(if $(BUILD_SHARED), \ -DPHYSFS_BUILD_SHARED=TRUE \ -DPHYSFS_BUILD_STATIC=FALSE, \ @@ -31,8 +30,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic -std=c99 \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-physfs.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-physfs.exe' \ -lphysfs -lz endef - -$(PKG)_BUILD_x86_64-w64-mingw32 = diff --git a/src/picomodel.mk b/src/picomodel.mk index ee2b6d26..ccb92fbf 100644 --- a/src/picomodel.mk +++ b/src/picomodel.mk @@ -1,7 +1,7 @@ -# 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 := picomodel +$(PKG)_WEBSITE := https://code.google.com/p/picomodel/ $(PKG)_IGNORE := $(PKG)_VERSION := 1142ad8 $(PKG)_CHECKSUM := e9dd8b78278a454602a81eb388603142a15f2124f549f478d4edc93149eb6dd0 diff --git a/src/pire-1-fixes.patch b/src/pire-1-fixes.patch index 854218e9..08b6a41c 100644 --- a/src/pire-1-fixes.patch +++ b/src/pire-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/pire.mk b/src/pire.mk index a9b8dfcc..2238c497 100644 --- a/src/pire.mk +++ b/src/pire.mk @@ -1,7 +1,8 @@ -# 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 := pire +$(PKG)_WEBSITE := https://github.com/yandex/pire +$(PKG)_DESCR := PIRE $(PKG)_IGNORE := $(PKG)_VERSION := 0.0.5 $(PKG)_CHECKSUM := 85a9bd66fff568554826e4aff9b188ed6124e3ea0530cc561723b36aea2a58e3 @@ -11,8 +12,7 @@ $(PKG)_URL := https://github.com/yandex/pire/archive/release-$($(PKG)_VERSI $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(call MXE_GET_GITHUB_TAGS, yandex/pire) | \ - $(SED) 's,^release-,,g' + $(call MXE_GET_GITHUB_TAGS, yandex/pire, release-) endef define $(PKG)_BUILD diff --git a/src/pixman.mk b/src/pixman.mk index 2f024c93..9d362af8 100644 --- a/src/pixman.mk +++ b/src/pixman.mk @@ -1,18 +1,18 @@ -# 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 := pixman +$(PKG)_WEBSITE := https://cairographics.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 0.31.2 -$(PKG)_CHECKSUM := 7e2dbef309f359276b98bbaf20e3fbef2c26edf4bce414138d0a51be7becc1ae +$(PKG)_VERSION := 0.33.6 +$(PKG)_CHECKSUM := 4e1e72c0ed31d10944f304976e87e6c87b441c853713eeecf115e22c23d4b17d $(PKG)_SUBDIR := pixman-$($(PKG)_VERSION) $(PKG)_FILE := pixman-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://cairographics.org/snapshots/$($(PKG)_FILE) -$(PKG)_URL_2 := http://xorg.freedesktop.org/archive/individual/lib/$($(PKG)_FILE) -$(PKG)_DEPS := gcc +$(PKG)_URL := https://cairographics.org/snapshots/$($(PKG)_FILE) +$(PKG)_URL_2 := https://xorg.freedesktop.org/archive/individual/lib/$($(PKG)_FILE) +$(PKG)_DEPS := gcc libpng define $(PKG)_UPDATE - $(WGET) -q -O- 'http://cairographics.org/snapshots/?C=M;O=D' | \ + $(WGET) -q -O- 'https://cairographics.org/snapshots/?C=M;O=D' | \ $(SED) -n 's,.*"pixman-\([0-9][^"]*\)\.tar.*,\1,p' | \ head -1 endef diff --git a/src/pkgconf-1-fixes.patch b/src/pkgconf-1-fixes.patch new file mode 100644 index 00000000..9ed65e55 --- /dev/null +++ b/src/pkgconf-1-fixes.patch @@ -0,0 +1,50 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +Contains ad hoc patches for cross building. + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Thu, 15 Jun 2017 21:05:31 +1000 +Subject: [PATCH] main: support undocumented PKG_CONFIG_SYSTEM_INCLUDE_PATH and + PKG_CONFIG_SYSTEM_LIBRARY_PATH environment variables. + +Backported from: +https://github.com/pkgconf/pkgconf/commit/7e6fa325eb668c3462981a16fb4c36270832e00f + +See: +https://github.com/mxe/mxe/pull/1785 + +diff --git a/main.c b/main.c +index 1111111..2222222 100644 +--- a/main.c ++++ b/main.c +@@ -56,16 +56,27 @@ static char *sysroot_dir = NULL; + + FILE *error_msgout = NULL; + ++static char * ++fallback_getenv(const char *envname, const char *fallback) ++{ ++ const char *data = getenv(envname); ++ ++ if (data == NULL) ++ data = fallback; ++ ++ return strdup(data); ++} ++ + static bool + fragment_has_system_dir(pkg_fragment_t *frag) + { + switch (frag->type) + { + case 'L': +- if ((want_flags & PKG_KEEP_SYSTEM_CFLAGS) == 0 && !strcasecmp(SYSTEM_LIBDIR, frag->data)) ++ if ((want_flags & PKG_KEEP_SYSTEM_CFLAGS) == 0 && !strcasecmp(fallback_getenv("PKG_CONFIG_SYSTEM_LIBRARY_PATH", SYSTEM_LIBDIR), frag->data)) + return true; + case 'I': +- if ((want_flags & PKG_KEEP_SYSTEM_LIBS) == 0 && !strcasecmp(SYSTEM_INCLUDEDIR, frag->data)) ++ if ((want_flags & PKG_KEEP_SYSTEM_LIBS) == 0 && !strcasecmp(fallback_getenv("PKG_CONFIG_SYSTEM_INCLUDE_PATH", SYSTEM_INCLUDEDIR), frag->data)) + return true; + default: + break; diff --git a/src/pkgconf.mk b/src/pkgconf.mk index 657d9956..5b462670 100644 --- a/src/pkgconf.mk +++ b/src/pkgconf.mk @@ -1,13 +1,13 @@ -# 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 := pkgconf +$(PKG)_WEBSITE := https://github.com/pkgconf/pkgconf $(PKG)_IGNORE := $(PKG)_VERSION := da179fd $(PKG)_CHECKSUM := 91b2e5d7ce06583d5920c373b61d7d6554cd085cbd61ed176c7ff7ff3032523d $(PKG)_SUBDIR := $(PKG)-$(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://github.com/$(PKG)/$(PKG)/tarball/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://github.com/$(PKG)/$(PKG)/tarball/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) $(PKG)_DEPS := @@ -21,7 +21,12 @@ endef define $(PKG)_BUILD # create pkg-config script (echo '#!/bin/sh'; \ - echo 'PKG_CONFIG_PATH="$(PREFIX)/$(TARGET)/qt5/lib/pkgconfig":"$$PKG_CONFIG_PATH_$(subst .,_,$(subst -,_,$(TARGET)))" PKG_CONFIG_LIBDIR='\''$(PREFIX)/$(TARGET)/lib/pkgconfig'\'' exec '$(PREFIX)/$(BUILD)/bin/pkgconf' $(if $(BUILD_STATIC),--static) "$$@"') \ + echo 'PKG_CONFIG_PATH="$(PREFIX)/$(TARGET)/qt5/lib/pkgconfig":"$$PKG_CONFIG_PATH_$(subst .,_,$(subst -,_,$(TARGET)))" \ + PKG_CONFIG_SYSROOT_DIR= \ + PKG_CONFIG_LIBDIR="$(PREFIX)/$(TARGET)/lib/pkgconfig" \ + PKG_CONFIG_SYSTEM_INCLUDE_PATH="$(PREFIX)/$(TARGET)/include" \ + PKG_CONFIG_SYSTEM_LIBRARY_PATH="$(PREFIX)/$(TARGET)/lib" \ + exec "$(PREFIX)/$(BUILD)/bin/pkgconf" $(if $(BUILD_STATIC),--static) "$$@"') \ > '$(PREFIX)/bin/$(TARGET)-pkg-config' chmod 0755 '$(PREFIX)/bin/$(TARGET)-pkg-config' diff --git a/src/plib-1-fixes.patch b/src/plib-1-fixes.patch index d3bc1d39..36fde791 100644 --- a/src/plib-1-fixes.patch +++ b/src/plib-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/plib-2-build-shared-libs.patch b/src/plib-2-build-shared-libs.patch index 07c22994..d2893d88 100644 --- a/src/plib-2-build-shared-libs.patch +++ b/src/plib-2-build-shared-libs.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/plib.mk b/src/plib.mk index 9c02a9fe..a96e6853 100644 --- a/src/plib.mk +++ b/src/plib.mk @@ -1,17 +1,18 @@ -# 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 := plib +$(PKG)_WEBSITE := https://plib.sourceforge.io/ +$(PKG)_DESCR := Plib $(PKG)_IGNORE := $(PKG)_VERSION := 1.8.5-rc1 $(PKG)_CHECKSUM := d421a3c84517b4bfc8c6402887c74984ec57c12bc85f2dc2729de3ec4cdcdbe4 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- "http://sourceforge.net/projects/plib/files/plib/" | \ + $(WGET) -q -O- "https://sourceforge.net/projects/plib/files/plib/" | \ grep 'plib/files/plib' | \ $(SED) -n 's,.*plib/\([0-9][^>]*\)/.*,\1,p' | \ head -1 diff --git a/src/plibc-1.patch b/src/plibc-1.patch index 8ef72913..25cb166f 100644 --- a/src/plibc-1.patch +++ b/src/plibc-1.patch @@ -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 5decce3a7834e7cdb8830e2733421029d74da009 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> diff --git a/src/plibc-test.c b/src/plibc-test.c index c8f7365b..4cf964bf 100644 --- a/src/plibc-test.c +++ b/src/plibc-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. * */ diff --git a/src/plibc.mk b/src/plibc.mk index 112108a2..9125e478 100644 --- a/src/plibc.mk +++ b/src/plibc.mk @@ -1,7 +1,8 @@ -# 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 := plibc +$(PKG)_WEBSITE := https://plibc.sourceforge.io/ +$(PKG)_DESCR := Plibc $(PKG)_IGNORE := % $(PKG)_VERSION := cd7ed09 $(PKG)_CHECKSUM := 1e939804e173b8f789e1403964211835b8006253d0a541d55256b540639b0629 @@ -35,7 +36,7 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -std=c99 -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-plibc.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-plibc.exe' \ `'$(TARGET)-pkg-config' --cflags --libs plibc` endef diff --git a/src/plotmm-1-fixes.patch b/src/plotmm-1-fixes.patch index c0ecbdc8..ed98aab1 100644 --- a/src/plotmm-1-fixes.patch +++ b/src/plotmm-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/plotmm.mk b/src/plotmm.mk index 04a1f6b9..f1242bd9 100644 --- a/src/plotmm.mk +++ b/src/plotmm.mk @@ -1,17 +1,18 @@ -# 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 := plotmm +$(PKG)_WEBSITE := https://plotmm.sourceforge.io/ +$(PKG)_DESCR := PlotMM $(PKG)_IGNORE := $(PKG)_VERSION := 0.1.2 $(PKG)_CHECKSUM := 896bb729eb9cad5f3188d72304789dd7a86fdae66020ac0632fe3bc66abe9653 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc gtkmm2 define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/plotmm/files/plotmm/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/plotmm/files/plotmm/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef diff --git a/src/plotutils-2.6-libpng-1.5.patch b/src/plotutils-2.6-libpng-1.5.patch index da3ff358..b045eca0 100644 --- a/src/plotutils-2.6-libpng-1.5.patch +++ b/src/plotutils-2.6-libpng-1.5.patch @@ -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. http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/plotutils/files/plotutils-2.6-libpng-1.5.patch fix building with libpng-1.5 diff --git a/src/plotutils.mk b/src/plotutils.mk index ce6696d5..c5cf74bc 100644 --- a/src/plotutils.mk +++ b/src/plotutils.mk @@ -1,18 +1,18 @@ -# 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 := plotutils +$(PKG)_WEBSITE := https://www.gnu.org/software/plotutils/ $(PKG)_IGNORE := $(PKG)_VERSION := 2.6 $(PKG)_CHECKSUM := 4f4222820f97ca08c7ea707e4c53e5a3556af4d8f1ab51e0da6ff1627ff433ab $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://ftpmirror.gnu.org/$(PKG)/$($(PKG)_FILE) -$(PKG)_URL_2 := http://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://ftpmirror.gnu.org/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL_2 := https://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc libpng pthreads define $(PKG)_UPDATE - $(WGET) -q -O- 'http://ftp.gnu.org/gnu/plotutils/?C=M;O=D' | \ + $(WGET) -q -O- 'https://ftp.gnu.org/gnu/plotutils/?C=M;O=D' | \ grep '<a href="plotutils-' | \ $(SED) -n 's,.*plotutils-\([0-9][^<]*\)\.tar.*,\1,p' | \ head -1 diff --git a/src/poco-1-fixes.patch b/src/poco-1-fixes.patch index 26b39769..8ec0511e 100644 --- a/src/poco-1-fixes.patch +++ b/src/poco-1-fixes.patch @@ -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 329b3a3ebbcd2ee03e3f0e21cd929dd54fffcac3 Mon Sep 17 00:00:00 2001 From: Timothy Gu <timothygu99@gmail.com> diff --git a/src/poco-2-fix-mno-cygwin.patch b/src/poco-2-fix-mno-cygwin.patch index e7a237ac..0331ef10 100644 --- a/src/poco-2-fix-mno-cygwin.patch +++ b/src/poco-2-fix-mno-cygwin.patch @@ -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. --- a/build/config/MinGW-CrossEnv +++ b/build/config/MinGW-CrossEnv diff --git a/src/poco-3-winsock2.patch b/src/poco-3-winsock2.patch index 753d01cb..3213cf43 100644 --- a/src/poco-3-winsock2.patch +++ b/src/poco-3-winsock2.patch @@ -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 25b2fc9af331fe6add75fb108bec590f8d467b20 Mon Sep 17 00:00:00 2001 From: Timothy Gu <timothygu99@gmail.com> diff --git a/src/poco-test.cpp b/src/poco-test.cpp index 715a446e..3e592f84 100644 --- a/src/poco-test.cpp +++ b/src/poco-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <iostream> diff --git a/src/poco.mk b/src/poco.mk index d7a5623f..a0923261 100644 --- a/src/poco.mk +++ b/src/poco.mk @@ -1,17 +1,18 @@ -# 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 := poco +$(PKG)_WEBSITE := https://pocoproject.org/ +$(PKG)_DESCR := POCO C++ Libraries $(PKG)_IGNORE := $(PKG)_VERSION := 1.4.7p1 $(PKG)_CHECKSUM := 7037cc465744bf2fa73aca9cea14d1207f040de5ea8073dc266b06a73b3db8df $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz -$(PKG)_URL := http://pocoproject.org/releases/$(PKG)-$(word 1,$(subst p, ,$($(PKG)_VERSION)))/$($(PKG)_FILE) +$(PKG)_URL := https://pocoproject.org/releases/$(PKG)-$(word 1,$(subst p, ,$($(PKG)_VERSION)))/$($(PKG)_FILE) $(PKG)_DEPS := gcc expat openssl pcre sqlite zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://pocoproject.org/download/' | \ + $(WGET) -q -O- 'https://pocoproject.org/download/' | \ $(SED) -n 's,.*poco-\([0-9][^>/]*\)\.tar.*,\1,p' | \ head -1 endef @@ -32,7 +33,7 @@ define $(PKG)_BUILD '$(TARGET)-g++' \ -W -Wall -Werror -ansi -pedantic -DPOCO_STATIC=1 \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-poco.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-poco.exe' \ -lPocoFoundation endef diff --git a/src/polarssl-1-CVE20151182.patch b/src/polarssl-1-CVE20151182.patch deleted file mode 100644 index a5db4543..00000000 --- a/src/polarssl-1-CVE20151182.patch +++ /dev/null @@ -1,20 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -Security fix for CVE-2015-1182 from: -https://polarssl.org/tech-updates/security-advisories/polarssl-security-advisory-2014-04 - - -diff --git a/library/asn1parse.c b/library/asn1parse.c -index a3a2b56..e2117bf 100644 ---- a/library/asn1parse.c -+++ b/library/asn1parse.c -@@ -278,6 +278,8 @@ int asn1_get_sequence_of( unsigned char **p, - if( cur->next == NULL ) - return( POLARSSL_ERR_ASN1_MALLOC_FAILED ); - -+ memset( cur->next, 0, sizeof( asn1_sequence ) ); -+ - cur = cur->next; - } - } diff --git a/src/polarssl-1-fixes.patch b/src/polarssl-1-fixes.patch new file mode 100644 index 00000000..ec214e33 --- /dev/null +++ b/src/polarssl-1-fixes.patch @@ -0,0 +1,51 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +Contains ad hoc patches for cross building. + +From 0516b3ebc54e3acdf3882b218e0f30133a23fa61 Mon Sep 17 00:00:00 2001 +From: MXE +Date: Wed, 2 Dec 2015 18:47:45 +1100 +Subject: [PATCH 1/2] Security fix for CVE-2015-1182 from: + +https://polarssl.org/tech-updates/security-advisories/polarssl-security-advisory-2014-04 + +diff --git a/library/asn1parse.c b/library/asn1parse.c +index a3a2b56..e2117bf 100644 +--- a/library/asn1parse.c ++++ b/library/asn1parse.c +@@ -278,6 +278,8 @@ int asn1_get_sequence_of( unsigned char **p, + if( cur->next == NULL ) + return( POLARSSL_ERR_ASN1_MALLOC_FAILED ); + ++ memset( cur->next, 0, sizeof( asn1_sequence ) ); ++ + cur = cur->next; + } + } +-- +2.4.9 (Apple Git-60) + + +From e13da28ce07af59a1ee9736d41fc80e7a2861e7b Mon Sep 17 00:00:00 2001 +From: MXE +Date: Wed, 2 Dec 2015 18:50:21 +1100 +Subject: [PATCH 2/2] fix shared lib install locations + + +diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt +index 33d96b4..262b463 100644 +--- a/library/CMakeLists.txt ++++ b/library/CMakeLists.txt +@@ -131,6 +131,8 @@ if(USE_SHARED_POLARSSL_LIBRARY) + endif() + + install(TARGETS polarssl +- DESTINATION ${LIB_INSTALL_DIR} ++ ARCHIVE DESTINATION ${LIB_INSTALL_DIR} ++ LIBRARY DESTINATION ${LIB_INSTALL_DIR} ++ RUNTIME DESTINATION bin + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + endif(USE_SHARED_POLARSSL_LIBRARY) +-- +2.4.9 (Apple Git-60) + diff --git a/src/polarssl.mk b/src/polarssl.mk index 0c5107a6..42529d4c 100644 --- a/src/polarssl.mk +++ b/src/polarssl.mk @@ -1,14 +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 := polarssl +$(PKG)_WEBSITE := https://polarssl.org/ +$(PKG)_DESCR := Polar SSL Library $(PKG)_IGNORE := $(PKG)_VERSION := 1.3.9 $(PKG)_CHECKSUM := d3605afc28ed4b7d1d9e3142d72e42855e4a23c07c951bbb0299556b02d36755 $(PKG)_SUBDIR := polarssl-$($(PKG)_VERSION) $(PKG)_FILE := polarssl-$($(PKG)_VERSION)-gpl.tgz $(PKG)_URL := https://polarssl.org/download/$($(PKG)_FILE) -$(PKG)_DEPS := gcc +$(PKG)_DEPS := gcc zlib # Match lines like: # <a href="/tech-updates/releases/polarssl-1.3.4-released">PolarSSL 1.3.4 released</a></br> @@ -22,8 +23,12 @@ endef define $(PKG)_BUILD mkdir '$(1)/build' - cd '$(1)/build' && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' + cd '$(1)/build' && '$(TARGET)-cmake' .. \ + -DUSE_STATIC_POLARSSL_LIBRARY=$(CMAKE_STATIC_BOOL) \ + -DUSE_SHARED_POLARSSL_LIBRARY=$(CMAKE_SHARED_BOOL) \ + -DENABLE_TESTING=OFF \ + -DENABLE_PROGRAMS=OFF \ + -DENABLE_ZLIB_SUPPORT=ON $(MAKE) -C '$(1)/build/library' -j '$(JOBS)' install $(MAKE) -C '$(1)/build/include' -j '$(JOBS)' install endef diff --git a/src/poppler-1-win32.patch b/src/poppler-1-win32.patch index 0fc1063c..744379b8 100644 --- a/src/poppler-1-win32.patch +++ b/src/poppler-1-win32.patch @@ -1,7 +1,6 @@ -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 19910ebb3242f3089ac7ba2cc83ad21c11a29b31 Mon Sep 17 00:00:00 2001 +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20L=C3=B6ffler?= <st.loeffler@gmail.com> Date: Mon, 15 Sep 2014 19:53:04 -0700 Subject: [PATCH 1/2] Only check for Type1 fonts in custom directory if path is @@ -11,7 +10,7 @@ Otherwise, programs using poppler may crash Proposed upstream at https://bugs.freedesktop.org/show_bug.cgi?id=49037 diff --git a/poppler/GlobalParamsWin.cc b/poppler/GlobalParamsWin.cc -index 084b49b..9bd7dac 100644 +index 1111111..2222222 100644 --- a/poppler/GlobalParamsWin.cc +++ b/poppler/GlobalParamsWin.cc @@ -423,7 +423,7 @@ void GlobalParams::setupBaseFonts(char * dir) @@ -23,102 +22,118 @@ index 084b49b..9bd7dac 100644 GooString *fontPath = appendToPath(new GooString(dir), displayFontTab[i].t1FileName); if (FileExists(fontPath->getCString()) || FileExists(replaceSuffix(fontPath, ".pfb", ".pfa")->getCString())) { --- -2.1.0 -From 346680cd02223d6be57c4eecb983505db13b2acf Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Stefan=20L=C3=B6ffler?= <st.loeffler@gmail.com> -Date: Mon, 15 Sep 2014 20:01:22 -0700 -Subject: [PATCH 2/2] Don't use dllimport/dllexport -Otherwise static linking fails - -MXE workaround for https://bugs.freedesktop.org/show_bug.cgi?id=49038 -(presumably would break shared linking!) +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: darealshinji <djcj@gmx.de> +Date: Thu, 14 Jul 2016 13:21:26 +0200 +Subject: [PATCH 2/2] enable cross-building DLLs diff --git a/cpp/poppler-global.h b/cpp/poppler-global.h -index eb7ec24..dd13e02 100644 +index 1111111..2222222 100644 --- a/cpp/poppler-global.h +++ b/cpp/poppler-global.h -@@ -21,13 +21,8 @@ +@@ -21,7 +21,7 @@ #ifndef POPPLER_GLOBAL_H #define POPPLER_GLOBAL_H -#if defined(_WIN32) --# define LIB_EXPORT __declspec(dllexport) --# define LIB_IMPORT __declspec(dllimport) --#else - # define LIB_EXPORT - # define LIB_IMPORT --#endif ++#if defined(_WIN32) && defined(DLL_EXPORT) + # define LIB_EXPORT __declspec(dllexport) + # define LIB_IMPORT __declspec(dllimport) + #else +diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc +index 1111111..2222222 100644 +--- a/poppler/GlobalParams.cc ++++ b/poppler/GlobalParams.cc +@@ -150,6 +150,7 @@ PSFontParam16::~PSFontParam16() { - #if defined(poppler_cpp_EXPORTS) - # define POPPLER_CPP_EXPORT LIB_EXPORT + static HMODULE hmodule; + ++#ifdef DLL_EXPORT + extern "C" { + BOOL WINAPI + DllMain (HINSTANCE hinstDLL, +@@ -166,6 +167,7 @@ DllMain (HINSTANCE hinstDLL, + return TRUE; + } + } ++#endif + + static const char * + get_poppler_datadir (void) diff --git a/poppler/XpdfPluginAPI.h b/poppler/XpdfPluginAPI.h -index 6ed890a..8b7222b 100644 +index 1111111..2222222 100644 --- a/poppler/XpdfPluginAPI.h +++ b/poppler/XpdfPluginAPI.h -@@ -47,19 +47,11 @@ extern "C" { +@@ -47,7 +47,7 @@ extern "C" { */ #define xpdfPluginAPIVersion 1 -#ifdef _WIN32 --# ifdef __cplusplus --# define PLUGINFUNC(retType) extern "C" __declspec(dllexport) retType --# else --# define PLUGINFUNC(retType) extern __declspec(dllexport) retType --# endif --#else ++#if defined(_WIN32) && defined(DLL_EXPORT) # ifdef __cplusplus - # define PLUGINFUNC(retType) extern "C" retType + # define PLUGINFUNC(retType) extern "C" __declspec(dllexport) retType # else - # define PLUGINFUNC(retType) extern retType - # endif --#endif - - /*------------------------------------------------------------------------ - * Plugin setup/cleanup -@@ -286,22 +278,12 @@ void (*_xpdfRegisterSecurityHandler)(XpdfSecurityHandler *handler); +@@ -286,7 +286,7 @@ void (*_xpdfRegisterSecurityHandler)(XpdfSecurityHandler *handler); } XpdfPluginVecTable; -#ifdef _WIN32 -- --extern __declspec(dllexport) XpdfPluginVecTable xpdfPluginVecTable; -- --#define xpdfPluginSetup \ -- extern __declspec(dllexport) \ -- XpdfPluginVecTable xpdfPluginVecTable = {xpdfPluginAPIVersion}; -- --#else ++#if defined(_WIN32) && defined(DLL_EXPORT) - extern XpdfPluginVecTable xpdfPluginVecTable; + extern __declspec(dllexport) XpdfPluginVecTable xpdfPluginVecTable; - #define xpdfPluginSetup \ - XpdfPluginVecTable xpdfPluginVecTable = {xpdfPluginAPIVersion}; - --#endif - - #define xpdfGetInfoDict (*xpdfPluginVecTable._xpdfGetInfoDict) - #define xpdfGetCatalog (*xpdfPluginVecTable._xpdfGetCatalog) diff --git a/qt4/src/poppler-export.h b/qt4/src/poppler-export.h -index 2e2f6ff..e625564 100644 +index 1111111..2222222 100644 --- a/qt4/src/poppler-export.h +++ b/qt4/src/poppler-export.h -@@ -2,10 +2,7 @@ +@@ -2,7 +2,7 @@ * This file is used to set the poppler_qt4_EXPORT macros right. * This is needed for setting the visibility on windows, it will have no effect on other platforms. */ -#if defined(_WIN32) --# define _POPPLER_QT4_LIB_EXPORT __declspec(dllexport) --# define _POPPLER_QT4_LIB_IMPORT __declspec(dllimport) --#elif defined(__GNUC__) -+#if defined(__GNUC__) - # define _POPPLER_QT4_LIB_EXPORT __attribute__((visibility("default"))) - # define _POPPLER_QT4_LIB_IMPORT - #else --- -2.1.0 ++#if defined(_WIN32) && defined(DLL_EXPORT) + # define _POPPLER_QT4_LIB_EXPORT __declspec(dllexport) + # define _POPPLER_QT4_LIB_IMPORT __declspec(dllimport) + #elif defined(__GNUC__) +diff --git a/qt5/src/poppler-export.h b/qt5/src/poppler-export.h +index 1111111..2222222 100644 +--- a/qt5/src/poppler-export.h ++++ b/qt5/src/poppler-export.h +@@ -2,7 +2,7 @@ + * This file is used to set the poppler_qt4_EXPORT macros right. + * This is needed for setting the visibility on windows, it will have no effect on other platforms. + */ +-#if defined(_WIN32) ++#if defined(_WIN32) && defined(DLL_EXPORT) + # define _POPPLER_QT5_LIB_EXPORT __declspec(dllexport) + # define _POPPLER_QT5_LIB_IMPORT __declspec(dllimport) + #elif defined(__GNUC__) +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Wed, 27 Jul 2016 10:29:52 +0200 +Subject: [PATCH] do not try to use mman.h (package mman-win32) +fix https://github.com/mxe/mxe/issues/1455 + +diff --git a/poppler/CairoFontEngine.cc b/poppler/CairoFontEngine.cc +index 1111111..2222222 100644 +--- a/poppler/CairoFontEngine.cc ++++ b/poppler/CairoFontEngine.cc +@@ -48,13 +48,6 @@ + #include "Gfx.h" + #include "Page.h" + +-#if HAVE_FCNTL_H && HAVE_SYS_MMAN_H && HAVE_SYS_STAT_H +-#include <fcntl.h> +-#include <sys/stat.h> +-#include <sys/mman.h> +-#define CAN_CHECK_OPEN_FACES 1 +-#endif +- + #ifdef USE_GCC_PRAGMAS + #pragma implementation + #endif diff --git a/src/poppler.mk b/src/poppler.mk index e569d84c..43a4d986 100644 --- a/src/poppler.mk +++ b/src/poppler.mk @@ -1,17 +1,17 @@ -# 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 := poppler +$(PKG)_WEBSITE := https://poppler.freedesktop.org/ $(PKG)_IGNORE := -$(PKG)_VERSION := 0.30.0 -$(PKG)_CHECKSUM := b616ee869d0b1f8a7a2c71cf346f55c1bff624cce4badebe17f506ec8ce7ddf5 +$(PKG)_VERSION := 0.51.0 +$(PKG)_CHECKSUM := e997c9ad81a8372f2dd03a02b00692b8cc479c220340c8881edaca540f402c1f $(PKG)_SUBDIR := poppler-$($(PKG)_VERSION) $(PKG)_FILE := poppler-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://poppler.freedesktop.org/$($(PKG)_FILE) +$(PKG)_URL := https://poppler.freedesktop.org/$($(PKG)_FILE) $(PKG)_DEPS := gcc cairo curl freetype glib jpeg lcms libpng qt tiff zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://poppler.freedesktop.org/' | \ + $(WGET) -q -O- 'https://poppler.freedesktop.org/' | \ $(SED) -n 's,.*"poppler-\([0-9.]\+\)\.tar\.xz".*,\1,p' | \ head -1 endef @@ -24,14 +24,14 @@ define $(PKG)_BUILD cd '$(1)' \ && PATH='$(PREFIX)/$(TARGET)/qt/bin:$(PATH)' \ ./configure \ - --host='$(TARGET)' \ - --build="`config.guess`" \ - --prefix='$(PREFIX)/$(TARGET)' \ + $(MXE_CONFIGURE_OPTS) \ --disable-silent-rules \ - --disable-shared \ - --enable-static \ --enable-xpdf-headers \ - --enable-poppler-qt4 \ + $(if $(filter qtbase,$($(PKG)_DEPS)), \ + --enable-poppler-qt5 \ + --disable-poppler-qt4, \ + --disable-poppler-qt5 \ + --enable-poppler-qt4) \ --enable-zlib \ --enable-cms=lcms2 \ --enable-libcurl \ @@ -55,15 +55,12 @@ define $(PKG)_BUILD CXXFLAGS=-D_WIN32_WINNT=0x0500 \ LIBTIFF_LIBS="`'$(TARGET)-pkg-config' libtiff-4 --libs`" PATH='$(PREFIX)/$(TARGET)/qt/bin:$(PATH)' \ - $(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= - $(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= + $(MAKE) -C '$(1)' -j '$(JOBS)' $(MXE_DISABLE_CRUFT) HTML_DIR= + $(MAKE) -C '$(1)' -j 1 install $(MXE_DISABLE_CRUFT) HTML_DIR= # Test program '$(TARGET)-g++' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).cxx' -o '$(PREFIX)/$(TARGET)/bin/test-poppler.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-poppler.exe' \ `'$(TARGET)-pkg-config' poppler poppler-cpp --cflags --libs` endef - -$(PKG)_BUILD_SHARED = - diff --git a/src/popt-1-win32.patch b/src/popt-1-win32.patch index f12ecd80..ac92c3de 100644 --- a/src/popt-1-win32.patch +++ b/src/popt-1-win32.patch @@ -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. diff -urN a/popt.c b/popt.c --- a/popt.c 2010-01-19 01:39:10.000000000 +0100 diff --git a/src/popt.mk b/src/popt.mk index 5e932ab7..01676ad5 100644 --- a/src/popt.mk +++ b/src/popt.mk @@ -1,7 +1,7 @@ -# 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 := popt +$(PKG)_WEBSITE := http://freshmeat.net/projects/popt/ $(PKG)_IGNORE := $(PKG)_VERSION := 1.16 $(PKG)_CHECKSUM := e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d304cc8 diff --git a/src/portablexdr.mk b/src/portablexdr.mk index c75043c0..e23eab1f 100644 --- a/src/portablexdr.mk +++ b/src/portablexdr.mk @@ -1,17 +1,18 @@ -# 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 := portablexdr +$(PKG)_WEBSITE := https://people.redhat.com/~rjones/portablexdr/ +$(PKG)_DESCR := PortableXDR $(PKG)_IGNORE := $(PKG)_VERSION := 4.9.1 $(PKG)_CHECKSUM := 5cf4bdd153cf4d44eaf10b725f451d0cfadc070b4b9a9ccfb64094b8f78de72c $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://people.redhat.com/~rjones/portablexdr/files/$($(PKG)_FILE) +$(PKG)_URL := https://people.redhat.com/~rjones/portablexdr/files/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- "http://people.redhat.com/~rjones/portablexdr/files/?C=M;O=D" | \ + $(WGET) -q -O- "https://people.redhat.com/~rjones/portablexdr/files/?C=M;O=D" | \ grep -i '<a href=.*tar' | \ $(SED) -n 's,.*portablexdr-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 diff --git a/src/portaudio-1-fixes-crlf.patch b/src/portaudio-1-fixes-crlf.patch index cea397dc..dc56494d 100644 --- a/src/portaudio-1-fixes-crlf.patch +++ b/src/portaudio-1-fixes-crlf.patch @@ -1,35 +1,11 @@ -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. Contains ad hoc patches for cross building. -From dfa2eeb14b92d2bbaf1f6916b2d154b98719d470 Mon Sep 17 00:00:00 2001 -From: MXE -Date: Tue, 30 Jun 2015 21:20:47 -0400 -Subject: [PATCH 1/4] configure: Fix wdmks source file path - - -diff --git a/configure.in b/configure.in -index 305b64e..3f3b31e 100644 ---- a/configure.in -+++ b/configure.in -@@ -318,7 +318,7 @@ case "${host_os}" in - - if [[ "x$with_wdmks" = "xyes" ]]; then - DXDIR="$with_dxdir" -- add_objects src/hostapi/wdmks/pa_win_wdmks.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_wdmks_util.o src/os/win/pa_win_waveformat.o -+ add_objects src/hostapi/wdmks/pa_win_wdmks.o src/common/pa_ringbuffer.o src/os/win/pa_win_hostapis.o src/os/win/pa_win_util.o src/os/win/pa_win_wdmks_utils.o src/os/win/pa_win_waveformat.o - LIBS="${LIBS} -lwinmm -lm -luuid -lsetupapi -lole32" - DLL_LIBS="${DLL_LIBS} -lwinmm -lm -L$DXDIR/lib -luuid -lsetupapi -lole32" - #VC98="\"/c/Program Files/Microsoft Visual Studio/VC98/Include\"" --- -1.9.1 - - From 19e458bb064fbccadecced9c20f5c05c65018c2c Mon Sep 17 00:00:00 2001 From: MXE Date: Tue, 30 Jun 2015 21:21:17 -0400 -Subject: [PATCH 2/4] pa_win_ds: Add shim for macro +Subject: [PATCH 1/2] pa_win_ds: Add shim for macro diff --git a/src/hostapi/dsound/pa_win_ds.c b/src/hostapi/dsound/pa_win_ds.c @@ -60,35 +36,10 @@ index 98afb5c..2b24981 100644 1.9.1 -From 65b0f52b1a450a7a773ec6cf6a76822e665ed266 Mon Sep 17 00:00:00 2001 -From: MXE -Date: Tue, 30 Jun 2015 21:21:38 -0400 -Subject: [PATCH 3/4] pa_win_wdmks: Remove extraneous winioctl.h inclusion - -This caused compilation failure on mingw-w64. - -http://music.columbia.edu/pipermail/portaudio/2015-June/016833.html - -diff --git a/src/hostapi/wdmks/pa_win_wdmks.c b/src/hostapi/wdmks/pa_win_wdmks.c -index f969e14..5fca590 100644 ---- a/src/hostapi/wdmks/pa_win_wdmks.c -+++ b/src/hostapi/wdmks/pa_win_wdmks.c -@@ -87,7 +87,6 @@ of a device for the duration of active stream using those devices - #include "pa_win_wdmks.h" - - #include <windows.h> --#include <winioctl.h> - #include <process.h> - - #include <math.h> --- -1.9.1 - - From 4cec0d1cc47fcf3dd71fded3678282981d5d4f74 Mon Sep 17 00:00:00 2001 From: MXE Date: Tue, 30 Jun 2015 21:25:55 -0400 -Subject: [PATCH 4/4] pa_win_wasapi: Fix compilation on mingw-w64 +Subject: [PATCH 2/2] pa_win_wasapi: Fix compilation on mingw-w64 diff --git a/configure.in b/configure.in @@ -109,25 +60,25 @@ index aecdd63..a9473b9 100644 --- a/src/hostapi/wasapi/pa_win_wasapi.c +++ b/src/hostapi/wasapi/pa_win_wasapi.c @@ -49,14 +49,15 @@ - #include <assert.h> - #include <mmsystem.h> - #include <mmreg.h> // must be before other Wasapi headers --#if defined(_MSC_VER) && (_MSC_VER >= 1400) -- #include <Avrt.h> -+#if defined(_MSC_VER) && (_MSC_VER >= 1400) || defined(__MINGW64_VERSION_MAJOR) -+ #include <avrt.h> - #define COBJMACROS -- #include <Audioclient.h> -+ #include <audioclient.h> - #include <endpointvolume.h> - #define INITGUID // Avoid additional linkage of static libs, excessive code will be optimized out by the compiler -- #include <mmdeviceapi.h> -+ #include <functiondiscoverykeys_devpkey.h> - #include <functiondiscoverykeys.h> -+ #include <mmdeviceapi.h> - #include <devicetopology.h> // Used to get IKsJackDescription interface - #undef INITGUID - #endif + #include <assert.h> + #include <mmsystem.h> + #include <mmreg.h> // must be before other Wasapi headers +-#if defined(_MSC_VER) && (_MSC_VER >= 1400) +- #include <Avrt.h> ++#if defined(_MSC_VER) && (_MSC_VER >= 1400) || defined(__MINGW64_VERSION_MAJOR) ++ #include <avrt.h> + #define COBJMACROS +- #include <Audioclient.h> ++ #include <audioclient.h> + #include <endpointvolume.h> + #define INITGUID // Avoid additional linkage of static libs, excessive code will be optimized out by the compiler +- #include <mmdeviceapi.h> ++ #include <functiondiscoverykeys_devpkey.h> + #include <functiondiscoverykeys.h> ++ #include <mmdeviceapi.h> + #include <devicetopology.h> // Used to get IKsJackDescription interface + #undef INITGUID + #endif -- 1.9.1 diff --git a/src/portaudio-test.c b/src/portaudio-test.c index c9faffec..98b9ed38 100644 --- a/src/portaudio-test.c +++ b/src/portaudio-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <portaudio.h> diff --git a/src/portaudio.mk b/src/portaudio.mk index 5430eff3..6cf6d55d 100644 --- a/src/portaudio.mk +++ b/src/portaudio.mk @@ -1,10 +1,10 @@ -# 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 := portaudio +$(PKG)_WEBSITE := http://www.portaudio.com/ $(PKG)_IGNORE := -$(PKG)_VERSION := 19_20140130 -$(PKG)_CHECKSUM := 8fe024a5f0681e112c6979808f684c3516061cc51d3acc0b726af98fc96c8d57 +$(PKG)_VERSION := 190600_20161030 +$(PKG)_CHECKSUM := f5a21d7dcd6ee84397446fa1fa1a0675bb2e8a4a6dceb4305a8404698d8d1513 $(PKG)_SUBDIR := portaudio $(PKG)_FILE := pa_stable_v$($(PKG)_VERSION).tgz $(PKG)_URL := http://www.portaudio.com/archives/$($(PKG)_FILE) @@ -36,6 +36,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-portaudio.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-portaudio.exe' \ `'$(TARGET)-pkg-config' portaudio-2.0 --cflags --libs` endef diff --git a/src/portmidi-1-nojni.patch b/src/portmidi-1-nojni.patch index 90bb7e9c..bf9577c5 100644 --- a/src/portmidi-1-nojni.patch +++ b/src/portmidi-1-nojni.patch @@ -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. This patch disables the Java Native Interface dependency. diff --git a/src/portmidi-test.c b/src/portmidi-test.c index a1179d9b..0544623a 100644 --- a/src/portmidi-test.c +++ b/src/portmidi-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. * * modified from pm_test/test.c */ diff --git a/src/portmidi.mk b/src/portmidi.mk index 5e697b5a..082a33fc 100644 --- a/src/portmidi.mk +++ b/src/portmidi.mk @@ -1,17 +1,17 @@ -# 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 := portmidi +$(PKG)_WEBSITE := https://portmedia.sourceforge.io/portmidi/ $(PKG)_IGNORE := $(PKG)_VERSION := 217 $(PKG)_CHECKSUM := 08e9a892bd80bdb1115213fb72dc29a7bf2ff108b378180586aa65f3cfd42e0f $(PKG)_SUBDIR := portmidi $(PKG)_FILE := $(PKG)-src-$($(PKG)_VERSION).zip -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/portmedia/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/portmedia/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- "http://sourceforge.net/projects/portmedia/files/portmidi/" | \ + $(WGET) -q -O- "https://sourceforge.net/projects/portmedia/files/portmidi/" | \ grep -i 'portmedia/files/portmidi' | \ $(SED) -n 's,.*portmidi/\([0-9]*\)/.*,\1,p' | \ head -1 @@ -19,8 +19,7 @@ endef define $(PKG)_BUILD mkdir '$(1)/build' - cd '$(1)/build' && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' + cd '$(1)/build' && '$(TARGET)-cmake' .. $(MAKE) -C '$(1)/build' -j '$(JOBS)' portmidi-$(if $(BUILD_STATIC),static,dynamic) @@ -42,6 +41,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-portmidi.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-portmidi.exe' \ -lportmidi -lwinmm endef diff --git a/src/postgresql-1-fixes.patch b/src/postgresql-1-fixes.patch index 54082c97..6a1e3f7d 100644 --- a/src/postgresql-1-fixes.patch +++ b/src/postgresql-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/postgresql-2-autoconf-min-version.patch b/src/postgresql-2-autoconf-min-version.patch index e024f84a..f61f7fea 100644 --- a/src/postgresql-2-autoconf-min-version.patch +++ b/src/postgresql-2-autoconf-min-version.patch @@ -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. Contains ad hoc patches for cross building. see https://github.com/mxe/mxe/issues/672 diff --git a/src/postgresql.mk b/src/postgresql.mk index b7026075..f4320a1e 100644 --- a/src/postgresql.mk +++ b/src/postgresql.mk @@ -1,17 +1,18 @@ -# 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 := postgresql +$(PKG)_WEBSITE := https://www.postgresql.org/ +$(PKG)_DESCR := PostgreSQL $(PKG)_IGNORE := $(PKG)_VERSION := 9.2.4 $(PKG)_CHECKSUM := d97dd918a88a4449225998f46aafa85216a3f89163a3411830d6890507ffae93 $(PKG)_SUBDIR := postgresql-$($(PKG)_VERSION) $(PKG)_FILE := postgresql-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://ftp.postgresql.org/pub/source/v$($(PKG)_VERSION)/$($(PKG)_FILE) -$(PKG)_DEPS := gcc openssl zlib +$(PKG)_URL := https://ftp.postgresql.org/pub/source/v$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc openssl pthreads zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.postgresql.org/gitweb?p=postgresql.git;a=tags' | \ + $(WGET) -q -O- 'https://git.postgresql.org/gitweb?p=postgresql.git;a=tags' | \ grep 'refs/tags/REL9[0-9_]*"' | \ $(SED) 's,.*refs/tags/REL\(.*\)".*,\1,g;' | \ $(SED) 's,_,.,g' | \ @@ -23,6 +24,7 @@ define $(PKG)_BUILD cd '$(1)' && autoconf cp -Rp '$(1)' '$(1).native' # Since we build only client libary, use bogus tzdata to satisfy configure. + # pthreads is needed in both LIBS and PTHREAD_LIBS cd '$(1)' && ./configure \ $(MXE_CONFIGURE_OPTS) \ --disable-rpath \ @@ -41,9 +43,15 @@ define $(PKG)_BUILD --without-libxslt \ --with-zlib \ --with-system-tzdata=/dev/null \ - LIBS="-lsecur32 `'$(TARGET)-pkg-config' openssl --libs`" \ + LIBS="-lsecur32 `'$(TARGET)-pkg-config' openssl pthreads --libs`" \ ac_cv_func_getaddrinfo=no - $(MAKE) -C '$(1)'/src/interfaces/libpq -j '$(JOBS)' install + + # enable_thread_safety means "build internal pthreads" on windows + # disable it and link mingw-w64 pthreads to and avoid name conflicts + $(MAKE) -C '$(1)'/src/interfaces/libpq -j '$(JOBS)' \ + install \ + enable_thread_safety=no \ + PTHREAD_LIBS="`'$(TARGET)-pkg-config' pthreads --libs`" $(MAKE) -C '$(1)'/src/port -j '$(JOBS)' $(MAKE) -C '$(1)'/src/bin/psql -j '$(JOBS)' install $(INSTALL) -m644 '$(1)/src/include/pg_config.h' '$(PREFIX)/$(TARGET)/include/' diff --git a/src/primesieve.mk b/src/primesieve.mk index b42e594e..c48e9936 100644 --- a/src/primesieve.mk +++ b/src/primesieve.mk @@ -1,13 +1,14 @@ -# 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 := primesieve +$(PKG)_WEBSITE := http://primesieve.org/ +$(PKG)_DESCR := Primesieve $(PKG)_IGNORE := -$(PKG)_VERSION := 5.4.1 -$(PKG)_CHECKSUM := e6cb1eee915ff50dbd01ed9c6f13324cde16002c7ac49bf29feea07e0f348fc5 +$(PKG)_VERSION := 5.5.0 +$(PKG)_CHECKSUM := f0f818902967ce7c911c330c578a52ec62dbbd9b12a68b8d3a3bc79b601e52b0 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://dl.bintray.com/kimwalisch/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://dl.bintray.com/kimwalisch/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE @@ -24,7 +25,7 @@ define $(PKG)_BUILD $(MAKE) -C '$(1)' -j '$(JOBS)' install $(MXE_DISABLE_CRUFT) $(TARGET)-g++ -s -std=c++0x -fopenmp -o '$(1)/examples/test-primesieve.exe' \ - '$(1)/examples/count_primes.cpp' \ + '$(1)/examples/cpp/count_primes.cpp' \ '-lprimesieve' $(INSTALL) -m755 '$(1)/examples/test-primesieve.exe' '$(PREFIX)/$(TARGET)/bin/' diff --git a/src/proj.mk b/src/proj.mk index ae53d099..407b2685 100644 --- a/src/proj.mk +++ b/src/proj.mk @@ -1,10 +1,10 @@ -# 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 := proj +$(PKG)_WEBSITE := https://trac.osgeo.org/proj/ $(PKG)_IGNORE := -$(PKG)_VERSION := 4.8.0 -$(PKG)_CHECKSUM := 2db2dbf0fece8d9880679154e0d6d1ce7c694dd8e08b4d091028093d87a9d1b5 +$(PKG)_VERSION := 4.9.3 +$(PKG)_CHECKSUM := 6984542fea333488de5c82eea58d699e4aff4b359200a9971537cd7e047185f7 $(PKG)_SUBDIR := proj-$($(PKG)_VERSION) $(PKG)_FILE := proj-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://download.osgeo.org/proj/$($(PKG)_FILE) @@ -12,7 +12,7 @@ $(PKG)_URL_2 := ftp://ftp.remotesensing.org/proj/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://trac.osgeo.org/proj/' | \ + $(WGET) -q -O- 'https://trac.osgeo.org/proj/' | \ $(SED) -n 's,.*proj-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef diff --git a/src/protobuf.mk b/src/protobuf.mk index eeabc2c8..6f733026 100644 --- a/src/protobuf.mk +++ b/src/protobuf.mk @@ -1,39 +1,41 @@ -# 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 := protobuf +$(PKG)_WEBSITE := https://github.com/google/protobuf $(PKG)_IGNORE := -$(PKG)_VERSION := 2.5.0 -$(PKG)_CHECKSUM := 13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677 +$(PKG)_VERSION := 3.2.0 +$(PKG)_CHECKSUM := 2a25c2b71c707c5552ec9afdfb22532a93a339e1ca5d38f163fe4107af08c54c $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) -$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://protobuf.googlecode.com/files/$($(PKG)_FILE) -$(PKG)_DEPS := gcc zlib +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://github.com/google/$(PKG)/archive/v$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := gcc googlemock googletest zlib +$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) +$(PKG)_DEPS_$(BUILD) := googlemock googletest define $(PKG)_UPDATE - $(WGET) -q -O- 'http://code.google.com/p/protobuf/downloads/list?sort=-uploaded' | \ - $(SED) -n 's,.*protobuf-\([0-9][^<]*\)\.tar.*,\1,p' | \ - grep -v 'rc' | \ - head -1 + $(call MXE_GET_GITHUB_TAGS, google/protobuf, v) endef define $(PKG)_BUILD -# First step: Build for host system in order to create "protoc" binary. - cd '$(1)' && ./configure \ - --disable-shared - $(MAKE) -C '$(1)' -j '$(JOBS)' - cp '$(1)/src/protoc' '$(PREFIX)/bin/$(TARGET)-protoc' - $(MAKE) -C '$(1)' -j 1 distclean -# Second step: Build for target system. - cd '$(1)' && ./configure \ - $(MXE_CONFIGURE_OPTS) \ - --with-zlib \ - --with-protoc='$(PREFIX)/bin/$(TARGET)-protoc' - $(MAKE) -C '$(1)' -j '$(JOBS)' - $(MAKE) -C '$(1)' -j 1 install + $(call PREPARE_PKG_SOURCE,googlemock,$(SOURCE_DIR)) + cd '$(SOURCE_DIR)' && mv '$(googlemock_SUBDIR)' gmock + $(call PREPARE_PKG_SOURCE,googletest,$(SOURCE_DIR)) + cd '$(SOURCE_DIR)' && mv '$(googletest_SUBDIR)' gmock/gtest + cd '$(SOURCE_DIR)' && ./autogen.sh - '$(TARGET)-g++' \ - -W -Wall -Werror -ansi -pedantic \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-protobuf.exe' \ - `'$(TARGET)-pkg-config' protobuf --cflags --libs` + cd '$(BUILD_DIR)' && '$(SOURCE_DIR)'/configure \ + $(MXE_CONFIGURE_OPTS) \ + $(if $(BUILD_CROSS), \ + --with-zlib \ + --with-protoc='$(PREFIX)/$(BUILD)/bin/protoc' \ + ) + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install + + $(if $(BUILD_CROSS), + '$(TARGET)-g++' \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-protobuf.exe' \ + `'$(TARGET)-pkg-config' protobuf --cflags --libs` + ) endef diff --git a/src/pthreads-libgomp-test.c b/src/pthreads-libgomp-test.c index 20068e69..4dfc9e53 100644 --- a/src/pthreads-libgomp-test.c +++ b/src/pthreads-libgomp-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <omp.h> diff --git a/src/pthreads-test.c b/src/pthreads-test.c index 797c64a1..c643a7b5 100644 --- a/src/pthreads-test.c +++ b/src/pthreads-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <stdio.h> diff --git a/src/pthreads-test.cmake b/src/pthreads-test.cmake index f818d909..dbdc700b 100644 --- a/src/pthreads-test.cmake +++ b/src/pthreads-test.cmake @@ -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. # partial module - included by src/cmake/CMakeLists.txt diff --git a/src/pthreads.mk b/src/pthreads.mk index e8b1a89c..297ea761 100644 --- a/src/pthreads.mk +++ b/src/pthreads.mk @@ -1,17 +1,14 @@ -# This file is part of MXE. -# See index.html for further information. +# This file is part of MXE. See LICENSE.md for licensing information. # Runtimes can/will have different implementations, # but the pre-requisite package and test are the same. PKG := pthreads +$(PKG)_WEBSITE := https://en.wikipedia.org/wiki/POSIX_Threads +$(PKG)_DESCR := POSIX Threads $(PKG)_VERSION := POSIX 1003.1-2001 $(PKG)_DEPS := gcc -define $(PKG)_UPDATE - echo $(pthreads_VERSION) -endef - define $(PKG)_BUILD # install and test pkg-config $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' diff --git a/src/qca-1-fixes.patch b/src/qca-1-fixes.patch new file mode 100644 index 00000000..ee431684 --- /dev/null +++ b/src/qca-1-fixes.patch @@ -0,0 +1,23 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +Contains ad hoc patches for cross building. + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Sun, 26 Mar 2017 12:36:55 +1100 +Subject: [PATCH] qca: add INSTAL_PKGCONFIG option + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1111111..2222222 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -233,7 +233,7 @@ foreach(PATH QCA_PLUGINS_INSTALL_DIR + endif() + endforeach() + +-if(NOT WIN32) ++if(NOT WIN32 OR INSTAL_PKGCONFIG) + if(OSX_FRAMEWORK) + set(PKGCONFIG_CFLAGS "-F\${libdir} -I\${includedir}") + set(PKGCONFIG_LIBS "-F\${libdir} -framework ${QCA_LIB_NAME}") diff --git a/src/qca-test.cmake b/src/qca-test.cmake new file mode 100644 index 00000000..00f9d2d2 --- /dev/null +++ b/src/qca-test.cmake @@ -0,0 +1,21 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +# partial module - included by src/cmake/CMakeLists.txt + +set(TGT test-${PKG}-cmake) + +enable_language(CXX) +add_executable(${TGT} ${CMAKE_CURRENT_LIST_DIR}/${PKG}-test.cpp) + +find_package(Qt5Core REQUIRED) +find_package(Qca-qt5 REQUIRED) + +include_directories (${Qt5Core_INCLUDE_DIRS}) +target_link_libraries(${TGT} Qt5::Core qca-qt5) + +# Statically link QCA plugins when necessary +if(BUILD_STATIC_LIBS) + target_link_libraries(${TGT} qca-ossl) +endif(BUILD_STATIC_LIBS) + +install(TARGETS ${TGT} DESTINATION bin) diff --git a/src/qca-test.cpp b/src/qca-test.cpp new file mode 100644 index 00000000..73a6b5c1 --- /dev/null +++ b/src/qca-test.cpp @@ -0,0 +1,38 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include <QCoreApplication> +#include <QtCrypto> +#include <QDebug> + +#include <iostream> + +#ifdef QT_STATICPLUGIN +#include "import_plugins.h" +#endif + +int main(int argc, char *argv[]) +{ + QCoreApplication a(argc, argv); + QCA::init(); + + QByteArray inputString = "Hello world!"; + if (a.arguments().size() > 1) { + inputString = a.arguments().at(1).toUtf8(); + } + std::cout << "input string:\n" << inputString.toStdString() << "\n\n"; + + // Calculate hashes of a string with all available hashing algorithms: + QByteArray outputString; + for (const QString &hastType : QCA::Hash::supportedTypes()) { + QCA::Hash hashObject(hastType); + hashObject.update(inputString); + outputString = hashObject.final().toByteArray().toHex(); + + std::cout << hastType.toStdString() << " hash:\n" + << outputString.toStdString() << "\n\n"; + } + + return 0; +} diff --git a/src/qca-test.pro b/src/qca-test.pro new file mode 100644 index 00000000..f11c34ad --- /dev/null +++ b/src/qca-test.pro @@ -0,0 +1,11 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +TEMPLATE = app +TARGET = test-qca-qmake +SOURCES += qca-test.cpp +CONFIG += crypto console +QMAKE_CXXFLAGS += -Wall -Werror + +# For static linking: +LIBS += -L$$[QT_INSTALL_PLUGINS]/crypto -lqca-ossl + diff --git a/src/qca.mk b/src/qca.mk new file mode 100644 index 00000000..1c3687cb --- /dev/null +++ b/src/qca.mk @@ -0,0 +1,45 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := qca +$(PKG)_WEBSITE := https://userbase.kde.org/QCA +$(PKG)_DESCR := Qt Cryptographic Architecture +$(PKG)_IGNORE := +$(PKG)_VERSION := 2.1.3 +$(PKG)_CHECKSUM := a5135ffb0250a40e9c361eb10cd3fe28293f0cf4e5c69d3761481eafd7968067 +$(PKG)_GH_CONF := KDE/qca,v +$(PKG)_DEPS := gcc qtbase + +define $(PKG)_BUILD + cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \ + -DBUILD_TESTS=OFF \ + -DBUILD_TOOLS=OFF \ + -DUSE_RELATIVE_PATHS=OFF \ + -DBUILD_PLUGINS="auto" \ + -DINSTAL_PKGCONFIG=ON \ + -DQCA_MAN_INSTALL_DIR="$(BUILD_DIR)/null" + $(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) + $(MAKE) -C '$(BUILD_DIR)' -j 1 install + + # build test as qmake project + mkdir '$(BUILD_DIR).test-qmake' + cd '$(BUILD_DIR).test-qmake' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' '$(PWD)/src/qca-test.pro' + $(MAKE) -C '$(BUILD_DIR).test-qmake' -j 1 + $(INSTALL) -m755 '$(BUILD_DIR).test-qmake/$(BUILD_TYPE)/test-qca-qmake.exe' '$(PREFIX)/$(TARGET)/bin/' + + # build test as cmake project + mkdir '$(BUILD_DIR).test-cmake' + cd '$(BUILD_DIR).test-cmake' && $(TARGET)-cmake \ + -DPKG=$(PKG) \ + '$(PWD)/src/cmake/test' + $(MAKE) -C '$(BUILD_DIR).test-cmake' -j 1 install VERBOSE=ON + + # build test manually + '$(TARGET)-g++' \ + -W -Wall -Werror -std=gnu++11 \ + '$(PWD)/src/qca-test.cpp' \ + -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG)-pkgconfig.exe' \ + $(if $(BUILD_STATIC), -L'$(PREFIX)/$(TARGET)/qt5/plugins/crypto' -lqca-ossl) \ + `'$(TARGET)-pkg-config' qca2-qt5 --cflags --libs` +endef + +$(PKG)_BUILD_STATIC = diff --git a/src/qdbm-test.c b/src/qdbm-test.c index 50b5b924..e7c071a0 100644 --- a/src/qdbm-test.c +++ b/src/qdbm-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. * * Taken from examples at http://fallabs.com/qdbm/spex.html */ diff --git a/src/qdbm.mk b/src/qdbm.mk index 933ca886..8a11e7f2 100644 --- a/src/qdbm.mk +++ b/src/qdbm.mk @@ -1,7 +1,8 @@ -# 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 := qdbm +$(PKG)_WEBSITE := http://fallabs.com/qdbm/ +$(PKG)_DESCR := QDBM $(PKG)_IGNORE := $(PKG)_VERSION := 1.8.78 $(PKG)_CHECKSUM := b466fe730d751e4bfc5900d1f37b0fb955f2826ac456e70012785e012cdcb73e @@ -44,7 +45,7 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-qdbm.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-qdbm.exe' \ `'$(TARGET)-pkg-config' qdbm --cflags --libs` endef diff --git a/src/qhttpengine-1-decrease-required-cmake-ver.patch b/src/qhttpengine-1-decrease-required-cmake-ver.patch deleted file mode 100644 index 25ab5c91..00000000 --- a/src/qhttpengine-1-decrease-required-cmake-ver.patch +++ /dev/null @@ -1,51 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From ecc6fd682b2bef9aca06ce3f8ac3e6178faf4640 Mon Sep 17 00:00:00 2001 -From: Boris Nagaev <bnagaev@gmail.com> -Date: Sun, 6 Sep 2015 03:45:19 +0200 -Subject: [PATCH] decrease required cmake ver. - -2.8.11 -> 2.8.9 - -Debian Wheezy has CMake version 2.8.9 - -To make it possible, CMake command target_include_directories -was replaced with command include_directories. ---- - CMakeLists.txt | 2 +- - src/CMakeLists.txt | 8 +++----- - 2 files changed, 4 insertions(+), 6 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ec32cd8..0e7ba11 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -1,4 +1,4 @@ --cmake_minimum_required(VERSION 2.8.11) -+cmake_minimum_required(VERSION 2.8.9) - project(QHttpEngine) - - if(NOT (CMAKE_MAJOR_VERSION VERSION_LESS 3)) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 83f9a4c..0313dc3 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -28,11 +28,9 @@ endif() - - qt5_use_modules(QHttpEngine Network) - --target_include_directories(QHttpEngine PUBLIC -- "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>" -- "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>" -- "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>" --) -+include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -+include_directories(${CMAKE_CURRENT_BINARY_DIR}) -+include_directories(${INCLUDE_INSTALL_DIR}) - - set_target_properties(QHttpEngine PROPERTIES - DEFINE_SYMBOL QT_NO_SIGNALS_SLOTS_KEYWORDS --- -1.7.10.4 - diff --git a/src/qhttpengine.mk b/src/qhttpengine.mk index 09a0c352..b4445685 100644 --- a/src/qhttpengine.mk +++ b/src/qhttpengine.mk @@ -1,7 +1,7 @@ -# 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 := qhttpengine +$(PKG)_WEBSITE := https://github.com/nitroshare/qhttpengine $(PKG)_IGNORE := $(PKG)_VERSION := 0.1.0 $(PKG)_CHECKSUM := 6df0e2f303eb5fb80995e0322903c2991b398a0b89fb483dae7c24bdefa1eaf1 @@ -12,9 +12,7 @@ $(PKG)_DEPS := gcc qtbase define $(PKG)_BUILD mkdir '$(1)/build' - cd '$(1)/build' && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -DBUILD_STATIC=$(if $(BUILD_STATIC),ON,OFF) + cd '$(1)/build' && '$(TARGET)-cmake' .. $(MAKE) -C '$(1)/build' -j '$(JOBS)' install endef diff --git a/src/qjson-1-fixes.patch b/src/qjson-1-fixes.patch new file mode 100644 index 00000000..404f54eb --- /dev/null +++ b/src/qjson-1-fixes.patch @@ -0,0 +1,21 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +diff -Naur qjson-0.8.1.orig/CMakeLists.txt qjson-0.8.1/CMakeLists.txt +--- qjson-0.8.1.orig/CMakeLists.txt 2012-11-27 14:06:57.000000000 +0400 ++++ qjson-0.8.1/CMakeLists.txt 2016-02-13 03:00:18.725982532 +0300 +@@ -56,13 +56,13 @@ + set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib" ) + + # pkg-config +-IF (NOT WIN32) ++#IF (NOT WIN32) + CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR}/QJson.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/QJson.pc + @ONLY) + INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/QJson.pc + DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) +-ENDIF (NOT WIN32) ++#ENDIF (NOT WIN32) + + # Subdirs + ADD_SUBDIRECTORY(src) diff --git a/src/qjson-1-static.patch b/src/qjson-1-static.patch index 54377a73..1fa90084 100644 --- a/src/qjson-1-static.patch +++ b/src/qjson-1-static.patch @@ -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 d456ebfe73b1a06beb8423c94f3b01edb6bc7507 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> diff --git a/src/qjson-test.cpp b/src/qjson-test.cpp new file mode 100644 index 00000000..78c218b3 --- /dev/null +++ b/src/qjson-test.cpp @@ -0,0 +1,7 @@ +#include <qjson/parser.h> + +int main() +{ + QJson::Parser p; + return 0; +} diff --git a/src/qjson.mk b/src/qjson.mk index 76e2659e..40f16eb8 100644 --- a/src/qjson.mk +++ b/src/qjson.mk @@ -1,25 +1,30 @@ -# 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 := qjson +$(PKG)_WEBSITE := https://qjson.sourceforge.io/ +$(PKG)_DESCR := QJson $(PKG)_IGNORE := $(PKG)_VERSION := 0.8.1 $(PKG)_CHECKSUM := cd4db5b956247c4991a9c3e95512da257cd2a6bd011357e363d02300afc814d9 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc qt define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/qjson/files/qjson/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/qjson/files/qjson/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef define $(PKG)_BUILD mkdir '$(1)/build' - cd '$(1)/build' && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' + cd '$(1)/build' && '$(TARGET)-cmake' .. $(MAKE) -C '$(1)/build' -j '$(JOBS)' install + + '$(TARGET)-g++' \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' QJson --cflags --libs` endef diff --git a/src/qscintilla2-test.cpp b/src/qscintilla2-test.cpp index 287dda57..2e2fc7df 100644 --- a/src/qscintilla2-test.cpp +++ b/src/qscintilla2-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <QString> diff --git a/src/qscintilla2.mk b/src/qscintilla2.mk index 9013a0e3..8871fcfb 100644 --- a/src/qscintilla2.mk +++ b/src/qscintilla2.mk @@ -1,18 +1,19 @@ -# 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 := qscintilla2 +$(PKG)_WEBSITE := https://www.riverbankcomputing.com/software/qscintilla/intro +$(PKG)_DESCR := QScintilla2 $(PKG)_IGNORE := $(PKG)_VERSION := 2.8.4 $(PKG)_CHECKSUM := 9b7b2d7440cc39736bbe937b853506b3bd218af3b79095d4f710cccb0fabe80f $(PKG)_SUBDIR := QScintilla-gpl-$($(PKG)_VERSION) $(PKG)_FILE := QScintilla-gpl-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/pyqt/QScintilla2/QScintilla-$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/pyqt/QScintilla2/QScintilla-$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc qtbase define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.riverbankcomputing.com/software/qscintilla/download' | \ + $(WGET) -q -O- 'https://www.riverbankcomputing.com/software/qscintilla/download' | \ grep QScintilla-gpl | \ head -n 1 | \ $(SED) -n 's,.*QScintilla-gpl-\([0-9][^>]*\)\.zip.*,\1,p' @@ -26,6 +27,6 @@ define $(PKG)_BUILD '$(TARGET)-g++' \ -W -Wall -Werror -std=c++0x -pedantic \ `'$(TARGET)-pkg-config' Qt5Widgets --cflags` \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-qscintilla2.exe' -lqscintilla2 \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-qscintilla2.exe' -lqscintilla2 \ `'$(TARGET)-pkg-config' Qt5Widgets --libs` endef diff --git a/src/qt-1-cherrypicks.patch b/src/qt-1-cherrypicks.patch index 35cd61b1..19039e79 100644 --- a/src/qt-1-cherrypicks.patch +++ b/src/qt-1-cherrypicks.patch @@ -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 71fbc365fe7bbdaaac533599970e5da6058c0d01 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> @@ -80669,3 +80668,70 @@ index dee735b..14cf433 100755 -- 2.1.4 + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: James McDonnell <jmcdonnell@qnx.com> +Date: Thu, 14 Apr 2016 16:48:15 -0400 +Subject: [PATCH] Ensure -no-pch is effective + +Have configure add a "CONFIG -= precompile_header" to qmodule.pri when + -no-pch is specified. Ensures that Qt is built without precompiled +headers (as requested) even if allowing precompiled header use is the +default for the toolchain. + +Parallels changes to Windows configure. + +Task-number: QTBUG-11545 +Change-Id: Iab4021e74c4e9978770e917dff97b976c449dd8b +Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> + +The patch was backported from Qt 5.7.0 +Commit in qtbase git: 7c1326a1c390bb15eaa164f748c947f1df9f542d + +diff --git a/configure b/configure +index 1111111..2222222 100755 +--- a/configure ++++ b/configure +@@ -64,6 +64,7 @@ fi + OPT_CMDLINE=`echo $@ | sed "s,-v ,,g; s,-v$,,g"` + + # initialize global variables ++CONFIG_SEPARATORS=`printf ' \t'` + QMAKE_SWITCHES= + QMAKE_VARS= + QMAKE_CONFIG= +@@ -201,6 +202,21 @@ getXQMakeConf() + getQMakeConf3 "$1" "$xspecvals" + } + ++testXConfig() ++{ ++ # Put a space on each end of the CONFIG value so that searching for the ++ # target with whitespace on either side will work even when it's the ++ # first/last/only item in the CONFIG value. ++ case \ `getXQMakeConf CONFIG`\ in ++ *[${CONFIG_SEPARATORS}]$1[${CONFIG_SEPARATORS}]*) ++ return 0 ++ ;; ++ *) ++ return 1 ++ ;; ++ esac ++} ++ + compilerSupportsFlag() + { + cat >conftest.cpp <<EOF +@@ -7410,7 +7426,11 @@ fi + [ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports" + [ "$CFG_STACK_PROTECTOR_STRONG" = "yes" ] && QT_CONFIG="$QT_CONFIG stack-protector-strong" + [ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations" +-[ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header" ++if testXConfig precompile_header; then ++ [ "$CFG_PRECOMPILE" = "no" ] && QMakeVar del CONFIG precompile_header ++else ++ [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header" ++fi + if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then + QMakeVar add QMAKE_CFLAGS -g + QMakeVar add QMAKE_CXXFLAGS -g diff --git a/src/qt-test.cmake b/src/qt-test.cmake index 7297f77d..2bc7bd4d 100644 --- a/src/qt-test.cmake +++ b/src/qt-test.cmake @@ -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. # partial module - included by src/cmake/CMakeLists.txt diff --git a/src/qt-test.cpp b/src/qt-test.cpp index 20794cff..8e23cd25 100644 --- a/src/qt-test.cpp +++ b/src/qt-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <QApplication> diff --git a/src/qt-test.pro b/src/qt-test.pro index fd4f55b7..7720dcb7 100644 --- a/src/qt-test.pro +++ b/src/qt-test.pro @@ -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. TEMPLATE = app greaterThan(QT_MAJOR_VERSION, 4): TARGET = test-qt5 else: TARGET = test-qt diff --git a/src/qt-test.ui b/src/qt-test.ui index ee5417ac..5067ddf6 100644 --- a/src/qt-test.ui +++ b/src/qt-test.ui @@ -1,8 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - This file is part of MXE. - See index.html for further information. + This file is part of MXE. See LICENSE.md for licensing information. --> <ui version="4.0"> diff --git a/src/qt.mk b/src/qt.mk index 71536feb..86754e03 100644 --- a/src/qt.mk +++ b/src/qt.mk @@ -1,17 +1,18 @@ -# 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 := qt +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION := 4.8.7 $(PKG)_CHECKSUM := e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 $(PKG)_SUBDIR := $(PKG)-everywhere-opensource-src-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-everywhere-opensource-src-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://download.qt.io/official_releases/qt/4.8/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://download.qt.io/official_releases/qt/4.8/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc dbus freetds jpeg libmng libpng openssl postgresql sqlite tiff zlib define $(PKG)_UPDATE - $(WGET) -q -O- http://download.qt-project.org/official_releases/qt/4.8/ | \ + $(WGET) -q -O- https://download.qt.io/official_releases/qt/4.8/ | \ $(SED) -n 's,.*href="\(4\.[0-9]\.[^/]*\)/".*,\1,p' | \ grep -iv -- '-rc' | \ $(SORT) -V | \ @@ -22,8 +23,9 @@ define $(PKG)_BUILD cd '$(1)' && QTDIR='$(1)' ./bin/syncqt cd '$(1)' && \ OPENSSL_LIBS="`'$(TARGET)-pkg-config' --libs-only-l openssl`" \ - PSQL_LIBS="-lpq -lsecur32 `'$(TARGET)-pkg-config' --libs-only-l openssl` -lws2_32" \ + PSQL_LIBS="-lpq -lsecur32 `'$(TARGET)-pkg-config' --libs-only-l openssl pthreads` -lws2_32" \ SYBASE_LIBS="-lsybdb `'$(TARGET)-pkg-config' --libs-only-l gnutls` -liconv -lws2_32" \ + CXXFLAGS="-std=gnu++98" \ ./configure \ -opensource \ -confirm-license \ @@ -65,16 +67,24 @@ define $(PKG)_BUILD -system-sqlite \ -openssl-linked \ -dbus-linked \ - -v + -no-pch \ + -v \ + $($(PKG)_CONFIGURE_OPTS) $(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 + # symlink mkspecs/default if it isn't already + # required on OSX to mimic linux installation + [[ -L '$(PREFIX)/$(TARGET)/qt/mkspecs/default' ]] || \ + rm -rf '$(PREFIX)/$(TARGET)/qt/mkspecs/default' && \ + ln -s '$(PREFIX)/$(TARGET)/qt/mkspecs/win32-g++-4.6' \ + '$(PREFIX)/$(TARGET)/qt/mkspecs/default' + # lrelease (from linguist) needed to prepare translation files $(MAKE) -C '$(1)/tools/linguist/lrelease' -j '$(JOBS)' install - ln -fs '$(PREFIX)/$(TARGET)/bin/lrelease' '$(PREFIX)/bin/$(TARGET)-lrelease' cd '$(1)/tools/assistant' && '$(1)/bin/qmake' assistant.pro # can't figure out where -lQtCLucene comes from so use @@ -96,7 +106,7 @@ define $(PKG)_BUILD $(MAKE) -C '$(1)/tools/qdbus' -j '$(JOBS)' install mkdir '$(1)/test-qt' - cd '$(1)/test-qt' && '$(PREFIX)/$(TARGET)/qt/bin/qmake' '$(PWD)/$(2).pro' + 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/' diff --git a/src/qt3d-1.patch b/src/qt3d-1.patch deleted file mode 100644 index bc704d5d..00000000 --- a/src/qt3d-1.patch +++ /dev/null @@ -1,38 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From f38bd703f75e6cdf234ed8e99560bd65e4f775ea Mon Sep 17 00:00:00 2001 -From: Mark Brand <mabrand@mabrand.nl> -Date: Fri, 17 Oct 2014 22:30:46 +0200 -Subject: [PATCH] fix static linking - - -diff --git a/src/quick3d/quick3d.pro b/src/quick3d/quick3d.pro -index 03cdd28..5b8e2ef 100644 ---- a/src/quick3d/quick3d.pro -+++ b/src/quick3d/quick3d.pro -@@ -9,7 +9,7 @@ gcov { - CONFIG += static - QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage - QMAKE_LFLAGS += -fprofile-arcs -ftest-coverage --} else { -+} else:!static { - CONFIG += dll - } - -diff --git a/src/threed/threed.pro b/src/threed/threed.pro -index cb5f1d1..8d2be9b 100644 ---- a/src/threed/threed.pro -+++ b/src/threed/threed.pro -@@ -11,7 +11,7 @@ gcov { - CONFIG += static - QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage - QMAKE_LFLAGS += -fprofile-arcs -ftest-coverage --} else { -+} else:!static { - CONFIG += dll - } - --- -1.8.4.5 - diff --git a/src/qt3d.mk b/src/qt3d.mk index 22883562..b9938ba2 100644 --- a/src/qt3d.mk +++ b/src/qt3d.mk @@ -1,20 +1,22 @@ -# 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 := qt3d +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := -$(PKG)_VERSION := bcdbf04b74cc7ded4d7b2471347f51b54ff8584b -$(PKG)_CHECKSUM := 7e5e553f0132bc801f11f318f58b4fe3b8b1fd930f4acc23e97757fb6c76049c -$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) -$(PKG)_FILE := qt-$(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := https://github.com/qtproject/qt3d/archive/$($(PKG)_VERSION).tar.gz +$(PKG)_VERSION = $(qtbase_VERSION) +$(PKG)_CHECKSUM := 9efbef578afb31556a20baccf70137858b975c38cad60ca4d6b163bd35381ba9 +$(PKG)_SUBDIR = $(subst qtbase,qt3d,$(qtbase_SUBDIR)) +$(PKG)_FILE = $(subst qtbase,qt3d,$(qtbase_FILE)) +$(PKG)_URL = $(subst qtbase,qt3d,$(qtbase_URL)) $(PKG)_DEPS := gcc qtbase qtdeclarative -$(PKG)_UPDATE = $(call MXE_GET_GITHUB_SHA, qtproject/qt3d, master) +define $(PKG)_UPDATE + echo $(qtbase_VERSION) +endef define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG+=git_build CONFIG-='debug debug_and_release' - $(MAKE) -C '$(1)' -j '$(JOBS)' + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' + $(MAKE) -C '$(1)' -j '$(JOBS)' || $(MAKE) -C '$(1)' -j 1 $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/qt5.mk b/src/qt5.mk index 570c4226..3c7bf024 100644 --- a/src/qt5.mk +++ b/src/qt5.mk @@ -1,10 +1,10 @@ -# 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 := qt5 +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_UPDATE = echo $(qtbase_VERSION) $(PKG)_DEPS := $(patsubst $(TOP_DIR)/src/%.mk,%,\ - $(shell grep -l 'DEPS.*qtbase' \ + $(shell grep -l 'qtbase_VERSION' \ $(TOP_DIR)/src/qt*.mk \ --exclude '$(TOP_DIR)/src/qt5.mk')) diff --git a/src/qtactiveqt-1.patch b/src/qtactiveqt-1.patch index f12aeb75..d8d72b29 100644 --- a/src/qtactiveqt-1.patch +++ b/src/qtactiveqt-1.patch @@ -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 72357fef95ee2247f79032b2096b3c23938882d5 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> diff --git a/src/qtactiveqt.mk b/src/qtactiveqt.mk index a7039fee..dd542ec1 100644 --- a/src/qtactiveqt.mk +++ b/src/qtactiveqt.mk @@ -1,10 +1,11 @@ -# 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 := qtactiveqt +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := 753c734183f33066030667101361f347ecca1445bc1bfe846e49f577a42cbf25 +$(PKG)_CHECKSUM := d7c7babf1510e0728e80a786fe9d83f6cb931813005d05c85873929207261635 $(PKG)_SUBDIR = $(subst qtbase,qtactiveqt,$(qtbase_SUBDIR)) $(PKG)_FILE = $(subst qtbase,qtactiveqt,$(qtbase_FILE)) $(PKG)_URL = $(subst qtbase,qtactiveqt,$(qtbase_URL)) @@ -15,9 +16,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/qtbase-1-fixes.patch b/src/qtbase-1-fixes.patch new file mode 100644 index 00000000..32891ecd --- /dev/null +++ b/src/qtbase-1-fixes.patch @@ -0,0 +1,195 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +From cebc5ce4d7497007b4df6129cc7a3e7fa1eb2567 Mon Sep 17 00:00:00 2001 +From: Ray Donnelly <mingw.android@gmail.com> +Date: Wed, 26 Aug 2015 12:45:43 +0100 +Subject: [PATCH 1/5] cmake: Rearrange STATIC vs INTERFACE targets + +Otherwise we attempt to add_library(Qt5::UiPlugin STATIC IMPORTED) +for header-only modules when building Qt5 statically. + +Source: https://git.io/vzWJz +See also: https://github.com/mxe/mxe/issues/1185 + +diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +index 4f342d67d7a..28cd405c1a5 100644 +--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in ++++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +@@ -224,13 +224,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + endif() + !!ENDIF + ++!!IF equals(TEMPLATE, aux) ++ add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) ++!!ELSE + !!IF !isEmpty(CMAKE_STATIC_TYPE) + add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED) + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX") + !!ELSE +-!!IF equals(TEMPLATE, aux) +- add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED) +-!!ELSE + add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED) + !!ENDIF + !!ENDIF +-- +2.11.0 + + +From 84a904fbfe966a83d5a6a025828075465a53d6d3 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Sat, 16 Jul 2016 20:31:07 +1000 +Subject: [PATCH 2/5] Fix pkgconfig file and library naming + +See: https://codereview.qt-project.org/#/c/165394/ + https://bugreports.qt.io/browse/QTBUG-30898 + +Currently, *.pc files are generated with debug suffix `d` in `-release` +mode and without the suffix in `-debug` or `-debug-and-release`. This +can be worked around by `CONIFG-=debug_and_release`, however, a more +predictable and consistent naming approach would be preferable. + +This change mimics the *.prl file and lib conventions: + + -release: creates normal *.pc files and lib names + -release -force-debug-info: normal as above + -debug: creates *d.pc and *d lib names + -debug-and-release: creates both + -default: creates both (default link: debug) + +and should be unsurprising to users of `pkg-config`. At very least, +it's deterministic and easily incorporated into build systems. + +Task-number: 30898 +Change-Id: If75336ec7d21a7ec0cb6d245fe87c64afcb5a644 + +diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf +index 36f632e8caa..b07085ac429 100644 +--- a/mkspecs/features/qt_module.prf ++++ b/mkspecs/features/qt_module.prf +@@ -263,6 +263,10 @@ load(qt_installs) + + load(qt_targets) + ++# Set TARGET towards the end but before pkgconfig setup to keep naming ++# conventions consistent with *prl files ++TARGET = $$qt5LibraryTarget($$TARGET$$QT_LIBINFIX) ++ + # this builds on top of qt_common + !internal_module:!lib_bundle:if(unix|mingw) { + CONFIG += create_pc +@@ -273,12 +277,12 @@ load(qt_targets) + QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS/raw] + QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw] + QMAKE_PKGCONFIG_CFLAGS = -I${includedir}/$$MODULE_INCNAME +- QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$QT_MAJOR_VERSION ") +- QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION) ++ QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt$$QT_MAJOR_VERSION, "Qt$$QT_MAJOR_VERSION ") ++ QMAKE_PKGCONFIG_FILE = $$TARGET + for(i, MODULE_DEPENDS): \ +- QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0)) ++ QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0))$$qtPlatformTargetSuffix() + isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \ +- QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module ++ QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt$$QT_MAJOR_VERSION, "Qt ") module + pclib_replace.match = $$lib_replace.match + !isEmpty(lib_replace.replace): \ + pclib_replace.replace = $$QMAKE_PKGCONFIG_LIBDIR +@@ -312,5 +316,3 @@ win32 { + # On other platforms, Qt's own compilation goes needs to compile the Qt 5.0 API + DEFINES *= QT_DISABLE_DEPRECATED_BEFORE=0x050000 + } +- +-TARGET = $$qt5LibraryTarget($$TARGET$$QT_LIBINFIX) # Do this towards the end +-- +2.11.0 + + +From 7608e9aee345980061fcbf83b3623035fbde5c81 Mon Sep 17 00:00:00 2001 +From: Mark Brand <mabrand@mabrand.nl> +Date: Sun, 29 Jan 2017 13:02:16 +0100 +Subject: [PATCH 3/5] reenable fontconfig for win32 (MXE-specific) + +Change-Id: I05b036366bd402e43309742412bcf8ca91fe125f + +diff --git a/src/gui/configure.json b/src/gui/configure.json +index 73e59a7ad9d..eb7c9230a3b 100644 +--- a/src/gui/configure.json ++++ b/src/gui/configure.json +@@ -479,7 +479,7 @@ + }, + "fontconfig": { + "label": "Fontconfig", +- "condition": "!config.win32 && !config.darwin && features.system-freetype && libs.fontconfig", ++ "condition": "!config.darwin && features.system-freetype && libs.fontconfig", + "output": [ "privateFeature", "feature" ] + }, + "gbm": { +diff --git a/src/plugins/platforms/minimal/qminimalintegration.cpp b/src/plugins/platforms/minimal/qminimalintegration.cpp +index ca33689cd72..194523eee00 100644 +--- a/src/plugins/platforms/minimal/qminimalintegration.cpp ++++ b/src/plugins/platforms/minimal/qminimalintegration.cpp +@@ -130,7 +130,11 @@ QPlatformFontDatabase *QMinimalIntegration::fontDatabase() const + { + if (!m_fontDatabase && (m_options & EnableFonts)) { + #if QT_CONFIG(fontconfig) ++#ifdef Q_OS_WIN ++ m_fontDatabase = new QFreeTypeFontDatabase; ++#else + m_fontDatabase = new QGenericUnixFontDatabase; ++#endif + #elif defined(Q_OS_WINRT) + m_fontDatabase = new QWinRTFontDatabase; + #elif defined(Q_OS_WIN) +-- +2.11.0 + + +From 2b35f94bc2613e0723f7b2bec21f5dbe20213f41 Mon Sep 17 00:00:00 2001 +From: Mark Brand <mabrand@mabrand.nl> +Date: Sun, 29 Jan 2017 16:22:03 +0100 +Subject: [PATCH 4/5] fix treatment of SYBASE_LIBS + +Change-Id: I4c9914cf7ef9d91feb0718a57f2551c1eeed47e0 + +diff --git a/src/sql/configure.pri b/src/sql/configure.pri +index 05794582e9e..15a78f68f3a 100644 +--- a/src/sql/configure.pri ++++ b/src/sql/configure.pri +@@ -89,7 +89,7 @@ defineTest(qtConfLibrary_sybaseEnv) { + libs += "-L$${sybase}/lib" + libs += $$getenv(SYBASE_LIBS) + !isEmpty(libs) { +- $${1}.libs = "$$val_escape(libs)" ++ $${1}.libs = $$libs + export($${1}.libs) + } + return(true) +-- +2.11.0 + + +From 656dc60fbd347668ae06e943f35ad9143405b76f Mon Sep 17 00:00:00 2001 +From: Mark Brand <mabrand@mabrand.nl> +Date: Sun, 11 Jun 2017 00:27:41 +0200 +Subject: [PATCH 5/5] use pkg-config for harfbuzz + +Change-Id: Ia65cbb90fd180f1bc10ce077a9a8323a48e51421 + +diff --git a/src/gui/configure.json b/src/gui/configure.json +index eb7c9230a3b..9c4560b56b0 100644 +--- a/src/gui/configure.json ++++ b/src/gui/configure.json +@@ -123,7 +123,8 @@ + "label": "HarfBuzz", + "test": "unix/harfbuzz", + "sources": [ +- "-lharfbuzz" ++ { "type": "pkgConfig", "args": "harfbuzz" }, ++ "-lharfbuzz" + ] + }, + "imf": { +-- +2.11.0 + diff --git a/src/qtbase-1.patch b/src/qtbase-1.patch deleted file mode 100644 index df814c50..00000000 --- a/src/qtbase-1.patch +++ /dev/null @@ -1,185 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From b4a1284aa84466a5c757e1efd16a694d128b1038 Mon Sep 17 00:00:00 2001 -From: Mark Brand <mabrand@mabrand.nl> -Date: Thu, 6 Aug 2015 23:35:08 +0200 -Subject: [PATCH 1/6] fix qwindows plugin linking with system-freetype (MXE - specific) - -Change-Id: I8783e3ab2d19011b083dd3c471107298a17293c4 - -diff --git a/src/3rdparty/freetype_dependency.pri b/src/3rdparty/freetype_dependency.pri -index 39280de..e152b0d 100644 ---- a/src/3rdparty/freetype_dependency.pri -+++ b/src/3rdparty/freetype_dependency.pri -@@ -4,4 +4,5 @@ contains(QT_CONFIG, freetype) { - } else:contains(QT_CONFIG, system-freetype) { - # pull in the proper freetype2 include directory - include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri) -+ win32:shared:LIBS_PRIVATE += -lfreetype - } --- -2.1.4 - - -From 217955a3e041e368857a696ebe8b512576d0cead Mon Sep 17 00:00:00 2001 -From: Mark Brand <mabrand@mabrand.nl> -Date: Sat, 21 Jun 2014 13:12:49 +0200 -Subject: [PATCH 2/6] use pkg-config for harfbuzz (MXE specific) - -Change-Id: Id4e4c37d68b63c9f480d72a561d95d4d2a5ded50 - -diff --git a/config.tests/unix/harfbuzz/harfbuzz.pro b/config.tests/unix/harfbuzz/harfbuzz.pro -index 32edd6e..a7f2c28 100644 ---- a/config.tests/unix/harfbuzz/harfbuzz.pro -+++ b/config.tests/unix/harfbuzz/harfbuzz.pro -@@ -1,3 +1,4 @@ - SOURCES = harfbuzz.cpp - CONFIG -= qt dylib --LIBS += -lharfbuzz -+CONFIG += link_pkgconfig -+PKGCONFIG += harfbuzz -diff --git a/src/3rdparty/harfbuzz_dependency.pri b/src/3rdparty/harfbuzz_dependency.pri -index 7443368..c24e684 100644 ---- a/src/3rdparty/harfbuzz_dependency.pri -+++ b/src/3rdparty/harfbuzz_dependency.pri -@@ -2,5 +2,6 @@ contains(QT_CONFIG, harfbuzz) { - INCLUDEPATH += $$PWD/harfbuzz-ng/include - LIBS_PRIVATE += -L$$QT_BUILD_TREE/lib -lqtharfbuzzng$$qtPlatformTargetSuffix() - } else:contains(QT_CONFIG, system-harfbuzz) { -- LIBS_PRIVATE += -lharfbuzz -+ CONFIG += link_pkgconfig -+ PKGCONFIG += harfbuzz - } --- -2.1.4 - - -From 81c61f1cf8a2b8ea01545212081427eed0ab2950 Mon Sep 17 00:00:00 2001 -From: Mark Brand <mabrand@mabrand.nl> -Date: Mon, 8 Dec 2014 14:15:12 +0100 -Subject: [PATCH 3/6] fix oci config test on windows - -Change-Id: If1ce2241682259ca495b0ba68bf18410f8548922 - -diff --git a/config.tests/unix/oci/oci.pro b/config.tests/unix/oci/oci.pro -index 3ffda1d..39b6f3759 100644 ---- a/config.tests/unix/oci/oci.pro -+++ b/config.tests/unix/oci/oci.pro -@@ -1,3 +1,3 @@ - SOURCES = oci.cpp - CONFIG -= qt dylib --LIBS += -lclntsh -+!win32:LIBS += -lclntsh --- -2.1.4 - - -From b656a46abeecfa7ace2e08393b63412e74c62589 Mon Sep 17 00:00:00 2001 -From: Mark Brand <mabrand@mabrand.nl> -Date: Thu, 6 Aug 2015 13:24:56 +0200 -Subject: [PATCH 4/6] configure: don't set QT_NO_SYSTEMSEMAPHORE for Windows - -Change-Id: I53c110ef40e3d14cc49fa23aa5d294611cac2ffa - -diff --git a/configure b/configure -index cea62fb..d6bbcd2 100755 ---- a/configure -+++ b/configure -@@ -4464,7 +4464,7 @@ fi - [ "$XPLATFORM_ANDROID" = "yes" ] && QMakeVar add styles "android" - - # check IPC support --if ! compileTest unix/ipc_sysv "ipc_sysv" ; then -+if [ "$XPLATFORM_MINGW" = "no" ] && ! compileTest unix/ipc_sysv "ipc_sysv" ; then - # SYSV IPC is not supported - check POSIX IPC - if compileTest unix/ipc_posix "ipc_posix" ; then - QCONFIG_FLAGS="$QCONFIG_FLAGS QT_POSIX_IPC" --- -2.1.4 - - -From ae120a60f2f31c911a451036ecd826b4486e2d3f Mon Sep 17 00:00:00 2001 -From: Mark Brand <mabrand@mabrand.nl> -Date: Tue, 6 Oct 2015 09:53:20 +0200 -Subject: [PATCH 5/6] fix building mysql driver under mingw - -Change-Id: I9c4e821d5b3a6919566c6b684cb4916827feb6a9 - -diff --git a/src/sql/drivers/mysql/qsql_mysql.pri b/src/sql/drivers/mysql/qsql_mysql.pri -index 3cfb614..8b7063f 100644 ---- a/src/sql/drivers/mysql/qsql_mysql.pri -+++ b/src/sql/drivers/mysql/qsql_mysql.pri -@@ -4,7 +4,7 @@ SOURCES += $$PWD/qsql_mysql.cpp - QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL - LIBS += $$QT_LFLAGS_MYSQL - --unix { -+if (unix|mingw) { - isEmpty(QT_LFLAGS_MYSQL) { - !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) { - use_libmysqlclient_r:LIBS += -lmysqlclient_r --- -2.1.4 - - -From 9f47024d54abca4590fc1954015d14df40b23755 Mon Sep 17 00:00:00 2001 -From: Boris Nagaev <bnagaev@gmail.com> -Date: Sun, 18 Oct 2015 23:11:28 +0300 -Subject: [PATCH 6/6] configure: fix log corruption with option -v - -This bug occurs if ./configure is called with -v on systems on -which fd proc entries point to the files/devices they are open -on instead of being magic nodes which would basically dup() the -actual fds (e.g., Linux). - -In this case, the command "tee $tty" appends to /dev/stderr, which -may be already opened by the parent process. This breaks the log file. - -Normally, the log file starts with - - This is the Qt Open Source Edition. - ... - -but with `-v` flag it would start with output of awkprog and maybe -some zero bytes. Zero bytes are observed on Debian Wheezy. - - DEFAULT_INCDIRS=... - ... - ^@^@^@^@^@^@^@^@^@^@^@^@... - Done running configuration tests. - ... - -To fix this problem, the output of `...` is saved to a variable, and -then eval'd and echo'd (if -v). - -This solution was found by Tony Theodore. -https://github.com/mxe/mxe/issues/938#issuecomment-149770348 - -Change-Id: Id0c28598890e813774cc92f38ee46a0697b34e77 -Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> -Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> -(cherry picked from commit 45fe3f1cde1e516d1ddccddb5e33ea4316497c36) - -diff --git a/configure b/configure -index d6bbcd2..def691f 100755 ---- a/configure -+++ b/configure -@@ -3571,10 +3571,9 @@ END { - print "DEFAULT_LIBDIRS=\"/lib\n/usr/lib\"\n"; - }' - --unset tty --[ "$OPT_VERBOSE" = "yes" ] && tty=/dev/stderr --eval "`LC_ALL=C $TEST_COMPILER $SYSROOT_FLAG $TEST_COMPILER_CXXFLAGS -xc++ -E -v - < /dev/null 2>&1 > /dev/null | $AWK "$awkprog" | tee $tty`" --unset tty -+awkprog_result=`LC_ALL=C $TEST_COMPILER $SYSROOT_FLAG $TEST_COMPILER_CXXFLAGS -xc++ -E -v - < /dev/null 2>&1 > /dev/null | $AWK "$awkprog"` -+eval "$awkprog_result" -+[ "$OPT_VERBOSE" = "yes" ] && echo "$awkprog_result" - - #setup the build parts - if [ -z "$CFG_BUILD_PARTS" ]; then --- -2.1.4 - diff --git a/src/qtbase.mk b/src/qtbase.mk index f2c6bf21..3302e474 100644 --- a/src/qtbase.mk +++ b/src/qtbase.mk @@ -1,17 +1,18 @@ -# 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 := qtbase +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := -$(PKG)_VERSION := 5.5.1 -$(PKG)_CHECKSUM := dfa4e8a4d7e4c6b69285e7e8833eeecd819987e1bdbe5baa6b6facd4420de916 +$(PKG)_VERSION := 5.9.0 +$(PKG)_CHECKSUM := 267eb2af1a203c087f2113f43b08014d0e2d2cb269295b8602d869a2fad5296c $(PKG)_SUBDIR := $(PKG)-opensource-src-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-opensource-src-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://download.qt.io/official_releases/qt/5.5/$($(PKG)_VERSION)/submodules/$($(PKG)_FILE) -$(PKG)_DEPS := gcc dbus fontconfig freetds freetype harfbuzz jpeg libpng libmysqlclient openssl pcre postgresql sqlite zlib +$(PKG)_URL := https://download.qt.io/official_releases/qt/5.9/$($(PKG)_VERSION)/submodules/$($(PKG)_FILE) +$(PKG)_DEPS := gcc dbus fontconfig freetds freetype harfbuzz jpeg libmysqlclient libpng openssl pcre2 postgresql sqlite zlib define $(PKG)_UPDATE - $(WGET) -q -O- http://download.qt-project.org/official_releases/qt/5.5/ | \ + $(WGET) -q -O- https://download.qt.io/official_releases/qt/5.8/ | \ $(SED) -n 's,.*href="\(5\.[0-9]\.[^/]*\)/".*,\1,p' | \ grep -iv -- '-rc' | \ sort | @@ -22,14 +23,18 @@ define $(PKG)_BUILD # ICU is buggy. See #653. TODO: reenable it some time in the future. cd '$(1)' && \ OPENSSL_LIBS="`'$(TARGET)-pkg-config' --libs-only-l openssl`" \ - PSQL_LIBS="-lpq -lsecur32 `'$(TARGET)-pkg-config' --libs-only-l openssl` -lws2_32" \ + PSQL_LIBS="-lpq -lsecur32 `'$(TARGET)-pkg-config' --libs-only-l openssl pthreads` -lws2_32" \ SYBASE_LIBS="-lsybdb `'$(TARGET)-pkg-config' --libs-only-l gnutls` -liconv -lws2_32" \ + PKG_CONFIG="${TARGET}-pkg-config" \ + PKG_CONFIG_SYSROOT_DIR="/" \ + PKG_CONFIG_LIBDIR="$(PREFIX)/$(TARGET)/lib/pkgconfig" \ ./configure \ -opensource \ -confirm-license \ -xplatform win32-g++ \ -device-option CROSS_COMPILE=${TARGET}- \ -device-option PKG_CONFIG='${TARGET}-pkg-config' \ + -pkg-config \ -force-pkg-config \ -no-use-gold-linker \ -release \ @@ -57,19 +62,19 @@ define $(PKG)_BUILD -system-pcre \ -openssl-linked \ -dbus-linked \ - -v + -no-pch \ + -v \ + $($(PKG)_CONFIGURE_OPTS) - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - $(MAKE) -C '$(1)' -j '$(JOBS)' QMAKE="$(1)/bin/qmake CONFIG-='debug debug_and_release'" + $(MAKE) -C '$(1)' -j '$(JOBS)' rm -rf '$(PREFIX)/$(TARGET)/qt5' $(MAKE) -C '$(1)' -j 1 install ln -sf '$(PREFIX)/$(TARGET)/qt5/bin/qmake' '$(PREFIX)/bin/$(TARGET)'-qmake-qt5 mkdir '$(1)/test-qt' cd '$(1)/test-qt' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' '$(PWD)/src/qt-test.pro' - $(MAKE) -C '$(1)/test-qt' -j '$(JOBS)' - $(INSTALL) -m755 '$(1)/test-qt/release/test-qt5.exe' '$(PREFIX)/$(TARGET)/bin/' + $(MAKE) -C '$(1)/test-qt' -j '$(JOBS)' $(BUILD_TYPE) + $(INSTALL) -m755 '$(1)/test-qt/$(BUILD_TYPE)/test-qt5.exe' '$(PREFIX)/$(TARGET)/bin/' # build test the manual way mkdir '$(1)/test-$(PKG)-pkgconfig' @@ -86,7 +91,7 @@ define $(PKG)_BUILD '$(1)/test-$(PKG)-pkgconfig/qrc_qt-test.cpp' \ -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG)-pkgconfig.exe' \ -I'$(1)/test-$(PKG)-pkgconfig' \ - `'$(TARGET)-pkg-config' Qt5Widgets --cflags --libs` + `'$(TARGET)-pkg-config' Qt5Widgets$(BUILD_TYPE_SUFFIX) --cflags --libs` # setup cmake toolchain echo 'set(CMAKE_SYSTEM_PREFIX_PATH "$(PREFIX)/$(TARGET)/qt5" ${CMAKE_SYSTEM_PREFIX_PATH})' > '$(CMAKE_TOOLCHAIN_DIR)/$(PKG).cmake' diff --git a/src/qtcanvas3d.mk b/src/qtcanvas3d.mk new file mode 100644 index 00000000..424b07ca --- /dev/null +++ b/src/qtcanvas3d.mk @@ -0,0 +1,22 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := qtcanvas3d +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt +$(PKG)_IGNORE := +$(PKG)_VERSION = $(qtbase_VERSION) +$(PKG)_CHECKSUM := d817bc52bdd04982e13b4820ef02f52b6186e905c459576e24d7e30b733a3bcb +$(PKG)_SUBDIR = $(subst qtbase,qtcanvas3d,$(qtbase_SUBDIR)) +$(PKG)_FILE = $(subst qtbase,qtcanvas3d,$(qtbase_FILE)) +$(PKG)_URL = $(subst qtbase,qtcanvas3d,$(qtbase_URL)) +$(PKG)_DEPS := gcc qtbase qtdeclarative + +define $(PKG)_UPDATE + echo $(qtbase_VERSION) +endef + +define $(PKG)_BUILD + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install +endef diff --git a/src/qtcharts.mk b/src/qtcharts.mk new file mode 100644 index 00000000..9cc4d4e8 --- /dev/null +++ b/src/qtcharts.mk @@ -0,0 +1,22 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := qtcharts +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt +$(PKG)_IGNORE := +$(PKG)_VERSION = $(qtbase_VERSION) +$(PKG)_CHECKSUM := 74e86e3ad7de57dff0e41cc31c024a93421c3a349e5434f3b56c572f3533a89e +$(PKG)_SUBDIR = $(subst qtbase,qtcharts,$(qtbase_SUBDIR)) +$(PKG)_FILE = $(subst qtbase,qtcharts,$(qtbase_FILE)) +$(PKG)_URL = $(subst qtbase,qtcharts,$(qtbase_URL)) +$(PKG)_DEPS := gcc qtbase qtdeclarative qtmultimedia + +define $(PKG)_UPDATE + echo $(qtbase_VERSION) +endef + +define $(PKG)_BUILD + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install +endef diff --git a/src/qtconnectivity.mk b/src/qtconnectivity.mk index 30104527..1d88aa8b 100644 --- a/src/qtconnectivity.mk +++ b/src/qtconnectivity.mk @@ -1,10 +1,11 @@ -# 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 := qtconnectivity +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := 3637e6def8582fc0fb3684179b93650720ba2da1311a560d358296153f245023 +$(PKG)_CHECKSUM := 9755f4bc0a55fba3250635e3a902c0f6611a36c3d23583b84d0465ee3553a24c $(PKG)_SUBDIR = $(subst qtbase,qtconnectivity,$(qtbase_SUBDIR)) $(PKG)_FILE = $(subst qtbase,qtconnectivity,$(qtbase_FILE)) $(PKG)_URL = $(subst qtbase,qtconnectivity,$(qtbase_URL)) @@ -15,9 +16,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/qtdatavis3d.mk b/src/qtdatavis3d.mk new file mode 100644 index 00000000..16fed1fe --- /dev/null +++ b/src/qtdatavis3d.mk @@ -0,0 +1,22 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := qtdatavis3d +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt +$(PKG)_IGNORE := +$(PKG)_VERSION = $(qtbase_VERSION) +$(PKG)_CHECKSUM := 696baff081c7aebf42ca6f618d8c1ee122bd80ca623028f6379c4a4414a571f3 +$(PKG)_SUBDIR = $(subst qtbase,qtdatavis3d,$(qtbase_SUBDIR)) +$(PKG)_FILE = $(subst qtbase,qtdatavis3d,$(qtbase_FILE)) +$(PKG)_URL = $(subst qtbase,qtdatavis3d,$(qtbase_URL)) +$(PKG)_DEPS := gcc qtbase qtdeclarative qtmultimedia + +define $(PKG)_UPDATE + echo $(qtbase_VERSION) +endef + +define $(PKG)_BUILD + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install +endef diff --git a/src/qtdeclarative.mk b/src/qtdeclarative.mk index 57d08e59..40fdf4c2 100644 --- a/src/qtdeclarative.mk +++ b/src/qtdeclarative.mk @@ -1,10 +1,11 @@ -# 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 := qtdeclarative +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := 5fd14eefb83fff36fb17681693a70868f6aaf6138603d799c16466a094b26791 +$(PKG)_CHECKSUM := 3c9b72098f952155e943c4890c67f9a7dd81737ff69b482a401a2b2af0f93ebd $(PKG)_SUBDIR = $(subst qtbase,qtdeclarative,$(qtbase_SUBDIR)) $(PKG)_FILE = $(subst qtbase,qtdeclarative,$(qtbase_FILE)) $(PKG)_URL = $(subst qtbase,qtdeclarative,$(qtbase_URL)) @@ -15,9 +16,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/qtenginio.mk b/src/qtenginio.mk deleted file mode 100644 index 51b89c87..00000000 --- a/src/qtenginio.mk +++ /dev/null @@ -1,23 +0,0 @@ -# This file is part of MXE. -# See index.html for further information. - -PKG := qtenginio -$(PKG)_IGNORE := -$(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := a79936bd5b6a35aba28dd282291b28c8fa869b8d86652c62efe5e268d94defe2 -$(PKG)_SUBDIR = $(subst qtbase,qtenginio,$(qtbase_SUBDIR)) -$(PKG)_FILE = $(subst qtbase,qtenginio,$(qtbase_FILE)) -$(PKG)_URL = $(subst qtbase,qtenginio,$(qtbase_URL)) -$(PKG)_DEPS := gcc qtbase - -define $(PKG)_UPDATE - echo $(qtbase_VERSION) -endef - -define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' - $(MAKE) -C '$(1)' -j '$(JOBS)' - $(MAKE) -C '$(1)' -j 1 install -endef diff --git a/src/qtgamepad.mk b/src/qtgamepad.mk new file mode 100644 index 00000000..10ff5773 --- /dev/null +++ b/src/qtgamepad.mk @@ -0,0 +1,22 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := qtgamepad +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt +$(PKG)_IGNORE := +$(PKG)_VERSION = $(qtbase_VERSION) +$(PKG)_CHECKSUM := 2795f78487060b4fde07e436c93fa2d9b62f2420bb54648ad0a6b7783516f252 +$(PKG)_SUBDIR = $(subst qtbase,qtgamepad,$(qtbase_SUBDIR)) +$(PKG)_FILE = $(subst qtbase,qtgamepad,$(qtbase_FILE)) +$(PKG)_URL = $(subst qtbase,qtgamepad,$(qtbase_URL)) +$(PKG)_DEPS := gcc qtbase qtdeclarative + +define $(PKG)_UPDATE + echo $(qtbase_VERSION) +endef + +define $(PKG)_BUILD + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install +endef diff --git a/src/qtgraphicaleffects.mk b/src/qtgraphicaleffects.mk index 12c867f5..78d8357b 100644 --- a/src/qtgraphicaleffects.mk +++ b/src/qtgraphicaleffects.mk @@ -1,10 +1,11 @@ -# 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 := qtgraphicaleffects +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := 9bca0f8db3a4289eceebfa9504915440fe3fa6301d90b65705e4ece528c12d47 +$(PKG)_CHECKSUM := a570bc14fba836b58b7143eb44cb9ff6a0eff93ac0a346f68280854af9f4e4b3 $(PKG)_SUBDIR = $(subst qtbase,qtgraphicaleffects,$(qtbase_SUBDIR)) $(PKG)_FILE = $(subst qtbase,qtgraphicaleffects,$(qtbase_FILE)) $(PKG)_URL = $(subst qtbase,qtgraphicaleffects,$(qtbase_URL)) @@ -15,9 +16,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/qtimageformats-1.patch b/src/qtimageformats-1.patch index 4edb3482..f43fa4e9 100644 --- a/src/qtimageformats-1.patch +++ b/src/qtimageformats-1.patch @@ -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 30f968c6f65c5668a9760ccfd48312b786ab318b Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> diff --git a/src/qtimageformats.mk b/src/qtimageformats.mk index dab188c3..c944c595 100644 --- a/src/qtimageformats.mk +++ b/src/qtimageformats.mk @@ -1,23 +1,22 @@ -# 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 := qtimageformats +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := c97fee00c602f9f089fea480546d6e9d61a2b2297c2f163bfd9f8aba92b754a5 +$(PKG)_CHECKSUM := 2461795047194bddabdf768af862ba374db58418a7c3e26019a8d5f1e7a85481 $(PKG)_SUBDIR = $(subst qtbase,qtimageformats,$(qtbase_SUBDIR)) $(PKG)_FILE = $(subst qtbase,qtimageformats,$(qtbase_FILE)) $(PKG)_URL = $(subst qtbase,qtimageformats,$(qtbase_URL)) -$(PKG)_DEPS := gcc libmng qtbase tiff +$(PKG)_DEPS := gcc jasper libmng libwebp qtbase tiff define $(PKG)_UPDATE echo $(qtbase_VERSION) endef define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/qtlocation-1.patch b/src/qtlocation-1.patch new file mode 100644 index 00000000..75140f39 --- /dev/null +++ b/src/qtlocation-1.patch @@ -0,0 +1,24 @@ +From 59c9b6ace8c06c3aa8a74abf9e3e3b02b5687cd2 Mon Sep 17 00:00:00 2001 +From: Mark Brand <mabrand@mabrand.nl> +Date: Fri, 2 Jun 2017 18:23:20 +0200 +Subject: [PATCH] disable mapboxgl for MXE + + +diff --git a/src/plugins/geoservices/geoservices.pro b/src/plugins/geoservices/geoservices.pro +index 0810d392..de781ed1 100644 +--- a/src/plugins/geoservices/geoservices.pro ++++ b/src/plugins/geoservices/geoservices.pro +@@ -10,7 +10,8 @@ qtConfig(c++14):!win32|mingw:!qnx { + !exists(../../3rdparty/mapbox-gl-native/CMakeLists.txt) { + warning("Submodule mapbox-gl-native does not exist. Run 'git submodule update --init' on qtlocation.") + } else { +- SUBDIRS += mapboxgl ../../3rdparty/mapbox-gl-native +- mapboxgl.depends = ../../3rdparty/mapbox-gl-native ++# SUBDIRS += mapboxgl ../../3rdparty/mapbox-gl-native ++# mapboxgl.depends = ../../3rdparty/mapbox-gl-native ++ message(MXE: mapboxgl disabled) + } + } +-- +2.11.0 + diff --git a/src/qtlocation.mk b/src/qtlocation.mk index 57c3d9e5..af7fb2dc 100644 --- a/src/qtlocation.mk +++ b/src/qtlocation.mk @@ -1,10 +1,11 @@ -# 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 := qtlocation +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := 1fe948cb87649f4450be921cf3cdefc311595a80ef6a7a7b7484901baa0d6316 +$(PKG)_CHECKSUM := e3ee0ba44b1d3df4a958cdf9c9b70d8f41fd05d5f56580504d944679830f2af6 $(PKG)_SUBDIR = $(subst qtbase,qtlocation,$(qtbase_SUBDIR)) $(PKG)_FILE = $(subst qtbase,qtlocation,$(qtbase_FILE)) $(PKG)_URL = $(subst qtbase,qtlocation,$(qtbase_URL)) @@ -15,9 +16,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/qtmultimedia.mk b/src/qtmultimedia.mk index 9a955393..aa43d77c 100644 --- a/src/qtmultimedia.mk +++ b/src/qtmultimedia.mk @@ -1,10 +1,11 @@ -# 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 := qtmultimedia +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := 7cc7ca99f41587c188303670499e5c75101f9a8cb6178e8f29cc941e637d957f +$(PKG)_CHECKSUM := 0bb370923ba2e6d122940b07352a1a2f52ebbb061bec72e30df22a9e2edd60ee $(PKG)_SUBDIR = $(subst qtbase,qtmultimedia,$(qtbase_SUBDIR)) $(PKG)_FILE = $(subst qtbase,qtmultimedia,$(qtbase_FILE)) $(PKG)_URL = $(subst qtbase,qtmultimedia,$(qtbase_URL)) @@ -15,9 +16,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/qtofficeopenxml-1.patch b/src/qtofficeopenxml-1.patch new file mode 100644 index 00000000..b45bf413 --- /dev/null +++ b/src/qtofficeopenxml-1.patch @@ -0,0 +1,47 @@ +From 57c93e64b512b24c1ca983a91c18c1e4bb158d2a Mon Sep 17 00:00:00 2001 +From: Mark Brand <mabrand@mabrand.nl> +Date: Sat, 19 Mar 2016 15:37:43 +0100 +Subject: [PATCH 1/2] fix typo/build failure + + +diff --git a/src/officeopenxml/sml/smlworkbook.cpp b/src/officeopenxml/sml/smlworkbook.cpp +index dfa8e13..74432db 100644 +--- a/src/officeopenxml/sml/smlworkbook.cpp ++++ b/src/officeopenxml/sml/smlworkbook.cpp +@@ -37,7 +37,7 @@ QString Workbook::bookView(const QString &attribute) const + return QString(); + if (!bookViews_raw[0].contains(attribute)) + return QString(); +- return bookViews_raw[0][attribute].toInt(); ++ return bookViews_raw[0][attribute]; + } + + void Workbook::setBookView(const QString &attribute, const QString &val) +-- +2.9.3 + + +From 549e186188a635ed32e1a5abb1ea0fef854fcb25 Mon Sep 17 00:00:00 2001 +From: Mark Brand <mabrand@mabrand.nl> +Date: Mon, 30 Jan 2017 20:31:36 +0100 +Subject: [PATCH 2/2] build fix for Qt 5.8.0 + + +diff --git a/src/3rdParty/karchive/karchive.pri b/src/3rdParty/karchive/karchive.pri +index afe4965..af9116b 100644 +--- a/src/3rdParty/karchive/karchive.pri ++++ b/src/3rdParty/karchive/karchive.pri +@@ -42,8 +42,8 @@ SOURCES += \ + win32: LIBS += -ladvapi32 + msvc*: DEFINES += _CRT_SECURE_NO_WARNINGS + +-contains(QT_CONFIG, system-zlib) { +- if(unix|win32-g++*): LIBS_PRIVATE += -lz ++contains(QT_CONFIG, system-zlib) | qtConfig(system-zlib) { ++ if(unix|mingw): LIBS += -lz + else: LIBS += zdll.lib + } else { + p1 = $$[QT_INSTALL_HEADERS/get]/QtZlib +-- +2.9.3 + diff --git a/src/qtofficeopenxml.mk b/src/qtofficeopenxml.mk new file mode 100644 index 00000000..16445a3f --- /dev/null +++ b/src/qtofficeopenxml.mk @@ -0,0 +1,19 @@ +# This file is part of MXE. See LICENSE.md for licensing information. +PKG := qtofficeopenxml +$(PKG)_WEBSITE := https://github.com/dbzhang800/QtOfficeOpenXml/ +$(PKG)_DESCR := QtOfficeOpenXml +$(PKG)_IGNORE := +$(PKG)_VERSION := 02dda4a46f92a843eaba5f5a021952860eadfe01 +$(PKG)_CHECKSUM := 50f989b2af404e8a9a20b46b3ca4955093ad295cb61f0cfb42fa06480d1fbad2 +$(PKG)_SUBDIR := QtOfficeOpenXml-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://github.com/dbzhang800/QtOfficeOpenXml/archive/$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := gcc qtbase + +$(PKG)_UPDATE = $(call MXE_GET_GITHUB_SHA, dbzhang800/QtOfficeOpenXml, master) + +define $(PKG)_BUILD + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install +endef diff --git a/src/qtpurchasing.mk b/src/qtpurchasing.mk new file mode 100644 index 00000000..49b854ff --- /dev/null +++ b/src/qtpurchasing.mk @@ -0,0 +1,22 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := qtpurchasing +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt +$(PKG)_IGNORE := +$(PKG)_VERSION = $(qtbase_VERSION) +$(PKG)_CHECKSUM := 7884c5bfca7aaafaf9393a6dfc3789fa0fcbbc88c242771cc4cd378989509375 +$(PKG)_SUBDIR = $(subst qtbase,qtpurchasing,$(qtbase_SUBDIR)) +$(PKG)_FILE = $(subst qtbase,qtpurchasing,$(qtbase_FILE)) +$(PKG)_URL = $(subst qtbase,qtpurchasing,$(qtbase_URL)) +$(PKG)_DEPS := gcc qtbase qtdeclarative + +define $(PKG)_UPDATE + echo $(qtbase_VERSION) +endef + +define $(PKG)_BUILD + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install +endef diff --git a/src/qtquick1.mk b/src/qtquick1.mk deleted file mode 100644 index d9493062..00000000 --- a/src/qtquick1.mk +++ /dev/null @@ -1,23 +0,0 @@ -# This file is part of MXE. -# See index.html for further information. - -PKG := qtquick1 -$(PKG)_IGNORE := -$(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := c812a7e59a8b9f0a87693181059933e15fef04bc875b6486cd653be1b9b51f2c -$(PKG)_SUBDIR = $(subst qtbase,qtquick1,$(qtbase_SUBDIR)) -$(PKG)_FILE = $(subst qtbase,qtquick1,$(qtbase_FILE)) -$(PKG)_URL = $(subst qtbase,qtquick1,$(qtbase_URL)) -$(PKG)_DEPS := gcc qtbase qtscript qtsvg qttools qtxmlpatterns - -define $(PKG)_UPDATE - echo $(qtbase_VERSION) -endef - -define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' - $(MAKE) -C '$(1)' -j '$(JOBS)' - $(MAKE) -C '$(1)' -j 1 install -endef diff --git a/src/qtquickcontrols.mk b/src/qtquickcontrols.mk index 8fd41511..4c0e3416 100644 --- a/src/qtquickcontrols.mk +++ b/src/qtquickcontrols.mk @@ -1,10 +1,11 @@ -# 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 := qtquickcontrols +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := 1b7a8389d656066c629bd2cb520b39a7eb041d184b567dd1b9639b88d841fcf0 +$(PKG)_CHECKSUM := 173dfffeb20315dceedeb22c19812752c07e25916044be5444fe00522e1754fe $(PKG)_SUBDIR = $(subst qtbase,qtquickcontrols,$(qtbase_SUBDIR)) $(PKG)_FILE = $(subst qtbase,qtquickcontrols,$(qtbase_FILE)) $(PKG)_URL = $(subst qtbase,qtquickcontrols,$(qtbase_URL)) @@ -15,9 +16,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/qtquickcontrols2.mk b/src/qtquickcontrols2.mk new file mode 100644 index 00000000..2910e983 --- /dev/null +++ b/src/qtquickcontrols2.mk @@ -0,0 +1,22 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := qtquickcontrols2 +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt +$(PKG)_IGNORE := +$(PKG)_VERSION = $(qtbase_VERSION) +$(PKG)_CHECKSUM := 09ab6fc1cc5fe6ea6179cff971950cdb37b074610d0d84f0cd61052ec97c1d9c +$(PKG)_SUBDIR = $(subst qtbase,qtquickcontrols2,$(qtbase_SUBDIR)) +$(PKG)_FILE = $(subst qtbase,qtquickcontrols2,$(qtbase_FILE)) +$(PKG)_URL = $(subst qtbase,qtquickcontrols2,$(qtbase_URL)) +$(PKG)_DEPS := gcc qtbase qtdeclarative + +define $(PKG)_UPDATE + echo $(qtbase_VERSION) +endef + +define $(PKG)_BUILD + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install +endef diff --git a/src/qtscript.mk b/src/qtscript.mk index efc5649f..0d3d2b92 100644 --- a/src/qtscript.mk +++ b/src/qtscript.mk @@ -1,10 +1,11 @@ -# 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 := qtscript +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := cd46dddd998f22bcb06447e0407fef81f7052f25bc770b1c27625654cee828fd +$(PKG)_CHECKSUM := 3c32b6be7b5dcf61b1a25d4646cdac96cc44f5c739c38597a5881231ae3ac964 $(PKG)_SUBDIR = $(subst qtbase,qtscript,$(qtbase_SUBDIR)) $(PKG)_FILE = $(subst qtbase,qtscript,$(qtbase_FILE)) $(PKG)_URL = $(subst qtbase,qtscript,$(qtbase_URL)) @@ -15,9 +16,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/qtscxml.mk b/src/qtscxml.mk new file mode 100644 index 00000000..88bb8924 --- /dev/null +++ b/src/qtscxml.mk @@ -0,0 +1,22 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := qtscxml +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt +$(PKG)_IGNORE := +$(PKG)_VERSION = $(qtbase_VERSION) +$(PKG)_CHECKSUM := 64596100756c238434e2d213c6c123987b751fd6f26dfa39f146463028b45238 +$(PKG)_SUBDIR = $(subst qtbase,qtscxml,$(qtbase_SUBDIR)) +$(PKG)_FILE = $(subst qtbase,qtscxml,$(qtbase_FILE)) +$(PKG)_URL = $(subst qtbase,qtscxml,$(qtbase_URL)) +$(PKG)_DEPS := gcc qtbase qtdeclarative + +define $(PKG)_UPDATE + echo $(qtbase_VERSION) +endef + +define $(PKG)_BUILD + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install +endef diff --git a/src/qtsensors.mk b/src/qtsensors.mk index 90ba5cc6..7e6ac34e 100644 --- a/src/qtsensors.mk +++ b/src/qtsensors.mk @@ -1,10 +1,11 @@ -# 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 := qtsensors +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := 5d264fc0729a5d7679bd4eb8d7a0a9b142ed38d09fa68fc7dfe57f64afc8eeea +$(PKG)_CHECKSUM := 5d3e7b036e7339379cd737ec1a3a10e07aed88a0084a46ba313ac76c22e0aa49 $(PKG)_SUBDIR = $(subst qtbase,qtsensors,$(qtbase_SUBDIR)) $(PKG)_FILE = $(subst qtbase,qtsensors,$(qtbase_FILE)) $(PKG)_URL = $(subst qtbase,qtsensors,$(qtbase_URL)) @@ -15,9 +16,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/qtserialbus.mk b/src/qtserialbus.mk new file mode 100644 index 00000000..8ed750c1 --- /dev/null +++ b/src/qtserialbus.mk @@ -0,0 +1,22 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := qtserialbus +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt +$(PKG)_IGNORE := +$(PKG)_VERSION = $(qtbase_VERSION) +$(PKG)_CHECKSUM := 2ed40b9c2557fe2d518476c9f8e736a6f51d272ab3898a6ed3ff7c58141483ff +$(PKG)_SUBDIR = $(subst qtbase,qtserialbus,$(qtbase_SUBDIR)) +$(PKG)_FILE = $(subst qtbase,qtserialbus,$(qtbase_FILE)) +$(PKG)_URL = $(subst qtbase,qtserialbus,$(qtbase_URL)) +$(PKG)_DEPS := gcc qtbase qtserialport + +define $(PKG)_UPDATE + echo $(qtbase_VERSION) +endef + +define $(PKG)_BUILD + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install +endef diff --git a/src/qtserialport.mk b/src/qtserialport.mk index b4d993b1..128799af 100644 --- a/src/qtserialport.mk +++ b/src/qtserialport.mk @@ -1,10 +1,11 @@ -# 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 := qtserialport +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := a034dbfb023db1b9b9de54390f7e76a48c1d1eb12533b0ffd574505c99968f7a +$(PKG)_CHECKSUM := 80022e3e6d5652502891fec3774615a36d51901dacc4fbb2dfe6e562fd729d7f $(PKG)_SUBDIR = $(subst qtbase,qtserialport,$(qtbase_SUBDIR)) $(PKG)_FILE = $(subst qtbase,qtserialport,$(qtbase_FILE)) $(PKG)_URL = $(subst qtbase,qtserialport,$(qtbase_URL)) @@ -15,9 +16,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/qtserialport_qt4-1-fixes.patch b/src/qtserialport_qt4-1-fixes.patch new file mode 100644 index 00000000..8c4b6a6f --- /dev/null +++ b/src/qtserialport_qt4-1-fixes.patch @@ -0,0 +1,40 @@ +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: Daniel Burr <dburr@topcon.com> +Date: Tue, 12 Jan 2016 18:37:28 +0100 +Subject: [PATCH] Allow static building of qtserialport_qt4 + +Taken from: +https://github.com/qtproject/qtserialport/pull/2 + +The QtSerialPort library expects QT_STATIC to be defined when it is +being compiled as a static library. If is not defined then the +Q_SERIALPORT_EXPORT macro will be set to one of +Q_DECL_IMPORT/Q_DECL_EXPORT, resulting in linking errors when the test +cases are built under Windows. + +The following changeset introduced support for the QT_STATIC macro into +QT: + +https://gitlab.com/pteam/pteam-qtbase/commit/96166fa56abb52157387c4911efbd4e5e6beee93 + +This change is not included in QT 4.8.7 (appears to be 5.x only) and +therefore QT_STATIC is not defined when QtSerialPort is compiled against +4.x QT versions. + +The workaround used here is for the QSerialPort build system to define +QT_STATIC when it is being compiled statically. + +diff --git a/src/serialport/qt4support/serialport.prf b/src/serialport/qt4support/serialport.prf +index 1111111..2222222 100644 +--- a/src/serialport/qt4support/serialport.prf ++++ b/src/serialport/qt4support/serialport.prf +@@ -25,3 +25,5 @@ mac { + LIBS += -lQtSerialPort$${QT_LIBINFIX} + } + } ++ ++static:DEFINES += QT_STATIC diff --git a/src/qtserialport_qt4.mk b/src/qtserialport_qt4.mk index 91d69a1a..030914f9 100644 --- a/src/qtserialport_qt4.mk +++ b/src/qtserialport_qt4.mk @@ -1,22 +1,18 @@ -# 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 := qtserialport_qt4 +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := -$(PKG)_VERSION := 5c3b6cc770 -$(PKG)_CHECKSUM := 4e0bee3bd608b67e47dfbf2baa7f5ed7d9e39a3da16e4cc6056ffd0a4baa1495 -$(PKG)_GH_USER := qtproject -$(PKG)_GH_REPO := qtserialport -$(PKG)_GH_TREE := qt4-dev -$(PKG)_SUBDIR := $($(PKG)_GH_USER)-$($(PKG)_GH_REPO)-$(call substr,$($(PKG)_VERSION),1,7) -$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := https://github.com/$($(PKG)_GH_USER)/$($(PKG)_GH_REPO)/tarball/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_VERSION := 5c3b6cc +$(PKG)_CHECKSUM := d49c1cd4bb47706561f52c07d6075bb9931700d3bcae656ef3b6d3db3eb014ab +$(PKG)_GH_CONF := qt/qtserialport/qt4-dev $(PKG)_DEPS := gcc qt -$(PKG)_UPDATE := $(call MXE_GET_GITHUB_SHA, $($(PKG)_GH_USER)/$($(PKG)_GH_REPO), $($(PKG)_GH_TREE)) - -define $(PKG)_BUILD_SHARED +define $(PKG)_BUILD cd '$(1)' && '$(PREFIX)/$(TARGET)/qt/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install + # install one of the test programs + cp -f '$(1)/examples/serialport/cenumerator/release/cenumerator.exe' '$(PREFIX)/$(TARGET)/bin/test-qtserialport_qt4.exe' endef diff --git a/src/qtservice-1-fixes.patch b/src/qtservice-1-fixes.patch index 5713f578..77208ae4 100644 --- a/src/qtservice-1-fixes.patch +++ b/src/qtservice-1-fixes.patch @@ -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 431dd674645bbee5ea34d65aa4095f07890af088 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> diff --git a/src/qtservice.mk b/src/qtservice.mk index 972b0874..902e1859 100644 --- a/src/qtservice.mk +++ b/src/qtservice.mk @@ -1,6 +1,7 @@ -# 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 := qtservice +$(PKG)_WEBSITE := https://qt.gitorious.org/qt-solutions/ +$(PKG)_DESCR := Qt Solutions $(PKG)_IGNORE := $(PKG)_VERSION := ad9bc46 $(PKG)_CHECKSUM := c708cb14637811b5d9060e33e4afe904a9d1c9f39a9befdc3a570f219825075b @@ -15,9 +16,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)/qtservice/buildlib' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' + cd '$(1)/qtservice/buildlib' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)/qtservice/buildlib' -j '$(JOBS)' $(MAKE) -C '$(1)/qtservice/buildlib' -j 1 install endef diff --git a/src/qtsparkle-1-fixes.patch b/src/qtsparkle-1-fixes.patch new file mode 100644 index 00000000..e7ea4d5c --- /dev/null +++ b/src/qtsparkle-1-fixes.patch @@ -0,0 +1,20 @@ +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, 28 Jan 2017 03:05:58 +0300 +Subject: [PATCH] disable build exampleapp + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1111111..2222222 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -34,4 +34,4 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") + + add_subdirectory(src) +-add_subdirectory(exampleapp) ++#add_subdirectory(exampleapp) diff --git a/src/qtsparkle-test.cpp b/src/qtsparkle-test.cpp new file mode 100644 index 00000000..0594294a --- /dev/null +++ b/src/qtsparkle-test.cpp @@ -0,0 +1,17 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include <qtsparkle-qt5/Updater> +#include <QWidget> +#include <QUrl> + +int main() +{ + QWidget w; + qtsparkle::Updater* updater = new qtsparkle::Updater( + QUrl("http://www.example.com/sparkle.xml"), &w); + updater->SetVersion("1.0"); + + return 0; +} diff --git a/src/qtsparkle.mk b/src/qtsparkle.mk new file mode 100644 index 00000000..2216e0e6 --- /dev/null +++ b/src/qtsparkle.mk @@ -0,0 +1,48 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := qtsparkle +$(PKG)_WEBSITE := https://github.com/davidsansome/qtsparkle +$(PKG)_DESCR := Qt auto-updater lib +$(PKG)_IGNORE := +$(PKG)_VERSION := 4c852e57061d7928573afdf88f04f89d85167477 +$(PKG)_CHECKSUM := 6b8500de51c6a8dd402663fed99bced0588e5be50cfe8474f6d3b46f92025934 +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://github.com/davidsansome/$(PKG)/archive/$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := gcc qttools + +define $(PKG)_UPDATE + $(call MXE_GET_GITHUB_TAGS, davidsansome/qtsparkle) +endef + +define $(PKG)_BUILD_COMMON + cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \ + -DBUILD_WITH_QT4=@qtsparkle_use_qt4@ + $(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) + $(MAKE) -C '$(BUILD_DIR)' -j 1 install + + # create pkg-config file + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' + (echo 'prefix=$(PREFIX)/$(TARGET)'; \ + echo 'exec_prefix=$${prefix}'; \ + echo 'libdir=$${exec_prefix}/lib'; \ + echo 'includedir=$${prefix}/include'; \ + echo ''; \ + echo 'Name: $(PKG)'; \ + echo 'Version: '; \ + echo 'Description: Qt auto-updater lib'; \ + echo 'Requires: @qtsparkle_pc_requires@'; \ + echo 'Libs: -L$${libdir} -lqtsparkle@qtsparkle_version_suffix@'; \ + echo 'Cflags: -I$${includedir}') \ + > '$(PREFIX)/$(TARGET)/lib/pkgconfig/qtsparkle@qtsparkle_version_suffix@.pc' + + $(TARGET)-g++ \ + -W -Wall -Werror -std=c++11 -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `$(TARGET)-pkg-config qtsparkle@qtsparkle_version_suffix@ --cflags --libs` +endef + +$(PKG)_BUILD = $(subst @qtsparkle_use_qt4@,OFF, \ + $(subst @qtsparkle_version_suffix@,-qt5, \ + $(subst @qtsparkle_pc_requires@,Qt5Core Qt5Network Qt5Widgets, \ + $($(PKG)_BUILD_COMMON)))) diff --git a/src/qtsparkle_qt4-test.cpp b/src/qtsparkle_qt4-test.cpp new file mode 100644 index 00000000..3e6e6578 --- /dev/null +++ b/src/qtsparkle_qt4-test.cpp @@ -0,0 +1,17 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include <qtsparkle/Updater> +#include <QWidget> +#include <QUrl> + +int main() +{ + QWidget w; + qtsparkle::Updater* updater = new qtsparkle::Updater( + QUrl("http://www.example.com/sparkle.xml"), &w); + updater->SetVersion("1.0"); + + return 0; +} diff --git a/src/qtsparkle_qt4.mk b/src/qtsparkle_qt4.mk new file mode 100644 index 00000000..c46ee6e7 --- /dev/null +++ b/src/qtsparkle_qt4.mk @@ -0,0 +1,22 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := qtsparkle_qt4 +$(PKG)_WEBSITE = $(qtsparkle_WEBSITE) +$(PKG)_DESCR = $(qtsparkle_DESCR) +$(PKG)_IGNORE = $(qtsparkle_IGNORE) +$(PKG)_VERSION = $(qtsparkle_VERSION) +$(PKG)_CHECKSUM = $(qtsparkle_CHECKSUM) +$(PKG)_SUBDIR = $(qtsparkle_SUBDIR) +$(PKG)_FILE = $(qtsparkle_FILE) +$(PKG)_URL = $(qtsparkle_URL) +$(PKG)_PATCHES = $(realpath $(sort $(wildcard $(addsuffix /qtsparkle-[0-9]*.patch, $(TOP_DIR)/src)))) +$(PKG)_DEPS := gcc qt + +define $(PKG)_UPDATE + echo $(qtsparkle_VERSION) +endef + +$(PKG)_BUILD = $(subst @qtsparkle_use_qt4@,ON, \ + $(subst @qtsparkle_version_suffix@,, \ + $(subst @qtsparkle_pc_requires@,QtCore QtGui QtNetwork QtXml, \ + $(qtsparkle_BUILD_COMMON)))) diff --git a/src/qtsvg.mk b/src/qtsvg.mk index ea0ae808..83ac271d 100644 --- a/src/qtsvg.mk +++ b/src/qtsvg.mk @@ -1,10 +1,11 @@ -# 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 := qtsvg +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := f7f588be48befd9ccab5a6086832551b8899e8bed9e603ddea979581e05a91c7 +$(PKG)_CHECKSUM := 0fd1ac11bdcbbc359156792dc6f943f4c69936068550e7c2916a32b0f628fe7e $(PKG)_SUBDIR = $(subst qtbase,qtsvg,$(qtbase_SUBDIR)) $(PKG)_FILE = $(subst qtbase,qtsvg,$(qtbase_FILE)) $(PKG)_URL = $(subst qtbase,qtsvg,$(qtbase_URL)) @@ -15,9 +16,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/qtsystems.mk b/src/qtsystems.mk index 03867e87..78e52639 100644 --- a/src/qtsystems.mk +++ b/src/qtsystems.mk @@ -1,12 +1,13 @@ -# 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 := qtsystems +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION := 4e3a7ed -$(PKG)_CHECKSUM := 4aceb62b7e3135a1f29a31d71467d1c519ee25c36e1aa0b96b72540af5b198e3 -$(PKG)_SUBDIR := qtproject-$(PKG)-$($(PKG)_VERSION) +$(PKG)_CHECKSUM := 710d2b80f9125fb03fdb67dd6f3c4dd51396981e812fd4a3ea99b1b1290853e5 +$(PKG)_SUBDIR := qt-$(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := https://github.com/qtproject/qtsystems/tarball/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://github.com/qt/qtsystems/tarball/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc qtbase qtdeclarative qtxmlpatterns define $(PKG)_UPDATE @@ -16,9 +17,7 @@ endef define $(PKG)_BUILD cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/syncqt.pl' -version 5.4.0 - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/qttools-1.patch b/src/qttools-1.patch index 2dc1fb5d..3b797c16 100644 --- a/src/qttools-1.patch +++ b/src/qttools-1.patch @@ -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 3dc7b77a86b4d399836472484a5b3448a27f1a1e Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> diff --git a/src/qttools-test/CMakeLists.txt b/src/qttools-test/CMakeLists.txt new file mode 100644 index 00000000..320056ad --- /dev/null +++ b/src/qttools-test/CMakeLists.txt @@ -0,0 +1,33 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +# Source: https://github.com/mxe/mxe/issues/1185 + +cmake_minimum_required(VERSION 3.0) +find_package(Qt5 REQUIRED COMPONENTS Core Widgets Gui UiTools) + +include_directories(${Qt5UiTools_INCLUDE_DIRS}) +add_executable(mxe-cmake-qtuitools mxe-cmake-qtuitools.cpp) +# NB: Qt5Widgets, Qt5Gui, Qt5Core must be given separately; otherwise they are +# appended automatically at the end, making it impossible to satisfy all the +# other implicit dependencies (opengl, harfbuzz, etc.) +target_link_libraries( + mxe-cmake-qtuitools + ${Qt5UiTools_LIBRARIES} + ${Qt5Widgets_LIBRARIES} + ${Qt5Gui_LIBRARIES} + ${Qt5Core_LIBRARIES} + opengl32 + harfbuzz + jpeg + png + glib-2.0 + winmm + dwmapi + uxtheme + ws2_32 + intl + iconv + pcre2-16 + version + z +) diff --git a/src/qttools-test/mxe-cmake-qtuitools.cpp b/src/qttools-test/mxe-cmake-qtuitools.cpp new file mode 100644 index 00000000..60e008b5 --- /dev/null +++ b/src/qttools-test/mxe-cmake-qtuitools.cpp @@ -0,0 +1,10 @@ +// This file is part of MXE. See LICENSE.md for licensing information. + +// Source: https://github.com/mxe/mxe/issues/1185 + +#include <QUiLoader> + +int main() { + QUiLoader l; + return 0; +} diff --git a/src/qttools.mk b/src/qttools.mk index bf5fe24a..04ef4b9f 100644 --- a/src/qttools.mk +++ b/src/qttools.mk @@ -1,10 +1,11 @@ -# 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 := qttools +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := 4361f6ce49717058160908297841a18b94645cec593d1b48fb126c9d06c87bfd +$(PKG)_CHECKSUM := 64fe968e35f9d9f6617b48027957761cf76c20d43721ee6e2855a965afa285ee $(PKG)_SUBDIR = $(subst qtbase,qttools,$(qtbase_SUBDIR)) $(PKG)_FILE = $(subst qtbase,qttools,$(qtbase_FILE)) $(PKG)_URL = $(subst qtbase,qttools,$(qtbase_URL)) @@ -18,5 +19,12 @@ define $(PKG)_BUILD cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install + + # test QUiLoader + mkdir '$(1)'.test + cd '$(1)'.test && '$(TARGET)-cmake' '$(PWD)/src/qttools-test' + $(MAKE) -C '$(1)'.test + cp '$(1)'.test/mxe-cmake-qtuitools.exe \ + '$(PREFIX)/$(TARGET)/bin/test-qttools.exe' endef diff --git a/src/qttranslations.mk b/src/qttranslations.mk index e4193a3c..694ce361 100644 --- a/src/qttranslations.mk +++ b/src/qttranslations.mk @@ -1,10 +1,11 @@ -# 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 := qttranslations +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := 41f800710f0bc6ca263f1e54f1fa22be7043962999304e73ce9887ebefc7a4c6 +$(PKG)_CHECKSUM := 5cc981d823a989ddc22b4c278b5b8391fd38656d70e6fa9c8d84fe23d1dc4f77 $(PKG)_SUBDIR = $(subst qtbase,qttranslations,$(qtbase_SUBDIR)) $(PKG)_FILE = $(subst qtbase,qttranslations,$(qtbase_FILE)) $(PKG)_URL = $(subst qtbase,qttranslations,$(qtbase_URL)) diff --git a/src/qtvirtualkeyboard.mk b/src/qtvirtualkeyboard.mk new file mode 100644 index 00000000..75206443 --- /dev/null +++ b/src/qtvirtualkeyboard.mk @@ -0,0 +1,22 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := qtvirtualkeyboard +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt +$(PKG)_IGNORE := +$(PKG)_VERSION = $(qtbase_VERSION) +$(PKG)_CHECKSUM := 2974acf65e617d6b4f6288b70953673a9a68612c9caf7d642c370c038e3d7a76 +$(PKG)_SUBDIR = $(subst qtbase,qtvirtualkeyboard,$(qtbase_SUBDIR)) +$(PKG)_FILE = $(subst qtbase,qtvirtualkeyboard,$(qtbase_FILE)) +$(PKG)_URL = $(subst qtbase,qtvirtualkeyboard,$(qtbase_URL)) +$(PKG)_DEPS := gcc qtbase qtdeclarative qtmultimedia qtquickcontrols qtsvg + +define $(PKG)_UPDATE + echo $(qtbase_VERSION) +endef + +define $(PKG)_BUILD + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install +endef diff --git a/src/qtwebchannel.mk b/src/qtwebchannel.mk index a0cd4a8a..aac172e9 100644 --- a/src/qtwebchannel.mk +++ b/src/qtwebchannel.mk @@ -1,10 +1,11 @@ -# 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 := qtwebchannel +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := 7f4295ee57cd4ecba3cb263452d2a08d501b45c9a2b8b7794b6a97d7652f15d0 +$(PKG)_CHECKSUM := 12ef7ac86b9da0eb6f0140f402e180de95a1f9bfa9f408c2a366279da078e1b9 $(PKG)_SUBDIR = $(subst qtbase,qtwebchannel,$(qtbase_SUBDIR)) $(PKG)_FILE = $(subst qtbase,qtwebchannel,$(qtbase_FILE)) $(PKG)_URL = $(subst qtbase,qtwebchannel,$(qtbase_URL)) @@ -15,9 +16,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/qtwebengine.mk b/src/qtwebengine.mk deleted file mode 100644 index 2f2bd54f..00000000 --- a/src/qtwebengine.mk +++ /dev/null @@ -1,23 +0,0 @@ -# This file is part of MXE. -# See index.html for further information. - -PKG := qtwebengine -$(PKG)_IGNORE := -$(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := 7c4d328dd305991aaf0c3450615f4a8e5d80152194bee6f5925bd8d3477e2b90 -$(PKG)_SUBDIR = $(subst qtbase,qtwebengine,$(qtbase_SUBDIR)) -$(PKG)_FILE = $(subst qtbase,qtwebengine,$(qtbase_FILE)) -$(PKG)_URL = $(subst qtbase,qtwebengine,$(qtbase_URL)) -$(PKG)_DEPS := gcc qtbase qtquickcontrols qtwebkit - -define $(PKG)_UPDATE - echo $(qtbase_VERSION) -endef - -define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' - $(MAKE) -C '$(1)' -j '$(JOBS)' - $(MAKE) -C '$(1)' -j 1 install -endef diff --git a/src/qtwebkit-1-fixes.patch b/src/qtwebkit-1-fixes.patch new file mode 100644 index 00000000..45909291 --- /dev/null +++ b/src/qtwebkit-1-fixes.patch @@ -0,0 +1,47 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +Contains ad hoc patches for cross building. + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Wed, 18 Jan 2017 19:38:56 +1100 +Subject: [PATCH] fix msys build + +Taken from: +https://github.com/Alexpux/Qt-builds/blob/master/patches/qt/5.0.x/qt-5.0.0-fix-build-under-msys.patch + +diff --git a/Source/WebCore/DerivedSources.pri b/Source/WebCore/DerivedSources.pri +index 1111111..2222222 100644 +--- a/Source/WebCore/DerivedSources.pri ++++ b/Source/WebCore/DerivedSources.pri +@@ -752,7 +752,7 @@ IDL_ATTRIBUTES_FILE = $$PWD/bindings/scripts/IDLAttributes.txt + preprocessIdls.input = IDL_ATTRIBUTES_FILE + preprocessIdls.script = $$PREPROCESS_IDLS_SCRIPT + # FIXME : We need to use only perl at some point. +-win_cmd_shell: preprocessIdls.commands = type nul > $$IDL_FILES_TMP $$EOC ++win_cmd_shell: preprocessIdls.commands = cat /dev/null > $$IDL_FILES_TMP $$EOC + else: preprocessIdls.commands = cat /dev/null > $$IDL_FILES_TMP $$EOC + for(binding, IDL_BINDINGS) { + # We need "$$binding" instead of "$$binding ", because Windows' echo writes trailing whitespaces. (http://wkb.ug/88304) + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Martchus <martchus@gmx.net> +Date: Sun, 25 Sep 2016 22:21:54 +0200 +Subject: [PATCH] Include intrin.h for declaration of _mm_mfence + +taken from: +https://aur.archlinux.org/cgit/aur.git/tree/0007-Include-intrin.h-for-declaration-of-_mm_mfence.patch?h=mingw-w64-qt5-webkit + +diff --git a/Source/WTF/wtf/Atomics.h b/Source/WTF/wtf/Atomics.h +index 1111111..2222222 100644 +--- a/Source/WTF/wtf/Atomics.h ++++ b/Source/WTF/wtf/Atomics.h +@@ -68,6 +68,8 @@ + #elif !COMPILER(GCC) + extern "C" void _ReadWriteBarrier(void); + #pragma intrinsic(_ReadWriteBarrier) ++#else ++#include <intrin.h> + #endif + #include <windows.h> + #elif OS(QNX) diff --git a/src/qtwebkit.mk b/src/qtwebkit.mk index 2e8b4858..0d524542 100644 --- a/src/qtwebkit.mk +++ b/src/qtwebkit.mk @@ -1,31 +1,22 @@ -# 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 := qtwebkit +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := 77583f9dbd3e6ad874386df71b165dc3ce88efdabbc6e5d97a959ee2187d6d69 +$(PKG)_CHECKSUM := 8dad193b740055a998312e04a040f2e32a923c0823b2d239b24eab08276a4e04 $(PKG)_SUBDIR = $(subst qtbase,qtwebkit,$(qtbase_SUBDIR)) $(PKG)_FILE = $(subst qtbase,qtwebkit,$(qtbase_FILE)) -$(PKG)_URL = $(subst qtbase,qtwebkit,$(qtbase_URL)) -$(PKG)_DEPS := gcc qtbase qtmultimedia qtquick1 sqlite - -$(PKG)_MESSAGE :=*** qtwebkit is deprecated in Qt 5.5 *** +$(PKG)_URL = https://download.qt.io/community_releases/5.9/5.9.0-final/$($(PKG)_FILE) +$(PKG)_DEPS := gcc qtbase qtmultimedia qtquickcontrols sqlite define $(PKG)_UPDATE echo $(qtbase_VERSION) endef define $(PKG)_BUILD_SHARED - echo qtwebkit is deprecated in Qt 5.5 -endef - -define $(PKG)_BUILD_SHARED_DISABLED - # looks for build tools with .exe suffix and tries to use win_flex - $(SED) -i 's,\.exe,,' '$(1)/Tools/qmake/mkspecs/features/functions.prf' - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' FLEX=flex CONFIG-='debug debug_and_release' - $(MAKE) -C '$(1)' -j '$(JOBS)' - $(MAKE) -C '$(1)' -j 1 install + cd '$(BUILD_DIR)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' '$(SOURCE_DIR)' + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install endef diff --git a/src/qtwebsockets.mk b/src/qtwebsockets.mk index 8ea0f6f2..c5ec2e77 100644 --- a/src/qtwebsockets.mk +++ b/src/qtwebsockets.mk @@ -1,10 +1,11 @@ -# 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 := qtwebsockets +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := cf4e834a867b90337188be504ef20184c52666370f721e704952988f8cb12deb +$(PKG)_CHECKSUM := 62977acaa9a44a4174d4ea3bd53f756758e3ae78d8470728326e6408ca0586d6 $(PKG)_SUBDIR = $(subst qtbase,qtwebsockets,$(qtbase_SUBDIR)) $(PKG)_FILE = $(subst qtbase,qtwebsockets,$(qtbase_FILE)) $(PKG)_URL = $(subst qtbase,qtwebsockets,$(qtbase_URL)) @@ -15,9 +16,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/qtwebview.mk b/src/qtwebview.mk new file mode 100644 index 00000000..459ed96e --- /dev/null +++ b/src/qtwebview.mk @@ -0,0 +1,22 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := qtwebview +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt +$(PKG)_IGNORE := +$(PKG)_VERSION = $(qtbase_VERSION) +$(PKG)_CHECKSUM := 1ca7f10aa42b9fb2e2c49237791b24aef1c54c3a0c78617dce30bdea7dd3d22b +$(PKG)_SUBDIR = $(subst qtbase,qtwebview,$(qtbase_SUBDIR)) +$(PKG)_FILE = $(subst qtbase,qtwebview,$(qtbase_FILE)) +$(PKG)_URL = $(subst qtbase,qtwebview,$(qtbase_URL)) +$(PKG)_DEPS := gcc qtbase + +define $(PKG)_UPDATE + echo $(qtbase_VERSION) +endef + +define $(PKG)_BUILD + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install +endef diff --git a/src/qtwinextras-1.patch b/src/qtwinextras-1.patch index 7259d7a8..743a9e21 100644 --- a/src/qtwinextras-1.patch +++ b/src/qtwinextras-1.patch @@ -1,26 +1,27 @@ -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 dc0cb681cde6899b40923570c29adcf1c20c54cb Mon Sep 17 00:00:00 2001 +From 9aad92fdf482f1a38360559586db9ee2df5d9fc4 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> -Date: Thu, 6 Aug 2015 20:41:14 +0200 -Subject: [PATCH] fix undefined reference to `__imp_CreateRectRgn' +Date: Sun, 29 Jan 2017 20:27:29 +0100 +Subject: [PATCH] build fix for MXE -Change-Id: I707d168173b210034e3dff9580388fb630d858f8 +Needed for the shared build. In the static build, gdi32 is probably brought in as a transitive dependency. + +Change-Id: Ic0b1ab49cfb04559823c7446bda197b34ea15f54 diff --git a/src/winextras/winextras.pro b/src/winextras/winextras.pro -index 7f6bba4..835b2e7 100644 +index 5d93c6b..4c423b0 100644 --- a/src/winextras/winextras.pro +++ b/src/winextras/winextras.pro -@@ -47,7 +47,7 @@ QMAKE_DOCS = $$PWD/doc/qtwinextras.qdocconf +@@ -45,7 +45,7 @@ HEADERS += \ - DEFINES += NTDDI_VERSION=0x06010000 _WIN32_WINNT=0x0601 - LIBS_PRIVATE += -lole32 -lshlwapi -lshell32 --win32:!qtHaveModule(opengl)|contains(QT_CONFIG, dynamicgl):LIBS_PRIVATE += -lgdi32 -+win32:shared|!qtHaveModule(opengl)|contains(QT_CONFIG, dynamicgl):LIBS_PRIVATE += -lgdi32 + QMAKE_DOCS = $$PWD/doc/qtwinextras.qdocconf + +-LIBS_PRIVATE += -lole32 -lshlwapi -lshell32 -ldwmapi ++LIBS_PRIVATE += -lole32 -lshlwapi -lshell32 -ldwmapi -lgdi32 + win32:!qtHaveModule(opengl)|qtConfig(dynamicgl):LIBS_PRIVATE += -lgdi32 OTHER_FILES += \ - doc/qtwinextras.qdocconf \ -- -2.1.4 +2.9.3 diff --git a/src/qtwinextras.mk b/src/qtwinextras.mk index ed40f507..87b2e2a1 100644 --- a/src/qtwinextras.mk +++ b/src/qtwinextras.mk @@ -1,10 +1,11 @@ -# 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 := qtwinextras +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := cb00d2ac7a6039fe1119d458f16f319882cb9a250f4caea55657edcde38d851f +$(PKG)_CHECKSUM := 7280ae2a5d7cb563f23c48b5f8c37e340ce63950c6ab9f8fdf95072b3137b08b $(PKG)_SUBDIR = $(subst qtbase,qtwinextras,$(qtbase_SUBDIR)) $(PKG)_FILE = $(subst qtbase,qtwinextras,$(qtbase_FILE)) $(PKG)_URL = $(subst qtbase,qtwinextras,$(qtbase_URL)) @@ -15,9 +16,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/qtxlsxwriter.mk b/src/qtxlsxwriter.mk index 2da012c2..523ef913 100644 --- a/src/qtxlsxwriter.mk +++ b/src/qtxlsxwriter.mk @@ -1,20 +1,19 @@ -# 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 := qtxlsxwriter +$(PKG)_WEBSITE := https://github.com/dbzhang800/QtXlsxWriter/ +$(PKG)_DESCR := QtXlsxWriter $(PKG)_IGNORE := -$(PKG)_VERSION := ad90b6a2c21b300138ceb9fe9030a5917230f92d -$(PKG)_CHECKSUM := bebf32dab284d4774bedc6dc897ede5c74531495f28f2be66191fbdc3e1ce01f +$(PKG)_VERSION := 6895d8ba6c3a80768c98539445b124654801e8dd +$(PKG)_CHECKSUM := fdf6a7c81e1b8f222770471158b067d3aa49dd2de426bd066b346f2c10bebfb9 $(PKG)_SUBDIR := QtXlsxWriter-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := https://github.com/dbzhang800/QtXlsxWriter/archive/$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://github.com/VSRonin/QtXlsxWriter/archive/$($(PKG)_VERSION).tar.gz $(PKG)_DEPS := gcc qtbase -$(PKG)_UPDATE = $(call MXE_GET_GITHUB_SHA, dbzhang800/QtXlsxWriter, master) +$(PKG)_UPDATE = $(call MXE_GET_GITHUB_SHA, VSRonin/QtXlsxWriter, master) define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/qtxmlpatterns-1.patch b/src/qtxmlpatterns-1.patch index c78d7e37..f90018cb 100644 --- a/src/qtxmlpatterns-1.patch +++ b/src/qtxmlpatterns-1.patch @@ -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 5a2c60539f7cf6626bbeef3cca44aa172a64cc23 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> diff --git a/src/qtxmlpatterns.mk b/src/qtxmlpatterns.mk index 07126a29..c16145c6 100644 --- a/src/qtxmlpatterns.mk +++ b/src/qtxmlpatterns.mk @@ -1,10 +1,11 @@ -# 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 := qtxmlpatterns +$(PKG)_WEBSITE := https://www.qt.io/ +$(PKG)_DESCR := Qt $(PKG)_IGNORE := $(PKG)_VERSION = $(qtbase_VERSION) -$(PKG)_CHECKSUM := b537eb0252988e3805a32a16c65038973371d647baf246fdf703bde725d0e8ec +$(PKG)_CHECKSUM := 41f8223b1d4cfc475ef66888a178847cc7191954ed52d047be90f0d68ea755b8 $(PKG)_SUBDIR = $(subst qtbase,qtxmlpatterns,$(qtbase_SUBDIR)) $(PKG)_FILE = $(subst qtbase,qtxmlpatterns,$(qtbase_FILE)) $(PKG)_URL = $(subst qtbase,qtxmlpatterns,$(qtbase_URL)) @@ -15,9 +16,7 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - # invoke qmake with removed debug options as a workaround for - # https://bugreports.qt-project.org/browse/QTBUG-30898 - cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release' + cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/qwt-1-fixes-crlf.patch b/src/qwt-1-fixes-crlf.patch index d5c3c962..6ae37caf 100644 --- a/src/qwt-1-fixes-crlf.patch +++ b/src/qwt-1-fixes-crlf.patch @@ -1,71 +1,26 @@ -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. Contains ad hoc patches for cross building. -From 254b0588efb05c757b29b392bb8d147f35c836a7 Mon Sep 17 00:00:00 2001 -From: MXE +From 888c3a631c821e3d27efbcd3da6247c3a5add135 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> Date: Tue, 9 Dec 2014 20:10:47 +1100 -Subject: [PATCH 1/2] fix install prefix +Subject: [PATCH] fix install prefix diff --git a/qwtconfig.pri b/qwtconfig.pri -index 6c7ed0a..fcc91da 100644 +index 1fe6055..3a69039 100644 --- a/qwtconfig.pri +++ b/qwtconfig.pri -@@ -23,7 +23,7 @@ unix { +@@ -24,7 +24,7 @@ unix { } win32 { - QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION -+# QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION ++ # QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION + # QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION-qt-$$QT_VERSION } - QWT_INSTALL_DOCS = $${QWT_INSTALL_PREFIX}/doc -- -1.9.3 (Apple Git-50) - - -From c2481957edc8346d17d9157137bfb61c7db5fdaa Mon Sep 17 00:00:00 2001 -From: MXE -Date: Tue, 9 Dec 2014 20:15:24 +1100 -Subject: [PATCH 2/2] fix for deprecated QT_STATIC_CONST* macros - -taken from: -http://sourceforge.net/p/qwt/code/2063/ - -diff --git a/src/qwt_transform.cpp b/src/qwt_transform.cpp -index d42b046..5e7fa1d 100644 ---- a/src/qwt_transform.cpp -+++ b/src/qwt_transform.cpp -@@ -15,10 +15,10 @@ - #endif - - //! Smallest allowed value for logarithmic scales: 1.0e-150 --QT_STATIC_CONST_IMPL double QwtLogTransform::LogMin = 1.0e-150; -+const double QwtLogTransform::LogMin = 1.0e-150; - - //! Largest allowed value for logarithmic scales: 1.0e150 --QT_STATIC_CONST_IMPL double QwtLogTransform::LogMax = 1.0e150; -+const double QwtLogTransform::LogMax = 1.0e150; - - //! Constructor - QwtTransform::QwtTransform() -diff --git a/src/qwt_transform.h b/src/qwt_transform.h -index 13eeef2..ae28ac4 100644 ---- a/src/qwt_transform.h -+++ b/src/qwt_transform.h -@@ -107,8 +107,8 @@ public: - - virtual QwtTransform *copy() const; - -- QT_STATIC_CONST double LogMin; -- QT_STATIC_CONST double LogMax; -+ static const double LogMin; -+ static const double LogMax; - }; - - /*! --- -1.9.3 (Apple Git-50) +2.7.4 diff --git a/src/qwt.mk b/src/qwt.mk index 1a26c5f2..699d9dcf 100644 --- a/src/qwt.mk +++ b/src/qwt.mk @@ -1,17 +1,17 @@ -# 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 := qwt -$(PKG)_VERSION := 6.1.1 -$(PKG)_CHECKSUM := 675966a9e0b883fa5c70e2cee14a74f67bc0f8beb26fa33b4fea510517443c94 +$(PKG)_WEBSITE := https://qwt.sourceforge.io/ +$(PKG)_DESCR := Qwt +$(PKG)_VERSION := 6.1.3 +$(PKG)_CHECKSUM := 027c32c0473a682c1db5b9cb02ebed5e39a4fbb0afd2306e23b1113c30006042 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $($(PKG)_SUBDIR).zip -$(PKG)_WEBSITE := http://qwt.sourceforge.net/ -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc qtbase qtsvg define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/qwt/files/qwt/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/qwt/files/qwt/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef diff --git a/src/qwt_qt4-1-fixes-crlf.patch b/src/qwt_qt4-1-fixes-crlf.patch index 18b83a4e..b9603c2e 100644 --- a/src/qwt_qt4-1-fixes-crlf.patch +++ b/src/qwt_qt4-1-fixes-crlf.patch @@ -1,14 +1,24 @@ -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. ---- qwt-6.0.1/qwtconfig.pri 2011-08-01 16:34:05.000000000 +0200 -+++ qwt-6.0.1/qwtconfig.pri 2011-12-03 10:14:53.371757822 +0100 -@@ -23,7 +23,7 @@ +From 888c3a631c821e3d27efbcd3da6247c3a5add135 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Tue, 9 Dec 2014 20:10:47 +1100 +Subject: [PATCH] fix install prefix + + +diff --git a/qwtconfig.pri b/qwtconfig.pri +index 1fe6055..3a69039 100644 +--- a/qwtconfig.pri ++++ b/qwtconfig.pri +@@ -24,7 +24,7 @@ unix { } win32 { - QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION -+# QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION ++ # QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION + # QWT_INSTALL_PREFIX = C:/Qwt-$$QWT_VERSION-qt-$$QT_VERSION } - QWT_INSTALL_DOCS = $${QWT_INSTALL_PREFIX}/doc +-- +2.7.4 + diff --git a/src/qwt_qt4.mk b/src/qwt_qt4.mk index f2f71237..c1c2fce0 100644 --- a/src/qwt_qt4.mk +++ b/src/qwt_qt4.mk @@ -1,7 +1,8 @@ -# 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 := qwt_qt4 +$(PKG)_WEBSITE := https://qwt.sourceforge.io/ +$(PKG)_DESCR := Qwt-qt4 $(PKG)_VERSION = $(qwt_VERSION) $(PKG)_CHECKSUM = $(qwt_CHECKSUM) $(PKG)_SUBDIR = $(qwt_SUBDIR) diff --git a/src/qwtplot3d-1-fixes.patch b/src/qwtplot3d-1-fixes.patch index 6001f6f6..6064a9a9 100644 --- a/src/qwtplot3d-1-fixes.patch +++ b/src/qwtplot3d-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/qwtplot3d.mk b/src/qwtplot3d.mk index 265f6ac2..3e30fb45 100644 --- a/src/qwtplot3d.mk +++ b/src/qwtplot3d.mk @@ -1,17 +1,18 @@ -# 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 := qwtplot3d +$(PKG)_WEBSITE := https://qwtplot3d.sourceforge.io/ +$(PKG)_DESCR := QwtPlot3D $(PKG)_IGNORE := $(PKG)_VERSION := 0.2.7 $(PKG)_CHECKSUM := 1208336b15e82e7a9d22cbc743e46f27e2fad716094a9c133138f259fa299a42 $(PKG)_SUBDIR := $(PKG) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tgz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc qt zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/$(PKG)/files/$(PKG)/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/$(PKG)/files/$(PKG)/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef diff --git a/src/ragel.mk b/src/ragel.mk new file mode 100644 index 00000000..e3f6103f --- /dev/null +++ b/src/ragel.mk @@ -0,0 +1,28 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := ragel +$(PKG)_WEBSITE := https://www.colm.net/open-source/ragel/ +$(PKG)_DESCR := Ragel +$(PKG)_IGNORE := 7% +$(PKG)_VERSION := 6.9 +$(PKG)_CHECKSUM := 6e07be0fab5ca1d9c2d9e177718a018fc666141f594a5d6e7025658620cf660a +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://www.colm.net/files/ragel/$($(PKG)_FILE) +$(PKG)_TARGETS := $(BUILD) +$(PKG)_DEPS := + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://www.colm.net/open-source/ragel/' | \ + $(SED) -n 's,.*ragel-\([0-9.]*\)\.tar.*,\1,p' | \ + $(SORT) -V | \ + tail -1 +endef + +define $(PKG)_BUILD_$(BUILD) + cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \ + --prefix='$(PREFIX)/$(BUILD)' \ + CXXFLAGS=-std=c++03 + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install +endef diff --git a/src/readline-1.patch b/src/readline-1.patch index 938b9d0b..90592488 100644 --- a/src/readline-1.patch +++ b/src/readline-1.patch @@ -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 c0572cecbeadc8fe24c70c5c39d49210a39ac719 Mon Sep 17 00:00:00 2001 From: Timothy Gu <timothygu99@gmail.com> diff --git a/src/readline.mk b/src/readline.mk index 964db21a..271e5506 100644 --- a/src/readline.mk +++ b/src/readline.mk @@ -1,17 +1,18 @@ -# 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 := readline +$(PKG)_WEBSITE := https://tiswww.case.edu/php/chet/readline/rltop.html +$(PKG)_DESCR := Readline $(PKG)_IGNORE := $(PKG)_VERSION := 6.3 $(PKG)_CHECKSUM := 56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43 $(PKG)_SUBDIR := readline-$($(PKG)_VERSION) $(PKG)_FILE := readline-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://ftp.gnu.org/gnu/readline/$($(PKG)_FILE) +$(PKG)_URL := https://ftp.gnu.org/gnu/readline/$($(PKG)_FILE) $(PKG)_DEPS := gcc termcap define $(PKG)_UPDATE - $(WGET) -q -O- 'http://tiswww.case.edu/php/chet/readline/rltop.html' | \ + $(WGET) -q -O- 'https://tiswww.case.edu/php/chet/readline/rltop.html' | \ grep 'readline-' | \ $(SED) -n 's,.*readline-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 diff --git a/src/rubberband-1-pc-deps.patch b/src/rubberband-1-pc-deps.patch index 395e14ed..9d66d6ba 100644 --- a/src/rubberband-1-pc-deps.patch +++ b/src/rubberband-1-pc-deps.patch @@ -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. This patch has been taken from: https://bitbucket.org/breakfastquay/rubberband/issue/15/rubberbandpcin-missing-lstdc-lfftw3 diff --git a/src/rubberband.mk b/src/rubberband.mk index eee57f2c..f4c8c3ab 100644 --- a/src/rubberband.mk +++ b/src/rubberband.mk @@ -1,7 +1,8 @@ -# 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 := rubberband +$(PKG)_WEBSITE := http://breakfastquay.com/rubberband/ +$(PKG)_DESCR := Rubberband $(PKG)_IGNORE := $(PKG)_VERSION := 1.8.1 $(PKG)_CHECKSUM := ff0c63b0b5ce41f937a8a3bc560f27918c5fe0b90c6bc1cb70829b86ada82b75 @@ -24,14 +25,13 @@ define $(PKG)_BUILD DYNAMIC_EXTENSION='.dll' \ DYNAMIC_FULL_VERSION= \ DYNAMIC_ABI_VERSION= \ - lib vamp \ - $(if $(BUILD_STATIC),static,dynamic) + lib \ + $(if $(BUILD_STATIC),static,dynamic vamp) $(INSTALL) -d '$(PREFIX)/$(TARGET)/include/$(PKG)' $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/vamp' - $(INSTALL) -m644 '$(1)/$(PKG)/'* '$(PREFIX)/$(TARGET)/include/$(PKG)' - $(INSTALL) -m644 '$(1)/lib/lib$(PKG).$(LIB_SUFFIX)' '$(PREFIX)/$(TARGET)/lib' - $(INSTALL) -m644 '$(1)/lib/vamp-'*.dll '$(PREFIX)/$(TARGET)/lib/vamp' + $(INSTALL) -m644 '$(1)/$(PKG)/'*.h '$(PREFIX)/$(TARGET)/include/$(PKG)' + $(INSTALL) -m644 '$(1)/lib/'*.$(LIB_SUFFIX) '$(PREFIX)/$(TARGET)/$(if $(BUILD_STATIC),lib,bin)' $(INSTALL) -m644 '$(1)/vamp/vamp-rubberband.cat' '$(PREFIX)/$(TARGET)/lib/vamp' $(SED) 's,%PREFIX%,$(PREFIX)/$(TARGET),' '$(1)/$(PKG).pc.in' \ > '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc' diff --git a/src/rucksack-test.c b/src/rucksack-test.c index b18a991d..6d11a874 100644 --- a/src/rucksack-test.c +++ b/src/rucksack-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <rucksack/rucksack.h> diff --git a/src/rucksack.mk b/src/rucksack.mk index 3e421ffe..6928f902 100644 --- a/src/rucksack.mk +++ b/src/rucksack.mk @@ -1,7 +1,7 @@ -# 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 := rucksack +$(PKG)_WEBSITE := https://github.com/andrewrk/rucksack $(PKG)_IGNORE := $(PKG)_VERSION := 3.1.0 $(PKG)_CHECKSUM := dcdaab57b06fdeb9be63ed0f2c2de78d0b1e79f7a896bb1e76561216a4458e3b @@ -18,13 +18,21 @@ endef define $(PKG)_BUILD mkdir '$(1)/build' - cd '$(1)/build' && cmake .. -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' + cd '$(1)/build' && '$(TARGET)-cmake' .. - $(MAKE) -C '$(1)/build' -j '$(JOBS)' install VERBOSE=1 + $(MAKE) -C '$(1)/build' -j '$(JOBS)' \ + rucksack_static \ + rucksackspritesheet_static \ + VERBOSE=1 + + $(INSTALL) -d '$(PREFIX)/$(TARGET)/include/rucksack' + $(INSTALL) -m644 '$(1)/src/rucksack.h' '$(PREFIX)/$(TARGET)/include/rucksack' + $(INSTALL) -m644 '$(1)/src/spritesheet.h' '$(PREFIX)/$(TARGET)/include/rucksack' + $(INSTALL) -m644 '$(1)/build/lib'*.a '$(PREFIX)/$(TARGET)/lib/' '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic -std=c99 \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-rucksack.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-rucksack.exe' \ -lrucksack -llaxjson \ `'$(TARGET)-pkg-config' freeimage --cflags --libs` endef diff --git a/src/sdl-test.c b/src/sdl-test.c index 572c0ff3..610d1bad 100644 --- a/src/sdl-test.c +++ b/src/sdl-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <SDL.h> diff --git a/src/sdl-test.cmake b/src/sdl-test.cmake index 0b9a9371..a80d6b9e 100644 --- a/src/sdl-test.cmake +++ b/src/sdl-test.cmake @@ -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. # partial module - included by src/cmake/CMakeLists.txt diff --git a/src/sdl.mk b/src/sdl.mk index d0b033ca..16824184 100644 --- a/src/sdl.mk +++ b/src/sdl.mk @@ -1,17 +1,18 @@ -# 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 := sdl +$(PKG)_WEBSITE := https://www.libsdl.org/ +$(PKG)_DESCR := SDL $(PKG)_IGNORE := $(PKG)_VERSION := 1.2.15 $(PKG)_CHECKSUM := d6d316a793e5e348155f0dd93b979798933fb98aa1edebcc108829d6474aad00 $(PKG)_SUBDIR := SDL-$($(PKG)_VERSION) $(PKG)_FILE := SDL-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.libsdl.org/release/$($(PKG)_FILE) +$(PKG)_URL := https://www.libsdl.org/release/$($(PKG)_FILE) $(PKG)_DEPS := gcc libiconv define $(PKG)_UPDATE - $(WGET) -q -O- 'http://hg.libsdl.org/SDL/tags' | \ + $(WGET) -q -O- 'https://hg.libsdl.org/SDL/tags' | \ $(SED) -n 's,.*release-\([0-9][^<]*\).*,\1,p' | \ grep '^1\.' | \ $(SORT) -V | \ @@ -31,7 +32,7 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl.exe' \ + '$(PWD)/src/$(PKG)-test.c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl.exe' \ `'$(TARGET)-pkg-config' sdl --cflags --libs` # test cmake diff --git a/src/sdl2-1-fixes.patch b/src/sdl2-1-fixes.patch new file mode 100644 index 00000000..0ee5050a --- /dev/null +++ b/src/sdl2-1-fixes.patch @@ -0,0 +1,125 @@ +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: Robert Norris <rob@eatenbyagrue.org> +Date: Sat, 28 Mar 2015 21:47:00 +0100 +Subject: [PATCH] disable DirectInput because of missing wbemcli.h + +This patch has been taken from: +https://bugzilla.libsdl.org/show_bug.cgi?id=1739 + +diff --git a/configure.in b/configure.in +index 1111111..2222222 100644 +--- a/configure.in ++++ b/configure.in +@@ -2662,7 +2662,7 @@ AC_HELP_STRING([--enable-directx], [use DirectX for Windows audio/video [[defaul + # FIXME: latest Cygwin finds dinput headers, but we die on other win32 headers. + # FIXME: ...so force it off for now. + case "$host" in +- *-*-cygwin*) ++ *-*-cygwin* | *-pc-mingw32*) + have_dinput=false + ;; + esac + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tobias Gruetzmacher <tobias-git@23.gs> +Date: Sat, 28 Mar 2015 21:47:32 +0100 +Subject: [PATCH] fix shared build, libtool + +This patch is a combination of 2 patches from: +https://bugzilla.libsdl.org/show_bug.cgi?id=1431 + +- Use libtool everywhere (by john) +- MingW fixes for "Use libtool everywhere" (by Daniel Scharrer) + +These fix compiles in a strictly shared build (with --disable-static) by always +building libSDL2main.a and libSDL2_test.a staticly + +diff --git a/Makefile.in b/Makefile.in +index 1111111..2222222 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -36,10 +36,10 @@ GEN_HEADERS = @GEN_HEADERS@ + GEN_OBJECTS = @GEN_OBJECTS@ + VERSION_OBJECTS = @VERSION_OBJECTS@ + +-SDLMAIN_TARGET = libSDL2main.a ++SDLMAIN_TARGET = libSDL2main.la + SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@ + +-SDLTEST_TARGET = libSDL2_test.a ++SDLTEST_TARGET = libSDL2_test.la + SDLTEST_OBJECTS = @SDLTEST_OBJECTS@ + + WAYLAND_SCANNER = @WAYLAND_SCANNER@ +@@ -144,15 +144,13 @@ update-revision: + .PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d) + + $(objects)/$(TARGET): $(GEN_HEADERS) $(GEN_OBJECTS) $(OBJECTS) $(VERSION_OBJECTS) +- $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(OBJECTS) $(GEN_OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) ++ $(LIBTOOL) --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) + + $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS) +- $(RUN_CMD_AR)$(AR) cru $@ $(SDLMAIN_OBJECTS) +- $(RUN_CMD_RANLIB)$(RANLIB) $@ ++ $(LIBTOOL) --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) -all-static + + $(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS) +- $(RUN_CMD_AR)$(AR) cru $@ $(SDLTEST_OBJECTS) +- $(RUN_CMD_RANLIB)$(RANLIB) $@ ++ $(LIBTOOL) --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) -all-static + + install: all install-bin install-hdrs install-lib install-data + install-bin: +@@ -173,10 +171,8 @@ install-hdrs: update-revision + install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET) + $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir) + $(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET) +- $(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET) +- $(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET) +- $(INSTALL) -m 644 $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET) +- $(RANLIB) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET) ++ $(LIBTOOL) --mode=install $(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET) ++ $(LIBTOOL) --mode=install $(INSTALL) -m 644 $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET) + install-data: + $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal + $(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4 +diff --git a/configure.in b/configure.in +index 1111111..2222222 100644 +--- a/configure.in ++++ b/configure.in +@@ -3597,23 +3597,23 @@ GEN_OBJECTS=`echo "$GEN_SOURCES" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.l + + VERSION_OBJECTS=`echo $VERSION_SOURCES` + VERSION_DEPENDS=`echo $VERSION_SOURCES` +-VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'` ++VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.lo,g'` + VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\ +-\\$(objects)/\\2.o: \\1/\\2.rc\\\\ +- \\$(WINDRES) \\$< \\$@,g"` ++\\$(objects)/\\2.lo: \\1/\\2.rc\\\\ ++ \\$(LIBTOOL) --mode=compile --tag=RC \\$(WINDRES) -i \\$< -o \\$@,g"` + + SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES` + SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES` +-SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'` ++SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'` + SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\ +-\\$(objects)/\\2.o: \\1/\\2.c\\\\ ++\\$(objects)/\\2.lo: \\1/\\2.c\\\\ + \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` + + SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES` + SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES` +-SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'` ++SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'` + SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\ +-\\$(objects)/\\2.o: \\1/\\2.c\\\\ ++\\$(objects)/\\2.lo: \\1/\\2.c\\\\ + \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` + + # Set runtime shared library paths as needed + diff --git a/src/sdl2-1.patch b/src/sdl2-1.patch deleted file mode 100644 index dd830a7f..00000000 --- a/src/sdl2-1.patch +++ /dev/null @@ -1,595 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From b729ad357e09a18d1019aec3d23090de3ffae2bb Mon Sep 17 00:00:00 2001 -From: Robert Norris <rob@eatenbyagrue.org> -Date: Sat, 28 Mar 2015 21:47:00 +0100 -Subject: [PATCH 1/4] disable DirectInput because of missing wbemcli.h - -This patch has been taken from: -https://bugzilla.libsdl.org/show_bug.cgi?id=1739 - -diff --git a/configure.in b/configure.in -index 3d8a2de..7afa09e 100644 ---- a/configure.in -+++ b/configure.in -@@ -2406,7 +2406,7 @@ AC_HELP_STRING([--enable-directx], [use DirectX for Windows audio/video [[defaul - # FIXME: latest Cygwin finds dinput headers, but we die on other win32 headers. - # FIXME: ...so force it off for now. - case "$host" in -- *-*-cygwin*) -+ *-*-cygwin* | *-pc-mingw32*) - have_dinput=false - ;; - esac --- -2.1.0 - - -From a811c6b407ec6b1437c08a940fc3c738d7560fe6 Mon Sep 17 00:00:00 2001 -From: Tobias Gruetzmacher <tobias-git@23.gs> -Date: Sat, 28 Mar 2015 21:47:32 +0100 -Subject: [PATCH 2/4] fix shared build, libtool - -This patch is a combination of 2 patches from: -https://bugzilla.libsdl.org/show_bug.cgi?id=1431 - -- Use libtool everywhere (by john) -- MingW fixes for "Use libtool everywhere" (by Daniel Scharrer) - -These fix compiles in a strictly shared build (with --disable-static) by always -building libSDL2main.a and libSDL2_test.a staticly - -diff --git a/Makefile.in b/Makefile.in -index da42661..688847a 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -33,10 +33,10 @@ TARGET = libSDL2.la - OBJECTS = @OBJECTS@ - VERSION_OBJECTS = @VERSION_OBJECTS@ - --SDLMAIN_TARGET = libSDL2main.a -+SDLMAIN_TARGET = libSDL2main.la - SDLMAIN_OBJECTS = @SDLMAIN_OBJECTS@ - --SDLTEST_TARGET = libSDL2_test.a -+SDLTEST_TARGET = libSDL2_test.la - SDLTEST_OBJECTS = @SDLTEST_OBJECTS@ - - SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake configure configure.in debian include Makefile.* sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in src test VisualC.html VisualC Xcode Xcode-iOS -@@ -123,15 +123,13 @@ update-revision: - .PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d) - - $(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS) -- $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) -+ $(LIBTOOL) --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) - - $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS) -- $(AR) cru $@ $(SDLMAIN_OBJECTS) -- $(RANLIB) $@ -+ $(LIBTOOL) --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) -all-static - - $(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS) -- $(AR) cru $@ $(SDLTEST_OBJECTS) -- $(RANLIB) $@ -+ $(LIBTOOL) --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) -all-static - - install: all install-bin install-hdrs install-lib install-data - install-bin: -@@ -152,10 +150,8 @@ install-hdrs: update-revision - install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET) - $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir) - $(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET) -- $(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET) -- $(RANLIB) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET) -- $(INSTALL) -m 644 $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET) -- $(RANLIB) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET) -+ $(LIBTOOL) --mode=install $(INSTALL) -m 644 $(objects)/$(SDLMAIN_TARGET) $(DESTDIR)$(libdir)/$(SDLMAIN_TARGET) -+ $(LIBTOOL) --mode=install $(INSTALL) -m 644 $(objects)/$(SDLTEST_TARGET) $(DESTDIR)$(libdir)/$(SDLTEST_TARGET) - install-data: - $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(datadir)/aclocal - $(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4 -diff --git a/configure.in b/configure.in -index 7afa09e..34efcb0 100644 ---- a/configure.in -+++ b/configure.in -@@ -3136,23 +3136,23 @@ done - - VERSION_OBJECTS=`echo $VERSION_SOURCES` - VERSION_DEPENDS=`echo $VERSION_SOURCES` --VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'` -+VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.lo,g'` - VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\ --\\$(objects)/\\2.o: \\1/\\2.rc\\\\ -- \\$(WINDRES) \\$< \\$@,g"` -+\\$(objects)/\\2.lo: \\1/\\2.rc\\\\ -+ \\$(LIBTOOL) --mode=compile --tag=RC \\$(WINDRES) -i \\$< -o \\$@,g"` - - SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES` - SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES` --SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'` -+SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'` - SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\ --\\$(objects)/\\2.o: \\1/\\2.c\\\\ -+\\$(objects)/\\2.lo: \\1/\\2.c\\\\ - \\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` - - SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES` - SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES` --SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'` -+SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'` - SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\ --\\$(objects)/\\2.o: \\1/\\2.c\\\\ -+\\$(objects)/\\2.lo: \\1/\\2.c\\\\ - \\$(LIBTOOL) --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"` - - # Set runtime shared library paths as needed --- -2.1.0 - - -From 92a70a74906e8561010e431eda55ec6231f40872 Mon Sep 17 00:00:00 2001 -From: Mark Brand <mabrand@mabrand.nl> -Date: Sat, 28 Mar 2015 21:52:26 +0100 -Subject: [PATCH 3/4] suppress redeclarations - - -diff --git a/src/render/direct3d11/SDL_render_d3d11.c b/src/render/direct3d11/SDL_render_d3d11.c -index dbffd50..d7376d8 100644 ---- a/src/render/direct3d11/SDL_render_d3d11.c -+++ b/src/render/direct3d11/SDL_render_d3d11.c -@@ -131,6 +131,7 @@ typedef struct - } D3D11_RenderData; - - -+#if 0 // not for mingw-w64 4.0.1 - /* Defined here so we don't have to include uuid.lib */ - static const GUID IID_IDXGIFactory2 = { 0x50c83a1c, 0xe072, 0x4c48, { 0x87, 0xb0, 0x36, 0x30, 0xfa, 0x36, 0xa6, 0xd0 } }; - static const GUID IID_IDXGIDevice1 = { 0x77db970f, 0x6276, 0x48ba, { 0xba, 0x28, 0x07, 0x01, 0x43, 0xb4, 0x39, 0x2c } }; -@@ -138,6 +139,7 @@ static const GUID IID_ID3D11Texture2D = { 0x6f15aaf2, 0xd208, 0x4e89, { 0x9a, 0x - static const GUID IID_ID3D11Device1 = { 0xa04bfb29, 0x08ef, 0x43d6, { 0xa4, 0x9c, 0xa9, 0xbd, 0xbd, 0xcb, 0xe6, 0x86 } }; - static const GUID IID_ID3D11DeviceContext1 = { 0xbb2c6faa, 0xb5fb, 0x4082, { 0x8e, 0x6b, 0x38, 0x8b, 0x8c, 0xfa, 0x90, 0xe1 } }; - static const GUID IID_ID3D11Debug = { 0x79cf2233, 0x7536, 0x4948, { 0x9d, 0x36, 0x1e, 0x46, 0x92, 0xdc, 0x57, 0x60 } }; -+#endif - - /* Direct3D 11.x shaders - --- -2.1.0 - - -From a41006786258b97b16d42cff1f50c521a96b7a68 Mon Sep 17 00:00:00 2001 -From: Mark Brand <mabrand@mabrand.nl> -Date: Sat, 28 Mar 2015 23:39:37 +0100 -Subject: [PATCH 4/4] __FUNCTION__ cannot be concatenated because it is not a - macro - - -diff --git a/src/render/direct3d11/SDL_render_d3d11.c b/src/render/direct3d11/SDL_render_d3d11.c -index d7376d8..59272ae 100644 ---- a/src/render/direct3d11/SDL_render_d3d11.c -+++ b/src/render/direct3d11/SDL_render_d3d11.c -@@ -886,6 +886,14 @@ D3D11_DestroyRenderer(SDL_Renderer * renderer) - SDL_free(renderer); - } - -+void wrapper_SetErrorFromHRESULT(const char *context, const char *funct, HRESULT res) -+{ -+ char buf[1024]; -+ strcpy(buf, context); -+ strcat(buf, funct); -+ WIN_SetErrorFromHRESULT(buf, res); -+} -+ - static HRESULT - D3D11_CreateBlendMode(SDL_Renderer * renderer, - BOOL enableBlending, -@@ -912,7 +920,7 @@ D3D11_CreateBlendMode(SDL_Renderer * renderer, - blendDesc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL; - result = ID3D11Device_CreateBlendState(data->d3dDevice, &blendDesc, blendStateOutput); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateBlendState", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreateBlendState", result); - return result; - } - -@@ -994,14 +1002,14 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) - - result = CreateDXGIFactoryFunc(&IID_IDXGIFactory2, &data->dxgiFactory); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", CreateDXGIFactory", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "CreateDXGIFactory", result); - goto done; - } - - /* FIXME: Should we use the default adapter? */ - result = IDXGIFactory2_EnumAdapters(data->dxgiFactory, 0, &data->dxgiAdapter); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", D3D11CreateDevice", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "D3D11CreateDevice", result); - goto done; - } - -@@ -1030,25 +1038,25 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) - &d3dContext /* Returns the device immediate context. */ - ); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", D3D11CreateDevice", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "D3D11CreateDevice", result); - goto done; - } - - result = ID3D11Device_QueryInterface(d3dDevice, &IID_ID3D11Device1, &data->d3dDevice); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device to ID3D11Device1", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device to ID3D11Device1", result); - goto done; - } - - result = ID3D11DeviceContext_QueryInterface(d3dContext, &IID_ID3D11DeviceContext1, &data->d3dContext); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11DeviceContext to ID3D11DeviceContext1", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11DeviceContext to ID3D11DeviceContext1", result); - goto done; - } - - result = ID3D11Device_QueryInterface(d3dDevice, &IID_IDXGIDevice1, &dxgiDevice); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device to IDXGIDevice1", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device to IDXGIDevice1", result); - goto done; - } - -@@ -1057,7 +1065,7 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) - */ - result = IDXGIDevice1_SetMaximumFrameLatency(dxgiDevice, 1); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGIDevice1::SetMaximumFrameLatency", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "IDXGIDevice1::SetMaximumFrameLatency", result); - goto done; - } - -@@ -1086,7 +1094,7 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) - break; - - default: -- SDL_SetError(__FUNCTION__ ", Unexpected feature level: %d", data->featureLevel); -+ SDL_SetError("D3D11_CreateDeviceResources, Unexpected feature level: %d", data->featureLevel); - result = E_FAIL; - goto done; - } -@@ -1099,7 +1107,7 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) - &data->vertexShader - ); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateVertexShader", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreateVertexShader", result); - goto done; - } - -@@ -1112,7 +1120,7 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) - &data->inputLayout - ); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateInputLayout", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreateInputLayout", result); - goto done; - } - -@@ -1124,7 +1132,7 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) - &data->colorPixelShader - ); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreatePixelShader ['color' shader]", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreatePixelShader ['color' shader]", result); - goto done; - } - -@@ -1135,7 +1143,7 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) - &data->texturePixelShader - ); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreatePixelShader ['textures' shader]", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreatePixelShader ['textures' shader]", result); - goto done; - } - -@@ -1146,7 +1154,7 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) - &data->yuvPixelShader - ); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreatePixelShader ['yuv' shader]", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreatePixelShader ['yuv' shader]", result); - goto done; - } - -@@ -1161,7 +1169,7 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) - &data->vertexShaderConstants - ); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateBuffer [vertex shader constants]", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreateBuffer [vertex shader constants]", result); - goto done; - } - -@@ -1181,7 +1189,7 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) - &data->nearestPixelSampler - ); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateSamplerState [nearest-pixel filter]", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreateSamplerState [nearest-pixel filter]", result); - goto done; - } - -@@ -1191,7 +1199,7 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) - &data->linearSampler - ); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateSamplerState [linear filter]", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreateSamplerState [linear filter]", result); - goto done; - } - -@@ -1209,14 +1217,14 @@ D3D11_CreateDeviceResources(SDL_Renderer * renderer) - rasterDesc.SlopeScaledDepthBias = 0.0f; - result = ID3D11Device_CreateRasterizerState(data->d3dDevice, &rasterDesc, &data->mainRasterizer); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateRasterizerState [main rasterizer]", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreateRasterizerState [main rasterizer]", result); - goto done; - } - - rasterDesc.ScissorEnable = TRUE; - result = ID3D11Device_CreateRasterizerState(data->d3dDevice, &rasterDesc, &data->clippedRasterizer); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateRasterizerState [clipped rasterizer]", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreateRasterizerState [clipped rasterizer]", result); - goto done; - } - -@@ -1376,7 +1384,7 @@ D3D11_CreateSwapChain(SDL_Renderer * renderer, int w, int h) - &data->swapChain - ); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGIFactory2::CreateSwapChainForCoreWindow", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "IDXGIFactory2::CreateSwapChainForCoreWindow", result); - goto done; - } - } else if (usingXAML) { -@@ -1386,18 +1394,18 @@ D3D11_CreateSwapChain(SDL_Renderer * renderer, int w, int h) - NULL, - &data->swapChain); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGIFactory2::CreateSwapChainForComposition", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "IDXGIFactory2::CreateSwapChainForComposition", result); - goto done; - } - - #if WINAPI_FAMILY == WINAPI_FAMILY_APP - result = ISwapChainBackgroundPanelNative_SetSwapChain(WINRT_GlobalSwapChainBackgroundPanelNative, (IDXGISwapChain *) data->swapChain); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ISwapChainBackgroundPanelNative::SetSwapChain", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ISwapChainBackgroundPanelNative::SetSwapChain", result); - goto done; - } - #else -- SDL_SetError(__FUNCTION__ ", XAML support is not yet available for Windows Phone"); -+ SDL_SetError("D3D11_CreateSwapChain, XAML support is not yet available for Windows Phone"); - result = E_FAIL; - goto done; - #endif -@@ -1416,11 +1424,11 @@ D3D11_CreateSwapChain(SDL_Renderer * renderer, int w, int h) - &data->swapChain - ); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGIFactory2::CreateSwapChainForHwnd", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "IDXGIFactory2::CreateSwapChainForHwnd", result); - goto done; - } - #else -- SDL_SetError(__FUNCTION__", Unable to find something to attach a swap chain to"); -+ SDL_SetError("D3D11_CreateSwapChain, Unable to find something to attach a swap chain to"); - goto done; - #endif /* ifdef __WIN32__ / else */ - } -@@ -1466,7 +1474,7 @@ D3D11_CreateWindowSizeDependentResources(SDL_Renderer * renderer) - 0 - ); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGISwapChain::ResizeBuffers", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "IDXGISwapChain::ResizeBuffers", result); - goto done; - } - #endif -@@ -1487,7 +1495,7 @@ D3D11_CreateWindowSizeDependentResources(SDL_Renderer * renderer) - if (data->swapEffect == DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL) { - result = IDXGISwapChain1_SetRotation(data->swapChain, data->rotation); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGISwapChain1::SetRotation", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "IDXGISwapChain1::SetRotation", result); - goto done; - } - } -@@ -1499,7 +1507,7 @@ D3D11_CreateWindowSizeDependentResources(SDL_Renderer * renderer) - &backBuffer - ); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGISwapChain::GetBuffer [back-buffer]", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "IDXGISwapChain::GetBuffer [back-buffer]", result); - goto done; - } - -@@ -1510,7 +1518,7 @@ D3D11_CreateWindowSizeDependentResources(SDL_Renderer * renderer) - &data->mainRenderTargetView - ); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device::CreateRenderTargetView", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device::CreateRenderTargetView", result); - goto done; - } - -@@ -1630,7 +1638,7 @@ D3D11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) - ); - if (FAILED(result)) { - D3D11_DestroyTexture(renderer, texture); -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateTexture2D", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreateTexture2D", result); - return -1; - } - -@@ -1648,7 +1656,7 @@ D3D11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) - ); - if (FAILED(result)) { - D3D11_DestroyTexture(renderer, texture); -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateTexture2D", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreateTexture2D", result); - return -1; - } - -@@ -1659,7 +1667,7 @@ D3D11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) - ); - if (FAILED(result)) { - D3D11_DestroyTexture(renderer, texture); -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateTexture2D", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreateTexture2D", result); - return -1; - } - } -@@ -1675,7 +1683,7 @@ D3D11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) - ); - if (FAILED(result)) { - D3D11_DestroyTexture(renderer, texture); -- WIN_SetErrorFromHRESULT(__FUNCTION__ "ID3D11Device1::CreateShaderResourceView", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreateShaderResourceView", result); - return -1; - } - -@@ -1687,7 +1695,7 @@ D3D11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) - ); - if (FAILED(result)) { - D3D11_DestroyTexture(renderer, texture); -- WIN_SetErrorFromHRESULT(__FUNCTION__ "ID3D11Device1::CreateShaderResourceView", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreateShaderResourceView", result); - return -1; - } - result = ID3D11Device_CreateShaderResourceView(rendererData->d3dDevice, -@@ -1697,7 +1705,7 @@ D3D11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) - ); - if (FAILED(result)) { - D3D11_DestroyTexture(renderer, texture); -- WIN_SetErrorFromHRESULT(__FUNCTION__ "ID3D11Device1::CreateShaderResourceView", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreateShaderResourceView", result); - return -1; - } - } -@@ -1714,7 +1722,7 @@ D3D11_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture) - &textureData->mainTextureRenderTargetView); - if (FAILED(result)) { - D3D11_DestroyTexture(renderer, texture); -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateRenderTargetView", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreateRenderTargetView", result); - return -1; - } - } -@@ -1770,7 +1778,7 @@ D3D11_UpdateTextureInternal(D3D11_RenderData *rendererData, ID3D11Texture2D *tex - NULL, - &stagingTexture); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateTexture2D [create staging texture]", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreateTexture2D [create staging texture]", result); - return -1; - } - -@@ -1783,7 +1791,7 @@ D3D11_UpdateTextureInternal(D3D11_RenderData *rendererData, ID3D11Texture2D *tex - &textureMemory - ); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11DeviceContext1::Map [map staging texture]", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11DeviceContext1::Map [map staging texture]", result); - SAFE_RELEASE(stagingTexture); - return -1; - } -@@ -1945,7 +1953,7 @@ D3D11_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, - NULL, - &textureData->stagingTexture); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateTexture2D [create staging texture]", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreateTexture2D [create staging texture]", result); - return -1; - } - -@@ -1958,7 +1966,7 @@ D3D11_LockTexture(SDL_Renderer * renderer, SDL_Texture * texture, - &textureMemory - ); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11DeviceContext1::Map [map staging texture]", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11DeviceContext1::Map [map staging texture]", result); - SAFE_RELEASE(textureData->stagingTexture); - return -1; - } -@@ -2240,7 +2248,7 @@ D3D11_UpdateVertexBuffer(SDL_Renderer *renderer, - &mappedResource - ); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11DeviceContext1::Map [vertex buffer]", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11DeviceContext1::Map [vertex buffer]", result); - return -1; - } - SDL_memcpy(mappedResource.pData, vertexData, dataSizeInBytes); -@@ -2264,7 +2272,7 @@ D3D11_UpdateVertexBuffer(SDL_Renderer *renderer, - &rendererData->vertexBuffer - ); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateBuffer [vertex buffer]", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreateBuffer [vertex buffer]", result); - return -1; - } - -@@ -2734,7 +2742,7 @@ D3D11_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, - &backBuffer - ); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGISwapChain1::GetBuffer [get back buffer]", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "IDXGISwapChain1::GetBuffer [get back buffer]", result); - goto done; - } - -@@ -2751,7 +2759,7 @@ D3D11_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, - NULL, - &stagingTexture); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11Device1::CreateTexture2D [create staging texture]", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11Device1::CreateTexture2D [create staging texture]", result); - goto done; - } - -@@ -2783,7 +2791,7 @@ D3D11_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, - 0, - &textureMemory); - if (FAILED(result)) { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", ID3D11DeviceContext1::Map [map staging texture]", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "ID3D11DeviceContext1::Map [map staging texture]", result); - goto done; - } - -@@ -2802,7 +2810,7 @@ D3D11_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, - * Get the error message, and attach some extra data to it. - */ - char errorMessage[1024]; -- SDL_snprintf(errorMessage, sizeof(errorMessage), __FUNCTION__ ", Convert Pixels failed: %s", SDL_GetError()); -+ SDL_snprintf(errorMessage, sizeof(errorMessage), "D3D11_RenderReadPixels, Convert Pixels failed: %s", SDL_GetError()); - SDL_SetError(errorMessage); - goto done; - } -@@ -2871,7 +2879,7 @@ D3D11_RenderPresent(SDL_Renderer * renderer) - /* We probably went through a fullscreen <-> windowed transition */ - D3D11_CreateWindowSizeDependentResources(renderer); - } else { -- WIN_SetErrorFromHRESULT(__FUNCTION__ ", IDXGISwapChain::Present", result); -+ wrapper_SetErrorFromHRESULT(__FUNCTION__, "IDXGISwapChain::Present", result); - } - } - } --- -2.1.0 - diff --git a/src/sdl2-test.c b/src/sdl2-test.c new file mode 100644 index 00000000..8bd6aa7f --- /dev/null +++ b/src/sdl2-test.c @@ -0,0 +1,21 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include <SDL.h> + +int main(int argc, char *argv[]) +{ + SDL_Window* window = NULL; + + (void)argc; + (void)argv; + + if (SDL_Init(SDL_INIT_VIDEO) < 0) return 1; + + window = SDL_CreateWindow("MXE test", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, SDL_WINDOW_SHOWN); + SDL_Delay(2000); + SDL_DestroyWindow(window); + SDL_Quit(); + return 0; +} diff --git a/src/sdl2.mk b/src/sdl2.mk index 6f40659c..288b08a9 100644 --- a/src/sdl2.mk +++ b/src/sdl2.mk @@ -1,17 +1,18 @@ -# 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 := sdl2 +$(PKG)_WEBSITE := https://www.libsdl.org/ +$(PKG)_DESCR := SDL2 $(PKG)_IGNORE := -$(PKG)_VERSION := 2.0.3 -$(PKG)_CHECKSUM := a5a69a6abf80bcce713fa873607735fe712f44276a7f048d60a61bb2f6b3c90c +$(PKG)_VERSION := 2.0.5 +$(PKG)_CHECKSUM := 442038cf55965969f2ff06d976031813de643af9c9edc9e331bd761c242e8785 $(PKG)_SUBDIR := SDL2-$($(PKG)_VERSION) $(PKG)_FILE := SDL2-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.libsdl.org/release/$($(PKG)_FILE) +$(PKG)_URL := https://www.libsdl.org/release/$($(PKG)_FILE) $(PKG)_DEPS := gcc libiconv define $(PKG)_UPDATE - $(WGET) -q -O- 'http://hg.libsdl.org/SDL/tags' | \ + $(WGET) -q -O- 'https://hg.libsdl.org/SDL/tags' | \ $(SED) -n 's,.*release-\([0-9][^<]*\).*,\1,p' | \ head -1 endef @@ -27,4 +28,10 @@ define $(PKG)_BUILD $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install ln -sf '$(PREFIX)/$(TARGET)/bin/sdl2-config' '$(PREFIX)/bin/$(TARGET)-sdl2-config' + + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-sdl2.exe' \ + `'$(TARGET)-pkg-config' sdl2 --cflags --libs` + endef diff --git a/src/sdl2_gfx-test.c b/src/sdl2_gfx-test.c index 2b6b06cc..a905883f 100644 --- a/src/sdl2_gfx-test.c +++ b/src/sdl2_gfx-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <SDL.h> diff --git a/src/sdl2_gfx.mk b/src/sdl2_gfx.mk index 370b5a89..360c28f4 100644 --- a/src/sdl2_gfx.mk +++ b/src/sdl2_gfx.mk @@ -1,10 +1,11 @@ -# 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 := sdl2_gfx +$(PKG)_WEBSITE := http://www.ferzkopp.net/joomla/content/view/19/14/ +$(PKG)_DESCR := SDL2_gfx $(PKG)_IGNORE := -$(PKG)_VERSION := 1.0.1 -$(PKG)_CHECKSUM := d69bcbceb811b4e5712fbad3ede737166327f44b727f1388c32581dbbe8c599a +$(PKG)_VERSION := 1.0.3 +$(PKG)_CHECKSUM := a4066bd467c96469935a4b1fe472893393e7d74e45f95d59f69726784befd8f8 $(PKG)_SUBDIR := SDL2_gfx-$($(PKG)_VERSION) $(PKG)_FILE := SDL2_gfx-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://www.ferzkopp.net/Software/SDL2_gfx/$($(PKG)_FILE) @@ -27,6 +28,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl2_gfx.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-sdl2_gfx.exe' \ `'$(TARGET)-pkg-config' SDL2_gfx --cflags --libs` endef diff --git a/src/sdl2_image.mk b/src/sdl2_image.mk index d7e5a494..cf5c4b05 100644 --- a/src/sdl2_image.mk +++ b/src/sdl2_image.mk @@ -1,17 +1,18 @@ -# 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 := sdl2_image +$(PKG)_WEBSITE := https://www.libsdl.org/ +$(PKG)_DESCR := SDL2_image $(PKG)_IGNORE := -$(PKG)_VERSION := 2.0.0 -$(PKG)_CHECKSUM := b29815c73b17633baca9f07113e8ac476ae66412dec0d29a5045825c27a47234 +$(PKG)_VERSION := 2.0.1 +$(PKG)_CHECKSUM := 3a3eafbceea5125c04be585373bfd8b3a18f259bd7eae3efc4e6d8e60e0d7f64 $(PKG)_SUBDIR := SDL2_image-$($(PKG)_VERSION) $(PKG)_FILE := SDL2_image-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.libsdl.org/projects/SDL_image/release/$($(PKG)_FILE) +$(PKG)_URL := https://www.libsdl.org/projects/SDL_image/release/$($(PKG)_FILE) $(PKG)_DEPS := gcc jpeg libpng libwebp sdl2 tiff define $(PKG)_UPDATE - $(WGET) -q -O- 'http://hg.libsdl.org/SDL_image/tags' | \ + $(WGET) -q -O- 'https://hg.libsdl.org/SDL_image/tags' | \ $(SED) -n 's,.*release-\([0-9][^<]*\).*,\1,p' | \ head -1 endef diff --git a/src/sdl2_mixer-1-linkfix.patch b/src/sdl2_mixer-1-linkfix.patch index baa02b86..5be3a0a3 100644 --- a/src/sdl2_mixer-1-linkfix.patch +++ b/src/sdl2_mixer-1-linkfix.patch @@ -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. Fix link order for the 2 test programs. diff --git a/src/sdl2_mixer.mk b/src/sdl2_mixer.mk index dbee3793..dc688b55 100644 --- a/src/sdl2_mixer.mk +++ b/src/sdl2_mixer.mk @@ -1,17 +1,18 @@ -# 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 := sdl2_mixer +$(PKG)_WEBSITE := https://www.libsdl.org/ +$(PKG)_DESCR := SDL2_mixer $(PKG)_IGNORE := -$(PKG)_VERSION := 2.0.0 -$(PKG)_CHECKSUM := a8ce0e161793791adeff258ca6214267fdd41b3c073d2581cd5265c8646f725b +$(PKG)_VERSION := 2.0.1 +$(PKG)_CHECKSUM := 5a24f62a610249d744cbd8d28ee399d8905db7222bf3bdbc8a8b4a76e597695f $(PKG)_SUBDIR := SDL2_mixer-$($(PKG)_VERSION) $(PKG)_FILE := SDL2_mixer-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.libsdl.org/projects/SDL_mixer/release/$($(PKG)_FILE) +$(PKG)_URL := https://www.libsdl.org/projects/SDL_mixer/release/$($(PKG)_FILE) $(PKG)_DEPS := gcc libmodplug ogg sdl2 smpeg2 vorbis define $(PKG)_UPDATE - $(WGET) -q -O- 'http://hg.libsdl.org/SDL_mixer/tags' | \ + $(WGET) -q -O- 'https://hg.libsdl.org/SDL_mixer/tags' | \ $(SED) -n 's,.*release-\([0-9][^<]*\).*,\1,p' | \ head -1 endef diff --git a/src/sdl2_net-1-winsocks2.patch b/src/sdl2_net-1-winsocks2.patch index 9d4376df..49b6565b 100644 --- a/src/sdl2_net-1-winsocks2.patch +++ b/src/sdl2_net-1-winsocks2.patch @@ -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 68e75d3818547ee17f1a67283d655bee51e59568 Mon Sep 17 00:00:00 2001 From: Timothy Gu <timothygu99@gmail.com> diff --git a/src/sdl2_net-test.c b/src/sdl2_net-test.c index c5204a56..bec5c47d 100644 --- a/src/sdl2_net-test.c +++ b/src/sdl2_net-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <SDL_net.h> diff --git a/src/sdl2_net.mk b/src/sdl2_net.mk index f73c04d4..6e07b38b 100644 --- a/src/sdl2_net.mk +++ b/src/sdl2_net.mk @@ -1,17 +1,17 @@ -# 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 := sdl2_net +$(PKG)_WEBSITE := https://www.libsdl.org/ $(PKG)_IGNORE := $(PKG)_VERSION := 2.0.0 $(PKG)_CHECKSUM := d715be30783cc99e541626da52079e308060b21d4f7b95f0224b1d06c1faacab $(PKG)_SUBDIR := SDL2_net-$($(PKG)_VERSION) $(PKG)_FILE := SDL2_net-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.libsdl.org/projects/SDL_net/release/$($(PKG)_FILE) +$(PKG)_URL := https://www.libsdl.org/projects/SDL_net/release/$($(PKG)_FILE) $(PKG)_DEPS := gcc sdl2 define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.libsdl.org/projects/SDL_net/release/?C=M;O=D' | \ + $(WGET) -q -O- 'https://www.libsdl.org/projects/SDL_net/release/?C=M;O=D' | \ $(SED) -n 's,.*SDL_net-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef @@ -26,7 +26,7 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -std=c99 -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl2_net.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-sdl2_net.exe' \ `'$(TARGET)-pkg-config' SDL2_net --cflags --libs` \ -lws2_32 -liphlpapi endef diff --git a/src/sdl2_ttf.mk b/src/sdl2_ttf.mk index 78842454..660cada4 100644 --- a/src/sdl2_ttf.mk +++ b/src/sdl2_ttf.mk @@ -1,17 +1,18 @@ -# 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 := sdl2_ttf +$(PKG)_WEBSITE := https://www.libsdl.org/ +$(PKG)_DESCR := SDL2_ttf $(PKG)_IGNORE := -$(PKG)_VERSION := 2.0.12 -$(PKG)_CHECKSUM := 8728605443ea1cca5cad501dc34dc0cb15135d1e575551da6d151d213d356f6e +$(PKG)_VERSION := 2.0.14 +$(PKG)_CHECKSUM := 34db5e20bcf64e7071fe9ae25acaa7d72bdc4f11ab3ce59acc768ab62fe39276 $(PKG)_SUBDIR := SDL2_ttf-$($(PKG)_VERSION) $(PKG)_FILE := SDL2_ttf-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.libsdl.org/projects/SDL_ttf/release/$($(PKG)_FILE) +$(PKG)_URL := https://www.libsdl.org/projects/SDL_ttf/release/$($(PKG)_FILE) $(PKG)_DEPS := gcc freetype sdl2 define $(PKG)_UPDATE - $(WGET) -q -O- 'http://hg.libsdl.org/SDL_ttf/tags' | \ + $(WGET) -q -O- 'https://hg.libsdl.org/SDL_ttf/tags' | \ $(SED) -n 's,.*release-\([0-9][^<]*\).*,\1,p' | \ head -1 endef @@ -19,9 +20,7 @@ endef define $(PKG)_BUILD echo 'Requires.private: freetype2' >> '$(1)/SDL2_ttf.pc.in' cd '$(1)' && ./configure \ - --host='$(TARGET)' \ - --disable-shared \ - --prefix='$(PREFIX)/$(TARGET)' \ + $(MXE_CONFIGURE_OPTS) \ --with-sdl-prefix='$(PREFIX)/$(TARGET)' \ --disable-sdltest \ --with-freetype-prefix='$(PREFIX)/$(TARGET)' diff --git a/src/sdl_gfx-test.c b/src/sdl_gfx-test.c index e957f2e5..6b04e45d 100644 --- a/src/sdl_gfx-test.c +++ b/src/sdl_gfx-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <SDL.h> diff --git a/src/sdl_gfx.mk b/src/sdl_gfx.mk index bfd08604..4012f146 100644 --- a/src/sdl_gfx.mk +++ b/src/sdl_gfx.mk @@ -1,7 +1,8 @@ -# 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 := sdl_gfx +$(PKG)_WEBSITE := http://www.ferzkopp.net/joomla/content/view/19/14/ +$(PKG)_DESCR := SDL_gfx $(PKG)_IGNORE := $(PKG)_VERSION := 2.0.25 $(PKG)_CHECKSUM := 556eedc06b6cf29eb495b6d27f2dcc51bf909ad82389ba2fa7bdc4dec89059c0 @@ -25,6 +26,6 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl_gfx.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-sdl_gfx.exe' \ `'$(TARGET)-pkg-config' SDL_gfx --cflags --libs` endef diff --git a/src/sdl_image-test-CMakeLists.txt b/src/sdl_image-test-CMakeLists.txt index bd609867..9fc282bc 100644 --- a/src/sdl_image-test-CMakeLists.txt +++ b/src/sdl_image-test-CMakeLists.txt @@ -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. project(SDL_image_test) cmake_minimum_required(VERSION 2.8) diff --git a/src/sdl_image-test.c b/src/sdl_image-test.c index a3c98427..7d34dfa1 100644 --- a/src/sdl_image-test.c +++ b/src/sdl_image-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <SDL.h> diff --git a/src/sdl_image.mk b/src/sdl_image.mk index b6cf2bf8..b0879463 100644 --- a/src/sdl_image.mk +++ b/src/sdl_image.mk @@ -1,17 +1,18 @@ -# 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 := sdl_image +$(PKG)_WEBSITE := https://www.libsdl.org/projects/SDL_image/ +$(PKG)_DESCR := SDL_image $(PKG)_IGNORE := $(PKG)_VERSION := 1.2.12 $(PKG)_CHECKSUM := 0b90722984561004de84847744d566809dbb9daf732a9e503b91a1b5a84e5699 $(PKG)_SUBDIR := SDL_image-$($(PKG)_VERSION) $(PKG)_FILE := SDL_image-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.libsdl.org/projects/SDL_image/release/$($(PKG)_FILE) +$(PKG)_URL := https://www.libsdl.org/projects/SDL_image/release/$($(PKG)_FILE) $(PKG)_DEPS := gcc jpeg libpng libwebp sdl tiff define $(PKG)_UPDATE - $(WGET) -q -O- 'http://hg.libsdl.org/SDL_image/tags' | \ + $(WGET) -q -O- 'https://hg.libsdl.org/SDL_image/tags' | \ $(SED) -n 's,.*release-\([0-9][^<]*\).*,\1,p' | \ grep '^1\.' | \ $(SORT) -V | \ @@ -36,14 +37,13 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl_image.exe' \ + '$(PWD)/src/$(PKG)-test.c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl_image.exe' \ `'$(TARGET)-pkg-config' SDL_image --cflags --libs` mkdir -p '$(1)/cmake-build-test' - cp '$(2)-CMakeLists.txt' '$(1)/cmake-build-test/CMakeLists.txt' - cp '$(2).c' '$(1)/cmake-build-test/' - cd '$(1)/cmake-build-test' && cmake . \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' + cp '$(PWD)/src/$(PKG)-test-CMakeLists.txt' '$(1)/cmake-build-test/CMakeLists.txt' + cp '$(PWD)/src/$(PKG)-test.c' '$(1)/cmake-build-test/' + cd '$(1)/cmake-build-test' && '$(TARGET)-cmake' $(MAKE) -C '$(1)/cmake-build-test' -j '$(JOBS)' endef diff --git a/src/sdl_mixer-1-fix-double-free.patch b/src/sdl_mixer-1-fix-double-free.patch index a987ec1b..4ee3a50d 100644 --- a/src/sdl_mixer-1-fix-double-free.patch +++ b/src/sdl_mixer-1-fix-double-free.patch @@ -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. https://bugs.gentoo.org/show_bug.cgi?id=406739 Nikos Chantziaras 2012-03-03 03:13:39 EST diff --git a/src/sdl_mixer-test.c b/src/sdl_mixer-test.c index 0e81c0c8..f4baa45b 100644 --- a/src/sdl_mixer-test.c +++ b/src/sdl_mixer-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <SDL_mixer.h> diff --git a/src/sdl_mixer.mk b/src/sdl_mixer.mk index 01a93368..a8a85e96 100644 --- a/src/sdl_mixer.mk +++ b/src/sdl_mixer.mk @@ -1,17 +1,18 @@ -# 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 := sdl_mixer +$(PKG)_WEBSITE := https://www.libsdl.org/projects/SDL_mixer/ +$(PKG)_DESCR := SDL_mixer $(PKG)_IGNORE := $(PKG)_VERSION := 1.2.12 $(PKG)_CHECKSUM := 1644308279a975799049e4826af2cfc787cad2abb11aa14562e402521f86992a $(PKG)_SUBDIR := SDL_mixer-$($(PKG)_VERSION) $(PKG)_FILE := SDL_mixer-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.libsdl.org/projects/SDL_mixer/release/$($(PKG)_FILE) +$(PKG)_URL := https://www.libsdl.org/projects/SDL_mixer/release/$($(PKG)_FILE) $(PKG)_DEPS := gcc libmodplug ogg sdl smpeg vorbis define $(PKG)_UPDATE - $(WGET) -q -O- 'http://hg.libsdl.org/SDL_mixer/tags' | \ + $(WGET) -q -O- 'https://hg.libsdl.org/SDL_mixer/tags' | \ $(SED) -n 's,.*release-\([0-9][^<]*\).*,\1,p' | \ grep '^1\.' | \ $(SORT) -V | \ @@ -49,7 +50,7 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl_mixer.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-sdl_mixer.exe' \ `'$(TARGET)-pkg-config' SDL_mixer --cflags --libs` endef diff --git a/src/sdl_net-1-fixes.patch b/src/sdl_net-1-fixes.patch index ca361e33..a349b1a0 100644 --- a/src/sdl_net-1-fixes.patch +++ b/src/sdl_net-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/sdl_net-2-winsocks2.patch b/src/sdl_net-2-winsocks2.patch index 9d4376df..49b6565b 100644 --- a/src/sdl_net-2-winsocks2.patch +++ b/src/sdl_net-2-winsocks2.patch @@ -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 68e75d3818547ee17f1a67283d655bee51e59568 Mon Sep 17 00:00:00 2001 From: Timothy Gu <timothygu99@gmail.com> diff --git a/src/sdl_net-test.c b/src/sdl_net-test.c index c5204a56..bec5c47d 100644 --- a/src/sdl_net-test.c +++ b/src/sdl_net-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <SDL_net.h> diff --git a/src/sdl_net.mk b/src/sdl_net.mk index 2ce655ea..066c1aa5 100644 --- a/src/sdl_net.mk +++ b/src/sdl_net.mk @@ -1,17 +1,18 @@ -# 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 := sdl_net +$(PKG)_WEBSITE := https://www.libsdl.org/projects/SDL_net/ +$(PKG)_DESCR := SDL_net $(PKG)_IGNORE := $(PKG)_VERSION := 1.2.8 $(PKG)_CHECKSUM := 5f4a7a8bb884f793c278ac3f3713be41980c5eedccecff0260411347714facb4 $(PKG)_SUBDIR := SDL_net-$($(PKG)_VERSION) $(PKG)_FILE := SDL_net-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.libsdl.org/projects/SDL_net/release/$($(PKG)_FILE) +$(PKG)_URL := https://www.libsdl.org/projects/SDL_net/release/$($(PKG)_FILE) $(PKG)_DEPS := gcc sdl define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.libsdl.org/projects/SDL_net/release/?C=M;O=D' | \ + $(WGET) -q -O- 'https://www.libsdl.org/projects/SDL_net/release/?C=M;O=D' | \ $(SED) -n 's,.*SDL_net-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef @@ -29,7 +30,7 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl_net.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-sdl_net.exe' \ `'$(TARGET)-pkg-config' SDL_net --cflags --libs` endef diff --git a/src/sdl_pango-1-api-adds.patch b/src/sdl_pango-1-api-adds.patch index b0e38423..4c2078e0 100644 --- a/src/sdl_pango-1-api-adds.patch +++ b/src/sdl_pango-1-api-adds.patch @@ -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. This patch has been taken from: http://zarb.org/~gc/t/SDL_Pango-0.1.2-API-adds.patch diff --git a/src/sdl_pango-2-static-matrices.patch b/src/sdl_pango-2-static-matrices.patch index 929350c2..c0ae1fe2 100644 --- a/src/sdl_pango-2-static-matrices.patch +++ b/src/sdl_pango-2-static-matrices.patch @@ -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. --- SDL_Pango-0.1.2.orig/src/SDL_Pango.h 2010-04-08 11:33:48.000000000 +0200 +++ SDL_Pango-0.1.2/src/SDL_Pango.h 2010-04-08 11:36:51.000000000 +0200 diff --git a/src/sdl_pango.mk b/src/sdl_pango.mk index 314c1b59..8ce3f19a 100644 --- a/src/sdl_pango.mk +++ b/src/sdl_pango.mk @@ -1,17 +1,18 @@ -# 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 := sdl_pango +$(PKG)_WEBSITE := https://sdlpango.sourceforge.io/ +$(PKG)_DESCR := SDL_Pango $(PKG)_IGNORE := $(PKG)_VERSION := 0.1.2 $(PKG)_CHECKSUM := 7f75d3b97acf707c696ea126424906204ebfa07660162de925173cdd0257eba4 $(PKG)_SUBDIR := SDL_Pango-$($(PKG)_VERSION) $(PKG)_FILE := SDL_Pango-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/sdlpango/SDL_Pango/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/sdlpango/SDL_Pango/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc pango sdl define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/sdlpango/files/SDL_Pango/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/sdlpango/files/SDL_Pango/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef diff --git a/src/sdl_rwhttp-test.c b/src/sdl_rwhttp-test.c index 4fd0d85f..aaa4c263 100644 --- a/src/sdl_rwhttp-test.c +++ b/src/sdl_rwhttp-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. * * This is a simple test program for SDL_rwhttp that tries to * fetch something from the web. diff --git a/src/sdl_rwhttp.mk b/src/sdl_rwhttp.mk index 1b342941..c5874daf 100644 --- a/src/sdl_rwhttp.mk +++ b/src/sdl_rwhttp.mk @@ -1,7 +1,8 @@ -# 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 := sdl_rwhttp +$(PKG)_WEBSITE := https://github.com/mgerhardy/SDL_rwhttp/ +$(PKG)_DESCR := SDL_rwhttp $(PKG)_IGNORE := $(PKG)_VERSION := 0.2.0 $(PKG)_CHECKSUM := 9341f427901b5d24d07fd74c8a9124b3c363669142cdf0b3675ac72afe793ea1 @@ -11,7 +12,7 @@ $(PKG)_URL := https://github.com/mgerhardy/SDL_rwhttp/releases/download/$(c $(PKG)_DEPS := gcc curl sdl2 sdl2_net define $(PKG)_UPDATE - $(WGET) -q -O- 'http://github.com/mgerhardy/SDL_rwhttp/tags' | \ + $(WGET) -q -O- 'https://github.com/mgerhardy/SDL_rwhttp/tags' | \ grep '<a href="/mgerhardy/SDL_rwhttp/archive/' | \ $(SED) -n 's,.*href="/mgerhardy/SDL_rwhttp/archive/\([0-9][^"_]*\)\.tar.*,\1,p' | \ head -1 @@ -27,7 +28,7 @@ define $(PKG)_BUILD # '$(TARGET)-gcc' \ # -W -Wall -Werror -ansi -pedantic \ -# '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl_rwhttp.exe' \ +# '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-sdl_rwhttp.exe' \ # `'$(TARGET)-pkg-config' SDL_rwhttp --cflags --libs` endef diff --git a/src/sdl_sound-test-CMakeLists.txt b/src/sdl_sound-test-CMakeLists.txt index e09bb96f..da052578 100644 --- a/src/sdl_sound-test-CMakeLists.txt +++ b/src/sdl_sound-test-CMakeLists.txt @@ -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. project(SDL_sound_test) cmake_minimum_required(VERSION 2.8) diff --git a/src/sdl_sound-test.c b/src/sdl_sound-test.c index 3b5e8df3..15405a31 100644 --- a/src/sdl_sound-test.c +++ b/src/sdl_sound-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. * * This is a simple test program for SDL_sound that tries to * decode the file specified as the only command-line argument. diff --git a/src/sdl_sound.mk b/src/sdl_sound.mk index 81e4d235..993209c2 100644 --- a/src/sdl_sound.mk +++ b/src/sdl_sound.mk @@ -1,17 +1,18 @@ -# 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 := sdl_sound +$(PKG)_WEBSITE := https://icculus.org/SDL_sound/ +$(PKG)_DESCR := SDL_sound $(PKG)_IGNORE := $(PKG)_VERSION := 1.0.3 $(PKG)_CHECKSUM := 3999fd0bbb485289a52be14b2f68b571cb84e380cc43387eadf778f64c79e6df $(PKG)_SUBDIR := SDL_sound-$($(PKG)_VERSION) $(PKG)_FILE := SDL_sound-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://icculus.org/SDL_sound/downloads/$($(PKG)_FILE) +$(PKG)_URL := https://icculus.org/SDL_sound/downloads/$($(PKG)_FILE) $(PKG)_DEPS := gcc flac libmikmod ogg sdl speex vorbis define $(PKG)_UPDATE - $(WGET) -q -O- 'http://hg.icculus.org/icculus/SDL_sound/tags' | \ + $(WGET) -q -O- 'https://hg.icculus.org/icculus/SDL_sound/tags' | \ $(SED) -n 's,.*release-\([0-9][^<]*\).*,\1,p' | \ head -1 endef @@ -55,14 +56,13 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -std=c99 -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl_sound.exe' \ + '$(PWD)/src/$(PKG)-test.c' -o '$(PREFIX)/$(TARGET)/bin/test-sdl_sound.exe' \ `'$(TARGET)-pkg-config' SDL_sound --cflags --libs` mkdir -p '$(1)/cmake-build-test' - cp '$(2)-CMakeLists.txt' '$(1)/cmake-build-test/CMakeLists.txt' - cp '$(2).c' '$(1)/cmake-build-test/' - cd '$(1)/cmake-build-test' && cmake . \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' + cp '$(PWD)/src/$(PKG)-test-CMakeLists.txt' '$(1)/cmake-build-test/CMakeLists.txt' + cp '$(PWD)/src/$(PKG)-test.c' '$(1)/cmake-build-test/' + cd '$(1)/cmake-build-test' && '$(TARGET)-cmake' . $(MAKE) -C '$(1)/cmake-build-test' -j '$(JOBS)' endef diff --git a/src/sdl_ttf.mk b/src/sdl_ttf.mk index 261ec590..86da0fdc 100644 --- a/src/sdl_ttf.mk +++ b/src/sdl_ttf.mk @@ -1,17 +1,18 @@ -# 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 := sdl_ttf +$(PKG)_WEBSITE := https://www.libsdl.org/projects/SDL_ttf/ +$(PKG)_DESCR := SDL_ttf $(PKG)_IGNORE := 2% $(PKG)_VERSION := 2.0.11 $(PKG)_CHECKSUM := 724cd895ecf4da319a3ef164892b72078bd92632a5d812111261cde248ebcdb7 $(PKG)_SUBDIR := SDL_ttf-$($(PKG)_VERSION) $(PKG)_FILE := SDL_ttf-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.libsdl.org/projects/SDL_ttf/release/$($(PKG)_FILE) +$(PKG)_URL := https://www.libsdl.org/projects/SDL_ttf/release/$($(PKG)_FILE) $(PKG)_DEPS := gcc freetype sdl define $(PKG)_UPDATE - $(WGET) -q -O- 'http://hg.libsdl.org/SDL_ttf/tags' | \ + $(WGET) -q -O- 'https://hg.libsdl.org/SDL_ttf/tags' | \ $(SED) -n 's,.*release-\([0-9][^<]*\).*,\1,p' | \ head -1 endef diff --git a/src/sfml-1-fixes-crlf.patch b/src/sfml-1-fixes-crlf.patch index 2de432d5..160075d6 100644 --- a/src/sfml-1-fixes-crlf.patch +++ b/src/sfml-1-fixes-crlf.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/sfml-test.cpp b/src/sfml-test.cpp index 1fc07e85..45fca6c9 100644 --- a/src/sfml-test.cpp +++ b/src/sfml-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <SFML/Audio.hpp> diff --git a/src/sfml.mk b/src/sfml.mk index 810a1891..560f0330 100644 --- a/src/sfml.mk +++ b/src/sfml.mk @@ -1,32 +1,32 @@ -# 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 := sfml +$(PKG)_WEBSITE := https://www.sfml-dev.org/ +$(PKG)_DESCR := SFML $(PKG)_IGNORE := -$(PKG)_VERSION := 2.3.1 -$(PKG)_CHECKSUM := 5c610bd5db3ecd9984f58b038f2eebc1b8856773d50c58cd55b4daf0fe94e120 +$(PKG)_VERSION := 2.4.2 +$(PKG)_CHECKSUM := 8ba04f6fde6a7b42527d69742c49da2ac529354f71f553409f9f821d618de4b6 $(PKG)_SUBDIR := SFML-$($(PKG)_VERSION) $(PKG)_FILE := SFML-$($(PKG)_VERSION)-sources.zip -$(PKG)_URL := http://sfml-dev.org/download/sfml/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://sfml-dev.org/download/sfml/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc freetype glew jpeg libsndfile openal define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.sfml-dev.org/download.php' | \ + $(WGET) -q -O- 'https://www.sfml-dev.org/download.php' | \ $(SED) -n 's,.*download/sfml/\([^"]\+\).*,\1,p' | \ head -1 endef define $(PKG)_BUILD mkdir '$(1)/build' - cd '$(1)/build' && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + cd '$(1)/build' && '$(TARGET)-cmake' .. \ -DSFML_BUILD_EXAMPLES=FALSE \ -DSFML_BUILD_DOC=FALSE # build and install libs $(MAKE) -C '$(1)/build/src/SFML' -j '$(JOBS)' install VERBOSE=1 # install headers - cmake -DCOMPONENT=devel -P '$(1)/build/cmake_install.cmake' + '$(TARGET)-cmake' -DCOMPONENT=devel -P '$(1)/build/cmake_install.cmake' # create pkg-config file $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' @@ -41,7 +41,7 @@ define $(PKG)_BUILD '$(TARGET)-g++' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-sfml.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-sfml.exe' \ `$(TARGET)-pkg-config --cflags --libs sfml` endef diff --git a/src/smpeg-test.c b/src/smpeg-test.c index 0183bd2b..75f4c84a 100644 --- a/src/smpeg-test.c +++ b/src/smpeg-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <smpeg.h> diff --git a/src/smpeg.mk b/src/smpeg.mk index 852bd803..d1c19243 100644 --- a/src/smpeg.mk +++ b/src/smpeg.mk @@ -1,7 +1,7 @@ -# 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 := smpeg +$(PKG)_WEBSITE := https://icculus.org/smpeg/ $(PKG)_IGNORE := $(PKG)_VERSION := 0.4.5+cvs20030824 $(PKG)_CHECKSUM := 1276ea797dd9fde8a12dd3f33f180153922544c28ca9fc7b477c018876be1916 @@ -11,7 +11,7 @@ $(PKG)_URL := http://ftp.debian.org/debian/pool/main/s/$(PKG)/$($(PKG)_FILE $(PKG)_DEPS := gcc sdl define $(PKG)_UPDATE - $(WGET) -q -O- 'http://packages.debian.org/unstable/source/smpeg' | \ + $(WGET) -q -O- 'https://packages.debian.org/unstable/source/smpeg' | \ $(SED) -n 's,.*smpeg_\([0-9][^>]*\)\.orig\.tar.*,\1,p' | \ head -1 endef @@ -29,12 +29,12 @@ define $(PKG)_BUILD --disable-sdltest \ --disable-gtk-player \ --disable-opengl-player \ - CFLAGS='-ffriend-injection' + CFLAGS='-ffriend-injection -Wno-narrowing' $(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= '$(TARGET)-gcc' \ -W -Wall -Werror -std=c99 -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-smpeg.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-smpeg.exe' \ `'$(PREFIX)/$(TARGET)/bin/smpeg-config' --cflags --libs` endef diff --git a/src/smpeg2.mk b/src/smpeg2.mk index e711c289..5fe4cd48 100644 --- a/src/smpeg2.mk +++ b/src/smpeg2.mk @@ -1,17 +1,18 @@ -# 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 := smpeg2 +$(PKG)_WEBSITE := https://icculus.org/smpeg/ +$(PKG)_DESCR := smpeg $(PKG)_IGNORE := $(PKG)_VERSION := 2.0.0 $(PKG)_CHECKSUM := 979a65b211744a44fa641a9b6e4d64e64a12ff703ae776bafe3c4c4cd85494b3 $(PKG)_SUBDIR := smpeg2-$($(PKG)_VERSION) $(PKG)_FILE := smpeg2-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.libsdl.org/projects/smpeg/release/$($(PKG)_FILE) +$(PKG)_URL := https://www.libsdl.org/projects/smpeg/release/$($(PKG)_FILE) $(PKG)_DEPS := gcc sdl2 define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.libsdl.org/projects/smpeg/release' | \ + $(WGET) -q -O- 'https://www.libsdl.org/projects/smpeg/release' | \ $(SED) -n 's,.*smpeg2-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef @@ -27,7 +28,7 @@ define $(PKG)_BUILD --disable-sdltest \ --disable-gtk-player \ --disable-opengl-player \ - CFLAGS='-ffriend-injection' + CFLAGS='-ffriend-injection -Wno-narrowing' $(MAKE) -C '$(1)' -j '$(JOBS)' install $(MXE_DISABLE_CRUFT) '$(TARGET)-gcc' \ diff --git a/src/sox-test.c b/src/sox-test.c index 4911ef0b..67919007 100644 --- a/src/sox-test.c +++ b/src/sox-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <sox.h> diff --git a/src/sox.mk b/src/sox.mk index ac613d15..87acb7ff 100644 --- a/src/sox.mk +++ b/src/sox.mk @@ -1,18 +1,19 @@ -# 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 := sox +$(PKG)_WEBSITE := https://sox.sourceforge.io/ +$(PKG)_DESCR := SoX $(PKG)_IGNORE := $(PKG)_VERSION := 14.4.2 $(PKG)_CHECKSUM := b45f598643ffbd8e363ff24d61166ccec4836fea6d3888881b8df53e3bb55f6c $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc file flac lame libltdl libmad libpng libsndfile \ opencore-amr opus twolame vorbis wavpack define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/sox/files/sox/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/sox/files/sox/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef @@ -61,7 +62,7 @@ define $(PKG)_BUILD '$(TARGET)-gcc' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sox.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-sox.exe' \ `'$(TARGET)-pkg-config' sox --cflags --libs` endef diff --git a/src/sparsehash.mk b/src/sparsehash.mk new file mode 100644 index 00000000..85273d13 --- /dev/null +++ b/src/sparsehash.mk @@ -0,0 +1,26 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := sparsehash +$(PKG)_WEBSITE := https://github.com/sparsehash/sparsehash +$(PKG)_IGNORE := +$(PKG)_VERSION := 2.0.3 +$(PKG)_CHECKSUM := 05e986a5c7327796dad742182b2d10805a8d4f511ad090da0490f146c1ff7a8c +$(PKG)_SUBDIR := $(PKG)-$(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://github.com/$(PKG)/$(PKG)/archive/$($(PKG)_FILE) +$(PKG)_DEPS := gcc + +define $(PKG)_UPDATE + $(call MXE_GET_GITHUB_TAGS, sparsehash/sparsehash, sparsehash-) +endef + +define $(PKG)_BUILD + cd '$(1)' && ./configure \ + $(MXE_CONFIGURE_OPTS) + + $(MAKE) -C '$(1)' -j '$(JOBS)' + $(MAKE) -C '$(1)' -j 1 install $(MXE_DISABLE_DOCS) + + $(INSTALL) '$(1)/hashtable_test.exe' '$(PREFIX)/$(TARGET)/bin/test-sparsehash.exe' + $(TARGET)-strip '$(PREFIX)/$(TARGET)/bin/test-sparsehash.exe' +endef diff --git a/src/speex.mk b/src/speex.mk index 518a5a33..37649a9b 100644 --- a/src/speex.mk +++ b/src/speex.mk @@ -1,7 +1,8 @@ -# 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 := speex +$(PKG)_WEBSITE := https://speex.org/ +$(PKG)_DESCR := Speex $(PKG)_IGNORE := $(PKG)_VERSION := 1.2rc2 $(PKG)_CHECKSUM := caa27c7247ff15c8521c2ae0ea21987c9e9710a8f2d3448e8b79da9806bce891 @@ -11,7 +12,7 @@ $(PKG)_URL := http://downloads.xiph.org/releases/speex/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.xiph.org/?p=speex.git;a=tags' | \ + $(WGET) -q -O- 'https://git.xiph.org/?p=speex.git;a=tags' | \ grep '<a class="list name"' | \ $(SED) -n 's,.*<a[^>]*>Speex-\([0-9][^<]*\)<.*,\1,p' | \ head -1 diff --git a/src/speexdsp.mk b/src/speexdsp.mk index 24abca3e..5852541f 100644 --- a/src/speexdsp.mk +++ b/src/speexdsp.mk @@ -1,7 +1,8 @@ -# 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 := speexdsp +$(PKG)_WEBSITE := https://speex.org/ +$(PKG)_DESCR := SpeexDSP $(PKG)_IGNORE := $(PKG)_VERSION := 1.2rc3 $(PKG)_CHECKSUM := 4ae688600039f5d224bdf2e222d2fbde65608447e4c2f681585e4dca6df692f1 @@ -11,7 +12,7 @@ $(PKG)_URL := http://downloads.xiph.org/releases/speex/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.xiph.org/?p=speexdsp.git;a=tags' | \ + $(WGET) -q -O- 'https://git.xiph.org/?p=speexdsp.git;a=tags' | \ grep '<a class="list name"' | \ $(SED) -n 's,.*<a[^>]*>SpeexDSP-\([0-9][^<]*\)<.*,\1,p' | \ head -1 diff --git a/src/sqlite.mk b/src/sqlite.mk index 702a3f49..d317d717 100644 --- a/src/sqlite.mk +++ b/src/sqlite.mk @@ -1,17 +1,18 @@ -# 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 := sqlite +$(PKG)_WEBSITE := https://www.sqlite.org/ +$(PKG)_DESCR := SQLite $(PKG)_IGNORE := -$(PKG)_VERSION := 3090200 -$(PKG)_CHECKSUM := 064c0abe9c9177534d4c770bca7a5902f9924b629ac886b4c08956be6dfbc36b +$(PKG)_VERSION := 3190300 +$(PKG)_CHECKSUM := 06129c03dced9f87733a8cba408871bd60673b8f93b920ba8d815efab0a06301 $(PKG)_SUBDIR := $(PKG)-autoconf-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-autoconf-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.sqlite.org/2015/$($(PKG)_FILE) +$(PKG)_URL := https://www.sqlite.org/2017/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.sqlite.org/download.html' | \ + $(WGET) -q -O- 'https://www.sqlite.org/download.html' | \ $(SED) -n 's,.*sqlite-autoconf-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef diff --git a/src/subversion-1-fixes.patch b/src/subversion-1-fixes.patch new file mode 100644 index 00000000..6a3da24d --- /dev/null +++ b/src/subversion-1-fixes.patch @@ -0,0 +1,98 @@ +--- subversion-1.9.2/configure.ac 2015-07-27 01:03:10.000000000 +0200 ++++ subversion-1.9.2.new/configure.ac 2015-12-09 13:58:49.000000000 +0100 +@@ -467,9 +467,6 @@ + + dnl Mac OS specific features ------------------- + +-SVN_LIB_MACHO_ITERATE +-SVN_LIB_MACOS_PLIST +-SVN_LIB_MACOS_KEYCHAIN + + dnl APR_HAS_DSO ------------------- + +@@ -1271,7 +1268,6 @@ + # Python: Used for testsuite, and bindings + + +-PYTHON="`$abs_srcdir/build/find_python.sh`" + if test -z "$PYTHON"; then + AC_MSG_WARN([Python 2.7 or later is required to run the testsuite]) + AC_MSG_WARN([or to use the Subversion Python bindings]) + +--- subversion-1.9.2/subversion/libsvn_subr/config_win.c 2015-04-17 06:00:18.000000000 +0200 ++++ subversion-1.9.2.new/subversion/libsvn_subr/config_win.c 2015-12-10 09:49:11.645120955 +0100 +@@ -34,7 +34,7 @@ + #define WIN32_LEAN_AND_MEAN + /* winsock2.h includes windows.h */ + #include <winsock2.h> +-#include <Ws2tcpip.h> ++#include <ws2tcpip.h> + + #include <shlobj.h> + +--- subversion-1.9.2/subversion/libsvn_subr/win32_xlate.c 2015-02-03 13:56:57.000000000 +0100 ++++ subversion-1.9.2.new/subversion/libsvn_subr/win32_xlate.c 2015-12-10 09:48:56.725192873 +0100 +@@ -36,7 +36,7 @@ + + /* winsock2.h includes windows.h */ + #include <winsock2.h> +-#include <Ws2tcpip.h> ++#include <ws2tcpip.h> + #include <mlang.h> + + #include <apr.h> +@@ -53,6 +53,8 @@ + + #include "svn_private_config.h" + ++#define INITGUID 1 ++DEFINE_GUID (IID_IMultiLanguage, 0x275c23e1,0x3747,0x11d0,0x9f,0xea,0x00,0xaa,0x00,0x3f,0x86,0x46); + static svn_atomic_t com_initialized = 0; + + /* Initializes COM and keeps COM available until process exit. +@@ -139,10 +139,12 @@ + return saved; /* probably SVN_ERR_ATOMIC_INIT_FAILURE */ + } + ++#if 0 + hr = CoCreateInstance(&CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER, + &IID_IMultiLanguage, (void **) &mlang); + + if (FAILED(hr)) ++#endif + return APR_EGENERAL; + + /* Convert page name to wide string. */ +--- subversion-1.9.2/subversion/libsvn_subr/io.c 2015-09-11 06:00:13.000000000 +0200 ++++ subversion-1.9.2.new/subversion/libsvn_subr/io.c 2015-12-10 10:21:22.272463424 +0100 +@@ -1789,7 +1789,7 @@ + } + } + +- SVN_ERR(svn_utf__win32_utf8_to_utf16(&(const WCHAR*)buffer, source, ++ SVN_ERR(svn_utf__win32_utf8_to_utf16((const WCHAR**)&buffer, source, + prefix, result_pool)); + + /* Convert slashes to backslashes because the \\?\ path format +--- subversion-1.9.2/build/generator/gen_make.py 2015-07-27 01:03:10.000000000 +0200 ++++ subversion-1.9.2.new/build/generator/gen_make.py 2015-12-09 13:58:49.000000000 +0100 +@@ -633,7 +633,7 @@ + lib_required_private=[], + ) + # libsvn_foo -> -lsvn_foo +- data.lib_deps.append('-l%s' % lib_name.replace('lib', '', 1)) ++ data.lib_deps.append('-l%s-1' % lib_name.replace('lib', '', 1)) + for lib_dep in lib_deps.split(): + if lib_dep == 'apriconv': + # apriconv is part of apr-util, skip it +--- subversion-1.9.2/build/generator/templates/pkg-config.in.ezt 2016-02-11 15:48:52.204400231 +0100 ++++ subversion-1.9.2.new/build/generator/templates/pkg-config.in.ezt 2014-05-05 17:04:00.000000000 +0200 +@@ -1,7 +1,7 @@ + prefix=@prefix@ + exec_prefix=@exec_prefix@ + libdir=@libdir@ +-includedir=@includedir@ ++includedir=@includedir@/subversion-1 + + Name: [lib_name] + Description: [lib_desc] diff --git a/src/subversion-test.c b/src/subversion-test.c new file mode 100644 index 00000000..20211009 --- /dev/null +++ b/src/subversion-test.c @@ -0,0 +1,8 @@ +#include <svn_cmdline.h> + +int main (void) { + if (svn_cmdline_init("mxe_test", stderr) != EXIT_SUCCESS) + return EXIT_FAILURE; + return EXIT_SUCCESS; +} + diff --git a/src/subversion.mk b/src/subversion.mk new file mode 100644 index 00000000..ca42ee41 --- /dev/null +++ b/src/subversion.mk @@ -0,0 +1,50 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := subversion +$(PKG)_WEBSITE := https://subversion.apache.org/ +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.9.4 +$(PKG)_CHECKSUM := 1267f9e2ab983f260623bee841e6c9cc458bf4bf776238ed5f100983f79e9299 +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 +$(PKG)_URL := https://archive.apache.org/dist/subversion/$($(PKG)_FILE) +$(PKG)_URL_2 := http://mirror.23media.de/apache/$(PKG)/$($(PKG)_FILE) +$(PKG)_DEPS := gcc apr apr-util openssl sqlite + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://subversion.apache.org/download.cgi' | \ + $(SED) -n 's,.*#recommended-release">\([0-9][^<]*\)<.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD + cd '$(1)' && PKG_CONFIG=$(PREFIX)/bin/$(TARGET)-pkg-config && ./autogen.sh && ./configure \ + $(MXE_CONFIGURE_OPTS) \ + --disable-shared \ + --disable-mod-activation \ + --without-serf \ + --without-apr_memcache \ + --without-apxs \ + --without-jdk \ + --without-jikes \ + --without-swig \ + --with-sysroot=$(PREFIX)/$(TARGET) \ + --disable-javahl \ + --disable-nls \ + --without-gpg-agent \ + --with-gnome-keyring=no \ + PKG_CONFIG=$(PREFIX)/bin/$(TARGET)-pkg-config \ + --with-apr='$(PREFIX)/$(TARGET)' \ + --with-apr-util='$(PREFIX)/$(TARGET)' + $(MAKE) -C '$(1)' -j '$(JOBS)' \ + install-fsmod-lib install-ramod-lib install-lib install-include \ + LDFLAGS="-lversion -lole32 -luuid -no-undefined" \ + pkgconfig_dir="$(PREFIX)/$(TARGET)/lib/pkgconfig" \ + install + '$(TARGET)-gcc' \ + -mwindows -W -Wall -Werror -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-subversion.exe' \ + `'$(TARGET)-pkg-config' libsvn_client --cflags --libs` -lole32 +endef + +$(PKG)_BUILD_SHARED = diff --git a/src/suitesparse-1.patch b/src/suitesparse-1.patch index b2c4ed1a..9e191834 100644 --- a/src/suitesparse-1.patch +++ b/src/suitesparse-1.patch @@ -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 169f88aef7ff1d302aa3eac48d779d009780b87f Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> diff --git a/src/suitesparse.mk b/src/suitesparse.mk index c9f582c3..9b2c9959 100644 --- a/src/suitesparse.mk +++ b/src/suitesparse.mk @@ -1,7 +1,8 @@ -# 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 := suitesparse +$(PKG)_WEBSITE := http://faculty.cse.tamu.edu/davis/suitesparse.html +$(PKG)_DESCR := SuiteSparse $(PKG)_VERSION := 4.2.1 $(PKG)_CHECKSUM := e8023850bc30742e20a3623fabda02421cb5774b980e3e7c9c6d9e7e864946bd $(PKG)_SUBDIR := SuiteSparse @@ -25,6 +26,7 @@ define $(PKG)_BUILD $(MAKE) -C '$(1)' -j '$(JOBS)' \ CC='$(TARGET)-gcc' \ CPLUSPLUS='$(TARGET)-g++' \ + CXX='$(TARGET)-g++' \ F77='$(TARGET)-gfortran' \ AR='$(TARGET)-ar' \ RANLIB='$(TARGET)-ranlib' \ diff --git a/src/t4k_common.mk b/src/t4k_common.mk index 889d8008..7f763a07 100644 --- a/src/t4k_common.mk +++ b/src/t4k_common.mk @@ -1,17 +1,17 @@ -# 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 := t4k_common +$(PKG)_WEBSITE := https://tux4kids.alioth.debian.org/ $(PKG)_IGNORE := $(PKG)_VERSION := 0.1.1 $(PKG)_CHECKSUM := 42c155816dae2c5dad560faa50edaa1ca84536530283d37859c4b91e82675110 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $($(PKG)_SUBDIR).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/tuxmath/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/tuxmath/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc libpng librsvg libxml2 pthreads sdl sdl_image sdl_mixer sdl_net sdl_pango sdl_ttf define $(PKG)_UPDATE - $(WGET) -q -O- 'http://alioth.debian.org/frs/?group_id=31080' | \ + $(WGET) -q -O- 'https://alioth.debian.org/frs/?group_id=31080' | \ $(SED) -n 's,.*t4k_common-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef diff --git a/src/taglib-1-static.patch b/src/taglib-1-static.patch deleted file mode 100644 index 8a3d6b11..00000000 --- a/src/taglib-1-static.patch +++ /dev/null @@ -1,23 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -This patch has been taken from: -https://bugs.kde.org/show_bug.cgi?id=268441 - -diff --git a/bindings/c/CMakeLists.txt b/bindings/c/CMakeLists.txt -index 79c7a6b..fa4056d 100644 ---- a/bindings/c/CMakeLists.txt -+++ b/bindings/c/CMakeLists.txt -@@ -19,9 +19,11 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../../taglib - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/taglib_c.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/taglib_c.pc ) - ########### next target ############### - --ADD_LIBRARY(tag_c SHARED tag_c.cpp) - if(ENABLE_STATIC) -+ add_library(tag_c STATIC tag_c.cpp) - set_target_properties(tag_c PROPERTIES COMPILE_DEFINITIONS TAGLIB_STATIC) -+else(ENABLE_STATIC) -+ add_library(tag_c SHARED tag_c.cpp) - endif(ENABLE_STATIC) - - TARGET_LINK_LIBRARIES(tag_c tag ) diff --git a/src/taglib.mk b/src/taglib.mk index 3501d0af..a1281c4a 100644 --- a/src/taglib.mk +++ b/src/taglib.mk @@ -1,27 +1,23 @@ -# 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 := taglib +$(PKG)_WEBSITE := https://developer.kde.org/~wheeler/taglib.html +$(PKG)_DESCR := TagLib $(PKG)_IGNORE := -$(PKG)_VERSION := 1.7.2 -$(PKG)_CHECKSUM := 38f7e5283b594021b28426a61339cffbf2d503b450338b02f651fab1b0b42899 +$(PKG)_VERSION := 1.10 +$(PKG)_CHECKSUM := 24c32d50042cb0ddf162eb263f8ac75c5a158e12bf32ed534c1d5c71ee369baa $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://developer.kde.org/~wheeler/files/src/$($(PKG)_FILE) +$(PKG)_URL := https://taglib.github.io/releases/$($(PKG)_FILE) $(PKG)_DEPS := gcc zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://developer.kde.org/~wheeler/files/src/?C=M;O=D' | \ - $(SED) -n 's,.*"taglib-\([0-9][^"]*\)\.tar.*,\1,p' | \ - head -1 + $(call MXE_GET_GITHUB_TAGS, taglib/taglib, v) endef define $(PKG)_BUILD mkdir '$(1)/build' - cd '$(1)/build' && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -DENABLE_STATIC=ON + cd '$(1)/build' && '$(TARGET)-cmake' .. \ + -DENABLE_STATIC=$(CMAKE_STATIC_BOOL) $(MAKE) -C '$(1)/build' -j '$(JOBS)' install endef - -$(PKG)_BUILD_SHARED = diff --git a/src/tclap.mk b/src/tclap.mk index 8fe35892..6e09d181 100644 --- a/src/tclap.mk +++ b/src/tclap.mk @@ -1,17 +1,17 @@ -# 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 := tclap +$(PKG)_WEBSITE := https://tclap.sourceforge.io/ $(PKG)_IGNORE := $(PKG)_VERSION := 1.2.1 $(PKG)_CHECKSUM := 9f9f0fe3719e8a89d79b6ca30cf2d16620fba3db5b9610f9b51dd2cd033deebb $(PKG)_SUBDIR := tclap-$($(PKG)_VERSION) $(PKG)_FILE := tclap-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/tclap/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/tclap/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/tclap/files/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/tclap/files/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef diff --git a/src/teem.mk b/src/teem.mk index 15b7aa33..80dc39d7 100644 --- a/src/teem.mk +++ b/src/teem.mk @@ -1,25 +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. PKG := teem +$(PKG)_WEBSITE := https://teem.sourceforge.io/ +$(PKG)_DESCR := Teem $(PKG)_IGNORE := $(PKG)_VERSION := 1.11.0 $(PKG)_CHECKSUM := a01386021dfa802b3e7b4defced2f3c8235860d500c1fa2f347483775d4c8def $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)-src $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION)-src.tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc bzip2 levmar libpng pthreads zlib define $(PKG)_UPDATE - $(WGET) -q -O- "http://sourceforge.net/projects/teem/files/teem/" | \ + $(WGET) -q -O- "https://sourceforge.net/projects/teem/files/teem/" | \ grep 'teem/files/teem' | \ $(SED) -n 's,.*teem/\([0-9][^>]*\)/.*,\1,p' | \ head -1 endef define $(PKG)_BUILD - cd '$(1)' && cmake . \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + cd '$(1)' && '$(TARGET)-cmake' . \ -DQNANHIBIT_VALUE=1 -DQNANHIBIT_VALUE__TRYRUN_OUTPUT=1 $(MAKE) -C '$(1)' -j '$(JOBS)' install VERBOSE=1 endef diff --git a/src/termcap.mk b/src/termcap.mk index 867b04c5..a4bd6244 100644 --- a/src/termcap.mk +++ b/src/termcap.mk @@ -1,17 +1,18 @@ -# 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 := termcap +$(PKG)_WEBSITE := https://www.gnu.org/software/termutils/ +$(PKG)_DESCR := Termcap $(PKG)_IGNORE := $(PKG)_VERSION := 1.3.1 $(PKG)_CHECKSUM := 91a0e22e5387ca4467b5bcb18edf1c51b930262fd466d5fda396dd9d26719100 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://ftp.gnu.org/gnu/termcap/$($(PKG)_FILE) +$(PKG)_URL := https://ftp.gnu.org/gnu/termcap/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://ftp.gnu.org/gnu/termcap/' | \ + $(WGET) -q -O- 'https://ftp.gnu.org/gnu/termcap/' | \ grep 'termcap-' | \ $(SED) -n 's,.*termcap-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 @@ -26,4 +27,8 @@ define $(PKG)_BUILD AR='$(TARGET)-ar' \ oldincludedir= \ install + + # no shared support in configure/Makefile + $(if $(BUILD_SHARED), \ + $(MAKE_SHARED_FROM_STATIC) '$(1)/libtermcap.a') endef diff --git a/src/theora.mk b/src/theora.mk index c81d35b6..4360ba7c 100644 --- a/src/theora.mk +++ b/src/theora.mk @@ -1,7 +1,8 @@ -# 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 := theora +$(PKG)_WEBSITE := https://theora.org/ +$(PKG)_DESCR := Theora $(PKG)_IGNORE := $(PKG)_VERSION := 1.1.1 $(PKG)_CHECKSUM := 40952956c47811928d1e7922cda3bc1f427eb75680c3c37249c91e949054916b @@ -11,7 +12,7 @@ $(PKG)_URL := http://downloads.xiph.org/releases/theora/$($(PKG)_FILE) $(PKG)_DEPS := gcc ogg vorbis define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.xiph.org/downloads/' | \ + $(WGET) -q -O- 'https://www.xiph.org/downloads/' | \ $(SED) -n 's,.*libtheora-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef diff --git a/src/tidy-html5-test.c b/src/tidy-html5-test.c new file mode 100644 index 00000000..8f3df774 --- /dev/null +++ b/src/tidy-html5-test.c @@ -0,0 +1,49 @@ +// This file is part of MXE. See LICENSE.md for licensing information. + +#include <tidy.h> +#include <tidybuffio.h> + +#include <stdbool.h> +#include <stdio.h> + + +int main() +{ + const char *input = "<h1>Blah</h1><p><b>Blah-blah-blah!</b>"; + printf("Input (HTML fragment):\n%s\n\n", input); + fflush(stdout); + + TidyDoc tDoc = tidyCreate(); + TidyBuffer output = {0}; + TidyBuffer errBuf = {0}; + int rc = -1; + + const bool ok = tidyOptSetBool(tDoc, TidyXhtmlOut, yes); + + if (ok) + rc = tidySetErrorBuffer(tDoc, &errBuf); + if (rc >= 0) + rc = tidyParseString(tDoc, input); + if (rc >= 0) + rc = tidyCleanAndRepair(tDoc); + if (rc >= 0) + rc = tidyRunDiagnostics(tDoc); + if (rc > 1) + rc = (tidyOptSetBool(tDoc, TidyForceOutput, yes) ? rc : -1); + if (rc >= 0) + rc = tidySaveBuffer(tDoc, &output); + + if (rc > 0) + printf("Diagnostics:\n%s\n\n", errBuf.bp); + if (rc >= 0) + printf("Output (valid HTML document):\n%s\n\n", output.bp); + else + printf("Unknown error: %d.\n\n", rc); + fflush(stdout); + + tidyBufFree(&errBuf); + tidyBufFree(&output); + tidyRelease(tDoc); + + return rc; +} diff --git a/src/tidy-html5.mk b/src/tidy-html5.mk new file mode 100644 index 00000000..33af291e --- /dev/null +++ b/src/tidy-html5.mk @@ -0,0 +1,30 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := tidy-html5 +$(PKG)_WEBSITE := http://www.html-tidy.org/ +$(PKG)_DESCR := HTML/XML syntax checker and reformatter +$(PKG)_IGNORE := +$(PKG)_VERSION := 5.4.0 +$(PKG)_CHECKSUM := a2d754b7349982e33f12d798780316c047a3b264240dc6bbd4641542e57a0b7a +$(PKG)_GH_CONF := htacg/tidy-html5 +$(PKG)_DEPS := gcc + +define $(PKG)_BUILD + cd '$(BUILD_DIR)' && $(TARGET)-cmake '$(SOURCE_DIR)' \ + -DTIDY_COMPAT_HEADERS:BOOL=YES \ + -DBUILD_SHARED_LIB=$(CMAKE_SHARED_BOOL) + $(MAKE) -C '$(BUILD_DIR)' -j $(JOBS) + $(MAKE) -C '$(BUILD_DIR)' -j 1 install + + $(if $(BUILD_STATIC), + cd '$(PREFIX)/$(TARGET)/lib' && mv libtidys.a libtidy.a, + rm -f '$(PREFIX)/$(TARGET)/lib/libtidys.a') + rm -f '$(PREFIX)/$(TARGET)/bin/tidy.exe' + + # build test manually + '$(TARGET)-gcc' \ + -W -Wall -Werror \ + '$(PWD)/src/$(PKG)-test.c' \ + -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + -ltidy +endef diff --git a/src/tiff.mk b/src/tiff.mk index 26209ceb..0e2f8512 100644 --- a/src/tiff.mk +++ b/src/tiff.mk @@ -1,10 +1,11 @@ -# 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 := tiff +$(PKG)_WEBSITE := http://www.libtiff.org/ +$(PKG)_DESCR := LibTIFF $(PKG)_IGNORE := -$(PKG)_VERSION := 4.0.6 -$(PKG)_CHECKSUM := 4d57a50907b510e3049a4bba0d7888930fdfc16ce49f1bf693e5b6247370d68c +$(PKG)_VERSION := 4.0.8 +$(PKG)_CHECKSUM := 59d7a5a8ccd92059913f246877db95a2918e6c04fb9d43fd74e5c3390dac2910 $(PKG)_SUBDIR := tiff-$($(PKG)_VERSION) $(PKG)_FILE := tiff-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://download.osgeo.org/libtiff/$($(PKG)_FILE) @@ -12,7 +13,7 @@ $(PKG)_URL_2 := ftp://ftp.remotesensing.org/libtiff/$($(PKG)_FILE) $(PKG)_DEPS := gcc jpeg xz zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.remotesensing.org/libtiff/' | \ + $(WGET) -q -O- 'http://www.libtiff.org/' | \ $(SED) -n 's,.*>v\([0-9][^<]*\)<.*,\1,p' | \ head -1 endef diff --git a/src/tinyxml.mk b/src/tinyxml.mk index d530c387..b410e3e1 100644 --- a/src/tinyxml.mk +++ b/src/tinyxml.mk @@ -1,27 +1,26 @@ -# 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 := tinyxml +$(PKG)_WEBSITE := https://sourceforge.net/projects/tinyxml/ $(PKG)_IGNORE := $(PKG)_VERSION := 2.6.2 $(PKG)_CHECKSUM := 15bdfdcec58a7da30adc87ac2b078e4417dbe5392f3afb719f9ba6d062645593 $(PKG)_SUBDIR := $(PKG) $(PKG)_FILE := $(PKG)_$(subst .,_,$($(PKG)_VERSION)).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc +$(PKG)_MESSAGE :=*** tinyxml is deprecated - please use tinyxml2 *** + define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/tinyxml/files/tinyxml/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/tinyxml/files/tinyxml/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef define $(PKG)_BUILD mkdir '$(1).build' - cd '$(1).build' && cmake \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -DBUILD_SHARED_LIBS=$(if $(BUILD_STATIC),FALSE,TRUE) \ - '$(1)' + cd '$(1).build' && '$(TARGET)-cmake' '$(1)' $(MAKE) -C '$(1).build' install '$(TARGET)-g++' \ diff --git a/src/tinyxml2.mk b/src/tinyxml2.mk index cd224922..af9a528a 100644 --- a/src/tinyxml2.mk +++ b/src/tinyxml2.mk @@ -1,10 +1,10 @@ -# 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 := tinyxml2 +$(PKG)_WEBSITE := http://grinninglizard.com/tinyxml2/ $(PKG)_IGNORE := -$(PKG)_VERSION := 3.0.0 -$(PKG)_CHECKSUM := 128aa1553e88403833e0cccf1b651f45ce87bc207871f53fdcc8e7f9ec795747 +$(PKG)_VERSION := 4.0.1 +$(PKG)_CHECKSUM := 14b38ef25cc136d71339ceeafb4856bb638d486614103453eccd323849267f20 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz $(PKG)_URL := https://github.com/leethomason/tinyxml2/archive/$($(PKG)_VERSION).tar.gz @@ -17,10 +17,12 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - mkdir '$(1)/build' - cd '$(1)/build' && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -DBUILD_SHARED_LIBS=$(if $(BUILD_STATIC),OFF,ON) + cd '$(BUILD_DIR)' && '$(TARGET)-cmake' '$(SOURCE_DIR)' + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install - $(MAKE) -C '$(1)/build' -j '$(JOBS)' install + '$(TARGET)-g++' \ + -W -Wall -ansi -pedantic \ + '$(SOURCE_DIR)/xmltest.cpp' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' $(PKG) --cflags --libs` endef diff --git a/src/tre.mk b/src/tre.mk index ef5053c3..ba94ce10 100644 --- a/src/tre.mk +++ b/src/tre.mk @@ -1,18 +1,19 @@ -# 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 := tre +$(PKG)_WEBSITE := https://laurikari.net/tre/ +$(PKG)_DESCR := TRE $(PKG)_IGNORE := $(PKG)_VERSION := 0.8.0 $(PKG)_CHECKSUM := be8670a55198bc57485a6a8ae4b497d7db98ea25f90968585b7eb07d94c6a7dd $(PKG)_SUBDIR := tre-$($(PKG)_VERSION) $(PKG)_FILE := tre-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://laurikari.net/tre/$($(PKG)_FILE) +$(PKG)_URL := https://laurikari.net/tre/$($(PKG)_FILE) $(PKG)_URL_2 := http://ftp.debian.org/debian/pool/main/t/$(PKG)/$(PKG)_$($(PKG)_VERSION).orig.tar.gz $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://laurikari.net/tre/download.html' | \ + $(WGET) -q -O- 'https://laurikari.net/tre/download.html' | \ $(SED) -n 's,.*tre-\([a-z0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef diff --git a/src/twolame.mk b/src/twolame.mk index c1f577a0..e8779def 100644 --- a/src/twolame.mk +++ b/src/twolame.mk @@ -1,17 +1,18 @@ -# 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 := twolame +$(PKG)_WEBSITE := http://www.twolame.org/ +$(PKG)_DESCR := TwoLAME $(PKG)_IGNORE := $(PKG)_VERSION := 0.3.13 $(PKG)_CHECKSUM := 98f332f48951f47f23f70fd0379463aff7d7fb26f07e1e24e42ddef22cc6112a $(PKG)_SUBDIR := twolame-$($(PKG)_VERSION) $(PKG)_FILE := twolame-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/$(PKG)/files/$(PKG)/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/$(PKG)/files/$(PKG)/' | \ $(SED) -n 's,^.*twolame/\([0-9][^"]*\)/".*$$,\1,p' | \ head -n 1 endef diff --git a/src/ucl-1-fixes.patch b/src/ucl-1-fixes.patch index 34a1ee32..63f0622f 100644 --- a/src/ucl-1-fixes.patch +++ b/src/ucl-1-fixes.patch @@ -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 34ee29b2233764519fecf3a9c5d7ed36ad680215 Mon Sep 17 00:00:00 2001 From: Boris Nagaev <bnagaev@gmail.com> diff --git a/src/ucl.mk b/src/ucl.mk index d374a2fa..c4292a9b 100644 --- a/src/ucl.mk +++ b/src/ucl.mk @@ -1,17 +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 := ucl +$(PKG)_WEBSITE := https://www.oberhumer.com/opensource/ucl/ +$(PKG)_DESCR := UCL $(PKG)_IGNORE := $(PKG)_VERSION := 1.03 $(PKG)_CHECKSUM := b865299ffd45d73412293369c9754b07637680e5c826915f097577cd27350348 $(PKG)_SUBDIR := ucl-$($(PKG)_VERSION) $(PKG)_FILE := ucl-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.oberhumer.com/opensource/ucl/download/$($(PKG)_FILE) +$(PKG)_URL := https://www.oberhumer.com/opensource/ucl/download/$($(PKG)_FILE) $(PKG)_DEPS := gcc +$(PKG)_DEPS_$(BUILD) := +$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.oberhumer.com/opensource/ucl/' | \ + $(WGET) -q -O- 'https://www.oberhumer.com/opensource/ucl/' | \ $(SED) -n 's,.*ucl-\([0-9][^"]*\)\.tar.*,\1,p' | \ head -1 endef @@ -19,7 +22,8 @@ endef define $(PKG)_BUILD cd '$(1)' && \ ./configure \ - $(MXE_CONFIGURE_OPTS) + $(MXE_CONFIGURE_OPTS) \ + CFLAGS='-std=gnu90 -fPIC' $(MAKE) -C '$(1)' -j '$(JOBS)' LDFLAGS=-no-undefined $(MAKE) -C '$(1)' -j 1 install endef diff --git a/src/unrtf-1.patch b/src/unrtf-1.patch index 2d8ad309..198c00d3 100644 --- a/src/unrtf-1.patch +++ b/src/unrtf-1.patch @@ -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 f023435f7ba175b0b43b3cd9406199656ac6a707 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> diff --git a/src/unrtf.mk b/src/unrtf.mk index 850cc09d..129fbb2f 100644 --- a/src/unrtf.mk +++ b/src/unrtf.mk @@ -1,17 +1,18 @@ -# 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 := unrtf +$(PKG)_WEBSITE := https://www.gnu.org/software/unrtf/ +$(PKG)_DESCR := unRTF $(PKG)_VERSION := 0.21.9 $(PKG)_CHECKSUM := 22a37826f96d754e335fb69f8036c068c00dd01ee9edd9461a36df0085fb8ddd $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc libiconv define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.savannah.gnu.org/cgit/unrtf.git/refs/' | \ - $(SED) -n "s,.*<a href='/cgit/unrtf.git/tag/?id=v\([0-9.]*\)'>.*,\1,p" | \ + $(WGET) -q -O- 'https://hg.savannah.gnu.org/hgweb/unrtf/tags' | \ + $(SED) -n "s,^release_,,p" | \ head -1 endef diff --git a/src/upx-1-fix-logging.patch b/src/upx-1-fix-logging.patch index a1d5005c..cf5e1019 100644 --- a/src/upx-1-fix-logging.patch +++ b/src/upx-1-fix-logging.patch @@ -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 a9c84ba7518ea4cc92cf4b391f609c3f6ade0974 Mon Sep 17 00:00:00 2001 From: Boris Nagaev <bnagaev@gmail.com> diff --git a/src/upx.mk b/src/upx.mk index 4b86d427..1e32b99c 100644 --- a/src/upx.mk +++ b/src/upx.mk @@ -1,17 +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 := upx +$(PKG)_WEBSITE := https://upx.github.io/ +$(PKG)_DESCR := UPX $(PKG)_IGNORE := $(PKG)_VERSION := 3.91 $(PKG)_CHECKSUM := 527ce757429841f51675352b1f9f6fc8ad97b18002080d7bf8672c466d8c6a3c $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)-src $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION)-src.tar.bz2 -$(PKG)_URL := http://upx.sourceforge.net/download/$($(PKG)_FILE) -$(PKG)_DEPS := gcc ucl zlib lzma +$(PKG)_URL := https://upx.sourceforge.io/download/$($(PKG)_FILE) +$(PKG)_DEPS := gcc lzma ucl zlib +$(PKG)_DEPS_$(BUILD) := ucl zlib lzma +$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) define $(PKG)_UPDATE - $(WGET) -q -O- 'http://upx.sourceforge.net/' | \ + $(WGET) -q -O- 'https://upx.sourceforge.io/' | \ $(SED) -n 's,.*upx-\([0-9][^"]*\)\-src.tar.*,\1,p' | \ head -1 endef @@ -20,15 +23,35 @@ define $(PKG)_BUILD $(call PREPARE_PKG_SOURCE,ucl,$(1)) mkdir '$(1)/lzma' $(call PREPARE_PKG_SOURCE,lzma,$(1)/lzma) + UPX_UCLDIR='$(1)/$(ucl_SUBDIR)' \ - UPX_LZMADIR='$(1)/lzma' \ - UPX_LZMA_VERSION=0x$(subst .,,$(lzma_VERSION)) \ - $(MAKE) -C '$(1)' -j '$(JOBS)' all \ - 'CXX=$(TARGET)-g++' \ - 'CC=$(TARGET)-gcc' \ - 'LD=$(TARGET)-ld' \ - 'AR=$(TARGET)-ar' \ - 'PKG_CONFIG=$(TARGET)-pkg-config' \ - 'exeext=.exe' + UPX_LZMADIR='$(1)/lzma' \ + UPX_LZMA_VERSION=0x$(subst .,,$(lzma_VERSION)) \ + $(MAKE) -C '$(1)' -j '$(JOBS)' all \ + CXX='$(TARGET)-g++' \ + CC='$(TARGET)-gcc' \ + LD='$(TARGET)-ld' \ + AR='$(TARGET)-ar' \ + PKG_CONFIG='$(TARGET)-pkg-config' \ + exeext='.exe' cp '$(1)/src/upx.exe' '$(PREFIX)/$(TARGET)/bin/' endef + +define $(PKG)_BUILD_$(BUILD) + $(call PREPARE_PKG_SOURCE,ucl,$(1)) + mkdir '$(1)/lzma' + $(call PREPARE_PKG_SOURCE,lzma,$(1)/lzma) + + UPX_UCLDIR='$(1)/$(ucl_SUBDIR)' \ + UPX_LZMADIR='$(1)/lzma' \ + UPX_LZMA_VERSION=0x$(subst .,,$(lzma_VERSION)) \ + $(MAKE) -C '$(1)' -j '$(JOBS)' all \ + CXX='$(BUILD_CXX)' \ + CC='$(BUILD_CC)' \ + PKG_CONFIG='$(PREFIX)/$(BUILD)/bin/pkgconf' \ + LIBS='-L$(PREFIX)/$(BUILD)/lib -lucl -lz' \ + CXXFLAGS=-DUCL_NO_ASM \ + CXXFLAGS_WERROR= \ + exeext= + cp '$(1)/src/upx' '$(PREFIX)/$(BUILD)/bin/' +endef diff --git a/src/vamp-plugin-sdk.mk b/src/vamp-plugin-sdk.mk index 81f4ea89..b417ca63 100644 --- a/src/vamp-plugin-sdk.mk +++ b/src/vamp-plugin-sdk.mk @@ -1,13 +1,14 @@ -# 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 := vamp-plugin-sdk +$(PKG)_WEBSITE := http://vamp-plugins.org/ +$(PKG)_DESCR := Vamp Plugins SDK $(PKG)_IGNORE := $(PKG)_VERSION := 2.5 $(PKG)_CHECKSUM := 7b719f9e4575624b30b335c64c00469d3745aef4bca177f66faf3204f073139d $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://code.soundsoftware.ac.uk/attachments/download/690/$(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://code.soundsoftware.ac.uk/attachments/download/690/$(PKG)-$($(PKG)_VERSION).tar.gz $(PKG)_DEPS := gcc zlib define $(PKG)_UPDATE diff --git a/src/vcdimager-1-configure.patch b/src/vcdimager-1-configure.patch index 01ad5f9a..85a1767d 100644 --- a/src/vcdimager-1-configure.patch +++ b/src/vcdimager-1-configure.patch @@ -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. diff -urN vcdimager-0.7.24/configure.ac vcdimager-0.7.24-patch/configure.ac --- vcdimager-0.7.24/configure.ac 2011-03-18 01:43:53.000000000 +0200 diff --git a/src/vcdimager.mk b/src/vcdimager.mk index 494dec95..2fadfaf6 100644 --- a/src/vcdimager.mk +++ b/src/vcdimager.mk @@ -1,13 +1,13 @@ -# 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 := vcdimager +$(PKG)_WEBSITE := https://www.gnu.org/software/vcdimager/ $(PKG)_IGNORE := $(PKG)_VERSION := 0.7.24 $(PKG)_CHECKSUM := 075d7a67353ff3004745da781435698b6bc4a053838d0d4a3ce0516d7d974694 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://ftp.gnu.org/gnu/vcdimager/$(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://ftp.gnu.org/gnu/vcdimager/$(PKG)-$($(PKG)_VERSION).tar.gz $(PKG)_DEPS := gcc libcdio libxml2 popt define $(PKG)_UPDATE diff --git a/src/vidstab-1-lib-type.patch b/src/vidstab-1-lib-type.patch index 6fbf2255..2956d672 100644 --- a/src/vidstab-1-lib-type.patch +++ b/src/vidstab-1-lib-type.patch @@ -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. This patch has been taken from: https://github.com/georgmartius/vid.stab/pull/19 diff --git a/src/vidstab-2-lib-type-fix.patch b/src/vidstab-2-lib-type-fix.patch index 1a6f365a..2fe99bc6 100644 --- a/src/vidstab-2-lib-type-fix.patch +++ b/src/vidstab-2-lib-type-fix.patch @@ -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. This patch has been taken from: https://github.com/georgmartius/vid.stab/pull/20 diff --git a/src/vidstab-test.c b/src/vidstab-test.c index ab6c47dd..8626ad82 100644 --- a/src/vidstab-test.c +++ b/src/vidstab-test.c @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <vid.stab/libvidstab.h> diff --git a/src/vidstab.mk b/src/vidstab.mk index 191bea8a..3dd95eec 100644 --- a/src/vidstab.mk +++ b/src/vidstab.mk @@ -1,7 +1,8 @@ -# 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 := vidstab +$(PKG)_WEBSITE := http://public.hronopik.de/vid.stab/features.php?lang=en +$(PKG)_DESCR := vid.stab video stablizer $(PKG)_IGNORE := $(PKG)_VERSION := 0.98b $(PKG)_CHECKSUM := 530f0bf7479ec89d9326af3a286a15d7d6a90fcafbb641e3b8bdb8d05637d025 @@ -19,13 +20,12 @@ endef define $(PKG)_BUILD mkdir '$(1)/build' - cd '$(1)/build' && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' + cd '$(1)/build' && '$(TARGET)-cmake' .. $(MAKE) -C '$(1)/build' -j $(JOBS) $(MAKE) -C '$(1)/build' -j 1 install '$(TARGET)-gcc' \ -W -Wall -Werror -pedantic \ - '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-vidstab.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-vidstab.exe' \ `'$(TARGET)-pkg-config' --static --cflags --libs vidstab` -endef \ No newline at end of file +endef diff --git a/src/vigra-test.cpp b/src/vigra-test.cpp index 538a409c..152f67ce 100644 --- a/src/vigra-test.cpp +++ b/src/vigra-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <string> diff --git a/src/vigra.mk b/src/vigra.mk index cc4ee6c9..32c6b4bd 100644 --- a/src/vigra.mk +++ b/src/vigra.mk @@ -1,24 +1,13 @@ -# 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 := vigra +$(PKG)_WEBSITE := https://ukoethe.github.io/vigra/ $(PKG)_IGNORE := $(PKG)_VERSION := 1.9.0 -$(PKG)_CHECKSUM := 8fbdccb553a4925323098ab27b710fbc87d48f37bf81d404994936a31a31cf01 -$(PKG)_SUBDIR := vigra-$(word 1,$(subst -, ,$($(PKG)_VERSION))) -$(PKG)_FILE := vigra-$($(PKG)_VERSION)-src.tar.gz -$(PKG)_URL := http://hci.iwr.uni-heidelberg.de/vigra-old-versions/$($(PKG)_FILE) +$(PKG)_CHECKSUM := dc041f7ccf838d4321e9bcf522fece1758768dd7a3f8350d1e83e2b8e6daf1e6 +$(PKG)_GH_CONF := ukoethe/vigra, Version-,,,- $(PKG)_DEPS := gcc jpeg libpng openexr tiff -define $(PKG)_UPDATE - $(WGET) -q -O- "https://api.github.com/repos/ukoethe/vigra/releases" | \ - grep 'tag_name' | \ - $(SED) -n 's,.*tag_name": "Version-\([0-9][^>]*\)".*,\1,p' | \ - tr '-' '.' | \ - $(SORT) -Vr | \ - head -1 -endef - define $(PKG)_BUILD # Make sure the package gets built statically # NB: we're not actually building vigranumpy, but preparing it in case we ever will won't hurt @@ -26,9 +15,7 @@ define $(PKG)_BUILD $(SED) -i 's,\bSHARED\b,STATIC,' '$(1)/config/VIGRA_ADD_NUMPY_MODULE.cmake' $(SED) -i 's,\bSHARED\b,STATIC,' '$(1)/vigranumpy/test/CMakeLists.txt' mkdir '$(1)/build' - cd '$(1)/build' && cmake .. \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ - -DLIBTYPE=STATIC \ + cd '$(1)/build' && '$(TARGET)-cmake' .. \ -DVIGRA_STATIC_LIB=1 \ -DWITH_HDF5=OFF \ -DWITH_VIGRANUMPY=OFF \ @@ -36,7 +23,7 @@ define $(PKG)_BUILD $(MAKE) -C '$(1)/build' -j '$(JOBS)' install $(TARGET)-g++ \ - '$(2).cpp' -o $(PREFIX)/$(TARGET)/bin/test-vigra.exe \ + '$(TEST_FILE)' -o $(PREFIX)/$(TARGET)/bin/test-vigra.exe \ -DVIGRA_STATIC_LIB \ -lvigraimpex `'$(TARGET)-pkg-config' OpenEXR libtiff-4 libpng --cflags --libs` -ljpeg endef diff --git a/src/vmime-1.patch b/src/vmime-1.patch index c2026fb3..95d6cf7f 100644 --- a/src/vmime-1.patch +++ b/src/vmime-1.patch @@ -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 bc98fcbc262514378bbb9a5a011cdaf7aef5e744 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> diff --git a/src/vmime.mk b/src/vmime.mk index 247dc68e..c0459eff 100644 --- a/src/vmime.mk +++ b/src/vmime.mk @@ -1,47 +1,40 @@ -# 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 := vmime +$(PKG)_WEBSITE := https://www.vmime.org/ +$(PKG)_DESCR := VMime $(PKG)_IGNORE := -$(PKG)_VERSION := 7e36a74 -$(PKG)_CHECKSUM := 4b73f0f30e37f9134fb5157aca3576ca29036262d379aaffcce3a443a2f271ee -$(PKG)_SUBDIR := kisli-vmime-$($(PKG)_VERSION) -$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := https://github.com/kisli/vmime/tarball/$($(PKG)_VERSION)/$($(PKG)_FILE) -$(PKG)_DEPS := gcc gnutls libgsasl pthreads zlib - -$(PKG)_UPDATE = $(call MXE_GET_GITHUB_SHA, kisli/vmime, master) | $(SED) 's/^\(.......\).*/\1/;' +$(PKG)_VERSION := 3d3ed7b +$(PKG)_CHECKSUM := 0524d8492ae1f20e7295c070dae85c631a376a8d3440c48ea41d8213b2aefd6a +$(PKG)_GH_CONF := kisli/vmime/master +$(PKG)_DEPS := gcc gnutls libgsasl libiconv pthreads zlib define $(PKG)_BUILD # The following hint is probably needed for ICU: # -DICU_LIBRARIES="`'$(TARGET)-pkg-config' --libs-only-l icu-i18n`" - cd '$(1)' && cmake \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + cd '$(1)' && '$(TARGET)-cmake' \ -DCMAKE_AR='$(PREFIX)/bin/$(TARGET)-ar' \ -DCMAKE_RANLIB='$(PREFIX)/bin/$(TARGET)-ranlib' \ -DVMIME_HAVE_MESSAGING_PROTO_SENDMAIL=False \ -DVMIME_HAVE_MLANG_H=False \ -DCMAKE_CXX_FLAGS='-DWINVER=0x0501 -DAI_ADDRCONFIG=0x0400 -DIPV6_V6ONLY=27' \ - -DVMIME_BUILD_STATIC_LIBRARY=$(if $(BUILD_STATIC),ON,OFF) \ - -DVMIME_BUILD_SHARED_LIBRARY=$(if $(BUILD_SHARED),ON,OFF) \ + -DVMIME_BUILD_STATIC_LIBRARY=$(CMAKE_STATIC_BOOL) \ + -DVMIME_BUILD_SHARED_LIBRARY=$(CMAKE_SHARED_BOOL) \ -DVMIME_BUILD_SAMPLES=OFF \ -DVMIME_BUILD_DOCUMENTATION=OFF \ -DCMAKE_MODULE_PATH='$(1)/cmake' \ - -DVMIME_CHARSETCONV_LIB_IS_ICONV=OFF \ - -DVMIME_CHARSETCONV_LIB_IS_ICU=OFF \ - -DVMIME_CHARSETCONV_LIB_IS_WIN=ON \ - -DVMIME_TLS_SUPPORT_LIB_IS_GNUTLS=ON \ - -DVMIME_TLS_SUPPORT_LIB_IS_OPENSSL=OFF \ + -DVMIME_CHARSETCONV_LIB=iconv \ + -DVMIME_TLS_SUPPORT_LIB=gnutls \ -DVMIME_SHARED_PTR_USE_CXX=ON \ -DCXX11_COMPILER_FLAGS=ON \ -C '$(PWD)/src/vmime-TryRunResults.cmake' \ . $(MAKE) -C '$(1)' -j '$(JOBS)' - $(SED) -i 's,^\(Libs.private:.* \)$(PREFIX)/$(TARGET)/lib/libiconv\.a,\1-liconv,g' $(1)/vmime.pc - $(if $(BUILD_STATIC),$(SED) -i 's/^\(Cflags:.* \)/\1 -DVMIME_STATIC /g' $(1)/vmime.pc) - $(MAKE) -C '$(1)' install + $(MAKE) -C '$(1)' -j 1 install + $(SED) -i 's,^\(Libs.private:.* \)$(PREFIX)/$(TARGET)/lib/libiconv\.a,\1-liconv,g' '$(PREFIX)/$(TARGET)/lib/pkgconfig/vmime.pc' + $(if $(BUILD_STATIC),$(SED) -i 's/^\(Cflags:.* \)/\1 -DVMIME_STATIC /g' '$(PREFIX)/$(TARGET)/lib/pkgconfig/vmime.pc') $(if $(BUILD_SHARED),$(INSTALL) -m644 '$(1)/build/bin/libvmime.dll' '$(PREFIX)/$(TARGET)/bin/') $(SED) -i 's/posix/windows/g;' '$(1)/examples/example6.cpp' diff --git a/src/vo-aacenc.mk b/src/vo-aacenc.mk index 3ad64dbb..2eae2514 100644 --- a/src/vo-aacenc.mk +++ b/src/vo-aacenc.mk @@ -1,17 +1,18 @@ -# 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 := vo-aacenc +$(PKG)_WEBSITE := https://github.com/mstorsjo/vo-aacenc +$(PKG)_DESCR := VO-AACENC $(PKG)_IGNORE := $(PKG)_VERSION := 0.1.3 $(PKG)_CHECKSUM := e51a7477a359f18df7c4f82d195dab4e14e7414cbd48cf79cc195fc446850f36 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/opencore-amr/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/opencore-amr/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/opencore-amr/files/vo-aacenc/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/opencore-amr/files/vo-aacenc/' | \ $(SED) -n 's,.*aacenc-\([0-9.]*\)\.tar.*,\1,p' | \ $(SORT) -V | \ tail -1 diff --git a/src/vo-amrwbenc.mk b/src/vo-amrwbenc.mk index 66e982de..fc4b94d6 100644 --- a/src/vo-amrwbenc.mk +++ b/src/vo-amrwbenc.mk @@ -1,17 +1,18 @@ -# 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 := vo-amrwbenc +$(PKG)_WEBSITE := https://github.com/mstorsjo/vo-amrwbenc +$(PKG)_DESCR := VO-AMRWBENC $(PKG)_IGNORE := $(PKG)_VERSION := 0.1.3 $(PKG)_CHECKSUM := 5652b391e0f0e296417b841b02987d3fd33e6c0af342c69542cbb016a71d9d4e $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/opencore-amr/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/opencore-amr/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/opencore-amr/files/vo-amrwbenc/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/opencore-amr/files/vo-amrwbenc/' | \ $(SED) -n 's,.*amrwbenc-\([0-9.]*\)\.tar.*,\1,p' | \ $(SORT) -V | \ tail -1 diff --git a/src/vorbis.mk b/src/vorbis.mk index 32688ae6..f4b4412b 100644 --- a/src/vorbis.mk +++ b/src/vorbis.mk @@ -1,7 +1,8 @@ -# 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 := vorbis +$(PKG)_WEBSITE := http://www.vorbis.com/ +$(PKG)_DESCR := Vorbis $(PKG)_IGNORE := $(PKG)_VERSION := 1.3.5 $(PKG)_CHECKSUM := 6efbcecdd3e5dfbf090341b485da9d176eb250d893e3eb378c428a2db38301ce @@ -11,7 +12,7 @@ $(PKG)_URL := http://downloads.xiph.org/releases/vorbis/$($(PKG)_FILE) $(PKG)_DEPS := gcc ogg define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.xiph.org/downloads/' | \ + $(WGET) -q -O- 'https://www.xiph.org/downloads/' | \ $(SED) -n 's,.*libvorbis-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef diff --git a/src/vtk-1-fixes.patch b/src/vtk-1-fixes.patch new file mode 100644 index 00000000..aa44f0f3 --- /dev/null +++ b/src/vtk-1-fixes.patch @@ -0,0 +1,555 @@ +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: Muellni <mmuellen@gmx.de> +Date: Tue, 25 Oct 2011 23:32:42 +0200 +Subject: [PATCH] add file TryRunResults.cmake + + +diff --git a/TryRunResults.cmake b/TryRunResults.cmake +new file mode 100644 +index 1111111..2222222 +--- /dev/null ++++ b/TryRunResults.cmake +@@ -0,0 +1,30 @@ ++SET( VTK_TYPE_CHAR_IS_SIGNED ++ "1" ++ CACHE STRING "Result from TRY_RUN" FORCE) ++SET( VTK_ANSI_STREAM_EOF_RESULT ++ "1" ++ CACHE STRING "Result from TRY_RUN" FORCE) ++SET( KWSYS_CHAR_IS_SIGNED ++ "0" ++ CACHE STRING "Result from TRY_RUN" FORCE) ++ ++SET( KWSYS_CHAR_IS_SIGNED__TRYRUN_OUTPUT ++ "" ++ CACHE STRING "Output from TRY_RUN" FORCE) ++ ++SET( CMAKE_REQUIRE_LARGE_FILE_SUPPORT ++ "" ++ CACHE STRING "Result from TRY_RUN" FORCE) ++ ++SET( CMAKE_REQUIRE_LARGE_FILE_SUPPORT__TRYRUN_OUTPUT ++ "" ++ CACHE STRING "Output from TRY_RUN" FORCE) ++ ++SET( KWSYS_LFS_WORKS ++ "0" ++ CACHE STRING "Result from TRY_RUN" FORCE) ++ ++SET( KWSYS_LFS_WORKS__TRYRUN_OUTPUT ++ "" ++ CACHE STRING "Output from TRY_RUN" FORCE) ++ + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Muellni <mmuellen@gmx.de> +Date: Tue, 25 Oct 2011 23:32:42 +0200 +Subject: [PATCH] PATH_SUFFIXES freetype2 + +This patch has been taken from: +http://www.vtk.org/Bug/view.php?id=12688 + +diff --git a/CMake/FindFREETYPE.cmake b/CMake/FindFREETYPE.cmake +index 1111111..2222222 100644 +--- a/CMake/FindFREETYPE.cmake ++++ b/CMake/FindFREETYPE.cmake +@@ -15,6 +15,7 @@ FIND_PATH(FREETYPE_INCLUDE_DIR_FT2BUILD ft2build.h) + FIND_PATH(FREETYPE_INCLUDE_DIR_FTHEADER freetype/config/ftheader.h + /usr/include/freetype2 + /usr/local/include/freetype2 ++ PATH_SUFFIXES freetype2 + ) + + FIND_LIBRARY(FREETYPE_LIBRARY freetype) + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Muellni <mmuellen@gmx.de> +Date: Mon, 31 Oct 2011 09:04:03 +0100 +Subject: [PATCH] building without wine + +merged compile tools patches into one patch file and added +a CompileTools target for compiling only the compile tools +during the native build + +This patch has been taken from: +http://www.vtk.org/Bug/view.php?id=12686 + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1111111..2222222 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,6 +42,10 @@ IF(NOT EXPORT_EXECUTABLES_FILE) + FILE(WRITE "${EXPORT_EXECUTABLES_FILE}" "#generated by VTK, do not edit\n") + ENDIF(NOT EXPORT_EXECUTABLES_FILE) + ++# Add a target for building only the compile tools ++ADD_CUSTOM_TARGET(CompileTools) ++SET(COMPILE_TOOLS_TARGET "CompileTools") ++ + GET_PROPERTY(VTK_TARGET_SUPPORTS_SHARED_LIBS + GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS) + +diff --git a/Utilities/kwsys/CMakeLists.txt b/Utilities/kwsys/CMakeLists.txt +index 1111111..2222222 100644 +--- a/Utilities/kwsys/CMakeLists.txt ++++ b/Utilities/kwsys/CMakeLists.txt +@@ -937,13 +937,20 @@ ENDIF(KWSYS_USE_String) + # file and build it into the library. Win9x platforms reproduce the + # executable into a temporary directory when it is needed. + IF(KWSYS_USE_Process) +- IF(NOT UNIX) ++ IF(NOT CMAKE_CROSSCOMPILING) + # Build the forwarding executable itself and a program that will + # encode it into a C file. +- ADD_EXECUTABLE(${KWSYS_NAMESPACE}ProcessFwd9x ProcessFwd9x.c) + ADD_EXECUTABLE(${KWSYS_NAMESPACE}EncodeExecutable EncodeExecutable.c) +- KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}ProcessFwd9x PROPERTY LABELS ${KWSYS_LABELS_EXE}) + KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}EncodeExecutable PROPERTY LABELS ${KWSYS_LABELS_EXE}) ++ EXPORT(TARGETS ${KWSYS_NAMESPACE}EncodeExecutable FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND) ++ IF(COMPILE_TOOLS_TARGET) ++ ADD_DEPENDENCIES(${COMPILE_TOOLS_TARGET} ${KWSYS_NAMESPACE}EncodeExecutable) ++ ENDIF(COMPILE_TOOLS_TARGET) ++ ENDIF(NOT CMAKE_CROSSCOMPILING) ++ ++ IF(NOT UNIX) ++ ADD_EXECUTABLE(${KWSYS_NAMESPACE}ProcessFwd9x ProcessFwd9x.c) ++ KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}ProcessFwd9x PROPERTY LABELS ${KWSYS_LABELS_EXE}) + + # Construct the location of the executable to be encoded. + SET(BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}) +@@ -957,24 +964,23 @@ IF(KWSYS_USE_Process) + ENDIF(CMAKE_BUILD_TOOL MATCHES "make") + + # Take advantage of a better custom command syntax if possible. +- SET(CMD ${BIN_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}EncodeExecutable.exe) + SET(FWD ${BIN_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}ProcessFwd9x.exe) + IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6) + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c +- COMMAND ${CMD} ++ COMMAND ${KWSYS_NAMESPACE}EncodeExecutable + ARGS ${FWD} ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c + ${KWSYS_NAMESPACE} ProcessFwd9x +- DEPENDS ${CMD} ${FWD}) ++ DEPENDS ${KWSYS_NAMESPACE}EncodeExecutable ${FWD}) + ELSE("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6) + ADD_CUSTOM_COMMAND( + TARGET ${KWSYS_NAMESPACE} + SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/ProcessFwd9x.c +- COMMAND ${CMD} ++ COMMAND ${KWSYS_NAMESPACE}EncodeExecutable + ARGS ${FWD} ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c + ${KWSYS_NAMESPACE} ProcessFwd9x + OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c +- DEPENDS ${CMD} ${FWD}) ++ DEPENDS ${KWSYS_NAMESPACE}EncodeExecutable ${FWD}) + ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6) + + # Make sure build occurs in proper order. +diff --git a/Utilities/vtkhdf5/src/CMakeLists.txt b/Utilities/vtkhdf5/src/CMakeLists.txt +index 1111111..2222222 100644 +--- a/Utilities/vtkhdf5/src/CMakeLists.txt ++++ b/Utilities/vtkhdf5/src/CMakeLists.txt +@@ -572,34 +572,40 @@ INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR}) + # Setup the H5Detect utility which generates H5Tinit with platform + # specific type checks inside + #----------------------------------------------------------------------------- +-SET (CMD ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5detect${EXE_EXT}) +-IF (XCODE) +- SET (CMD "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/\${CONFIGURATION}/H5detect") +-ENDIF (XCODE) +-ADD_EXECUTABLE (H5detect ${HDF5_SRC_DIR}/H5detect.c) +-IF (WIN32) +- TARGET_LINK_LIBRARIES (H5detect "ws2_32.lib") +-ENDIF (WIN32) ++IF(NOT CMAKE_CROSSCOMPILING) ++ ADD_EXECUTABLE (H5detect ${HDF5_SRC_DIR}/H5detect.c) ++ IF (WIN32) ++ TARGET_LINK_LIBRARIES (H5detect "ws2_32.lib") ++ ENDIF (WIN32) ++ ++ EXPORT(TARGETS H5detect FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND) ++ IF(COMPILE_TOOLS_TARGET) ++ ADD_DEPENDENCIES(${COMPILE_TOOLS_TARGET} H5detect) ++ ENDIF(COMPILE_TOOLS_TARGET) ++ENDIF(NOT CMAKE_CROSSCOMPILING) + + ADD_CUSTOM_COMMAND ( + OUTPUT ${HDF5_BINARY_DIR}/H5Tinit.c +- COMMAND ${CMD} ++ COMMAND H5detect + ARGS > ${HDF5_BINARY_DIR}/H5Tinit.c + DEPENDS H5detect + ) + +-SET (CMDL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5make_libsettings${EXE_EXT}) +-IF (XCODE) +- SET (CMDL "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/\${CONFIGURATION}/H5make_libsettings") +-ENDIF (XCODE) +-ADD_EXECUTABLE (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c) +-IF (WIN32) +- TARGET_LINK_LIBRARIES (H5make_libsettings "ws2_32.lib") +-ENDIF (WIN32) ++IF(NOT CMAKE_CROSSCOMPILING) ++ ADD_EXECUTABLE (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c) ++ IF (WIN32) ++ TARGET_LINK_LIBRARIES (H5make_libsettings "ws2_32.lib") ++ ENDIF (WIN32) ++ ++ EXPORT(TARGETS H5make_libsettings FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND) ++ IF(COMPILE_TOOLS_TARGET) ++ ADD_DEPENDENCIES(${COMPILE_TOOLS_TARGET} H5make_libsettings) ++ ENDIF(COMPILE_TOOLS_TARGET) ++ENDIF(NOT CMAKE_CROSSCOMPILING) + + ADD_CUSTOM_COMMAND ( + OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c +- COMMAND ${CMDL} ++ COMMAND H5make_libsettings + ARGS > ${HDF5_BINARY_DIR}/H5lib_settings.c + DEPENDS H5make_libsettings + ) + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Tue, 22 Nov 2011 22:18:31 +1100 +Subject: [PATCH] disable gui components in native build + + +diff --git a/Utilities/CMakeLists.txt b/Utilities/CMakeLists.txt +index 1111111..2222222 100644 +--- a/Utilities/CMakeLists.txt ++++ b/Utilities/CMakeLists.txt +@@ -68,10 +68,8 @@ IF(VTK_USE_PARALLEL) + VTK_THIRD_PARTY_SUBDIR(Cosmo Cosmo) + ENDIF(VTK_USE_PARALLEL) + +-IF(VTK_USE_RENDERING) +- ADD_SUBDIRECTORY(ftgl) +- ADD_SUBDIRECTORY(ParseOGLExt) +-ENDIF(VTK_USE_RENDERING) ++ADD_SUBDIRECTORY(ftgl) ++ADD_SUBDIRECTORY(ParseOGLExt) + + IF(NOT VTK_INSTALL_NO_DEVELOPMENT) + INSTALL(FILES + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Wed, 23 Nov 2011 20:31:10 +1100 +Subject: [PATCH] fix third party module search path + +This patch has been taken from: +http://www.vtk.org/Bug/view.php?id=12746 + +diff --git a/CMake/vtkThirdParty.cmake b/CMake/vtkThirdParty.cmake +index 1111111..2222222 100644 +--- a/CMake/vtkThirdParty.cmake ++++ b/CMake/vtkThirdParty.cmake +@@ -3,11 +3,11 @@ MACRO(VTK_THIRD_PARTY_OPTION upper lower) + OPTION(VTK_USE_SYSTEM_${upper} "Use the system's ${lower} library." OFF) + MARK_AS_ADVANCED(VTK_USE_SYSTEM_${upper}) + IF(VTK_USE_SYSTEM_${upper}) +- IF(EXISTS ${CMAKE_ROOT}/Modules/Find${upper}.cmake) +- INCLUDE(${CMAKE_ROOT}/Modules/Find${upper}.cmake) +- ELSE(EXISTS ${CMAKE_ROOT}/Modules/Find${upper}.cmake) ++ IF(EXISTS ${VTK_CMAKE_DIR}/Find${upper}.cmake) + INCLUDE(${VTK_CMAKE_DIR}/Find${upper}.cmake) +- ENDIF(EXISTS ${CMAKE_ROOT}/Modules/Find${upper}.cmake) ++ ELSE(EXISTS ${VTK_CMAKE_DIR}/Find${upper}.cmake) ++ INCLUDE(${CMAKE_ROOT}/Modules/Find${upper}.cmake) ++ ENDIF(EXISTS ${VTK_CMAKE_DIR}/Find${upper}.cmake) + MARK_AS_ADVANCED(${upper}_INCLUDE_DIR ${upper}_LIBRARY) + IF(${upper}_FOUND) + SET(VTK_${upper}_LIBRARIES ${${upper}_LIBRARIES}) + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Mon, 28 Nov 2011 00:24:59 +1100 +Subject: [PATCH] portability fix for Debian kFreeBSD + + +diff --git a/Utilities/vtkhdf5/src/H5private.h b/Utilities/vtkhdf5/src/H5private.h +index 1111111..2222222 100644 +--- a/Utilities/vtkhdf5/src/H5private.h ++++ b/Utilities/vtkhdf5/src/H5private.h +@@ -141,7 +141,7 @@ + # include <sys/sysinfo.h> + #endif + /* Prevent compile errors with GCC 4.3 on Solaris 2.10 */ +-#if defined (__SVR4) && defined (__sun) ++#if defined (__SVR4) && defined (__sun) || defined(__FreeBSD_kernel__) && defined(__GLIBC__) + /* In file included from /usr/include/sys/klwp.h:19, + * from /usr/include/sys/thread.h:13, + * from /usr/include/sys/proc.h:20, + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: David Partyka <david.partyka@kitware.com> +Date: Wed, 21 Sep 2011 13:19:30 -0400 +Subject: [PATCH] Merge branch '11742_mingw64_compile_fixes' into release + +Style fixes were removed by Boris Nagaev <bnagaev@gmail.com>. + +diff --git a/Common/vtkWin32Header.h b/Common/vtkWin32Header.h +index 1111111..2222222 100644 +--- a/Common/vtkWin32Header.h ++++ b/Common/vtkWin32Header.h +@@ -102,9 +102,15 @@ Do_not_include_vtkWin32Header_directly__vtkSystemIncludes_includes_it; + # define vtkGetWindowLong GetWindowLong + # define vtkSetWindowLong SetWindowLong + # define vtkLONG LONG ++# ifdef _WIN64 ++# define vtkGWL_WNDPROC GWLP_WNDPROC ++# define vtkGWL_HINSTANCE GWLP_HINSTANCE ++# define vtkGWL_USERDATA GWLP_USERDATA ++# else + # define vtkGWL_WNDPROC GWL_WNDPROC + # define vtkGWL_HINSTANCE GWL_HINSTANCE + # define vtkGWL_USERDATA GWL_USERDATA ++# endif + #endif // + + #endif +diff --git a/Hybrid/vtkVideoSource.cxx b/Hybrid/vtkVideoSource.cxx +index 1111111..2222222 100644 +--- a/Hybrid/vtkVideoSource.cxx ++++ b/Hybrid/vtkVideoSource.cxx +@@ -432,7 +432,7 @@ void vtkVideoSource::InternalGrab() + ptr = reinterpret_cast<vtkUnsignedCharArray *>(this->FrameBuffer[index])->GetPointer(0); + + // Somebody should check this: +- lptr = (int *)(((((long)ptr) + 3)/4)*4); ++ lptr = (int *)(((((intptr_t)ptr) + 3)/4)*4); + i = totalSize/4; + + while (--i >= 0) +diff --git a/Rendering/vtkFreeTypeTools.cxx b/Rendering/vtkFreeTypeTools.cxx +index 1111111..2222222 100644 +--- a/Rendering/vtkFreeTypeTools.cxx ++++ b/Rendering/vtkFreeTypeTools.cxx +@@ -222,7 +222,7 @@ vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, + // Map the ID to a text property + vtkSmartPointer<vtkTextProperty> tprop = + vtkSmartPointer<vtkTextProperty>::New(); +- self->MapIdToTextProperty(reinterpret_cast<unsigned long>(face_id), tprop); ++ self->MapIdToTextProperty(reinterpret_cast<intptr_t>(face_id), tprop); + + // Fonts, organized by [Family][Bold][Italic] + static EmbeddedFontStruct EmbeddedFonts[3][2][2] = +diff --git a/Rendering/vtkFreeTypeUtilities.cxx b/Rendering/vtkFreeTypeUtilities.cxx +index 1111111..2222222 100644 +--- a/Rendering/vtkFreeTypeUtilities.cxx ++++ b/Rendering/vtkFreeTypeUtilities.cxx +@@ -337,7 +337,7 @@ vtkFreeTypeUtilitiesFaceRequester(FTC_FaceID face_id, + // Map the ID to a text property + + vtkTextProperty *tprop = vtkTextProperty::New(); +- self->MapIdToTextProperty(reinterpret_cast<unsigned long>(face_id), tprop); ++ self->MapIdToTextProperty(reinterpret_cast<intptr_t>(face_id), tprop); + + // Fonts, organized by [Family][Bold][Italic] + +diff --git a/Rendering/vtkWin32OpenGLRenderWindow.cxx b/Rendering/vtkWin32OpenGLRenderWindow.cxx +index 1111111..2222222 100644 +--- a/Rendering/vtkWin32OpenGLRenderWindow.cxx ++++ b/Rendering/vtkWin32OpenGLRenderWindow.cxx +@@ -842,7 +842,7 @@ void vtkWin32OpenGLRenderWindow::CreateAWindow() + } + //UpdateWindow(this->WindowId); + this->OwnWindow = 1; +- vtkSetWindowLong(this->WindowId,sizeof(vtkLONG),(vtkLONG)this); ++ vtkSetWindowLong(this->WindowId,sizeof(vtkLONG),(intptr_t)this); + } + if (!this->DeviceContext) + { +diff --git a/Rendering/vtkWin32RenderWindowInteractor.cxx b/Rendering/vtkWin32RenderWindowInteractor.cxx +index 1111111..2222222 100644 +--- a/Rendering/vtkWin32RenderWindowInteractor.cxx ++++ b/Rendering/vtkWin32RenderWindowInteractor.cxx +@@ -17,10 +17,12 @@ + #include <string.h> + #include <math.h> + +-#define _WIN32_WINNT 0x0400 // for trackmouseevent support requires Win95 with IE 3.0 or greater. +- + #include "vtkWin32OpenGLRenderWindow.h" + ++#ifndef _WIN32_WINNT ++#define _WIN32_WINNT 0x0400 // for trackmouseevent support requires Win95 with IE 3.0 or greater. ++#endif ++ + // Mouse wheel support + // In an ideal world we would just have to include <zmouse.h>, but it is not + // always available with all compilers/headers +@@ -91,11 +93,11 @@ vtkWin32RenderWindowInteractor::~vtkWin32RenderWindowInteractor() + // well send a USER message to the other + // event handler so that it can properly + // call this event handler if required +- CallWindowProc(this->OldProc,this->WindowId,WM_USER+14,28,(LONG)this->OldProc); ++ CallWindowProc(this->OldProc,this->WindowId,WM_USER+14,28,(intptr_t)this->OldProc); + } + else + { +- vtkSetWindowLong(this->WindowId,vtkGWL_WNDPROC,(vtkLONG)this->OldProc); ++ vtkSetWindowLong(this->WindowId,vtkGWL_WNDPROC,(intptr_t)this->OldProc); + } + this->Enabled = 0; + } +@@ -182,11 +184,11 @@ void vtkWin32RenderWindowInteractor::Enable() + // well send a USER message to the other + // event handler so that it can properly + // call this event handler if required +- CallWindowProc(this->OldProc,this->WindowId,WM_USER+12,24,(LONG)vtkHandleMessage); ++ CallWindowProc(this->OldProc,this->WindowId,WM_USER+12,24,(intptr_t)vtkHandleMessage); + } + else + { +- vtkSetWindowLong(this->WindowId,vtkGWL_WNDPROC,(vtkLONG)vtkHandleMessage); ++ vtkSetWindowLong(this->WindowId,vtkGWL_WNDPROC,(intptr_t)vtkHandleMessage); + } + + #ifdef VTK_USE_TDX +@@ -232,11 +234,11 @@ void vtkWin32RenderWindowInteractor::Disable() + // well send a USER message to the other + // event handler so that it can properly + // call this event handler if required +- CallWindowProc(this->OldProc,this->WindowId,WM_USER+14,28,(LONG)this->OldProc); ++ CallWindowProc(this->OldProc,this->WindowId,WM_USER+14,28,(intptr_t)this->OldProc); + } + else + { +- vtkSetWindowLong(this->WindowId,vtkGWL_WNDPROC,(vtkLONG)this->OldProc); ++ vtkSetWindowLong(this->WindowId,vtkGWL_WNDPROC,(intptr_t)this->OldProc); + } + #ifdef VTK_USE_TDX + if(this->Device->GetInitialized()) + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Sun, 23 Jun 2013 04:50:32 +1000 +Subject: [PATCH] enable mingw-w64 build + +This patch has been taken from: +http://vtk.org/Bug/print_bug_page.php?bug_id=11742 + +diff --git a/Hybrid/vtkWin32VideoSource.cxx b/Hybrid/vtkWin32VideoSource.cxx +index 1111111..2222222 100644 +--- a/Hybrid/vtkWin32VideoSource.cxx ++++ b/Hybrid/vtkWin32VideoSource.cxx +@@ -274,7 +274,7 @@ void vtkWin32VideoSource::Initialize() + } + + // set the user data to 'this' +- vtkSetWindowLong(this->Internal->ParentWnd,vtkGWL_USERDATA,(vtkLONG)this); ++ vtkSetWindowLong(this->Internal->ParentWnd,vtkGWL_USERDATA,(intptr_t)this); + + // Create the capture window + this->Internal->CapWnd = capCreateCaptureWindow("Capture", +@@ -339,7 +339,7 @@ void vtkWin32VideoSource::Initialize() + } + + // set user data for callbacks +- if (!capSetUserData(this->Internal->CapWnd,(long)this)) ++ if (!capSetUserData(this->Internal->CapWnd,(intptr_t)this)) + { + vtkErrorMacro(<< "Initialize: couldn't set user data for callback"\ + << " (" << GetLastError() << ")"); + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Sat, 19 Dec 2015 02:36:12 +0300 +Subject: [PATCH] cmake: use STREQUAL, not MATCHES to compare paths + +See https://github.com/mxe/mxe/issues/1087 + +diff --git a/Utilities/MaterialLibrary/CMakeLists.txt b/Utilities/MaterialLibrary/CMakeLists.txt +index 1111111..2222222 100644 +--- a/Utilities/MaterialLibrary/CMakeLists.txt ++++ b/Utilities/MaterialLibrary/CMakeLists.txt +@@ -91,13 +91,13 @@ ENDMACRO(COPY_FILES_TO_DIR) + + # Shaders/Materials provided in Utilities/MaterialLibrary/Repository + # are copied over to the binary dir. +-IF (NOT "${VTK_BINARY_DIR}" MATCHES "^${VTK_SOURCE_DIR}$") ++IF (NOT "${VTK_BINARY_DIR}" STREQUAL "${VTK_SOURCE_DIR}") + # Ensure that the Source and Build dir are not same. + # In that case we don't need to copy anything. + COPY_FILES_TO_DIR(${MaterialLibrary_SOURCE_DIR}/Repository + ${VTK_DEFAULT_SHADERS_DIR}) + +-ENDIF (NOT "${VTK_BINARY_DIR}" MATCHES "^${VTK_SOURCE_DIR}$") ++ENDIF (NOT "${VTK_BINARY_DIR}" STREQUAL "${VTK_SOURCE_DIR}") + + # Build the ShaderCodes Library. + SET (CgCodes +diff --git a/Utilities/vtkTclTest2Py/CMakeLists.txt b/Utilities/vtkTclTest2Py/CMakeLists.txt +index 1111111..2222222 100644 +--- a/Utilities/vtkTclTest2Py/CMakeLists.txt ++++ b/Utilities/vtkTclTest2Py/CMakeLists.txt +@@ -40,9 +40,9 @@ IF(PYTHON_EXECUTABLE AND VTK_WRAP_PYTHON) + SET(VTK_PYTHON_SOURCE_FILES ${VTK_PYTHON_SOURCE_FILES} ${src}) + ENDFOREACH(file) + +- IF ("${VTK_BINARY_DIR}" MATCHES "^${VTK_SOURCE_DIR}$") ++ IF ("${VTK_BINARY_DIR}" STREQUAL "${VTK_SOURCE_DIR}") + #MESSAGE("In source build -- no need to copy Python files.") +- ELSE ("${VTK_BINARY_DIR}" MATCHES "^${VTK_SOURCE_DIR}$") ++ ELSE ("${VTK_BINARY_DIR}" STREQUAL "${VTK_SOURCE_DIR}") + FOREACH(file ${VTK_PYTHON_FILES}) + SET(src "${VTK_SOURCE_DIR}/Utilities/vtkTclTest2Py/${file}.py") + SET(tgt "${VTK_BINARY_DIR}/Utilities/vtkTclTest2Py/${file}.py") +@@ -52,7 +52,7 @@ IF(PYTHON_EXECUTABLE AND VTK_WRAP_PYTHON) + OUTPUT ${tgt} + COMMENT "source copy") + ENDFOREACH(file) +- ENDIF ("${VTK_BINARY_DIR}" MATCHES "^${VTK_SOURCE_DIR}$") ++ ENDIF ("${VTK_BINARY_DIR}" STREQUAL "${VTK_SOURCE_DIR}") + + # Byte compile the Python files. + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/compile_all_vtk.py.in +diff --git a/Wrapping/Python/CMakeLists.txt b/Wrapping/Python/CMakeLists.txt +index 1111111..2222222 100644 +--- a/Wrapping/Python/CMakeLists.txt ++++ b/Wrapping/Python/CMakeLists.txt +@@ -468,7 +468,7 @@ IF(PYTHON_EXECUTABLE) + SET(VTK_PYTHON_SOURCE_FILES ${VTK_PYTHON_SOURCE_FILES} ${src}) + ENDFOREACH(file) + +- IF (NOT "${VTK_BINARY_DIR}" MATCHES "^${VTK_SOURCE_DIR}$") ++ IF (NOT "${VTK_BINARY_DIR}" STREQUAL "${VTK_SOURCE_DIR}") + FOREACH(file ${VTK_PYTHON_FILES}) + SET(src "${VTK_SOURCE_DIR}/Wrapping/Python/${file}.py") + SET(tgt "${VTK_BINARY_DIR}/Wrapping/Python/${file}.py") +@@ -477,7 +477,7 @@ IF(PYTHON_EXECUTABLE) + OUTPUT ${tgt} + COMMENT "source copy") + ENDFOREACH(file) +- ENDIF (NOT "${VTK_BINARY_DIR}" MATCHES "^${VTK_SOURCE_DIR}$") ++ ENDIF (NOT "${VTK_BINARY_DIR}" STREQUAL "${VTK_SOURCE_DIR}") + + # handle the different configuration types (each will have identical files) + SET(VTK_PYTHON_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES}) + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Manuel Massing <m.massing@warped-space.de> +Date: Tue, 25 Apr 2017 12:32:34 +0200 +Subject: [PATCH] cmake: update regex to also match gcc6 versions + + +diff --git a/CMake/vtkCompilerExtras.cmake b/CMake/vtkCompilerExtras.cmake +index 1111111..2222222 100644 +--- a/CMake/vtkCompilerExtras.cmake ++++ b/CMake/vtkCompilerExtras.cmake +@@ -25,7 +25,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) + # Now check if we can use visibility to selectively export symbols + exec_program(${CMAKE_C_COMPILER} ARGS --version OUTPUT_VARIABLE + _gcc_version_info) +- string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]" ++ string (REGEX MATCH "[3456]\\.[0-9]\\.[0-9]" + _gcc_version "${_gcc_version_info}") + if(NOT _gcc_version) + string (REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0" diff --git a/src/vtk-1-tryrun.patch b/src/vtk-1-tryrun.patch deleted file mode 100644 index 26964c6f..00000000 --- a/src/vtk-1-tryrun.patch +++ /dev/null @@ -1,36 +0,0 @@ -This file is part of MXE. -See index.html for further information. - ---- blubb 1970-01-01 01:00:00.000000000 +0100 -+++ VTK/TryRunResults.cmake 2011-09-27 08:44:04.563613261 +0200 -@@ -0,0 +1,30 @@ -+SET( VTK_TYPE_CHAR_IS_SIGNED -+ "1" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+SET( VTK_ANSI_STREAM_EOF_RESULT -+ "1" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+SET( KWSYS_CHAR_IS_SIGNED -+ "0" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+ -+SET( KWSYS_CHAR_IS_SIGNED__TRYRUN_OUTPUT -+ "" -+ CACHE STRING "Output from TRY_RUN" FORCE) -+ -+SET( CMAKE_REQUIRE_LARGE_FILE_SUPPORT -+ "" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+ -+SET( CMAKE_REQUIRE_LARGE_FILE_SUPPORT__TRYRUN_OUTPUT -+ "" -+ CACHE STRING "Output from TRY_RUN" FORCE) -+ -+SET( KWSYS_LFS_WORKS -+ "0" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+ -+SET( KWSYS_LFS_WORKS__TRYRUN_OUTPUT -+ "" -+ CACHE STRING "Output from TRY_RUN" FORCE) -+ diff --git a/src/vtk-2-findfreetype.patch b/src/vtk-2-findfreetype.patch deleted file mode 100644 index 65e874a7..00000000 --- a/src/vtk-2-findfreetype.patch +++ /dev/null @@ -1,16 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -This patch has been taken from: -http://www.vtk.org/Bug/view.php?id=12688 - ---- VTK/CMake/FindFREETYPE.cmake.orig 2011-08-24 15:37:07.000000000 +0200 -+++ VTK/CMake/FindFREETYPE.cmake 2011-10-25 22:55:52.265702464 +0200 -@@ -15,6 +15,7 @@ - FIND_PATH(FREETYPE_INCLUDE_DIR_FTHEADER freetype/config/ftheader.h - /usr/include/freetype2 - /usr/local/include/freetype2 -+ PATH_SUFFIXES freetype2 - ) - - FIND_LIBRARY(FREETYPE_LIBRARY freetype) diff --git a/src/vtk-3-compile-tools.patch b/src/vtk-3-compile-tools.patch deleted file mode 100644 index 4d1d6dee..00000000 --- a/src/vtk-3-compile-tools.patch +++ /dev/null @@ -1,140 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -This patch has been taken from: -http://www.vtk.org/Bug/view.php?id=12686 - ---- VTK/Utilities/kwsys/CMakeLists.txt 2011-08-24 15:37:12.000000000 +0200 -+++ VTK/Utilities/kwsys/CMakeLists.txt 2011-10-30 00:06:06.402085234 +0200 -@@ -937,13 +937,20 @@ - # file and build it into the library. Win9x platforms reproduce the - # executable into a temporary directory when it is needed. - IF(KWSYS_USE_Process) -- IF(NOT UNIX) -+ IF(NOT CMAKE_CROSSCOMPILING) - # Build the forwarding executable itself and a program that will - # encode it into a C file. -- ADD_EXECUTABLE(${KWSYS_NAMESPACE}ProcessFwd9x ProcessFwd9x.c) - ADD_EXECUTABLE(${KWSYS_NAMESPACE}EncodeExecutable EncodeExecutable.c) -- KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}ProcessFwd9x PROPERTY LABELS ${KWSYS_LABELS_EXE}) - KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}EncodeExecutable PROPERTY LABELS ${KWSYS_LABELS_EXE}) -+ EXPORT(TARGETS ${KWSYS_NAMESPACE}EncodeExecutable FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND) -+ IF(COMPILE_TOOLS_TARGET) -+ ADD_DEPENDENCIES(${COMPILE_TOOLS_TARGET} ${KWSYS_NAMESPACE}EncodeExecutable) -+ ENDIF(COMPILE_TOOLS_TARGET) -+ ENDIF(NOT CMAKE_CROSSCOMPILING) -+ -+ IF(NOT UNIX) -+ ADD_EXECUTABLE(${KWSYS_NAMESPACE}ProcessFwd9x ProcessFwd9x.c) -+ KWSYS_SET_PROPERTY(TARGET ${KWSYS_NAMESPACE}ProcessFwd9x PROPERTY LABELS ${KWSYS_LABELS_EXE}) - - # Construct the location of the executable to be encoded. - SET(BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}) -@@ -957,24 +964,23 @@ - ENDIF(CMAKE_BUILD_TOOL MATCHES "make") - - # Take advantage of a better custom command syntax if possible. -- SET(CMD ${BIN_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}EncodeExecutable.exe) - SET(FWD ${BIN_DIR}${CFG_INTDIR}/${KWSYS_NAMESPACE}ProcessFwd9x.exe) - IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6) - ADD_CUSTOM_COMMAND( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c -- COMMAND ${CMD} -+ COMMAND ${KWSYS_NAMESPACE}EncodeExecutable - ARGS ${FWD} ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c - ${KWSYS_NAMESPACE} ProcessFwd9x -- DEPENDS ${CMD} ${FWD}) -+ DEPENDS ${KWSYS_NAMESPACE}EncodeExecutable ${FWD}) - ELSE("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6) - ADD_CUSTOM_COMMAND( - TARGET ${KWSYS_NAMESPACE} - SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/ProcessFwd9x.c -- COMMAND ${CMD} -+ COMMAND ${KWSYS_NAMESPACE}EncodeExecutable - ARGS ${FWD} ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c - ${KWSYS_NAMESPACE} ProcessFwd9x - OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/${KWSYS_NAMESPACE}ProcessFwd9xEnc.c -- DEPENDS ${CMD} ${FWD}) -+ DEPENDS ${KWSYS_NAMESPACE}EncodeExecutable ${FWD}) - ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6) - - # Make sure build occurs in proper order. - ---- VTK/Utilities/vtkhdf5/src/CMakeLists.txt 2011-08-24 15:37:13.000000000 +0200 -+++ VTK/Utilities/vtkhdf5/src/CMakeLists.txt 2011-10-30 00:13:16.798098058 +0200 -@@ -572,34 +572,40 @@ - # Setup the H5Detect utility which generates H5Tinit with platform - # specific type checks inside - #----------------------------------------------------------------------------- --SET (CMD ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5detect${EXE_EXT}) --IF (XCODE) -- SET (CMD "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/\${CONFIGURATION}/H5detect") --ENDIF (XCODE) --ADD_EXECUTABLE (H5detect ${HDF5_SRC_DIR}/H5detect.c) --IF (WIN32) -- TARGET_LINK_LIBRARIES (H5detect "ws2_32.lib") --ENDIF (WIN32) -+IF(NOT CMAKE_CROSSCOMPILING) -+ ADD_EXECUTABLE (H5detect ${HDF5_SRC_DIR}/H5detect.c) -+ IF (WIN32) -+ TARGET_LINK_LIBRARIES (H5detect "ws2_32.lib") -+ ENDIF (WIN32) -+ -+ EXPORT(TARGETS H5detect FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND) -+ IF(COMPILE_TOOLS_TARGET) -+ ADD_DEPENDENCIES(${COMPILE_TOOLS_TARGET} H5detect) -+ ENDIF(COMPILE_TOOLS_TARGET) -+ENDIF(NOT CMAKE_CROSSCOMPILING) - - ADD_CUSTOM_COMMAND ( - OUTPUT ${HDF5_BINARY_DIR}/H5Tinit.c -- COMMAND ${CMD} -+ COMMAND H5detect - ARGS > ${HDF5_BINARY_DIR}/H5Tinit.c - DEPENDS H5detect - ) - --SET (CMDL ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}${CFG_INIT}/H5make_libsettings${EXE_EXT}) --IF (XCODE) -- SET (CMDL "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/\${CONFIGURATION}/H5make_libsettings") --ENDIF (XCODE) --ADD_EXECUTABLE (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c) --IF (WIN32) -- TARGET_LINK_LIBRARIES (H5make_libsettings "ws2_32.lib") --ENDIF (WIN32) -+IF(NOT CMAKE_CROSSCOMPILING) -+ ADD_EXECUTABLE (H5make_libsettings ${HDF5_SRC_DIR}/H5make_libsettings.c) -+ IF (WIN32) -+ TARGET_LINK_LIBRARIES (H5make_libsettings "ws2_32.lib") -+ ENDIF (WIN32) - -+ EXPORT(TARGETS H5make_libsettings FILE ${EXPORT_EXECUTABLES_FILE} NAMESPACE "${EXPORT_EXECUTABLES_NAMESPACE}" APPEND) -+ IF(COMPILE_TOOLS_TARGET) -+ ADD_DEPENDENCIES(${COMPILE_TOOLS_TARGET} H5make_libsettings) -+ ENDIF(COMPILE_TOOLS_TARGET) -+ENDIF(NOT CMAKE_CROSSCOMPILING) -+ - ADD_CUSTOM_COMMAND ( - OUTPUT ${HDF5_BINARY_DIR}/H5lib_settings.c -- COMMAND ${CMDL} -+ COMMAND H5make_libsettings - ARGS > ${HDF5_BINARY_DIR}/H5lib_settings.c - DEPENDS H5make_libsettings - ) - ---- VTK/CMakeLists.txt 2011-08-24 15:37:07.000000000 +0200 -+++ VTK/CMakeLists.txt 2011-10-31 09:12:59.451958504 +0100 -@@ -42,8 +42,13 @@ - FILE(WRITE "${EXPORT_EXECUTABLES_FILE}" "#generated by VTK, do not edit\n") - ENDIF(NOT EXPORT_EXECUTABLES_FILE) - -+# Add a target for building only the compile tools -+ADD_CUSTOM_TARGET(CompileTools) -+SET(COMPILE_TOOLS_TARGET "CompileTools") -+ - GET_PROPERTY(VTK_TARGET_SUPPORTS_SHARED_LIBS - GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS) -+ - - # Warn when using "old style" CMake install commands... But only when - # building VTK itself. diff --git a/src/vtk-4-native-no-gui.patch b/src/vtk-4-native-no-gui.patch deleted file mode 100644 index 0cec3b2f..00000000 --- a/src/vtk-4-native-no-gui.patch +++ /dev/null @@ -1,19 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -diff -r 26cf498f1dac Utilities/CMakeLists.txt ---- a/Utilities/CMakeLists.txt Tue Nov 22 18:02:40 2011 +1100 -+++ b/Utilities/CMakeLists.txt Tue Nov 22 18:04:01 2011 +1100 -@@ -68,10 +68,8 @@ - VTK_THIRD_PARTY_SUBDIR(Cosmo Cosmo) - ENDIF(VTK_USE_PARALLEL) - --IF(VTK_USE_RENDERING) -- ADD_SUBDIRECTORY(ftgl) -- ADD_SUBDIRECTORY(ParseOGLExt) --ENDIF(VTK_USE_RENDERING) -+ADD_SUBDIRECTORY(ftgl) -+ADD_SUBDIRECTORY(ParseOGLExt) - - IF(NOT VTK_INSTALL_NO_DEVELOPMENT) - INSTALL(FILES diff --git a/src/vtk-5-module-path.patch b/src/vtk-5-module-path.patch deleted file mode 100644 index dbef88d5..00000000 --- a/src/vtk-5-module-path.patch +++ /dev/null @@ -1,27 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -This patch has been taken from: - -http://www.vtk.org/Bug/view.php?id=12746 - -diff -r 39846999f521 CMake/vtkThirdParty.cmake ---- a/CMake/vtkThirdParty.cmake Wed Nov 23 19:06:30 2011 +1100 -+++ b/CMake/vtkThirdParty.cmake Wed Nov 23 19:10:41 2011 +1100 -@@ -3,11 +3,11 @@ - OPTION(VTK_USE_SYSTEM_${upper} "Use the system's ${lower} library." OFF) - MARK_AS_ADVANCED(VTK_USE_SYSTEM_${upper}) - IF(VTK_USE_SYSTEM_${upper}) -- IF(EXISTS ${CMAKE_ROOT}/Modules/Find${upper}.cmake) -- INCLUDE(${CMAKE_ROOT}/Modules/Find${upper}.cmake) -- ELSE(EXISTS ${CMAKE_ROOT}/Modules/Find${upper}.cmake) -- INCLUDE(${VTK_CMAKE_DIR}/Find${upper}.cmake) -- ENDIF(EXISTS ${CMAKE_ROOT}/Modules/Find${upper}.cmake) -+ IF(EXISTS ${VTK_CMAKE_DIR}/Find${upper}.cmake) -+ INCLUDE(${VTK_CMAKE_DIR}/Find${upper}.cmake) -+ ELSE(EXISTS ${VTK_CMAKE_DIR}/Find${upper}.cmake) -+ INCLUDE(${CMAKE_ROOT}/Modules/Find${upper}.cmake) -+ ENDIF(EXISTS ${VTK_CMAKE_DIR}/Find${upper}.cmake) - MARK_AS_ADVANCED(${upper}_INCLUDE_DIR ${upper}_LIBRARY) - IF(${upper}_FOUND) - SET(VTK_${upper}_LIBRARIES ${${upper}_LIBRARIES}) diff --git a/src/vtk-6-kfreebsd.patch b/src/vtk-6-kfreebsd.patch deleted file mode 100644 index 30ab7471..00000000 --- a/src/vtk-6-kfreebsd.patch +++ /dev/null @@ -1,15 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -diff -ur VTK.orig/Utilities/vtkhdf5/src/H5private.h VTK/Utilities/vtkhdf5/src/H5private.h ---- VTK.orig/Utilities/vtkhdf5/src/H5private.h 2011-11-28 00:12:17.000000000 +1100 -+++ VTK/Utilities/vtkhdf5/src/H5private.h 2011-11-28 00:16:22.000000000 +1100 -@@ -141,7 +141,7 @@ - # include <sys/sysinfo.h> - #endif - /* Prevent compile errors with GCC 4.3 on Solaris 2.10 */ --#if defined (__SVR4) && defined (__sun) -+#if defined (__SVR4) && defined (__sun) || defined(__FreeBSD_kernel__) && defined(__GLIBC__) - /* In file included from /usr/include/sys/klwp.h:19, - * from /usr/include/sys/thread.h:13, - * from /usr/include/sys/proc.h:20, diff --git a/src/vtk-7-mingw-w64-git.patch b/src/vtk-7-mingw-w64-git.patch deleted file mode 100644 index 9a3f4919..00000000 --- a/src/vtk-7-mingw-w64-git.patch +++ /dev/null @@ -1,2112 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -This patch has been taken from the git url below: - -From: David Partyka <david.partyka@kitware.com> -Date: Wed, 21 Sep 2011 13:19:30 +0000 (-0400) -Subject: Merge branch '11742_mingw64_compile_fixes' into release -X-Git-Tag: v5.10.0-rc1~108^2~1 -X-Git-Url: http://vtk.org/gitweb?p=VTK.git;a=commitdiff_plain;h=be64234e8399145f1e2c099500779a9bcff75702;hp=7b4ad680f6b2b4b4211baf47de6588308db7e14f - -Merge branch '11742_mingw64_compile_fixes' into release ---- - -diff --git a/Common/vtkWin32Header.h b/Common/vtkWin32Header.h -index 81b094a..a3edb90 100644 ---- a/Common/vtkWin32Header.h -+++ b/Common/vtkWin32Header.h -@@ -102,9 +102,15 @@ Do_not_include_vtkWin32Header_directly__vtkSystemIncludes_includes_it; - # define vtkGetWindowLong GetWindowLong - # define vtkSetWindowLong SetWindowLong - # define vtkLONG LONG -+# ifdef _WIN64 -+# define vtkGWL_WNDPROC GWLP_WNDPROC -+# define vtkGWL_HINSTANCE GWLP_HINSTANCE -+# define vtkGWL_USERDATA GWLP_USERDATA -+# else - # define vtkGWL_WNDPROC GWL_WNDPROC - # define vtkGWL_HINSTANCE GWL_HINSTANCE - # define vtkGWL_USERDATA GWL_USERDATA -+# endif - #endif // - - #endif -diff --git a/Hybrid/vtkVideoSource.cxx b/Hybrid/vtkVideoSource.cxx -index 1fcdbe1..c40b845 100644 ---- a/Hybrid/vtkVideoSource.cxx -+++ b/Hybrid/vtkVideoSource.cxx -@@ -32,9 +32,9 @@ - - //--------------------------------------------------------------- - // Important FrameBufferMutex rules: --// -+// - // The frame grabs are generally done asynchronously, and it is necessary --// to ensure that when the frame buffer is valid when it is being written -+// to ensure that when the frame buffer is valid when it is being written - // to or read from - // - // The following information can only be changed within a mutex lock, -@@ -59,8 +59,8 @@ - // - // AdvanceFrameBuffer() - // --// Any methods which might be called asynchronously must lock the --// mutex before reading the above information, and you must be very -+// Any methods which might be called asynchronously must lock the -+// mutex before reading the above information, and you must be very - // careful when accessing any information except for the above. - // These methods include the following: - // -@@ -74,13 +74,13 @@ vtkStandardNewMacro(vtkVideoSource); - #if ( _MSC_VER >= 1300 ) // Visual studio .NET - #pragma warning ( disable : 4311 ) - #pragma warning ( disable : 4312 ) --#endif -+#endif - - //---------------------------------------------------------------------------- - vtkVideoSource::vtkVideoSource() - { - int i; -- -+ - this->Initialized = 0; - - this->AutoAdvance = 1; -@@ -93,7 +93,7 @@ vtkVideoSource::vtkVideoSource() - { - this->FrameBufferExtent[i] = 0; - } -- -+ - this->Playing = 0; - this->Recording = 0; - -@@ -151,8 +151,8 @@ vtkVideoSource::vtkVideoSource() - - //---------------------------------------------------------------------------- - vtkVideoSource::~vtkVideoSource() --{ -- // we certainly don't want to access a virtual -+{ -+ // we certainly don't want to access a virtual - // function after the subclass has destructed!! - this->vtkVideoSource::ReleaseSystemResources(); - -@@ -165,10 +165,10 @@ vtkVideoSource::~vtkVideoSource() - void vtkVideoSource::PrintSelf(ostream& os, vtkIndent indent) - { - int idx; -- -+ - this->Superclass::PrintSelf(os,indent); -- -- os << indent << "FrameSize: (" << this->FrameSize[0] << ", " -+ -+ os << indent << "FrameSize: (" << this->FrameSize[0] << ", " - << this->FrameSize[1] << ", " << this->FrameSize[2] << ")\n"; - - os << indent << "ClipRegion: (" << this->ClipRegion[0]; -@@ -177,14 +177,14 @@ void vtkVideoSource::PrintSelf(ostream& os, vtkIndent indent) - os << ", " << this->ClipRegion[idx]; - } - os << ")\n"; -- -+ - os << indent << "DataSpacing: (" << this->DataSpacing[0]; - for (idx = 1; idx < 3; ++idx) - { - os << ", " << this->DataSpacing[idx]; - } - os << ")\n"; -- -+ - os << indent << "DataOrigin: (" << this->DataOrigin[0]; - for (idx = 1; idx < 3; ++idx) - { -@@ -205,7 +205,7 @@ void vtkVideoSource::PrintSelf(ostream& os, vtkIndent indent) - os << ", " << this->OutputWholeExtent[idx]; - } - os << ")\n"; -- -+ - os << indent << "FrameRate: " << this->FrameRate << "\n"; - - os << indent << "FrameCount: " << this->FrameCount << "\n"; -@@ -232,7 +232,7 @@ void vtkVideoSource::PrintSelf(ostream& os, vtkIndent indent) - - //---------------------------------------------------------------------------- - // Update the FrameBuffers according to any changes in the FrameBuffer* --// information. -+// information. - // This function should always be called from within a FrameBufferMutex lock - // and should never be called asynchronously. - // It sets up the FrameBufferExtent -@@ -246,10 +246,10 @@ void vtkVideoSource::UpdateFrameBuffer() - for (i = 0; i < 3; i++) - { - oldExt = this->FrameBufferExtent[2*i+1] - this->FrameBufferExtent[2*i] + 1; -- this->FrameBufferExtent[2*i] = ((this->ClipRegion[2*i] > 0) -- ? this->ClipRegion[2*i] : 0); -- this->FrameBufferExtent[2*i+1] = ((this->ClipRegion[2*i+1] < -- this->FrameSize[i]-1) -+ this->FrameBufferExtent[2*i] = ((this->ClipRegion[2*i] > 0) -+ ? this->ClipRegion[2*i] : 0); -+ this->FrameBufferExtent[2*i+1] = ((this->ClipRegion[2*i+1] < -+ this->FrameSize[i]-1) - ? this->ClipRegion[2*i+1] : this->FrameSize[i]-1); - - ext[i] = this->FrameBufferExtent[2*i+1] - this->FrameBufferExtent[2*i] + 1; -@@ -318,20 +318,20 @@ void vtkVideoSource::ReleaseSystemResources() - //---------------------------------------------------------------------------- - void vtkVideoSource::SetFrameSize(int x, int y, int z) - { -- if (x == this->FrameSize[0] && -- y == this->FrameSize[1] && -+ if (x == this->FrameSize[0] && -+ y == this->FrameSize[1] && - z == this->FrameSize[2]) - { - return; - } - -- if (x < 1 || y < 1 || z < 1) -+ if (x < 1 || y < 1 || z < 1) - { - vtkErrorMacro(<< "SetFrameSize: Illegal frame size"); - return; - } - -- if (this->Initialized) -+ if (this->Initialized) - { - this->FrameBufferMutex->Lock(); - this->FrameSize[0] = x; -@@ -349,7 +349,7 @@ void vtkVideoSource::SetFrameSize(int x, int y, int z) - - this->Modified(); - } -- -+ - //---------------------------------------------------------------------------- - void vtkVideoSource::SetFrameRate(float rate) - { -@@ -363,7 +363,7 @@ void vtkVideoSource::SetFrameRate(float rate) - } - - //---------------------------------------------------------------------------- --void vtkVideoSource::SetClipRegion(int x0, int x1, int y0, int y1, -+void vtkVideoSource::SetClipRegion(int x0, int x1, int y0, int y1, - int z0, int z1) - { - if (this->ClipRegion[0] != x0 || this->ClipRegion[1] != x1 || -@@ -371,7 +371,7 @@ void vtkVideoSource::SetClipRegion(int x0, int x1, int y0, int y1, - this->ClipRegion[4] != z0 || this->ClipRegion[5] != z1) - { - this->Modified(); -- if (this->Initialized) -+ if (this->Initialized) - { // modify the FrameBufferExtent - this->FrameBufferMutex->Lock(); - this->ClipRegion[0] = x0; this->ClipRegion[1] = x1; -@@ -422,7 +422,7 @@ void vtkVideoSource::InternalGrab() - this->FrameBufferBitsPerPixel + 7)/8; - bytesPerRow = ((bytesPerRow + this->FrameBufferRowAlignment - 1) / - this->FrameBufferRowAlignment)*this->FrameBufferRowAlignment; -- int totalSize = bytesPerRow * -+ int totalSize = bytesPerRow * - (this->FrameBufferExtent[3]-this->FrameBufferExtent[2]+1) * - (this->FrameBufferExtent[5]-this->FrameBufferExtent[4]+1); - -@@ -432,7 +432,7 @@ void vtkVideoSource::InternalGrab() - ptr = reinterpret_cast<vtkUnsignedCharArray *>(this->FrameBuffer[index])->GetPointer(0); - - // Somebody should check this: -- lptr = (int *)(((((long)ptr) + 3)/4)*4); -+ lptr = (int *)(((((intptr_t)ptr) + 3)/4)*4); - i = totalSize/4; - - while (--i >= 0) -@@ -482,7 +482,7 @@ static inline void vtkSleep(double duration) - - //---------------------------------------------------------------------------- - // Sleep until the specified absolute time has arrived. --// You must pass a handle to the current thread. -+// You must pass a handle to the current thread. - // If '0' is returned, then the thread was aborted before or during the wait. - static int vtkThreadSleep(vtkMultiThreader::ThreadInfo *data, double time) - { -@@ -506,7 +506,7 @@ static int vtkThreadSleep(vtkMultiThreader::ThreadInfo *data, double time) - remaining = 0.1; - } - -- // check to see if we are being told to quit -+ // check to see if we are being told to quit - data->ActiveFlagLock->Lock(); - int activeFlag = *(data->ActiveFlag); - data->ActiveFlagLock->Unlock(); -@@ -527,7 +527,7 @@ static int vtkThreadSleep(vtkMultiThreader::ThreadInfo *data, double time) - static void *vtkVideoSourceRecordThread(vtkMultiThreader::ThreadInfo *data) - { - vtkVideoSource *self = (vtkVideoSource *)(data->UserData); -- -+ - double startTime = vtkTimerLog::GetUniversalTime(); - double rate = self->GetFrameRate(); - int frame = 0; -@@ -544,7 +544,7 @@ static void *vtkVideoSourceRecordThread(vtkMultiThreader::ThreadInfo *data) - - //---------------------------------------------------------------------------- - // Set the source to grab frames continuously. --// You should override this as appropriate for your device. -+// You should override this as appropriate for your device. - void vtkVideoSource::Record() - { - if (this->Playing) -@@ -559,19 +559,19 @@ void vtkVideoSource::Record() - this->Recording = 1; - this->FrameCount = 0; - this->Modified(); -- this->PlayerThreadId = -+ this->PlayerThreadId = - this->PlayerThreader->SpawnThread((vtkThreadFunctionType)\ - &vtkVideoSourceRecordThread,this); - } - } -- -+ - //---------------------------------------------------------------------------- - // this function runs in an alternate thread to 'play the tape' at the - // specified frame rate. - static void *vtkVideoSourcePlayThread(vtkMultiThreader::ThreadInfo *data) - { - vtkVideoSource *self = (vtkVideoSource *)(data->UserData); -- -+ - double startTime = vtkTimerLog::GetUniversalTime(); - double rate = self->GetFrameRate(); - int frame = 0; -@@ -588,7 +588,7 @@ static void *vtkVideoSourcePlayThread(vtkMultiThreader::ThreadInfo *data) - - //---------------------------------------------------------------------------- - // Set the source to play back recorded frames. --// You should override this as appropriate for your device. -+// You should override this as appropriate for your device. - void vtkVideoSource::Play() - { - if (this->Recording) -@@ -602,12 +602,12 @@ void vtkVideoSource::Play() - - this->Playing = 1; - this->Modified(); -- this->PlayerThreadId = -+ this->PlayerThreadId = - this->PlayerThreader->SpawnThread((vtkThreadFunctionType)\ - &vtkVideoSourcePlayThread,this); - } - } -- -+ - //---------------------------------------------------------------------------- - // Stop continuous grabbing or playback. You will have to override this - // if your class overrides Play() and Record() -@@ -621,7 +621,7 @@ void vtkVideoSource::Stop() - this->Recording = 0; - this->Modified(); - } --} -+} - - //---------------------------------------------------------------------------- - // Rewind back to the frame with the earliest timestamp. -@@ -665,7 +665,7 @@ void vtkVideoSource::Rewind() - } - - this->FrameBufferMutex->Unlock(); --} -+} - - //---------------------------------------------------------------------------- - // Fast-forward to the frame with the latest timestamp. -@@ -717,12 +717,12 @@ void vtkVideoSource::FastForward() - } - - this->FrameBufferMutex->Unlock(); --} -+} - - //---------------------------------------------------------------------------- - // Rotate the buffers - void vtkVideoSource::Seek(int n) --{ -+{ - this->FrameBufferMutex->Lock(); - this->AdvanceFrameBuffer(n); - this->FrameIndex = (this->FrameIndex + n) % this->FrameBufferSize; -@@ -731,7 +731,7 @@ void vtkVideoSource::Seek(int n) - this->FrameIndex += this->FrameBufferSize; - } - this->FrameBufferMutex->Unlock(); -- this->Modified(); -+ this->Modified(); - } - - //---------------------------------------------------------------------------- -@@ -798,7 +798,7 @@ void vtkVideoSource::SetOutputFormat(int format) - - //---------------------------------------------------------------------------- - // set or change the circular buffer size --// you will have to override this if you want the buffers -+// you will have to override this if you want the buffers - // to be device-specific (i.e. something other than vtkDataArray) - void vtkVideoSource::SetFrameBufferSize(int bufsize) - { -@@ -830,12 +830,12 @@ void vtkVideoSource::SetFrameBufferSize(int bufsize) - { - this->FrameBuffer[i] = vtkUnsignedCharArray::New(); - this->FrameBufferTimeStamps[i] = 0.0; -- } -+ } - this->FrameBufferSize = bufsize; - this->Modified(); - } - } -- else -+ else - { - if (bufsize > 0) - { -@@ -909,7 +909,7 @@ void vtkVideoSource::SetFrameBufferSize(int bufsize) - void vtkVideoSource::AdvanceFrameBuffer(int n) - { - int i = (this->FrameBufferIndex - n) % this->FrameBufferSize; -- while (i < 0) -+ while (i < 0) - { - i += this->FrameBufferSize; - } -@@ -918,7 +918,7 @@ void vtkVideoSource::AdvanceFrameBuffer(int n) - - //---------------------------------------------------------------------------- - double vtkVideoSource::GetFrameTimeStamp(int frame) --{ -+{ - double timeStamp; - - this->FrameBufferMutex->Lock(); -@@ -959,7 +959,7 @@ int vtkVideoSource::RequestInformation( - // if 'flag' is set in output extent, use the FrameBufferExtent instead - if (extent[2*i+1] < extent[2*i]) - { -- extent[2*i] = 0; -+ extent[2*i] = 0; - extent[2*i+1] = \ - this->FrameBufferExtent[2*i+1] - this->FrameBufferExtent[2*i]; - } -@@ -981,7 +981,7 @@ int vtkVideoSource::RequestInformation( - extent[5] = extent[4] + (extent[5]-extent[4]+1) * numFrames - 1; - - outInfo->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(),extent,6); -- -+ - // set the spacing - outInfo->Set(vtkDataObject::SPACING(),this->DataSpacing,3); - -@@ -989,7 +989,7 @@ int vtkVideoSource::RequestInformation( - outInfo->Set(vtkDataObject::ORIGIN(),this->DataOrigin,3); - - // set default data type (8 bit greyscale) -- vtkDataObject::SetPointDataActiveScalarInfo(outInfo, VTK_UNSIGNED_CHAR, -+ vtkDataObject::SetPointDataActiveScalarInfo(outInfo, VTK_UNSIGNED_CHAR, - this->NumberOfScalarComponents); - - return 1; -@@ -1000,7 +1000,7 @@ int vtkVideoSource::RequestInformation( - // unusual pixel packing formats, such as XRGB XBRG BGRX BGR etc. - // The version below assumes that the packing of the framebuffer is - // identical to that of the output. --void vtkVideoSource::UnpackRasterLine(char *outPtr, char *rowPtr, -+void vtkVideoSource::UnpackRasterLine(char *outPtr, char *rowPtr, - int start, int count) - { - char *inPtr = rowPtr + start*this->NumberOfScalarComponents; -@@ -1020,7 +1020,7 @@ void vtkVideoSource::UnpackRasterLine(char *outPtr, char *rowPtr, - //---------------------------------------------------------------------------- - // The Execute method is fairly complex, so I would not recommend overriding - // it unless you have to. Override the UnpackRasterLine() method instead. --// You should only have to override it if you are using something other -+// You should only have to override it if you are using something other - // than 8-bit vtkUnsignedCharArray for the frame buffer. - int vtkVideoSource::RequestData( - vtkInformation *vtkNotUsed(request), -@@ -1037,9 +1037,9 @@ int vtkVideoSource::RequestData( - { - saveOutputExtent[i] = outputExtent[i]; - } -- // clip to extent to the Z size of one frame -- outputExtent[4] = this->FrameOutputExtent[4]; -- outputExtent[5] = this->FrameOutputExtent[5]; -+ // clip to extent to the Z size of one frame -+ outputExtent[4] = this->FrameOutputExtent[4]; -+ outputExtent[5] = this->FrameOutputExtent[5]; - - int frameExtentX = this->FrameBufferExtent[1]-this->FrameBufferExtent[0]+1; - int frameExtentY = this->FrameBufferExtent[3]-this->FrameBufferExtent[2]+1; -@@ -1093,8 +1093,8 @@ int vtkVideoSource::RequestData( - outPadY = 0; - } - -- int outX = frameExtentX - inPadX; -- int outY = frameExtentY - inPadY; -+ int outX = frameExtentX - inPadX; -+ int outY = frameExtentY - inPadY; - int outZ; // do outZ later - - if (outX > extentX - outPadX) -@@ -1117,7 +1117,7 @@ int vtkVideoSource::RequestData( - } - - // ditto for number of scalar components -- if (data->GetNumberOfScalarComponents() != -+ if (data->GetNumberOfScalarComponents() != - this->LastNumberOfScalarComponents) - { - this->LastNumberOfScalarComponents = data->GetNumberOfScalarComponents(); -@@ -1132,7 +1132,7 @@ int vtkVideoSource::RequestData( - (saveOutputExtent[3]-saveOutputExtent[2]+1)* - (saveOutputExtent[5]-saveOutputExtent[4]+1)*outIncX); - this->OutputNeedsInitialization = 0; -- } -+ } - - // we have to modify the outputExtent of the first frame, - // because it might be complete (it will be restored after -@@ -1143,7 +1143,7 @@ int vtkVideoSource::RequestData( - this->FrameBufferMutex->Lock(); - - int index = this->FrameBufferIndex; -- this->FrameTimeStamp = -+ this->FrameTimeStamp = - this->FrameBufferTimeStamps[index % this->FrameBufferSize]; - - int frame; -@@ -1152,8 +1152,8 @@ int vtkVideoSource::RequestData( - if (frame == finalFrame) - { - outputExtent[5] = finalOutputExtent5; -- } -- -+ } -+ - vtkDataArray *frameBuffer = reinterpret_cast<vtkDataArray *>(this->FrameBuffer[(index + frame) % this->FrameBufferSize]); - - char *inPtr = reinterpret_cast<char*>(frameBuffer->GetVoidPointer(0)); -@@ -1162,7 +1162,7 @@ int vtkVideoSource::RequestData( - extentZ = outputExtent[5]-outputExtent[4]+1; - inPadZ = 0; - outPadZ = -outputExtent[4]; -- -+ - if (outPadZ < 0) - { - inPadZ -= outPadZ; -@@ -1209,7 +1209,7 @@ int vtkVideoSource::RequestData( - outPtrTmp = outPtr; - for (j = 0; j < outY; j++) - { -- if (outX > 0) -+ if (outX > 0) - { - this->UnpackRasterLine(outPtrTmp,inPtrTmp,inPadX,outX); - } -diff --git a/Rendering/vtkFreeTypeTools.cxx b/Rendering/vtkFreeTypeTools.cxx -index 7443693..681fae6 100644 ---- a/Rendering/vtkFreeTypeTools.cxx -+++ b/Rendering/vtkFreeTypeTools.cxx -@@ -222,7 +222,7 @@ vtkFreeTypeToolsFaceRequester(FTC_FaceID face_id, - // Map the ID to a text property - vtkSmartPointer<vtkTextProperty> tprop = - vtkSmartPointer<vtkTextProperty>::New(); -- self->MapIdToTextProperty(reinterpret_cast<unsigned long>(face_id), tprop); -+ self->MapIdToTextProperty(reinterpret_cast<intptr_t>(face_id), tprop); - - // Fonts, organized by [Family][Bold][Italic] - static EmbeddedFontStruct EmbeddedFonts[3][2][2] = -diff --git a/Rendering/vtkFreeTypeUtilities.cxx b/Rendering/vtkFreeTypeUtilities.cxx -index 629e5da..2d140a8 100644 ---- a/Rendering/vtkFreeTypeUtilities.cxx -+++ b/Rendering/vtkFreeTypeUtilities.cxx -@@ -337,7 +337,7 @@ vtkFreeTypeUtilitiesFaceRequester(FTC_FaceID face_id, - // Map the ID to a text property - - vtkTextProperty *tprop = vtkTextProperty::New(); -- self->MapIdToTextProperty(reinterpret_cast<unsigned long>(face_id), tprop); -+ self->MapIdToTextProperty(reinterpret_cast<intptr_t>(face_id), tprop); - - // Fonts, organized by [Family][Bold][Italic] - -diff --git a/Rendering/vtkWin32OpenGLRenderWindow.cxx b/Rendering/vtkWin32OpenGLRenderWindow.cxx -index a4485d2..6b6e6b4 100644 ---- a/Rendering/vtkWin32OpenGLRenderWindow.cxx -+++ b/Rendering/vtkWin32OpenGLRenderWindow.cxx -@@ -75,9 +75,9 @@ vtkWin32OpenGLRenderWindow::~vtkWin32OpenGLRenderWindow() - void vtkWin32OpenGLRenderWindow::Clean() - { - GLuint id; -- -+ - /* finish OpenGL rendering */ -- if (this->ContextId) -+ if (this->ContextId) - { - this->MakeCurrent(); - -@@ -86,7 +86,7 @@ void vtkWin32OpenGLRenderWindow::Clean() - { - glDisable((GLenum)cur_light); - } -- -+ - /* now delete all textures */ - glDisable(GL_TEXTURE_2D); - for (int i = 1; i < this->TextureResourceIds->GetNumberOfIds(); i++) -@@ -106,16 +106,16 @@ void vtkWin32OpenGLRenderWindow::Clean() - } - - this->CleanUpRenderers(); -- -+ - // Note: wglMakeCurrent(NULL,NULL) is valid according to the documentation - // and works with nVidia and ATI but not with Intel. Passing an existing - // device context works in any case. - // see VTK Bug 7119. -- if(wglMakeCurrent(this->DeviceContext,NULL)!=TRUE) -+ if(wglMakeCurrent(this->DeviceContext,NULL)!=TRUE) - { - vtkErrorMacro("wglMakeCurrent failed in Clean(), error: " << GetLastError()); - } -- if (wglDeleteContext(this->ContextId) != TRUE) -+ if (wglDeleteContext(this->ContextId) != TRUE) - { - vtkErrorMacro("wglDeleteContext failed in Clean(), error: " << GetLastError()); - } -@@ -136,7 +136,7 @@ void vtkWin32OpenGLRenderWindow::CleanUpRenderers() - // destructor) - vtkRenderer *ren; - vtkCollectionSimpleIterator rsit; -- for (this->Renderers->InitTraversal(rsit); -+ for (this->Renderers->InitTraversal(rsit); - (ren = this->Renderers->GetNextRenderer(rsit));) - { - ren->SetRenderWindow(NULL); -@@ -144,13 +144,13 @@ void vtkWin32OpenGLRenderWindow::CleanUpRenderers() - } - } - --LRESULT APIENTRY vtkWin32OpenGLRenderWindow::WndProc(HWND hWnd, UINT message, -- WPARAM wParam, -+LRESULT APIENTRY vtkWin32OpenGLRenderWindow::WndProc(HWND hWnd, UINT message, -+ WPARAM wParam, - LPARAM lParam) - { - LRESULT res; - -- vtkWin32OpenGLRenderWindow *me = -+ vtkWin32OpenGLRenderWindow *me = - (vtkWin32OpenGLRenderWindow *)vtkGetWindowLong(hWnd,sizeof(vtkLONG)); - - if (me && me->GetReferenceCount()>0) -@@ -199,7 +199,7 @@ int vtkWin32OpenGLRenderWindow::GetEventPending() - return 1; - } - } -- -+ - return 0; - } - -@@ -216,21 +216,21 @@ void vtkWin32OpenGLRenderWindow::MakeCurrent() - " than the one doing the picking, this can causes crashes" - " and/or bad pick results"); - } -- else -+ else - { -- if (wglMakeCurrent(this->DeviceContext, this->ContextId) != TRUE) -+ if (wglMakeCurrent(this->DeviceContext, this->ContextId) != TRUE) - { - LPVOID lpMsgBuf; -- ::FormatMessage( -- FORMAT_MESSAGE_ALLOCATE_BUFFER | -- FORMAT_MESSAGE_FROM_SYSTEM | -+ ::FormatMessage( -+ FORMAT_MESSAGE_ALLOCATE_BUFFER | -+ FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language - (LPTSTR) &lpMsgBuf, - 0, -- NULL -+ NULL - ); - if(lpMsgBuf) - { -@@ -243,7 +243,7 @@ void vtkWin32OpenGLRenderWindow::MakeCurrent() - delete [] wmsg; - delete [] wtemp; - #else -- vtkErrorMacro("wglMakeCurrent failed in MakeCurrent(), error: " -+ vtkErrorMacro("wglMakeCurrent failed in MakeCurrent(), error: " - << (LPCTSTR)lpMsgBuf); - #endif - ::LocalFree( lpMsgBuf ); -@@ -289,13 +289,13 @@ void vtkWin32OpenGLRenderWindow::SetSize(int x, int y) - } - } - } -- -+ - else if (this->Mapped) - { - if (!resizing) - { - resizing = 1; -- -+ - if (this->ParentId) - { - SetWindowExtEx(this->DeviceContext,x,y,NULL); -@@ -330,7 +330,7 @@ void vtkWin32OpenGLRenderWindow::SetPosition(int x, int y) - if (!resizing) - { - resizing = 1; -- -+ - SetWindowPos(this->WindowId,HWND_TOP,x,y, - 0, 0, SWP_NOSIZE | SWP_NOZORDER); - resizing = 0; -@@ -426,7 +426,7 @@ const char* vtkWin32OpenGLRenderWindow::ReportCapabilities() - if (pfd.cColorBits <= 8) - { - strm << "class: PseudoColor" << endl; -- } -+ } - else - { - strm << "class: TrueColor" << endl; -@@ -447,14 +447,14 @@ const char* vtkWin32OpenGLRenderWindow::ReportCapabilities() - strm << "double buffer: False" << endl; - } - if (pfd.dwFlags & PFD_STEREO) { -- strm << "stereo: True" << endl; -+ strm << "stereo: True" << endl; - } else { - strm << "stereo: False" << endl; - } - if (pfd.dwFlags & PFD_GENERIC_FORMAT) { -- strm << "hardware acceleration: False" << endl; -+ strm << "hardware acceleration: False" << endl; - } else { -- strm << "hardware acceleration: True" << endl; -+ strm << "hardware acceleration: True" << endl; - } - strm << "rgba: redSize=" << static_cast<int>(pfd.cRedBits) << " greenSize=" << static_cast<int>(pfd.cGreenBits) << "blueSize=" << static_cast<int>(pfd.cBlueBits) << "alphaSize=" << static_cast<int>(pfd.cAlphaBits) << endl; - strm << "aux buffers: " << static_cast<int>(pfd.cAuxBuffers)<< endl; -@@ -463,17 +463,17 @@ const char* vtkWin32OpenGLRenderWindow::ReportCapabilities() - strm << "accum: redSize=" << static_cast<int>(pfd.cAccumRedBits) << " greenSize=" << static_cast<int>(pfd.cAccumGreenBits) << "blueSize=" << static_cast<int>(pfd.cAccumBlueBits) << "alphaSize=" << static_cast<int>(pfd.cAccumAlphaBits) << endl; - - delete[] this->Capabilities; -- -+ - size_t len = strm.str().length() + 1; - this->Capabilities = new char[len]; - strncpy(this->Capabilities, strm.str().c_str(), len); -- -+ - return this->Capabilities; - } - -- --void vtkWin32OpenGLRenderWindow::SetupPixelFormat(HDC hDC, DWORD dwFlags, -- int debug, int bpp, -+ -+void vtkWin32OpenGLRenderWindow::SetupPixelFormat(HDC hDC, DWORD dwFlags, -+ int debug, int bpp, - int zbpp) - { - PIXELFORMATDESCRIPTOR pfd = { -@@ -505,12 +505,12 @@ void vtkWin32OpenGLRenderWindow::SetupPixelFormat(HDC hDC, DWORD dwFlags, - if (!(pfd.dwFlags & PFD_SUPPORT_OPENGL)) - { - #ifdef UNICODE -- MessageBox(WindowFromDC(hDC), -+ MessageBox(WindowFromDC(hDC), - L"Invalid pixel format, no OpenGL support", - L"Error", - MB_ICONERROR | MB_OK); - #else -- MessageBox(WindowFromDC(hDC), -+ MessageBox(WindowFromDC(hDC), - "Invalid pixel format, no OpenGL support", - "Error", - MB_ICONERROR | MB_OK); -@@ -524,11 +524,11 @@ void vtkWin32OpenGLRenderWindow::SetupPixelFormat(HDC hDC, DWORD dwFlags, - { - exit(1); - } -- } -+ } - } - else - { -- // hDC has no current PixelFormat, so -+ // hDC has no current PixelFormat, so - pixelFormat = ChoosePixelFormat(hDC, &pfd); - if (pixelFormat == 0) - { -@@ -549,8 +549,8 @@ void vtkWin32OpenGLRenderWindow::SetupPixelFormat(HDC hDC, DWORD dwFlags, - exit(1); - } - } -- DescribePixelFormat(hDC, pixelFormat,sizeof(pfd), &pfd); -- if (SetPixelFormat(hDC, pixelFormat, &pfd) != TRUE) -+ DescribePixelFormat(hDC, pixelFormat,sizeof(pfd), &pfd); -+ if (SetPixelFormat(hDC, pixelFormat, &pfd) != TRUE) - { - // int err = GetLastError(); - #ifdef UNICODE -@@ -626,10 +626,10 @@ void vtkWin32OpenGLRenderWindow::SetupPalette(HDC hDC) - } - - --LRESULT vtkWin32OpenGLRenderWindow::MessageProc(HWND hWnd, UINT message, -+LRESULT vtkWin32OpenGLRenderWindow::MessageProc(HWND hWnd, UINT message, - WPARAM wParam, LPARAM lParam) - { -- switch (message) -+ switch (message) - { - case WM_CREATE: - { -@@ -648,18 +648,18 @@ LRESULT vtkWin32OpenGLRenderWindow::MessageProc(HWND hWnd, UINT message, - return 0; - case WM_SIZE: - /* track window size changes */ -- if (this->ContextId) -+ if (this->ContextId) - { - this->SetSize((int) LOWORD(lParam),(int) HIWORD(lParam)); - return 0; - } - case WM_PALETTECHANGED: - /* realize palette if this is *not* the current window */ -- if (this->ContextId && this->Palette && (HWND) wParam != hWnd) -+ if (this->ContextId && this->Palette && (HWND) wParam != hWnd) - { - SelectPalette(this->DeviceContext, this->OldPalette, FALSE); - UnrealizeObject(this->Palette); -- this->OldPalette = SelectPalette(this->DeviceContext, -+ this->OldPalette = SelectPalette(this->DeviceContext, - this->Palette, FALSE); - RealizePalette(this->DeviceContext); - this->Render(); -@@ -667,11 +667,11 @@ LRESULT vtkWin32OpenGLRenderWindow::MessageProc(HWND hWnd, UINT message, - break; - case WM_QUERYNEWPALETTE: - /* realize palette if this is the current window */ -- if (this->ContextId && this->Palette) -+ if (this->ContextId && this->Palette) - { - SelectPalette(this->DeviceContext, this->OldPalette, FALSE); - UnrealizeObject(this->Palette); -- this->OldPalette = SelectPalette(this->DeviceContext, -+ this->OldPalette = SelectPalette(this->DeviceContext, - this->Palette, FALSE); - RealizePalette(this->DeviceContext); - this->Render(); -@@ -682,7 +682,7 @@ LRESULT vtkWin32OpenGLRenderWindow::MessageProc(HWND hWnd, UINT message, - { - PAINTSTRUCT ps; - BeginPaint(hWnd, &ps); -- if (this->ContextId) -+ if (this->ContextId) - { - this->Render(); - } -@@ -730,20 +730,20 @@ void vtkWin32OpenGLRenderWindow::CreateAWindow() - { - static int count = 1; - char *windowName; -- -+ - if (!this->WindowId) - { - WNDCLASS wndClass; - this->DeviceContext = 0; -- -- int len = static_cast<int>(strlen("Visualization Toolkit - Win32OpenGL #")) -+ -+ int len = static_cast<int>(strlen("Visualization Toolkit - Win32OpenGL #")) - + (int)ceil( (double) log10( (double)(count+1) ) ) -- + 1; -+ + 1; - windowName = new char [ len ]; - sprintf(windowName,"Visualization Toolkit - Win32OpenGL #%i",count++); - this->SetWindowName(windowName); - delete [] windowName; -- -+ - // has the class been registered ? - #ifdef UNICODE - if (!GetClassInfo(this->ApplicationInstance,L"vtkOpenGL",&wndClass)) -@@ -770,7 +770,7 @@ void vtkWin32OpenGLRenderWindow::CreateAWindow() - wndClass.cbWndExtra = 2 * sizeof(vtkLONG); - RegisterClass(&wndClass); - } -- -+ - #ifdef UNICODE - wchar_t *wname = new wchar_t [mbstowcs(NULL, this->WindowName, 32000)+1]; - mbstowcs(wname, this->WindowName, 32000); -@@ -779,7 +779,7 @@ void vtkWin32OpenGLRenderWindow::CreateAWindow() - int y = ((this->Position[1] >= 0) ? this->Position[1] : 5); - int height = ((this->Size[1] > 0) ? this->Size[1] : 300); - int width = ((this->Size[0] > 0) ? this->Size[0] : 300); -- -+ - /* create window */ - if (this->ParentId) - { -@@ -812,7 +812,7 @@ void vtkWin32OpenGLRenderWindow::CreateAWindow() - this->WindowId = CreateWindow( - L"vtkOpenGL", wname, style, - x,y, width+2*GetSystemMetrics(SM_CXFRAME), -- height+2*GetSystemMetrics(SM_CYFRAME) -+ height+2*GetSystemMetrics(SM_CYFRAME) - +GetSystemMetrics(SM_CYCAPTION), - NULL, NULL, this->ApplicationInstance, NULL); - #else -@@ -827,14 +827,14 @@ void vtkWin32OpenGLRenderWindow::CreateAWindow() - #ifdef UNICODE - delete [] wname; - #endif -- -+ - if (!this->WindowId) - { - vtkErrorMacro("Could not create window, error: " << GetLastError()); - return; - } - // extract the create info -- -+ - /* display window */ - if(!this->OffScreenRendering) - { -@@ -842,7 +842,7 @@ void vtkWin32OpenGLRenderWindow::CreateAWindow() - } - //UpdateWindow(this->WindowId); - this->OwnWindow = 1; -- vtkSetWindowLong(this->WindowId,sizeof(vtkLONG),(vtkLONG)this); -+ vtkSetWindowLong(this->WindowId,sizeof(vtkLONG),(intptr_t)this); - } - if (!this->DeviceContext) - { -@@ -862,16 +862,16 @@ void vtkWin32OpenGLRenderWindow::CreateAWindow() - } - this->SetupPalette(this->DeviceContext); - this->ContextId = wglCreateContext(this->DeviceContext); -- if (this->ContextId == NULL) -+ if (this->ContextId == NULL) - { - vtkErrorMacro("wglCreateContext failed in CreateAWindow(), error: " << GetLastError()); - } - this->MakeCurrent(); -- -+ - // wipe out any existing display lists - vtkRenderer* ren; - vtkCollectionSimpleIterator rsit; -- for (this->Renderers->InitTraversal(rsit); -+ for (this->Renderers->InitTraversal(rsit); - (ren = this->Renderers->GetNextRenderer(rsit));) - { - ren->SetRenderWindow(0); -@@ -889,20 +889,20 @@ void vtkWin32OpenGLRenderWindow::CreateAWindow() - - // Initialize the window for rendering. - void vtkWin32OpenGLRenderWindow::WindowInitialize() --{ -+{ - // create our own window if not already set - this->OwnWindow = 0; - if (!this->MFChandledWindow) - { - this->InitializeApplication(); - this->CreateAWindow(); -- } -- else -+ } -+ else - { - this->MakeCurrent(); // hsr - this->OpenGLInit(); - } -- -+ - // set the DPI - this->SetDPI(GetDeviceCaps(this->DeviceContext, LOGPIXELSY)); - } -@@ -910,7 +910,7 @@ void vtkWin32OpenGLRenderWindow::WindowInitialize() - // Initialize the rendering window. - void vtkWin32OpenGLRenderWindow::Initialize (void) - { -- // make sure we havent already been initialized -+ // make sure we havent already been initialized - if (!this->OffScreenRendering && !this->ContextId) - { - this->WindowInitialize(); -@@ -955,7 +955,7 @@ void vtkWin32OpenGLRenderWindow::DestroyWindow() - ReleaseDC(this->WindowId, this->DeviceContext); - // can't set WindowId=NULL, needed for DestroyWindow - this->DeviceContext = NULL; -- -+ - // clear the extra data before calling destroy - vtkSetWindowLong(this->WindowId,sizeof(vtkLONG),(vtkLONG)0); - if(this->OwnWindow) -@@ -971,18 +971,18 @@ void vtkWin32OpenGLRenderWindow::DestroyWindow() - // Get the current size of the window. - int *vtkWin32OpenGLRenderWindow::GetSize(void) - { -- // if we aren't mapped then just return the ivar -+ // if we aren't mapped then just return the ivar - if (this->Mapped) - { - RECT rect; - -- // Find the current window size -+ // Find the current window size - if (GetClientRect(this->WindowId, &rect)) -- { -+ { - this->Size[0] = rect.right; - this->Size[1] = rect.bottom; - } -- else -+ else - { - this->Size[0] = 0; - this->Size[1] = 0; -@@ -999,23 +999,23 @@ int *vtkWin32OpenGLRenderWindow::GetScreenSize(void) - RECT rect; - - SystemParametersInfo(SPI_GETWORKAREA, 0, &rect, 0); -- -+ - this->Size[0] = rect.right - rect.left; - this->Size[1] = rect.bottom - rect.top; -- -+ - return this->Size; - } - - // Get the position in screen coordinates of the window. - int *vtkWin32OpenGLRenderWindow::GetPosition(void) - { -- // if we aren't mapped then just return the ivar -+ // if we aren't mapped then just return the ivar - if (!this->Mapped) - { - return this->Position; - } - -- // Find the current window position -+ // Find the current window position - // x,y,&this->Position[0],&this->Position[1],&child); - - return this->Position; -@@ -1025,34 +1025,34 @@ int *vtkWin32OpenGLRenderWindow::GetPosition(void) - void vtkWin32OpenGLRenderWindow::SetFullScreen(int arg) - { - int *temp; -- -+ - if (this->FullScreen == arg) - { - return; - } -- -+ - if (!this->Mapped) - { - this->PrefFullScreen(); - return; - } - -- // set the mode -+ // set the mode - this->FullScreen = arg; - if (this->FullScreen <= 0) - { - this->Position[0] = this->OldScreen[0]; - this->Position[1] = this->OldScreen[1]; -- this->Size[0] = this->OldScreen[2]; -+ this->Size[0] = this->OldScreen[2]; - this->Size[1] = this->OldScreen[3]; - this->Borders = this->OldScreen[4]; - } - else - { -- // if window already up get its values -+ // if window already up get its values - if (this->WindowId) - { -- temp = this->GetPosition(); -+ temp = this->GetPosition(); - this->OldScreen[0] = temp[0]; - this->OldScreen[1] = temp[1]; - -@@ -1060,8 +1060,8 @@ void vtkWin32OpenGLRenderWindow::SetFullScreen(int arg) - this->PrefFullScreen(); - } - } -- -- // remap the window -+ -+ // remap the window - this->WindowRemap(); - - this->Modified(); -@@ -1092,14 +1092,14 @@ void vtkWin32OpenGLRenderWindow::PrefFullScreen() - - size = this->GetScreenSize(); - -- // use full screen -+ // use full screen - this->Position[0] = 0; - this->Position[1] = 0; - this->Size[0] = size[0] - 2*GetSystemMetrics(SM_CXFRAME); -- this->Size[1] = size[1] - -+ this->Size[1] = size[1] - - 2*GetSystemMetrics(SM_CYFRAME) - GetSystemMetrics(SM_CYCAPTION); - -- // don't show borders -+ // don't show borders - this->Borders = 0; - } - -@@ -1108,8 +1108,8 @@ void vtkWin32OpenGLRenderWindow::WindowRemap() - { - // close everything down - this->Finalize(); -- -- // set the default windowid -+ -+ // set the default windowid - this->WindowId = this->NextWindowId; - this->NextWindowId = 0; - -@@ -1129,7 +1129,7 @@ void vtkWin32OpenGLRenderWindow::PrintSelf(ostream& os, vtkIndent indent) - // Get the window id. - HWND vtkWin32OpenGLRenderWindow::GetWindowId() - { -- vtkDebugMacro(<< "Returning WindowId of " << this->WindowId << "\n"); -+ vtkDebugMacro(<< "Returning WindowId of " << this->WindowId << "\n"); - - return this->WindowId; - } -@@ -1138,11 +1138,11 @@ HWND vtkWin32OpenGLRenderWindow::GetWindowId() - void vtkWin32OpenGLRenderWindow::SetWindowId(HWND arg) - { - vtkDebugMacro(<< "Setting WindowId to " << arg << "\n"); -- -+ - if (arg != this->WindowId) - { - this->WindowId = arg; -- if (this->ContextId) -+ if (this->ContextId) - { - wglDeleteContext(this->ContextId); - } -@@ -1155,24 +1155,24 @@ void vtkWin32OpenGLRenderWindow::SetWindowId(HWND arg) - void vtkWin32OpenGLRenderWindow::SetWindowInfo(char *info) - { - int tmp; -- -+ - sscanf(info,"%i",&tmp); - - this->WindowId = (HWND)tmp; -- vtkDebugMacro(<< "Setting WindowId to " << this->WindowId << "\n"); -+ vtkDebugMacro(<< "Setting WindowId to " << this->WindowId << "\n"); - } - - void vtkWin32OpenGLRenderWindow::SetNextWindowInfo(char *info) - { - int tmp; -- -+ - sscanf(info,"%i",&tmp); - - this->SetNextWindowId((HWND)tmp); - } - - void vtkWin32OpenGLRenderWindow::SetDisplayId(void * arg) --{ -+{ - this->DeviceContext = (HDC) arg; - } - -@@ -1181,7 +1181,7 @@ void vtkWin32OpenGLRenderWindow::SetContextId(HGLRC arg) - this->ContextId = arg; - } - --void vtkWin32OpenGLRenderWindow::SetDeviceContext(HDC arg) -+void vtkWin32OpenGLRenderWindow::SetDeviceContext(HDC arg) - { - this->DeviceContext = arg; - this->MFChandledWindow = TRUE; -@@ -1191,17 +1191,17 @@ void vtkWin32OpenGLRenderWindow::SetDeviceContext(HDC arg) - void vtkWin32OpenGLRenderWindow::SetParentInfo(char *info) - { - int tmp; -- -+ - sscanf(info,"%i",&tmp); - - this->ParentId = (HWND)tmp; -- vtkDebugMacro(<< "Setting ParentId to " << this->ParentId << "\n"); -+ vtkDebugMacro(<< "Setting ParentId to " << this->ParentId << "\n"); - } - - // Set the window id to a pre-existing window. - void vtkWin32OpenGLRenderWindow::SetParentId(HWND arg) - { -- vtkDebugMacro(<< "Setting ParentId to " << arg << "\n"); -+ vtkDebugMacro(<< "Setting ParentId to " << arg << "\n"); - - this->ParentId = arg; - } -@@ -1209,7 +1209,7 @@ void vtkWin32OpenGLRenderWindow::SetParentId(HWND arg) - // Set the window id of the new window once a WindowRemap is done. - void vtkWin32OpenGLRenderWindow::SetNextWindowId(HWND arg) - { -- vtkDebugMacro(<< "Setting NextWindowId to " << arg << "\n"); -+ vtkDebugMacro(<< "Setting NextWindowId to " << arg << "\n"); - - this->NextWindowId = arg; - } -@@ -1228,7 +1228,7 @@ void vtkWin32OpenGLRenderWindow::Start(void) - this->Initialize(); - } - -- // set the current window -+ // set the current window - this->MakeCurrent(); - } - -@@ -1296,13 +1296,13 @@ void vtkWin32OpenGLRenderWindow::CreateOffScreenWindow(int width, - DeleteDC(dc); - } - this->CreatingOffScreenWindow = status; --} -+} - - void vtkWin32OpenGLRenderWindow::CreateOffScreenDC(int xsize, int ysize, - HDC aHdc) - { - int dataWidth = ((xsize*3+3)/4)*4; -- -+ - this->MemoryDataHeader.bmiHeader.biSize = 40; - this->MemoryDataHeader.bmiHeader.biWidth = xsize; - this->MemoryDataHeader.bmiHeader.biHeight = ysize; -@@ -1314,7 +1314,7 @@ void vtkWin32OpenGLRenderWindow::CreateOffScreenDC(int xsize, int ysize, - this->MemoryDataHeader.bmiHeader.biSizeImage = dataWidth*ysize; - this->MemoryDataHeader.bmiHeader.biXPelsPerMeter = 10000; - this->MemoryDataHeader.bmiHeader.biYPelsPerMeter = 10000; -- -+ - HBITMAP dib = CreateDIBSection(aHdc, - &this->MemoryDataHeader, DIB_RGB_COLORS, - (void **)(&(this->MemoryData)), NULL, 0); -@@ -1330,13 +1330,13 @@ void vtkWin32OpenGLRenderWindow::CreateOffScreenDC(HBITMAP hbmp, HDC aHdc) - GetObject(hbmp, sizeof(BITMAP), &bm); - - this->MemoryBuffer = hbmp; -- -+ - // Create a compatible device context - this->MemoryHdc = (HDC)CreateCompatibleDC(aHdc); -- -+ - // Put the bitmap into the device context - SelectObject(this->MemoryHdc, this->MemoryBuffer); -- -+ - // Renderers will need to redraw anything cached in display lists - this->CleanUpRenderers(); - -@@ -1344,15 +1344,15 @@ void vtkWin32OpenGLRenderWindow::CreateOffScreenDC(HBITMAP hbmp, HDC aHdc) - this->Mapped =0; - this->Size[0] = bm.bmWidth; - this->Size[1] = bm.bmHeight; -- -+ - this->DeviceContext = this->MemoryHdc; - this->DoubleBuffer = 0; -- this->SetupPixelFormat(this->DeviceContext, -- PFD_SUPPORT_OPENGL | PFD_SUPPORT_GDI | -+ this->SetupPixelFormat(this->DeviceContext, -+ PFD_SUPPORT_OPENGL | PFD_SUPPORT_GDI | - PFD_DRAW_TO_BITMAP, this->GetDebug(), 24, 32); - this->SetupPalette(this->DeviceContext); - this->ContextId = wglCreateContext(this->DeviceContext); -- if (this->ContextId == NULL) -+ if (this->ContextId == NULL) - { - vtkErrorMacro("wglCreateContext failed in CreateOffScreenDC(), error: " << GetLastError()); - } -@@ -1391,7 +1391,7 @@ void vtkWin32OpenGLRenderWindow::SetupMemoryRendering(HBITMAP hbmp) - this->ScreenContextId = this->ContextId; - - this->CreateOffScreenDC(hbmp, dc); -- DeleteDC(dc); -+ DeleteDC(dc); - } - - HDC vtkWin32OpenGLRenderWindow::GetMemoryDC() -@@ -1411,15 +1411,15 @@ void vtkWin32OpenGLRenderWindow::CleanUpOffScreenRendering(void) - { - return; - } -- -+ - GdiFlush(); -- -+ - // we need to release resources - this->CleanUpRenderers(); - DeleteDC(this->MemoryHdc); - this->MemoryHdc = (HDC)0; - DeleteObject(this->MemoryBuffer); -- if (wglDeleteContext(this->ContextId) != TRUE) -+ if (wglDeleteContext(this->ContextId) != TRUE) - { - vtkErrorMacro("wglDeleteContext failed in CleanUpOffScreenRendering(), error: " << GetLastError()); - } -@@ -1429,7 +1429,7 @@ void vtkWin32OpenGLRenderWindow::CleanUpOffScreenRendering(void) - - void vtkWin32OpenGLRenderWindow::ResumeScreenRendering(void) - { -- // release OpenGL graphics resources before switch back to on-screen. -+ // release OpenGL graphics resources before switch back to on-screen. - if(this->ContextId!=0) - { - this->MakeCurrent(); -@@ -1467,10 +1467,10 @@ void vtkWin32OpenGLRenderWindow::ShowCursor() - this->CursorHidden = 0; - - ::ShowCursor(!this->CursorHidden); --} -+} - - //---------------------------------------------------------------------------- --void vtkWin32OpenGLRenderWindow::SetCursorPosition(int x, int y) -+void vtkWin32OpenGLRenderWindow::SetCursorPosition(int x, int y) - { - int *size = this->GetSize(); - -@@ -1517,7 +1517,7 @@ void vtkWin32OpenGLRenderWindow::SetCurrentCursor(int shape) - cursorName = IDC_SIZEALL; - break; - case VTK_CURSOR_HAND: --#if(WINVER >= 0x0500) -+#if(WINVER >= 0x0500) - cursorName = IDC_HAND; - #else - cursorName = IDC_ARROW; -@@ -1527,10 +1527,10 @@ void vtkWin32OpenGLRenderWindow::SetCurrentCursor(int shape) - cursorName = IDC_CROSS; - break; - } -- -+ - if (cursorName) - { -- HANDLE cursor = -+ HANDLE cursor = - LoadImage(0,cursorName,IMAGE_CURSOR,0,0,LR_SHARED | LR_DEFAULTSIZE); - SetCursor((HCURSOR)cursor); - } -diff --git a/Rendering/vtkWin32RenderWindowInteractor.cxx b/Rendering/vtkWin32RenderWindowInteractor.cxx -index a53bbc8..8a3dc63 100644 ---- a/Rendering/vtkWin32RenderWindowInteractor.cxx -+++ b/Rendering/vtkWin32RenderWindowInteractor.cxx -@@ -17,10 +17,12 @@ - #include <string.h> - #include <math.h> - --#define _WIN32_WINNT 0x0400 // for trackmouseevent support requires Win95 with IE 3.0 or greater. -- - #include "vtkWin32OpenGLRenderWindow.h" - -+#ifndef _WIN32_WINNT -+#define _WIN32_WINNT 0x0400 // for trackmouseevent support requires Win95 with IE 3.0 or greater. -+#endif -+ - // Mouse wheel support - // In an ideal world we would just have to include <zmouse.h>, but it is not - // always available with all compilers/headers -@@ -31,7 +33,7 @@ - # define GET_WHEEL_DELTA_WPARAM(wparam) ((short)HIWORD (wparam)) - #endif //GET_WHEEL_DELTA_WPARAM - --// MSVC does the right thing without the forward declaration when it -+// MSVC does the right thing without the forward declaration when it - // sees it in the friend decl in vtkWin32RenderWindowInteractor, but - // GCC needs to see the declaration beforehand. It has to do with the - // CALLBACK attribute. -@@ -60,42 +62,42 @@ void (*vtkWin32RenderWindowInteractor::ClassExitMethodArgDelete)(void *) = (void - - //---------------------------------------------------------------------------- - // Construct object so that light follows camera motion. --vtkWin32RenderWindowInteractor::vtkWin32RenderWindowInteractor() -+vtkWin32RenderWindowInteractor::vtkWin32RenderWindowInteractor() - { - this->WindowId = 0; - this->InstallMessageProc = 1; - this->MouseInWindow = 0; - this->StartedMessageLoop = 0; -- -+ - #ifdef VTK_USE_TDX - this->Device=vtkTDxWinDevice::New(); - #endif - } - - //---------------------------------------------------------------------------- --vtkWin32RenderWindowInteractor::~vtkWin32RenderWindowInteractor() -+vtkWin32RenderWindowInteractor::~vtkWin32RenderWindowInteractor() - { - vtkWin32OpenGLRenderWindow *tmp; - - // we need to release any hold we have on a windows event loop -- if (this->WindowId && this->Enabled && this->InstallMessageProc) -+ if (this->WindowId && this->Enabled && this->InstallMessageProc) - { - vtkWin32OpenGLRenderWindow *ren; - ren = static_cast<vtkWin32OpenGLRenderWindow *>(this->RenderWindow); - tmp = (vtkWin32OpenGLRenderWindow *)(vtkGetWindowLong(this->WindowId,sizeof(vtkLONG))); - // watch for odd conditions -- if ((tmp != ren) && (ren != NULL)) -+ if ((tmp != ren) && (ren != NULL)) - { - // OK someone else has a hold on our event handler - // so lets have them handle this stuff - // well send a USER message to the other - // event handler so that it can properly - // call this event handler if required -- CallWindowProc(this->OldProc,this->WindowId,WM_USER+14,28,(LONG)this->OldProc); -+ CallWindowProc(this->OldProc,this->WindowId,WM_USER+14,28,(intptr_t)this->OldProc); - } -- else -+ else - { -- vtkSetWindowLong(this->WindowId,vtkGWL_WNDPROC,(vtkLONG)this->OldProc); -+ vtkSetWindowLong(this->WindowId,vtkGWL_WNDPROC,(intptr_t)this->OldProc); - } - this->Enabled = 0; - } -@@ -105,7 +107,7 @@ vtkWin32RenderWindowInteractor::~vtkWin32RenderWindowInteractor() - } - - //---------------------------------------------------------------------------- --void vtkWin32RenderWindowInteractor::Start() -+void vtkWin32RenderWindowInteractor::Start() - { - // Let the compositing handle the event loop if it wants to. - if (this->HasObserver(vtkCommand::StartEvent) && !this->HandleEventLoop) -@@ -132,18 +134,18 @@ void vtkWin32RenderWindowInteractor::Start() - - //---------------------------------------------------------------------------- - // Begin processing keyboard strokes. --void vtkWin32RenderWindowInteractor::Initialize() -+void vtkWin32RenderWindowInteractor::Initialize() - { - vtkWin32OpenGLRenderWindow *ren; - int *size; - - // make sure we have a RenderWindow and camera -- if ( ! this->RenderWindow) -+ if ( ! this->RenderWindow) - { - vtkErrorMacro(<<"No renderer defined!"); - return; - } -- if (this->Initialized) -+ if (this->Initialized) - { - return; - } -@@ -160,35 +162,35 @@ void vtkWin32RenderWindowInteractor::Initialize() - } - - //---------------------------------------------------------------------------- --void vtkWin32RenderWindowInteractor::Enable() -+void vtkWin32RenderWindowInteractor::Enable() - { - vtkWin32OpenGLRenderWindow *ren; - vtkWin32OpenGLRenderWindow *tmp; -- if (this->Enabled) -+ if (this->Enabled) - { - return; - } -- if (this->InstallMessageProc) -+ if (this->InstallMessageProc) - { - // add our callback - ren = (vtkWin32OpenGLRenderWindow *)(this->RenderWindow); - this->OldProc = (WNDPROC)vtkGetWindowLong(this->WindowId,vtkGWL_WNDPROC); - tmp=(vtkWin32OpenGLRenderWindow *)vtkGetWindowLong(this->WindowId,sizeof(vtkLONG)); - // watch for odd conditions -- if (tmp != ren) -+ if (tmp != ren) - { - // OK someone else has a hold on our event handler - // so lets have them handle this stuff - // well send a USER message to the other - // event handler so that it can properly - // call this event handler if required -- CallWindowProc(this->OldProc,this->WindowId,WM_USER+12,24,(LONG)vtkHandleMessage); -+ CallWindowProc(this->OldProc,this->WindowId,WM_USER+12,24,(intptr_t)vtkHandleMessage); - } -- else -+ else - { -- vtkSetWindowLong(this->WindowId,vtkGWL_WNDPROC,(vtkLONG)vtkHandleMessage); -+ vtkSetWindowLong(this->WindowId,vtkGWL_WNDPROC,(intptr_t)vtkHandleMessage); - } -- -+ - #ifdef VTK_USE_TDX - if(this->UseTDx) - { -@@ -197,7 +199,7 @@ void vtkWin32RenderWindowInteractor::Enable() - this->Device->StartListening(); - } - #endif -- -+ - // in case the size of the window has changed while we were away - int *size; - size = ren->GetSize(); -@@ -210,33 +212,33 @@ void vtkWin32RenderWindowInteractor::Enable() - - - //---------------------------------------------------------------------------- --void vtkWin32RenderWindowInteractor::Disable() -+void vtkWin32RenderWindowInteractor::Disable() - { - vtkWin32OpenGLRenderWindow *tmp; -- if (!this->Enabled) -+ if (!this->Enabled) - { - return; - } -- -- if (this->InstallMessageProc && this->Enabled && this->WindowId) -+ -+ if (this->InstallMessageProc && this->Enabled && this->WindowId) - { - // we need to release any hold we have on a windows event loop - vtkWin32OpenGLRenderWindow *ren; - ren = (vtkWin32OpenGLRenderWindow *)(this->RenderWindow); - tmp = (vtkWin32OpenGLRenderWindow *)vtkGetWindowLong(this->WindowId,sizeof(vtkLONG)); - // watch for odd conditions -- if ((tmp != ren) && (ren != NULL)) -+ if ((tmp != ren) && (ren != NULL)) - { - // OK someone else has a hold on our event handler - // so lets have them handle this stuff - // well send a USER message to the other - // event handler so that it can properly - // call this event handler if required -- CallWindowProc(this->OldProc,this->WindowId,WM_USER+14,28,(LONG)this->OldProc); -+ CallWindowProc(this->OldProc,this->WindowId,WM_USER+14,28,(intptr_t)this->OldProc); - } -- else -+ else - { -- vtkSetWindowLong(this->WindowId,vtkGWL_WNDPROC,(vtkLONG)this->OldProc); -+ vtkSetWindowLong(this->WindowId,vtkGWL_WNDPROC,(intptr_t)this->OldProc); - } - #ifdef VTK_USE_TDX - if(this->Device->GetInitialized()) -@@ -270,7 +272,7 @@ int vtkWin32RenderWindowInteractor::InternalCreateTimer(int timerId, int vtkNotU - } - - //---------------------------------------------------------------------------- --int vtkWin32RenderWindowInteractor::InternalDestroyTimer(int platformTimerId) -+int vtkWin32RenderWindowInteractor::InternalDestroyTimer(int platformTimerId) - { - return KillTimer(this->WindowId,platformTimerId); - } -@@ -282,42 +284,42 @@ int vtkWin32RenderWindowInteractor::InternalDestroyTimer(int platformTimerId) - // this ascii code to keysym table is meant to mimic Tk - - static const char *AsciiToKeySymTable[] = { -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- "space", "exclam", "quotedbl", "numbersign", -- "dollar", "percent", "ampersand", "quoteright", -- "parenleft", "parenright", "asterisk", "plus", -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ "space", "exclam", "quotedbl", "numbersign", -+ "dollar", "percent", "ampersand", "quoteright", -+ "parenleft", "parenright", "asterisk", "plus", - "comma", "minus", "period", "slash", -- "0", "1", "2", "3", "4", "5", "6", "7", -+ "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", "colon", "semicolon", "less", "equal", "greater", "question", -- "at", "A", "B", "C", "D", "E", "F", "G", -+ "at", "A", "B", "C", "D", "E", "F", "G", - "H", "I", "J", "K", "L", "M", "N", "O", - "P", "Q", "R", "S", "T", "U", "V", "W", -- "X", "Y", "Z", "bracketleft", -+ "X", "Y", "Z", "bracketleft", - "backslash", "bracketright", "asciicircum", "underscore", - "quoteleft", "a", "b", "c", "d", "e", "f", "g", - "h", "i", "j", "k", "l", "m", "n", "o", - "p", "q", "r", "s", "t", "u", "v", "w", - "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "Delete", -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -- -+ - // this virtual key code to keysym table is meant to mimic Tk - - static const char *VKeyCodeToKeySymTable[] = { - 0, 0, 0, "Cancel", 0, 0, 0, 0, - "BackSpace", "Tab", 0, 0, "Clear", "Return", 0, 0, -- "Shift_L", "Control_L", "Alt_L", "Pause", "Caps_Lock", 0,0,0, -+ "Shift_L", "Control_L", "Alt_L", "Pause", "Caps_Lock", 0,0,0, - 0, 0, 0, "Escape", 0, 0, 0, 0, - "space", "Prior", "Next", "End", "Home", "Left", "Up", "Right", - "Down", "Select", 0, "Execute", "Snapshot", "Insert", "Delete", "Help", -- "0", "1", "2", "3", "4", "5", "6", "7", -+ "0", "1", "2", "3", "4", "5", "6", "7", - "8", "9", 0, 0, 0, 0, 0, 0, - 0, "a", "b", "c", "d", "e", "f", "g", - "h", "i", "j", "k", "l", "m", "n", "o", -@@ -326,7 +328,7 @@ static const char *VKeyCodeToKeySymTable[] = { - "KP_0", "KP_1", "KP_2", "KP_3", "KP_4", "KP_5", "KP_6", "KP_7", - "KP_8", "KP_9", "asterisk", "plus", "bar", "minus", "period", "slash", - "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", -- "F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16", -+ "F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16", - "F17", "F18", "F19", "F20", "F21", "F22", "F23", "F24", - 0, 0, 0, 0, 0, 0, 0, 0, - "Num_Lock", "Scroll_Lock", 0, 0, 0, 0, 0, 0, -@@ -341,20 +343,20 @@ static const char *VKeyCodeToKeySymTable[] = { - //------------------------------------------------------------- - // Event loop handlers - //------------------------------------------------------------- --void vtkWin32RenderWindowInteractor::OnMouseMove(HWND hWnd, UINT nFlags, -- int X, int Y) -+void vtkWin32RenderWindowInteractor::OnMouseMove(HWND hWnd, UINT nFlags, -+ int X, int Y) - { -- if (!this->Enabled) -+ if (!this->Enabled) - { - return; - } - -- this->SetEventInformationFlipY(X, -- Y, -- nFlags & MK_CONTROL, -+ this->SetEventInformationFlipY(X, -+ Y, -+ nFlags & MK_CONTROL, - nFlags & MK_SHIFT); - this->SetAltKey(GetKeyState(VK_MENU) & (~1)); -- if (!this->MouseInWindow && -+ if (!this->MouseInWindow && - (X >= 0 && X < this->Size[0] && Y >= 0 && Y < this->Size[1])) - { - this->InvokeEvent(vtkCommand::EnterEvent, NULL); -@@ -366,15 +368,15 @@ void vtkWin32RenderWindowInteractor::OnMouseMove(HWND hWnd, UINT nFlags, - tme.hwndTrack = hWnd; - TrackMouseEvent(&tme); - } -- -+ - this->InvokeEvent(vtkCommand::MouseMoveEvent, NULL); - } - - //---------------------------------------------------------------------------- --void vtkWin32RenderWindowInteractor::OnNCMouseMove(HWND, UINT nFlags, -- int X, int Y) -+void vtkWin32RenderWindowInteractor::OnNCMouseMove(HWND, UINT nFlags, -+ int X, int Y) - { -- if (!this->Enabled) -+ if (!this->Enabled) - { - return; - } -@@ -382,9 +384,9 @@ void vtkWin32RenderWindowInteractor::OnNCMouseMove(HWND, UINT nFlags, - int *pos = this->RenderWindow->GetPosition(); - if (this->MouseInWindow) - { -- this->SetEventInformationFlipY(X - pos[0], -+ this->SetEventInformationFlipY(X - pos[0], - Y - pos[1], -- nFlags & MK_CONTROL, -+ nFlags & MK_CONTROL, - nFlags & MK_SHIFT); - this->SetAltKey(GetKeyState(VK_MENU) & (~1)); - this->InvokeEvent(vtkCommand::LeaveEvent, NULL); -@@ -393,50 +395,50 @@ void vtkWin32RenderWindowInteractor::OnNCMouseMove(HWND, UINT nFlags, - } - - //---------------------------------------------------------------------------- --void vtkWin32RenderWindowInteractor::OnMouseWheelForward(HWND,UINT nFlags, -- int X, int Y) -+void vtkWin32RenderWindowInteractor::OnMouseWheelForward(HWND,UINT nFlags, -+ int X, int Y) - { -- if (!this->Enabled) -+ if (!this->Enabled) - { - return; - } -- this->SetEventInformationFlipY(X, -- Y, -- nFlags & MK_CONTROL, -+ this->SetEventInformationFlipY(X, -+ Y, -+ nFlags & MK_CONTROL, - nFlags & MK_SHIFT); - this->SetAltKey(GetKeyState(VK_MENU) & (~1)); - this->InvokeEvent(vtkCommand::MouseWheelForwardEvent,NULL); - } - - //---------------------------------------------------------------------------- --void vtkWin32RenderWindowInteractor::OnMouseWheelBackward(HWND,UINT nFlags, -- int X, int Y) -+void vtkWin32RenderWindowInteractor::OnMouseWheelBackward(HWND,UINT nFlags, -+ int X, int Y) - { -- if (!this->Enabled) -+ if (!this->Enabled) - { - return; - } -- this->SetEventInformationFlipY(X, -- Y, -- nFlags & MK_CONTROL, -+ this->SetEventInformationFlipY(X, -+ Y, -+ nFlags & MK_CONTROL, - nFlags & MK_SHIFT); - this->SetAltKey(GetKeyState(VK_MENU) & (~1)); - this->InvokeEvent(vtkCommand::MouseWheelBackwardEvent,NULL); - } - - //---------------------------------------------------------------------------- --void vtkWin32RenderWindowInteractor::OnLButtonDown(HWND wnd,UINT nFlags, -- int X, int Y, int repeat) -+void vtkWin32RenderWindowInteractor::OnLButtonDown(HWND wnd,UINT nFlags, -+ int X, int Y, int repeat) - { -- if (!this->Enabled) -+ if (!this->Enabled) - { - return; - } - SetFocus(wnd); - SetCapture(wnd); -- this->SetEventInformationFlipY(X, -- Y, -- nFlags & MK_CONTROL, -+ this->SetEventInformationFlipY(X, -+ Y, -+ nFlags & MK_CONTROL, - nFlags & MK_SHIFT, - 0, repeat); - this->SetAltKey(GetKeyState(VK_MENU) & (~1)); -@@ -444,16 +446,16 @@ void vtkWin32RenderWindowInteractor::OnLButtonDown(HWND wnd,UINT nFlags, - } - - //---------------------------------------------------------------------------- --void vtkWin32RenderWindowInteractor::OnLButtonUp(HWND,UINT nFlags, -- int X, int Y) -+void vtkWin32RenderWindowInteractor::OnLButtonUp(HWND,UINT nFlags, -+ int X, int Y) - { -- if (!this->Enabled) -+ if (!this->Enabled) - { - return; - } -- this->SetEventInformationFlipY(X, -- Y, -- nFlags & MK_CONTROL, -+ this->SetEventInformationFlipY(X, -+ Y, -+ nFlags & MK_CONTROL, - nFlags & MK_SHIFT); - this->SetAltKey(GetKeyState(VK_MENU) & (~1)); - this->InvokeEvent(vtkCommand::LeftButtonReleaseEvent,NULL); -@@ -461,18 +463,18 @@ void vtkWin32RenderWindowInteractor::OnLButtonUp(HWND,UINT nFlags, - } - - //---------------------------------------------------------------------------- --void vtkWin32RenderWindowInteractor::OnMButtonDown(HWND wnd,UINT nFlags, -- int X, int Y, int repeat) -+void vtkWin32RenderWindowInteractor::OnMButtonDown(HWND wnd,UINT nFlags, -+ int X, int Y, int repeat) - { -- if (!this->Enabled) -+ if (!this->Enabled) - { - return; - } - SetFocus(wnd); - SetCapture(wnd); -- this->SetEventInformationFlipY(X, -- Y, -- nFlags & MK_CONTROL, -+ this->SetEventInformationFlipY(X, -+ Y, -+ nFlags & MK_CONTROL, - nFlags & MK_SHIFT, - 0, repeat); - this->SetAltKey(GetKeyState(VK_MENU) & (~1)); -@@ -480,16 +482,16 @@ void vtkWin32RenderWindowInteractor::OnMButtonDown(HWND wnd,UINT nFlags, - } - - //---------------------------------------------------------------------------- --void vtkWin32RenderWindowInteractor::OnMButtonUp(HWND,UINT nFlags, -- int X, int Y) -+void vtkWin32RenderWindowInteractor::OnMButtonUp(HWND,UINT nFlags, -+ int X, int Y) - { -- if (!this->Enabled) -+ if (!this->Enabled) - { - return; - } -- this->SetEventInformationFlipY(X, -- Y, -- nFlags & MK_CONTROL, -+ this->SetEventInformationFlipY(X, -+ Y, -+ nFlags & MK_CONTROL, - nFlags & MK_SHIFT); - this->SetAltKey(GetKeyState(VK_MENU) & (~1)); - this->InvokeEvent(vtkCommand::MiddleButtonReleaseEvent,NULL); -@@ -497,18 +499,18 @@ void vtkWin32RenderWindowInteractor::OnMButtonUp(HWND,UINT nFlags, - } - - //---------------------------------------------------------------------------- --void vtkWin32RenderWindowInteractor::OnRButtonDown(HWND wnd,UINT nFlags, -- int X, int Y, int repeat) -+void vtkWin32RenderWindowInteractor::OnRButtonDown(HWND wnd,UINT nFlags, -+ int X, int Y, int repeat) - { -- if (!this->Enabled) -+ if (!this->Enabled) - { - return; - } - SetFocus(wnd); - SetCapture(wnd); -- this->SetEventInformationFlipY(X, -- Y, -- nFlags & MK_CONTROL, -+ this->SetEventInformationFlipY(X, -+ Y, -+ nFlags & MK_CONTROL, - nFlags & MK_SHIFT, - 0, repeat); - this->SetAltKey(GetKeyState(VK_MENU) & (~1)); -@@ -516,16 +518,16 @@ void vtkWin32RenderWindowInteractor::OnRButtonDown(HWND wnd,UINT nFlags, - } - - //---------------------------------------------------------------------------- --void vtkWin32RenderWindowInteractor::OnRButtonUp(HWND,UINT nFlags, -- int X, int Y) -+void vtkWin32RenderWindowInteractor::OnRButtonUp(HWND,UINT nFlags, -+ int X, int Y) - { -- if (!this->Enabled) -+ if (!this->Enabled) - { - return; - } -- this->SetEventInformationFlipY(X, -- Y, -- nFlags & MK_CONTROL, -+ this->SetEventInformationFlipY(X, -+ Y, -+ nFlags & MK_CONTROL, - nFlags & MK_SHIFT); - this->SetAltKey(GetKeyState(VK_MENU) & (~1)); - this->InvokeEvent(vtkCommand::RightButtonReleaseEvent,NULL); -@@ -542,15 +544,15 @@ void vtkWin32RenderWindowInteractor::OnSize(HWND,UINT, int X, int Y) { - } - - //---------------------------------------------------------------------------- --void vtkWin32RenderWindowInteractor::OnTimer(HWND,UINT timerId) -+void vtkWin32RenderWindowInteractor::OnTimer(HWND,UINT timerId) - { -- if (!this->Enabled) -+ if (!this->Enabled) - { - return; - } - int tid = static_cast<int>(timerId); - this->InvokeEvent(vtkCommand::TimerEvent,(void*)&tid); -- -+ - // Here we deal with one-shot versus repeating timers - if ( this->IsOneShotTimer(tid) ) - { -@@ -578,7 +580,7 @@ void vtkWin32RenderWindowInteractor::OnKeyDown(HWND, UINT vCode, UINT nRepCnt, U - nChar = 0; - } - #endif -- } -+ } - const char *keysym = AsciiToKeySymTable[(unsigned char)nChar]; - if (keysym == 0) - { -@@ -588,10 +590,10 @@ void vtkWin32RenderWindowInteractor::OnKeyDown(HWND, UINT vCode, UINT nRepCnt, U - { - keysym = "None"; - } -- this->SetKeyEventInformation(ctrl, -- shift, -- nChar, -- nRepCnt, -+ this->SetKeyEventInformation(ctrl, -+ shift, -+ nChar, -+ nRepCnt, - keysym); - this->SetAltKey(alt); - this->InvokeEvent(vtkCommand::KeyPressEvent, NULL); -@@ -627,10 +629,10 @@ void vtkWin32RenderWindowInteractor::OnKeyUp(HWND, UINT vCode, UINT nRepCnt, UIN - { - keysym = "None"; - } -- this->SetKeyEventInformation(ctrl, -- shift, -- nChar, -- nRepCnt, -+ this->SetKeyEventInformation(ctrl, -+ shift, -+ nChar, -+ nRepCnt, - keysym); - this->SetAltKey(alt); - this->InvokeEvent(vtkCommand::KeyReleaseEvent, NULL); -@@ -645,11 +647,11 @@ void vtkWin32RenderWindowInteractor::OnChar(HWND,UINT nChar, - return; - } - int ctrl = GetKeyState(VK_CONTROL) & (~1); -- int shift = GetKeyState(VK_SHIFT) & (~1); -+ int shift = GetKeyState(VK_SHIFT) & (~1); - int alt = GetKeyState(VK_MENU) & (~1); -- this->SetKeyEventInformation(ctrl, -- shift, -- nChar, -+ this->SetKeyEventInformation(ctrl, -+ shift, -+ nChar, - nRepCnt); - this->SetAltKey(alt); - this->InvokeEvent(vtkCommand::CharEvent, NULL); -@@ -658,11 +660,11 @@ void vtkWin32RenderWindowInteractor::OnChar(HWND,UINT nChar, - //---------------------------------------------------------------------------- - void vtkWin32RenderWindowInteractor::OnFocus(HWND,UINT) - { -- if (!this->Enabled) -+ if (!this->Enabled) - { - return; - } -- -+ - #ifdef VTK_USE_TDX - if(this->Device->GetInitialized() && !this->Device->GetIsListening()) - { -@@ -674,7 +676,7 @@ void vtkWin32RenderWindowInteractor::OnFocus(HWND,UINT) - //---------------------------------------------------------------------------- - void vtkWin32RenderWindowInteractor::OnKillFocus(HWND,UINT) - { -- if (!this->Enabled) -+ if (!this->Enabled) - { - return; - } -@@ -688,8 +690,8 @@ void vtkWin32RenderWindowInteractor::OnKillFocus(HWND,UINT) - - //---------------------------------------------------------------------------- - // This is only called when InstallMessageProc is true --LRESULT CALLBACK vtkHandleMessage(HWND hWnd,UINT uMsg, WPARAM wParam, -- LPARAM lParam) -+LRESULT CALLBACK vtkHandleMessage(HWND hWnd,UINT uMsg, WPARAM wParam, -+ LPARAM lParam) - { - LRESULT res = 0; - vtkWin32OpenGLRenderWindow *ren; -@@ -713,33 +715,33 @@ LRESULT CALLBACK vtkHandleMessage(HWND hWnd,UINT uMsg, WPARAM wParam, - } - - #ifndef MAKEPOINTS --#define MAKEPOINTS(l) (*((POINTS FAR *) & (l))) -+#define MAKEPOINTS(l) (*((POINTS FAR *) & (l))) - #endif - - //---------------------------------------------------------------------------- --LRESULT CALLBACK vtkHandleMessage2(HWND hWnd,UINT uMsg, WPARAM wParam, -- LPARAM lParam, -- vtkWin32RenderWindowInteractor *me) -+LRESULT CALLBACK vtkHandleMessage2(HWND hWnd,UINT uMsg, WPARAM wParam, -+ LPARAM lParam, -+ vtkWin32RenderWindowInteractor *me) - { -- if ((uMsg == WM_USER+13)&&(wParam == 26)) -+ if ((uMsg == WM_USER+13)&&(wParam == 26)) - { - // someone is telling us to set our OldProc - me->OldProc = (WNDPROC)lParam; - return 1; - } -- -- switch (uMsg) -+ -+ switch (uMsg) - { - case WM_PAINT: - me->Render(); - return CallWindowProc(me->OldProc,hWnd,uMsg,wParam,lParam); - break; -- -+ - case WM_SIZE: - me->OnSize(hWnd,wParam,LOWORD(lParam),HIWORD(lParam)); - return CallWindowProc(me->OldProc,hWnd,uMsg,wParam,lParam); - break; -- -+ - case WM_LBUTTONDBLCLK: - me->OnLButtonDown(hWnd,wParam,MAKEPOINTS(lParam).x,MAKEPOINTS(lParam).y, 1); - break; -@@ -747,7 +749,7 @@ LRESULT CALLBACK vtkHandleMessage2(HWND hWnd,UINT uMsg, WPARAM wParam, - case WM_LBUTTONDOWN: - me->OnLButtonDown(hWnd,wParam,MAKEPOINTS(lParam).x,MAKEPOINTS(lParam).y, 0); - break; -- -+ - case WM_LBUTTONUP: - me->OnLButtonUp(hWnd,wParam,MAKEPOINTS(lParam).x,MAKEPOINTS(lParam).y); - break; -@@ -759,11 +761,11 @@ LRESULT CALLBACK vtkHandleMessage2(HWND hWnd,UINT uMsg, WPARAM wParam, - case WM_MBUTTONDOWN: - me->OnMButtonDown(hWnd,wParam,MAKEPOINTS(lParam).x,MAKEPOINTS(lParam).y, 0); - break; -- -+ - case WM_MBUTTONUP: - me->OnMButtonUp(hWnd,wParam,MAKEPOINTS(lParam).x,MAKEPOINTS(lParam).y); - break; -- -+ - case WM_RBUTTONDBLCLK: - me->OnRButtonDown(hWnd,wParam,MAKEPOINTS(lParam).x,MAKEPOINTS(lParam).y, 1); - break; -@@ -771,7 +773,7 @@ LRESULT CALLBACK vtkHandleMessage2(HWND hWnd,UINT uMsg, WPARAM wParam, - case WM_RBUTTONDOWN: - me->OnRButtonDown(hWnd,wParam,MAKEPOINTS(lParam).x,MAKEPOINTS(lParam).y, 0); - break; -- -+ - case WM_RBUTTONUP: - me->OnRButtonUp(hWnd,wParam,MAKEPOINTS(lParam).x,MAKEPOINTS(lParam).y); - break; -@@ -811,7 +813,7 @@ LRESULT CALLBACK vtkHandleMessage2(HWND hWnd,UINT uMsg, WPARAM wParam, - case WM_CHAR: - me->OnChar(hWnd,wParam,LOWORD(lParam),HIWORD(lParam)); - break; -- -+ - case WM_KEYDOWN: - case WM_SYSKEYDOWN: - me->OnKeyDown(hWnd,wParam,LOWORD(lParam),HIWORD(lParam)); -@@ -823,7 +825,7 @@ LRESULT CALLBACK vtkHandleMessage2(HWND hWnd,UINT uMsg, WPARAM wParam, - break; - - case WM_TIMER: -- me->OnTimer(hWnd,wParam); -+ me->OnTimer(hWnd,wParam); - break; - - case WM_ACTIVATE: -@@ -836,25 +838,25 @@ LRESULT CALLBACK vtkHandleMessage2(HWND hWnd,UINT uMsg, WPARAM wParam, - me->OnFocus(hWnd,wParam); - } - break; -- -+ - case WM_SETFOCUS: - // occurs when SetFocus() is called on the current window - me->OnFocus(hWnd,wParam); - break; -- -+ - case WM_KILLFOCUS: - // occurs when the focus was on the current window and SetFocus() is -- // called on another window. -+ // called on another window. - me->OnKillFocus(hWnd,wParam); - break; -- -+ - default: -- if (me) -+ if (me) - { - return CallWindowProc(me->OldProc,hWnd,uMsg,wParam,lParam); - } - }; -- -+ - return 0; - } - diff --git a/src/vtk-8-mingw-w64-extra.patch b/src/vtk-8-mingw-w64-extra.patch deleted file mode 100644 index e54b7c03..00000000 --- a/src/vtk-8-mingw-w64-extra.patch +++ /dev/null @@ -1,28 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -This patch has been taken from: -http://vtk.org/Bug/print_bug_page.php?bug_id=11742 - -diff -ur VTK6.0.0.rc3/Hybrid/vtkWin32VideoSource.cxx VTK6.0.0.rc3.new/IO/Video/vtkWin32VideoSource.cxx ---- VTK6.0.0.rc3/Hybrid/vtkWin32VideoSource.cxx 2013-06-13 05:47:10.000000000 +1000 -+++ VTK6.0.0.rc3.new/Hybrid/vtkWin32VideoSource.cxx 2013-06-22 16:06:01.000000000 +1000 -@@ -274,7 +274,7 @@ - } - - // set the user data to 'this' -- vtkSetWindowLong(this->Internal->ParentWnd,vtkGWL_USERDATA,(vtkLONG)this); -+ vtkSetWindowLong(this->Internal->ParentWnd,vtkGWL_USERDATA,(intptr_t)this); - - // Create the capture window - this->Internal->CapWnd = capCreateCaptureWindow("Capture", -@@ -339,7 +339,7 @@ - } - - // set user data for callbacks -- if (!capSetUserData(this->Internal->CapWnd,(long)this)) -+ if (!capSetUserData(this->Internal->CapWnd,(intptr_t)this)) - { - vtkErrorMacro(<< "Initialize: couldn't set user data for callback"\ - << " (" << GetLastError() << ")"); - diff --git a/src/vtk.mk b/src/vtk.mk index 4bd268db..87e7a8cb 100644 --- a/src/vtk.mk +++ b/src/vtk.mk @@ -1,7 +1,7 @@ -# 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 := vtk +$(PKG)_WEBSITE := http://www.vtk.org/ $(PKG)_IGNORE := 5.10% $(PKG)_VERSION := 5.8.0 $(PKG)_CHECKSUM := 83ee74b83403590342c079a52b06eef7ab862417f941d5f4558aea25c6bbc2d5 @@ -35,9 +35,8 @@ define $(PKG)_BUILD # now for the cross compilation mkdir '$(1)/cross_build' - cd '$(1)/cross_build' && cmake \ + cd '$(1)/cross_build' && '$(TARGET)-cmake' \ -C '$(1)/TryRunResults.cmake'\ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)'\ -DBUILD_TESTING=FALSE\ -DVTKCompileTools_DIR='$(1)/native_build'\ -DVTK_USE_SYSTEM_EXPAT=TRUE\ diff --git a/src/vtk6-1-fixes.patch b/src/vtk6-1-fixes.patch new file mode 100644 index 00000000..cac6a272 --- /dev/null +++ b/src/vtk6-1-fixes.patch @@ -0,0 +1,85 @@ +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: =?UTF-8?q?Martin=20M=C3=BCllenhaupt?= <muellni@netlair.de> +Date: Sat, 22 Jun 2013 18:44:18 +1000 +Subject: [PATCH] add TryRunResults.cmake + + +diff --git a/TryRunResults.cmake b/TryRunResults.cmake +new file mode 100644 +index 1111111..2222222 +--- /dev/null ++++ b/TryRunResults.cmake +@@ -0,0 +1,30 @@ ++SET( VTK_TYPE_CHAR_IS_SIGNED ++ "1" ++ CACHE STRING "Result from TRY_RUN" FORCE) ++SET( VTK_ANSI_STREAM_EOF_RESULT ++ "1" ++ CACHE STRING "Result from TRY_RUN" FORCE) ++SET( KWSYS_CHAR_IS_SIGNED ++ "0" ++ CACHE STRING "Result from TRY_RUN" FORCE) ++ ++SET( KWSYS_CHAR_IS_SIGNED__TRYRUN_OUTPUT ++ "" ++ CACHE STRING "Output from TRY_RUN" FORCE) ++ ++SET( CMAKE_REQUIRE_LARGE_FILE_SUPPORT ++ "0" ++ CACHE STRING "Result from TRY_RUN" FORCE) ++ ++SET( CMAKE_REQUIRE_LARGE_FILE_SUPPORT__TRYRUN_OUTPUT ++ "" ++ CACHE STRING "Output from TRY_RUN" FORCE) ++ ++SET( KWSYS_LFS_WORKS ++ "0" ++ CACHE STRING "Result from TRY_RUN" FORCE) ++ ++SET( KWSYS_LFS_WORKS__TRYRUN_OUTPUT ++ "" ++ CACHE STRING "Output from TRY_RUN" FORCE) ++ + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Martin=20M=C3=BCllenhaupt?= <muellni@netlair.de> +Date: Thu, 29 Aug 2013 10:19:49 +0200 +Subject: [PATCH] strip down native configure to required compile tools + + +diff --git a/Utilities/EncodeString/module.cmake b/Utilities/EncodeString/module.cmake +index 1111111..2222222 100644 +--- a/Utilities/EncodeString/module.cmake ++++ b/Utilities/EncodeString/module.cmake +@@ -1,4 +1,7 @@ + vtk_module(vtkUtilitiesEncodeString ++ GROUPS ++ CompileTools + DEPENDS + vtksys ++ vtkCommonCore + EXCLUDE_FROM_WRAPPING) +diff --git a/Utilities/HashSource/module.cmake b/Utilities/HashSource/module.cmake +index 1111111..2222222 100644 +--- a/Utilities/HashSource/module.cmake ++++ b/Utilities/HashSource/module.cmake +@@ -1,4 +1,6 @@ + vtk_module(vtkUtilitiesHashSource ++ GROUPS ++ CompileTools + DEPENDS + vtksys + EXCLUDE_FROM_WRAPPING +diff --git a/Utilities/ParseOGLExt/module.cmake b/Utilities/ParseOGLExt/module.cmake +index 1111111..2222222 100644 +--- a/Utilities/ParseOGLExt/module.cmake ++++ b/Utilities/ParseOGLExt/module.cmake +@@ -1,2 +1,4 @@ + vtk_module(vtkParseOGLExt ++ GROUPS ++ CompileTools + EXCLUDE_FROM_WRAPPING) diff --git a/src/vtk6-1-tryrun.patch b/src/vtk6-1-tryrun.patch deleted file mode 100644 index c30aa7e7..00000000 --- a/src/vtk6-1-tryrun.patch +++ /dev/null @@ -1,36 +0,0 @@ -This file is part of MXE. -See index.html for further information. - ---- blubb 1970-01-01 01:00:00.000000000 +0100 -+++ VTK/TryRunResults.cmake 2011-09-27 08:44:04.563613261 +0200 -@@ -0,0 +1,30 @@ -+SET( VTK_TYPE_CHAR_IS_SIGNED -+ "1" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+SET( VTK_ANSI_STREAM_EOF_RESULT -+ "1" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+SET( KWSYS_CHAR_IS_SIGNED -+ "0" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+ -+SET( KWSYS_CHAR_IS_SIGNED__TRYRUN_OUTPUT -+ "" -+ CACHE STRING "Output from TRY_RUN" FORCE) -+ -+SET( CMAKE_REQUIRE_LARGE_FILE_SUPPORT -+ "0" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+ -+SET( CMAKE_REQUIRE_LARGE_FILE_SUPPORT__TRYRUN_OUTPUT -+ "" -+ CACHE STRING "Output from TRY_RUN" FORCE) -+ -+SET( KWSYS_LFS_WORKS -+ "0" -+ CACHE STRING "Result from TRY_RUN" FORCE) -+ -+SET( KWSYS_LFS_WORKS__TRYRUN_OUTPUT -+ "" -+ CACHE STRING "Output from TRY_RUN" FORCE) -+ diff --git a/src/vtk6-2-config-compiletools.patch b/src/vtk6-2-config-compiletools.patch deleted file mode 100644 index 253eb128..00000000 --- a/src/vtk6-2-config-compiletools.patch +++ /dev/null @@ -1,29 +0,0 @@ -This file is part of MXE. -See index.html for further information. - ---- VTK6.3.0/Utilities/EncodeString/module.cmake 2013-06-12 21:47:10.000000000 +0200 -+++ VTK6.3.0/Utilities/EncodeString/module.cmake 2013-08-29 10:06:51.327921851 +0200 -@@ -1,4 +1,7 @@ - vtk_module(vtkUtilitiesEncodeString -+ GROUPS -+ CompileTools - DEPENDS - vtksys -+ vtkCommonCore - EXCLUDE_FROM_WRAPPING) ---- VTK6.3.0/Utilities/HashSource/module.cmake 2013-06-12 21:47:10.000000000 +0200 -+++ VTK6.3.0/Utilities/HashSource/module.cmake 2013-08-29 09:58:48.055272752 +0200 -@@ -1,4 +1,6 @@ - vtk_module(vtkUtilitiesHashSource -+ GROUPS -+ CompileTools - DEPENDS - vtksys - EXCLUDE_FROM_WRAPPING ---- VTK6.3.0/Utilities/ParseOGLExt/module.cmake 2013-06-12 21:47:10.000000000 +0200 -+++ VTK6.3.0/Utilities/ParseOGLExt/module.cmake 2013-08-29 09:58:54.939480759 +0200 -@@ -1,4 +1,6 @@ - vtk_module(vtkParseOGLExt -+ GROUPS -+ CompileTools - EXCLUDE_FROM_WRAPPING) diff --git a/src/vtk6.mk b/src/vtk6.mk index fc30c999..980ff759 100644 --- a/src/vtk6.mk +++ b/src/vtk6.mk @@ -1,7 +1,8 @@ -# 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 := vtk6 +$(PKG)_WEBSITE := http://www.vtk.org/ +$(PKG)_DESCR := VTK6 $(PKG)_IGNORE := $(PKG)_VERSION := 6.3.0 $(PKG)_CHECKSUM := 92a493354c5fa66bea73b5fc014154af5d9f3f6cee8d20a826f4cd5d4b0e8a5e @@ -38,11 +39,9 @@ define $(PKG)_BUILD # now the cross compilation mkdir '$(1).cross_build' - cd '$(1).cross_build' && cmake \ + cd '$(1).cross_build' && '$(TARGET)-cmake' \ -C '$(1)/TryRunResults.cmake' \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ -DVTKCompileTools_DIR='$(1).native_build' \ - -DBUILD_SHARED_LIBS=$(if $(BUILD_STATIC),FALSE,TRUE) \ -DModule_vtkGUISupportQt=TRUE \ -DModule_vtkGUISupportQtOpenGL=TRUE \ -DModule_vtkViewsQt=TRUE \ @@ -58,8 +57,7 @@ define $(PKG)_BUILD #now build the GUI -> Qt -> SimpleView Example mkdir '$(1).test' - cd '$(1).test' && cmake \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ + cd '$(1).test' && '$(TARGET)-cmake' \ '$(1)/Examples/GUI/Qt/SimpleView' $(MAKE) -C '$(1).test' -j '$(JOBS)' VERBOSE=1 endef diff --git a/src/waf.mk b/src/waf.mk new file mode 100644 index 00000000..a0c12102 --- /dev/null +++ b/src/waf.mk @@ -0,0 +1,23 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := waf +$(PKG)_WEBSITE := https://waf.io/ +$(PKG)_DESCR := Waf: the meta build system +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.8.17 +$(PKG)_CHECKSUM := 63c53b03dd23afde1008dced06a011dad581d24392818c8069a40af99f6ac2b6 +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 +$(PKG)_URL := https://waf.io/$($(PKG)_FILE) +$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) + +define $(PKG)_UPDATE + $(WGET) -q -O- 'https://waf.io/' | \ + $(SED) -n 's,.*waf-\([0-9][^>]*\)\.tar.*,\1,p' | \ + head -1 +endef + +define $(PKG)_BUILD_$(BUILD) + mkdir -p '$(PREFIX)/$(BUILD)/bin' + cp '$(1)/waf' '$(PREFIX)/$(BUILD)/bin/waf' +endef diff --git a/src/wavpack.mk b/src/wavpack.mk index e5a9a770..65ae68d2 100644 --- a/src/wavpack.mk +++ b/src/wavpack.mk @@ -1,10 +1,11 @@ -# 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 := wavpack +$(PKG)_WEBSITE := http://www.wavpack.com/ +$(PKG)_DESCR := WavPack $(PKG)_IGNORE := -$(PKG)_VERSION := 4.75.0 -$(PKG)_CHECKSUM := c63e5c2106749dc6b2fb4302f2260f4803a93dd6cadf337764920dc836e3af2e +$(PKG)_VERSION := 4.75.2 +$(PKG)_CHECKSUM := 7d31b34166c33c3109b45c6e4579b472fd05e3ee8ec6d728352961c5cdd1d6b0 $(PKG)_SUBDIR := wavpack-$($(PKG)_VERSION) $(PKG)_FILE := wavpack-$($(PKG)_VERSION).tar.bz2 $(PKG)_URL := http://www.wavpack.com/$($(PKG)_FILE) diff --git a/src/wget.mk b/src/wget.mk index ed9e68ef..de2ff7bc 100644 --- a/src/wget.mk +++ b/src/wget.mk @@ -1,29 +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. PKG := wget -$(PKG)_VERSION := 1.16.3 -$(PKG)_CHECKSUM := 67f7b7b0f5c14db633e3b18f53172786c001e153d545cfc85d82759c5c2ffb37 +$(PKG)_WEBSITE := https://www.gnu.org/software/wget/ +$(PKG)_VERSION := 1.19.1 +$(PKG)_CHECKSUM := 0c950b9671881222a4d385b013c9604e98a8025d1988529dfca0e93617744cd2 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE) +$(PKG)_URL := https://ftp.gnu.org/gnu/$(PKG)/$($(PKG)_FILE) $(PKG)_DEPS := gcc gnutls libidn libntlm pthreads define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.savannah.gnu.org/cgit/wget.git/refs/' | \ - $(SED) -n "s,.*<a href='/cgit/wget.git/tag/?id=v\([0-9.]*\)'>.*,\1,p" | \ + $(WGET) -q -O- 'https://git.savannah.gnu.org/cgit/wget.git/refs/' | \ + $(SED) -n "s,.*<a href='/cgit/wget.git/tag/?h=v\([0-9.]*\)'>.*,\1,p" | \ head -1 endef define $(PKG)_BUILD - # avoid conflict with base64_encode from gnutls - $(if $(BUILD_STATIC), $(SED) -i 's/^base64_encode /wget_base64_encode /;' '$(1)/src/utils.c') - $(SED) -i 's/-lidn/`$(TARGET)-pkg-config --libs libidn`/g;' '$(1)/configure' cd '$(1)' && ./configure \ $(MXE_CONFIGURE_OPTS) \ --with-ssl=gnutls \ - CFLAGS='-DIN6_ARE_ADDR_EQUAL=IN6_ADDR_EQUAL' \ - LIBS='-lpthread' + CFLAGS='-DIN6_ARE_ADDR_EQUAL=IN6_ADDR_EQUAL $(if $(BUILD_STATIC),-DGNUTLS_INTERNAL_BUILD,)' $(MAKE) -C '$(1)/lib' -j '$(JOBS)' $(MAKE) -C '$(1)/src' -j '$(JOBS)' install-binPROGRAMS endef diff --git a/src/widl-1-fixes.patch b/src/widl-1-fixes.patch index 9459b5c9..7921f126 100644 --- a/src/widl-1-fixes.patch +++ b/src/widl-1-fixes.patch @@ -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. diff -ur mingw-w64-v3.3.0.orig/mingw-w64-tools/widl/include/windef.h mingw-w64-v3.3.0/mingw-w64-tools/widl/include/windef.h --- mingw-w64-v3.3.0.orig/mingw-w64-tools/widl/include/windef.h 2014-10-29 20:53:30.000000000 +1100 diff --git a/src/widl.mk b/src/widl.mk index 1c7375b1..1e8d8f70 100644 --- a/src/widl.mk +++ b/src/widl.mk @@ -1,10 +1,11 @@ -# This file is part of MXE. -# See index.html for further information. +# This file is part of MXE. See LICENSE.md for licensing information. # WIDL is called "Wine IDL Compiler"; but we use mingw-w64's copy of it to # avoid downloading Wine's entire tree. PKG := widl +$(PKG)_WEBSITE := https://www.winehq.org/docs/widl/ +$(PKG)_DESCR := Wine IDL Compiler $(PKG)_IGNORE = $(mingw-w64_IGNORE) $(PKG)_VERSION = $(mingw-w64_VERSION) $(PKG)_CHECKSUM = $(mingw-w64_CHECKSUM) @@ -24,7 +25,7 @@ define $(PKG)_BUILD --prefix='$(PREFIX)' \ --target='$(TARGET)' $(MAKE) -C '$(1)/mingw-w64-tools/widl' -j '$(JOBS)' install - + # create cmake file echo 'set(CMAKE_WIDL $(PREFIX)/bin/$(TARGET)-$(PKG) CACHE PATH "widl executable")' \ > '$(CMAKE_TOOLCHAIN_DIR)/$(PKG).cmake' diff --git a/src/winpcap-1-fixes.patch b/src/winpcap-1-fixes.patch index 28741c0a..bfcc2faa 100644 --- a/src/winpcap-1-fixes.patch +++ b/src/winpcap-1-fixes.patch @@ -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. Contains ad hoc patches for cross building. diff --git a/src/winpcap.mk b/src/winpcap.mk index 538081a1..bbc0ec75 100644 --- a/src/winpcap.mk +++ b/src/winpcap.mk @@ -1,17 +1,18 @@ -# 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 := winpcap +$(PKG)_WEBSITE := https://www.winpcap.org/ +$(PKG)_DESCR := WinPcap $(PKG)_IGNORE := $(PKG)_VERSION := 4_1_3 $(PKG)_CHECKSUM := 346a93f6b375ac4c1add5c8c7178498f1feed4172fb33383474a91b48ec6633a $(PKG)_SUBDIR := winpcap $(PKG)_FILE := WpcapSrc_$($(PKG)_VERSION).zip -$(PKG)_URL := http://www.winpcap.org/install/bin/$($(PKG)_FILE) +$(PKG)_URL := https://www.winpcap.org/install/bin/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.winpcap.org/devel.htm' | \ + $(WGET) -q -O- 'https://www.winpcap.org/devel.htm' | \ $(SED) -n 's,.*WpcapSrc_\([0-9][^>]*\)\.zip.*,\1,p' | \ head -1 endef diff --git a/src/wt-1-fixes.patch b/src/wt-1-fixes.patch index 057ed55c..e6191962 100644 --- a/src/wt-1-fixes.patch +++ b/src/wt-1-fixes.patch @@ -1,16 +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. Contains ad hoc patches for cross building. -From 91ffd2fb6f9c5ed3017af5363b3f14313a45ea9c Mon Sep 17 00:00:00 2001 -From: MXE -Date: Mon, 18 Jun 2012 13:23:21 +0200 -Subject: [PATCH 1/2] fixes for mxe +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Sat, 1 Apr 2017 15:17:43 +0200 +Subject: [PATCH] Wt fixes diff --git a/cmake/WtFindBoost-vintage.txt b/cmake/WtFindBoost-vintage.txt -index e48b21e..1198139 100644 +index 1111111..2222222 100644 --- a/cmake/WtFindBoost-vintage.txt +++ b/cmake/WtFindBoost-vintage.txt @@ -70,6 +70,7 @@ ELSE(MSVC) @@ -22,7 +21,7 @@ index e48b21e..1198139 100644 boost_thread-mt boost_thread-${BOOST_COMPILER}-${BOOST_VERSION} diff --git a/cmake/WtFindGm.txt b/cmake/WtFindGm.txt -index 76697fc..9bc0fa1 100644 +index 1111111..2222222 100644 --- a/cmake/WtFindGm.txt +++ b/cmake/WtFindGm.txt @@ -59,6 +59,12 @@ IF(WIN32) @@ -39,10 +38,10 @@ index 76697fc..9bc0fa1 100644 FIND_LIBRARY(GM_LIB NAMES diff --git a/cmake/WtFindPangoFt2.txt b/cmake/WtFindPangoFt2.txt -index cd1e640..b1bbe3d 100644 +index 1111111..2222222 100644 --- a/cmake/WtFindPangoFt2.txt +++ b/cmake/WtFindPangoFt2.txt -@@ -36,11 +36,15 @@ SET(PANGO_FT2_INCLUDE_DIRS +@@ -43,13 +43,17 @@ SET(PANGO_FT2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIR} ${GLIB2_CONFIG_INCLUDE_DIR}) @@ -50,7 +49,9 @@ index cd1e640..b1bbe3d 100644 - ${PANGO_FT2_LIBRARY} - ${PANGO_LIBRARY} - ${GOBJECT2_LIBRARY} -- ${GLIB2_LIBRARY}) +- ${GLIB2_LIBRARY} +- ${FONTCONFIG_LIBRARY} +- ) +IF(PANGO_FT2_LIBS) + SET(PANGO_FT2_LIBRARIES optimized ${PANGO_FT2_LIBS}) +ELSE(PANGO_FT2_LIBS) @@ -58,16 +59,18 @@ index cd1e640..b1bbe3d 100644 + ${PANGO_FT2_LIBRARY} + ${PANGO_LIBRARY} + ${GOBJECT2_LIBRARY} -+ ${GLIB2_LIBRARY}) ++ ${GLIB2_LIBRARY} ++ ${FONTCONFIG_LIBRARY} ++ ) +ENDIF(PANGO_FT2_LIBS) IF (PANGO_INCLUDE_DIR AND FT2_INCLUDE_DIR diff --git a/cmake/WtFindSsl.txt b/cmake/WtFindSsl.txt -index d99f1df..7c1f70b 100644 +index 1111111..2222222 100644 --- a/cmake/WtFindSsl.txt +++ b/cmake/WtFindSsl.txt -@@ -109,6 +109,11 @@ IF(WIN32) +@@ -110,6 +110,11 @@ IF(WIN32) AND SSL_LIB_DEBUG AND SSL_TOO_LIB_RELEASE AND SSL_TOO_LIB_DEBUG) @@ -79,6 +82,3 @@ index d99f1df..7c1f70b 100644 ELSEIF(APPLE) FIND_LIBRARY(SSL_LIB NAMES --- -1.9.3 (Apple Git-50) - diff --git a/src/wt-2-rename-variables-near-and-far.patch b/src/wt-2-rename-variables-near-and-far.patch deleted file mode 100644 index fc56d668..00000000 --- a/src/wt-2-rename-variables-near-and-far.patch +++ /dev/null @@ -1,78 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From e81074f3819bd5b10b047132cfa473516a547afd Mon Sep 17 00:00:00 2001 -From: Boris Nagaev <bnagaev@gmail.com> -Date: Sun, 30 Aug 2015 18:36:39 +0200 -Subject: [PATCH] WCartesian3DChart: rename variables near and far - -"near" and "far" are defined in minwindef.h (mingw-w64): - - #define far - #define near - -Error message: - - wt-3.3.4/src/Wt/Chart/WCartesian3DChart.C:330:16: error: - expected primary-expression before '(' token - WVector4 far( - ^ ---- - src/Wt/Chart/WCartesian3DChart.C | 26 +++++++++++++------------- - 1 file changed, 13 insertions(+), 13 deletions(-) - -diff --git a/src/Wt/Chart/WCartesian3DChart.C b/src/Wt/Chart/WCartesian3DChart.C -index f028d75..c5fc675 100644 ---- a/src/Wt/Chart/WCartesian3DChart.C -+++ b/src/Wt/Chart/WCartesian3DChart.C -@@ -321,34 +321,34 @@ void WCartesian3DChart::createRay(double x, double y, WVector3 &eye, WVector3 &d - invTransform = - #endif - invTransform.inverted(); -- WVector4 near( -+ WVector4 near_( - x / width().value() * 2 - 1, - y / height().value() * (-2) + 1, - -1.0, - 1.0 - ); -- WVector4 far( -- near.x(), -- near.y(), -+ WVector4 far_( -+ near_.x(), -+ near_.y(), - 1.0, - 1.0 - ); -- near = invTransform * near; -- far = invTransform * far; -- near = near / near.w(); -- far = far / far.w(); -- WVector4 ray = far - near; -+ near_ = invTransform * near_; -+ far_ = invTransform * far_; -+ near_ = near_ / near_.w(); -+ far_ = far_ / far_.w(); -+ WVector4 ray = far_ - near_; - ray.normalize(); - #ifndef WT_TARGET_JAVA - direction = WVector3(ray.x(), ray.z(), ray.y()); -- eye = WVector3(near.x(), near.z(), near.y()); -+ eye = WVector3(near_.x(), near_.z(), near_.y()); - #else - direction.setElement(0, ray.x()); - direction.setElement(1, ray.z()); - direction.setElement(2, ray.y()); -- eye.setElement(0, near.x()); -- eye.setElement(1, near.z()); -- eye.setElement(2, near.y()); -+ eye.setElement(0, near_.x()); -+ eye.setElement(1, near_.z()); -+ eye.setElement(2, near_.y()); - #endif - } - --- -1.7.10.4 - diff --git a/src/wt-3-wserver-dllimport.patch b/src/wt-3-wserver-dllimport.patch deleted file mode 100644 index ff923b8f..00000000 --- a/src/wt-3-wserver-dllimport.patch +++ /dev/null @@ -1,84 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From 051edee4feb365a0f79fa971c7bf95dfe2b4f58a Mon Sep 17 00:00:00 2001 -From: Koen Deforche <koen@emweb.be> -Date: Tue, 21 Apr 2015 21:24:09 +0200 -Subject: [PATCH 22/22] Several changes: - - - applied patch from Stefan Ruppert for building on mingw64 ---- - src/Wt/WServer | 6 ++--- - src/Wt/WServer.C | 15 ++++++++++++ - -diff --git a/src/Wt/WServer b/src/Wt/WServer -index 0be01bd..9d25551 100644 ---- a/src/Wt/WServer -+++ b/src/Wt/WServer -@@ -441,7 +441,7 @@ public: - * - * \sa setLocalizedStrings() - */ -- WT_API WLocalizedStrings *localizedStrings() { return localizedStrings_; } -+ WT_API WLocalizedStrings *localizedStrings(); - - #ifndef WT_TARGET_JAVA - -@@ -461,7 +461,7 @@ public: - * This is the logger class used in WApplication::log() and - * Wt::log() functions. - */ -- WT_API WLogger& logger() { return logger_; } -+ WT_API WLogger& logger(); - - /*! \brief Adds an entry to the log. - * -@@ -477,7 +477,7 @@ public: - - WT_API Configuration& configuration(); - -- WT_API WebController *controller() { return webController_; } -+ WT_API WebController *controller(); - - #ifndef WT_TARGET_JAVA - WT_API void scheduleStop(); -diff --git a/src/Wt/WServer.C b/src/Wt/WServer.C -index ddf710d..0941fd4 100644 ---- a/src/Wt/WServer.C -+++ b/src/Wt/WServer.C -@@ -78,6 +78,11 @@ void WServer::setLocalizedStrings(WLocalizedStrings *stringResolver) - localizedStrings_ = stringResolver; - } - -+WLocalizedStrings *WServer::localizedStrings() -+{ -+ return localizedStrings_; -+} -+ - void WServer::setIOService(WIOService& ioService) - { - if (ioService_) { -@@ -128,6 +133,11 @@ void WServer::setConfiguration(const std::string& file, - application_ = application; - } - -+WLogger& WServer::logger() -+{ -+ return logger_; -+} -+ - WLogEntry WServer::log(const std::string& type) const - { - WLogEntry e = logger_.entry(type); -@@ -168,6 +178,11 @@ Configuration& WServer::configuration() - return *configuration_; - } - -+WebController *WServer::controller() -+{ -+ return webController_; -+} -+ - bool WServer::readConfigurationProperty(const std::string& name, - std::string& value) const - { diff --git a/src/wt-4-secur32-ws2-32-in-lowercase.patch b/src/wt-4-secur32-ws2-32-in-lowercase.patch deleted file mode 100644 index b9aafb05..00000000 --- a/src/wt-4-secur32-ws2-32-in-lowercase.patch +++ /dev/null @@ -1,29 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -From 80e187872cc72153417ab1f2d9b6caa3c156eef1 Mon Sep 17 00:00:00 2001 -From: Boris Nagaev <bnagaev@gmail.com> -Date: Sun, 30 Aug 2015 22:28:48 +0200 -Subject: [PATCH] WtFindPostgresql: secur32 ws2_32 in lowercase - -Fix mingw64 build ---- - cmake/WtFindPostgresql.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cmake/WtFindPostgresql.txt b/cmake/WtFindPostgresql.txt -index 68403ae..9a298cc 100644 ---- a/cmake/WtFindPostgresql.txt -+++ b/cmake/WtFindPostgresql.txt -@@ -59,7 +59,7 @@ IF(POSTGRES_LIBRARIES AND POSTGRES_INCLUDE) - SET(POSTGRES_FOUND TRUE) - SET(POSTGRES_INCLUDE_DIRS ${POSTGRES_INCLUDE}) - IF (WIN32) -- SET(POSTGRES_LIBRARIES Secur32.lib Ws2_32.lib ${POSTGRES_LIBRARIES}) -+ SET(POSTGRES_LIBRARIES secur32.lib ws2_32.lib ${POSTGRES_LIBRARIES}) - ENDIF (WIN32) - ENDIF(POSTGRES_LIBRARIES AND POSTGRES_INCLUDE) - --- -1.7.10.4 - diff --git a/src/wt.mk b/src/wt.mk index 334af13c..29bde6d6 100644 --- a/src/wt.mk +++ b/src/wt.mk @@ -1,25 +1,27 @@ -# 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 := wt +$(PKG)_WEBSITE := https://www.webtoolkit.eu/ +$(PKG)_DESCR := Wt $(PKG)_IGNORE := -$(PKG)_VERSION := 3.3.4 -$(PKG)_CHECKSUM := 327f9c64504366e3f2fa2c8f1d1a23efc7b8fba8ace3869de375d668f99ede10 +$(PKG)_VERSION := 3.3.7 +$(PKG)_CHECKSUM := 054af8d62a7c158df62adc174a6a57610868470a07e7192ee7ce60a18552851d $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/witty/$($(PKG)_FILE) +$(PKG)_URL := https://github.com/emweb/wt/archive/$($(PKG)_VERSION).tar.gz $(PKG)_DEPS := gcc boost graphicsmagick libharu openssl pango postgresql qt sqlite define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/witty/files/wt/' | \ - $(SED) -n 's,.*<a href="/projects/witty/files/wt/\([0-9][^>]*\)/.*,\1,p' | \ - head -1 + $(call MXE_GET_GITHUB_ALL_TAGS, emweb/wt) \ + | grep -v 'rc' \ + | $(SORT) -V \ + | tail -1 endef define $(PKG)_BUILD # build wt libraries mkdir '$(1).build' - cd '$(1).build' && cmake \ + cd '$(1).build' && '$(TARGET)-cmake' \ -DCONFIGDIR='$(PREFIX)/$(TARGET)/etc/wt' \ -DBUILD_EXAMPLES=OFF \ -DBUILD_TESTS=OFF \ @@ -34,7 +36,6 @@ define $(PKG)_BUILD -DPANGO_FT2_LIBS="`'$(TARGET)-pkg-config' --libs-only-l pangoft2`" \ -DENABLE_QT4=ON \ -DWT_CMAKE_FINDER_INSTALL_DIR='/lib/wt' \ - -DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)' \ '$(1)' $(MAKE) -C '$(1).build' -j '$(JOBS)' VERBOSE=1 || $(MAKE) -C '$(1).build' -j 1 VERBOSE=1 $(MAKE) -C '$(1).build' -j 1 install VERBOSE=1 diff --git a/src/wxwidgets-1-fixes.patch b/src/wxwidgets-1-fixes.patch new file mode 100644 index 00000000..e358bd05 --- /dev/null +++ b/src/wxwidgets-1-fixes.patch @@ -0,0 +1,198 @@ +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 Pek <tehnick-8@mail.ru> +Date: Thu, 5 May 2016 19:11:19 +0300 +Subject: [PATCH] fix build with GCC >= 6.x + + +diff --git a/src/stc/scintilla/src/Editor.cxx b/src/stc/scintilla/src/Editor.cxx +index 1111111..2222222 100644 +--- a/src/stc/scintilla/src/Editor.cxx ++++ b/src/stc/scintilla/src/Editor.cxx +@@ -10,6 +10,7 @@ + #include <stdio.h> + #include <ctype.h> + #include <assert.h> ++#include <math.h> + + #include <string> + #include <vector> +@@ -5841,9 +5842,9 @@ void Editor::GoToLine(int lineNo) { + } + + static bool Close(Point pt1, Point pt2) { +- if (abs(pt1.x - pt2.x) > 3) ++ if (fabs(pt1.x - pt2.x) > 3) + return false; +- if (abs(pt1.y - pt2.y) > 3) ++ if (fabs(pt1.y - pt2.y) > 3) + return false; + return true; + } + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: darealshinji <djcj@gmx.de> +Date: Fri, 26 May 2017 09:33:22 +0200 +Subject: [PATCH] make it possible to install DLLs into $(libdir)/../bin + + +diff --git a/Makefile.in b/Makefile.in +index 1111111..2222222 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -15501,7 +15501,7 @@ distclean: clean + @COND_MONOLITHIC_1_SHARED_1@install_monodll: $(__monodll___depname) + @COND_MONOLITHIC_1_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir) + @COND_MONOLITHIC_1_SHARED_1@ $(INSTALL_DATA) $(LIBDIRNAME)/$(LIBPREFIX)wx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir) +-@COND_MONOLITHIC_1_SHARED_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir) ++@COND_MONOLITHIC_1_SHARED_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir)$(DLLDEST) + @COND_MONOLITHIC_1_SHARED_1@ (cd $(DESTDIR)$(libdir) ; $(__monodll___so_symlinks_inst_cmd)) + + @COND_MONOLITHIC_1_SHARED_1@uninstall_monodll: +@@ -15536,7 +15536,7 @@ distclean: clean + @COND_MONOLITHIC_0_SHARED_1@install_basedll: $(__basedll___depname) + @COND_MONOLITHIC_0_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir) + @COND_MONOLITHIC_0_SHARED_1@ $(INSTALL_DATA) $(LIBDIRNAME)/$(LIBPREFIX)wx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir) +-@COND_MONOLITHIC_0_SHARED_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIX)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir) ++@COND_MONOLITHIC_0_SHARED_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIX)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir)$(DLLDEST) + @COND_MONOLITHIC_0_SHARED_1@ (cd $(DESTDIR)$(libdir) ; $(__basedll___so_symlinks_inst_cmd)) + + @COND_MONOLITHIC_0_SHARED_1@uninstall_basedll: +@@ -15573,7 +15573,7 @@ distclean: clean + @COND_MONOLITHIC_0_SHARED_1@install_netdll: $(__netdll___depname) + @COND_MONOLITHIC_0_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir) + @COND_MONOLITHIC_0_SHARED_1@ $(INSTALL_DATA) $(LIBDIRNAME)/$(LIBPREFIX)wx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir) +-@COND_MONOLITHIC_0_SHARED_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIX)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir) ++@COND_MONOLITHIC_0_SHARED_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIX)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_net$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir)$(DLLDEST) + @COND_MONOLITHIC_0_SHARED_1@ (cd $(DESTDIR)$(libdir) ; $(__netdll___so_symlinks_inst_cmd)) + + @COND_MONOLITHIC_0_SHARED_1@uninstall_netdll: +@@ -15610,7 +15610,7 @@ distclean: clean + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1@install_coredll: $(__coredll___depname) + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir) + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1@ $(INSTALL_DATA) $(LIBDIRNAME)/$(LIBPREFIX)wx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir) +-@COND_MONOLITHIC_0_SHARED_1_USE_GUI_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir) ++@COND_MONOLITHIC_0_SHARED_1_USE_GUI_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir)$(DLLDEST) + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1@ (cd $(DESTDIR)$(libdir) ; $(__coredll___so_symlinks_inst_cmd)) + + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1@uninstall_coredll: +@@ -15647,7 +15647,7 @@ distclean: clean + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1@install_advdll: $(__advdll___depname) + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir) + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1@ $(INSTALL_DATA) $(LIBDIRNAME)/$(LIBPREFIX)wx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir) +-@COND_MONOLITHIC_0_SHARED_1_USE_GUI_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir) ++@COND_MONOLITHIC_0_SHARED_1_USE_GUI_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_adv$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir)$(DLLDEST) + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1@ (cd $(DESTDIR)$(libdir) ; $(__advdll___so_symlinks_inst_cmd)) + + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1@uninstall_advdll: +@@ -15684,7 +15684,7 @@ distclean: clean + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_MEDIA_1@install_mediadll: $(__mediadll___depname) + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_MEDIA_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir) + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_MEDIA_1@ $(INSTALL_DATA) $(LIBDIRNAME)/$(LIBPREFIX)wx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir) +-@COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_MEDIA_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir) ++@COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_MEDIA_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_media$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir)$(DLLDEST) + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_MEDIA_1@ (cd $(DESTDIR)$(libdir) ; $(__mediadll___so_symlinks_inst_cmd)) + + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_MEDIA_1@uninstall_mediadll: +@@ -15721,7 +15721,7 @@ distclean: clean + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_HTML_1@install_htmldll: $(__htmldll___depname) + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_HTML_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir) + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_HTML_1@ $(INSTALL_DATA) $(LIBDIRNAME)/$(LIBPREFIX)wx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir) +-@COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_HTML_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir) ++@COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_HTML_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir)$(DLLDEST) + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_HTML_1@ (cd $(DESTDIR)$(libdir) ; $(__htmldll___so_symlinks_inst_cmd)) + + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_HTML_1@uninstall_htmldll: +@@ -15758,7 +15758,7 @@ distclean: clean + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_WEBVIEW_1@install_webviewdll: $(__webviewdll___depname) + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_WEBVIEW_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir) + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_WEBVIEW_1@ $(INSTALL_DATA) $(LIBDIRNAME)/$(LIBPREFIX)wx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir) +-@COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_WEBVIEW_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir) ++@COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_WEBVIEW_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_webview$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir)$(DLLDEST) + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_WEBVIEW_1@ (cd $(DESTDIR)$(libdir) ; $(__webviewdll___so_symlinks_inst_cmd)) + + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_WEBVIEW_1@uninstall_webviewdll: +@@ -15795,7 +15795,7 @@ distclean: clean + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_QA_1@install_qadll: $(__qadll___depname) + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_QA_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir) + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_QA_1@ $(INSTALL_DATA) $(LIBDIRNAME)/$(LIBPREFIX)wx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir) +-@COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_QA_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir) ++@COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_QA_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_qa$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir)$(DLLDEST) + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_QA_1@ (cd $(DESTDIR)$(libdir) ; $(__qadll___so_symlinks_inst_cmd)) + + @COND_MONOLITHIC_0_SHARED_1_USE_GUI_1_USE_QA_1@uninstall_qadll: +@@ -15832,7 +15832,7 @@ distclean: clean + @COND_MONOLITHIC_0_SHARED_1@install_xmldll: $(__xmldll___depname) + @COND_MONOLITHIC_0_SHARED_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir) + @COND_MONOLITHIC_0_SHARED_1@ $(INSTALL_DATA) $(LIBDIRNAME)/$(LIBPREFIX)wx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir) +-@COND_MONOLITHIC_0_SHARED_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIX)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir) ++@COND_MONOLITHIC_0_SHARED_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIX)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xml$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir)$(DLLDEST) + @COND_MONOLITHIC_0_SHARED_1@ (cd $(DESTDIR)$(libdir) ; $(__xmldll___so_symlinks_inst_cmd)) + + @COND_MONOLITHIC_0_SHARED_1@uninstall_xmldll: +@@ -15869,7 +15869,7 @@ distclean: clean + @COND_MONOLITHIC_0_SHARED_1_USE_XRC_1@install_xrcdll: $(__xrcdll___depname) + @COND_MONOLITHIC_0_SHARED_1_USE_XRC_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir) + @COND_MONOLITHIC_0_SHARED_1_USE_XRC_1@ $(INSTALL_DATA) $(LIBDIRNAME)/$(LIBPREFIX)wx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir) +-@COND_MONOLITHIC_0_SHARED_1_USE_XRC_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir) ++@COND_MONOLITHIC_0_SHARED_1_USE_XRC_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_xrc$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir)$(DLLDEST) + @COND_MONOLITHIC_0_SHARED_1_USE_XRC_1@ (cd $(DESTDIR)$(libdir) ; $(__xrcdll___so_symlinks_inst_cmd)) + + @COND_MONOLITHIC_0_SHARED_1_USE_XRC_1@uninstall_xrcdll: +@@ -15906,7 +15906,7 @@ distclean: clean + @COND_MONOLITHIC_0_SHARED_1_USE_AUI_1@install_auidll: $(__auidll___depname) + @COND_MONOLITHIC_0_SHARED_1_USE_AUI_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir) + @COND_MONOLITHIC_0_SHARED_1_USE_AUI_1@ $(INSTALL_DATA) $(LIBDIRNAME)/$(LIBPREFIX)wx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir) +-@COND_MONOLITHIC_0_SHARED_1_USE_AUI_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir) ++@COND_MONOLITHIC_0_SHARED_1_USE_AUI_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_aui$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir)$(DLLDEST) + @COND_MONOLITHIC_0_SHARED_1_USE_AUI_1@ (cd $(DESTDIR)$(libdir) ; $(__auidll___so_symlinks_inst_cmd)) + + @COND_MONOLITHIC_0_SHARED_1_USE_AUI_1@uninstall_auidll: +@@ -15943,7 +15943,7 @@ distclean: clean + @COND_MONOLITHIC_0_SHARED_1_USE_RIBBON_1@install_ribbondll: $(__ribbondll___depname) + @COND_MONOLITHIC_0_SHARED_1_USE_RIBBON_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir) + @COND_MONOLITHIC_0_SHARED_1_USE_RIBBON_1@ $(INSTALL_DATA) $(LIBDIRNAME)/$(LIBPREFIX)wx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir) +-@COND_MONOLITHIC_0_SHARED_1_USE_RIBBON_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir) ++@COND_MONOLITHIC_0_SHARED_1_USE_RIBBON_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_ribbon$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir)$(DLLDEST) + @COND_MONOLITHIC_0_SHARED_1_USE_RIBBON_1@ (cd $(DESTDIR)$(libdir) ; $(__ribbondll___so_symlinks_inst_cmd)) + + @COND_MONOLITHIC_0_SHARED_1_USE_RIBBON_1@uninstall_ribbondll: +@@ -15980,7 +15980,7 @@ distclean: clean + @COND_MONOLITHIC_0_SHARED_1_USE_PROPGRID_1@install_propgriddll: $(__propgriddll___depname) + @COND_MONOLITHIC_0_SHARED_1_USE_PROPGRID_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir) + @COND_MONOLITHIC_0_SHARED_1_USE_PROPGRID_1@ $(INSTALL_DATA) $(LIBDIRNAME)/$(LIBPREFIX)wx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir) +-@COND_MONOLITHIC_0_SHARED_1_USE_PROPGRID_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir) ++@COND_MONOLITHIC_0_SHARED_1_USE_PROPGRID_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_propgrid$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir)$(DLLDEST) + @COND_MONOLITHIC_0_SHARED_1_USE_PROPGRID_1@ (cd $(DESTDIR)$(libdir) ; $(__propgriddll___so_symlinks_inst_cmd)) + + @COND_MONOLITHIC_0_SHARED_1_USE_PROPGRID_1@uninstall_propgriddll: +@@ -16017,7 +16017,7 @@ distclean: clean + @COND_MONOLITHIC_0_SHARED_1_USE_RICHTEXT_1@install_richtextdll: $(__richtextdll___depname) + @COND_MONOLITHIC_0_SHARED_1_USE_RICHTEXT_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir) + @COND_MONOLITHIC_0_SHARED_1_USE_RICHTEXT_1@ $(INSTALL_DATA) $(LIBDIRNAME)/$(LIBPREFIX)wx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir) +-@COND_MONOLITHIC_0_SHARED_1_USE_RICHTEXT_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir) ++@COND_MONOLITHIC_0_SHARED_1_USE_RICHTEXT_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_richtext$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir)$(DLLDEST) + @COND_MONOLITHIC_0_SHARED_1_USE_RICHTEXT_1@ (cd $(DESTDIR)$(libdir) ; $(__richtextdll___so_symlinks_inst_cmd)) + + @COND_MONOLITHIC_0_SHARED_1_USE_RICHTEXT_1@uninstall_richtextdll: +@@ -16054,7 +16054,7 @@ distclean: clean + @COND_MONOLITHIC_0_SHARED_1_USE_STC_1@install_stcdll: $(__stcdll___depname) + @COND_MONOLITHIC_0_SHARED_1_USE_STC_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir) + @COND_MONOLITHIC_0_SHARED_1_USE_STC_1@ $(INSTALL_DATA) $(LIBDIRNAME)/$(LIBPREFIX)wx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir) +-@COND_MONOLITHIC_0_SHARED_1_USE_STC_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir) ++@COND_MONOLITHIC_0_SHARED_1_USE_STC_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_stc$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir)$(DLLDEST) + @COND_MONOLITHIC_0_SHARED_1_USE_STC_1@ (cd $(DESTDIR)$(libdir) ; $(__stcdll___so_symlinks_inst_cmd)) + + @COND_MONOLITHIC_0_SHARED_1_USE_STC_1@uninstall_stcdll: +@@ -16091,7 +16091,7 @@ distclean: clean + @COND_SHARED_1_USE_GUI_1_USE_OPENGL_1@install_gldll: $(__gldll___depname) + @COND_SHARED_1_USE_GUI_1_USE_OPENGL_1@ $(INSTALL_DIR) $(DESTDIR)$(libdir) + @COND_SHARED_1_USE_GUI_1_USE_OPENGL_1@ $(INSTALL_DATA) $(LIBDIRNAME)/$(LIBPREFIX)wx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl-$(WX_RELEASE)$(HOST_SUFFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir) +-@COND_SHARED_1_USE_GUI_1_USE_OPENGL_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir) ++@COND_SHARED_1_USE_GUI_1_USE_OPENGL_1@ $(INSTALL_PROGRAM) $(LIBDIRNAME)/$(DLLPREFIX)$(WXDLLNAMEPREFIXGUI)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl$(WXCOMPILER)$(VENDORTAG)$(WXDLLVERSIONTAG)$(dll___targetsuf3) $(DESTDIR)$(libdir)$(DLLDEST) + @COND_SHARED_1_USE_GUI_1_USE_OPENGL_1@ (cd $(DESTDIR)$(libdir) ; $(__gldll___so_symlinks_inst_cmd)) + + @COND_SHARED_1_USE_GUI_1_USE_OPENGL_1@uninstall_gldll: diff --git a/src/wxwidgets-test.cpp b/src/wxwidgets-test.cpp index a51d5db7..93e844ad 100644 --- a/src/wxwidgets-test.cpp +++ b/src/wxwidgets-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <wx/wx.h> diff --git a/src/wxwidgets.mk b/src/wxwidgets.mk index 9ffa70be..969ee918 100644 --- a/src/wxwidgets.mk +++ b/src/wxwidgets.mk @@ -1,26 +1,24 @@ -# 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 := wxwidgets +$(PKG)_WEBSITE := https://www.wxwidgets.org/ +$(PKG)_DESCR := wxWidgets $(PKG)_IGNORE := $(PKG)_VERSION := 3.0.2 $(PKG)_CHECKSUM := 346879dc554f3ab8d6da2704f651ecb504a22e9d31c17ef5449b129ed711585d $(PKG)_SUBDIR := wxWidgets-$($(PKG)_VERSION) $(PKG)_FILE := wxWidgets-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/wxwindows/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/wxwindows/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc expat jpeg libiconv libpng sdl tiff zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/wxwindows/files/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/wxwindows/files/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef define $(PKG)_CONFIGURE_OPTS - --host='$(TARGET)' \ - --build="`config.guess`" \ - --disable-shared \ - --prefix='$(PREFIX)/$(TARGET)' \ + $(MXE_CONFIGURE_OPTS) \ --enable-gui \ --disable-stl \ --enable-threads \ @@ -66,6 +64,7 @@ define $(PKG)_BUILD -$(MAKE) -C '$(1).unicode/locale' -j '$(JOBS)' allmo \ $(MXE_DISABLE_CRUFT) $(MAKE) -C '$(1).unicode' -j 1 install \ + $(if $(BUILD_SHARED),DLLDEST='/../bin') \ $(MXE_DISABLE_CRUFT) __install_wxrc___depname= $(INSTALL) -m755 '$(PREFIX)/$(TARGET)/bin/wx-config' \ '$(PREFIX)/bin/$(TARGET)-wx-config' @@ -73,8 +72,7 @@ define $(PKG)_BUILD # build test program '$(TARGET)-g++' \ -W -Wall -Werror -Wno-error=unused-local-typedefs -pedantic -std=gnu++0x \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-wxwidgets.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-wxwidgets.exe' \ `'$(TARGET)-wx-config' --cflags --libs` endef -$(PKG)_BUILD_SHARED = diff --git a/src/x264-1-fix-bin-bash.patch b/src/x264-1-fix-bin-bash.patch index 972d60bd..7c5e8f85 100644 --- a/src/x264-1-fix-bin-bash.patch +++ b/src/x264-1-fix-bin-bash.patch @@ -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. diff -urN x264-snapshot-20100714-2245/configure x264-snapshot-20100714-2245.new/configure --- x264-snapshot-20100714-2245/configure 2010-07-15 06:45:07.000000000 +1000 diff --git a/src/x264.mk b/src/x264.mk index 92fdab88..273a8acb 100644 --- a/src/x264.mk +++ b/src/x264.mk @@ -1,17 +1,17 @@ -# 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 := x264 +$(PKG)_WEBSITE := https://www.videolan.org/developers/x264.html $(PKG)_IGNORE := -$(PKG)_VERSION := 20141130-2245 -$(PKG)_CHECKSUM := c6fa87a3b68f4645dc2ef8b0f14e5fd49004ca2e604cffcb74be128c61616c88 +$(PKG)_VERSION := 20161130-2245 +$(PKG)_CHECKSUM := 0825e14945bc373107f9a00e66d45d5389bb86368efd834b92c52cddb2ded1d8 $(PKG)_SUBDIR := $(PKG)-snapshot-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-snapshot-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://download.videolan.org/pub/videolan/$(PKG)/snapshots/$($(PKG)_FILE) -$(PKG)_DEPS := gcc yasm +$(PKG)_URL := https://download.videolan.org/pub/videolan/$(PKG)/snapshots/$($(PKG)_FILE) +$(PKG)_DEPS := gcc liblsmash yasm define $(PKG)_UPDATE - $(WGET) -q -O- 'http://git.videolan.org/?p=x264.git;a=shortlog' | \ + $(WGET) -q -O- 'https://git.videolan.org/?p=x264.git;a=shortlog' | \ $(SED) -n 's,.*\([0-9]\{4\}\)-\([0-9]\{2\}\)-\([0-9]\{2\}\).*,\1\2\3-2245,p' | \ sort | \ tail -1 diff --git a/src/xapian-core.mk b/src/xapian-core.mk index b7466071..6dc700bd 100644 --- a/src/xapian-core.mk +++ b/src/xapian-core.mk @@ -1,18 +1,19 @@ -# 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 := xapian-core +$(PKG)_WEBSITE := https://xapian.org/ +$(PKG)_DESCR := Xapian-Core $(PKG)_IGNORE := $(PKG)_VERSION := 1.2.21 $(PKG)_CHECKSUM := 63f48758fbd13fa8456dd4cf9bf3ec35a096e4290f14a51ac7df23f78c162d3f $(PKG)_SUBDIR := xapian-core-$($(PKG)_VERSION) $(PKG)_FILE := xapian-core-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://oligarchy.co.uk/xapian/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://oligarchy.co.uk/xapian/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc zlib define $(PKG)_UPDATE - $(WGET) -q -O- http://xapian.org/download | \ - $(SED) -n 's,.*<a HREF="http://oligarchy.co.uk/xapian/\([^/]*\)/xapian-core[^"]*">.*,\1,p' | \ + $(WGET) -q -O- https://xapian.org/download | \ + $(SED) -n 's,.*<a HREF="https://oligarchy.co.uk/xapian/\([^/]*\)/xapian-core[^"]*">.*,\1,p' | \ head -1 endef diff --git a/src/xerces-test.cpp b/src/xerces-test.cpp index cf06698d..594c6b73 100644 --- a/src/xerces-test.cpp +++ b/src/xerces-test.cpp @@ -1,6 +1,5 @@ /* - * This file is part of MXE. - * See index.html for further information. + * This file is part of MXE. See LICENSE.md for licensing information. */ #include <xercesc/parsers/SAXParser.hpp> diff --git a/src/xerces.mk b/src/xerces.mk index dbbed836..0edefd61 100644 --- a/src/xerces.mk +++ b/src/xerces.mk @@ -1,17 +1,18 @@ -# 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 := xerces +$(PKG)_WEBSITE := https://xerces.apache.org/xerces-c/ +$(PKG)_DESCR := Xerces-C++ $(PKG)_IGNORE := -$(PKG)_VERSION := 3.1.2 -$(PKG)_CHECKSUM := 743bd0a029bf8de56a587c270d97031e0099fe2b7142cef03e0da16e282655a0 +$(PKG)_VERSION := 3.1.4 +$(PKG)_CHECKSUM := c98eedac4cf8a73b09366ad349cb3ef30640e7a3089d360d40a3dde93f66ecf6 $(PKG)_SUBDIR := xerces-c-$($(PKG)_VERSION) $(PKG)_FILE := xerces-c-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.apache.org/dist/xerces/c/$(word 1,$(subst ., ,$($(PKG)_VERSION)))/sources/$($(PKG)_FILE) +$(PKG)_URL := https://www.apache.org/dist/xerces/c/$(word 1,$(subst ., ,$($(PKG)_VERSION)))/sources/$($(PKG)_FILE) $(PKG)_DEPS := gcc curl libiconv pthreads define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.apache.org/dist/xerces/c/3/sources/?C=M;O=D' | \ + $(WGET) -q -O- 'https://www.apache.org/dist/xerces/c/3/sources/?C=M;O=D' | \ $(SED) -n 's,.*<a href="xerces-c-\([0-9][^"]*\)\.tar.*,\1,p' | \ grep -v rc | \ head -1 @@ -47,7 +48,7 @@ define $(PKG)_BUILD '$(TARGET)-g++' \ -W -Wall -Werror -ansi -pedantic \ - '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-xerces.exe' \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-xerces.exe' \ `'$(TARGET)-pkg-config' xerces-c --cflags --libs` endef diff --git a/src/xine-lib-1-configure_ac.patch b/src/xine-lib-1-configure_ac.patch deleted file mode 100644 index c33a7b3c..00000000 --- a/src/xine-lib-1-configure_ac.patch +++ /dev/null @@ -1,24 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -diff -urN xine-lib-1.2.4/configure.ac xine-lib-1.2.4-patch/configure.ac ---- xine-lib-1.2.4/configure.ac 2013-09-20 16:04:44.000000000 +0300 -+++ xine-lib-1.2.4-patch/configure.ac 2013-12-17 11:45:43.657189416 +0200 -@@ -343,7 +343,7 @@ - AC_CHECK_HEADERS([alloca.h]) - AC_CHECK_HEADERS([assert.h byteswap.h dirent.h errno.h execinfo.h fcntl.h glob.h]) - AC_CHECK_HEADERS([libgen.h malloc.h netdb.h stdbool.h ucontext.h]) --AC_CHECK_HEADERS([sys/ioctl.h sys/mixer.h sys/mman.h sys/param.h sys/times.h sys/wait.h]) -+AC_CHECK_HEADERS([sys/mixer.h sys/mman-win32.h sys/param.h sys/times.h sys/wait.h]) - - dnl This is duplicative due to AC_HEADER_STDC, but src/input/vcd stuff needs to - dnl have HAVE_STDIO_H defined, or it won't compile. -@@ -378,7 +378,7 @@ - - AC_CACHE_CHECK([type of request parameter for ioctl()], [ac_cv_ioctl_request], [ - for ac_ioctl_request_type in "unsigned long" "int"; do -- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/ioctl.h> -+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <windows.h> - int ioctl(int fd, $ac_ioctl_request_type request, ...);]], [[]])], - [ac_cv_ioctl_request=$ac_ioctl_request_type], []) - done diff --git a/src/xine-lib-2-build_fixes.patch b/src/xine-lib-2-build_fixes.patch deleted file mode 100644 index 6a020649..00000000 --- a/src/xine-lib-2-build_fixes.patch +++ /dev/null @@ -1,306 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -diff -urN xine-lib-1.2.4/configure.ac xine-lib-1.2.4-patch/configure.ac ---- xine-lib-1.2.4/configure.ac 2013-12-17 11:45:43.657189416 +0200 -+++ xine-lib-1.2.4-patch/configure.ac 2013-12-17 14:57:28.907822042 +0200 -@@ -544,7 +544,7 @@ - - if test "$WIN32_SYS" = "mingw32"; then - WIN32_INCLUDES='-I$(top_srcdir)/win32/include' -- LIBS="-lwinmm -lwsock32 $LIBS" -+ LIBS="-lwinmm -lwsock32 -lmman $LIBS" - LDFLAGS="-Wl,--enable-stdcall-fixup $LDFLAGS" - dnl iberty has been needed only in older versions - AC_CHECK_LIB(iberty, strncomp, [GOOM_LIBS="-liberty"]) -diff -urN xine-lib-1.2.4/include/xine/xine_internal.h xine-lib-1.2.4-patch/include/xine/xine_internal.h ---- xine-lib-1.2.4/include/xine/xine_internal.h 2013-09-18 13:04:54.000000000 +0300 -+++ xine-lib-1.2.4-patch/include/xine/xine_internal.h 2013-12-17 15:14:55.229127435 +0200 -@@ -55,6 +55,26 @@ - /* used by plugin loader */ - #define XINE_VERSION_CODE XINE_MAJOR_VERSION*10000+XINE_MINOR_VERSION*100+XINE_SUB_VERSION - -+// Add there to support them on MinGW -+#define timeradd(a, b, result) \ -+ do { \ -+ (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ -+ (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \ -+ if ((result)->tv_usec >= 1000000L) { \ -+ ++(result)->tv_sec; \ -+ (result)->tv_usec -= 1000000L; \ -+ } \ -+ } while (0) -+ -+#define timersub(a, b, result) \ -+ do { \ -+ (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ -+ (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ -+ if ((result)->tv_usec < 0) { \ -+ --(result)->tv_sec; \ -+ (result)->tv_usec += 1000000L; \ -+ } \ -+ } while (0) - - /* - * log constants -diff -urN xine-lib-1.2.4/include/xine/xineutils.h xine-lib-1.2.4-patch/include/xine/xineutils.h ---- xine-lib-1.2.4/include/xine/xineutils.h 2013-09-18 13:04:54.000000000 +0300 -+++ xine-lib-1.2.4-patch/include/xine/xineutils.h 2013-12-20 12:29:33.465030673 +0200 -@@ -119,8 +119,8 @@ - - - /* Optimized/fast memcpy */ -- --extern void *(* xine_fast_memcpy)(void *to, const void *from, size_t len) XINE_PROTECTED; -+//extern void *xine_fast_memcpy(void *to, const void *from, size_t len); -+#define xine_fast_memcpy(a, b, c) memcpy(a, b, c) - - /* - * Debug stuff -diff -urN xine-lib-1.2.4/misc/Makefile.am xine-lib-1.2.4-patch/misc/Makefile.am ---- xine-lib-1.2.4/misc/Makefile.am 2012-02-05 21:17:01.000000000 +0200 -+++ xine-lib-1.2.4-patch/misc/Makefile.am 2013-12-19 09:20:56.937982071 +0200 -@@ -21,7 +21,7 @@ - pkgconfig_DATA=libxine.pc - - xine_list_@XINE_SERIES@_SOURCES = xine-list.c --xine_list_@XINE_SERIES@_LDADD = $(XINE_LIB) -+xine_list_@XINE_SERIES@_LDADD = $(XINE_LIB) $(top_builddir)/src/xine-utils/libxineutils.la - - fontdir = $(pkgdatadir)/fonts - dist_font_DATA = \ -diff -urN xine-lib-1.2.4/src/audio_dec/xine_lpcm_decoder.c xine-lib-1.2.4-patch/src/audio_dec/xine_lpcm_decoder.c ---- xine-lib-1.2.4/src/audio_dec/xine_lpcm_decoder.c 2013-09-18 13:04:54.000000000 +0300 -+++ xine-lib-1.2.4-patch/src/audio_dec/xine_lpcm_decoder.c 2013-12-17 15:18:20.459131654 +0200 -@@ -41,7 +41,11 @@ - #include <sys/types.h> - #include <sys/stat.h> - #include <fcntl.h> -+#ifdef __MINGW32__ -+#include <winsock.h> -+#else - #include <arpa/inet.h> /* htons */ -+#endif - #include <netinet/in.h> /* ntohs */ - - #include <xine/xine_internal.h> -diff -urN xine-lib-1.2.4/src/demuxers/demux_ts.c xine-lib-1.2.4-patch/src/demuxers/demux_ts.c ---- xine-lib-1.2.4/src/demuxers/demux_ts.c 2013-09-23 23:56:56.000000000 +0300 -+++ xine-lib-1.2.4-patch/src/demuxers/demux_ts.c 2013-12-18 12:04:09.269573623 +0200 -@@ -146,7 +146,11 @@ - #include <fcntl.h> - #include <unistd.h> - #include <string.h> --#include <arpa/inet.h> -+#ifdef __MINGW32__ -+#include <winsock.h> -+#else -+#include <arpa/inet.h> /* htons */ -+#endif - - #ifdef HAVE_FFMPEG_AVUTIL_H - # include <crc.h> -diff -urN xine-lib-1.2.4/src/input/libdvdnav/dvdnav_internal.h xine-lib-1.2.4-patch/src/input/libdvdnav/dvdnav_internal.h ---- xine-lib-1.2.4/src/input/libdvdnav/dvdnav_internal.h 2009-11-30 23:28:34.000000000 +0200 -+++ xine-lib-1.2.4-patch/src/input/libdvdnav/dvdnav_internal.h 2013-12-18 11:56:09.153450165 +0200 -@@ -64,11 +64,11 @@ - /* pthread_mutex_* wrapper for win32 */ - #include <windows.h> - #include <process.h> --typedef CRITICAL_SECTION pthread_mutex_t; --#define pthread_mutex_init(a, b) InitializeCriticalSection(a) --#define pthread_mutex_lock(a) EnterCriticalSection(a) --#define pthread_mutex_unlock(a) LeaveCriticalSection(a) --#define pthread_mutex_destroy(a) -+// typedef CRITICAL_SECTION pthread_mutex_t; -+// #define pthread_mutex_init(a, b) InitializeCriticalSection(a) -+// #define pthread_mutex_lock(a) EnterCriticalSection(a) -+// #define pthread_mutex_unlock(a) LeaveCriticalSection(a) -+// #define pthread_mutex_destroy(a) - - #include <io.h> /* read() */ - #define lseek64 _lseeki64 -diff -urN xine-lib-1.2.4/src/post/deinterlace/speedy.c xine-lib-1.2.4-patch/src/post/deinterlace/speedy.c ---- xine-lib-1.2.4/src/post/deinterlace/speedy.c 2012-05-26 23:49:59.000000000 +0300 -+++ xine-lib-1.2.4-patch/src/post/deinterlace/speedy.c 2013-12-20 12:24:59.608986588 +0200 -@@ -1392,28 +1392,28 @@ - } - #endif - -- --#define speedy_memcpy_c xine_fast_memcpy --#define speedy_memcpy_mmx xine_fast_memcpy --#define speedy_memcpy_mmxext xine_fast_memcpy -+//#undef xine_fast_memcpy -+//#define speedy_memcpy_c xine_fast_memcpy -+//#define speedy_memcpy_mmx xine_fast_memcpy -+//#define speedy_memcpy_mmxext xine_fast_memcpy - - - static void blit_packed422_scanline_c( uint8_t *dest, const uint8_t *src, int width ) - { -- speedy_memcpy_c( dest, src, width*2 ); -+ memcpy( dest, src, width*2 ); - } - - #if defined(ARCH_X86) || defined(ARCH_X86_64) - static void blit_packed422_scanline_mmx( uint8_t *dest, const uint8_t *src, int width ) - { -- speedy_memcpy_mmx( dest, src, width*2 ); -+ memcpy( dest, src, width*2 ); - } - #endif - - #if defined(ARCH_X86) || defined(ARCH_X86_64) - static void blit_packed422_scanline_mmxext( uint8_t *dest, const uint8_t *src, int width ) - { -- speedy_memcpy_mmxext( dest, src, width*2 ); -+ memcpy( dest, src, width*2 ); - } - #endif - -@@ -2602,7 +2602,8 @@ - kill_chroma_packed422_inplace_scanline = kill_chroma_packed422_inplace_scanline_c; - mirror_packed422_inplace_scanline = mirror_packed422_inplace_scanline_c; - halfmirror_packed422_inplace_scanline = halfmirror_packed422_inplace_scanline_c; -- speedy_memcpy = speedy_memcpy_c; -+ speedy_memcpy = memcpy; -+ //speedy_memcpy = speedy_memcpy_c; - diff_packed422_block8x8 = diff_packed422_block8x8_c; - a8_subpix_blit_scanline = a8_subpix_blit_scanline_c; - quarter_blit_vertical_packed422_scanline = quarter_blit_vertical_packed422_scanline_c; -@@ -2644,7 +2645,8 @@ - invert_colour_packed422_inplace_scanline = invert_colour_packed422_inplace_scanline_mmx; - vfilter_chroma_121_packed422_scanline = vfilter_chroma_121_packed422_scanline_mmx; - vfilter_chroma_332_packed422_scanline = vfilter_chroma_332_packed422_scanline_mmx; -- speedy_memcpy = speedy_memcpy_mmxext; -+ //speedy_memcpy = speedy_memcpy_mmxext; -+ speedy_memcpy = memcpy; - } else if( speedy_accel & MM_ACCEL_X86_MMX ) { - if( verbose ) { - printf( "speedycode: Using MMX optimized functions.\n" ); -@@ -2660,7 +2662,8 @@ - invert_colour_packed422_inplace_scanline = invert_colour_packed422_inplace_scanline_mmx; - vfilter_chroma_121_packed422_scanline = vfilter_chroma_121_packed422_scanline_mmx; - vfilter_chroma_332_packed422_scanline = vfilter_chroma_332_packed422_scanline_mmx; -- speedy_memcpy = speedy_memcpy_mmx; -+ //speedy_memcpy = speedy_memcpy_mmx; -+ speedy_memcpy = memcpy; - } else { - if( verbose ) { - printf( "speedycode: No MMX or MMXEXT support detected, using C fallbacks.\n" ); -diff -urN xine-lib-1.2.4/src/vdr/input_vdr.c xine-lib-1.2.4-patch/src/vdr/input_vdr.c ---- xine-lib-1.2.4/src/vdr/input_vdr.c 2013-09-18 13:04:54.000000000 +0300 -+++ xine-lib-1.2.4-patch/src/vdr/input_vdr.c 2013-12-20 12:23:36.313756861 +0200 -@@ -28,13 +28,13 @@ - #include <fcntl.h> - #include <unistd.h> - #include <sys/stat.h> --#include <sys/poll.h> -+// #include <sys/poll.h> - #include <errno.h> - #include <pthread.h> - - #include <sys/socket.h> - #include <netinet/in.h> --#include <resolv.h> -+// #include <resolv.h> - #include <netdb.h> - - #define LOG_MODULE "input_vdr" -@@ -1919,7 +1919,7 @@ - filename = strdup(filename); - - _x_mrl_unescape (filename); -- this->fh = xine_open_cloexec(filename, O_RDONLY | O_NONBLOCK); -+ this->fh = xine_open_cloexec(filename, O_RDONLY); - - lprintf("filename '%s'\n", filename); - -@@ -1934,7 +1934,7 @@ - } - - { -- struct pollfd poll_fh = { this->fh, POLLIN, 0 }; -+ /*struct pollfd poll_fh = { this->fh, POLLIN, 0 }; - - int r = poll(&poll_fh, 1, 300); - if (1 != r) -@@ -1945,10 +1945,10 @@ - _("timeout expired during setup phase")); - free (filename); - return 0; -- } -+ }*/ - } - -- fcntl(this->fh, F_SETFL, ~O_NONBLOCK & fcntl(this->fh, F_GETFL, 0)); -+ //fcntl(this->fh, F_SETFL, ~O_NONBLOCK & fcntl(this->fh, F_GETFL, 0)); - - /* eat initial handshake byte */ - { -@@ -2098,7 +2098,7 @@ - if ((this->fh = vdr_plugin_open_socket(this, host, port + 0)) == -1) - return 0; - -- fcntl(this->fh, F_SETFL, ~O_NONBLOCK & fcntl(this->fh, F_GETFL, 0)); -+ //fcntl(this->fh, F_SETFL, ~O_NONBLOCK & fcntl(this->fh, F_GETFL, 0)); - - if ((this->fh_control = vdr_plugin_open_socket(this, host, port + 1)) == -1) - return 0; -diff -urN xine-lib-1.2.4/src/video_dec/libjpeg.c xine-lib-1.2.4-patch/src/video_dec/libjpeg.c ---- xine-lib-1.2.4/src/video_dec/libjpeg.c 2012-11-23 22:08:21.000000000 +0200 -+++ xine-lib-1.2.4-patch/src/video_dec/libjpeg.c 2013-12-18 10:01:45.755428630 +0200 -@@ -26,6 +26,7 @@ - #endif - - -+ - #include <stdlib.h> - #include <string.h> - #include <sys/types.h> -@@ -33,6 +34,7 @@ - #include <fcntl.h> - #include <unistd.h> - #include <stdio.h> -+#include <basetsd.h> - - #define LOG_MODULE "jpeg_video_decoder" - #define LOG_VERBOSE -diff -urN xine-lib-1.2.4/src/xine-utils/memcpy.c xine-lib-1.2.4-patch/src/xine-utils/memcpy.c ---- xine-lib-1.2.4/src/xine-utils/memcpy.c 2013-09-18 19:58:32.000000000 +0300 -+++ xine-lib-1.2.4-patch/src/xine-utils/memcpy.c 2013-12-20 12:30:01.733448201 +0200 -@@ -55,7 +55,7 @@ - #include <xine/xine_internal.h> - #include "../xine-engine/xine_private.h" - --void *(* xine_fast_memcpy)(void *to, const void *from, size_t len); -+ - - /* Original comments from mplayer (file: aclib.c) - This part of code was taken by me from Linux-2.4.3 and slightly modified -@@ -558,7 +558,7 @@ - && (config_flags & memcpy_method[method].cpu_require) == - memcpy_method[method].cpu_require ) { - lprintf("using %s memcpy()\n", memcpy_method[method].name ); -- xine_fast_memcpy = memcpy_method[method].function; -+ // xine_fast_memcpy = memcpy_method[method].function; - return; - } else { - xprintf(xine, XINE_VERBOSITY_DEBUG, "xine: will probe memcpy on startup\n" ); -@@ -603,13 +603,13 @@ - (config_flags & memcpy_method[best].cpu_require) == - memcpy_method[best].cpu_require ) { - lprintf("using %s memcpy()\n", memcpy_method[best].name ); -- xine_fast_memcpy = memcpy_method[best].function; -+ // xine_fast_memcpy = memcpy_method[best].function; - return; - } - - best = 0; - -- xine_fast_memcpy = memcpy; -+ // xine_fast_memcpy = memcpy; - - if( (buf1 = malloc(BUFSIZE)) == NULL ) - return; diff --git a/src/xine-lib-3-more_build_fixes.patch b/src/xine-lib-3-more_build_fixes.patch deleted file mode 100644 index c023f951..00000000 --- a/src/xine-lib-3-more_build_fixes.patch +++ /dev/null @@ -1,109 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -diff -urN xine-lib-1.2.4/src/combined/wavpack_decoder.c xine-lib-1.2.4-patch/src/combined/wavpack_decoder.c ---- xine-lib-1.2.4/src/combined/wavpack_decoder.c 2013-09-18 13:04:54.000000000 +0300 -+++ xine-lib-1.2.4-patch/src/combined/wavpack_decoder.c 2014-01-01 12:45:31.120873116 +0200 -@@ -27,6 +27,7 @@ - #define LOG_MODULE "decode_wavpack" - #define LOG_VERBOSE - -+#include <malloc.h> - #include <xine/xine_internal.h> - #include <xine/attributes.h> - #include "bswap.h" -diff -urN xine-lib-1.2.4/src/input/input_cdda.c xine-lib-1.2.4-patch/src/input/input_cdda.c ---- xine-lib-1.2.4/src/input/input_cdda.c 2013-09-18 13:04:54.000000000 +0300 -+++ xine-lib-1.2.4-patch/src/input/input_cdda.c 2014-01-01 12:42:52.954879392 +0200 -@@ -56,6 +56,7 @@ - #include <signal.h> - #include <netinet/in.h> - #include <sys/socket.h> -+#include <malloc.h> - - #include <basedir.h> - -diff -urN xine-lib-1.2.4/src/vdr/input_vdr.c xine-lib-1.2.4-patch/src/vdr/input_vdr.c ---- xine-lib-1.2.4/src/vdr/input_vdr.c 2014-01-01 12:52:41.000000000 +0200 -+++ xine-lib-1.2.4-patch/src/vdr/input_vdr.c 2014-01-01 12:49:36.935863362 +0200 -@@ -1760,7 +1760,7 @@ - if (this->event_queue) - xine_event_dispose_queue(this->event_queue); - -- if (this->rpc_thread) -+ /* if (this->rpc_thread) - { - struct timespec abstime; - int ms_to_time_out = 10000; -@@ -1799,12 +1799,12 @@ - xprintf(this->stream->xine, XINE_VERBOSITY_LOG, _("%s: joining rpc thread ...\n"), LOG_MODULE); - pthread_join(this->rpc_thread, 0); - xprintf(this->stream->xine, XINE_VERBOSITY_LOG, _("%s: rpc thread joined.\n"), LOG_MODULE); -- } -+ }*/ - - pthread_cond_destroy(&this->rpc_thread_shutdown_cond); - pthread_mutex_destroy(&this->rpc_thread_shutdown_lock); - -- if (this->metronom_thread) -+ /*if (this->metronom_thread) - { - xprintf(this->stream->xine, XINE_VERBOSITY_LOG, _("%s: joining metronom thread ...\n"), LOG_MODULE); - -@@ -1814,12 +1814,6 @@ - this->metronom_thread_request = -1; - this->metronom_thread_reply = 0; - pthread_cond_broadcast(&this->metronom_thread_request_cond); --/* -- pthread_mutex_unlock(&this->metronom_thread_lock); -- -- pthread_mutex_lock(&this->metronom_thread_lock); -- if (!this->metronom_thread_reply) --*/ - pthread_cond_wait(&this->metronom_thread_reply_cond, &this->metronom_thread_lock); - pthread_mutex_unlock(&this->metronom_thread_lock); - -@@ -1827,7 +1821,7 @@ - - pthread_join(this->metronom_thread, 0); - xprintf(this->stream->xine, XINE_VERBOSITY_LOG, _("%s: metronom thread joined.\n"), LOG_MODULE); -- } -+ }*/ - - pthread_mutex_destroy(&this->metronom_thread_lock); - pthread_cond_destroy(&this->metronom_thread_request_cond); -diff -urN xine-lib-1.2.4/src/xine-engine/scratch.c xine-lib-1.2.4-patch/src/xine-engine/scratch.c ---- xine-lib-1.2.4/src/xine-engine/scratch.c 2013-09-18 13:04:54.000000000 +0300 -+++ xine-lib-1.2.4-patch/src/xine-engine/scratch.c 2014-01-01 12:36:59.724893408 +0200 -@@ -40,20 +40,20 @@ - scratch_printf (scratch_buffer_t *this, const char *format, va_list argp) - { - time_t t; -- struct tm tm; -+ struct tm *tm; - size_t l; - - pthread_mutex_lock (&this->lock); - - time (&t); -- localtime_r (&t, &tm); -+ tm = localtime (&t); - - if ( ! this->lines[this->cur] ) - this->lines[this->cur] = malloc(SCRATCH_LINE_LEN_MAX+1); - if ( ! this->lines[this->cur] ) - return; - -- l = strftime (this->lines[this->cur], SCRATCH_LINE_LEN_MAX, "%X: ", &tm); -+ l = strftime (this->lines[this->cur], SCRATCH_LINE_LEN_MAX, "%X: ", tm); - vsnprintf (this->lines[this->cur] + l, SCRATCH_LINE_LEN_MAX - l, format, argp); - - lprintf ("printing format %s to line %d\n", format, this->cur); -diff -urN xine-lib-1.2.4/src/xine-utils/Makefile.am xine-lib-1.2.4-patch/src/xine-utils/Makefile.am ---- xine-lib-1.2.4/src/xine-utils/Makefile.am 2012-02-05 21:17:03.000000000 +0200 -+++ xine-lib-1.2.4-patch/src/xine-utils/Makefile.am 2014-01-01 12:36:33.466894450 +0200 -@@ -37,3 +37,4 @@ - noinst_PROGRAMS = xmltest - xmltest_SOURCES = xmllexer.c xmlparser.c - xmltest_CFLAGS = -DLOG -DXINE_XML_PARSER_TEST $(AM_CFLAGS) -+xmltest_LDFLAGS = $(top_builddir)/lib/libxineposix.la diff --git a/src/xine-lib-4-mkdir.patch b/src/xine-lib-4-mkdir.patch deleted file mode 100644 index 84407a86..00000000 --- a/src/xine-lib-4-mkdir.patch +++ /dev/null @@ -1,14 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -diff -urN xine-lib-1.2.4/lib/os_internal.h xine-lib-1.2.4-patch/lib/os_internal.h ---- xine-lib-1.2.4/lib/os_internal.h 2012-02-05 21:17:00.000000000 +0200 -+++ xine-lib-1.2.4-patch/lib/os_internal.h 2014-01-03 19:05:56.643793781 +0200 -@@ -260,6 +260,7 @@ - # ifdef __MINGW64__ - # define mkdir(A, B) mkdir((A)) - # else -+ _CRTIMP int __cdecl _mkdir(const char *_Path); - # define mkdir(A, B) _mkdir((A)) - # endif - diff --git a/src/xine-lib-5-change_mma_h_to_mma_win32_h.patch b/src/xine-lib-5-change_mma_h_to_mma_win32_h.patch deleted file mode 100644 index 122abb4f..00000000 --- a/src/xine-lib-5-change_mma_h_to_mma_win32_h.patch +++ /dev/null @@ -1,303 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -diff -urN xine-lib-1.2.4/contrib/libdha/irq.c xine-lib-1.2.4-patch/contrib/libdha/irq.c ---- xine-lib-1.2.4/contrib/libdha/irq.c 2012-02-05 21:16:59.000000000 +0200 -+++ xine-lib-1.2.4-patch/contrib/libdha/irq.c 2014-01-05 14:30:37.000000000 +0200 -@@ -2,7 +2,7 @@ - #include <stdio.h> - #include <sys/ioctl.h> - #include <sys/types.h> --#include <sys/mman.h> /* mlock */ -+#include <sys/mman-win32.h> /* mlock */ - #include <pthread.h> - #include <errno.h> - #include <unistd.h> -diff -urN xine-lib-1.2.4/contrib/libdha/kernelhelper/test.c xine-lib-1.2.4-patch/contrib/libdha/kernelhelper/test.c ---- xine-lib-1.2.4/contrib/libdha/kernelhelper/test.c 2012-02-05 21:16:59.000000000 +0200 -+++ xine-lib-1.2.4-patch/contrib/libdha/kernelhelper/test.c 2014-01-05 14:30:37.000000000 +0200 -@@ -4,7 +4,7 @@ - #include <unistd.h> - #include <errno.h> - #include <fcntl.h> --#include <sys/mman.h> -+#include <sys/mman-win32.h> - #include <stdlib.h> - - #include "dhahelper.h" -diff -urN xine-lib-1.2.4/contrib/libdha/libdha.c xine-lib-1.2.4-patch/contrib/libdha/libdha.c ---- xine-lib-1.2.4/contrib/libdha/libdha.c 2012-02-05 21:16:59.000000000 +0200 -+++ xine-lib-1.2.4-patch/contrib/libdha/libdha.c 2014-01-05 14:30:37.000000000 +0200 -@@ -58,7 +58,7 @@ - # endif /* SVR4 */ - - /* Generic version */ --#include <sys/mman.h> -+#include <sys/mman-win32.h> - #include <sys/ioctl.h> - #ifndef DEV_MEM - #define DEV_MEM "/dev/mem" -diff -urN xine-lib-1.2.4/contrib/libdha/mmi.c xine-lib-1.2.4-patch/contrib/libdha/mmi.c ---- xine-lib-1.2.4/contrib/libdha/mmi.c 2012-02-05 21:16:59.000000000 +0200 -+++ xine-lib-1.2.4-patch/contrib/libdha/mmi.c 2014-01-05 14:30:37.000000000 +0200 -@@ -2,7 +2,7 @@ - #include <stdio.h> - #include <sys/ioctl.h> - #include <sys/types.h> --#include <sys/mman.h> /* mlock */ -+#include <sys/mman-win32.h> /* mlock */ - #include <errno.h> - #include <unistd.h> - #include <fcntl.h> -diff -urN xine-lib-1.2.4/contrib/vidix/drivers/mach64_vid.c xine-lib-1.2.4-patch/contrib/vidix/drivers/mach64_vid.c ---- xine-lib-1.2.4/contrib/vidix/drivers/mach64_vid.c 2012-02-05 21:17:00.000000000 +0200 -+++ xine-lib-1.2.4-patch/contrib/vidix/drivers/mach64_vid.c 2014-01-05 14:30:35.000000000 +0200 -@@ -13,7 +13,7 @@ - #include <inttypes.h> - #include <fcntl.h> - #include <limits.h> --#include <sys/mman.h> /* for m(un)lock */ -+#include <sys/mman-win32.h> /* for m(un)lock */ - #ifdef HAVE_MALLOC_H - #include <malloc.h> - #ifdef HAVE_MEMALIGN -diff -urN xine-lib-1.2.4/contrib/vidix/drivers/pm3_vid.c xine-lib-1.2.4-patch/contrib/vidix/drivers/pm3_vid.c ---- xine-lib-1.2.4/contrib/vidix/drivers/pm3_vid.c 2012-02-05 21:17:00.000000000 +0200 -+++ xine-lib-1.2.4-patch/contrib/vidix/drivers/pm3_vid.c 2014-01-05 14:30:35.000000000 +0200 -@@ -24,7 +24,7 @@ - #include <string.h> - #include <inttypes.h> - #include <unistd.h> --#include <sys/mman.h> -+#include <sys/mman-win32.h> - - #include "vidix.h" - #include "fourcc.h" -diff -urN xine-lib-1.2.4/contrib/vidix/drivers/radeon_vid.c xine-lib-1.2.4-patch/contrib/vidix/drivers/radeon_vid.c ---- xine-lib-1.2.4/contrib/vidix/drivers/radeon_vid.c 2012-02-05 21:17:00.000000000 +0200 -+++ xine-lib-1.2.4-patch/contrib/vidix/drivers/radeon_vid.c 2014-01-05 14:30:36.000000000 +0200 -@@ -12,7 +12,7 @@ - #include <math.h> - #include <inttypes.h> - #include <sys/types.h> --#include <sys/mman.h> -+#include <sys/mman-win32.h> - #include "bswap.h" - #include "pci_ids.h" - #include "pci_names.h" -diff -urN xine-lib-1.2.4/include/configure.h.in xine-lib-1.2.4-patch/include/configure.h.in ---- xine-lib-1.2.4/include/configure.h.in 2013-09-20 16:07:56.000000000 +0300 -+++ xine-lib-1.2.4-patch/include/configure.h.in 2014-01-05 14:39:09.000000000 +0200 -@@ -441,7 +441,7 @@ - /* Define to 1 if you have the <sys/mixer.h> header file. */ - #undef HAVE_SYS_MIXER_H - --/* Define to 1 if you have the <sys/mman.h> header file. */ -+/* Define to 1 if you have the <sys/mman-win32.h> header file. */ - #undef HAVE_SYS_MMAN_H - - /* Define to 1 if you have the <sys/param.h> header file. */ -diff -urN xine-lib-1.2.4/src/input/input_file.c xine-lib-1.2.4-patch/src/input/input_file.c ---- xine-lib-1.2.4/src/input/input_file.c 2013-09-18 13:04:54.000000000 +0300 -+++ xine-lib-1.2.4-patch/src/input/input_file.c 2014-01-05 14:30:30.000000000 +0200 -@@ -35,7 +35,7 @@ - #include <errno.h> - - #ifdef HAVE_MMAP --#include <sys/mman.h> -+#include <sys/mman-win32.h> - #endif - - #define LOG_MODULE "input_file" -diff -urN xine-lib-1.2.4/src/input/input_v4l2.c xine-lib-1.2.4-patch/src/input/input_v4l2.c ---- xine-lib-1.2.4/src/input/input_v4l2.c 2012-02-05 21:17:02.000000000 +0200 -+++ xine-lib-1.2.4-patch/src/input/input_v4l2.c 2014-01-05 14:30:30.000000000 +0200 -@@ -44,7 +44,7 @@ - #else - # include <linux/videodev2.h> - #endif --#include <sys/mman.h> -+#include <sys/mman-win32.h> - #include <stdio.h> - #include <errno.h> - -diff -urN xine-lib-1.2.4/src/input/input_v4l.c xine-lib-1.2.4-patch/src/input/input_v4l.c ---- xine-lib-1.2.4/src/input/input_v4l.c 2013-09-18 13:04:54.000000000 +0300 -+++ xine-lib-1.2.4-patch/src/input/input_v4l.c 2014-01-05 14:30:26.000000000 +0200 -@@ -49,7 +49,7 @@ - - #include <linux/videodev.h> - #include <sys/ioctl.h> --#include <sys/mman.h> -+#include <sys/mman-win32.h> - #include <errno.h> - - /* Used to capture the audio data */ -diff -urN xine-lib-1.2.4/src/libw32dll/DirectShow/DS_VideoDecoder.c xine-lib-1.2.4-patch/src/libw32dll/DirectShow/DS_VideoDecoder.c ---- xine-lib-1.2.4/src/libw32dll/DirectShow/DS_VideoDecoder.c 2009-12-02 20:32:57.000000000 +0200 -+++ xine-lib-1.2.4-patch/src/libw32dll/DirectShow/DS_VideoDecoder.c 2014-01-05 14:29:19.000000000 +0200 -@@ -45,7 +45,7 @@ - #include <fcntl.h> - #include <errno.h> - #include <sys/types.h> --#include <sys/mman.h> -+#include <sys/mman-win32.h> - #include <stdio.h> - #include <stdlib.h> // labs - -diff -urN xine-lib-1.2.4/src/libw32dll/dmo/DMO_VideoDecoder.c xine-lib-1.2.4-patch/src/libw32dll/dmo/DMO_VideoDecoder.c ---- xine-lib-1.2.4/src/libw32dll/dmo/DMO_VideoDecoder.c 2009-12-02 20:32:57.000000000 +0200 -+++ xine-lib-1.2.4-patch/src/libw32dll/dmo/DMO_VideoDecoder.c 2014-01-05 14:29:15.000000000 +0200 -@@ -49,7 +49,7 @@ - #include <fcntl.h> - #include <errno.h> - #include <sys/types.h> --#include <sys/mman.h> -+#include <sys/mman-win32.h> - #include <stdio.h> - #include <stdlib.h> // labs - -diff -urN xine-lib-1.2.4/src/libw32dll/wine/ext.c xine-lib-1.2.4-patch/src/libw32dll/wine/ext.c ---- xine-lib-1.2.4/src/libw32dll/wine/ext.c 2009-11-30 23:28:52.000000000 +0200 -+++ xine-lib-1.2.4-patch/src/libw32dll/wine/ext.c 2014-01-05 14:29:18.000000000 +0200 -@@ -12,7 +12,7 @@ - #include <malloc.h> - #endif - #include <unistd.h> --#include <sys/mman.h> -+#include <sys/mman-win32.h> - #include <errno.h> - #include <fcntl.h> - #include <string.h> -diff -urN xine-lib-1.2.4/src/libw32dll/wine/ldt_keeper.c xine-lib-1.2.4-patch/src/libw32dll/wine/ldt_keeper.c ---- xine-lib-1.2.4/src/libw32dll/wine/ldt_keeper.c 2013-09-18 13:04:54.000000000 +0300 -+++ xine-lib-1.2.4-patch/src/libw32dll/wine/ldt_keeper.c 2014-01-05 14:29:18.000000000 +0200 -@@ -57,7 +57,7 @@ - #include <stdlib.h> - #include <errno.h> - #include <fcntl.h> --#include <sys/mman.h> -+#include <sys/mman-win32.h> - #include <sys/types.h> - #include <stdio.h> - #include <unistd.h> -diff -urN xine-lib-1.2.4/src/libw32dll/wine/module.c xine-lib-1.2.4-patch/src/libw32dll/wine/module.c ---- xine-lib-1.2.4/src/libw32dll/wine/module.c 2009-11-30 23:28:52.000000000 +0200 -+++ xine-lib-1.2.4-patch/src/libw32dll/wine/module.c 2014-01-05 14:29:16.000000000 +0200 -@@ -19,7 +19,7 @@ - #include <stdlib.h> - #include <string.h> - #include <unistd.h> --#include <sys/mman.h> -+#include <sys/mman-win32.h> - #include <sys/types.h> - - -diff -urN xine-lib-1.2.4/src/libw32dll/wine/pe_image.c xine-lib-1.2.4-patch/src/libw32dll/wine/pe_image.c ---- xine-lib-1.2.4/src/libw32dll/wine/pe_image.c 2009-11-30 23:28:52.000000000 +0200 -+++ xine-lib-1.2.4-patch/src/libw32dll/wine/pe_image.c 2014-01-05 14:29:18.000000000 +0200 -@@ -45,7 +45,7 @@ - #include <sys/stat.h> - #include <fcntl.h> - #ifdef HAVE_SYS_MMAN_H --#include <sys/mman.h> -+#include <sys/mman-win32.h> - #endif - #ifdef HAVE_ALLOCA_H - #include <alloca.h> -diff -urN xine-lib-1.2.4/src/video_out/video_out_aa.c xine-lib-1.2.4-patch/src/video_out/video_out_aa.c ---- xine-lib-1.2.4/src/video_out/video_out_aa.c 2013-09-18 13:04:54.000000000 +0300 -+++ xine-lib-1.2.4-patch/src/video_out/video_out_aa.c 2014-01-05 14:29:48.000000000 +0200 -@@ -32,7 +32,7 @@ - #include <fcntl.h> - #include <errno.h> - #include <sys/stat.h> --#include <sys/mman.h> -+#include <sys/mman-win32.h> - #include <sys/time.h> - - #ifdef HAVE_FFMPEG_AVUTIL_H -diff -urN xine-lib-1.2.4/src/video_out/video_out_caca.c xine-lib-1.2.4-patch/src/video_out/video_out_caca.c ---- xine-lib-1.2.4/src/video_out/video_out_caca.c 2013-09-18 13:04:54.000000000 +0300 -+++ xine-lib-1.2.4-patch/src/video_out/video_out_caca.c 2014-01-05 14:29:41.000000000 +0200 -@@ -32,7 +32,7 @@ - #include <fcntl.h> - #include <errno.h> - #include <sys/stat.h> --#include <sys/mman.h> -+#include <sys/mman-win32.h> - #include <sys/time.h> - #include <cucul.h> - #include <caca.h> -diff -urN xine-lib-1.2.4/src/video_out/video_out_fb.c xine-lib-1.2.4-patch/src/video_out/video_out_fb.c ---- xine-lib-1.2.4/src/video_out/video_out_fb.c 2013-09-18 13:04:54.000000000 +0300 -+++ xine-lib-1.2.4-patch/src/video_out/video_out_fb.c 2014-01-05 14:29:53.000000000 +0200 -@@ -60,7 +60,7 @@ - #include <sys/shm.h> - #include <sys/time.h> - #include <sys/ioctl.h> --#include <sys/mman.h> -+#include <sys/mman-win32.h> - - #include <pthread.h> - #include <netinet/in.h> -diff -urN xine-lib-1.2.4/src/video_out/video_out_pgx32.c xine-lib-1.2.4-patch/src/video_out/video_out_pgx32.c ---- xine-lib-1.2.4/src/video_out/video_out_pgx32.c 2013-09-18 13:04:54.000000000 +0300 -+++ xine-lib-1.2.4-patch/src/video_out/video_out_pgx32.c 2014-01-05 14:29:51.000000000 +0200 -@@ -34,7 +34,7 @@ - #include <unistd.h> - #include <sys/fbio.h> - #include <sys/visual_io.h> --#include <sys/mman.h> -+#include <sys/mman-win32.h> - - #include <X11/Xlib.h> - #include <X11/Xutil.h> -diff -urN xine-lib-1.2.4/src/video_out/video_out_pgx64.c xine-lib-1.2.4-patch/src/video_out/video_out_pgx64.c ---- xine-lib-1.2.4/src/video_out/video_out_pgx64.c 2013-09-18 13:04:54.000000000 +0300 -+++ xine-lib-1.2.4-patch/src/video_out/video_out_pgx64.c 2014-01-05 14:29:44.000000000 +0200 -@@ -36,7 +36,7 @@ - #include <unistd.h> - #include <sys/fbio.h> - #include <sys/visual_io.h> --#include <sys/mman.h> -+#include <sys/mman-win32.h> - - #include <X11/Xlib.h> - #include <X11/Xutil.h> -diff -urN xine-lib-1.2.4/src/xine-utils/xmlparser.c xine-lib-1.2.4-patch/src/xine-utils/xmlparser.c ---- xine-lib-1.2.4/src/xine-utils/xmlparser.c 2013-09-18 13:04:54.000000000 +0300 -+++ xine-lib-1.2.4-patch/src/xine-utils/xmlparser.c 2014-01-05 14:30:22.000000000 +0200 -@@ -879,7 +879,7 @@ - } - - #ifdef XINE_XML_PARSER_TEST --#include <sys/mman.h> -+#include <sys/mman-win32.h> - #include <sys/types.h> - #include <sys/stat.h> - #include <fcntl.h> -diff -urN xine-lib-1.2.4/win32/config.h xine-lib-1.2.4-patch/win32/config.h ---- xine-lib-1.2.4/win32/config.h 2012-02-05 21:17:03.000000000 +0200 -+++ xine-lib-1.2.4-patch/win32/config.h 2014-01-05 14:28:32.000000000 +0200 -@@ -273,7 +273,7 @@ - /* Define to 1 if you have the <sys/mixer.h> header file. */ - /* #undef HAVE_SYS_MIXER_H */ - --/* Define to 1 if you have the <sys/mman.h> header file. */ -+/* Define to 1 if you have the <sys/mman-win32.h> header file. */ - #define HAVE_SYS_MMAN_H 1 - - /* Define to 1 if you have the <sys/param.h> header file. */ -diff -urN xine-lib-1.2.4/win32/include/msvc/config.h xine-lib-1.2.4-patch/win32/include/msvc/config.h ---- xine-lib-1.2.4/win32/include/msvc/config.h 2009-11-30 23:26:06.000000000 +0200 -+++ xine-lib-1.2.4-patch/win32/include/msvc/config.h 2014-01-05 14:28:32.000000000 +0200 -@@ -425,7 +425,7 @@ - /* Define to 1 if you have the <sys/mixer.h> header file. */ - /* #undef HAVE_SYS_MIXER_H */ - --/* Define to 1 if you have the <sys/mman.h> header file. */ -+/* Define to 1 if you have the <sys/mman-win32.h> header file. */ - /* #undef HAVE_SYS_MMAN_H */ - - /* Define to 1 if you have the <sys/param.h> header file. */ diff --git a/src/xine-lib.mk b/src/xine-lib.mk deleted file mode 100644 index cff4b5b4..00000000 --- a/src/xine-lib.mk +++ /dev/null @@ -1,62 +0,0 @@ -# This file is part of MXE. -# See index.html for further information. - -PKG := xine-lib -$(PKG)_IGNORE := -$(PKG)_VERSION := 1.2.6 -$(PKG)_CHECKSUM := bd041d738817c7c0c6392a3c0e5bda5a664a47e035135b5a449364f8c9b6a005 -$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) -$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/xine/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) -$(PKG)_DEPS := gcc a52dec faad2 ffmpeg flac fontconfig freetype graphicsmagick \ - libcdio libiconv libmad libmng libmodplug libmpcdec mman-win32 \ - pthreads sdl speex theora vcdimager vorbis wavpack zlib - -define $(PKG)_UPDATE - $(WGET) -q -O- 'http://www.xine-project.org/releases' | \ - $(SED) -e 's,<a,\n<a,g' | \ - $(SED) -n 's,.*xine-lib-\([0-9][^"]*\)\.tar.*,\1,p' | \ - $(SORT) -V | \ - tail -1 -endef - -define $(PKG)_BUILD - # rebuild configure script as one of the patches modifies configure.ac - cd '$(1)' && autoreconf -fi - - cd '$(1)' && ./configure \ - --host='$(TARGET)' \ - --prefix='$(PREFIX)/$(TARGET)' \ - --enable-static \ - --disable-shared \ - --disable-mmap \ - --disable-nls \ - --disable-aalib \ - --enable-mng \ - --disable-real-codecs \ - --with-external-ffmpeg \ - --without-x \ - --with-sdl \ - --with-vorbis \ - --with-theora \ - --with-speex \ - --with-libflac \ - --with-freetype \ - --with-fontconfig \ - --without-alsa \ - --without-esound \ - --without-arts \ - --without-fusionsound \ - --with-internal-vcdlibs \ - --with-external-libfaad \ - --without-external-libdts \ - --with-wavpack \ - CFLAGS='-I$(1)/win32/include' \ - PTHREAD_LIBS='-lpthread -lws2_32' \ - LIBS="`$(TARGET)-pkg-config --libs libmng` -logg" - $(SED) -i 's,[\s^]*sed , $(SED) ,g' '$(1)/src/combined/ffmpeg/Makefile' - $(MAKE) -C '$(1)' -j '$(JOBS)' - $(MAKE) -C '$(1)' -j 1 install -endef - -$(PKG)_BUILD_SHARED = diff --git a/src/xmlrpc-c-1-fixes.patch b/src/xmlrpc-c-1-fixes.patch index f0f9efe8..30a75e4c 100644 --- a/src/xmlrpc-c-1-fixes.patch +++ b/src/xmlrpc-c-1-fixes.patch @@ -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. Index: stable/lib/curl_transport/curltransaction.c =================================================================== diff --git a/src/xmlrpc-c.mk b/src/xmlrpc-c.mk index 950fb2ad..f49f6d01 100644 --- a/src/xmlrpc-c.mk +++ b/src/xmlrpc-c.mk @@ -1,7 +1,7 @@ -# 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 := xmlrpc-c +$(PKG)_WEBSITE := https://xmlrpc-c.sourceforge.io/ $(PKG)_IGNORE := $(PKG)_VERSION := d4364f4 $(PKG)_CHECKSUM := fbd79d86020a87ed61dfdf00f78873c0fd925f477a8705f415b9fee0d6d64b19 diff --git a/src/xmlwrapp-1-va_list.patch b/src/xmlwrapp-1-va_list.patch index e94b1330..e7ef54e2 100644 --- a/src/xmlwrapp-1-va_list.patch +++ b/src/xmlwrapp-1-va_list.patch @@ -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. diff -ur xmlwrapp-0.7.0.orig/src/libxml/schema.cxx xmlwrapp-0.7.0/src/libxml/schema.cxx --- xmlwrapp-0.7.0.orig/src/libxml/schema.cxx 2013-03-16 12:29:12.000000000 +0100 diff --git a/src/xmlwrapp-2-boost.patch b/src/xmlwrapp-2-boost.patch index e20ffa8a..9bb96d78 100644 --- a/src/xmlwrapp-2-boost.patch +++ b/src/xmlwrapp-2-boost.patch @@ -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 a0dd623ec300ffe222d66388971f3325f5efa886 Mon Sep 17 00:00:00 2001 From: Mark Brand <mabrand@mabrand.nl> diff --git a/src/xmlwrapp.mk b/src/xmlwrapp.mk index 4cbfb287..68cc94bd 100644 --- a/src/xmlwrapp.mk +++ b/src/xmlwrapp.mk @@ -1,17 +1,17 @@ -# 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 := xmlwrapp +$(PKG)_WEBSITE := https://sourceforge.net/projects/xmlwrapp/ $(PKG)_IGNORE := $(PKG)_VERSION := 0.7.0 $(PKG)_CHECKSUM := 2d46234058270d878e7674f4ff9005a4ebd4e991162de9d1215d33d99fde37aa $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc boost libxml2 libxslt define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/projects/xmlwrapp/files/xmlwrapp/' | \ + $(WGET) -q -O- 'https://sourceforge.net/projects/xmlwrapp/files/xmlwrapp/' | \ $(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \ head -1 endef diff --git a/src/xorg-macros.mk b/src/xorg-macros.mk index a0af6326..6b6b8ed7 100644 --- a/src/xorg-macros.mk +++ b/src/xorg-macros.mk @@ -1,17 +1,18 @@ -# 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 := xorg-macros +$(PKG)_WEBSITE := https://cgit.freedesktop.org/xorg/util/macros/ +$(PKG)_DESCR := X.org utility macros $(PKG)_IGNORE := $(PKG)_VERSION := 1.19.0 $(PKG)_CHECKSUM := 2835b11829ee634e19fa56517b4cfc52ef39acea0cd82e15f68096e27cbed0ba $(PKG)_SUBDIR := util-macros-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://xorg.freedesktop.org/releases/individual/util/util-macros-$($(PKG)_VERSION).tar.bz2 +$(PKG)_URL := https://xorg.freedesktop.org/releases/individual/util/util-macros-$($(PKG)_VERSION).tar.bz2 $(PKG)_DEPS := define $(PKG)_UPDATE - $(WGET) -q -O- 'http://cgit.freedesktop.org/xorg/util/macros/refs/tags' | \ + $(WGET) -q -O- 'https://cgit.freedesktop.org/xorg/util/macros/refs/tags' | \ $(SED) -n "s,.*<a href='[^']*/tag/?id=util-macros-\\([0-9.]*\\)'.*,\\1,p" | \ $(SORT) -V | \ tail -1 diff --git a/src/xvidcore.mk b/src/xvidcore.mk index 323fd5f4..e6c8ea9c 100644 --- a/src/xvidcore.mk +++ b/src/xvidcore.mk @@ -1,11 +1,11 @@ -# 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 := xvidcore +$(PKG)_WEBSITE := https://www.xvid.com/ $(PKG)_IGNORE := -$(PKG)_VERSION := 1.3.3 -$(PKG)_CHECKSUM := 9e6bb7f7251bca4615c2221534d4699709765ff019ab0366609f219b0158499d -$(PKG)_SUBDIR := xvidcore/build/generic +$(PKG)_VERSION := 1.3.4 +$(PKG)_CHECKSUM := 4e9fd62728885855bc5007fe1be58df42e5e274497591fec37249e1052ae316f +$(PKG)_SUBDIR := xvidcore $(PKG)_FILE := xvidcore-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://downloads.xvid.org/downloads/$($(PKG)_FILE) $(PKG)_DEPS := gcc pthreads yasm @@ -17,22 +17,27 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - $(SED) -i 's,yasm_prog="yasm",yasm_prog="$(TARGET)-yasm",' '$(1)/configure.in' - cd '$(1)' && autoreconf -fi - cd '$(1)' && ./configure \ + $(SED) -i 's,yasm_prog="yasm",yasm_prog="$(TARGET)-yasm",' \ + '$(SOURCE_DIR)/build/generic/configure.in' + cd '$(SOURCE_DIR)/build/generic' && autoreconf -fi + cd '$(SOURCE_DIR)/build/generic' && ./configure \ $(MXE_CONFIGURE_OPTS) - $(MAKE) -C '$(1)' -j 1 BUILD_DIR='build' $(if $(BUILD_STATIC),SHARED,STATIC)_LIB= + $(MAKE) -C '$(SOURCE_DIR)/build/generic' -j 1 BUILD_DIR='$(BUILD_DIR)' \ + $(if $(BUILD_STATIC),SHARED,STATIC)_LIB= $(INSTALL) -d '$(PREFIX)/$(TARGET)/include' - $(INSTALL) -m644 '$(1)/../../src/xvid.h' '$(PREFIX)/$(TARGET)/include/' + $(INSTALL) -m644 '$(SOURCE_DIR)/src/xvid.h' '$(PREFIX)/$(TARGET)/include/' $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' '$(PREFIX)/$(TARGET)/bin' - $(INSTALL) -m644 '$(1)/build/xvidcore.$(LIB_SUFFIX)' '$(PREFIX)/$(TARGET)/$(if $(BUILD_STATIC),lib,bin)/' + $(INSTALL) -m644 '$(BUILD_DIR)/xvidcore.$(LIB_SUFFIX)' \ + '$(PREFIX)/$(TARGET)/$(if $(BUILD_STATIC),lib,bin)/' $(if $(BUILD_STATIC), \ ln -sf '$(PREFIX)/$(TARGET)/lib/xvidcore.$(LIB_SUFFIX)' '$(PREFIX)/$(TARGET)/lib/libxvidcore.$(LIB_SUFFIX)', \ - mv '$(1)/build/xvidcore.dll.a' '$(1)/build/libxvidcore.dll.a' && \ - $(INSTALL) -m644 '$(1)/build/libxvidcore.dll.a' '$(PREFIX)/$(TARGET)/lib/') + mv '$(BUILD_DIR)/xvidcore.dll.a' '$(BUILD_DIR)/libxvidcore.dll.a' && \ + $(INSTALL) -m644 '$(BUILD_DIR)/libxvidcore.dll.a' '$(PREFIX)/$(TARGET)/lib/' + ) endef define $(PKG)_BUILD_x86_64-w64-mingw32 - $(SED) -i 's,yasm_prog="yasm",yasm_prog="$(TARGET)-yasm -DNO_PREFIX",' '$(1)/configure.in' + $(SED) -i 's,yasm_prog="yasm",yasm_prog="$(TARGET)-yasm -DNO_PREFIX",' \ + '$(SOURCE_DIR)/build/generic/configure.in' $($(PKG)_BUILD) endef diff --git a/src/xxhash-1-fixes.patch b/src/xxhash-1-fixes.patch new file mode 100644 index 00000000..c7ae4ac7 --- /dev/null +++ b/src/xxhash-1-fixes.patch @@ -0,0 +1,47 @@ +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: Wed, 6 Jul 2016 22:12:35 +0200 +Subject: [PATCH] install .dll to bin/ instead of lib/ + +Add cmake option BUILD_SHARED_LIBS to prevent building shared library +on static target. + +diff --git a/cmake_unofficial/CMakeLists.txt b/cmake_unofficial/CMakeLists.txt +index 1111111..2222222 100644 +--- a/cmake_unofficial/CMakeLists.txt ++++ b/cmake_unofficial/CMakeLists.txt +@@ -6,11 +6,14 @@ project(xxhash) + set(XXHASH_LIB_VERSION "0.42.0") + set(XXHASH_LIB_SOVERSION "0") + +-add_library(xxhash SHARED ../xxhash.c) +-set_target_properties(xxhash PROPERTIES COMPILE_DEFINITIONS "XXHASH_EXPORT" +- VERSION "${XXHASH_LIB_VERSION}" +- SOVERSION "${XXHASH_LIB_SOVERSION}") +-set(install_libs xxhash) ++set(BUILD_SHARED_LIBS ON CACHE BOOL "Set to ON to build shared libraries") ++if(BUILD_SHARED_LIBS) ++ add_library(xxhash SHARED ../xxhash.c) ++ set_target_properties(xxhash PROPERTIES COMPILE_DEFINITIONS "XXHASH_EXPORT" ++ VERSION "${XXHASH_LIB_VERSION}" ++ SOVERSION "${XXHASH_LIB_SOVERSION}") ++ LIST(APPEND install_libs xxhash) ++endif(BUILD_SHARED_LIBS) + + set(BUILD_STATIC_LIBS ON CACHE BOOL "Set to ON to build static libraries") + if(BUILD_STATIC_LIBS) +@@ -21,4 +24,9 @@ endif(BUILD_STATIC_LIBS) + + + INSTALL(FILES ../xxhash.h DESTINATION include) +-INSTALL(TARGETS ${install_libs} DESTINATION lib) ++INSTALL( ++ TARGETS ${install_libs} ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++) diff --git a/src/xxhash-test.c b/src/xxhash-test.c new file mode 100644 index 00000000..b0649ea0 --- /dev/null +++ b/src/xxhash-test.c @@ -0,0 +1,11 @@ +/* + * This file is part of MXE. See LICENSE.md for licensing information. + */ + +#include <xxhash.h> + +int main() { + XXH32_state_t* state = XXH32_createState(); + XXH32_freeState(state); + return 0; +} diff --git a/src/xxhash.mk b/src/xxhash.mk new file mode 100644 index 00000000..56d42a72 --- /dev/null +++ b/src/xxhash.mk @@ -0,0 +1,37 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := xxhash +$(PKG)_WEBSITE := https://cyan4973.github.io/xxHash/ +$(PKG)_DESCR := xxHash +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.6.1 +$(PKG)_CHECKSUM := a940123baa6c71b75b6c02836bae2155cd2f74f7682e1a1d6f7b889f7bc9e7f8 +$(PKG)_SUBDIR := xxHash-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://github.com/Cyan4973/xxHash/archive/v$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := gcc + +define $(PKG)_UPDATE + $(call MXE_GET_GITHUB_TAGS, Cyan4973/xxHash) | \ + $(SED) 's,^v,,g' +endef + +define $(PKG)_BUILD + mkdir '$(1).build' + cd '$(1).build' && '$(TARGET)-cmake' '$(1)/cmake_unofficial' + $(MAKE) -C '$(1).build' -j '$(JOBS)' + $(MAKE) -C '$(1).build' -j 1 install + + # create pkg-config files + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' + (echo 'Name: $(PKG)'; \ + echo 'Version: $($(PKG)_VERSION)'; \ + echo 'Description: xxHash'; \ + echo 'Libs: -lxxhash';) \ + > '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc' + + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' $(PKG) --cflags --libs` +endef diff --git a/src/xz.mk b/src/xz.mk index db69a22f..153edf7f 100644 --- a/src/xz.mk +++ b/src/xz.mk @@ -1,17 +1,18 @@ -# 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 := xz +$(PKG)_WEBSITE := https://tukaani.org/xz/ +$(PKG)_DESCR := XZ $(PKG)_IGNORE := -$(PKG)_VERSION := 5.2.2 -$(PKG)_CHECKSUM := 73df4d5d34f0468bd57d09f2d8af363e95ed6cc3a4a86129d2f2c366259902a2 +$(PKG)_VERSION := 5.2.3 +$(PKG)_CHECKSUM := 71928b357d0a09a12a4b4c5fafca8c31c19b0e7d3b8ebb19622e96f26dbf28cb $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://tukaani.org/xz/$($(PKG)_FILE) +$(PKG)_URL := https://tukaani.org/xz/$($(PKG)_FILE) $(PKG)_DEPS := gcc define $(PKG)_UPDATE - $(WGET) -q -O- 'http://tukaani.org/xz/' | \ + $(WGET) -q -O- 'https://tukaani.org/xz/' | \ $(SED) -n 's,.*xz-\([0-9][^>]*\)\.tar.*,\1,p' | \ head -1 endef diff --git a/src/yaml-cpp-1-fixes.patch b/src/yaml-cpp-1-fixes.patch new file mode 100644 index 00000000..436af6f0 --- /dev/null +++ b/src/yaml-cpp-1-fixes.patch @@ -0,0 +1,28 @@ +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, 16 Jul 2016 00:24:39 +0200 +Subject: [PATCH] generate .pc file on MinGW + +Install to lib/pkgconfig, not to bin/pkgconfig. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1111111..2222222 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -317,10 +317,10 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config.cmake.in + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config-version.cmake.in + "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake" @ONLY) + +-if(UNIX) ++if(UNIX OR MINGW) + set(PC_FILE ${CMAKE_BINARY_DIR}/yaml-cpp.pc) + configure_file("yaml-cpp.pc.cmake" ${PC_FILE} @ONLY) +- install(FILES ${PC_FILE} DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) ++ install(FILES ${PC_FILE} DESTINATION lib/pkgconfig) + endif() + + diff --git a/src/yaml-cpp-test.cpp b/src/yaml-cpp-test.cpp new file mode 100644 index 00000000..2b91ba45 --- /dev/null +++ b/src/yaml-cpp-test.cpp @@ -0,0 +1,8 @@ +#include <assert.h> +#include <yaml-cpp/yaml.h> + +int main() { + YAML::Node node = YAML::Load("[1, 2, 3]"); + assert(node.IsSequence()); + return 0; +} diff --git a/src/yaml-cpp.mk b/src/yaml-cpp.mk new file mode 100644 index 00000000..68797d1c --- /dev/null +++ b/src/yaml-cpp.mk @@ -0,0 +1,27 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := yaml-cpp +$(PKG)_WEBSITE := https://github.com/jbeder/yaml-cpp +$(PKG)_DESCR := A YAML parser and emitter for C++ +$(PKG)_IGNORE := +$(PKG)_VERSION := 0.5.3 +$(PKG)_CHECKSUM := ac50a27a201d16dc69a881b80ad39a7be66c4d755eda1f76c3a68781b922af8f +$(PKG)_SUBDIR := $(PKG)-release-$($(PKG)_VERSION) +$(PKG)_FILE := yaml-cpp-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://github.com/jbeder/yaml-cpp/archive/release-$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := gcc boost + +define $(PKG)_UPDATE + $(call MXE_GET_GITHUB_TAGS, jbeder/yaml-cpp, \(yaml-cpp-\|release-\)) +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 + + '$(TARGET)-g++' \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' $(PKG) --cflags --libs` +endef diff --git a/src/yasm.mk b/src/yasm.mk index 92c4c908..6b67de80 100644 --- a/src/yasm.mk +++ b/src/yasm.mk @@ -1,12 +1,13 @@ -# 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 := yasm +$(PKG)_WEBSITE := http://yasm.tortall.net/ +$(PKG)_DESCR := Yasm $(PKG)_VERSION := 1.3.0 $(PKG)_CHECKSUM := 3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := http://www.tortall.net/projects/$(PKG)/releases/$($(PKG)_FILE) +$(PKG)_URL := https://www.tortall.net/projects/$(PKG)/releases/$($(PKG)_FILE) $(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) $(PKG)_DEPS := gcc @@ -20,7 +21,7 @@ endef define $(PKG)_BUILD # link to native yasm compiler on cross builds - $(if $(call sne,$(TARGET),$(BUILD)), + $(if $(BUILD_CROSS), ln -sf '$(PREFIX)/$(BUILD)/bin/yasm' '$(PREFIX)/bin/$(TARGET)-yasm') # yasm is always static diff --git a/src/zlib-1-win32-static.patch b/src/zlib-1-win32-static.patch index d5ac5c88..b07581f4 100644 --- a/src/zlib-1-win32-static.patch +++ b/src/zlib-1-win32-static.patch @@ -1,12 +1,35 @@ -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. -Contains ad hoc patches for cross building. +From 2de67e2eedc9bd458c1e5170ae43d815b466f012 Mon Sep 17 00:00:00 2001 +From: Volker Grabsch <vog@notjusthosting.com> +Date: Sun, 15 Jan 2017 16:10:19 +0100 +Subject: [PATCH] build fix for mxe static -diff -urN a/configure b/configure ---- a/configure 2013-03-24 06:30:09.000000000 +0100 -+++ b/configure 2013-04-29 12:19:25.526304670 +0200 -@@ -191,10 +191,7 @@ + +diff --git a/Makefile.in b/Makefile.in +index 1852192..c88f5b5 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -310,12 +310,12 @@ install-libs: $(LIBS) + -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi + -@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi + rm -f $(DESTDIR)$(libdir)/$(STATICLIB) +- cp $(STATICLIB) $(DESTDIR)$(libdir) ++ [ -z '$(STATICLIB)' ] || cp $(STATICLIB) $(DESTDIR)$(libdir) + chmod 644 $(DESTDIR)$(libdir)/$(STATICLIB) + -@($(RANLIB) $(DESTDIR)$(libdir)/libz.a || true) >/dev/null 2>&1 + -@if test -n "$(SHAREDLIBV)"; then \ + rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV); \ +- cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir); \ ++ [ -z '$(SHAREDLIBV)' ] || cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir); \ + echo "cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)"; \ + chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV); \ + echo "chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV)"; \ +diff --git a/configure b/configure +index e974d1f..f023947 100755 +--- a/configure ++++ b/configure +@@ -215,10 +215,7 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then CYGWIN* | Cygwin* | cygwin* | OS/2*) EXE='.exe' ;; MINGW* | mingw*) @@ -17,20 +40,6 @@ diff -urN a/configure b/configure LDSHARED=${LDSHARED-"$cc -shared"} LDSHAREDLIBC="" EXE='.exe' ;; -diff -urN a/Makefile.in b/Makefile.in ---- a/Makefile.in 2013-04-29 00:57:11.000000000 +0200 -+++ b/Makefile.in 2013-04-29 12:16:08.631379491 +0200 -@@ -190,11 +190,11 @@ - -@if [ ! -d $(DESTDIR)$(sharedlibdir) ]; then mkdir -p $(DESTDIR)$(sharedlibdir); fi - -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi - -@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi -- cp $(STATICLIB) $(DESTDIR)$(libdir) -+ [ -z '$(STATICLIB)' ] || cp $(STATICLIB) $(DESTDIR)$(libdir) - chmod 644 $(DESTDIR)$(libdir)/$(STATICLIB) - -@($(RANLIB) $(DESTDIR)$(libdir)/libz.a || true) >/dev/null 2>&1 - -@if test -n "$(SHAREDLIBV)"; then \ -- cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir); \ -+ [ -z '$(SHAREDLIBV)' ] || cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir); \ - echo "cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)"; \ - chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV); \ - echo "chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV)"; \ +-- +2.9.3 + diff --git a/src/zlib.mk b/src/zlib.mk index 860709c1..8cb7833b 100644 --- a/src/zlib.mk +++ b/src/zlib.mk @@ -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 := zlib +$(PKG)_WEBSITE := https://zlib.net/ $(PKG)_IGNORE := -$(PKG)_VERSION := 1.2.8 -$(PKG)_CHECKSUM := 831df043236df8e9a7667b9e3bb37e1fcb1220a0f163b6de2626774b9590d057 +$(PKG)_VERSION := 1.2.11 +$(PKG)_CHECKSUM := 4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066 $(PKG)_SUBDIR := zlib-$($(PKG)_VERSION) $(PKG)_FILE := zlib-$($(PKG)_VERSION).tar.xz -$(PKG)_URL := http://zlib.net/$($(PKG)_FILE) -$(PKG)_URL_2 := http://$(SOURCEFORGE_MIRROR)/project/libpng/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://zlib.net/$($(PKG)_FILE) +$(PKG)_URL_2 := https://$(SOURCEFORGE_MIRROR)/project/libpng/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc +$(PKG)_DEPS_$(BUILD) := +$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) define $(PKG)_UPDATE - $(WGET) -q -O- 'http://zlib.net/' | \ + $(WGET) -q -O- 'https://zlib.net/' | \ $(SED) -n 's,.*zlib-\([0-9][^>]*\)\.tar.*,\1,ip' | \ head -1 endef diff --git a/src/zziplib-1-fix-mmap.patch b/src/zziplib-1-fix-mmap.patch index f95a6917..d2a4125a 100644 --- a/src/zziplib-1-fix-mmap.patch +++ b/src/zziplib-1-fix-mmap.patch @@ -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. This patch has been taken from: http://sourceforge.net/tracker/?func=detail&aid=2995373&group_id=6389&atid=306389 diff --git a/src/zziplib.mk b/src/zziplib.mk index dcc37a71..6ae260b2 100644 --- a/src/zziplib.mk +++ b/src/zziplib.mk @@ -1,17 +1,18 @@ -# 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 := zziplib +$(PKG)_WEBSITE := https://zziplib.sourceforge.io/ +$(PKG)_DESCR := ZZIPlib $(PKG)_IGNORE := $(PKG)_VERSION := 0.13.62 $(PKG)_CHECKSUM := a1b8033f1a1fd6385f4820b01ee32d8eca818409235d22caf5119e0078c7525b $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 -$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)$(word 2,$(subst ., ,$($(PKG)_VERSION)))/$($(PKG)_VERSION)/$($(PKG)_FILE) +$(PKG)_URL := https://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)$(word 2,$(subst ., ,$($(PKG)_VERSION)))/$($(PKG)_VERSION)/$($(PKG)_FILE) $(PKG)_DEPS := gcc zlib define $(PKG)_UPDATE - $(WGET) -q -O- 'http://sourceforge.net/p/zziplib/svn/HEAD/tree/tags/' | \ + $(WGET) -q -O- 'https://sourceforge.net/p/zziplib/svn/HEAD/tree/tags/' | \ $(SED) -n 's,.*<a href="V_\([0-9][^"]*\)">.*,\1,p' | \ tr '_' '.' | \ $(SORT) -V | \ @@ -21,14 +22,12 @@ endef define $(PKG)_BUILD # don't build and install docs (echo '# DISABLED'; echo 'all:'; echo 'install:') > '$(1)/docs/Makefile.in' + # mman-win32 is only a partial implementation cd '$(1)' && ./configure \ - --host='$(TARGET)' \ - --disable-shared \ - --prefix='$(PREFIX)/$(TARGET)' \ + $(MXE_CONFIGURE_OPTS) \ + --disable-mmap \ CFLAGS="-O -ggdb" \ PKG_CONFIG='$(TARGET)-pkg-config' - $(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= + $(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= LDFLAGS="-no-undefined" $(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= endef - -$(PKG)_BUILD_SHARED = diff --git a/tools/backup_from_s3.py b/tools/backup_from_s3.py new file mode 100755 index 00000000..7f514130 --- /dev/null +++ b/tools/backup_from_s3.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python + +""" Download MXE packages from https://s3.amazonaws.com/mxe-pkg/ +""" + +import argparse +import hashlib +import os +import urllib +try: + import urllib2 +except: + # Python 3 + import urllib.request as urllib2 +import xml.etree.ElementTree + +def get_files(): + x = xml.etree.ElementTree.fromstring( + urllib2.urlopen("https://s3.amazonaws.com/mxe-pkg/").read() + ) + for e in x: + if not e.tag.endswith('Contents'): + continue + filename = None + md5 = None + for child in e.getchildren(): + if child.tag.endswith('Key'): + filename = child.text + if child.tag.endswith('ETag'): + md5 = child.text.replace('"', '') + if '-' in md5: + md5 = None + yield { + 'filename': filename, + 'md5': md5, + } + +def download_files(backup_dir, files): + for f in files: + url = "https://s3.amazonaws.com/mxe-pkg/%s" % ( + urllib.quote(f['filename']) + ) + data = urllib2.urlopen(url).read() + if f['md5']: + md5 = hashlib.md5(data).hexdigest() + if md5 != f['md5']: + raise Exception("md5 mismatch for " + f['filename']) + sha256 = hashlib.sha256(data).hexdigest() + name = f['filename'] + '_' + sha256 + full_name = os.path.join(backup_dir, name) + if os.path.exists(full_name): + print("File %s is already backuped" % name) + continue + print("Backup file %s" % name) + with open(full_name, 'w') as f: + f.write(data) + +def main(): + parser = argparse.ArgumentParser( + description=__doc__, + formatter_class=argparse.ArgumentDefaultsHelpFormatter, + ) + parser.add_argument( + '--backup-dir', + type=str, + help='Path to backup', + required=True, + ) + args = parser.parse_args() + files = get_files() + download_files(args.backup_dir, files) + +if __name__ == '__main__': + main() diff --git a/tools/build-pkg.lua b/tools/build-pkg.lua index d39dec11..e898727f 100755 --- a/tools/build-pkg.lua +++ b/tools/build-pkg.lua @@ -1,53 +1,65 @@ #!/usr/bin/env lua --[[ -This file is part of MXE. -See index.html for further information. +This file is part of MXE. See LICENSE.md for licensing information. build-pkg, Build binary packages from MXE packages -Instructions: http://mxe.redjohn.tk +Instructions: http://pkg.mxe.cc -Requirements: MXE, lua, tsort, fakeroot, dpkg-deb. +Requirements: MXE, lua, fakeroot, dpkg-deb. Usage: lua tools/build-pkg.lua Packages are written to `*.tar.xz` files. Debian packages are written to `*.deb` files. Build in directory /usr/lib/mxe -This directory can not be changed in .deb packages -To change this directory, set environment variable -MXE_DIR to other directory. +This directory can not be changed in .deb packages. To prevent build-pkg from creating deb packages, -set environment variable MXE_NO_DEBS to 1 +set environment variable MXE_BUILD_PKG_NO_DEBS to 1 In this case fakeroot and dpkg-deb are not needed. +To switch off the second pass, set +MXE_BUILD_PKG_NO_SECOND_PASS to 1. +See https://github.com/mxe/mxe/issues/1111 + To limit number of packages being built to x, -set environment variable MXE_MAX_ITEMS to x, +set environment variable MXE_BUILD_PKG_MAX_ITEMS to x. + +To set list of MXE targets to build, +set environment variable MXE_BUILD_PKG_TARGETS to +the list of targets separated by space. +By default, all 4 major targets are built. The following error: > fakeroot, while creating message channels: Invalid argument > This may be due to a lack of SYSV IPC support. > fakeroot: error while starting the `faked' daemon. can be caused by leaked ipc resources originating in fakeroot. -How to remove them: http://stackoverflow.com/a/4262545 +How to remove them: https://stackoverflow.com/a/4262545 ]] -local max_items = tonumber(os.getenv('MXE_MAX_ITEMS')) -local no_debs = os.getenv('MXE_NO_DEBS') +local max_items = tonumber(os.getenv('MXE_BUILD_PKG_MAX_ITEMS')) +local no_debs = os.getenv('MXE_BUILD_PKG_NO_DEBS') +local no_second_pass = os.getenv('MXE_BUILD_PKG_NO_SECOND_PASS') +local build_targets = os.getenv('MXE_BUILD_PKG_TARGETS') local TODAY = os.date("%Y%m%d") -local MXE_DIR = os.getenv('MXE_DIR') or '/usr/lib/mxe' +local MAX_TRIES = 10 local GIT = 'git --work-tree=./usr/ --git-dir=./usr/.git ' +local GIT_USER = '-c user.name="build-pkg" ' .. + '-c user.email="build-pkg@mxe" ' local BLACKLIST = { '^usr/installed/check%-requirements$', - -- usr/share/cmake if useful + -- usr/share/cmake is useful '^usr/share/doc/', '^usr/share/info/', '^usr/share/man/', '^usr/share/gcc', + '^usr/share/gtk-doc', + '^usr/lib/nonetwork.so', '^usr/[^/]+/share/doc/', '^usr/[^/]+/share/info/', } @@ -58,9 +70,16 @@ local TARGETS = { 'i686-w64-mingw32.shared', 'x86_64-w64-mingw32.shared', } +if build_targets then + TARGETS = {} + for target in build_targets:gmatch('(%S+)') do + table.insert(TARGETS, target) + end +end local function echo(fmt, ...) print(fmt:format(...)) + io.stdout:flush() end local function log(fmt, ...) @@ -116,6 +135,16 @@ local function sliceArray(list, nelements) return new_list end +local function concatArrays(...) + local result = {} + for _, array in ipairs({...}) do + for _, elem in ipairs(array) do + table.insert(result, elem) + end + end + return result +end + local function isInString(substring, string) return string:find(substring, 1, true) end @@ -136,6 +165,8 @@ local function execute(cmd) end end +local MXE_DIR = trim(shell('pwd')) + -- for tar, try gtar and gnutar first local tools = {} local function tool(name) @@ -162,6 +193,10 @@ local function fileExists(name) end end +local function isSymlink(name) + return shell(("ls -l %q"):format(name)):sub(1, 1) == "l" +end + local function writeFile(filename, data) local file = io.open(filename, 'w') file:write(data) @@ -173,14 +208,22 @@ local function isCross(target) return target ~= NATIVE_TARGET end -local cmd = "dpkg-architecture -qDEB_BUILD_ARCH 2> /dev/null" -local ARCH = trim(shell(cmd)) +local function getArch() + local cmd = "dpkg-architecture -qDEB_BUILD_ARCH 2> /dev/null" + return trim(shell(cmd)) +end +local ARCH = getArch() -- return target and package from item name local function parseItem(item) return item:match("([^~]+)~([^~]+)") end +-- return item name from target and package +local function makeItem(target, package) + return target .. '~' .. package +end + -- return several tables describing packages for all targets -- * list of items -- * map from item to list of deps (which are also items) @@ -219,31 +262,115 @@ local function getItems() return items, item2deps, item2ver end +local function getInstalled() + local installed = {} + local f = io.popen('ls usr/*/installed/*') + local pattern = '/([^/]+)/installed/([^/]+)' + for file in f:lines() do + local target, pkg = assert(file:match(pattern)) + table.insert(installed, makeItem(target, pkg)) + end + f:close() + return installed +end + +-- graph is a map from item to a list of destinations +local function transpose(graph) + local transposed = {} + for item, destinations in pairs(graph) do + for _, dest in ipairs(destinations) do + if not transposed[dest] then + transposed[dest] = {} + end + table.insert(transposed[dest], item) + end + end + return transposed +end + +local function reverse(list) + local n = #list + local reversed = {} + for i = 1, n do + reversed[i] = list[n - i + 1] + end + return reversed +end + -- return items ordered in build order -- this means, if item depends on item2, then -- item2 preceeds item1 in the list local function sortForBuild(items, item2deps) - -- use sommand tsort - local tsort_input_fname = os.tmpname() - local tsort_input = io.open(tsort_input_fname, 'w') - for _, item1 in ipairs(items) do - for _, item2 in ipairs(item2deps[item1]) do - tsort_input:write(item2 .. ' ' .. item1 .. '\n') + local n = #items + local item2followers = transpose(item2deps) + -- Tarjan's algorithm + -- https://en.wikipedia.org/wiki/Topological_sorting + local build_list_reversed = {} + local marked_permanently = {} + local marked_temporarily = {} + local function visit(item1) + assert(not marked_temporarily[item1], 'not a DAG') + if not marked_permanently[item1] then + marked_temporarily[item1] = true + local followers = item2followers[item1] or {} + for _, item2 in ipairs(followers) do + visit(item2) + end + marked_permanently[item1] = true + marked_temporarily[item1] = false + table.insert(build_list_reversed, item1) end end - tsort_input:close() - -- - local build_list = {} - local tsort = io.popen('tsort ' .. tsort_input_fname, 'r') - for line in tsort:lines() do - local item = trim(line) - table.insert(build_list, item) + for _, item in ipairs(items) do + if not marked_permanently[item] then + visit(item) + end end - tsort:close() - os.remove(tsort_input_fname) + assert(#build_list_reversed == n) + local build_list = reverse(build_list_reversed) + assert(#build_list == n) return build_list end +local function isDependency(item, dependency, item2deps) + for _, dep in ipairs(item2deps[item]) do + if dep == dependency then + return true + end + if isDependency(dep, dependency, item2deps) then + return true + end + end + return false +end + +local function makeItem2Index(build_list) + local item2index = {} + for index, item in ipairs(build_list) do + assert(not item2index[item], 'Duplicate item') + item2index[item] = index + end + return item2index +end + +-- return if build_list is ordered topologically +local function isTopoOrdered(build_list, items, item2deps) + if #build_list ~= #items then + return false, 'Length of build_list is wrong' + end + local item2index = makeItem2Index(build_list) + for item, deps in pairs(item2deps) do + for _, dep in ipairs(deps) do + if item2index[item] < item2index[dep] then + return false, 'Item ' .. item .. + 'is built before its dependency ' .. + dep + end + end + end + return true +end + local function isListed(file, list) for _, pattern in ipairs(list) do if file:match(pattern) then @@ -257,25 +384,96 @@ local function isBlacklisted(file) return isListed(file, BLACKLIST) end +local GIT_INITIAL = 'initial' +local GIT_ALL_PSEUDOITEM = 'all' + +local function itemToBranch(item, pass) + return pass .. '-' .. item:gsub('~', '_') +end + -- creates git repo in ./usr local function gitInit() os.execute('mkdir -p ./usr') os.execute(GIT .. 'init --quiet') end +local function gitTag(name) + os.execute(GIT .. 'tag ' .. name) +end + +local function gitConflicts() + local cmd = GIT .. 'diff --name-only --diff-filter=U' + local f = io.popen(cmd, 'r') + local conflicts = {} + for conflict in f:lines() do + table.insert(conflicts, conflict) + end + f:close() + return conflicts +end + +-- git commits changes in ./usr +local function gitCommit(message) + local cmd = GIT .. GIT_USER .. 'commit -a -m %q --quiet' + assert(execute(cmd:format(message))) +end + +local function gitCheckout(new_branch, deps, item2index, pass_of_deps) + local main_dep = deps[1] + if main_dep then + main_dep = itemToBranch(main_dep, pass_of_deps) + else + main_dep = GIT_INITIAL + end + local cmd = '%s checkout -q -b %s %s' + assert(execute(cmd:format(GIT, new_branch, main_dep))) + -- merge with other dependencies + for i = 2, #deps do + local message = 'Merge with ' .. deps[i] + local cmd2 = '%s %s merge -q %s -m %q' + if not execute(cmd2:format(GIT, + GIT_USER, + itemToBranch(deps[i], pass_of_deps), + message)) + then + -- probably merge conflict + local conflicts = table.concat(gitConflicts(), ' ') + log('Merge conflicts: %s', conflicts) + local cmd3 = '%s checkout --ours %s' + assert(execute(cmd3:format(GIT, conflicts))) + gitCommit(message) + end + end + if #deps > 0 then + -- prevent accidental rebuilds + -- touch usr/*/installed/* files in build order + -- see https://git.io/vuDJY + local installed = getInstalled() + table.sort(installed, function(x, y) + return item2index[x] < item2index[y] + end) + for _, item in ipairs(installed) do + local target, pkg = assert(parseItem(item)) + local cmd4 = 'touch -c usr/%s/installed/%s' + execute(cmd4:format(target, pkg)) + end + end +end + local function gitAdd() - os.execute(GIT .. 'add .') + os.execute(GIT .. 'add --all --force .') end -- return two lists of filepaths under ./usr/ -- 1. new files -- 2. changed files -local function gitStatus() +local function gitStatus(item, item2deps, file2item) local new_files = {} local changed_files = {} local git_st = io.popen(GIT .. 'status --porcelain', 'r') for line in git_st:lines() do local status, file = line:match('(..) (.*)') + assert(status:sub(2, 2) == ' ') status = trim(status) if file:sub(1, 1) == '"' then -- filename with a space is quoted by git @@ -283,7 +481,23 @@ local function gitStatus() end file = 'usr/' .. file if not fileExists(file) then - log('Missing file: %q', file) + if status == 'D' then + local prev_owner = assert(file2item[file]) + if prev_owner == item then + log('Item %s removed %q installed by itself', + item, file) + elseif isDependency(prev_owner, item, item2deps) then + log('Item %s removed %q installed by its follower %s', + item, file, prev_owner) + else + log('Item %s removed %q installed by %s', + item, file, prev_owner) + end + elseif isSymlink(file) then + log('Broken symlink: %q', file) + else + log('Missing file: %q', file) + end elseif not isBlacklisted(file) then if status == 'A' then table.insert(new_files, file) @@ -299,14 +513,6 @@ local function gitStatus() return new_files, changed_files end --- git commits changes in ./usr -local function gitCommit(message) - local cmd = GIT .. '-c user.name="build-pkg" ' .. - '-c user.email="build-pkg@mxe" ' .. - 'commit -a -m %q --quiet' - os.execute(cmd:format(message)) -end - local function isValidBinary(target, file) local cmd = './usr/bin/%s-objdump -t %s > /dev/null 2>&1' return execute(cmd:format(target, file)) @@ -318,9 +524,7 @@ local function checkFile(file, item) local ext = file:sub(-4):lower() local cmd = 'file --dereference --brief %q' local file_type = trim(shell(cmd:format(file))) - if ext == '.bin' then - -- can be an executable or something else (font) - elseif ext == '.exe' then + if ext == '.exe' then if not file_type:match('PE32') then log('File %s (%s) is %q. Remove .exe', file, item, file_type) @@ -330,7 +534,8 @@ local function checkFile(file, item) log('File %s (%s) is %q. Remove .dll', file, item, file_type) end - else + elseif ext ~= '.bin' then + -- .bin can be an executable or something else (font) if file_type:match('PE32') then log('File %s (%s) is %q. Add exe or dll', file, item, file_type) @@ -356,17 +561,132 @@ local function checkFile(file, item) end end +local function checkFileList(files, item) + local target, _ = parseItem(item) + if target:match('shared') then + local has_a, has_dll + for _, file in ipairs(files) do + file = file:lower() + if file:match('%.a') then + has_a = true + end + if file:match('%.dll') then + has_dll = true + end + end + if has_a and not has_dll then + log('Shared item %s installs .a file ' .. + 'but no .dll', item) + end + end +end + +local function removeEmptyDirs(item) + -- removing an empty dir can reveal another one (parent) + -- don't pass item to mute the log message + local go_on = true + while go_on do + go_on = false + local f = io.popen('find usr/* -empty -type d', 'r') + for dir in f:lines() do + if item then + log("Remove empty directory %s created by %s", + dir, item) + end + os.remove(dir) + go_on = true + end + f:close() + end +end + +local function prepareTree(pass, item, item2deps, prev_files, item2index) + if pass == 'first' then + gitCheckout( + itemToBranch(item, pass), + item2deps[item], + item2index, + pass + ) + elseif pass == 'second' then + -- Build item second time to check if it builds correctly if + -- its followers and unrelated packages have been built. + gitCheckout( + itemToBranch(item, 'second'), + {GIT_ALL_PSEUDOITEM}, + item2index, + 'first' + ) + removeEmptyDirs() + if prev_files then + -- Remove files of item from previous build. + for _, file in ipairs(prev_files) do + os.remove(file) + end + gitAdd() + gitCommit(("Remove %s to rebuild it"):format(item, pass)) + end + else + error("Unknown pass: " .. pass) + end +end + +local function comparePasses(item, new_files, prev_file2item, prev_files) + local files_set = {} + for _, file in ipairs(new_files) do + if not prev_file2item[file] then + log('Item %s installs a file on second pass only: %s', + item, file) + elseif prev_file2item[file] ~= item then + log('File %s was installed by %s on first pass ' .. + 'and by %s - on the second pass', + file, prev_file2item[file], item) + end + files_set[file] = true + end + if prev_files then + -- prev_files is nil, if the first pass failed + for _, file in ipairs(prev_files) do + if not files_set[file] then + log('Item %s installs a file on first pass only: %s', + item, file) + end + end + end + -- TODO compare contents of files (nm for binaries) +end + +local function isBuilt(item, files) + local target, pkg = parseItem(item) + local INSTALLED = 'usr/%s/installed/%s' + local installed = INSTALLED:format(target, pkg) + for _, file in ipairs(files) do + if file == installed then + return true + end + end + return false +end + -- builds package, returns list of new files -local function buildItem(item, item2deps, file2item) +-- prev_files is passed only to second pass. +local function buildItem(item, item2deps, file2item, item2index, pass, prev_files) + prepareTree(pass, item, item2deps, prev_files, item2index) local target, pkg = parseItem(item) local cmd = '%s %s MXE_TARGETS=%s --jobs=1' os.execute(cmd:format(tool 'make', pkg, target)) gitAdd() - local new_files, changed_files = gitStatus() - gitCommit(("Build %s"):format(item)) - for _, file in ipairs(new_files) do - checkFile(file, item) - file2item[file] = item + local new_files, changed_files = gitStatus(item, item2deps, file2item) + if #new_files + #changed_files > 0 then + gitCommit(("Build %s, pass %s"):format(item, pass)) + end + if pass == 'first' then + for _, file in ipairs(new_files) do + checkFile(file, item) + file2item[file] = item + end + elseif isBuilt(item, new_files) then + comparePasses(item, new_files, file2item, prev_files) end for _, file in ipairs(changed_files) do checkFile(file, item) @@ -375,9 +695,11 @@ local function buildItem(item, item2deps, file2item) if not isInArray(creator_item, item2deps[item]) then table.insert(item2deps[item], creator_item) end - log('Item %s changes %s, created by %s', - item, file, creator_item) + log('Item %s (pass %s) changes %s, created by %s', + item, pass, file, creator_item) end + checkFileList(concatArrays(new_files, changed_files), item) + removeEmptyDirs(item) return new_files end @@ -401,8 +723,7 @@ local CONTROL = [[Package: %s Version: %s Section: devel Priority: optional -Architecture: %s -Depends: %s +Architecture: %s%s Maintainer: Boris Nagaev <bnagaev@gmail.com> Homepage: http://mxe.cc Description: %s @@ -414,7 +735,17 @@ Description: %s ]] local function debianControl(options) - local deb_deps_str = table.concat(options.deps, ', ') + local deb_deps_str = '' + if options.deps and #options.deps >= 1 then + deb_deps_str = deb_deps_str .. + '\n' .. 'Depends: ' .. + table.concat(options.deps, ', ') + end + if options.recommends and #options.recommends >= 1 then + deb_deps_str = deb_deps_str .. + '\n' .. 'Recommends: ' .. + table.concat(options.recommends, ', ') + end local version = options.version .. '-' .. TODAY return CONTROL:format( options.package, @@ -426,23 +757,31 @@ local function debianControl(options) ) end -local function makePackage(name, files, deps, ver, d1, d2, dst) - local dst = dst or '.' +local function makePackage(name, files, deps, ver, d1, d2, dst, recommends) + dst = dst or '.' local dirname = ('%s/%s_%s'):format(dst, name, protectVersion(ver)) -- make .list file local list_path = ('%s/%s.list'):format(dst, name) - writeFile(list_path, table.concat(files, "\n")) + writeFile(list_path, table.concat(files, "\n") .. "\n") -- make .tar.xz file local tar_name = dirname .. '.tar.xz' - local cmd = '%s -T %s --owner=root --group=root -cJf %s' - os.execute(cmd:format(tool 'tar', list_path, tar_name)) + local cmd1 = '%s -T %s --owner=root --group=root -cJf %s' + os.execute(cmd1:format(tool 'tar', list_path, tar_name)) + -- update list of files back from .tar.xz (see #1067) + local cmd2 = '%s -tf %s' + cmd2 = cmd2:format(tool 'tar', tar_name) + local tar_reader = io.popen(cmd2, 'r') + local files_str = tar_reader:read('*all') + tar_reader:close() + writeFile(list_path, files_str) -- make DEBIAN/control file local control_text = debianControl { package = name, version = protectVersion(ver), arch = ARCH, deps = deps, + recommends = recommends, description1 = d1, description2 = d2, } @@ -453,15 +792,16 @@ local function makePackage(name, files, deps, ver, d1, d2, dst) os.execute(('mkdir -p %s'):format(usr)) os.execute(('mkdir -p %s/DEBIAN'):format(dirname)) -- use tar to copy files with paths - local cmd = '%s -C %s -xf %s' - cmd = 'fakeroot -s deb.fakeroot ' .. cmd - os.execute(cmd:format(tool 'tar', usr, tar_name)) + local cmd3 = '%s -C %s -xf %s' + cmd3 = 'fakeroot -s deb.fakeroot ' .. cmd3 + os.execute(cmd3:format(tool 'tar', usr, tar_name)) -- make DEBIAN/control file local control_fname = dirname .. '/DEBIAN/control' writeFile(control_fname, control_text) -- make .deb file - local cmd = 'fakeroot -i deb.fakeroot dpkg-deb -b %s' - os.execute(cmd:format(dirname)) + local cmd4 = 'dpkg-deb -Zxz -b %s' + cmd4 = 'fakeroot -i deb.fakeroot ' .. cmd4 + os.execute(cmd4:format(dirname)) -- cleanup os.execute(('rm -fr %s deb.fakeroot'):format(dirname)) end @@ -482,16 +822,17 @@ local function makeDeb(item, files, deps, ver) makePackage(deb_pkg, files, deb_deps, ver, d1, d2) end -local function isBuilt(item, files) - local target, pkg = parseItem(item) - local INSTALLED = 'usr/%s/installed/%s' - local installed = INSTALLED:format(target, pkg) +local function findForeignInstalls(item, files) for _, file in ipairs(files) do - if file == installed then - return true + local pattern = 'usr/([^/]+)/installed/([^/]+)' + local t, p = file:match(pattern) + if t and p ~= '.gitkeep' then + local item1 = makeItem(t, p) + if item1 ~= item then + log('Item %s built item %s', item, item1) + end end end - return false end -- script building HUGE_TIMES from MXE main log @@ -521,7 +862,7 @@ local function progressPrinter(items) local started_at = os.time() local sums = {} for i, item in ipairs(items) do - local target, pkg = parseItem(item) + local _, pkg = parseItem(item) local expected_time = pkg2time[pkg] or 1 sums[i] = (sums[i - 1] or 0) + expected_time end @@ -530,16 +871,16 @@ local function progressPrinter(items) local pkgs_done = 0 local printer = {} -- - function printer:advance(i) + function printer.advance(_, i) pkgs_done = i time_done = sums[i] end - function printer:status() + function printer.status(_) local now = os.time() local spent = now - started_at local predicted_duration = spent * total_time / time_done local predicted_end = started_at + predicted_duration - local predicted_end_str = os.date("%c", predicted_end) + local predicted_end_str = os.date("%c", math.floor(predicted_end + 0.5)) local predicted_wait = predicted_end - now local predicted_wait_hours = predicted_wait / 3600.0 return PROGRESS:format(pkgs_done, #items, @@ -548,8 +889,13 @@ local function progressPrinter(items) return printer end +local function isEmpty(files) + return #files == 1 +end + -- build all packages, save filelist to list file -local function buildPackages(items, item2deps) +-- prev_files is passed only to second pass. +local function buildPackages(items, item2deps, pass, prev_item2files) local broken = {} local unbroken = {} local file2item = {} @@ -562,10 +908,24 @@ local function buildPackages(items, item2deps) end return false end + if pass == 'second' then + assert(prev_item2files) + -- fill file2item with data from prev_item2files + for item, files in pairs(prev_item2files) do + for _, file in ipairs(files) do + file2item[file] = item + end + end + end + local item2index = makeItem2Index(items) local progress_printer = progressPrinter(items) for i, item in ipairs(items) do if not brokenDep(item) then - local files = buildItem(item, item2deps, file2item) + local prev_files = prev_item2files and prev_item2files[item] + local files = buildItem( + item, item2deps, file2item, item2index, pass, prev_files + ) + findForeignInstalls(item, files) if isBuilt(item, files) then item2files[item] = files table.insert(unbroken, item) @@ -586,16 +946,44 @@ local function buildPackages(items, item2deps) end local function makeDebs(items, item2deps, item2ver, item2files) + -- start from building non-empty packages + local to_build = {} for _, item in ipairs(items) do - local deps = assert(item2deps[item], item) - local ver = assert(item2ver[item], item) local files = assert(item2files[item], item) - makeDeb(item, files, deps, ver) + if not isEmpty(files) then + table.insert(to_build, item) + end end + local built = {} + repeat + local missing_deps_set = {} + for _, item in ipairs(to_build) do + local deps = assert(item2deps[item], item) + local ver = assert(item2ver[item], item) + local files = assert(item2files[item], item) + for _, dep in ipairs(deps) do + local dep_files = item2files[dep] + if isEmpty(dep_files) then + log('Item %s depends on ' .. + 'empty item %s', item, dep) + missing_deps_set[dep] = true + end + end + makeDeb(item, files, deps, ver) + built[item] = true + end + -- empty packages built to satisfy non-empty + to_build = {} + for item in pairs(missing_deps_set) do + if not built[item] then + table.insert(to_build, item) + end + end + until #to_build == 0 end local function getMxeVersion() - local index_html = io.open 'index.html' + local index_html = io.open 'docs/index.html' local text = index_html:read('*all') index_html:close() return text:match('Release ([^<]+)') @@ -609,8 +997,10 @@ local function makeMxeRequirementsPackage(release) os.execute(('mkdir -p %s'):format(release)) local name = 'mxe-requirements' local ver = getMxeVersion() .. release - -- dependencies - local deps = { + -- MXE build requirements should not be strict dependencies here + -- See https://github.com/mxe/mxe/issues/1537 + local deps = {} + local recommends = { 'autoconf', 'automake', 'autopoint', 'bash', 'bison', 'bzip2', 'cmake', 'flex', 'gettext', 'git', 'g++', 'gperf', 'intltool', 'libffi-dev', 'libtool', @@ -622,13 +1012,17 @@ local function makeMxeRequirementsPackage(release) } if release ~= 'wheezy' then -- Jessie+ - table.insert(deps, 'libtool-bin') + table.insert(recommends, 'libtool-bin') end - local files = {} + local dummy_name = 'mxe-requirements.dummy.' .. release + local dummy = io.open(dummy_name, 'w') + dummy:close() + local files = {dummy_name} local d1 = "MXE requirements package" local d2 = MXE_REQUIREMENTS_DESCRIPTION2 local dst = release - makePackage(name, files, deps, ver, d1, d2, dst) + makePackage(name, files, deps, ver, d1, d2, dst, recommends) + os.remove(dummy_name) end local MXE_SOURCE_DESCRIPTION2 = @@ -641,38 +1035,87 @@ local function makeMxeSourcePackage() -- dependencies local deps = {} local files = { - 'CNAME', 'LICENSE.md', 'Makefile', + 'patch.mk', 'README.md', - 'assets', - 'doc', + 'docs', 'ext', - 'index.html', 'src', + 'plugins', 'tools', - 'versions.json', } local d1 = "MXE source" local d2 = MXE_SOURCE_DESCRIPTION2 makePackage(name, files, deps, ver, d1, d2) end -assert(trim(shell('pwd')) == MXE_DIR, - "Clone MXE to " .. MXE_DIR) -assert(execute(("%s check-requirements"):format(tool 'make'))) -if not max_items then +local function downloadPackages() local cmd = ('%s download -j 6 -k'):format(tool 'make') - while not execute(cmd) do end + for i = 1, MAX_TRIES do + log("Downloading packages. Attempt %d.", i) + if execute(cmd) then + log("All packages were downloaded.") + return + end + log("Some packages failed to download.") + end + log("%d downloading attempts failed. Giving up.", MAX_TRIES) + error('downloading failed') end -gitInit() -local items, item2deps, item2ver = getItems() -local build_list = sortForBuild(items, item2deps) -build_list = sliceArray(build_list, max_items) -local unbroken, item2files = buildPackages(build_list, item2deps) -makeDebs(unbroken, item2deps, item2ver, item2files) -if not no_debs then - makeMxeRequirementsPackage('wheezy') - makeMxeRequirementsPackage('jessie') + +local function main() + assert(not io.open('usr/.git'), 'Remove usr/') + local MXE_DIR_EXPECTED = '/usr/lib/mxe' + if MXE_DIR ~= MXE_DIR_EXPECTED then + log("Warning! Building in dir %s, not in %s", + MXE_DIR, MXE_DIR_EXPECTED) + end + gitInit() + assert(execute(("%s check-requirements MXE_TARGETS=%q"):format( + tool 'make', table.concat(TARGETS, ' ')))) + if not max_items then + downloadPackages() + end + gitAdd() + gitCommit('Initial commit') + gitTag(GIT_INITIAL) + local items, item2deps, item2ver = getItems() + local build_list = sortForBuild(items, item2deps) + assert(isTopoOrdered(build_list, items, item2deps)) + build_list = sliceArray(build_list, max_items) + local first_pass_failed, second_pass_failed + local unbroken, item2files = buildPackages( + build_list, item2deps, 'first' + ) + if #unbroken < #build_list then + first_pass_failed = true + end + gitCheckout( + itemToBranch(GIT_ALL_PSEUDOITEM, 'first'), + unbroken, + makeItem2Index(build_list), + 'first' + ) + makeDebs(unbroken, item2deps, item2ver, item2files) + if not no_debs then + makeMxeRequirementsPackage('wheezy') + makeMxeRequirementsPackage('jessie') + end + makeMxeSourcePackage() + if not no_second_pass then + local unbroken_second = buildPackages( + build_list, item2deps, 'second', item2files + ) + if #unbroken_second < #build_list then + second_pass_failed = true + end + end + if first_pass_failed or second_pass_failed then + local code = 1 + local close = true + os.exit(code, close) + end end -makeMxeSourcePackage() + +main() diff --git a/tools/compat-init.sh b/tools/compat-init.sh index e8f825a7..7ca393f5 100755 --- a/tools/compat-init.sh +++ b/tools/compat-init.sh @@ -15,6 +15,5 @@ if [ gsort --help >/dev/null 2>&1 ]; then SORT='gsort' fi -WGET="wget --no-check-certificate - --user-agent=$(wget --version | +WGET="wget --user-agent=$(wget --version | $SED -n 's,GNU \(Wget\) \([0-9.]*\).*,\1/\2,p')" diff --git a/tools/copydlldeps.md b/tools/copydlldeps.md new file mode 100644 index 00000000..3b63a039 --- /dev/null +++ b/tools/copydlldeps.md @@ -0,0 +1,83 @@ +README of copydlldeps.sh +======================== +This document belongs to copydlldeps.sh and is a part of the MXE project. + +It can be invoked on the command line like: + +``` +/share/mxe/tools/copydlldeps.sh --infile /home/mxeuser/test/i686-w64-mingw32.shared/Application.exe \ + --destdir /home/mxeuser/testdlls/ \ + --recursivesrcdir /home/mxeuser/mxe/usr/i686-w64-mingw32.shared/ \ + --srcdir /home/mxeuser/test/ \ + --copy \ + --enforcedir /home/mxeuser/mxe/usr/i686-w64-mingw32.shared/qt5/plugins/platforms/ \ + --objdump /home/mxeuser/mxe/usr/bin/i686-w64-mingw32.shared-objdump +``` + +It got embedded in a build script like: + +``` +MXEPATH=/path/to/mxe +compiler=i686-w64-mingw32.shared +orgDir=/path/to/my/nsis/dll # nsis is then copying all dlls in there to the place where the exe is located + +if [ ! $( echo $compiler | grep -q "shared" ) ]; then + echo "\$compiler=$compiler and contains the word 'shared'" | tee -a $CURLOG + + echo "+-----------------------------------------------+ " | tee -a $CURLOG + echo "| Starting new MXE copydlldeps.sh by LHE DL5RCW | " | tee -a $CURLOG + echo "+-----------------------------------------------+ " | tee -a $CURLOG + echo "currently working in $( pwd ) " | tee -a $CURLOG + executable=$( find . -name "*.exe" | tail -n 1 ) + sharedLibsDir="${orgDir}/nsis/sharedLibs" + echo "populating dir $sharedLibsDir with dll dependencies of $executable" | tee -a $CURLOG + OBJDUMP=objdump + if [ -e "$MXEPATH/usr/bin/$compiler-objdump" ]; then + OBJDUMP="$MXEPATH/usr/bin/$compiler-objdump" + fi + $MXEPATH/tools/copydlldeps.sh --infile $executable \ + --destdir "$sharedLibsDir" \ + --recursivesrcdir "$MXEPATH/usr/$compiler/" \ + --enforcedir "$MXEPATH/usr/$compiler/qt5/plugins/platforms/" \ + --copy \ + --objdump "$OBJDUMP" \ + | tee -a $CURLOG +fi +``` + +Additional hints +================ + +objdump +------- +I checked if there is a mxe objdump. If not, I took the native one on my server. +I actually do not know the difference but decided to include it in the script +in case it is important to someone. + +whitelist +--------- +I added a whitelist of *dll files that are widely used and very common on windows systems. Most of them are not to be found on MXE, but on native machines. As they are listed as dependencies, they might create warnings. To avoid anxiety, I introduced str_whiteListDlls. Those will create info instead of warning messages. Do not worry about them any longer. It works anyway as those are to be expected on your windows installation. + +exclude directory pattern +------------------------- +excludedir was added as an aditional option. You may call it multiple times like + --excludepattern /path/folder1/ --excludepattern /path/folder2/ -X /path/folder3/ +Try to make it as explicit as possible. If you choose a generic pattern, you may exclude more paths than you intend to. Actually any pattern will work. + -X pattern1 -X pattern2 +This was introduced upon the request to have the script avoid /(PREFIX)/(TARGET)/apps/. You may now pass this as an 'excludepattern' option. + +enforcedir +---------- +My application is using Qt5 and objdump did not return the needed qwindows.dll - +so I enforce the platform folder. You may add multiple --enforcedir directories using +`--enforcedir /path/folder1 --enforcedir /path/folder2 --enforcedir /path/folder3`. + +They are NOT recursively copied, only flat. See: + +```bash + string=$( find $enforcedDirectory -maxdepth 1 -iregex '.*\(dll\|exe\)' | tr '\n' ' ' ) +``` + +If you would remove the `-maxdepth 1`, it would become recoursive. + +February, 2, 2016. Lars Holger Engelhard aka [DL5RCW](https://github.com/dl5rcw). diff --git a/tools/copydlldeps.py b/tools/copydlldeps.py index 17c0677a..452a0e09 100755 --- a/tools/copydlldeps.py +++ b/tools/copydlldeps.py @@ -15,7 +15,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. import os import shutil @@ -138,7 +138,7 @@ if __name__ == "__main__": not_found_dlls = set() # Create a list of all available .dll files in the libdir directories - # Flattening list: http://stackoverflow.com/questions/952914 + # Flattening list: https://stackoverflow.com/questions/952914 for libdir in [item for sublist in args.libdirs for item in sublist]: for dll_filename in os.listdir(libdir): dll_filename_full = os.path.join(libdir, dll_filename) @@ -147,7 +147,7 @@ if __name__ == "__main__": # Create a list of initial dependencies (dlls_to_copy) and already copied # DLLs (copied_dlls) from the checkdir arguments. - # Flattening list: http://stackoverflow.com/questions/952914 + # Flattening list: https://stackoverflow.com/questions/952914 for checkdir in [item for sublist in args.checkdirs for item in sublist]: for pe_filename in os.listdir(checkdir): pe_filename_full = os.path.join(checkdir, pe_filename) diff --git a/tools/copydlldeps.sh b/tools/copydlldeps.sh new file mode 100755 index 00000000..e97435d5 --- /dev/null +++ b/tools/copydlldeps.sh @@ -0,0 +1,455 @@ +#!/bin/bash +# + +# print version and license +# is hereby part of the code and also displayed to the user +version() { + cat <<EOF >&2 + +Welcome to $( basename $0)! +Authors: Lars Holger Engelhard - DL5RCW (2016) + Tiancheng "Timothy" Gu (2014) + +Version: 1.3 + +# This file is part of the MXE Project, sponsored by the named authors +# it supports the shared build approach by providing an easy way to +# check for library dependencies in a recursive manner + +# Copyright (c) 2016 Lars Holger Engelhard - DL5RCW +# (c) 2014 Tiancheng "Timothy" Gu + +# +# 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. + +EOF +} + +# default application objdump +# you can specify your own objdump with --objdump or -o +OBJDUMP=objdump + +# create a temp directory +tmp=$( mktemp -d ) + +# print an help menu +help() { + cat <<EOF >&2 + + +Usage: $0 -c -d DEST -s SRC [-f FILE|-F DIR] + or: $0 -p [-f FILE|-F DIR] + or: $0 -c -p -d DEST -s SRC [-f FILE|-F DIR] + or: $0 -p -d DEST -R SRC [-f FILE|-F DIR] + or: $0 -p -d DEST -S "SRC_1 SRC_2 ... SRC_n" [-f FILE|-F DIR] + or: $0 -c -d DEST -R SRC_1 -e SRC_2 [-f FILE|-F DIR] + + +Copy executable FILE(s) and their DLL dependencies for SRC directory to a +DEST directory, and/or print the recursive dependencies. + +Operating modes: + -c, --copy print and copy dependencies + -p, --print print dependencies (no copy action) + +Operating options: + -d, --destdir Destination directory - a single destination folder + -f, --infile [ multiCall ] The input executable file or DLL. + -F, --infiles, --indir [ multiCall ] The input directory of executable files and/or DLLs. + -s, --srcdir [ multiCall ] The directory with DLLs that can be copied. + -S, --srcdirs [ multiCall ] List of directories with DLLs that can be copied. Put "" around them, e.g. "/dir1 /root/dir2 /root/dir3" + -R, --recursivesrcdir [ multiCall ] Target directory for recursive search of folders containing *dll files + -X, --excludepattern [ multiCall ] Exclude any path that contains such pattern, e.g. /(PREFIX)/(TARGET)/apps/ + +Optional binary settings: + -o, --objdump Specify the path or name of your objdump application + -e, --enforcedir [ multiCall ] Enforce executable files and/or DLLs of a specific directory + It will be entirely copied - flat, non recursive. assumes *.dll and *.exe in the top level directory + It will copy those into a directory in DESTDIR! + e.g. <path_to_mxe>/mxe/usr/<compiler>/qt5/plugins/platforms/ - for qwindows.dll becomes + DESTDIR/platforms/ containing qwindows.dll +Other options: + -h,-H, --help Display this message and exit + -v,-V, --version Display version of this application + -l,-L, --loglevel Display more output - default is 1 + +multiCall => you can specify this option multiple times! + +Authors: Lars Holger Engelhard - DL5RCW + Tiancheng "Timothy" Gu +EOF +} + +# terminate the application +# print an error message +# and clean the tmp directory +die() { + echo $1 >&2 + rm -rf "$tmp" + help + exit 1 +} + +# find all directories containing dll files +# you can pass a list (array) of directories +# and findAllSrcDirectories will hunt for dlls in each one recursively +# it will return a sorted list and duplicates are removed +findAllSrcDirectories(){ + ar_recursiveDirList=${!1} + string="" + for curPath in "${ar_recursiveDirList[@]}"; do + for element in $(find $curPath $excludePattern -iname "*.dll"); do + #ar_list+="$(dirname $element) " + string+="$(dirname $element) " + done + done + string=$(echo "$string" | tr -s ' ' | tr ' ' '\n' | nl | sort -u -k2 | sort -n | cut -f2-) + echo $string #returns the string +} + +while [ $# -gt 0 ]; do + key="$1" + shift + + case $key in + -f|--infile) + infile+=" $1" + shift + ;; + -F|--indir|--infiles) + indir+=" $1" + shift + ;; + -s|--srcdir) + srcdir+=" $1" + shift + ;; + -d|--destdir) + destdir="$1" + shift + ;; + -S|--srcdirs) + srcdirs+=" $1" + shift + ;; + -R|--recursivesrcdir) + recursivesrcdir+=" $1" + shift + ;; + -X|--excludepattern) + excludepattern+=" $1" + shift + ;; + -o|--objdump) + OBJDUMP="$1" + shift + ;; + -e|--enforcedir) + enforcedir+=" $1" + shift + ;; + -l|-L|--loglevel) + loglevel="$1" + shift + ;; + -p|--print) + opmode="print" + ;; + -c|--copy) + opmode="copy" + ;; + -h|-H|--help) + help + exit 0 + ;; + -v|-V|--version) + version + exit 0 + ;; + *) + echo "unknown option $key ignored" >&2 + ;; + esac +done + +# setting default values if no arguments were given +if ! [ "$loglevel" ]; then + loglevel=0 +fi + +if ! [ "$opmode" ]; then + opmode="copy" # used as default in productive + #opmode="print" # used as default in development +fi + +if ! [ "$destdir" ]; then + die '--destdir is not specified.' +fi + +if [ -n "$(ls -A $destdir 2>/dev/null)" ]; then + echo 'Warning: --destdir already exists and contains files.' >&2 +else + mkdir -p "$destdir" + echo "info: created --destdir $destdir" +fi + +if [ "$loglevel" -gt 1 ]; then + echo "filelist=$filelist" + echo "opmode=$opmode" +fi + +excluePattern="" # building an exclude command consisting of patterns. We still contain the first hit of find +if [ ! -z "$excludepattern" ]; then + for curString in $( echo "$excludepattern" | tr -s ' ' | tr ' ' '\n' ); do + excludePattern+=" ! -path *$( echo "$curString" | tr -d ' ' )* " + done +fi +if [ "$loglevel" -gt 1]; then + echo "\$excluePattern: $excludePattern" +fi + +str_inputFileList="" +if [ "$indir" ]; then + for curPath in $( echo "${indir}" | tr -s ' ' | tr ' ' '\n' ); do + curList=$( find $curPath -iregex '.*\(dll\|exe\)' | tr '\n' ' ' ) + str_inputFileList+=" $curList" + done +fi +if [ "$infile" ]; then + for curFile in $( echo "${infile}" | tr -s ' ' | tr ' ' '\n' ); do + curString=$( find $curFile -iregex '.*\(dll\|exe\)' | tr '\n' ' ' ) + str_inputFileList+=" $curString" + done +fi +if [ -z "$str_inputFileList" ]; then + die 'there was no input defined. use --indir and/or --infile in your command' +fi +if [ "$loglevel" -gt 1 ]; then + echo "str_inputFileList=$str_inputFileList" + echo "opmode=$opmode" +fi + +str_srcDirList="" +if [ "$srcdir" ]; then + str_srcDirList+=" $srcdir" +fi +if [ "$srcdirs" ]; then + str_srcDirList+=" $srcdirs" +fi +if [ "$recursivesrcdir" ]; then + result="$( findAllSrcDirectories recursivesrcdir )" + str_srcDirList+=" $result" +fi +if [ -z "$str_srcDirList" ]; then + die 'there was no source directory defined. use --srcdirs or --srcdir or --recursivesrcdir in your command' +fi +if [ "$loglevel" -gt 1 ]; then + #echo "infiles: filelist=$filelist" + echo "infiles: str_inputFileList=$str_inputFileList" + echo " opmode: $opmode" +fi + +if [ "$loglevel" -gt 1 ]; then + echo "list for sources: str_srcDirList=${str_srcDirList}" + echo "using OBJDUMP=$OBJDUMP in Version $( $OBJDUMP -V)" +fi + +if [ "$loglevel" -gt 1 ]; then + ## during development, I like to interrupt here to check the above output and skip the rest + echo "starting in 5 seconds" && sleep 5 +fi + +# introducing a whitelist of well known DLLs +str_whiteListDlls="advapi32.dll kernel32.dll msvcrt.dll user32.dll ws2_32.dll gdi32.dll shell32.dll d3d9.dll ole32.dll winmm.dll mpr.dll opengl32.dll" + +# function to append dependencies (recursively) +append_deps() { + if [ "$loglevel" -gt 1 ]; then + echo "\$1=$1 + \$2=$2 " + sleep 2 + fi + local bn="$( basename $1 )" + if [ -e "$tmp/$bn" ]; then + return 0 + fi + if [ $# -eq 2 ]; then + path="$1" + else + path="" + for curPath in $( echo "${str_srcDirList}" | tr -s ' ' | tr ' ' '\n' ); do + counter=0 + result="" + result=$(find $curPath $excludePattern -iname "$bn" -type f | tail -n 1) + if [ "$loglevel" -gt 1 ]; then + echo "complete find command in append_deps(): # find $curPath $excludePattern -iname $bn -type f | tail -n 1 # " + fi + if [ ! -z "$result" ];then + path="$result" + counter=$(expr $counter + 1) + fi +if [ $counter == 0 ]; then + #echo "ERROR: could not find \$path for dll $bn, \$counter=$counter: searched $curPath" + str_test="1" +else + echo "OKAY: found path for dll $bn = $path, \$counter=$counter: searched $curPath" +fi + if [ "$loglevel" -gt 1 ]; then + if [ $counter == 0 ]; then + echo "could not find \$path for dll $bn, \$counter=$counter: searched $curPath" + else + echo "found path for dll $bn = $path, \$counter=$counter: searched $curPath" + fi + fi + done + if [ "$loglevel" -gt 1 ]; then + echo "path for dll $bn now is $path" + sleep 2 + fi + fi + echo "Processing $1" >&2 + if ! [ -e "$path" ]; then + if [ "$loglevel" -gt 1 ]; then + echo "path=$path| and we touch $tmp/$bn -> non existent in our src directories!" + sleep 4 + fi + touch "$tmp/$bn" + return 0 + fi + $OBJDUMP -p "$path" | grep 'DLL Name:' | cut -f3 -d' ' > "$tmp/$bn" + echo "executing: $OBJDUMP -p "$path" | grep 'DLL Name:' | cut -f3 -d' ' > "$tmp/$bn"" + for dll in $( cat "$tmp/$bn" | tr '\n' ' ' ); do + append_deps "$dll" + done + alldeps=$(printf "$alldeps\n%s" "$(cat $tmp/$bn)" | sort | uniq) +} + +process_enforced_deps(){ + enforcedDirectory=$1 + if [ ! -d $enforcedDirectory ]; then + echo "warning! \$enforcedDirectory=$enforcedDirectory is not valid" + if [ "$loglevel" -gt 1 ]; then + sleep 10 + fi + fi + # first we append the path to enforced dir to our list of source directories + # if we would do this file recursively, we should loop to find those and append them all to the list + str_srcDirList+=" $enforcedDirectory" + # now we search for the dll and exe files to be included + string=$( find $enforcedDirectory -maxdepth 1 -iregex '.*\(dll\|exe\)' | tr '\n' ' ' ) + if [ "$loglevel" -gt 1 ]; then + echo "enforcedDirectory=$enforcedDirectory" + echo "we found dlls and exes:$string" + sleep 4 + fi + # we hard copy it to DEST + cp -dpRxv "${enforcedDirectory}" "$destdir" +} + +# beginning of the main function +# we start with the enforced dlls and exe +if [ ! -z "$enforcedir" ]; then + for curFile in $( echo "${enforcedir}" | tr -s ' ' | tr ' ' '\n'); do + echo "startig for file $curFile in enforce section" + append_deps "$curFile" rel + process_enforced_deps "$curFile" + done +fi + +# then we start with our indir or infile list +for file in $str_inputFileList; do + echo "starting for file $file" + #sleep 4 + append_deps "$file" rel +done + +echo "I will now search for \$alldeps" +for debugOut in $( echo $alldeps | tr -s ' ' | tr '\n' ' '); do + echo "debugOut: $debugOut" +done +if [ "$loglevel" -eq 1 ]; then + echo "waiting 10 seconds until I proceed - so you can read my debugOut" + sleep 10 + + tmpStr=${str_srcDirList} + echo "\$alldeps has ${#alldeps[@]} elements" + echo "and \$str_srcDirList has ${#str_srcDirList} elements" +fi + +str_summary="Here is the summary:" +str_summary="${str_summary} # ==== 8< ==== START ==== 8< ==== " +if [ $opmode == "copy" ]; then + echo "copying files from \${curFolder} to \$destdir:" +elif [ $opmode == "print" ]; then + echo "printing files:" +fi +for dll in $( echo $alldeps | tr '\n' ' ' ); do + counter=0 + lowerDll=$( echo $dll | tr '[:upper:]' '[:lower:]' ) + if [ $lowerDll == $dll ]; then + lowerDll="" + fi + for curFolder in $( echo "${str_srcDirList}" | tr -s ' ' | tr ' ' '\n'); do + if [ "$loglevel" -gt 1 ]; then + echo "search for dll $dll in curFolder $curFolder" + sleep 1 + fi + for curDll in $dll $lowerDll; do + if [ -e "${curFolder}/${curDll}" ]; then + counter=$( expr $counter + 1 ) + if [ $opmode == "copy" ]; then + cp -dpRxv "${curFolder}/${curDll}" "$destdir" + elif [ $opmode == "print" ]; then + echo "found $dll in: ${curFolder}/${curDll}" + else + echo "unknown opmode=$opmode" + fi + fi + done + done + if [ $counter == 0 ]; then + lowerDll=$( echo $dll | tr '[:upper:]' '[:lower:]' ) + str_whiteListDlls=$( echo ${str_whiteListDlls} | tr '[:upper:]' '[:lower:]' ) # make whiteListDlls lower case to ensure we find the match (case insensitive) + if [ -z "${str_whiteListDlls/*${lowerDll}*}" ]; then + if [ "$loglevel" -gt 1 ]; then + echo "Info: \"$dll\" not found - but it is white-listed. That means: it is well known by Windows - do not worry too much. " + fi + str_summary="${str_summary} # Info: \"$dll\" not found - but it is white-listed. That means: it is well known by Windows - do not worry too much. " + else + if [ "$loglevel" -gt 1 ]; then + echo "Warn: \"$dll\" NOT found. \$counter=$counter." + fi + str_summary="${str_summary} # Warn: \"$dll\" NOT found. \$counter=$counter." + fi + else + if [ "$loglevel" -gt 1 ]; then + echo "Good: \"$dll\" found in the list. \$counter=$counter" + fi + str_summary="${str_summary} # Good: \"$dll\" Found in the list. \$counter=$counter" + fi +done +str_summary="${str_summary} # ==== 8< ==== END ==== 8< ==== " +echo "Job is done." +# print the summary now +for curLine in "$( echo "${str_summary}" | tr -s '#' | tr '#' '\n' )"; do # convert # to a linebreak - string ecomes an array that can be processed in for loop + echo "$curLine" +done + +# clean up the temp directory stored in $tmp +rm -rf "$tmp" diff --git a/tools/fake-editor b/tools/fake-editor index 25a7ccfd..26cc9343 100755 --- a/tools/fake-editor +++ b/tools/fake-editor @@ -1,6 +1,5 @@ #!/bin/sh -# This file is part of MXE. -# See index.html for further information. +# This file is part of MXE. See LICENSE.md for licensing information. # Fake "editor" to format output for GitHub issue. # See tools/s3-fetch-and-sync for more info. diff --git a/tools/install-deps b/tools/install-deps new file mode 100755 index 00000000..1047afd1 --- /dev/null +++ b/tools/install-deps @@ -0,0 +1,84 @@ +#!/bin/bash + +set -xue + +if [[ "$OSTYPE" =~ "linux" ]]; then + if which apt-get && which dpkg; then + # Debian or Ubuntu + apt-get --yes install \ + autoconf automake autopoint bash bison bzip2 flex gettext\ + git g++ gperf intltool libffi-dev libgdk-pixbuf2.0-dev \ + libtool libltdl-dev libssl-dev libxml-parser-perl make \ + openssl p7zip-full patch perl pkg-config python ruby scons \ + sed unzip wget xz-utils + if ! [[ `uname -m` =~ "i686" ]]; then + apt-get --yes install g++-multilib libc6-dev-i386 + fi + # install bc to compare Debian releases + apt-get --yes install bc + DIST=`lsb_release -si` + REL=`lsb_release -sr` + if ( [[ $DIST =~ "Debian" ]] && (( `echo "$REL > 8" | bc -l` )) ) || \ + ( [[ $DIST =~ "Ubuntu" ]] && (( `echo "$REL > 14.10" | bc -l` )) ) || \ + ( [[ "$REL" == "unstable" ]] ); then + apt-get --yes install libtool-bin + fi + # install Lua for build-pkg + apt-get --yes install lua5.1 + elif which yum; then + # Fedora + yum install \ + autoconf automake bash bison bzip2 flex gcc-c++ \ + gdk-pixbuf2-devel gettext git gperf intltool make \ + sed libffi-devel libtool openssl-devel p7zip patch \ + perl pkgconfig python ruby scons unzip wget xz + elif which pacman-g2; then + # Frugalware + pacman-g2 -S \ + autoconf automake bash bzip2 bison flex gcc gdk-pixbuf2\ + gettext git gperf intltool make sed libffi libtool \ + openssl patch perl perl-xml-parser pkgconfig python \ + ruby scons unzip wget xz xz-lzma + elif which emerge; then + # Gentoo + emerge \ + sys-devel/autoconf sys-devel/automake app-shells/bash \ + sys-devel/bison app-arch/bzip2 \ + sys-devel/flex sys-devel/gcc sys-devel/gettext \ + dev-vcs/git dev-util/gperf dev-util/intltool \ + sys-devel/make sys-apps/sed dev-libs/libffi \ + sys-devel/libtool dev-libs/openssl app-arch/p7zip \ + sys-devel/patch dev-lang/perl dev-perl/XML-Parser \ + dev-util/pkgconfig dev-lang/python dev-lang/ruby \ + dev-util/scons app-arch/unzip net-misc/wget \ + app-arch/xz-utils x11-libs/gdk-pixbuf + elif which zypper; then + # openSUSE + zypper install -R \ + autoconf automake bash bison bzip2 flex gcc-c++ \ + gdk-pixbuf-devel gettext-tools git gperf intltool \ + libffi-devel libtool make openssl libopenssl-devel \ + p7zip patch perl perl-XML-Parser pkg-config python \ + ruby scons sed unzip wget xz + if ! [[ `uname -m` =~ i686 ]]; then + zypper install -R \ + gcc-32bit glibc-devel-32bit libgcc46-32bit \ + libgomp46-32bit libstdc++46-devel-32bit + fi + fi +elif [[ "$OSTYPE" == "darwin"* ]]; then + port install \ + autoconf automake bison coreutils flex gettext \ + gdk-pixbuf2 glib2 gnutar gsed intltool libffi libtool \ + openssl p5-xml-parser p7zip pkgconfig scons wget xz +elif [[ "$OSTYPE" == "freebsd"* ]]; then + pkg install \ + automake autoconf bash bison coreutils flex \ + gcc gdk-pixbuf2 gettext git glib gmake gperf gsed intltool libffi \ + libtool openssl p5-XML-Parser p7zip patch perl5 \ + pkgconf python ruby scons unzip wget + pkg install file +else + echo "unknown: $OSTYPE" + exit 1 +fi diff --git a/tools/mxe-activate b/tools/mxe-activate index 3d436a56..3d45e78c 100644 --- a/tools/mxe-activate +++ b/tools/mxe-activate @@ -8,7 +8,7 @@ MXE_TRIPLETS=`grep ^MXE_TRIPLETS Makefile | cut -d '=' -f2 | cut -d ' ' -f2- | t MXE_LIB_TYPES=`grep ^MXE_LIB_TYPES Makefile | cut -d '=' -f2 | cut -d ' ' -f2- | tr ' ' ','` MXE_TARGET_LIST=`eval "echo {$MXE_TRIPLETS}.{$MXE_LIB_TYPES}"` -alias mxe='$MAKE -C $MXE_DIR --no-print-directory' +alias mxe-make='$MAKE -C $MXE_DIR --no-print-directory' unset `compgen -e | \ grep -vi '^EDITOR\|^HOME\|^LANG\|MXE\|^PATH' | \ @@ -26,17 +26,6 @@ _mxe() tgts=$MXE_TARGET_LIST case "${cur}" in - build-only-*_*) - local base=`echo ${cur} | $SED -n 's,\(.*_\).*,\1,p'` - local _tgts=$( for x in ${tgts}; do echo $base${x} ; done ) - COMPREPLY=( $(compgen -W "${_tgts}" -- ${cur}) ) - return 0 - ;; - build-only-*) - local _pkgs=$( for x in ${pkgs}; do echo build-only-${x} ; done ) - COMPREPLY=( $(compgen -W "${_pkgs}" -- ${cur}) ) - return 0 - ;; download-*) local _pkgs=$( for x in ${pkgs}; do echo download-${x} ; done ) COMPREPLY=( $(compgen -W "${_pkgs}" -- ${cur}) ) @@ -53,14 +42,46 @@ _mxe() COMPREPLY=( $(compgen -W "${_pkgs}" -- ${cur}) ) return 0 ;; + *-*-*) + local base=`echo ${cur} | $SED -n 's,\(.*-.*-\).*,\1,p'` + local _pkgs=$( for x in ${pkgs}; do echo $base${x} ; done ) + COMPREPLY=( $(compgen -W "${_pkgs}" -- ${cur}) ) + return 0 + ;; + *-*-*-*) + local base=`echo ${cur} | $SED -n 's,\(.*-.*-.*-\).*,\1,p'` + local _pkgs=$( for x in ${pkgs}; do echo $base${x} ; done ) + COMPREPLY=( $(compgen -W "${_pkgs}" -- ${cur}) ) + return 0 + ;; [!-]*) - pkgs+=" build-only- build-matrix.html check-requirements \ - clean clean-pkg download download- update-checksum- \ - show-deps- show-downstream-deps- show-upstream-deps-" + pkgs+=" docs/build-matrix.html \ + docs/packages.json \ + check-requirements \ + clean \ + clean-junk \ + clean-pkg \ + cleanup-deps-style \ + cleanup-style \ + download \ + download- \ + download-only- \ + export-patch- \ + gmsl-print- \ + import-all-patches- \ + import-patch- \ + init-git- \ + print-deps-for-build-pkg \ + show-deps- \ + show-downstream-deps- \ + show-upstream-deps- \ + update \ + update-checksum- \ + update-package- " COMPREPLY=( $(compgen -W "${pkgs}" -- ${cur}) ) return 0 ;; esac } -complete -o nospace -o default -F _mxe mxe make gmake +complete -o nospace -o default -F _mxe mxe-make make gmake diff --git a/tools/mxe-get b/tools/mxe-get new file mode 100755 index 00000000..6f5a764f --- /dev/null +++ b/tools/mxe-get @@ -0,0 +1,162 @@ +#!/usr/bin/env bash + +# Copyright 2017 Viktor Szakats <https://vszakats.net/> +# This file is part of MXE. See LICENSE.md for licensing information. + +set -ue + +usage() { + echo "Download and unpack a list of MXE binary packages along with their +dependencies, securely. + +Usage: $(basename "$0") [package ...] + +Environment: + +MXE_HOME Configure directory where packages will be installed. + Default: ~/mxe +MXE_SKIP_INSTALL Comma/space separated list of package names to skip + installing. Useful to exclude unnecessary dependencies. + *-linux-gnu-*, mxe-requirements, mxe-source packages + are excluded automatically. +MXE_INST_LINUX Install 'linux-gnu' packages. Default: no + +Required: ar (BSD), gpg, curl, openssl, awk, sed, tar, gzip + +Author: Viktor Szakats <https://vszakats.net/>" +} + +mxe_curl() { + curl -fsS --connect-timeout 15 --retry 3 "$@" +} + +mxe_get_pkg() { + + if [[ "$1" =~ ^(mxe-(i686|x86\-64)-(w64|unknown)-(mingw32|linux-gnu)(\.shared|\.static)?)-(.*)$ ]]; then + + repo="${BASH_REMATCH[1]}" # mxe-x86-64-w64-mingw32.shared + plat="${BASH_REMATCH[4]}" # mingw32 | linux-gnu + name="${BASH_REMATCH[6]}" # harfbuzz + + # skip Linux packages by default + if [ ! "${plat}" = 'linux-gnu' ] || [ "${MXE_INST_LINUX}" = 'yes' ]; then + + # skip packages on the skip install list + if [[ ! "${name}" =~ ^("${MXE_SKIP_INSTALL//[, ]/|}")$ ]]; then + + idid="${repo}-${name}" # package id for internal purposes + if [[ ! "${done}" = *"|${idid}|"* ]]; then # avoid installing the same package twice + done="${done} |${idid}|" # add to list of install packages + + ctrl="$(awk "/^Package: ${repo}-${name}$/,/^SHA256: /" Packages)" # control section for this package + + debp="$(echo "${ctrl}" | sed -n -E 's,^Filename: (.+)$,\1,p')" # .deb path + vers="$(echo "${ctrl}" | sed -n -E 's,^Version: (.+)$,\1,p')" # package version + hash="$(echo "${ctrl}" | sed -n -E 's,^SHA256: ([0-9a-fA-F]{64})$,\1,p')" # .deb hash + deps="$(echo "${ctrl}" | sed -n -E 's,^Depends: (.+)$,\1,p')" # .deb dependencies + + echo "! Version: ${vers}" + url="${base}/${debp}" + echo "! Downloading... '${url}'" + if mxe_curl "${url}" -o pack.bin; then + + hash_fl="$(openssl dgst -sha256 pack.bin \ + | sed -n -E 's,.+= ([0-9a-fA-F]{64}),\1,p')" + + if [ "${hash_fl}" = "${hash}" ]; then + if ar -x pack.bin data.tar.xz && \ + tar --strip-components 4 -xf data.tar.xz; then + subd="$(echo "$(pwd)/usr/${repo}" \ + | sed -e 's|^mxe-||' -e 's|x86-64|x86_64|' -e "s|${HOME}|~|")" + echo "! Verified OK. Unpacked into: '${subd}'" # ~/mxe/usr/mxe-x86_64-w64-mingw32.shared + else + echo "! Error: Unpacking: '${url}'" + fi + rm -f data.tar.xz + else + echo "! Error: Verifying package checksum: '${url}'" + echo "! Expected: ${hash}" + echo "! Actual: ${hash_fl}" + fi + rm -f pack.bin + + for i in ${deps//,/}; do + mxe_get_pkg "$i" # recurse + done + else + echo "! Error: Download failed." + fi + fi + fi + fi + elif [ ! "$1" = 'mxe-requirements' ] && \ + [ ! "$1" = 'mxe-source' ]; then + echo "! Error: Cannot parse package name: '$1'" + fi +} + +if [ $# -eq 0 ]; then + usage + exit +fi + +[ -z "${MXE_SKIP_INSTALL+x}" ] && MXE_SKIP_INSTALL='gcc' +[ -z "${MXE_INST_LINUX+x}" ] && MXE_INST_LINUX='no' +[ -z "${MXE_HOME+x}" ] && MXE_HOME="${HOME}/mxe" + +mkdir -p "${MXE_HOME}" +( + cd "${MXE_HOME}" || exit + + base='http://pkg.mxe.cc/repos/apt/debian' # APT root + suid='D43A795B73B16ABE9643FE1AFD8FFF16DB45C6AB' # Signer UID + + alias gpg='gpg --batch --keyserver-options timeout=15 --keyid-format LONG' + + echo "! Downloading and verifying MXE package list..." + mxe_curl \ + -O "${base}/dists/wheezy/Release.gpg" \ + -O "${base}/dists/wheezy/Release" + mxe_curl \ + "https://keyserver.ubuntu.com/pks/lookup?search=0x${suid}&op=get" \ + | gpg --import --status-fd 1 + gpg --verify-options show-primary-uid-only --verify Release.gpg Release || exit 1 + mxe_curl \ + -O "${base}/dists/wheezy/main/binary-amd64/Packages.gz" + openssl dgst -sha256 Packages.gz \ + | grep -q "$(sed -E -n 's,^ ([0-9a-fA-F]{64}) [0-9]* main/binary-amd64/Packages.gz$,\1,p' Release)" || exit 1 + gzip -f -d Packages.gz + + echo "! Downloading and verifying MXE package(s)..." + done='' + while [ $# -gt 0 ]; do + echo "! Installing MXE package '$1'" + mxe_get_pkg "$1" + shift + done + echo "! Installed:${done//|/}" + + if [ -n "${done}" ]; then + ori='/usr/lib/mxe' + pwd="$(pwd)" + + echo '! Retargeting symlinks...' + find . -type l -name '*' | while IFS= read -r f; do + # FIXME: readlink may need to be adapted for non-macOS systems + ln -f -s "$(readlink "${f}" | sed "s|${ori}|${pwd}|")" "${f}" + done + + echo '! Rewriting hardcoded absolute paths...' + find . -type f \ + -name '*.la' -o \ + -name '*.pc' -o \ + -name '*.cmake' -o \ + -name '*-config' | while IFS= read -r f; do + + sed "s|${ori}|${pwd}|" \ + < "${f}" > "${f}-mod" && cp "${f}-mod" "${f}" && rm -f "${f}-mod" + done + fi + + echo '! Done.' +) diff --git a/tools/nonetwork.c b/tools/nonetwork.c new file mode 100644 index 00000000..fc95b6a9 --- /dev/null +++ b/tools/nonetwork.c @@ -0,0 +1,49 @@ +// nonetwork, break standard network functions using LD_PRELOAD +// Source: https://github.com/starius/nonetwork +// Copyright (C) 2015 Boris Nagaev +// License: MIT + +#include <errno.h> +#include <stdio.h> + +static void print_message() { + fflush(stderr); + fprintf(stderr, "\nDon't use network from MXE build rules!\n"); + fflush(stderr); +} + +int connect(int sock, const void *addr, unsigned int len) { + print_message(); + errno = 13; // EACCES, Permission denied + return -1; +} + +void *gethostbyname(const char *name) { + print_message(); + return 0; +} + +int getaddrinfo(const char *node, const char *service, + const void *hints, + void **res) { + print_message(); + return -4; // EAI_FAIL +} + +void freeaddrinfo(void *res) { + print_message(); +} + +int getnameinfo(const void * sa, + unsigned int salen, char * host, + unsigned int hostlen, char * serv, + unsigned int servlen, int flags) { + print_message(); + return -4; // EAI_FAIL +} + +struct hostent *gethostbyaddr(const void *addr, unsigned int len, + int type) { + print_message(); + return 0; +} diff --git a/tools/patch-tool-mxe b/tools/patch-tool-mxe index 1ba10c92..b7720e65 100755 --- a/tools/patch-tool-mxe +++ b/tools/patch-tool-mxe @@ -5,126 +5,31 @@ cmd=$1 pkg=$2 -patch_name=$3 -if [ -z "$patch_name" ]; then - patch_name=1-fixes -fi +patch_name=${3:-1-fixes} setupEnv() { # MXE directory export mxedir=$(cd $(dirname $0) && cd .. && pwd) - - # directory for unpacked tarballs/git repos - export gitsdir=${mxedir}/gits - - mkdir -p ${gitsdir} - - - # John Doe <John Doe@acme.org> - export author=`git var GIT_AUTHOR_IDENT | sed 's/^\(.* [<].*[>]\).*$/\1/'` - - export pkg_version=`grep '^$(PKG)_VERSION' $mxedir/src/$pkg.mk | \ - sed 's/.*:= \(.*\)/\1/'` - - export pkg_short_version=`echo $pkg_version | sed s/'\(.*\)\.[^.]*$'/'\1'/` - - export pkg_subdir=`grep '^$(PKG)_SUBDIR' $mxedir/src/$pkg.mk | \ - sed 's/.*:= \(.*\)/\1/' | \ - sed s/'$($(PKG)_VERSION)'/$pkg_version/ | \ - sed s/'$(call SHORT_PKG_VERSION,$(PKG))'/$pkg_short_version/ | \ - sed s/'$(PKG)'/$pkg/;` - - export pkg_file=`grep '^$(PKG)_FILE' $mxedir/src/$pkg.mk | \ - sed 's/.*:= \(.*\)/\1/' | \ - sed s/'$($(PKG)_VERSION)'/$pkg_version/ | \ - sed s/'$(call SHORT_PKG_VERSION,$(PKG))'/$pkg_short_version/ | \ - sed s/'$($(PKG)_SUBDIR)'/$pkg_subdir/ | \ - sed s/'$(PKG)'/$pkg/;` - - #echo $pkg - #echo $pkg_version - #echo $pkg_subdir - #echo $pkg_file - } -# init + function init_git { setupEnv - cd $gitsdir - - if [ -d $gitsdir/$pkg_subdir ]; then - echo "Error: $gitsdir/$pkg_subdir already exists. Cancelling init." >&2 - exit 1 - fi - - echo "Checking for cached $pkg_file" - if [ ! -f $mxedir/pkg/$pkg_file ]; then - make -C "$mxedir" download-$pkg - echo "Building the mxe Makefile target 'download-$pkg' to get missing file" - if [ ! $? -eq 0 ]; then - echo "Could not build target download-$pkg - cancelling init." >&2 - exit 1 - fi - fi - - echo "Unpacking archive..." - (echo $pkg_file | grep "\.tar\.gz") || (echo $pkg_file | grep "\.tgz") \ - >> /dev/null && tar xf $mxedir/pkg/$pkg_file - (echo $pkg_file | grep "\.tar\.bz2") || (echo $pkg_file | grep "\.tbz2") \ - >> /dev/null && tar xf $mxedir/pkg/$pkg_file - (echo $pkg_file | grep "\.tar\.xz") || (echo $pkg_file | grep "\.txz") \ - >> /dev/null && xz -dc $mxedir/pkg/$pkg_file | tar xf - - echo $pkg_file | grep "\.zip" >> /dev/null && unzip $mxedir/pkg/$pkg_file >> /dev/null - - echo "Initializing repo and adding all as first commit" - cd $gitsdir/$pkg_subdir && \ - (git init; git add -A; git commit -m "init") > /dev/null - - echo "Creating 'dist' tag for distribution tarball state" - git tag dist - - echo "Repository ready in $gitsdir/$pkg_subdir" + make -C $mxedir init-git-$pkg } function export_patch { setupEnv - if [ ! -d $gitsdir/$pkg_subdir ]; then - echo "Error: $gitsdir/$pkg_subdir does not exist, so cannot export patches. Cancelling export." >&2 - exit 1 - fi - - cd $gitsdir/$pkg_subdir && \ - ( - echo 'This file is part of MXE.' - echo 'See index.html for further information.' - echo '' - echo 'Contains ad hoc patches for cross building.' - echo '' - git format-patch -p --stdout dist..HEAD | \ - sed 's/^From: .*/From: MXE/g;' - ) > $mxedir/src/${pkg}-${patch_name}.patch && \ - echo "Generated ${mxedir}/src/${pkg}-${patch_name}.patch" + make -C $mxedir export-patch-$pkg PATCH_NAME=${patch_name} } function import_patch { setupEnv - if [ ! -d $gitsdir/$pkg_subdir ]; then - echo "Error: $gitsdir/$pkg_subdir does not exist, so cannot import patches. Cancelling import - try 'init' first." >&2 - exit 1 - fi + make -C $mxedir import-patch-$pkg PATCH_NAME=${patch_name} +} - if [ -f ${mxedir}/src/${pkg}-${patch_name}.patch ]; then - cd $gitsdir/$pkg_subdir && \ - cat ${mxedir}/src/${pkg}-${patch_name}.patch | \ - sed '/^From/,$ !d' | \ - sed s/'^From: .*'/"From: $author"/'g;' | \ - git am --keep-cr && \ - echo "Imported ${mxedir}/src/${pkg}-${patch_name}.patch" - else - echo "patch file ${mxedir}/src/${pkg}-${patch_name}.patch not found." - echo "Cancelling import." >&2 - exit 1 - fi +function import_all_patches { + setupEnv + make -C $mxedir import-all-patches-$pkg } case "$cmd" in @@ -134,6 +39,9 @@ case "$cmd" in import) import_patch $pkg ;; + import-all) + import_all_patches $pkg + ;; export) export_patch $pkg ;; @@ -144,6 +52,7 @@ case "$cmd" in where COMMAND is one of: init - create a git directory for the package with the raw source import - apply the "pkgname-PATCHNAME.patch" patch commits + import-all - apply commits from all the patches of the package export - create/replace the "pkgname-PATCHNAME.patch" patch with a patch of all commits since init. If PATCHNAME is not set, it is default to "1-fixes". diff --git a/tools/plugins-with-additional-packages.sh b/tools/plugins-with-additional-packages.sh new file mode 100755 index 00000000..58ba4625 --- /dev/null +++ b/tools/plugins-with-additional-packages.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +# This file is part of MXE. See LICENSE.md for licensing information. + +# List of dirs of plugins with additional packages +# as opposed to customisation plugins. +# See plugins/README.md for more information. + +echo plugins/{apps,go,luarocks,native,tcl.tk} diff --git a/tools/s3-fetch-and-sync b/tools/s3-fetch-and-sync index 5b1a9434..c8f920d7 100755 --- a/tools/s3-fetch-and-sync +++ b/tools/s3-fetch-and-sync @@ -1,13 +1,15 @@ -#!/bin/sh -# This file is part of MXE. -# See index.html for further information. +#!/usr/bin/env bash +# This file is part of MXE. See LICENSE.md for licensing information. # cron job running on our DigitalOcean server fetching and uploading # package tarballs to MXE Amazon S3 backup server. # This also acts as a CI to file issue on GitHub if download fails. -# DigitalOcean server IP: 104.131.71.203 +# DigitalOcean server: mirror.mxe.cc +# IP: 104.131.71.203 +# v6: 2604:a880:800:10::156:f001 2604:a880:800:10::1 +# # Admins: https://api.github.com/orgs/mxe/members # Keys: https://github.com/<user>.keys or https://api.github.com/users/<user>/keys # @@ -16,7 +18,11 @@ # Manual switch to enable/disable issue filing on GitHub. # Useful to prevent the same issue from being filed multiple times -file_issue=true +file_issue=false + +# List of plugin dirs to include in downloads +# Can't include all subdirs since some affect versions +plugin_dirs=`./tools/plugins-with-additional-packages.sh` cd ~/mxe && git pull @@ -25,6 +31,7 @@ cd ~/mxe && git pull if ! ( \ cd ~/mxe && \ make download -k MXE_NO_BACKUP_DL=true MXE_VERBOSE=true \ + MXE_PLUGIN_DIRS="$plugin_dirs" \ 2>&1 >tmp-download-log \ ) && $file_issue; then # If one or more download process fails, upload log to sprunge.us (a @@ -36,6 +43,6 @@ if ! ( \ EDITOR=~/mxe/tools/fake-editor ghi open -L bug -- mxe/mxe fi -cd ~/mxe && make clean-junk +cd ~/mxe && make clean-junk MXE_PLUGIN_DIRS="$plugin_dirs" s3cmd sync --acl-public ~/mxe/pkg/* s3://mxe-pkg/ rm -f ~/mxe/tmp-download-log ~/mxe/tmp-url diff --git a/tools/skeleton.py b/tools/skeleton.py new file mode 100755 index 00000000..c66f2df3 --- /dev/null +++ b/tools/skeleton.py @@ -0,0 +1,259 @@ +#!/usr/bin/env python + +""" Create a skeleton of new MXE package. + +This file is part of MXE. See LICENSE.md for licensing information. +""" + +import argparse +import hashlib +import os +import re +import shutil +import subprocess +import tempfile +try: + import urllib2 +except: + # Python 3 + import urllib.request as urllib2 + +MK_TEMPLATE = r''' +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := %(name)s +$(PKG)_WEBSITE := %(website)s +$(PKG)_DESCR := %(description)s +$(PKG)_IGNORE := +$(PKG)_VERSION := %(version)s +$(PKG)_CHECKSUM := %(checksum)s +%(file_specs)s +$(PKG)_DEPS := gcc +%(update)s +define $(PKG)_BUILD + %(build)s +endef +''' + +GH_CONF=r''' +$(PKG)_GH_CONF := %(gh_conf)s +''' + +FILE_SPECS=r''' +$(PKG)_SUBDIR := %(subdir_template)s +$(PKG)_FILE := %(filename_template)s +$(PKG)_URL := %(file_url_template)s +''' + +UPDATE = r''' +define $(PKG)_UPDATE + echo 'TODO: write update script for %(name)s.' >&2; + echo $(%(name)s_VERSION) +endef +''' + +CMAKE_BUILD = r''' + # build and install the library + cd '$(BUILD_DIR)' && $(TARGET)-cmake \ + '$(SOURCE_DIR)' + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install +''' + +AUTOTOOLS_BUILD = r''' + # build and install the library + cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \ + $(MXE_CONFIGURE_OPTS) + $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(BUILD_DIR)' -j 1 install \ + bin_PROGRAMS= \ + sbin_PROGRAMS= \ + noinst_PROGRAMS= +''' + +MAKE_BUILD = r''' + # build and install the library + $(MAKE) -C '$(SOURCE_DIR)' -j '$(JOBS)' + $(MAKE) -C '$(SOURCE_DIR)' -j 1 install +''' + +BUILDERS = { + 'autotools': AUTOTOOLS_BUILD, + 'make': MAKE_BUILD, + 'cmake': CMAKE_BUILD, +} + +PC_AND_TEST = r''' + # create pkg-config files + $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig' + (echo 'Name: $(PKG)'; \ + echo 'Version: $($(PKG)_VERSION)'; \ + echo 'Description: %(description)s'; \ + echo 'Libs: -l%(libname)s';) \ + > '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc' + + # compile test + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' $(PKG) --cflags --libs` +''' + +def get_filename(file_url): + return file_url.rsplit('/', 1)[1] + +def deduce_gh_conf(file_url): + if deduce_website(file_url) == 'github.com': + return '/'.join(file_url.split('://', 1)[1].split('/')[1:3]) + +def deduce_version(file_url): + filename = get_filename(file_url) + return re.search(r'\d[\d.-_]+\d|\d', filename).group() + +def deduce_website(file_url): + return file_url.split('://', 1)[1].split('/', 1)[0] + +def download_file(destination, url): + with open(destination, 'wb') as d: + request = urllib2.urlopen(url) + shutil.copyfileobj(request, d) + request.close() + +def make_checksum(filepath): + hasher = hashlib.sha256() + with open(filepath, 'rb') as f: + for chunk in iter(lambda: f.read(1024 ** 2), b''): + hasher.update(chunk) + return hasher.hexdigest() + +def deduce_subdir(archive): + args = ['tar', '-tf', archive] + tar = subprocess.Popen(args, stdout=subprocess.PIPE) + output = tar.communicate()[0] + if not isinstance(output, str): + # Python 3 + output = output.decode() + files = output.strip().split('\n') + first_file = files[0].strip() + directory = first_file.split('/', 1)[0] + return directory + +def make_build(options, builder): + commands_template = BUILDERS[builder].lstrip() + PC_AND_TEST.rstrip() + return commands_template % options + +def make_skeleton( + name, + description, + file_url, + version, + subdir, + website, + builder, +): + mk_filename = 'src/%s.mk' % name.lower() + if os.path.isfile(mk_filename): + raise Exception('File %s exists!' % mk_filename) + if description is None: + description = name + if version is None: + version = deduce_version(file_url) + if website is None: + website = deduce_website(file_url) + gh_conf = deduce_gh_conf(file_url) + if gh_conf is None: + file_specs = FILE_SPECS + update = UPDATE + else: + file_specs = GH_CONF + update = '' + with tempfile.NamedTemporaryFile() as pkg_file: + download_file(pkg_file.name, file_url) + checksum = make_checksum(pkg_file.name) + if subdir is None: + subdir = deduce_subdir(pkg_file.name) + filename = get_filename(file_url) + filename_template = filename.replace(version, '$($(PKG)_VERSION)') + file_url_template = file_url.replace(version, '$($(PKG)_VERSION)') + subdir_template = subdir.replace(version, '$($(PKG)_VERSION)') + libname = name + if libname.startswith('lib'): + libname = libname[3:] + with open(mk_filename, 'wt') as mk: + options = { + 'name': name, + 'description': description, + 'libname': libname, + 'website': website, + 'file_url_template': file_url_template, + 'gh_conf': gh_conf, + 'checksum': checksum, + 'version': version, + 'subdir_template': subdir_template, + 'filename_template': filename_template, + } + options['file_specs'] = file_specs.strip() % options + options['update'] = update % options + options['build'] = make_build(options, builder) + mk.write(MK_TEMPLATE.lstrip() % options) + +def main(): + parser = argparse.ArgumentParser( + description=__doc__, + formatter_class=argparse.ArgumentDefaultsHelpFormatter, + ) + parser.add_argument( + '--name', + type=str, + help='Package name', + required=True, + ) + parser.add_argument( + '--file-url', + type=str, + help='URL with file of package', + required=True, + ) + parser.add_argument( + '--description', + type=str, + help='Package description (defaults to name)', + required=False, + ) + parser.add_argument( + '--version', + type=str, + help='Package version (can be deduced from file)', + required=False, + ) + parser.add_argument( + '--subdir', + type=str, + help='Package subdir (can be deduced from file)', + required=False, + ) + parser.add_argument( + '--website', + type=str, + help='Package website (defaults to domain of file)', + required=False, + ) + parser.add_argument( + '--builder', + choices=sorted(BUILDERS.keys()), + help='Template of $(PKG)_BUILD', + default='autotools', + ) + args = parser.parse_args() + make_skeleton( + args.name, + args.description, + args.file_url, + args.version, + args.subdir, + args.website, + args.builder, + ) + +if __name__ == '__main__': + main() diff --git a/tools/travis-push.sh b/tools/travis-push.sh new file mode 100755 index 00000000..c8d4b1b5 --- /dev/null +++ b/tools/travis-push.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -ue + +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 packages.json & build-matrix.html' || true +git push origin HEAD:master diff --git a/tools/update-config-guess b/tools/update-config-guess index a56f09a6..55209bcb 100755 --- a/tools/update-config-guess +++ b/tools/update-config-guess @@ -1,9 +1,8 @@ #!/bin/sh -# This file is part of MXE. -# See index.html for further information. +# This file is part of MXE. See LICENSE.md for licensing information. # # Script to automatically update config.guess -# (http://savannah.gnu.org/projects/config) +# (https://savannah.gnu.org/projects/config) clean(){ rm -rf tmp-config-guess @@ -18,7 +17,7 @@ current_version=$(grep 'timestamp.*=' 'ext/config.guess' 2>/dev/null | \ clean # Fetch latest config.guess from Savannah Git -$WGET -q -O tmp-config-guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' +$WGET -q -O tmp-config-guess 'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD' # Latest config.guess timestamp latest_version=$(grep 'timestamp.*=' 'tmp-config-guess' | head -1 | \ diff --git a/tools/update-gmsl b/tools/update-gmsl index 29cf5925..1f947a01 100755 --- a/tools/update-gmsl +++ b/tools/update-gmsl @@ -1,9 +1,8 @@ #!/bin/sh -# This file is part of MXE. -# See index.html for further information. +# This file is part of MXE. See LICENSE.md for licensing information. # # Script to automatically update GNU Make Standard Library -# (http://gmsl.sourceforge.net/) +# (https://gmsl.sourceforge.io/) clean(){ rm -rf tmp-gmsl.tar.gz gmsl-* @@ -16,7 +15,7 @@ current_version=$(grep 'gmsl_version.*=' 'ext/__gmsl' | \ cut -d'=' -f2 | $SED -e 's/^ //' -e 's/ *$//' | tr ' ' '.') # Latest GMSL version fetched from SourceForge latest_version=$( - $WGET -q -O- http://sourceforge.net/projects/gmsl/files/GNU%20Make%20Standard%20Library/ | \ + $WGET -q -O- https://sourceforge.net/projects/gmsl/files/GNU%20Make%20Standard%20Library/ | \ $SED -n 's,.*/v\([0-9][^"]*\)/".*,\1,p' | \ $SORT -V | \ tail -1) @@ -25,12 +24,12 @@ clean if [ $current_version != $latest_version ]; then echo "New version found: $current_version --> $latest_version" $WGET -q -O tmp-gmsl.tar.gz \ - "http://downloads.sourceforge.net/project/gmsl/GNU%20Make%20Standard%20Library/v${latest_version}/gmsl-${latest_version}.tar.gz" + "https://downloads.sourceforge.net/project/gmsl/GNU%20Make%20Standard%20Library/v${latest_version}/gmsl-${latest_version}.tar.gz" tar xzf tmp-gmsl.tar.gz - rm -f ext/*gmsl doc/gmsl* + rm -f ext/*gmsl docs/gmsl* cp -a gmsl-${latest_version}/gmsl ext/ cp -a gmsl-${latest_version}/__gmsl ext/ - cp -a gmsl-${latest_version}/index.html doc/gmsl.html + cp -a gmsl-${latest_version}/index.html docs/gmsl.html clean else echo "No new version available: $current_version" diff --git a/tools/update_backup.py b/tools/update_backup.py new file mode 100755 index 00000000..00692169 --- /dev/null +++ b/tools/update_backup.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python + +""" Update backup of MXE packages. +""" + +import argparse +import hashlib +import os +import shutil + +def make_checksum(filepath): + hasher = hashlib.sha256() + with open(filepath, 'rb') as f: + for chunk in iter(lambda: f.read(1024 ** 2), b''): + hasher.update(chunk) + return hasher.hexdigest() + +def update_backup(mxe_pkg_dir, backup_dir): + for f in os.listdir(mxe_pkg_dir): + sha = make_checksum(os.path.join(mxe_pkg_dir, f)) + new_name = '%s_%s' % (f, sha) + if os.path.exists(os.path.join(backup_dir, new_name)): + print("File %s is already backuped" % new_name) + continue + shutil.copy( + os.path.join(mxe_pkg_dir, f), + os.path.join(backup_dir, new_name), + ) + print("Backup file %s" % new_name) + +def main(): + parser = argparse.ArgumentParser( + description=__doc__, + formatter_class=argparse.ArgumentDefaultsHelpFormatter, + ) + parser.add_argument( + '--backup-dir', + type=str, + help='Path to backup', + required=True, + ) + args = parser.parse_args() + mxe_tools_dir = os.path.dirname(os.path.realpath(__file__)) + mxe_pkg_dir = os.path.join(mxe_tools_dir, '..', 'pkg') + update_backup( + mxe_pkg_dir, + args.backup_dir, + ) + +if __name__ == '__main__': + main() diff --git a/versions.json b/versions.json deleted file mode 100644 index 1a5c859b..00000000 --- a/versions.json +++ /dev/null @@ -1,391 +0,0 @@ -{ - "a52dec": "0.7.4", - "agg": "2.5", - "alure": "1.2", - "apr": "1.5.2", - "apr-util": "1.5.4", - "armadillo": "4.550.1", - "aspell": "0.60.6.1", - "assimp": "3.1.1", - "atk": "2.16.0", - "atkmm": "2.22.7", - "aubio": "0.4.2", - "autoconf": "2.69", - "automake": "1.14.1", - "bfd": "2.25.1", - "binutils": "2.25.1", - "bison": "2.7.1", - "blas": "3.5.0", - "boost": "1.57.0", - "box2d": "2.3.1", - "bullet": "2.82-r2704", - "bzip2": "1.0.6", - "cairo": "1.14.2", - "cairomm": "1.11.2", - "cblas": "1", - "ccfits": "2.4", - "cegui": "0.7.9", - "cfitsio": "3370", - "cgal": "4.5", - "check": "0.9.14", - "chipmunk": "6.2.2", - "chromaprint": "1.1", - "cimg": "1.6.3", - "cmake": "3.0.2", - "cminpack": "1.3.4", - "coreutils": "8.23", - "cppunit": "1.13.2", - "crystalhd": "1", - "cunit": "2.1-3", - "curl": "7.45.0", - "db": "6.1.26", - "dbus": "1.10.2", - "dcmtk": "3.6.0", - "devil": "1.7.8", - "dlfcn-win32": "1.0.0", - "eigen": "3.2.5", - "exiv2": "0.24", - "expat": "2.1.0", - "faad2": "2.7", - "fdk-aac": "0.1.4", - "ffmpeg": "2.7.2", - "fftw": "3.3.4", - "file": "5.24", - "flac": "1.3.1", - "flann": "1.8.4", - "flex": "2.5.39", - "fltk": "1.3.3", - "fontconfig": "2.11.1", - "freeglut": "2.8.1", - "freeimage": "3.15.4", - "freetds": "0.95.8", - "freetype": "2.6.1", - "freetype-bootstrap": "2.6.1", - "fribidi": "0.19.6", - "ftgl": "2.1.3~rc5", - "gc": "7.2e", - "gcc": "5.2.0", - "gd": "2.1.0", - "gdal": "1.11.2", - "gdb": "7.9.1", - "gdk-pixbuf": "2.30.8", - "gendef": "4.0.4", - "geos": "3.4.2", - "gettext": "0.19.5.1", - "giflib": "5.0.5", - "glew": "1.12.0", - "glfw2": "2.7.9", - "glfw3": "3.1", - "glib": "2.44.1", - "glibmm": "2.42.0", - "gmp": "6.1.0", - "gnutls": "3.4.5", - "gperf": "3.0.4", - "graphicsmagick": "1.3.21", - "gsl": "1.16", - "gsoap": "2.8.22", - "gst-plugins-base": "1.4.5", - "gst-plugins-good": "1.4.5", - "gstreamer": "1.4.5", - "gta": "1.0.7", - "gtk2": "2.24.22", - "gtk3": "3.14.4", - "gtkglarea": "2.0.1", - "gtkglext": "1.2.0", - "gtkglextmm": "1.2.0", - "gtkimageview": "1.6.4", - "gtkmm2": "2.24.4", - "gtkmm3": "3.14.0", - "gtksourceview": "2.10.5", - "gtksourceviewmm2": "2.10.3", - "guile": "1.8.8", - "harfbuzz": "1.0.6", - "hdf4": "4.2.10", - "hdf5": "1.8.12", - "hunspell": "1.3.3", - "icu4c": "54.1", - "id3lib": "3.8.3", - "ilmbase": "2.2.0", - "imagemagick": "6.9.0-0", - "intltool": "0.50.2", - "isl": "0.14", - "itk": "4.4.1", - "jack": "1.9.10", - "jansson": "2.7", - "jasper": "1.900.1", - "jpeg": "9a", - "json-c": "0.12", - "json_spirit": "4.08", - "jsoncpp": "1.6.5", - "lame": "3.99.5", - "lapack": "3.5.0", - "lcms": "2.7", - "lcms1": "1.19", - "lensfun": "0.3.0", - "levmar": "2.6", - "libaacs": "0.7.1", - "libarchive": "3.1.2", - "libass": "0.13.0", - "libbluray": "0.7.0", - "libbs2b": "3.1.0", - "libcaca": "0.99.beta19", - "libcdio": "0.93", - "libcdio-paranoia": "10.2+0.93+1", - "libcomm14cux": "2.1.0", - "libcroco": "0.6.2", - "libdca": "0.0.5", - "libdnet": "1.11", - "libdvbpsi": "1.2.0", - "libdvdcss": "1.3.0", - "libdvdnav": "5.0.1", - "libdvdread": "5.0.0", - "libepoxy": "1.3.1", - "libevent": "2.0.21", - "libf2c": "1", - "libffi": "3.2.1", - "libftdi": "0.20", - "libftdi1": "1.2", - "libgcrypt": "1.6.4", - "libgda": "4.2.13", - "libgdamm": "4.1.3", - "libgee": "0.5.0", - "libgeotiff": "1.4.0", - "libgit2": "0.23.2", - "libglade": "2.6.4", - "libgnurx": "2.5.1", - "libgpg_error": "1.20", - "libgsasl": "1.8.0", - "libgsf": "1.14.30", - "libharu": "2.2.1", - "libiberty": "2.25.1", - "libical": "1.0.1", - "libiconv": "1.14", - "libidn": "1.32", - "libircclient": "1.8", - "libjpeg-turbo": "1.4.1", - "liblaxjson": "1.0.5", - "liblo": "0.28rc", - "liblqr-1": "0.4.2", - "libltdl": "2.4.4", - "libmad": "0.15.1b", - "libmicrohttpd": "0.9.38", - "libmikmod": "3.3.7", - "libmng": "2.0.3", - "libmodplug": "0.8.8.4", - "libmpcdec": "1.2.6", - "libmysqlclient": "6.1.6", - "libntlm": "1.4", - "liboauth": "1.0.3", - "libodbc++": "0.2.5", - "liboil": "0.3.17", - "libpano13": "2.9.18", - "libpaper": "1.1.24+nmu4", - "libplist": "1.12", - "libpng": "1.6.18", - "librsvg": "2.40.5", - "librtmp": "a1900c3", - "libsamplerate": "0.1.8", - "libshout": "2.3.1", - "libsigc++": "2.4.0", - "libsndfile": "1.0.25", - "libssh2": "1.6.0", - "libsvm": "3.20", - "libtool": "2.4.4", - "libtorrent-rasterbar": "1.0.6", - "libunistring": "0.9.4", - "libusb": "1.2.6.0", - "libusb1": "1.0.19", - "libvpx": "1.4.0", - "libwebp": "0.4.2", - "libwebsockets": "1.4-chrome43-firefox-36", - "libxml++": "2.37.2", - "libxml2": "2.9.2", - "libxslt": "1.1.28", - "libzip": "0.11.2", - "llvm": "3.4", - "log4cxx": "0.10.0", - "lua": "5.3.1", - "luabind": "0.9.1", - "luajit": "2.0.4", - "lzma": "920", - "lzo": "2.08", - "m4": "1.4.17", - "make": "4.1", - "matio": "1.5.2", - "mdbtools": "0.7.1", - "mingw-w64": "4.0.4", - "minizip": "0b46a2b", - "mman-win32": "378ed6b69bb7220511dd9cd0973c22b3f6773ce7", - "mpc": "1.0.2", - "mpfr": "3.1.3", - "mpg123": "1.21.0", - "muparser": "2.2.5", - "mxml": "2.9", - "ncurses": "e14300b", - "netcdf": "4.3.0", - "netpbm": "10.35.96", - "nettle": "3.1", - "nlopt": "2.4.2", - "nsis": "2.46", - "ocaml-cairo": "1.2.0", - "ocaml-camlimages": "4.0.1", - "ocaml-core": "4.00.1", - "ocaml-findlib": "1.4", - "ocaml-flexdll": "0.31", - "ocaml-lablgl": "1.05", - "ocaml-lablgtk2": "2.16.0", - "ocaml-native": "4.00.1", - "ocaml-xml-light": "2.2", - "oce": "0.16.1", - "ogg": "1.3.2", - "old": "0.17", - "openal": "1.16.0", - "openblas": "0.2.12", - "opencore-amr": "0.1.3", - "opencsg": "1.4.0", - "opencv": "2.4.10", - "openexr": "2.2.0", - "openjpeg": "2.1.0", - "openmp-validation": "3.1", - "openscenegraph": "3.4.0", - "openssl": "1.0.2d", - "opus": "1.1", - "opusfile": "0.6", - "ossim": "1.8.18", - "pango": "1.37.4", - "pangomm": "2.34.0", - "pcl": "1.7.2", - "pcre": "8.37", - "pdcurses": "3.4", - "pdflib_lite": "7.0.5p3", - "pfstools": "2.0.0", - "physfs": "2.0.3", - "picomodel": "1142ad8", - "pire": "0.0.5", - "pixman": "0.31.2", - "pkgconf": "da179fd", - "plib": "1.8.5-rc1", - "plibc": "cd7ed09", - "plotmm": "0.1.2", - "plotutils": "2.6", - "poco": "1.4.7p1", - "polarssl": "1.3.9", - "poppler": "0.30.0", - "popt": "1.16", - "portablexdr": "4.9.1", - "portaudio": "19_20140130", - "portmidi": "217", - "postgresql": "9.2.4", - "primesieve": "5.4.1", - "proj": "4.8.0", - "protobuf": "2.5.0", - "pthreads": "POSIX 1003.1-2001", - "qdbm": "1.8.78", - "qhttpengine": "0.1.0", - "qjson": "0.8.1", - "qscintilla2": "2.8.4", - "qt": "4.8.7", - "qt3d": "bcdbf04b74cc7ded4d7b2471347f51b54ff8584b", - "qt5": "5.5.1", - "qtactiveqt": "5.5.1", - "qtbase": "5.5.1", - "qtconnectivity": "5.5.1", - "qtdeclarative": "5.5.1", - "qtenginio": "5.5.1", - "qtgraphicaleffects": "5.5.1", - "qtimageformats": "5.5.1", - "qtlocation": "5.5.1", - "qtmultimedia": "5.5.1", - "qtquick1": "5.5.1", - "qtquickcontrols": "5.5.1", - "qtscript": "5.5.1", - "qtsensors": "5.5.1", - "qtserialport": "5.5.1", - "qtserialport_qt4": "5c3b6cc770", - "qtservice": "ad9bc46", - "qtsvg": "5.5.1", - "qtsystems": "4e3a7ed", - "qttools": "5.5.1", - "qttranslations": "5.5.1", - "qtwebchannel": "5.5.1", - "qtwebengine": "5.5.1", - "qtwebkit": "5.5.1", - "qtwebsockets": "5.5.1", - "qtwinextras": "5.5.1", - "qtxlsxwriter": "ad90b6a2c21b300138ceb9fe9030a5917230f92d", - "qtxmlpatterns": "5.5.1", - "qwt": "6.1.1", - "qwt_qt4": "6.1.1", - "qwtplot3d": "0.2.7", - "readline": "6.3", - "rubberband": "1.8.1", - "rucksack": "3.1.0", - "sdl": "1.2.15", - "sdl2": "2.0.3", - "sdl2_gfx": "1.0.1", - "sdl2_image": "2.0.0", - "sdl2_mixer": "2.0.0", - "sdl2_net": "2.0.0", - "sdl2_ttf": "2.0.12", - "sdl_gfx": "2.0.25", - "sdl_image": "1.2.12", - "sdl_mixer": "1.2.12", - "sdl_net": "1.2.8", - "sdl_pango": "0.1.2", - "sdl_rwhttp": "0.2.0", - "sdl_sound": "1.0.3", - "sdl_ttf": "2.0.11", - "sed": "4.2.2", - "sfml": "2.3.1", - "smpeg": "0.4.5+cvs20030824", - "smpeg2": "2.0.0", - "sox": "14.4.2", - "speex": "1.2rc2", - "speexdsp": "1.2rc3", - "sqlite": "3090200", - "suitesparse": "4.2.1", - "t4k_common": "0.1.1", - "taglib": "1.7.2", - "tclap": "1.2.1", - "teem": "1.11.0", - "termcap": "1.3.1", - "theora": "1.1.1", - "tiff": "4.0.6", - "tinyxml": "2.6.2", - "tinyxml2": "3.0.0", - "tre": "0.8.0", - "twolame": "0.3.13", - "ucl": "1.03", - "unrtf": "0.21.9", - "upx": "3.91", - "vamp-plugin-sdk": "2.5", - "vcdimager": "0.7.24", - "vidstab": "0.98b", - "vigra": "1.9.0", - "vmime": "7e36a74", - "vo-aacenc": "0.1.3", - "vo-amrwbenc": "0.1.3", - "vorbis": "1.3.5", - "vtk": "5.8.0", - "vtk6": "6.3.0", - "wavpack": "4.75.0", - "wget": "1.16.3", - "widl": "4.0.4", - "winpcap": "4_1_3", - "wt": "3.3.4", - "wxwidgets": "3.0.2", - "x264": "20141130-2245", - "xapian-core": "1.2.21", - "xerces": "3.1.2", - "xine-lib": "1.2.6", - "xmlrpc-c": "d4364f4", - "xmlwrapp": "0.7.0", - "xorg-macros": "1.19.0", - "xvidcore": "1.3.3", - "xz": "5.2.2", - "yasm": "1.3.0", - "zlib": "1.2.8", - "zziplib": "0.13.62", - "mxe-conf": "1", - "": null -}