From c3df5c53be2ae2a3e20d4df804715d25d45d6059 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sun, 23 Oct 2016 05:44:33 +0300 Subject: Revert "virtual package googletest is not required anymore" This reverts commit ad11e753ddede848ee734ec4999f218f455fdfe2. New protobuf release (3.1.0) does not provide official tarballs with prepared configure and googletest files. --- docs/index.html | 4 ++++ src/googletest.mk | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 src/googletest.mk diff --git a/docs/index.html b/docs/index.html index c5895ac..f46f93e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1455,6 +1455,10 @@ local-pkg-list: $(LOCAL_PKG_LIST) GnuTLS + googletest + Google Test + + graphicsmagick GraphicsMagick diff --git a/src/googletest.mk b/src/googletest.mk new file mode 100644 index 0000000..e5a902f --- /dev/null +++ b/src/googletest.mk @@ -0,0 +1,15 @@ +# This file is part of MXE. +# See index.html for further information. + +PKG := googletest +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.7.0 +$(PKG)_CHECKSUM := f73a6546fdf9fce9ff93a5015e0333a8af3062a152a9ad6bcb772c96687016cc +$(PKG)_SUBDIR := $(PKG)-release-$($(PKG)_VERSION) +$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://github.com/google/$(PKG)/archive/release-$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := + +define $(PKG)_UPDATE + $(call MXE_GET_GITHUB_TAGS, google/googletest, release-) +endef -- cgit v0.12 From 08d8094f3a6791f64f1503d96e4456e06ba646ef Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sun, 23 Oct 2016 05:41:49 +0300 Subject: Revert "protobuf: use official release tarball instead of tarball from git tag" This reverts commit 284f0a7ec3b43c0a918e3d5c85dc19f3ca561962. New protobuf release (3.1.0) does not provide official tarballs with prepared configure and googletest files. Tag (and URL) changed since original version. Now tag start with 'v'. --- src/protobuf.mk | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/protobuf.mk b/src/protobuf.mk index d3b87d3..4a8cfe0 100644 --- a/src/protobuf.mk +++ b/src/protobuf.mk @@ -3,19 +3,21 @@ PKG := protobuf $(PKG)_IGNORE := $(PKG)_VERSION := 2.6.1 -$(PKG)_CHECKSUM := dbbd7bdd2381633995404de65a945ff1a7610b0da14593051b4738c90c6dd164 +$(PKG)_CHECKSUM := 2667b7cda4a6bc8a09e5463adf3b5984e08d94e72338277affa8594d8b6e5cd1 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz -$(PKG)_URL := https://github.com/google/protobuf/releases/download/v$($(PKG)_VERSION)/$($(PKG)_FILE) -$(PKG)_DEPS := gcc zlib +$(PKG)_URL := https://github.com/google/$(PKG)/archive/v$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := gcc zlib googletest define $(PKG)_UPDATE $(call MXE_GET_GITHUB_TAGS, google/protobuf, v) endef define $(PKG)_BUILD + $(call PREPARE_PKG_SOURCE,googletest,$(1)) + cd '$(1)' && mv googletest-release-$(googletest_VERSION)/ gtest # First step: Build for host system in order to create "protoc" binary. - cd '$(1)' && ./configure \ + cd '$(1)' && ./autogen.sh && ./configure \ --disable-shared $(MAKE) -C '$(1)' -j '$(JOBS)' cp '$(1)/src/protoc' '$(PREFIX)/bin/$(TARGET)-protoc' -- cgit v0.12 From 54216fde55c7e20d4b1fed056a97a812ba059373 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sun, 23 Oct 2016 06:08:23 +0300 Subject: add package googlemock It is needed by protobuf 3.1.0 --- docs/index.html | 4 ++++ src/googlemock.mk | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/googlemock.mk diff --git a/docs/index.html b/docs/index.html index f46f93e..34a44d7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1455,6 +1455,10 @@ local-pkg-list: $(LOCAL_PKG_LIST) GnuTLS + googlemock + Google Mock + + googletest Google Test diff --git a/src/googlemock.mk b/src/googlemock.mk new file mode 100644 index 0000000..9aaabdc --- /dev/null +++ b/src/googlemock.mk @@ -0,0 +1,14 @@ +# This file is part of MXE. See LICENSE.md for licensing information. + +PKG := googlemock +$(PKG)_IGNORE := +$(PKG)_VERSION := 1.7.0 +$(PKG)_CHECKSUM := 3f20b6acb37e5a98e8c4518165711e3e35d47deb6cdb5a4dd4566563b5efd232 +$(PKG)_SUBDIR := googlemock-release-$($(PKG)_VERSION) +$(PKG)_FILE := googlemock-$($(PKG)_VERSION).tar.gz +$(PKG)_URL := https://github.com/google/googlemock/archive/release-$($(PKG)_VERSION).tar.gz +$(PKG)_DEPS := + +define $(PKG)_UPDATE + $(call MXE_GET_GITHUB_TAGS, google/googlemock, release-) +endef -- cgit v0.12 From f2698622c95d45e886a1aa89383986afe7d3aebf Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sun, 23 Oct 2016 06:24:54 +0300 Subject: protobuf: update to 3.1.0 --- src/protobuf.mk | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/protobuf.mk b/src/protobuf.mk index 4a8cfe0..8832340 100644 --- a/src/protobuf.mk +++ b/src/protobuf.mk @@ -2,20 +2,23 @@ PKG := protobuf $(PKG)_IGNORE := -$(PKG)_VERSION := 2.6.1 -$(PKG)_CHECKSUM := 2667b7cda4a6bc8a09e5463adf3b5984e08d94e72338277affa8594d8b6e5cd1 +$(PKG)_VERSION := 3.1.0 +$(PKG)_CHECKSUM := 0a0ae63cbffc274efb573bdde9a253e3f32e458c41261df51c5dbc5ad541e8f7 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz $(PKG)_URL := https://github.com/google/$(PKG)/archive/v$($(PKG)_VERSION).tar.gz -$(PKG)_DEPS := gcc zlib googletest +$(PKG)_DEPS := gcc zlib googlemock googletest define $(PKG)_UPDATE $(call MXE_GET_GITHUB_TAGS, google/protobuf, v) endef define $(PKG)_BUILD +# Zero step: put googlemock and googletest to the source directory. + $(call PREPARE_PKG_SOURCE,googlemock,$(1)) + cd '$(1)' && mv '$(googlemock_SUBDIR)' gmock $(call PREPARE_PKG_SOURCE,googletest,$(1)) - cd '$(1)' && mv googletest-release-$(googletest_VERSION)/ gtest + cd '$(1)' && mv '$(googletest_SUBDIR)' gmock/gtest # First step: Build for host system in order to create "protoc" binary. cd '$(1)' && ./autogen.sh && ./configure \ --disable-shared -- cgit v0.12 From 113781a492f2bf3d4ad0421af501dd422f60c3a7 Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sun, 23 Oct 2016 20:29:30 +0300 Subject: protobuf: compile host protoc as native package Do not compile host protoc for all target, instead compile it once. --- src/googlemock.mk | 1 + src/googletest.mk | 1 + src/protobuf.mk | 42 +++++++++++++++++++++--------------------- 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/googlemock.mk b/src/googlemock.mk index 9aaabdc..119d250 100644 --- a/src/googlemock.mk +++ b/src/googlemock.mk @@ -8,6 +8,7 @@ $(PKG)_SUBDIR := googlemock-release-$($(PKG)_VERSION) $(PKG)_FILE := googlemock-$($(PKG)_VERSION).tar.gz $(PKG)_URL := https://github.com/google/googlemock/archive/release-$($(PKG)_VERSION).tar.gz $(PKG)_DEPS := +$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) define $(PKG)_UPDATE $(call MXE_GET_GITHUB_TAGS, google/googlemock, release-) diff --git a/src/googletest.mk b/src/googletest.mk index e5a902f..2825c0d 100644 --- a/src/googletest.mk +++ b/src/googletest.mk @@ -9,6 +9,7 @@ $(PKG)_SUBDIR := $(PKG)-release-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz $(PKG)_URL := https://github.com/google/$(PKG)/archive/release-$($(PKG)_VERSION).tar.gz $(PKG)_DEPS := +$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) define $(PKG)_UPDATE $(call MXE_GET_GITHUB_TAGS, google/googletest, release-) diff --git a/src/protobuf.mk b/src/protobuf.mk index 8832340..da52a9f 100644 --- a/src/protobuf.mk +++ b/src/protobuf.mk @@ -8,33 +8,33 @@ $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz $(PKG)_URL := https://github.com/google/$(PKG)/archive/v$($(PKG)_VERSION).tar.gz $(PKG)_DEPS := gcc zlib googlemock googletest +$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS) +$(PKG)_DEPS_$(BUILD) := googlemock googletest define $(PKG)_UPDATE $(call MXE_GET_GITHUB_TAGS, google/protobuf, v) endef define $(PKG)_BUILD -# Zero step: put googlemock and googletest to the source directory. - $(call PREPARE_PKG_SOURCE,googlemock,$(1)) - cd '$(1)' && mv '$(googlemock_SUBDIR)' gmock - $(call PREPARE_PKG_SOURCE,googletest,$(1)) - cd '$(1)' && mv '$(googletest_SUBDIR)' gmock/gtest -# First step: Build for host system in order to create "protoc" binary. - cd '$(1)' && ./autogen.sh && ./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 \ + $(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 + + cd '$(BUILD_DIR)' && '$(SOURCE_DIR)'/configure \ $(MXE_CONFIGURE_OPTS) \ - --with-zlib \ - --with-protoc='$(PREFIX)/bin/$(TARGET)-protoc' - $(MAKE) -C '$(1)' -j '$(JOBS)' - $(MAKE) -C '$(1)' -j 1 install + $(if $(BUILD_CROSS), \ + --with-zlib \ + --with-protoc='$(PREFIX)/$(BUILD)/bin/protoc' \ + ) + $(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-protobuf.exe' \ - `'$(TARGET)-pkg-config' protobuf --cflags --libs` + $(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 -- cgit v0.12