From d6c4884455cec15d24fbdb5a07dd2ea68978bc14 Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Thu, 15 Oct 2015 21:08:33 +1100 Subject: Makefile: add plugins functionality to include makefiles from MXE_PLUGIN_DIRS --- Makefile | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index a502416..3e328ef 100644 --- a/Makefile +++ b/Makefile @@ -170,12 +170,18 @@ UNPACK_ARCHIVE = \ 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 +# plugins will need to set their own $(PKG)_MAKEFILE for updates +# all files for extension plugins will be considered for outdated checks +PKG_MAKEFILE = $(realpath $(or $($(1)_MAKEFILE),$(TOP_DIR)/src/$(1).mk)) +PKG_MAKEFILES = $(realpath $(sort $(wildcard $(addsuffix /$(1).mk, $(TOP_DIR)/src $(MXE_PLUGIN_DIRS))))) +PKG_TESTFILES = $(realpath $(sort $(wildcard $(addsuffix /$(1)-test*, $(TOP_DIR)/src $(MXE_PLUGIN_DIRS))))) +PKG_PATCHES = $(realpath $(sort $(wildcard $(addsuffix /$(1)-[0-9]*.patch, $(TOP_DIR)/src $(MXE_PLUGIN_DIRS))))) define PREPARE_PKG_SOURCE cd '$(2)' && $(call UNPACK_PKG_ARCHIVE,$(1)) cd '$(2)/$($(1)_SUBDIR)' - $(foreach PKG_PATCH,$(PATCHES), + $(foreach PKG_PATCH,$(PKG_PATCHES), (cd '$(2)/$($(1)_SUBDIR)' && $(PATCH) -p1 -u) < $(PKG_PATCH)) endef @@ -326,6 +332,11 @@ $(PREFIX)/installed/check-requirements: $(MAKEFILE) include $(patsubst %,$(TOP_DIR)/src/%.mk,$(PKGS)) +# include files from MXE_PLUGIN_DIRS +PLUGIN_FILES := $(realpath $(wildcard $(addsuffix /*.mk,$(MXE_PLUGIN_DIRS)))) +PLUGIN_PKGS := $(basename $(notdir $(PLUGIN_FILES))) +include $(PLUGIN_FILES) +PKGS := $(sort $(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 @@ -405,9 +416,9 @@ $(PREFIX)/lib/nonetwork.so: $(TOP_DIR)/tools/nonetwork.c 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) \ $(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) \ @@ -583,9 +594,9 @@ define UPDATE $(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)/' '$(PKG_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)/' '$(PKG_MAKEFILE)'; \ exit 1; }))), $(info Unable to update version number of package $(1) \ $(newline)$(newline)$($(1)_UPDATE)$(newline))) @@ -602,7 +613,7 @@ update-package-%: update-checksum-%: $(if $(call set_is_member,$*,$(PKGS)), \ $(call DOWNLOAD_PKG_ARCHIVE,$*) && \ - $(SED) -i 's/^\([^ ]*_CHECKSUM *:=\).*/\1 '"`$(call PKG_CHECKSUM,$*)`"'/' '$(TOP_DIR)/src/$*.mk', \ + $(SED) -i 's/^\([^ ]*_CHECKSUM *:=\).*/\1 '"`$(call PKG_CHECKSUM,$*)`"'/' '$(call PKG_MAKEFILE,$*)', \ $(error Package $* not found in index.html)) .PHONY: cleanup-style -- cgit v0.12 From a6ba06c5260d26e805d9fdf54c587636bb861d4a Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Thu, 15 Oct 2015 21:12:17 +1100 Subject: add native and apps plugin packages --- plugins/README.md | 5 ++++ ...passx-1-don-t-discard-config-set-by-qmake.patch | 27 ++++++++++++++++++ plugins/apps/keepassx.mk | 27 ++++++++++++++++++ plugins/native/autoconf.mk | 31 ++++++++++++++++++++ plugins/native/automake.mk | 31 ++++++++++++++++++++ plugins/native/bison.mk | 31 ++++++++++++++++++++ plugins/native/coreutils.mk | 32 +++++++++++++++++++++ plugins/native/flex.mk | 31 ++++++++++++++++++++ plugins/native/gettext.mk | 14 +++++++++ plugins/native/gperf.mk | 31 ++++++++++++++++++++ plugins/native/intltool.mk | 30 ++++++++++++++++++++ plugins/native/libiconv.mk | 14 +++++++++ plugins/native/libtool.mk | 14 +++++++++ plugins/native/m4.mk | 33 ++++++++++++++++++++++ plugins/native/make.mk | 32 +++++++++++++++++++++ plugins/native/sed.mk | 32 +++++++++++++++++++++ 16 files changed, 415 insertions(+) create mode 100644 plugins/README.md create mode 100644 plugins/apps/keepassx-1-don-t-discard-config-set-by-qmake.patch create mode 100644 plugins/apps/keepassx.mk create mode 100644 plugins/native/autoconf.mk create mode 100644 plugins/native/automake.mk create mode 100644 plugins/native/bison.mk create mode 100644 plugins/native/coreutils.mk create mode 100644 plugins/native/flex.mk create mode 100644 plugins/native/gettext.mk create mode 100644 plugins/native/gperf.mk create mode 100644 plugins/native/intltool.mk create mode 100644 plugins/native/libiconv.mk create mode 100644 plugins/native/libtool.mk create mode 100644 plugins/native/m4.mk create mode 100644 plugins/native/make.mk create mode 100644 plugins/native/sed.mk diff --git a/plugins/README.md b/plugins/README.md new file mode 100644 index 0000000..785d1c3 --- /dev/null +++ b/plugins/README.md @@ -0,0 +1,5 @@ +### MXE Plugins + +A collection of unsupported examples, experiments, tools, and utilities. + +Enjoy! 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 0000000..2962b63 --- /dev/null +++ b/plugins/apps/keepassx-1-don-t-discard-config-set-by-qmake.patch @@ -0,0 +1,27 @@ +This file is part of MXE. +See index.html for further 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 0000000..a05dc89 --- /dev/null +++ b/plugins/apps/keepassx.mk @@ -0,0 +1,27 @@ +# This file is part of MXE. +# See index.html for further 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)_FILE) +$(PKG)_WEBSITE := https://www.keepassx.org +$(PKG)_MAKEFILE := $(realpath $(lastword $(MAKEFILE_LIST))) +$(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/native/autoconf.mk b/plugins/native/autoconf.mk new file mode 100644 index 0000000..7ef4b79 --- /dev/null +++ b/plugins/native/autoconf.mk @@ -0,0 +1,31 @@ +# This file is part of MXE. +# See index.html for further information. + +PKG := autoconf +$(PKG)_IGNORE := +$(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)_WEBSITE := http://www.gnu.org/software/autoconf +$(PKG)_MAKEFILE := $(realpath $(lastword $(MAKEFILE_LIST))) +$(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' | \ + $(SED) -n 's,.* Date: Fri, 16 Oct 2015 03:57:00 +1100 Subject: plugins: add qt override example with minimal deps and custom cflags --- plugins/custom-qt-min/overrides.mk | 82 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 plugins/custom-qt-min/overrides.mk diff --git a/plugins/custom-qt-min/overrides.mk b/plugins/custom-qt-min/overrides.mk new file mode 100644 index 0000000..159e0dd --- /dev/null +++ b/plugins/custom-qt-min/overrides.mk @@ -0,0 +1,82 @@ +# This file is part of MXE. +# See index.html for further information. + +# MXE provides a fully featured build of Qt. Some users want more control... +# http://lists.nongnu.org/archive/html/mingw-cross-env-list/2013-08/msg00010.html +# http://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' + +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 + + mkdir '$(1)/test-qt' + cd '$(1)/test-qt' && '$(PREFIX)/$(TARGET)/qt/bin/qmake' '$(PWD)/$(2).pro' + $(MAKE) -C '$(1)/test-qt' -j '$(JOBS)' + $(INSTALL) -m755 '$(1)/test-qt/release/test-qt.exe' '$(PREFIX)/$(TARGET)/bin/' + +endef -- cgit v0.12 From 5e63e416b166d4e7855e88176a21126bc381bb3d Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Thu, 26 Nov 2015 16:48:10 +1100 Subject: plugins: add gcc52 overlay --- plugins/gcc52/gcc52-overlay.mk | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 plugins/gcc52/gcc52-overlay.mk diff --git a/plugins/gcc52/gcc52-overlay.mk b/plugins/gcc52/gcc52-overlay.mk new file mode 100644 index 0000000..a3a14ab --- /dev/null +++ b/plugins/gcc52/gcc52-overlay.mk @@ -0,0 +1,25 @@ +# This file is part of MXE. +# See index.html for further 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 +# libmysqlclient patch changes don't adversely affect 5.2 series + +PKG := cloog +$(PKG)_TARGETS := $(MXE_TARGETS) + +PKG := isl +$(PKG)_VERSION := 0.14 +$(PKG)_CHECKSUM := 7e3c02ff52f8540f6a85534f54158968417fd676001651c8289c705bd0228f36 +$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2 +$(PKG)_URL := http://isl.gforge.inria.fr/$($(PKG)_FILE) + +PKG := gcc +$(PKG)_VERSION := 5.2.0 +$(PKG)_CHECKSUM := 5f835b04b5f7dd4f4d2dc96190ec1621b8d89f2dc6f638f9f8bc1b1014ba8cad +$(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) -- cgit v0.12